diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-02-16 02:39:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 02:39:56 +0300 |
commit | 0753cb03397f52eeb74d03ade2cd9e68893fe684 (patch) | |
tree | d50be14c2453d21cb321074c725a8cbf12c2f109 /plugins/CoreHome | |
parent | 86b58ed26f82f7b6ddd683a0d2dfb886f73d31e8 (diff) |
add some comments to vue directives (#18800)
Diffstat (limited to 'plugins/CoreHome')
5 files changed, 10 insertions, 0 deletions
diff --git a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts index 4f8f02ddd8..3e5b755be3 100644 --- a/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts +++ b/plugins/CoreHome/vue/src/ExpandOnClick/ExpandOnClick.ts @@ -10,11 +10,14 @@ import Matomo from '../Matomo/Matomo'; import DirectiveUtilities from '../directiveUtilities'; interface ExpandOnClickArgs { + // input (specified by user) expander: string | HTMLElement, + // state isMouseDown?: boolean; hasScrolled?: boolean; + // event handlers onExpand?: () => void; onClickOutsideElement?: (event: MouseEvent) => void; onScroll?: () => void; diff --git a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts index f6786eab4b..73afcd820d 100644 --- a/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts +++ b/plugins/CoreHome/vue/src/ExpandOnHover/ExpandOnHover.ts @@ -10,8 +10,10 @@ import Matomo from '../Matomo/Matomo'; import DirectiveUtilities from '../directiveUtilities'; interface ExpandOnHoverArgs { + // input (provided by user) expander: string | HTMLElement, + // event handlers onMouseEnter?: () => void; onMouseLeave?: () => void; onClickOutsideElement?: (event: MouseEvent) => void; diff --git a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts index a2ae2ce388..df31210a81 100644 --- a/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts +++ b/plugins/CoreHome/vue/src/FocusAnywhereButHere/FocusAnywhereButHere.ts @@ -8,8 +8,10 @@ import { DirectiveBinding } from 'vue'; interface FocusAnywhereButHereArgs { + // input (provided by user) blur: () => void, + // state/event handlers isMouseDown?: boolean; hasScrolled?: boolean; onEscapeHandler?: (event: KeyboardEvent) => void; diff --git a/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts b/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts index 6a13e46ff0..3a79d51e40 100644 --- a/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts +++ b/plugins/CoreHome/vue/src/FocusIf/FocusIf.ts @@ -8,6 +8,7 @@ import { DirectiveBinding } from 'vue'; interface FocusIfArgs { + // input (provided by user) afterFocus?: () => void; } diff --git a/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts b/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts index 112ab3df2b..a1a588336b 100644 --- a/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts +++ b/plugins/CoreHome/vue/src/SelectOnFocus/SelectOnFocus.ts @@ -8,9 +8,11 @@ import { DirectiveBinding } from 'vue'; interface SelectOnFocusArgs { + // state focusedElement?: HTMLElement; elementSupportsSelect?: boolean; + // event handlers onFocusHandler?: (event: Event) => void; onClickHandler?: (event: MouseEvent) => void; onBlurHandler?: (event: Event) => void; |