@ringcentral/juno 2.41.4 → 2.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Dialer/DialPad/DialPad.d.ts +25 -1
- package/components/Dialer/DialPad/DialPad.js +12 -3
- package/components/Dialer/DialPad/utils/useKeyAudio.d.ts +12 -4
- package/components/Dialer/DialPad/utils/useKeyAudio.js +9 -5
- package/components/Downshift/utils/useDownshift.d.ts +1 -5
- package/components/Downshift/utils/useDownshiftTag.d.ts +2 -262
- package/components/Downshift/utils/useDownshiftTag.js +2 -3
- package/es6/components/Dialer/DialPad/DialPad.js +13 -4
- package/es6/components/Dialer/DialPad/utils/useKeyAudio.js +9 -5
- package/es6/components/Downshift/utils/useDownshiftTag.js +2 -3
- package/package.json +1 -1
|
@@ -31,6 +31,14 @@ declare type RcDialPadProps = {
|
|
|
31
31
|
volume?: number;
|
|
32
32
|
/** is keypad sound muted */
|
|
33
33
|
muted?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* sinkId of keypad sound
|
|
36
|
+
*
|
|
37
|
+
* @important
|
|
38
|
+
* Safari is not supported the `setSinkId` method
|
|
39
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility
|
|
40
|
+
*/
|
|
41
|
+
sinkId?: string;
|
|
34
42
|
/** long press '0' time to typing '+' */
|
|
35
43
|
longPressDelay?: number;
|
|
36
44
|
/**
|
|
@@ -83,6 +91,14 @@ declare const RcDialPad: import("styled-components").StyledComponentClass<{
|
|
|
83
91
|
volume?: number | undefined;
|
|
84
92
|
/** is keypad sound muted */
|
|
85
93
|
muted?: boolean | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* sinkId of keypad sound
|
|
96
|
+
*
|
|
97
|
+
* @important
|
|
98
|
+
* Safari is not supported the `setSinkId` method
|
|
99
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility
|
|
100
|
+
*/
|
|
101
|
+
sinkId?: string | undefined;
|
|
86
102
|
/** long press '0' time to typing '+' */
|
|
87
103
|
longPressDelay?: number | undefined;
|
|
88
104
|
/**
|
|
@@ -133,6 +149,14 @@ declare const RcDialPad: import("styled-components").StyledComponentClass<{
|
|
|
133
149
|
volume?: number | undefined;
|
|
134
150
|
/** is keypad sound muted */
|
|
135
151
|
muted?: boolean | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* sinkId of keypad sound
|
|
154
|
+
*
|
|
155
|
+
* @important
|
|
156
|
+
* Safari is not supported the `setSinkId` method
|
|
157
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility
|
|
158
|
+
*/
|
|
159
|
+
sinkId?: string | undefined;
|
|
136
160
|
/** long press '0' time to typing '+' */
|
|
137
161
|
longPressDelay?: number | undefined;
|
|
138
162
|
/**
|
|
@@ -156,7 +180,7 @@ declare const RcDialPad: import("styled-components").StyledComponentClass<{
|
|
|
156
180
|
control?: ((instance: RcDialPadControl | null) => void) | React.RefObject<RcDialPadControl> | null | undefined;
|
|
157
181
|
/** method to get addition props for below each `DialPadButton` */
|
|
158
182
|
getDialPadButtonProps?: ((value: DIALER_PAD_ICON_VALUES) => Pick<RcIconButtonProps, "symbol" | "ref" | "key" | "form" | "className" | "color" | "id" | "lang" | "name" | "style" | "type" | "role" | "tabIndex" | "elevation" | "href" | "radius" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "download" | "translate" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "variant" | "innerRef" | "disabled" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "loading" | "CircularProgressProps" | "iconColor" | "iconSize" | "invisible" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "IconProps" | "focusVariant" | "shouldPersistBg" | "stretchIcon" | "useColorWhenDisabled" | "activeElevation" | "disabledFakeBorder" | "alwaysEnableTooltip" | "tooltipTitle" | "tooltipPlacement" | "disableToolTip" | "popperProps" | "tooltipForceHide" | "externalLink" | "ariaLabel" | "aRef"> & Record<any, any>) | undefined;
|
|
159
|
-
} & Pick<React.HTMLAttributes<HTMLDivElement>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & Pick<RcDialPadButtonProps, "classes"> & React.RefAttributes<HTMLDivElement>, "ref" | "key" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "action" | "muted" | "control" | "externalWindow" | "longPressDelay" | "autoSize" | "volume" | "
|
|
183
|
+
} & Pick<React.HTMLAttributes<HTMLDivElement>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & Pick<RcDialPadButtonProps, "classes"> & React.RefAttributes<HTMLDivElement>, "ref" | "key" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "action" | "muted" | "control" | "externalWindow" | "longPressDelay" | "autoSize" | "sounds" | "volume" | "sinkId" | "persistBgTime" | "getDialPadButtonProps"> & {
|
|
160
184
|
theme?: import("../../../foundation").RcTheme | undefined;
|
|
161
185
|
}>;
|
|
162
186
|
export { RcDialPad };
|
|
@@ -11,7 +11,7 @@ var styles_1 = require("./styles");
|
|
|
11
11
|
var utils_3 = require("./utils");
|
|
12
12
|
var _RcDialPad = react_1.forwardRef(function (inProps, ref) {
|
|
13
13
|
var props = foundation_1.useThemeProps({ props: inProps, name: 'RcDialPad' });
|
|
14
|
-
var sounds = props.sounds, volume = props.volume, autoSize = props.autoSize, muted = props.muted, classes = props.classes, onChangeProp = props.onChange, longPressDelay = props.longPressDelay, action = props.action, persistBgTime = props.persistBgTime, control = props.control, getDialPadButtonProps = props.getDialPadButtonProps, _a = props.externalWindow, externalWindow = _a === void 0 ? window : _a, divProps = tslib_1.__rest(props, ["sounds", "volume", "autoSize", "muted", "classes", "onChange", "longPressDelay", "action", "persistBgTime", "control", "getDialPadButtonProps", "externalWindow"]);
|
|
14
|
+
var sounds = props.sounds, volume = props.volume, autoSize = props.autoSize, muted = props.muted, classes = props.classes, onChangeProp = props.onChange, longPressDelay = props.longPressDelay, action = props.action, persistBgTime = props.persistBgTime, control = props.control, getDialPadButtonProps = props.getDialPadButtonProps, _a = props.externalWindow, externalWindow = _a === void 0 ? window : _a, sinkId = props.sinkId, divProps = tslib_1.__rest(props, ["sounds", "volume", "autoSize", "muted", "classes", "onChange", "longPressDelay", "action", "persistBgTime", "control", "getDialPadButtonProps", "externalWindow", "sinkId"]);
|
|
15
15
|
var containerRef = react_1.useRef(null);
|
|
16
16
|
var hiddenRef = react_1.useRef(null);
|
|
17
17
|
var keyTimerMapRef = react_1.useRef({});
|
|
@@ -34,10 +34,19 @@ var _RcDialPad = react_1.forwardRef(function (inProps, ref) {
|
|
|
34
34
|
event.preventDefault();
|
|
35
35
|
},
|
|
36
36
|
}).onKeyFocusedIndexHandle;
|
|
37
|
+
var audioProcessor = react_1.useCallback(function (audio) {
|
|
38
|
+
if (typeof volume !== 'undefined')
|
|
39
|
+
audio.volume = volume;
|
|
40
|
+
if (typeof muted !== 'undefined')
|
|
41
|
+
audio.muted = muted;
|
|
42
|
+
if (typeof audio['setSinkId'] === 'function')
|
|
43
|
+
audio['setSinkId'](
|
|
44
|
+
// when pass undefined, use '' to remove sinkId to default
|
|
45
|
+
sinkId || '');
|
|
46
|
+
}, [muted, sinkId, volume]);
|
|
37
47
|
var play = utils_3.useKeyAudio({
|
|
38
|
-
volume: volume,
|
|
39
|
-
muted: muted,
|
|
40
48
|
sounds: sounds,
|
|
49
|
+
processor: audioProcessor,
|
|
41
50
|
});
|
|
42
51
|
var playAudio = foundation_1.useEventCallback(function (value) {
|
|
43
52
|
var _a;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { DialPadSoundMap } from './DialPadUtils';
|
|
2
|
-
export declare type
|
|
3
|
-
volume: number;
|
|
4
|
-
muted: boolean;
|
|
2
|
+
export declare type UseKeyAudioOptions = {
|
|
5
3
|
sounds?: DialPadSoundMap;
|
|
4
|
+
/**
|
|
5
|
+
* custom audio process, you can custom audio process when you want to custom audio process
|
|
6
|
+
*/
|
|
7
|
+
processor?: (audio: HTMLAudioElement) => void;
|
|
6
8
|
};
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Custom hook that handles playing audio for key presses in a dial pad.
|
|
11
|
+
*
|
|
12
|
+
* @param audioOption - The audio options for configuring the hook.
|
|
13
|
+
* @returns A function that plays the audio for a given key.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useKeyAudio: ({ sounds, processor }: UseKeyAudioOptions) => (key: string) => false | Promise<void>;
|
|
@@ -4,15 +4,19 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var foundation_1 = require("../../../../foundation");
|
|
6
6
|
var DialPadUtils_1 = require("./DialPadUtils");
|
|
7
|
+
/**
|
|
8
|
+
* Custom hook that handles playing audio for key presses in a dial pad.
|
|
9
|
+
*
|
|
10
|
+
* @param audioOption - The audio options for configuring the hook.
|
|
11
|
+
* @returns A function that plays the audio for a given key.
|
|
12
|
+
*/
|
|
7
13
|
exports.useKeyAudio = function (_a) {
|
|
8
|
-
var
|
|
14
|
+
var sounds = _a.sounds, processor = _a.processor;
|
|
9
15
|
var audio = foundation_1.useAudio();
|
|
10
16
|
var lastPlayRef = react_1.useRef();
|
|
11
17
|
react_1.useEffect(function () {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15
|
-
}, [muted, volume]);
|
|
18
|
+
processor === null || processor === void 0 ? void 0 : processor(audio);
|
|
19
|
+
}, [audio, processor]);
|
|
16
20
|
var play = function (src) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
17
21
|
var lastPlay;
|
|
18
22
|
return tslib_1.__generator(this, function (_a) {
|
|
@@ -288,11 +288,7 @@ export declare const useDownshift: <T extends RcDownshiftSelectedItem = RcDownsh
|
|
|
288
288
|
getMenuProps: (restMenuProps?: HTMLAttributes<HTMLElement> | undefined) => HTMLAttributes<HTMLElement>;
|
|
289
289
|
getInputProps: (props?: Partial<import("@material-ui/core").InputProps> | undefined) => Partial<import("@material-ui/core").InputProps>;
|
|
290
290
|
getInputAriaProps: (props?: import("@material-ui/core").InputBaseComponentProps | undefined) => import("@material-ui/core").InputBaseComponentProps;
|
|
291
|
-
getTagListBoxProps: (props?: Pick<HTMLAttributes<HTMLElement>, "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> | undefined) => {
|
|
292
|
-
'aria-label': string | undefined;
|
|
293
|
-
'aria-required': boolean;
|
|
294
|
-
'aria-disabled': boolean;
|
|
295
|
-
};
|
|
291
|
+
getTagListBoxProps: (props?: Pick<HTMLAttributes<HTMLElement>, "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> | undefined) => {};
|
|
296
292
|
getItemProps: (props: RcDownshiftGetItemPropsOptions<T>) => {
|
|
297
293
|
isSelected?: boolean | undefined;
|
|
298
294
|
disabled?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ declare type UseDownshiftTagParams<T extends RcDownshiftSelectedItem = RcDownshi
|
|
|
16
16
|
onReset?: (e?: ChangeEvent<{}>) => void;
|
|
17
17
|
} & Pick<RcDownshiftProps<T>, 'value' | 'onChange' | 'variant' | 'getOptionLabel' | 'onInputChange' | 'freeSolo' | 'maxFreeSolo' | 'keyToTags' | 'onMaxFreeSolo' | 'multiple' | 'label' | 'required' | 'disabled'>;
|
|
18
18
|
/** @inner inner hook work with useDownshift */
|
|
19
|
-
export declare const useDownshiftTag: <T extends RcDownshiftSelectedItem = RcDownshiftSelectedItem>({ id: downshiftId, value: selectedItemsProp, onChange: onSelectChange, variant, getOptionLabel, onInputChange: onInputChangeProp, wrapperRef, inputRef, freeSolo, maxFreeSolo, keyToTags, onMaxFreeSolo, multiple,
|
|
19
|
+
export declare const useDownshiftTag: <T extends RcDownshiftSelectedItem = RcDownshiftSelectedItem>({ id: downshiftId, value: selectedItemsProp, onChange: onSelectChange, variant, getOptionLabel, onInputChange: onInputChangeProp, wrapperRef, inputRef, freeSolo, maxFreeSolo, keyToTags, onMaxFreeSolo, multiple, getStopCreateFreeSolo, onReset, }: UseDownshiftTagParams<T>) => {
|
|
20
20
|
focused: boolean;
|
|
21
21
|
setFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
22
22
|
tags: T[];
|
|
@@ -26,267 +26,7 @@ export declare const useDownshiftTag: <T extends RcDownshiftSelectedItem = RcDow
|
|
|
26
26
|
selectedItem?: T | null | undefined;
|
|
27
27
|
value?: string | undefined;
|
|
28
28
|
}, e?: ChangeEvent<{}> | undefined) => boolean;
|
|
29
|
-
getTagListBoxProps: (props?: Pick<HTMLAttributes<HTMLElement>, "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> | undefined) => {
|
|
30
|
-
'aria-label': string | undefined;
|
|
31
|
-
'aria-required': boolean;
|
|
32
|
-
'aria-disabled': boolean;
|
|
33
|
-
} | {
|
|
34
|
-
className?: string | undefined;
|
|
35
|
-
id?: string | undefined;
|
|
36
|
-
lang?: string | undefined;
|
|
37
|
-
style?: import("react").CSSProperties | undefined;
|
|
38
|
-
role?: "alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "feed" | "figure" | "form" | "grid" | "gridcell" | "group" | "heading" | "img" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | (string & {}) | undefined;
|
|
39
|
-
tabIndex?: number | undefined;
|
|
40
|
-
'aria-activedescendant'?: string | undefined;
|
|
41
|
-
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
|
42
|
-
'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
|
|
43
|
-
'aria-busy'?: boolean | "true" | "false" | undefined;
|
|
44
|
-
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
45
|
-
'aria-colcount'?: number | undefined;
|
|
46
|
-
'aria-colindex'?: number | undefined;
|
|
47
|
-
'aria-colspan'?: number | undefined;
|
|
48
|
-
'aria-controls'?: string | undefined;
|
|
49
|
-
'aria-current'?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
50
|
-
'aria-describedby'?: string | undefined;
|
|
51
|
-
'aria-details'?: string | undefined;
|
|
52
|
-
'aria-disabled': boolean | "true" | "false";
|
|
53
|
-
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
54
|
-
'aria-errormessage'?: string | undefined;
|
|
55
|
-
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
56
|
-
'aria-flowto'?: string | undefined;
|
|
57
|
-
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
|
58
|
-
'aria-haspopup'?: boolean | "dialog" | "grid" | "listbox" | "menu" | "tree" | "true" | "false" | undefined;
|
|
59
|
-
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
60
|
-
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
61
|
-
'aria-keyshortcuts'?: string | undefined;
|
|
62
|
-
'aria-label': string | undefined;
|
|
63
|
-
'aria-labelledby'?: string | undefined;
|
|
64
|
-
'aria-level'?: number | undefined;
|
|
65
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
66
|
-
'aria-modal'?: boolean | "true" | "false" | undefined;
|
|
67
|
-
'aria-multiline'?: boolean | "true" | "false" | undefined;
|
|
68
|
-
'aria-multiselectable'?: boolean | "true" | "false" | undefined;
|
|
69
|
-
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
70
|
-
'aria-owns'?: string | undefined;
|
|
71
|
-
'aria-placeholder'?: string | undefined;
|
|
72
|
-
'aria-posinset'?: number | undefined;
|
|
73
|
-
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
74
|
-
'aria-readonly'?: boolean | "true" | "false" | undefined;
|
|
75
|
-
'aria-relevant'?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
76
|
-
'aria-required': boolean | "true" | "false";
|
|
77
|
-
'aria-roledescription'?: string | undefined;
|
|
78
|
-
'aria-rowcount'?: number | undefined;
|
|
79
|
-
'aria-rowindex'?: number | undefined;
|
|
80
|
-
'aria-rowspan'?: number | undefined;
|
|
81
|
-
'aria-selected'?: boolean | "true" | "false" | undefined;
|
|
82
|
-
'aria-setsize'?: number | undefined;
|
|
83
|
-
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
84
|
-
'aria-valuemax'?: number | undefined;
|
|
85
|
-
'aria-valuemin'?: number | undefined;
|
|
86
|
-
'aria-valuenow'?: number | undefined;
|
|
87
|
-
'aria-valuetext'?: string | undefined;
|
|
88
|
-
children?: import("react").ReactNode;
|
|
89
|
-
dangerouslySetInnerHTML?: {
|
|
90
|
-
__html: string;
|
|
91
|
-
} | undefined;
|
|
92
|
-
onCopy?: ((event: import("react").ClipboardEvent<HTMLElement>) => void) | undefined;
|
|
93
|
-
onCopyCapture?: ((event: import("react").ClipboardEvent<HTMLElement>) => void) | undefined;
|
|
94
|
-
onCut?: ((event: import("react").ClipboardEvent<HTMLElement>) => void) | undefined;
|
|
95
|
-
onCutCapture?: ((event: import("react").ClipboardEvent<HTMLElement>) => void) | undefined;
|
|
96
|
-
onPaste?: ((event: import("react").ClipboardEvent<HTMLElement>) => void) | undefined;
|
|
97
|
-
onPasteCapture?: ((event: import("react").ClipboardEvent<HTMLElement>) => void) | undefined;
|
|
98
|
-
onCompositionEnd?: ((event: import("react").CompositionEvent<HTMLElement>) => void) | undefined;
|
|
99
|
-
onCompositionEndCapture?: ((event: import("react").CompositionEvent<HTMLElement>) => void) | undefined;
|
|
100
|
-
onCompositionStart?: ((event: import("react").CompositionEvent<HTMLElement>) => void) | undefined;
|
|
101
|
-
onCompositionStartCapture?: ((event: import("react").CompositionEvent<HTMLElement>) => void) | undefined;
|
|
102
|
-
onCompositionUpdate?: ((event: import("react").CompositionEvent<HTMLElement>) => void) | undefined;
|
|
103
|
-
onCompositionUpdateCapture?: ((event: import("react").CompositionEvent<HTMLElement>) => void) | undefined;
|
|
104
|
-
onFocus?: ((event: import("react").FocusEvent<HTMLElement, Element>) => void) | undefined;
|
|
105
|
-
onFocusCapture?: ((event: import("react").FocusEvent<HTMLElement, Element>) => void) | undefined;
|
|
106
|
-
onBlur?: ((event: import("react").FocusEvent<HTMLElement, Element>) => void) | undefined;
|
|
107
|
-
onBlurCapture?: ((event: import("react").FocusEvent<HTMLElement, Element>) => void) | undefined;
|
|
108
|
-
onChange?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
109
|
-
onChangeCapture?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
110
|
-
onBeforeInput?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
111
|
-
onBeforeInputCapture?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
112
|
-
onInput?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
113
|
-
onInputCapture?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
114
|
-
onReset?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
115
|
-
onResetCapture?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
116
|
-
onSubmit?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
117
|
-
onSubmitCapture?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
118
|
-
onInvalid?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
119
|
-
onInvalidCapture?: ((event: import("react").FormEvent<HTMLElement>) => void) | undefined;
|
|
120
|
-
onLoad?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
121
|
-
onLoadCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
122
|
-
onError?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
123
|
-
onErrorCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
124
|
-
onKeyDown?: ((event: import("react").KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
125
|
-
onKeyDownCapture?: ((event: import("react").KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
126
|
-
onKeyPress?: ((event: import("react").KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
127
|
-
onKeyPressCapture?: ((event: import("react").KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
128
|
-
onKeyUp?: ((event: import("react").KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
129
|
-
onKeyUpCapture?: ((event: import("react").KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
130
|
-
onAbort?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
131
|
-
onAbortCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
132
|
-
onCanPlay?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
133
|
-
onCanPlayCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
134
|
-
onCanPlayThrough?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
135
|
-
onCanPlayThroughCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
136
|
-
onDurationChange?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
137
|
-
onDurationChangeCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
138
|
-
onEmptied?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
139
|
-
onEmptiedCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
140
|
-
onEncrypted?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
141
|
-
onEncryptedCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
142
|
-
onEnded?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
143
|
-
onEndedCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
144
|
-
onLoadedData?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
145
|
-
onLoadedDataCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
146
|
-
onLoadedMetadata?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
147
|
-
onLoadedMetadataCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
148
|
-
onLoadStart?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
149
|
-
onLoadStartCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
150
|
-
onPause?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
151
|
-
onPauseCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
152
|
-
onPlay?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
153
|
-
onPlayCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
154
|
-
onPlaying?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
155
|
-
onPlayingCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
156
|
-
onProgress?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
157
|
-
onProgressCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
158
|
-
onRateChange?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
159
|
-
onRateChangeCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
160
|
-
onSeeked?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
161
|
-
onSeekedCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
162
|
-
onSeeking?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
163
|
-
onSeekingCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
164
|
-
onStalled?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
165
|
-
onStalledCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
166
|
-
onSuspend?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
167
|
-
onSuspendCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
168
|
-
onTimeUpdate?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
169
|
-
onTimeUpdateCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
170
|
-
onVolumeChange?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
171
|
-
onVolumeChangeCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
172
|
-
onWaiting?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
173
|
-
onWaitingCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
174
|
-
onAuxClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
175
|
-
onAuxClickCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
176
|
-
onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
177
|
-
onClickCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
178
|
-
onContextMenu?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
179
|
-
onContextMenuCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
180
|
-
onDoubleClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
181
|
-
onDoubleClickCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
182
|
-
onDrag?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
183
|
-
onDragCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
184
|
-
onDragEnd?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
185
|
-
onDragEndCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
186
|
-
onDragEnter?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
187
|
-
onDragEnterCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
188
|
-
onDragExit?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
189
|
-
onDragExitCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
190
|
-
onDragLeave?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
191
|
-
onDragLeaveCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
192
|
-
onDragOver?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
193
|
-
onDragOverCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
194
|
-
onDragStart?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
195
|
-
onDragStartCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
196
|
-
onDrop?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
197
|
-
onDropCapture?: ((event: import("react").DragEvent<HTMLElement>) => void) | undefined;
|
|
198
|
-
onMouseDown?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
199
|
-
onMouseDownCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
200
|
-
onMouseEnter?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
201
|
-
onMouseLeave?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
202
|
-
onMouseMove?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
203
|
-
onMouseMoveCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
204
|
-
onMouseOut?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
205
|
-
onMouseOutCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
206
|
-
onMouseOver?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
207
|
-
onMouseOverCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
208
|
-
onMouseUp?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
209
|
-
onMouseUpCapture?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
|
|
210
|
-
onSelect?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
211
|
-
onSelectCapture?: ((event: import("react").SyntheticEvent<HTMLElement, Event>) => void) | undefined;
|
|
212
|
-
onTouchCancel?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
213
|
-
onTouchCancelCapture?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
214
|
-
onTouchEnd?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
215
|
-
onTouchEndCapture?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
216
|
-
onTouchMove?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
217
|
-
onTouchMoveCapture?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
218
|
-
onTouchStart?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
219
|
-
onTouchStartCapture?: ((event: import("react").TouchEvent<HTMLElement>) => void) | undefined;
|
|
220
|
-
onPointerDown?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
221
|
-
onPointerDownCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
222
|
-
onPointerMove?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
223
|
-
onPointerMoveCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
224
|
-
onPointerUp?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
225
|
-
onPointerUpCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
226
|
-
onPointerCancel?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
227
|
-
onPointerCancelCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
228
|
-
onPointerEnter?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
229
|
-
onPointerEnterCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
230
|
-
onPointerLeave?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
231
|
-
onPointerLeaveCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
232
|
-
onPointerOver?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
233
|
-
onPointerOverCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
234
|
-
onPointerOut?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
235
|
-
onPointerOutCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
236
|
-
onGotPointerCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
237
|
-
onGotPointerCaptureCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
238
|
-
onLostPointerCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
239
|
-
onLostPointerCaptureCapture?: ((event: import("react").PointerEvent<HTMLElement>) => void) | undefined;
|
|
240
|
-
onScroll?: ((event: import("react").UIEvent<HTMLElement, UIEvent>) => void) | undefined;
|
|
241
|
-
onScrollCapture?: ((event: import("react").UIEvent<HTMLElement, UIEvent>) => void) | undefined;
|
|
242
|
-
onWheel?: ((event: import("react").WheelEvent<HTMLElement>) => void) | undefined;
|
|
243
|
-
onWheelCapture?: ((event: import("react").WheelEvent<HTMLElement>) => void) | undefined;
|
|
244
|
-
onAnimationStart?: ((event: import("react").AnimationEvent<HTMLElement>) => void) | undefined;
|
|
245
|
-
onAnimationStartCapture?: ((event: import("react").AnimationEvent<HTMLElement>) => void) | undefined;
|
|
246
|
-
onAnimationEnd?: ((event: import("react").AnimationEvent<HTMLElement>) => void) | undefined;
|
|
247
|
-
onAnimationEndCapture?: ((event: import("react").AnimationEvent<HTMLElement>) => void) | undefined;
|
|
248
|
-
onAnimationIteration?: ((event: import("react").AnimationEvent<HTMLElement>) => void) | undefined;
|
|
249
|
-
onAnimationIterationCapture?: ((event: import("react").AnimationEvent<HTMLElement>) => void) | undefined;
|
|
250
|
-
onTransitionEnd?: ((event: import("react").TransitionEvent<HTMLElement>) => void) | undefined;
|
|
251
|
-
onTransitionEndCapture?: ((event: import("react").TransitionEvent<HTMLElement>) => void) | undefined;
|
|
252
|
-
slot?: string | undefined;
|
|
253
|
-
title?: string | undefined;
|
|
254
|
-
translate?: "no" | "yes" | undefined;
|
|
255
|
-
defaultChecked?: boolean | undefined;
|
|
256
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
257
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
258
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
259
|
-
accessKey?: string | undefined;
|
|
260
|
-
contentEditable?: boolean | "inherit" | "true" | "false" | undefined;
|
|
261
|
-
contextMenu?: string | undefined;
|
|
262
|
-
dir?: string | undefined;
|
|
263
|
-
draggable?: boolean | "true" | "false" | undefined;
|
|
264
|
-
hidden?: boolean | undefined;
|
|
265
|
-
placeholder?: string | undefined;
|
|
266
|
-
spellCheck?: boolean | "true" | "false" | undefined;
|
|
267
|
-
radioGroup?: string | undefined;
|
|
268
|
-
about?: string | undefined;
|
|
269
|
-
datatype?: string | undefined;
|
|
270
|
-
inlist?: any;
|
|
271
|
-
prefix?: string | undefined;
|
|
272
|
-
property?: string | undefined;
|
|
273
|
-
resource?: string | undefined;
|
|
274
|
-
typeof?: string | undefined;
|
|
275
|
-
vocab?: string | undefined;
|
|
276
|
-
autoCapitalize?: string | undefined;
|
|
277
|
-
autoCorrect?: string | undefined;
|
|
278
|
-
autoSave?: string | undefined;
|
|
279
|
-
itemProp?: string | undefined;
|
|
280
|
-
itemScope?: boolean | undefined;
|
|
281
|
-
itemType?: string | undefined;
|
|
282
|
-
itemID?: string | undefined;
|
|
283
|
-
itemRef?: string | undefined;
|
|
284
|
-
results?: number | undefined;
|
|
285
|
-
security?: string | undefined;
|
|
286
|
-
unselectable?: "off" | "on" | undefined;
|
|
287
|
-
inputMode?: "none" | "search" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
|
288
|
-
is?: string | undefined;
|
|
289
|
-
};
|
|
29
|
+
getTagListBoxProps: (props?: Pick<HTMLAttributes<HTMLElement>, "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> | undefined) => {};
|
|
290
30
|
getTagProps: ({ index, selectedItem, ...restTagProps }: RcDownshiftGetSelectedItemProps<T>) => {
|
|
291
31
|
[arbitrary: string]: any;
|
|
292
32
|
className?: string | undefined;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = require("react");
|
|
5
|
-
var isString_1 = tslib_1.__importDefault(require("lodash/isString"));
|
|
6
5
|
var uniqueId_1 = tslib_1.__importDefault(require("lodash/uniqueId"));
|
|
7
6
|
var foundation_1 = require("../../../foundation");
|
|
8
7
|
var DownshiftUtils_1 = require("./DownshiftUtils");
|
|
9
8
|
var DOWNSHIFT_ID_TOKEN = 'rc-chip-';
|
|
10
9
|
/** @inner inner hook work with useDownshift */
|
|
11
10
|
exports.useDownshiftTag = function (_a) {
|
|
12
|
-
var downshiftId = _a.id, _b = _a.value, selectedItemsProp = _b === void 0 ? [] : _b, onSelectChange = _a.onChange, variant = _a.variant, _c = _a.getOptionLabel, getOptionLabel = _c === void 0 ? DownshiftUtils_1.DEFAULT_GET_OPTION_LABEL : _c, onInputChangeProp = _a.onInputChange, wrapperRef = _a.wrapperRef, inputRef = _a.inputRef, freeSolo = _a.freeSolo, maxFreeSolo = _a.maxFreeSolo, keyToTags = _a.keyToTags, onMaxFreeSolo = _a.onMaxFreeSolo, multiple = _a.multiple,
|
|
11
|
+
var downshiftId = _a.id, _b = _a.value, selectedItemsProp = _b === void 0 ? [] : _b, onSelectChange = _a.onChange, variant = _a.variant, _c = _a.getOptionLabel, getOptionLabel = _c === void 0 ? DownshiftUtils_1.DEFAULT_GET_OPTION_LABEL : _c, onInputChangeProp = _a.onInputChange, wrapperRef = _a.wrapperRef, inputRef = _a.inputRef, freeSolo = _a.freeSolo, maxFreeSolo = _a.maxFreeSolo, keyToTags = _a.keyToTags, onMaxFreeSolo = _a.onMaxFreeSolo, multiple = _a.multiple, getStopCreateFreeSolo = _a.getStopCreateFreeSolo, onReset = _a.onReset;
|
|
13
12
|
var isAutocomplete = variant === 'autocomplete';
|
|
14
13
|
var isSelectedFromAutocompleteRef = react_1.useRef(false);
|
|
15
14
|
var _d = tslib_1.__read(foundation_1.useControlled({
|
|
@@ -125,7 +124,7 @@ exports.useDownshiftTag = function (_a) {
|
|
|
125
124
|
* All Get props methods
|
|
126
125
|
*/
|
|
127
126
|
var getTagListBoxProps = function (props) {
|
|
128
|
-
return tslib_1.__assign({
|
|
127
|
+
return tslib_1.__assign({}, props);
|
|
129
128
|
};
|
|
130
129
|
var getTagProps = function (_a) {
|
|
131
130
|
var index = _a.index, selectedItem = _a.selectedItem, restTagProps = tslib_1.__rest(_a, ["index", "selectedItem"]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __assign, __makeTemplateObject, __read, __rest, __values } from "tslib";
|
|
2
|
-
import React, { forwardRef, useEffect, useImperativeHandle, useRef, } from 'react';
|
|
2
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useCallback, } from 'react';
|
|
3
3
|
import { styled, useEventCallback, useForkRef, useKeyboardMoveFocus, useOnlyOneFocusable, useThemeProps, } from '../../../foundation';
|
|
4
4
|
import { RcIconButtonClasses } from '../../Buttons/IconButton/utils';
|
|
5
5
|
import { RcVisuallyHidden } from '../../VisuallyHidden';
|
|
@@ -9,7 +9,7 @@ import { DialPadStyle } from './styles';
|
|
|
9
9
|
import { ACCEPTABLE_KEYS, DIALER_PAD_ICONS, DIALER_PAD_PLUS, useKeyAudio, } from './utils';
|
|
10
10
|
var _RcDialPad = forwardRef(function (inProps, ref) {
|
|
11
11
|
var props = useThemeProps({ props: inProps, name: 'RcDialPad' });
|
|
12
|
-
var sounds = props.sounds, volume = props.volume, autoSize = props.autoSize, muted = props.muted, classes = props.classes, onChangeProp = props.onChange, longPressDelay = props.longPressDelay, action = props.action, persistBgTime = props.persistBgTime, control = props.control, getDialPadButtonProps = props.getDialPadButtonProps, _a = props.externalWindow, externalWindow = _a === void 0 ? window : _a, divProps = __rest(props, ["sounds", "volume", "autoSize", "muted", "classes", "onChange", "longPressDelay", "action", "persistBgTime", "control", "getDialPadButtonProps", "externalWindow"]);
|
|
12
|
+
var sounds = props.sounds, volume = props.volume, autoSize = props.autoSize, muted = props.muted, classes = props.classes, onChangeProp = props.onChange, longPressDelay = props.longPressDelay, action = props.action, persistBgTime = props.persistBgTime, control = props.control, getDialPadButtonProps = props.getDialPadButtonProps, _a = props.externalWindow, externalWindow = _a === void 0 ? window : _a, sinkId = props.sinkId, divProps = __rest(props, ["sounds", "volume", "autoSize", "muted", "classes", "onChange", "longPressDelay", "action", "persistBgTime", "control", "getDialPadButtonProps", "externalWindow", "sinkId"]);
|
|
13
13
|
var containerRef = useRef(null);
|
|
14
14
|
var hiddenRef = useRef(null);
|
|
15
15
|
var keyTimerMapRef = useRef({});
|
|
@@ -32,10 +32,19 @@ var _RcDialPad = forwardRef(function (inProps, ref) {
|
|
|
32
32
|
event.preventDefault();
|
|
33
33
|
},
|
|
34
34
|
}).onKeyFocusedIndexHandle;
|
|
35
|
+
var audioProcessor = useCallback(function (audio) {
|
|
36
|
+
if (typeof volume !== 'undefined')
|
|
37
|
+
audio.volume = volume;
|
|
38
|
+
if (typeof muted !== 'undefined')
|
|
39
|
+
audio.muted = muted;
|
|
40
|
+
if (typeof audio['setSinkId'] === 'function')
|
|
41
|
+
audio['setSinkId'](
|
|
42
|
+
// when pass undefined, use '' to remove sinkId to default
|
|
43
|
+
sinkId || '');
|
|
44
|
+
}, [muted, sinkId, volume]);
|
|
35
45
|
var play = useKeyAudio({
|
|
36
|
-
volume: volume,
|
|
37
|
-
muted: muted,
|
|
38
46
|
sounds: sounds,
|
|
47
|
+
processor: audioProcessor,
|
|
39
48
|
});
|
|
40
49
|
var playAudio = useEventCallback(function (value) {
|
|
41
50
|
var _a;
|
|
@@ -2,15 +2,19 @@ import { __awaiter, __generator } from "tslib";
|
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { logInDev, useAudio } from '../../../../foundation';
|
|
4
4
|
import { DIALER_PAD_PLUS } from './DialPadUtils';
|
|
5
|
+
/**
|
|
6
|
+
* Custom hook that handles playing audio for key presses in a dial pad.
|
|
7
|
+
*
|
|
8
|
+
* @param audioOption - The audio options for configuring the hook.
|
|
9
|
+
* @returns A function that plays the audio for a given key.
|
|
10
|
+
*/
|
|
5
11
|
export var useKeyAudio = function (_a) {
|
|
6
|
-
var
|
|
12
|
+
var sounds = _a.sounds, processor = _a.processor;
|
|
7
13
|
var audio = useAudio();
|
|
8
14
|
var lastPlayRef = useRef();
|
|
9
15
|
useEffect(function () {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13
|
-
}, [muted, volume]);
|
|
16
|
+
processor === null || processor === void 0 ? void 0 : processor(audio);
|
|
17
|
+
}, [audio, processor]);
|
|
14
18
|
var play = function (src) { return __awaiter(void 0, void 0, void 0, function () {
|
|
15
19
|
var lastPlay;
|
|
16
20
|
return __generator(this, function (_a) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { __assign, __read, __rest, __spread } from "tslib";
|
|
2
2
|
import { useMemo, useRef, useState } from 'react';
|
|
3
|
-
import isString from 'lodash/isString';
|
|
4
3
|
import uniqueId from 'lodash/uniqueId';
|
|
5
4
|
import { combineProps, useControlled, useEventCallback, useKeyboardMoveFocus, useRefState, } from '../../../foundation';
|
|
6
5
|
import { DEFAULT_GET_OPTION_LABEL, downshiftComponentName, stringArrToRegExp, } from './DownshiftUtils';
|
|
7
6
|
var DOWNSHIFT_ID_TOKEN = 'rc-chip-';
|
|
8
7
|
/** @inner inner hook work with useDownshift */
|
|
9
8
|
export var useDownshiftTag = function (_a) {
|
|
10
|
-
var downshiftId = _a.id, _b = _a.value, selectedItemsProp = _b === void 0 ? [] : _b, onSelectChange = _a.onChange, variant = _a.variant, _c = _a.getOptionLabel, getOptionLabel = _c === void 0 ? DEFAULT_GET_OPTION_LABEL : _c, onInputChangeProp = _a.onInputChange, wrapperRef = _a.wrapperRef, inputRef = _a.inputRef, freeSolo = _a.freeSolo, maxFreeSolo = _a.maxFreeSolo, keyToTags = _a.keyToTags, onMaxFreeSolo = _a.onMaxFreeSolo, multiple = _a.multiple,
|
|
9
|
+
var downshiftId = _a.id, _b = _a.value, selectedItemsProp = _b === void 0 ? [] : _b, onSelectChange = _a.onChange, variant = _a.variant, _c = _a.getOptionLabel, getOptionLabel = _c === void 0 ? DEFAULT_GET_OPTION_LABEL : _c, onInputChangeProp = _a.onInputChange, wrapperRef = _a.wrapperRef, inputRef = _a.inputRef, freeSolo = _a.freeSolo, maxFreeSolo = _a.maxFreeSolo, keyToTags = _a.keyToTags, onMaxFreeSolo = _a.onMaxFreeSolo, multiple = _a.multiple, getStopCreateFreeSolo = _a.getStopCreateFreeSolo, onReset = _a.onReset;
|
|
11
10
|
var isAutocomplete = variant === 'autocomplete';
|
|
12
11
|
var isSelectedFromAutocompleteRef = useRef(false);
|
|
13
12
|
var _d = __read(useControlled({
|
|
@@ -123,7 +122,7 @@ export var useDownshiftTag = function (_a) {
|
|
|
123
122
|
* All Get props methods
|
|
124
123
|
*/
|
|
125
124
|
var getTagListBoxProps = function (props) {
|
|
126
|
-
return __assign({
|
|
125
|
+
return __assign({}, props);
|
|
127
126
|
};
|
|
128
127
|
var getTagProps = function (_a) {
|
|
129
128
|
var index = _a.index, selectedItem = _a.selectedItem, restTagProps = __rest(_a, ["index", "selectedItem"]);
|