@opentiny/vue-renderless 3.12.0 → 3.13.0-alpha.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/action-sheet/index.js +20 -13
- package/action-sheet/vue.js +8 -7
- package/alert/index.js +50 -1
- package/alert/vue.js +36 -9
- package/amount/index.js +100 -25
- package/amount/vue.js +102 -26
- package/anchor/index.js +1 -0
- package/area/index.js +8 -8
- package/area/vue.js +5 -5
- package/async-flowchart/index.js +16 -3
- package/autocomplete/index.js +58 -14
- package/autocomplete/vue.js +40 -12
- package/badge/index.js +12 -0
- package/badge/vue.js +6 -4
- package/breadcrumb/vue.js +3 -1
- package/breadcrumb-item/vue.js +6 -2
- package/button/index.js +5 -1
- package/calendar/index.js +2 -86
- package/calendar-bar/index.js +20 -6
- package/calendar-view/index.js +10 -12
- package/calendar-view/vue.js +17 -4
- package/cascader/index.js +80 -34
- package/cascader/vue.js +49 -19
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +37 -24
- package/cascader-mobile/vue.js +7 -1
- package/cascader-node/index.js +13 -1
- package/cascader-node/vue.js +15 -4
- package/cascader-panel/index.js +1 -1
- package/cascader-select/column-index.js +150 -0
- package/cascader-select/column.js +120 -0
- package/cascader-select/index.js +29 -165
- package/cascader-select/usePicker.js +251 -0
- package/cascader-select/useTouch.js +65 -0
- package/cascader-select/vue.js +35 -47
- package/cascader-view/index.js +1 -1
- package/cell/vue.js +2 -1
- package/chart-bar/index.js +2 -3
- package/chart-core/deps/constants.js +43 -43
- package/chart-core/index.js +1 -1
- package/chart-gauge/index.js +2 -2
- package/chart-heatmap/index.js +17 -10
- package/chart-line/index.js +8 -9
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +4 -6
- package/checkbox/index.js +17 -0
- package/checkbox/vue.js +16 -7
- package/checkbox-group/vue.js +2 -0
- package/col/index.js +7 -2
- package/col/vue.js +1 -1
- package/collapse/index.js +3 -3
- package/color-select-panel/vue.js +0 -7
- package/column-list-item/index.js +17 -1
- package/column-list-item/vue.js +8 -3
- package/common/date.js +2 -0
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +48 -5
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +1 -1
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +22 -10
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/common/type.js +2 -1
- package/common/validate/rules/enum.js +1 -1
- package/common/validate/rules/pattern.js +2 -2
- package/common/validate/rules/range.js +8 -5
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +5 -5
- package/common/validate/rules/whitespace.js +1 -1
- package/common/validate/util.js +15 -16
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/container/index.js +17 -1
- package/container/vue.js +12 -3
- package/currency/index.js +74 -7
- package/currency/vue.js +21 -5
- package/date-panel/index.js +16 -0
- package/date-panel/vue.js +8 -2
- package/date-picker-mobile/index.js +12 -0
- package/date-picker-mobile/vue.js +7 -1
- package/date-range/vue.js +12 -5
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +17 -6
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +26 -5
- package/drawer/vue.js +13 -7
- package/dropdown/index.js +7 -7
- package/dropdown/vue.js +6 -2
- package/dropdown-item/index.js +9 -1
- package/dropdown-item/mf.js +6 -10
- package/dropdown-item/vue.js +21 -8
- package/dropdown-menu/index.js +20 -7
- package/dropdown-menu/vue.js +4 -3
- package/exception/index.js +2 -7
- package/exception/vue.js +7 -10
- package/fall-menu/index.js +5 -1
- package/fall-menu/vue.js +13 -2
- package/file-upload/index.js +47 -12
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -0
- package/floating-button/index.js +62 -16
- package/floating-button/vue.js +27 -9
- package/flowchart/index.js +134 -25
- package/flowchart/node.js +13 -4
- package/flowchart/vue.js +16 -4
- package/form/vue.js +3 -1
- package/form-item/index.js +4 -4
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/utils/common.js +10 -5
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -0
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +89 -22
- package/input/vue.js +52 -21
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/label/index.js +56 -0
- package/label/vue.js +26 -0
- package/link/vue.js +3 -1
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/mask/index.js +13 -0
- package/mask/vue.js +18 -0
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/multi-select/index.js +150 -10
- package/multi-select/vue.js +46 -11
- package/multi-select-item/index.js +17 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +51 -9
- package/numeric/vue.js +44 -14
- package/option/index.js +12 -5
- package/option/vue.js +15 -7
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +372 -0
- package/pager/vue.js +125 -2
- package/picker/index.js +253 -48
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/index.js +0 -2
- package/pop-upload/vue.js +3 -4
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +55 -24
- package/popeditor/vue.js +15 -11
- package/popover/index.js +4 -4
- package/popover/vue.js +6 -6
- package/popup/index.js +3 -3
- package/popup/vue.js +5 -5
- package/pull-refresh/index.js +57 -65
- package/pull-refresh/vue.js +23 -7
- package/radio/index.js +0 -17
- package/radio/vue.js +4 -10
- package/rate/index.js +1 -1
- package/rate/vue.js +0 -2
- package/record/index.js +4 -1
- package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
- package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
- package/scrollbar/index.js +11 -11
- package/scrollbar/vue-bar.js +3 -3
- package/scrollbar/vue.js +5 -5
- package/search/index.js +1 -1
- package/search/vue.js +3 -1
- package/select/index.js +185 -113
- package/select/vue.js +105 -20
- package/select-dropdown/index.js +62 -4
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- package/signature/index.js +241 -0
- package/signature/vue.js +88 -0
- package/skeleton/index.js +14 -0
- package/skeleton/vue.js +15 -0
- package/skeleton-item/vue.js +15 -0
- package/slider/index.js +27 -7
- package/slider/vue.js +26 -7
- package/split/index.js +1 -1
- package/split/vue.js +4 -6
- package/standard-list-item/index.js +15 -1
- package/standard-list-item/vue.js +6 -5
- package/steps/index.js +25 -2
- package/steps/slide-bar.js +8 -1
- package/steps/vue.js +15 -3
- package/tab-item-mf/vue.js +14 -8
- package/tab-nav/index.js +9 -4
- package/tab-nav/vue.js +6 -2
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +1 -1
- package/tabs/vue.js +1 -0
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tag/index.js +1 -1
- package/tag/vue.js +5 -1
- package/tag-group/index.js +2 -1
- package/tall-storage/index.js +4 -5
- package/time/index.js +4 -1
- package/time/vue.js +1 -1
- package/time-line/vue.js +1 -1
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/time-spinner/index.js +0 -3
- package/time-spinner/vue.js +2 -3
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +1 -2
- package/tooltip/vue.js +3 -3
- package/transfer/index.js +20 -22
- package/transfer/vue.js +1 -6
- package/transfer-panel/vue.js +3 -5
- package/tree/index.js +21 -4
- package/tree/vue.js +10 -8
- package/tree-menu/index.js +27 -3
- package/tree-menu/vue.js +27 -14
- package/tree-node/index.js +12 -10
- package/tree-node/vue.js +6 -5
- package/types/action-menu.type.d.ts +5 -0
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +16 -1
- package/types/amount.type.d.ts +168 -1
- package/types/area.type.d.ts +134 -1
- package/types/async-flowchart.type.d.ts +72 -0
- package/types/autocomplete.type.d.ts +199 -1
- package/types/badge.type.d.ts +3 -1
- package/types/breadcrumb-item.type.d.ts +2 -0
- package/types/breadcrumb.type.d.ts +2 -0
- package/types/button.type.d.ts +5 -0
- package/types/cascader-menu.type.d.ts +3 -4
- package/types/cascader-node.type.d.ts +5 -2
- package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
- package/types/cascader-panel.type.d.ts +3 -241
- package/types/cascader.type.d.ts +327 -1
- package/types/checkbox.type.d.ts +9 -0
- package/types/collapse.type.d.ts +19 -2
- package/types/date-picker.type.d.ts +33 -0
- package/types/dialog-box.type.d.ts +5 -1
- package/types/drawer.type.d.ts +132 -1
- package/types/{dropdown-item.type-bf83e929.d.ts → dropdown-item.type-8475a549.d.ts} +8 -14
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +2 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-d88482e4.d.ts} +3 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +23 -9
- package/types/ip-address.type.d.ts +160 -1
- package/types/label.type.d.ts +81 -0
- package/types/link.type.d.ts +6 -3
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +4 -2
- package/types/numeric.type.d.ts +36 -9
- package/types/pager.type.d.ts +171 -1
- package/types/picker.type.d.ts +14 -0
- package/types/popconfirm.type.d.ts +85 -1
- package/types/popeditor.type.d.ts +4 -0
- package/types/popover.type.d.ts +3 -3
- package/types/radio.type.d.ts +0 -4
- package/types/rate.type.d.ts +236 -1
- package/types/search.type.d.ts +88 -1
- package/types/shared.type.d.ts +1 -1
- package/types/skeleton-item.type.d.ts +38 -0
- package/types/skeleton.type.d.ts +45 -0
- package/types/slider.type.d.ts +8 -1
- package/types/steps.type.d.ts +14 -3
- package/types/tab-item.type.d.ts +0 -1
- package/types/tab-nav.type.d.ts +6 -1
- package/types/tabs.type.d.ts +5 -0
- package/types/tag-group.type.d.ts +64 -1
- package/types/tag.type.d.ts +12 -0
- package/types/tooltip.type.d.ts +1 -1
- package/types/transfer.type.d.ts +183 -1
- package/types/tree-menu.type.d.ts +210 -1
- package/types/upload-dragger.type.d.ts +1 -1
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-1078fba2.d.ts} +27 -6
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +59 -29
- package/upload/vue.js +6 -4
- package/upload-list/index.js +14 -14
- package/upload-list/vue.js +5 -2
- package/user/index.js +5 -4
- package/user-head/index.js +1 -1
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
package/action-sheet/index.js
CHANGED
|
@@ -40,12 +40,11 @@ const visibleHandle = ({ emit, state }) => () => {
|
|
|
40
40
|
emit("update:visible", false);
|
|
41
41
|
emit("close", false);
|
|
42
42
|
};
|
|
43
|
-
const watchVisible = ({ emit,
|
|
44
|
-
state.active = props.modelValue;
|
|
43
|
+
const watchVisible = ({ emit, state }) => (bool) => {
|
|
45
44
|
setTimeout(() => {
|
|
46
|
-
|
|
45
|
+
state.toggle = bool;
|
|
47
46
|
}, 0);
|
|
48
|
-
emit("update:visible",
|
|
47
|
+
emit("update:visible", bool);
|
|
49
48
|
};
|
|
50
49
|
const menuHandle = ({ emit, state }) => (item) => {
|
|
51
50
|
state.active = item.id;
|
|
@@ -54,13 +53,11 @@ const menuHandle = ({ emit, state }) => (item) => {
|
|
|
54
53
|
emit("update:modelValue", item.id);
|
|
55
54
|
emit("click", item);
|
|
56
55
|
};
|
|
57
|
-
const close = ({
|
|
58
|
-
|
|
59
|
-
emit("close", false);
|
|
56
|
+
const close = ({ api }) => () => {
|
|
57
|
+
api.handleClose("close", false);
|
|
60
58
|
};
|
|
61
|
-
const hide = (
|
|
62
|
-
|
|
63
|
-
emit("update:visible", false);
|
|
59
|
+
const hide = ({ api }) => () => {
|
|
60
|
+
api.handleClose("hide", false);
|
|
64
61
|
};
|
|
65
62
|
const selectOption = ({ emit, props }) => (option) => {
|
|
66
63
|
const { valueField } = props;
|
|
@@ -68,18 +65,28 @@ const selectOption = ({ emit, props }) => (option) => {
|
|
|
68
65
|
emit("update:modelValue", option[valueField]);
|
|
69
66
|
emit("click", option);
|
|
70
67
|
};
|
|
71
|
-
const confirm = ({
|
|
72
|
-
|
|
73
|
-
emit("update:visible", false);
|
|
68
|
+
const confirm = ({ state, api }) => () => {
|
|
69
|
+
api.handleClose("confirm", state);
|
|
74
70
|
};
|
|
75
71
|
const actionSelectOption = ({ emit }) => (option, index) => {
|
|
76
72
|
emit("update:visible", false);
|
|
77
73
|
emit("click", option, index);
|
|
78
74
|
};
|
|
75
|
+
const handleClose = ({ vm, emit, props }) => (type, show) => {
|
|
76
|
+
if (typeof props.beforeClose === "function" && props.beforeClose(type) === false)
|
|
77
|
+
return;
|
|
78
|
+
if (type === "close") {
|
|
79
|
+
vm.$refs.drawer.close(true);
|
|
80
|
+
} else {
|
|
81
|
+
emit("update:visible", false);
|
|
82
|
+
}
|
|
83
|
+
emit(type, show);
|
|
84
|
+
};
|
|
79
85
|
export {
|
|
80
86
|
actionSelectOption,
|
|
81
87
|
close,
|
|
82
88
|
confirm,
|
|
89
|
+
handleClose,
|
|
83
90
|
hide,
|
|
84
91
|
initScrollMenu,
|
|
85
92
|
menuHandle,
|
package/action-sheet/vue.js
CHANGED
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
selectOption,
|
|
10
10
|
confirm,
|
|
11
11
|
actionSelectOption,
|
|
12
|
-
hide
|
|
12
|
+
hide,
|
|
13
|
+
handleClose
|
|
13
14
|
} from "./index";
|
|
14
15
|
const api = [
|
|
15
16
|
"state",
|
|
@@ -25,26 +26,26 @@ const api = [
|
|
|
25
26
|
"hide"
|
|
26
27
|
];
|
|
27
28
|
const renderless = (props, { reactive, watch }, { emit, nextTick, refs, vm }, { BScroll }) => {
|
|
28
|
-
const api2 = {};
|
|
29
29
|
const state = reactive({
|
|
30
30
|
toggle: false,
|
|
31
|
-
active: null,
|
|
32
31
|
sheetMaskStyle: {},
|
|
33
32
|
sheetContentStyle: {},
|
|
34
33
|
scroll: null
|
|
35
34
|
});
|
|
35
|
+
const api2 = {};
|
|
36
36
|
Object.assign(api2, {
|
|
37
37
|
state,
|
|
38
38
|
setSheetStyle: setSheetStyle({ state, props }),
|
|
39
39
|
initScrollMenu: initScrollMenu({ state, nextTick, refs, BScroll }),
|
|
40
40
|
visibleHandle: visibleHandle({ emit, state }),
|
|
41
|
-
watchVisible: watchVisible({ emit,
|
|
41
|
+
watchVisible: watchVisible({ emit, state }),
|
|
42
42
|
menuHandle: menuHandle({ state, emit }),
|
|
43
|
-
confirm: confirm({ state,
|
|
43
|
+
confirm: confirm({ state, api: api2 }),
|
|
44
44
|
selectOption: selectOption({ emit, props }),
|
|
45
45
|
actionSelectOption: actionSelectOption({ emit }),
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
hide: hide({ api: api2 }),
|
|
47
|
+
close: close({ api: api2 }),
|
|
48
|
+
handleClose: handleClose({ vm, emit, props })
|
|
48
49
|
});
|
|
49
50
|
watch(
|
|
50
51
|
() => props.visible,
|
package/alert/index.js
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
const ALERT_TIMEOUT = 2e3;
|
|
3
|
+
const watchAutoHide = ({ api, props }) => (newVal) => {
|
|
4
|
+
if (props.autoHide && newVal) {
|
|
5
|
+
const timer = setTimeout(() => {
|
|
6
|
+
api.handleClose();
|
|
7
|
+
clearTimeout(timer);
|
|
8
|
+
}, ALERT_TIMEOUT);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const computedClass = ({ props, mode }) => () => {
|
|
12
|
+
const { type, size, center } = props;
|
|
13
|
+
if (mode === "mobile") {
|
|
14
|
+
const alertClass = ["tiny-mobile-alert", "tiny-mobile-alert--" + type, "tiny-mobile-alert--" + size];
|
|
15
|
+
if (center) {
|
|
16
|
+
alertClass.push("is-center");
|
|
17
|
+
}
|
|
18
|
+
return alertClass;
|
|
19
|
+
}
|
|
20
|
+
return [];
|
|
21
|
+
};
|
|
22
|
+
const computedStyle = ({ props, mode }) => () => {
|
|
23
|
+
if (mode === "mobile") {
|
|
24
|
+
const style = {
|
|
25
|
+
top: isNaN(props.offset) ? props.offset : `${props.offset}px`
|
|
26
|
+
};
|
|
27
|
+
return style;
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
};
|
|
2
31
|
const handleClose = ({ emit, state }) => () => {
|
|
3
32
|
state.show = false;
|
|
4
33
|
emit("close");
|
|
@@ -26,9 +55,29 @@ const handleHeaderClick = ({ state, props, vm }) => () => {
|
|
|
26
55
|
}
|
|
27
56
|
}
|
|
28
57
|
};
|
|
58
|
+
const getEl = (node) => {
|
|
59
|
+
return node.$el || node;
|
|
60
|
+
};
|
|
61
|
+
const handlerTargetNode = ({ props, parent, vm, nextTick }) => () => {
|
|
62
|
+
const { target } = props;
|
|
63
|
+
const { $parent } = parent;
|
|
64
|
+
nextTick(() => {
|
|
65
|
+
const alertParentNode = $parent == null ? void 0 : $parent.$refs[target];
|
|
66
|
+
if (!target || !alertParentNode) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const targetNode = Array.isArray(alertParentNode) ? alertParentNode[0] : alertParentNode;
|
|
70
|
+
getEl(targetNode).insertBefore(vm.$el, getEl(targetNode).firstChild);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
29
73
|
export {
|
|
74
|
+
ALERT_TIMEOUT,
|
|
75
|
+
computedClass,
|
|
30
76
|
computedGetIcon,
|
|
31
77
|
computedGetTitle,
|
|
78
|
+
computedStyle,
|
|
32
79
|
handleClose,
|
|
33
|
-
handleHeaderClick
|
|
80
|
+
handleHeaderClick,
|
|
81
|
+
handlerTargetNode,
|
|
82
|
+
watchAutoHide
|
|
34
83
|
};
|
package/alert/vue.js
CHANGED
|
@@ -1,24 +1,51 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
computedGetIcon,
|
|
4
|
+
computedGetTitle,
|
|
5
|
+
computedStyle,
|
|
6
|
+
computedClass,
|
|
7
|
+
handleClose,
|
|
8
|
+
handleHeaderClick,
|
|
9
|
+
watchAutoHide,
|
|
10
|
+
handlerTargetNode
|
|
11
|
+
} from "./index";
|
|
3
12
|
const api = ["handleClose", "state", "handleHeaderClick"];
|
|
4
|
-
const
|
|
5
|
-
|
|
13
|
+
const initState = ({ api: api2, computed, constants, reactive }) => {
|
|
14
|
+
return reactive({
|
|
6
15
|
show: true,
|
|
7
|
-
getIcon: computed(() => api2.computedGetIcon()),
|
|
8
|
-
getTitle: computed(() => api2.computedGetTitle()),
|
|
9
16
|
contentVisible: false,
|
|
10
17
|
contentDescribeHeight: 0,
|
|
11
18
|
contentDefaultHeight: 0,
|
|
12
19
|
contentMaxHeight: constants.CONTENT_MAXHEUGHT,
|
|
13
|
-
scrollStatus: false
|
|
20
|
+
scrollStatus: false,
|
|
21
|
+
getIcon: computed(() => api2.computedGetIcon()),
|
|
22
|
+
getTitle: computed(() => api2.computedGetTitle()),
|
|
23
|
+
alertClass: computed(() => api2.computedClass()),
|
|
24
|
+
alertStyle: computed(() => api2.computedStyle())
|
|
14
25
|
});
|
|
15
|
-
|
|
26
|
+
};
|
|
27
|
+
const initApi = ({ api: api2, state, constants, props, designConfig, t, emit, vm, parent, nextTick, mode }) => {
|
|
28
|
+
Object.assign(api2, {
|
|
16
29
|
state,
|
|
17
30
|
computedGetIcon: computedGetIcon({ constants, props, designConfig }),
|
|
18
31
|
computedGetTitle: computedGetTitle({ constants, props, t }),
|
|
32
|
+
computedClass: computedClass({ props, mode }),
|
|
33
|
+
computedStyle: computedStyle({ props, mode }),
|
|
19
34
|
handleClose: handleClose({ emit, state }),
|
|
20
|
-
handleHeaderClick: handleHeaderClick({ state, props, vm })
|
|
21
|
-
|
|
35
|
+
handleHeaderClick: handleHeaderClick({ state, props, vm }),
|
|
36
|
+
watchAutoHide: watchAutoHide({ api: api2, props }),
|
|
37
|
+
handlerTargetNode: handlerTargetNode({ props, parent, vm, nextTick })
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const initWatcher = ({ watch, props, api: api2 }) => {
|
|
41
|
+
watch(() => props.autoHide, api2.watchAutoHide, { immediate: true });
|
|
42
|
+
watch(() => props.target, api2.handlerTargetNode, { immediate: true });
|
|
43
|
+
};
|
|
44
|
+
const renderless = (props, { computed, reactive, watch }, { t, emit, constants, vm, designConfig, parent, nextTick, mode }) => {
|
|
45
|
+
const api2 = {};
|
|
46
|
+
const state = initState({ api: api2, computed, constants, reactive });
|
|
47
|
+
initApi({ api: api2, state, constants, props, designConfig, t, emit, vm, parent, nextTick, mode });
|
|
48
|
+
initWatcher({ watch, props, api: api2 });
|
|
22
49
|
return api2;
|
|
23
50
|
};
|
|
24
51
|
export {
|
package/amount/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const initService = (service) => {
|
|
|
17
17
|
const getDecimal = (props) => (value) => getMiniDecimal(value, props.plugin);
|
|
18
18
|
const closePopper = (state) => () => {
|
|
19
19
|
state.visible = false;
|
|
20
|
+
state.editorPhase = "close";
|
|
20
21
|
};
|
|
21
22
|
const popInput = ({ editorState, props, state, api }) => (value) => {
|
|
22
23
|
value = api.onInputPreprocess(value);
|
|
@@ -32,22 +33,54 @@ const popInput = ({ editorState, props, state, api }) => (value) => {
|
|
|
32
33
|
editorState.lastInput = value;
|
|
33
34
|
editorState.amount = value;
|
|
34
35
|
};
|
|
35
|
-
const toggleVisible = ({ api, props, state, editorState }) => () => {
|
|
36
|
-
if (
|
|
36
|
+
const toggleVisible = ({ api, props, state, editorState, uiMode, isMobileFirstMode: mf }) => () => {
|
|
37
|
+
if (state.disabled || !props.popUp) {
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
state.lock = true;
|
|
40
41
|
state.visible = !state.visible;
|
|
41
42
|
if (state.visible) {
|
|
42
43
|
const { date, currency } = state;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
if (!state.clearValues) {
|
|
45
|
+
Object.assign(editorState, {
|
|
46
|
+
amount: state.amount,
|
|
47
|
+
date,
|
|
48
|
+
currency
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (props.date || props.dateAllowEmpty) {
|
|
52
|
+
state.editorPhase = "selection";
|
|
53
|
+
} else {
|
|
54
|
+
state.editorPhase = "currency";
|
|
55
|
+
}
|
|
56
|
+
if (!mf || uiMode.value !== "default") {
|
|
57
|
+
api.addOutSideEvent(state.visible);
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
state.editorPhase = "close";
|
|
49
61
|
}
|
|
50
62
|
};
|
|
63
|
+
const openDetailEditor = ({ state }) => (option, index) => {
|
|
64
|
+
const optionPhase = ["currency", "date"];
|
|
65
|
+
state.editorPhase = optionPhase[index];
|
|
66
|
+
state.visible = true;
|
|
67
|
+
};
|
|
68
|
+
const closeDetailEidtor = ({ state, props, api }) => (triggerCondition) => {
|
|
69
|
+
if (!triggerCondition) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const inSelectionPhase = state.editorPhase === "selection";
|
|
73
|
+
const isMultipleStep = props.date || props.dateAllowEmpty;
|
|
74
|
+
if (!inSelectionPhase && isMultipleStep) {
|
|
75
|
+
state.editorPhase = "selection";
|
|
76
|
+
state.visible = true;
|
|
77
|
+
} else {
|
|
78
|
+
api.toggleVisible();
|
|
79
|
+
}
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
api.save(true);
|
|
82
|
+
}, 0);
|
|
83
|
+
};
|
|
51
84
|
const innerFormat = ({ state, props }) => (value) => {
|
|
52
85
|
const { fraction, zeroize, rounding } = state.format;
|
|
53
86
|
const { modelTruncation } = props;
|
|
@@ -66,11 +99,13 @@ const innerFormat = ({ state, props }) => (value) => {
|
|
|
66
99
|
rounding
|
|
67
100
|
});
|
|
68
101
|
};
|
|
69
|
-
const save = ({ api, state, editorState }) => () => {
|
|
102
|
+
const save = ({ api, state, editorState }) => (keepOpen) => {
|
|
70
103
|
const { amount, date, currency } = editorState;
|
|
71
104
|
Object.assign(state, { amount, date, currency });
|
|
72
|
-
|
|
73
|
-
|
|
105
|
+
if (keepOpen !== true) {
|
|
106
|
+
api.closePopper();
|
|
107
|
+
}
|
|
108
|
+
let num = api.innerFormat(state.amount + "");
|
|
74
109
|
state.amount = isNaN(num) ? 0 : num;
|
|
75
110
|
if (!equalsDecimal(state.lastInput, state.amount) || state.lastCurrency !== currency || state.lastDate !== date) {
|
|
76
111
|
api.emitChange();
|
|
@@ -84,16 +119,20 @@ const reset = ({ state, editorState }) => () => {
|
|
|
84
119
|
const { amount, date, currency } = state;
|
|
85
120
|
Object.assign(editorState, { amount, date, currency });
|
|
86
121
|
};
|
|
87
|
-
const emitChange = ({ emit, state }) => () => {
|
|
122
|
+
const emitChange = ({ emit, state, props, api }) => () => {
|
|
88
123
|
const { date, currency } = state;
|
|
89
|
-
|
|
90
|
-
|
|
124
|
+
let emitAmount = props.stringMode ? api.getDecimal(state.amount).toString() : Number(state.amount);
|
|
125
|
+
if (props.numAllowEmpty && state.amount === "") {
|
|
126
|
+
emitAmount = state.amount;
|
|
127
|
+
}
|
|
128
|
+
state.amount && (state.clearValues = false);
|
|
129
|
+
!state.clearValues && emit("update:modelValue", emitAmount);
|
|
91
130
|
emit("update:currency", currency);
|
|
92
131
|
emit("update:date", date);
|
|
93
132
|
emit("change", { amount: emitAmount, date, currency });
|
|
94
133
|
};
|
|
95
134
|
const inputFocus = ({ state, props }) => () => {
|
|
96
|
-
let amount =
|
|
135
|
+
let amount = state.amount + "";
|
|
97
136
|
state.isFocus = true;
|
|
98
137
|
state.lock = false;
|
|
99
138
|
const { fraction } = state.format;
|
|
@@ -105,7 +144,7 @@ const inputFocus = ({ state, props }) => () => {
|
|
|
105
144
|
};
|
|
106
145
|
const inputBlur = ({ api, state, props }) => () => {
|
|
107
146
|
if (state.amountText !== "") {
|
|
108
|
-
let amount = api.innerFormat(
|
|
147
|
+
let amount = api.innerFormat(state.amountText + "");
|
|
109
148
|
if (isNaN(amount)) {
|
|
110
149
|
state.amount = "";
|
|
111
150
|
}
|
|
@@ -118,8 +157,8 @@ const inputBlur = ({ api, state, props }) => () => {
|
|
|
118
157
|
}
|
|
119
158
|
state.lastInput = state.amount;
|
|
120
159
|
};
|
|
121
|
-
const handelClick = ({ api,
|
|
122
|
-
const contains = refs.root.contains(e.target);
|
|
160
|
+
const handelClick = ({ api, vm }) => (e) => {
|
|
161
|
+
const contains = vm.$refs.root.contains(e.target);
|
|
123
162
|
if (!contains) {
|
|
124
163
|
api.closePopper();
|
|
125
164
|
}
|
|
@@ -132,7 +171,7 @@ const addOutSideEvent = (api) => (visible) => {
|
|
|
132
171
|
}
|
|
133
172
|
};
|
|
134
173
|
const initText = ({ state }) => () => {
|
|
135
|
-
let amount =
|
|
174
|
+
let amount = state.amount + "";
|
|
136
175
|
state.amountText = amount ? state.isFocus ? amount : formatNumber(state.amount, state.format) : "";
|
|
137
176
|
};
|
|
138
177
|
const onInputPreprocess = (props) => (value) => {
|
|
@@ -151,7 +190,7 @@ const onInputPreprocess = (props) => (value) => {
|
|
|
151
190
|
const onInput = ({ state, props, api }) => (value) => {
|
|
152
191
|
value = api.onInputPreprocess(value);
|
|
153
192
|
const { fraction, groupSeparator } = state.format;
|
|
154
|
-
value = event.target.value.replace(/^-+/, "-");
|
|
193
|
+
value = event.target.value !== void 0 ? event.target.value.replace(/^-+/, "-") : value.replace(/^-+/, "-");
|
|
155
194
|
const groups = value.split(groupSeparator).map((val) => val.trim());
|
|
156
195
|
value = groups.join("");
|
|
157
196
|
if (value !== "-" && api.getDecimal(value).isNaN()) {
|
|
@@ -184,7 +223,17 @@ const getPrecision = ({ service, props, currency }) => {
|
|
|
184
223
|
}
|
|
185
224
|
return __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, defaultFmt), { fraction, rounding }), serFmt), format);
|
|
186
225
|
};
|
|
187
|
-
const getAmountText = ({ state, props }) => () =>
|
|
226
|
+
const getAmountText = ({ state, props }) => () => {
|
|
227
|
+
const isFilter = props.shape === "filter" && props.filter;
|
|
228
|
+
if (props.hideCurrency && typeof state.amountText === "string") {
|
|
229
|
+
return isFilter ? state.radioVal + state.amountText.replace(state.currency, "") : state.amountText.replace(state.currency, "");
|
|
230
|
+
} else {
|
|
231
|
+
return isFilter ? state.radioVal + state.amountText : state.amountText;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
const getAmountTextWithoutCurrncy = ({ state }) => () => {
|
|
235
|
+
return state.amountText.replace(state.currency, "");
|
|
236
|
+
};
|
|
188
237
|
const watchModelValue = ({ api, state }) => () => {
|
|
189
238
|
let value = api.initAmount();
|
|
190
239
|
state.amount = value;
|
|
@@ -197,23 +246,47 @@ const watchCurrency = ({ api, state, editorState }) => (value) => {
|
|
|
197
246
|
state.lastCurrency = value;
|
|
198
247
|
api.initText();
|
|
199
248
|
};
|
|
200
|
-
const
|
|
249
|
+
const watchUiMode = ({ api, isMobileFirstMode: mf }) => (value) => {
|
|
250
|
+
if (mf && value === "default") {
|
|
251
|
+
api.addOutSideEvent(false);
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
const initAmount = ({ props, api }) => () => {
|
|
201
255
|
let value = props.modelValue;
|
|
202
256
|
value = value === null || isNaN(Number(value)) ? "" : value;
|
|
203
257
|
if (!props.negative && value && Number(value) < 0) {
|
|
204
|
-
|
|
205
|
-
|
|
258
|
+
if (props.stringMode) {
|
|
259
|
+
value = api.getDecimal(String(value).replace(/^-/, "")).toString();
|
|
260
|
+
} else {
|
|
261
|
+
value -= 0;
|
|
262
|
+
value = Math.abs(value);
|
|
263
|
+
}
|
|
206
264
|
}
|
|
207
265
|
return value;
|
|
208
266
|
};
|
|
267
|
+
const handleClearClick = ({ state, emit, editorState }) => (event2) => {
|
|
268
|
+
event2.stopPropagation();
|
|
269
|
+
state.amountText = "";
|
|
270
|
+
state.radioVal = "";
|
|
271
|
+
editorState.amount = "";
|
|
272
|
+
state.clearValues = true;
|
|
273
|
+
emit("clear");
|
|
274
|
+
};
|
|
275
|
+
const handleChange = ({ state, emit }) => () => {
|
|
276
|
+
emit("filter-change", state.radioVal);
|
|
277
|
+
};
|
|
209
278
|
export {
|
|
210
279
|
addOutSideEvent,
|
|
280
|
+
closeDetailEidtor,
|
|
211
281
|
closePopper,
|
|
212
282
|
emitChange,
|
|
213
283
|
getAmountText,
|
|
284
|
+
getAmountTextWithoutCurrncy,
|
|
214
285
|
getDecimal,
|
|
215
286
|
getPrecision,
|
|
216
287
|
handelClick,
|
|
288
|
+
handleChange,
|
|
289
|
+
handleClearClick,
|
|
217
290
|
initAmount,
|
|
218
291
|
initService,
|
|
219
292
|
initText,
|
|
@@ -222,10 +295,12 @@ export {
|
|
|
222
295
|
inputFocus,
|
|
223
296
|
onInput,
|
|
224
297
|
onInputPreprocess,
|
|
298
|
+
openDetailEditor,
|
|
225
299
|
popInput,
|
|
226
300
|
reset,
|
|
227
301
|
save,
|
|
228
302
|
toggleVisible,
|
|
229
303
|
watchCurrency,
|
|
230
|
-
watchModelValue
|
|
304
|
+
watchModelValue,
|
|
305
|
+
watchUiMode
|
|
231
306
|
};
|
package/amount/vue.js
CHANGED
|
@@ -23,7 +23,13 @@ import {
|
|
|
23
23
|
watchModelValue,
|
|
24
24
|
watchCurrency,
|
|
25
25
|
onInputPreprocess,
|
|
26
|
-
initAmount
|
|
26
|
+
initAmount,
|
|
27
|
+
handleClearClick,
|
|
28
|
+
handleChange,
|
|
29
|
+
closeDetailEidtor,
|
|
30
|
+
openDetailEditor,
|
|
31
|
+
getAmountTextWithoutCurrncy,
|
|
32
|
+
watchUiMode
|
|
27
33
|
} from "./index";
|
|
28
34
|
const api = [
|
|
29
35
|
"t",
|
|
@@ -38,9 +44,26 @@ const api = [
|
|
|
38
44
|
"inputFocus",
|
|
39
45
|
"closePopper",
|
|
40
46
|
"onInput",
|
|
41
|
-
"getAmountText"
|
|
47
|
+
"getAmountText",
|
|
48
|
+
"handleClearClick",
|
|
49
|
+
"handleChange",
|
|
50
|
+
"openDetailEditor",
|
|
51
|
+
"closeDetailEidtor",
|
|
52
|
+
"uiMode",
|
|
53
|
+
"getAmountTextWithoutCurrncy",
|
|
54
|
+
"watchUiMode"
|
|
42
55
|
];
|
|
43
|
-
const initState = ({
|
|
56
|
+
const initState = ({
|
|
57
|
+
reactive,
|
|
58
|
+
computed,
|
|
59
|
+
props,
|
|
60
|
+
$service,
|
|
61
|
+
editorState,
|
|
62
|
+
vm,
|
|
63
|
+
api: api2,
|
|
64
|
+
constants,
|
|
65
|
+
parent
|
|
66
|
+
}) => {
|
|
44
67
|
const state = reactive({
|
|
45
68
|
visible: false,
|
|
46
69
|
amount: props.modelValue || "",
|
|
@@ -53,45 +76,88 @@ const initState = ({ reactive, computed, props, $service, editorState }) => {
|
|
|
53
76
|
lastInput: props.modelValue,
|
|
54
77
|
lastCurrency: props.currency,
|
|
55
78
|
lastDate: props.date,
|
|
56
|
-
format: computed(() =>
|
|
57
|
-
|
|
58
|
-
|
|
79
|
+
format: computed(() => {
|
|
80
|
+
return __spreadProps(__spreadValues({}, getPrecision({ service: $service, props, currency: editorState.currency })), {
|
|
81
|
+
prefix: state.currency
|
|
82
|
+
});
|
|
83
|
+
}),
|
|
84
|
+
disabled: computed(() => props.disabled || (parent.tinyForm || {}).disabled),
|
|
85
|
+
displayOnly: computed(() => props.displayOnly || (parent.tinyForm || {}).displayOnly),
|
|
86
|
+
theme: vm.theme,
|
|
87
|
+
radioVal: "",
|
|
88
|
+
clearValues: false,
|
|
89
|
+
amountValue: computed(() => api2.getAmountText()),
|
|
90
|
+
amountNumberValue: computed(() => api2.getAmountTextWithoutCurrncy()),
|
|
91
|
+
filterMenu: constants.FILTER_OPTION,
|
|
92
|
+
editorPhase: "close"
|
|
93
|
+
// 'close' | 'selection' | 'currency' | 'date',
|
|
59
94
|
});
|
|
60
95
|
return state;
|
|
61
96
|
};
|
|
62
|
-
const initEditorState = ({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
97
|
+
const initEditorState = ({
|
|
98
|
+
reactive,
|
|
99
|
+
props
|
|
100
|
+
}) => {
|
|
101
|
+
return reactive({
|
|
102
|
+
amount: "",
|
|
103
|
+
date: "",
|
|
104
|
+
currency: props.currency,
|
|
105
|
+
lastInput: props.modelValue
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const initUiMode = ({ useBreakpoint }) => {
|
|
109
|
+
return useBreakpoint().current;
|
|
110
|
+
};
|
|
111
|
+
const initApi = ({
|
|
112
|
+
api: api2,
|
|
113
|
+
t,
|
|
114
|
+
editorState,
|
|
115
|
+
props,
|
|
116
|
+
state,
|
|
117
|
+
emit,
|
|
118
|
+
vm,
|
|
119
|
+
uiMode,
|
|
120
|
+
isMobileFirstMode
|
|
121
|
+
}) => {
|
|
69
122
|
Object.assign(api2, {
|
|
70
123
|
state,
|
|
71
124
|
t,
|
|
72
125
|
editorState,
|
|
126
|
+
uiMode,
|
|
73
127
|
getDecimal: getDecimal(props),
|
|
74
128
|
innerFormat: innerFormat({ state, props }),
|
|
75
129
|
getAmountText: getAmountText({ state, props }),
|
|
76
|
-
|
|
130
|
+
getAmountTextWithoutCurrncy: getAmountTextWithoutCurrncy({ state }),
|
|
131
|
+
initAmount: initAmount({ props, api: api2 }),
|
|
77
132
|
onInputPreprocess: onInputPreprocess(props),
|
|
78
133
|
onInput: onInput({ state, props, api: api2 }),
|
|
79
134
|
initText: initText({ state }),
|
|
80
135
|
inputFocus: inputFocus({ state, props }),
|
|
81
136
|
inputBlur: inputBlur({ api: api2, props, state }),
|
|
82
137
|
closePopper: closePopper(state),
|
|
83
|
-
emitChange: emitChange({ emit, state }),
|
|
138
|
+
emitChange: emitChange({ emit, state, props, api: api2 }),
|
|
84
139
|
popInput: popInput({ editorState, api: api2, state, props }),
|
|
85
|
-
save: save({ api: api2, state, editorState
|
|
86
|
-
reset: reset({
|
|
87
|
-
handelClick: handelClick({ api: api2,
|
|
140
|
+
save: save({ api: api2, state, editorState }),
|
|
141
|
+
reset: reset({ state, editorState }),
|
|
142
|
+
handelClick: handelClick({ api: api2, vm }),
|
|
88
143
|
addOutSideEvent: addOutSideEvent(api2),
|
|
89
144
|
watchModelValue: watchModelValue({ api: api2, state }),
|
|
90
145
|
watchCurrency: watchCurrency({ api: api2, state, editorState }),
|
|
91
|
-
|
|
146
|
+
watchUiMode: watchUiMode({ api: api2, isMobileFirstMode }),
|
|
147
|
+
toggleVisible: toggleVisible({ api: api2, props, state, editorState, uiMode, isMobileFirstMode }),
|
|
148
|
+
handleClearClick: handleClearClick({ state, emit, editorState }),
|
|
149
|
+
handleChange: handleChange({ state, emit }),
|
|
150
|
+
openDetailEditor: openDetailEditor({ state }),
|
|
151
|
+
closeDetailEidtor: closeDetailEidtor({ state, props, api: api2 })
|
|
92
152
|
});
|
|
93
153
|
};
|
|
94
|
-
const initWatch = ({
|
|
154
|
+
const initWatch = ({
|
|
155
|
+
watch,
|
|
156
|
+
props,
|
|
157
|
+
state,
|
|
158
|
+
api: api2,
|
|
159
|
+
uiMode
|
|
160
|
+
}) => {
|
|
95
161
|
watch(() => props.modelValue, api2.watchModelValue, { immediate: true });
|
|
96
162
|
watch(() => props.currency, api2.watchCurrency, { immediate: true });
|
|
97
163
|
watch(
|
|
@@ -114,16 +180,26 @@ const initWatch = ({ watch, props, state, api: api2 }) => {
|
|
|
114
180
|
state.format.fraction = value;
|
|
115
181
|
}
|
|
116
182
|
);
|
|
183
|
+
watch(uiMode, api2.watchUiMode);
|
|
117
184
|
};
|
|
118
|
-
const renderless = (props, { onUnmounted, computed, reactive, watch }, { t, emit,
|
|
185
|
+
const renderless = (props, { onUnmounted, computed, reactive, watch, inject }, { t, emit, vm, service, parent, constants, isMobileFirstMode, useBreakpoint }) => {
|
|
186
|
+
var _a;
|
|
119
187
|
const api2 = {};
|
|
120
188
|
const $service = initService(service);
|
|
121
189
|
const editorState = initEditorState({ reactive, props });
|
|
122
|
-
const state = initState({ reactive, computed, props, $service, editorState });
|
|
123
|
-
|
|
124
|
-
api2
|
|
125
|
-
|
|
126
|
-
|
|
190
|
+
const state = initState({ reactive, computed, props, $service, editorState, vm, api: api2, constants, parent });
|
|
191
|
+
const uiMode = initUiMode({ useBreakpoint });
|
|
192
|
+
initApi({ api: api2, t, editorState, props, state, emit, vm, uiMode, isMobileFirstMode });
|
|
193
|
+
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
194
|
+
(_a = api2 == null ? void 0 : api2.getDecimal) == null ? void 0 : _a.call(api2, 0);
|
|
195
|
+
initWatch({ watch, props, state, api: api2, uiMode });
|
|
196
|
+
onUnmounted(() => {
|
|
197
|
+
var _a2;
|
|
198
|
+
return (_a2 = api2 == null ? void 0 : api2.addOutSideEvent) == null ? void 0 : _a2.call(api2, false);
|
|
199
|
+
});
|
|
200
|
+
parent.$on("handle-clear", (event) => {
|
|
201
|
+
api2.handleClearClick(event);
|
|
202
|
+
});
|
|
127
203
|
return api2;
|
|
128
204
|
};
|
|
129
205
|
export {
|
package/anchor/index.js
CHANGED
|
@@ -116,6 +116,7 @@ const unmounted = ({ state, api }) => () => {
|
|
|
116
116
|
};
|
|
117
117
|
const onItersectionObserver = ({ state, props, api, vm, emit }) => () => {
|
|
118
118
|
const { expandLink, scrollContainer } = state;
|
|
119
|
+
state.currentLink && updateSkidPosition({ vm, state, emit });
|
|
119
120
|
state.intersectionObserver = new IntersectionObserver(
|
|
120
121
|
(entries) => {
|
|
121
122
|
const { top } = scrollContainer.getBoundingClientRect();
|