@ringcentral/juno 2.2.0 → 2.3.0
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/README.md +1 -2
- package/components/Animations/Highlight/Highlight.d.ts +2 -2
- package/components/Downshift/SuggestionList/utils/useSuggestionList.js +1 -2
- package/components/Downshift/utils/useDownshift.js +2 -3
- package/components/Downshift/utils/useDownshiftTag.js +1 -2
- package/components/Forms/Picker/DatePicker/DatePicker.js +10 -11
- package/components/Forms/Select/PlainSelect/PlainSelect.js +1 -2
- package/components/Table/Table.d.ts +14 -0
- package/components/Table/Table.js +17 -0
- package/components/Table/TableBody/TableBody.d.ts +8 -0
- package/components/Table/TableBody/TableBody.js +14 -0
- package/components/Table/TableBody/index.d.ts +1 -0
- package/components/Table/TableBody/index.js +4 -0
- package/components/Table/TableCell/TableCell.d.ts +27 -0
- package/components/Table/TableCell/TableCell.js +39 -0
- package/components/Table/TableCell/index.d.ts +1 -0
- package/components/Table/TableCell/index.js +4 -0
- package/components/Table/TableCell/styles/TableCellStyle.d.ts +3 -0
- package/components/Table/TableCell/styles/TableCellStyle.js +16 -0
- package/components/Table/TableCell/styles/index.d.ts +1 -0
- package/components/Table/TableCell/styles/index.js +4 -0
- package/components/Table/TableCell/utils/TableCellUtils.d.ts +1 -0
- package/components/Table/TableCell/utils/TableCellUtils.js +4 -0
- package/components/Table/TableCell/utils/index.d.ts +1 -0
- package/components/Table/TableCell/utils/index.js +4 -0
- package/components/Table/TableContainer/TableContainer.d.ts +19 -0
- package/components/Table/TableContainer/TableContainer.js +22 -0
- package/components/Table/TableContainer/index.d.ts +1 -0
- package/components/Table/TableContainer/index.js +4 -0
- package/components/Table/TableContainer/styles/TableContainerStyle.d.ts +3 -0
- package/components/Table/TableContainer/styles/TableContainerStyle.js +13 -0
- package/components/Table/TableContainer/styles/index.d.ts +1 -0
- package/components/Table/TableContainer/styles/index.js +4 -0
- package/components/Table/TableHead/TableHead.d.ts +8 -0
- package/components/Table/TableHead/TableHead.js +14 -0
- package/components/Table/TableHead/index.d.ts +1 -0
- package/components/Table/TableHead/index.js +4 -0
- package/components/Table/TableRow/TableRow.d.ts +15 -0
- package/components/Table/TableRow/TableRow.js +20 -0
- package/components/Table/TableRow/index.d.ts +1 -0
- package/components/Table/TableRow/index.js +4 -0
- package/components/Table/TableRow/styles/TableRowStyle.d.ts +3 -0
- package/components/Table/TableRow/styles/TableRowStyle.js +9 -0
- package/components/Table/TableRow/styles/index.d.ts +1 -0
- package/components/Table/TableRow/styles/index.js +4 -0
- package/components/Table/TableRow/utils/TableRowUtils.d.ts +1 -0
- package/components/Table/TableRow/utils/TableRowUtils.js +4 -0
- package/components/Table/TableRow/utils/index.d.ts +1 -0
- package/components/Table/TableRow/utils/index.js +4 -0
- package/components/Table/context.d.ts +10 -0
- package/components/Table/context.js +4 -0
- package/components/Table/index.d.ts +8 -0
- package/components/Table/index.js +10 -0
- package/components/Table/types.d.ts +1 -0
- package/components/Table/types.js +2 -0
- package/components/Tables/TableHead.d.ts +1 -1
- package/components/Tables/TableHead.js +1 -3
- package/components/Tables/TableHeadCell.d.ts +1 -1
- package/components/Tables/TableHeadCell.js +1 -2
- package/components/Tooltip/utils/useTooltipForceHide.js +24 -10
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/es6/README.md +1 -2
- package/es6/components/Downshift/SuggestionList/utils/useSuggestionList.js +1 -2
- package/es6/components/Downshift/utils/useDownshift.js +1 -2
- package/es6/components/Downshift/utils/useDownshiftTag.js +1 -2
- package/es6/components/Forms/Picker/DatePicker/DatePicker.js +1 -2
- package/es6/components/Forms/Select/PlainSelect/PlainSelect.js +1 -2
- package/es6/components/Table/Table.js +15 -0
- package/es6/components/Table/TableBody/TableBody.js +12 -0
- package/es6/components/Table/TableBody/index.js +1 -0
- package/es6/components/Table/TableCell/TableCell.js +37 -0
- package/es6/components/Table/TableCell/index.js +1 -0
- package/es6/components/Table/TableCell/styles/TableCellStyle.js +14 -0
- package/es6/components/Table/TableCell/styles/index.js +1 -0
- package/es6/components/Table/TableCell/utils/TableCellUtils.js +2 -0
- package/es6/components/Table/TableCell/utils/index.js +1 -0
- package/es6/components/Table/TableContainer/TableContainer.js +20 -0
- package/es6/components/Table/TableContainer/index.js +1 -0
- package/es6/components/Table/TableContainer/styles/TableContainerStyle.js +11 -0
- package/es6/components/Table/TableContainer/styles/index.js +1 -0
- package/es6/components/Table/TableHead/TableHead.js +12 -0
- package/es6/components/Table/TableHead/index.js +1 -0
- package/es6/components/Table/TableRow/TableRow.js +18 -0
- package/es6/components/Table/TableRow/index.js +1 -0
- package/es6/components/Table/TableRow/styles/TableRowStyle.js +7 -0
- package/es6/components/Table/TableRow/styles/index.js +1 -0
- package/es6/components/Table/TableRow/utils/TableRowUtils.js +2 -0
- package/es6/components/Table/TableRow/utils/index.js +1 -0
- package/es6/components/Table/context.js +2 -0
- package/es6/components/Table/index.js +7 -0
- package/es6/components/Table/types.js +0 -0
- package/es6/components/Tables/TableHead.js +1 -3
- package/es6/components/Tables/TableHeadCell.js +2 -3
- package/es6/components/Tooltip/utils/useTooltipForceHide.js +25 -11
- package/es6/components/index.js +1 -1
- package/es6/foundation/hooks/index.js +2 -0
- package/es6/foundation/hooks/useControlled/index.js +1 -0
- package/es6/foundation/hooks/useControlled/useControlled.js +1 -0
- package/es6/foundation/hooks/useEventListener/useEventListener.js +8 -6
- package/es6/foundation/hooks/useGlobalListener/index.js +1 -0
- package/es6/foundation/hooks/useGlobalListener/useGlobalListener.js +130 -0
- package/es6/foundation/hooks/useHiddenTabindex/useHiddenTabindex.js +4 -3
- package/es6/foundation/hooks/useLongPress/useLongPress.js +2 -3
- package/es6/foundation/hooks/useOverflow/useOverflow.js +18 -15
- package/es6/foundation/hooks/useResizeObserver/useResizeObserver.js +4 -4
- package/es6/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.js +8 -5
- package/es6/foundation/utils/getRefElement.js +13 -0
- package/es6/foundation/utils/index.js +1 -0
- package/es6/foundation/utils/removeClassName.js +4 -3
- package/es6/foundation/utils/selectionHandler.js +7 -6
- package/foundation/hooks/index.d.ts +2 -0
- package/foundation/hooks/index.js +2 -0
- package/foundation/hooks/useControlled/index.d.ts +1 -0
- package/foundation/hooks/useControlled/index.js +4 -0
- package/foundation/hooks/useControlled/useControlled.d.ts +1 -0
- package/foundation/hooks/useControlled/useControlled.js +4 -0
- package/foundation/hooks/useEventListener/useEventListener.d.ts +2 -2
- package/foundation/hooks/useEventListener/useEventListener.js +8 -6
- package/foundation/hooks/useGlobalListener/index.d.ts +1 -0
- package/foundation/hooks/useGlobalListener/index.js +4 -0
- package/foundation/hooks/useGlobalListener/useGlobalListener.d.ts +108 -0
- package/foundation/hooks/useGlobalListener/useGlobalListener.js +133 -0
- package/foundation/hooks/useHiddenTabindex/useHiddenTabindex.d.ts +2 -2
- package/foundation/hooks/useHiddenTabindex/useHiddenTabindex.js +4 -3
- package/foundation/hooks/useLongPress/useLongPress.js +1 -2
- package/foundation/hooks/useOverflow/useOverflow.d.ts +2 -3
- package/foundation/hooks/useOverflow/useOverflow.js +18 -15
- package/foundation/hooks/useResizeObserver/useResizeObserver.d.ts +2 -3
- package/foundation/hooks/useResizeObserver/useResizeObserver.js +3 -3
- package/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.d.ts +5 -1
- package/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.js +8 -5
- package/foundation/theme/theme.type.d.ts +6 -3
- package/foundation/utils/getRefElement.d.ts +6 -0
- package/foundation/utils/getRefElement.js +15 -0
- package/foundation/utils/index.d.ts +1 -0
- package/foundation/utils/index.js +1 -0
- package/foundation/utils/removeClassName.d.ts +3 -3
- package/foundation/utils/removeClassName.js +4 -3
- package/foundation/utils/selectionHandler.d.ts +3 -3
- package/foundation/utils/selectionHandler.js +7 -6
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="styled-jsx" />
|
|
1
|
+
import { RefOrElementOrCallback } from '../../utils';
|
|
3
2
|
export declare type PerformanceOptions = {
|
|
4
3
|
/**
|
|
5
4
|
* mode that improve performance, default is debounce
|
|
@@ -24,4 +23,4 @@ export declare const getResizeObserver: (callback: ResizeObserverCallback, exter
|
|
|
24
23
|
* @param callback callback when element resize
|
|
25
24
|
* @param performance options that improve performance
|
|
26
25
|
*/
|
|
27
|
-
export declare const useResizeObserver: (
|
|
26
|
+
export declare const useResizeObserver: <T extends HTMLElement = HTMLElement>(target: RefOrElementOrCallback<T>, callback: ResizeObserverCallback, performance?: PerformanceOptions) => ResizeObserver;
|
|
@@ -40,7 +40,7 @@ exports.getResizeObserver = function (callback, externalWindow) {
|
|
|
40
40
|
*/
|
|
41
41
|
exports.useResizeObserver = function (
|
|
42
42
|
/** target element ref */
|
|
43
|
-
|
|
43
|
+
target,
|
|
44
44
|
/** trigger when `ResizeObserver` emit */
|
|
45
45
|
callback,
|
|
46
46
|
/** performance options, `mode`, `time`, `ignoreFireWhenObserve` */
|
|
@@ -76,8 +76,8 @@ performance) {
|
|
|
76
76
|
return exports.getResizeObserver(resizeCallback, externalWindow);
|
|
77
77
|
});
|
|
78
78
|
react_1.useLayoutEffect(function () {
|
|
79
|
+
var elm = utils_1.getRefElement(target);
|
|
79
80
|
var observer = observerRef.current;
|
|
80
|
-
var elm = ref.current;
|
|
81
81
|
if (!elm) {
|
|
82
82
|
throw new Error('please check element exist before bind resize observer');
|
|
83
83
|
}
|
|
@@ -87,6 +87,6 @@ performance) {
|
|
|
87
87
|
};
|
|
88
88
|
// TODO: wait https://github.com/facebook/react/pull/20477 eslint support to remove this exhaustive-deps comment with support custom hooks
|
|
89
89
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
90
|
-
}, [
|
|
90
|
+
}, [target]);
|
|
91
91
|
return observerRef.current;
|
|
92
92
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-jsx" />
|
|
2
2
|
import { MouseEventHandler, TouchEventHandler } from 'react';
|
|
3
|
+
import { RefOrElementOrCallback } from '../../utils';
|
|
3
4
|
export interface UseTouchMouseEvent<T> {
|
|
4
5
|
onMouseUp?: MouseEventHandler<T>;
|
|
5
6
|
onMouseDown?: MouseEventHandler<T>;
|
|
@@ -36,4 +37,7 @@ export declare const useTouchMouseEvent: <T = unknown>({ onMouseDown: onMouseDow
|
|
|
36
37
|
onMouseDown: (event: import("react").MouseEvent<T, MouseEvent>) => void;
|
|
37
38
|
onMouseUp: (e: any) => void;
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
+
/**
|
|
41
|
+
* check is element equal or contains target element
|
|
42
|
+
*/
|
|
43
|
+
export declare const isElmEqualOrContain: (sourceTarget: RefOrElementOrCallback<HTMLElement>, containTarget: RefOrElementOrCallback<HTMLElement>) => boolean | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var react_1 = require("react");
|
|
4
|
+
var utils_1 = require("../../utils");
|
|
4
5
|
var useEventCallback_1 = require("../useEventCallback");
|
|
5
6
|
/**
|
|
6
7
|
* Provide a utils for switch trigger touch event or mouse event between different device
|
|
@@ -74,9 +75,11 @@ exports.useTouchMouseEvent = function (_a, _b) {
|
|
|
74
75
|
onMouseUp: onMouseUp,
|
|
75
76
|
};
|
|
76
77
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
/**
|
|
79
|
+
* check is element equal or contains target element
|
|
80
|
+
*/
|
|
81
|
+
exports.isElmEqualOrContain = function (sourceTarget, containTarget) {
|
|
82
|
+
var elm = utils_1.getRefElement(sourceTarget);
|
|
83
|
+
var target = utils_1.getRefElement(containTarget);
|
|
84
|
+
return elm && target && (target === elm || target.contains(elm));
|
|
82
85
|
};
|
|
@@ -38,7 +38,7 @@ import { RcResponsiveProps } from '../../components/Responsive';
|
|
|
38
38
|
import { RcSnackbarActionProps, RcSnackbarContentProps, RcSnackbarProps } from '../../components/Snackbar';
|
|
39
39
|
import { RcStepButtonProps, RcStepConnectorProps, RcStepIconProps, RcStepLabelProps, RcStepperProps, RcStepProps } from '../../components/Stepper';
|
|
40
40
|
import { RcTablePaginationProps } from '../../components/TablePagination';
|
|
41
|
-
import {
|
|
41
|
+
import { RcTableBodyProps, RcTableCellProps, RcTableContainerProps, RcTableHeadProps, RcTableProps, RcTableRowProps } from '../../components/Table';
|
|
42
42
|
import { RcTabListProps, RcTabPanelProps, RcTabProps, RcTabsProps } from '../../components/Tabs';
|
|
43
43
|
import { RcTagProps } from '../../components/Tag';
|
|
44
44
|
import { RcTextProps } from '../../components/Text';
|
|
@@ -180,9 +180,12 @@ export declare type RcTheme = {
|
|
|
180
180
|
RcStepLabel?: RcStepLabelProps;
|
|
181
181
|
RcStepper?: RcStepperProps;
|
|
182
182
|
RcTablePagination?: RcTablePaginationProps;
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
RcTableBody?: RcTableBodyProps;
|
|
184
|
+
RcTableCell?: RcTableCellProps;
|
|
185
|
+
RcTableContainer?: RcTableContainerProps;
|
|
186
|
+
RcTableHead?: RcTableHeadProps;
|
|
185
187
|
RcTable?: RcTableProps;
|
|
188
|
+
RcTableRow?: RcTableRowProps;
|
|
186
189
|
RcTab?: RcTabProps;
|
|
187
190
|
RcTabList?: RcTabListProps;
|
|
188
191
|
RcTabPanel?: RcTabPanelProps;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare type RefOrElementOrCallback<T extends HTMLElement = HTMLElement> = RefObject<T> | (() => T) | T;
|
|
3
|
+
/**
|
|
4
|
+
* get element from React ref or callback
|
|
5
|
+
*/
|
|
6
|
+
export declare const getRefElement: <T extends HTMLElement = HTMLElement>(ref: RefOrElementOrCallback<T>) => T | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var isRef_1 = require("./isRef");
|
|
4
|
+
/**
|
|
5
|
+
* get element from React ref or callback
|
|
6
|
+
*/
|
|
7
|
+
exports.getRefElement = function (ref) {
|
|
8
|
+
if (typeof ref === 'function') {
|
|
9
|
+
return ref();
|
|
10
|
+
}
|
|
11
|
+
if (isRef_1.isRef(ref)) {
|
|
12
|
+
return ref.current;
|
|
13
|
+
}
|
|
14
|
+
return ref;
|
|
15
|
+
};
|
|
@@ -4,6 +4,7 @@ export * from './classes';
|
|
|
4
4
|
export * from './clearReactReferencesInNode';
|
|
5
5
|
export * from './combineProps';
|
|
6
6
|
export * from './deepmerge';
|
|
7
|
+
export * from './getRefElement';
|
|
7
8
|
export * from './getScrollbarSize';
|
|
8
9
|
export * from './hasValue';
|
|
9
10
|
export * from './isRcElement';
|
|
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./classes"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./clearReactReferencesInNode"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./combineProps"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./deepmerge"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./getRefElement"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./getScrollbarSize"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./hasValue"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./isRcElement"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefOrElementOrCallback } from './getRefElement';
|
|
2
2
|
declare type RemoveClassNameOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* make replace also scan child nodes
|
|
@@ -16,7 +16,7 @@ declare type RemoveClassNameOptions = {
|
|
|
16
16
|
/**
|
|
17
17
|
* remove className from element, default will not scan child nodes, if you want to scan child nodes, set `scanChildren` to `true`.
|
|
18
18
|
*
|
|
19
|
-
* @param
|
|
19
|
+
* @param target target element reference or element or callback
|
|
20
20
|
* @param removeClass className to remove, default will use class `includes` to check, if you want to use full match, set `fullMatch` to `true`
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
@@ -31,5 +31,5 @@ declare type RemoveClassNameOptions = {
|
|
|
31
31
|
* elm => <div class="efg"></div>
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export declare function removeClassName(
|
|
34
|
+
export declare function removeClassName(target: RefOrElementOrCallback, removeClass: string, { scanChildren, fullMatch }?: RemoveClassNameOptions): void;
|
|
35
35
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var getRefElement_1 = require("./getRefElement");
|
|
3
4
|
/**
|
|
4
5
|
* remove className from element, default will not scan child nodes, if you want to scan child nodes, set `scanChildren` to `true`.
|
|
5
6
|
*
|
|
6
|
-
* @param
|
|
7
|
+
* @param target target element reference or element or callback
|
|
7
8
|
* @param removeClass className to remove, default will use class `includes` to check, if you want to use full match, set `fullMatch` to `true`
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
@@ -18,9 +19,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
19
|
* elm => <div class="efg"></div>
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
|
-
function removeClassName(
|
|
22
|
+
function removeClassName(target, removeClass, _a) {
|
|
22
23
|
var _b = _a === void 0 ? {} : _a, _c = _b.scanChildren, scanChildren = _c === void 0 ? false : _c, _d = _b.fullMatch, fullMatch = _d === void 0 ? false : _d;
|
|
23
|
-
var elm =
|
|
24
|
+
var elm = getRefElement_1.getRefElement(target);
|
|
24
25
|
if (!elm)
|
|
25
26
|
return;
|
|
26
27
|
if (elm.className.includes(removeClass)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefOrElementOrCallback } from './getRefElement';
|
|
2
2
|
/**
|
|
3
3
|
* get current input element selection position and is that selectRange state
|
|
4
4
|
*/
|
|
5
|
-
export declare function getSelectionPosition(
|
|
5
|
+
export declare function getSelectionPosition<T extends HTMLInputElement | HTMLTextAreaElement>(sourceTarget: RefOrElementOrCallback<T>): {
|
|
6
6
|
isSelectRange: boolean;
|
|
7
7
|
position: {
|
|
8
8
|
start: number;
|
|
@@ -13,7 +13,7 @@ export declare function getSelectionPosition(inputRef: RefObject<HTMLInputElemen
|
|
|
13
13
|
* set input element selection position position,
|
|
14
14
|
* if you need scroll that into view set `scrollIntoView` as true
|
|
15
15
|
*/
|
|
16
|
-
export declare function setSelectionPosition(
|
|
16
|
+
export declare function setSelectionPosition<T extends HTMLInputElement | HTMLTextAreaElement>(target: RefOrElementOrCallback<T>, options: {
|
|
17
17
|
start: number | null;
|
|
18
18
|
end: number | null;
|
|
19
19
|
direction?: 'forward' | 'backward' | 'none' | undefined;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var getRefElement_1 = require("./getRefElement");
|
|
3
4
|
/**
|
|
4
5
|
* get current input element selection position and is that selectRange state
|
|
5
6
|
*/
|
|
6
|
-
function getSelectionPosition(
|
|
7
|
-
var
|
|
8
|
-
var currentPosition =
|
|
9
|
-
var currentPositionEnd =
|
|
7
|
+
function getSelectionPosition(sourceTarget) {
|
|
8
|
+
var input = getRefElement_1.getRefElement(sourceTarget);
|
|
9
|
+
var currentPosition = input === null || input === void 0 ? void 0 : input.selectionStart;
|
|
10
|
+
var currentPositionEnd = input === null || input === void 0 ? void 0 : input.selectionEnd;
|
|
10
11
|
var isSelectRange = currentPosition !== currentPositionEnd;
|
|
11
12
|
return {
|
|
12
13
|
isSelectRange: isSelectRange,
|
|
@@ -18,8 +19,8 @@ exports.getSelectionPosition = getSelectionPosition;
|
|
|
18
19
|
* set input element selection position position,
|
|
19
20
|
* if you need scroll that into view set `scrollIntoView` as true
|
|
20
21
|
*/
|
|
21
|
-
function setSelectionPosition(
|
|
22
|
-
var elm =
|
|
22
|
+
function setSelectionPosition(target, options) {
|
|
23
|
+
var elm = getRefElement_1.getRefElement(target);
|
|
23
24
|
if (elm && options.start !== null && options.end !== null) {
|
|
24
25
|
// * use blur and refocus to refocus position into view
|
|
25
26
|
if (options.scrollIntoView)
|