@opentiny/vue-renderless 3.13.1 → 3.14.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/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 +18 -4
- package/calendar-view/index.js +5 -1
- package/calendar-view/vue.js +16 -3
- package/card-group/vue.js +4 -2
- package/cascader/index.js +86 -34
- package/cascader/vue.js +61 -20
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +36 -23
- package/cascader-mobile/vue.js +6 -0
- 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/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 +18 -1
- package/checkbox/vue.js +15 -7
- package/checkbox-group/vue.js +1 -0
- 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 +7 -5
- package/common/deps/clickoutside.js +6 -2
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +44 -11
- package/common/deps/resize-event.js +1 -0
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +2 -2
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +38 -20
- package/common/index.js +2 -2
- package/common/runtime.js +1 -1
- package/common/string.js +2 -2
- 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/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 +14 -6
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +46 -14
- package/dialog-box/vue.js +30 -7
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +27 -5
- package/drawer/vue.js +14 -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 +20 -7
- 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 +68 -18
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -0
- package/float-button/index.js +42 -0
- package/float-button/vue.js +101 -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 +8 -0
- package/form-item/index.js +5 -5
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/plugins/export.js +5 -2
- package/grid/utils/column.js +1 -0
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -1
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +81 -20
- package/input/vue.js +44 -18
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/link/vue.js +3 -1
- package/loading/index.js +2 -2
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/menu/index.js +15 -2
- package/menu/vue.js +22 -17
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/modal/index.js +44 -4
- package/modal/vue.js +18 -4
- package/multi-select/index.js +186 -11
- package/multi-select/vue.js +60 -15
- package/multi-select-item/index.js +23 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +46 -12
- package/numeric/vue.js +44 -19
- package/option/index.js +27 -9
- package/option/vue.js +37 -21
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +18 -4
- package/pager/vue.js +16 -5
- package/picker/index.js +258 -49
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/vue.js +3 -0
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +71 -32
- 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 +13 -13
- package/pull-refresh/vue.js +5 -4
- 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/clipboard.js +54 -0
- package/rich-text/index.js +192 -0
- package/rich-text/module/file-upload.js +107 -0
- package/rich-text/module/image-drop.js +63 -0
- package/rich-text/module/image-upload.js +89 -0
- package/rich-text/options.js +141 -0
- package/rich-text/table-module.js +382 -0
- package/rich-text/vue.js +102 -0
- 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 +9 -9
- package/search/vue.js +8 -6
- package/select/index.js +457 -389
- package/select/vue.js +257 -161
- package/select-dropdown/index.js +61 -3
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- package/selected-box/index.js +2 -0
- package/selected-box/vue.js +6 -3
- 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 +70 -17
- package/slider/vue.js +16 -7
- package/split/index.js +5 -3
- 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 +30 -5
- package/tab-nav/vue.js +16 -4
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +16 -4
- package/tabs/vue.js +2 -1
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tabs-mf/wheel.js +1 -0
- package/tag/index.js +1 -1
- package/tag-group/index.js +2 -1
- package/time/index.js +5 -2
- package/time/vue.js +1 -1
- package/time-line/index.js +3 -3
- package/time-line/vue.js +2 -2
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +6 -3
- package/tooltip/vue.js +4 -4
- 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 +31 -5
- package/tree-menu/vue.js +28 -15
- package/tree-node/index.js +18 -18
- package/tree-node/vue.js +6 -5
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +1 -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-group.type.d.ts +3 -3
- package/types/button.type.d.ts +4 -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 +329 -1
- package/types/checkbox.type.d.ts +9 -3
- package/types/collapse.type.d.ts +20 -3
- package/types/date-picker.type.d.ts +37 -0
- package/types/dialog-box.type.d.ts +13 -3
- package/types/drawer.type.d.ts +133 -1
- package/types/{dropdown-item.type-8ea6c633.d.ts → dropdown-item.type-8475a549.d.ts} +7 -13
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +1 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/float-button.type.d.ts +123 -0
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-222799ae.d.ts} +5 -2
- package/types/form.type.d.ts +1 -1
- package/types/{index-e0250f63.d.ts → index-b012f687.d.ts} +9 -0
- package/types/input.type.d.ts +1 -5
- package/types/ip-address.type.d.ts +160 -1
- package/types/link.type.d.ts +6 -3
- package/types/loading.type.d.ts +7 -0
- package/types/milestone.type.d.ts +1 -1
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +29 -2
- package/types/numeric.type.d.ts +41 -10
- package/types/pager.type.d.ts +13 -1
- package/types/picker.type.d.ts +18 -0
- package/types/popconfirm.type.d.ts +86 -1
- package/types/popeditor.type.d.ts +5 -1
- package/types/popover.type.d.ts +3 -3
- package/types/progress.type.d.ts +3 -1
- 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 +49 -10
- package/types/steps.type.d.ts +15 -4
- package/types/switch.type.d.ts +3 -3
- package/types/tab-bar.type.d.ts +1 -1
- package/types/tab-nav.type.d.ts +7 -2
- package/types/tabs.type.d.ts +9 -1
- package/types/tag-group.type.d.ts +64 -1
- package/types/{time-line.type-d7daa669.d.ts → time-line.type-b155cb4f.d.ts} +12 -0
- package/types/time-line.type.d.ts +1 -1
- package/types/timeline-item.type.d.ts +1 -1
- package/types/tooltip.type.d.ts +2 -2
- package/types/transfer.type.d.ts +185 -1
- package/types/tree-menu.type.d.ts +210 -1
- package/types/upload-dragger.type.d.ts +2 -2
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-a29aea50.d.ts} +31 -8
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/user-head.type.d.ts +146 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +64 -34
- package/upload/vue.js +9 -5
- package/upload-dragger/index.js +22 -20
- package/upload-list/index.js +24 -18
- package/upload-list/vue.js +9 -4
- package/user/index.js +34 -25
- package/user/vue.js +1 -1
- package/user-head/index.js +3 -3
- package/watermark/index.js +11 -0
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
- package/common/deps/modal-queue.js +0 -6
- package/common/deps/requestAnimationFrame.js +0 -25
|
@@ -27,12 +27,11 @@ class TreeStore {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
filter(value) {
|
|
30
|
-
const { lazy,
|
|
30
|
+
const { lazy, filterNodeMethod } = this;
|
|
31
31
|
const walkTree = (node) => {
|
|
32
32
|
const childNodes = node.root ? node.root.childNodes : node.childNodes;
|
|
33
33
|
childNodes.forEach((child) => {
|
|
34
|
-
|
|
35
|
-
child.visible = filterNodeMethod.call(child, value, mappingData, child);
|
|
34
|
+
child.visible = filterNodeMethod.call(child, value, child.data, child);
|
|
36
35
|
walkTree(child);
|
|
37
36
|
});
|
|
38
37
|
if (!node.visible && childNodes.length) {
|
|
@@ -52,16 +51,6 @@ class TreeStore {
|
|
|
52
51
|
};
|
|
53
52
|
walkTree(this);
|
|
54
53
|
}
|
|
55
|
-
getMappingData(data) {
|
|
56
|
-
const props = this.props || {};
|
|
57
|
-
const mapping = {};
|
|
58
|
-
Object.keys(props).forEach((key) => {
|
|
59
|
-
if (hasOwn.call(props, key)) {
|
|
60
|
-
mapping[key] = data[props[key]];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
return Object.assign(data, mapping);
|
|
64
|
-
}
|
|
65
54
|
setData(newVal) {
|
|
66
55
|
if (newVal !== this.root.data) {
|
|
67
56
|
this.root.setData(newVal);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../../chunk-G2ADBYYC.js";
|
|
2
|
+
const isWindow = (val) => val === window;
|
|
3
|
+
const makeDOMRect = (width, height) => ({
|
|
4
|
+
top: 0,
|
|
5
|
+
left: 0,
|
|
6
|
+
width,
|
|
7
|
+
right: width,
|
|
8
|
+
height,
|
|
9
|
+
bottom: height
|
|
10
|
+
});
|
|
11
|
+
const useRect = (unref) => (elOrRef) => {
|
|
12
|
+
const el = unref(elOrRef);
|
|
13
|
+
if (isWindow(el)) {
|
|
14
|
+
const width = el.innerWidth;
|
|
15
|
+
const height = el.innerHeight;
|
|
16
|
+
return makeDOMRect(width, height);
|
|
17
|
+
}
|
|
18
|
+
if (el && el.getBoundingClientRect) {
|
|
19
|
+
return el.getBoundingClientRect();
|
|
20
|
+
}
|
|
21
|
+
return makeDOMRect(0, 0);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
useRect
|
|
25
|
+
};
|
|
@@ -3,16 +3,11 @@ import {
|
|
|
3
3
|
} from "../../chunk-G2ADBYYC.js";
|
|
4
4
|
import PopupManager from "./popup-manager";
|
|
5
5
|
import PopperJS from "./popper";
|
|
6
|
-
import { on } from "./dom";
|
|
6
|
+
import { on, off, isDisplayNone } from "./dom";
|
|
7
7
|
const stop = (e) => e.stopPropagation();
|
|
8
8
|
const isServer = typeof window === "undefined";
|
|
9
|
-
const getReference = ({
|
|
10
|
-
state
|
|
11
|
-
props,
|
|
12
|
-
refs,
|
|
13
|
-
slots
|
|
14
|
-
}) => {
|
|
15
|
-
let reference = state.referenceElm || props.reference || refs.reference && refs.reference.$el || refs.reference;
|
|
9
|
+
const getReference = ({ state, props, vm, slots }) => {
|
|
10
|
+
let reference = state.referenceElm || props.reference || vm.$refs.reference && vm.$refs.reference.$el || vm.$refs.reference;
|
|
16
11
|
if (!reference && slots.reference && slots.reference()[0]) {
|
|
17
12
|
state.referenceElm = slots.reference()[0].elm || slots.reference()[0].el;
|
|
18
13
|
reference = state.referenceElm;
|
|
@@ -20,7 +15,20 @@ const getReference = ({
|
|
|
20
15
|
return reference;
|
|
21
16
|
};
|
|
22
17
|
var vue_popper_default = (options) => {
|
|
23
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
parent,
|
|
20
|
+
emit,
|
|
21
|
+
nextTick,
|
|
22
|
+
onBeforeUnmount,
|
|
23
|
+
onDeactivated,
|
|
24
|
+
props,
|
|
25
|
+
watch,
|
|
26
|
+
reactive,
|
|
27
|
+
vm,
|
|
28
|
+
slots,
|
|
29
|
+
toRefs,
|
|
30
|
+
popperVmRef
|
|
31
|
+
} = options;
|
|
24
32
|
const state = reactive({
|
|
25
33
|
popperJS: null,
|
|
26
34
|
appended: false,
|
|
@@ -43,11 +51,11 @@ var vue_popper_default = (options) => {
|
|
|
43
51
|
const followHide = (popperInstance) => {
|
|
44
52
|
const { followReferenceHide = true } = (props == null ? void 0 : props.popperOptions) || {};
|
|
45
53
|
const { _popper: popper, _reference: reference } = popperInstance;
|
|
46
|
-
if (followReferenceHide &&
|
|
54
|
+
if (followReferenceHide && isDisplayNone(reference)) {
|
|
47
55
|
popper.style.display = "none";
|
|
48
56
|
}
|
|
49
57
|
};
|
|
50
|
-
const createPopper = () => {
|
|
58
|
+
const createPopper = (dom) => {
|
|
51
59
|
if (isServer) {
|
|
52
60
|
return;
|
|
53
61
|
}
|
|
@@ -55,10 +63,10 @@ var vue_popper_default = (options) => {
|
|
|
55
63
|
if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(state.currentPlacement)) {
|
|
56
64
|
return;
|
|
57
65
|
}
|
|
58
|
-
const options2 = props.popperOptions || {};
|
|
59
|
-
state.popperElm = state.popperElm || props.popper || refs.popper;
|
|
66
|
+
const options2 = props.popperOptions || { gpuAcceleration: false };
|
|
67
|
+
state.popperElm = state.popperElm || props.popper || vm.$refs.popper || popperVmRef.popper || dom;
|
|
60
68
|
const popper = state.popperElm;
|
|
61
|
-
let reference = getReference({ state, props,
|
|
69
|
+
let reference = getReference({ state, props, vm, slots });
|
|
62
70
|
if (!popper || !reference || reference.nodeType !== Node.ELEMENT_NODE) {
|
|
63
71
|
return;
|
|
64
72
|
}
|
|
@@ -75,6 +83,7 @@ var vue_popper_default = (options) => {
|
|
|
75
83
|
options2.offset = props.offset || 0;
|
|
76
84
|
options2.arrowOffset = props.arrowOffset || 0;
|
|
77
85
|
options2.adjustArrow = props.adjustArrow || false;
|
|
86
|
+
options2.appendToBody = props.appendToBody || props.popperAppendToBody;
|
|
78
87
|
state.popperJS = new PopperJS(reference, popper, options2);
|
|
79
88
|
emit("created", state);
|
|
80
89
|
if (typeof options2.onUpdate === "function") {
|
|
@@ -84,15 +93,19 @@ var vue_popper_default = (options) => {
|
|
|
84
93
|
followHide(state.popperJS);
|
|
85
94
|
on(state.popperElm, "click", stop);
|
|
86
95
|
};
|
|
87
|
-
const updatePopper = (
|
|
88
|
-
if (
|
|
89
|
-
state.popperElm =
|
|
96
|
+
const updatePopper = (popperElmOrTrue) => {
|
|
97
|
+
if (popperElmOrTrue && popperElmOrTrue !== true) {
|
|
98
|
+
state.popperElm = popperElmOrTrue;
|
|
90
99
|
}
|
|
91
100
|
const popperJS = state.popperJS;
|
|
92
101
|
if (popperJS) {
|
|
93
102
|
popperJS.update();
|
|
103
|
+
if (popperJS._popper && popperElmOrTrue !== true) {
|
|
104
|
+
popperJS._popper.style.zIndex = PopupManager.nextZIndex().toString();
|
|
105
|
+
followHide(state.popperJS);
|
|
106
|
+
}
|
|
94
107
|
} else {
|
|
95
|
-
createPopper();
|
|
108
|
+
createPopper(popperElmOrTrue && popperElmOrTrue !== true ? popperElmOrTrue : void 0);
|
|
96
109
|
}
|
|
97
110
|
};
|
|
98
111
|
const doDestroy = (forceDestroy) => {
|
|
@@ -105,6 +118,7 @@ var vue_popper_default = (options) => {
|
|
|
105
118
|
const destroyPopper = (remove) => {
|
|
106
119
|
if (remove) {
|
|
107
120
|
if (state.popperElm) {
|
|
121
|
+
off(state.popperElm, "click", stop);
|
|
108
122
|
state.popperElm.remove();
|
|
109
123
|
}
|
|
110
124
|
}
|
|
@@ -124,12 +138,16 @@ var vue_popper_default = (options) => {
|
|
|
124
138
|
onBeforeUnmount(() => {
|
|
125
139
|
nextTick(() => {
|
|
126
140
|
doDestroy(true);
|
|
127
|
-
|
|
141
|
+
if (props.appendToBody || props.popperAppendToBody) {
|
|
142
|
+
destroyPopper("remove");
|
|
143
|
+
}
|
|
128
144
|
});
|
|
129
145
|
});
|
|
130
146
|
onDeactivated(() => {
|
|
131
147
|
doDestroy(true);
|
|
132
|
-
|
|
148
|
+
if (props.appendToBody || props.popperAppendToBody) {
|
|
149
|
+
destroyPopper("remove");
|
|
150
|
+
}
|
|
133
151
|
});
|
|
134
152
|
return __spreadValues({ updatePopper, destroyPopper, doDestroy }, toRefs(state));
|
|
135
153
|
};
|
package/common/index.js
CHANGED
|
@@ -182,7 +182,7 @@ const DATEPICKER = {
|
|
|
182
182
|
queryClass: ".tiny-picker-panel__content",
|
|
183
183
|
disableClass: ".time-select-item:not(.disabled)",
|
|
184
184
|
defaultClass: ".default",
|
|
185
|
-
Qurtyli: "li",
|
|
185
|
+
Qurtyli: '[data-tag="li"]',
|
|
186
186
|
MappingKeyCode: { 40: 1, 38: -1 },
|
|
187
187
|
DatePicker: "DatePicker",
|
|
188
188
|
TimePicker: "TimePicker"
|
|
@@ -224,7 +224,7 @@ const CASCADER = {
|
|
|
224
224
|
PropsHover: "hoverThreshold",
|
|
225
225
|
MenuConnector: "cascader-menu-"
|
|
226
226
|
};
|
|
227
|
-
const version = "3.
|
|
227
|
+
const version = "3.14.0";
|
|
228
228
|
const log = (data, type = "log") => {
|
|
229
229
|
uLog.logger[type](data);
|
|
230
230
|
};
|
package/common/runtime.js
CHANGED
package/common/string.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { isPlainObject, isNumber, isNumeric, isNull } from "./type";
|
|
3
3
|
import { getObj, toJsonStr } from "./object";
|
|
4
|
-
import { toFixed } from "./decimal";
|
|
4
|
+
import { toFixed, Decimal } from "./decimal";
|
|
5
5
|
const formatTypes = {
|
|
6
6
|
text: "text",
|
|
7
7
|
url: "url",
|
|
@@ -315,7 +315,7 @@ const toBoolValue = (value) => {
|
|
|
315
315
|
}
|
|
316
316
|
return !!value;
|
|
317
317
|
};
|
|
318
|
-
const toRate = (value, total = 1, fraction = 2) => isNumber(value) && isNumber(total) ?
|
|
318
|
+
const toRate = (value, total = 1, fraction = 2) => isNumber(value) && isNumber(total) ? toDecimal(Decimal(value).mul(100).div(total).toNumber(), fraction) + "%" : value;
|
|
319
319
|
const toFileSize = (value, unit, currUnit) => {
|
|
320
320
|
if (isNumeric(value)) {
|
|
321
321
|
value = Number(value);
|
package/common/type.js
CHANGED
|
@@ -11,6 +11,7 @@ const class2type = {
|
|
|
11
11
|
"[object Date]": "date",
|
|
12
12
|
"[object Array]": "array",
|
|
13
13
|
"[object Function]": "function",
|
|
14
|
+
"[object AsyncFunction]": "asyncFunction",
|
|
14
15
|
"[object String]": "string",
|
|
15
16
|
"[object Number]": "number",
|
|
16
17
|
"[object Boolean]": "boolean"
|
|
@@ -18,7 +19,7 @@ const class2type = {
|
|
|
18
19
|
const isNull = (x) => x === null || x === void 0;
|
|
19
20
|
const typeOf = (obj) => isNull(obj) ? String(obj) : class2type[toString.call(obj)] || "object";
|
|
20
21
|
const isObject = (obj) => typeOf(obj) === "object";
|
|
21
|
-
const isFunction = (fn) => typeOf(fn)
|
|
22
|
+
const isFunction = (fn) => ["asyncFunction", "function"].includes(typeOf(fn));
|
|
22
23
|
const isPlainObject = (obj) => {
|
|
23
24
|
if (!obj || toString.call(obj) !== "[object Object]") {
|
|
24
25
|
return false;
|
|
@@ -4,7 +4,7 @@ const ENUM = "enum";
|
|
|
4
4
|
function enum_default(rule, checkValue, source, errors, options) {
|
|
5
5
|
rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
|
|
6
6
|
if (!rule[ENUM].includes(checkValue)) {
|
|
7
|
-
errors.push(util.format(options.messages[ENUM],
|
|
7
|
+
errors.push(util.format(options.messages[ENUM], "", rule[ENUM].join(", ")));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
@@ -5,12 +5,12 @@ function pattern_default(rule, checkValue, source, errors, options) {
|
|
|
5
5
|
if (rule.pattern instanceof RegExp) {
|
|
6
6
|
rule.pattern.lastIndex = 0;
|
|
7
7
|
if (!rule.pattern.test(checkValue)) {
|
|
8
|
-
errors.push(util.format(options.messages.pattern.mismatch,
|
|
8
|
+
errors.push(util.format(options.messages.pattern.mismatch, "", checkValue, rule.pattern));
|
|
9
9
|
}
|
|
10
10
|
} else if (typeof rule.pattern === "string") {
|
|
11
11
|
const _pattern = new RegExp(rule.pattern);
|
|
12
12
|
if (!_pattern.test(checkValue)) {
|
|
13
|
-
errors.push(util.format(options.messages.pattern.mismatch,
|
|
13
|
+
errors.push(util.format(options.messages.pattern.mismatch, "", checkValue, rule.pattern));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -4,11 +4,11 @@ import { isNumber } from "../../type";
|
|
|
4
4
|
import { getLength } from "../../string";
|
|
5
5
|
function getErro({ min, max, val, key, rule, errors, util: util2, options }) {
|
|
6
6
|
if (min && !max && val < rule.min) {
|
|
7
|
-
errors.push(util2.format(options.messages[key].min,
|
|
7
|
+
errors.push(util2.format(options.messages[key].min, "", rule.min));
|
|
8
8
|
} else if (max && !min && val > rule.max) {
|
|
9
|
-
errors.push(util2.format(options.messages[key].max,
|
|
9
|
+
errors.push(util2.format(options.messages[key].max, "", rule.max));
|
|
10
10
|
} else if (min && max && (val < rule.min || val > rule.max)) {
|
|
11
|
-
errors.push(util2.format(options.messages[key].range,
|
|
11
|
+
errors.push(util2.format(options.messages[key].range, "", rule.min, rule.max));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
function range_default(rule, checkValue, source, errors, options) {
|
|
@@ -17,7 +17,7 @@ function range_default(rule, checkValue, source, errors, options) {
|
|
|
17
17
|
const max = isNumber(rule.max);
|
|
18
18
|
let val = checkValue;
|
|
19
19
|
let key = null;
|
|
20
|
-
const num = isNumber(checkValue);
|
|
20
|
+
const num = isNumber(Number(checkValue));
|
|
21
21
|
const str = typeof checkValue === "string";
|
|
22
22
|
const arr = Array.isArray(checkValue);
|
|
23
23
|
if (num) {
|
|
@@ -36,9 +36,12 @@ function range_default(rule, checkValue, source, errors, options) {
|
|
|
36
36
|
if (str) {
|
|
37
37
|
val = getLength(checkValue, "string");
|
|
38
38
|
}
|
|
39
|
+
if (rule.type === "number") {
|
|
40
|
+
val = checkValue;
|
|
41
|
+
}
|
|
39
42
|
if (len) {
|
|
40
43
|
if (val !== rule.len) {
|
|
41
|
-
errors.push(util.format(options.messages[key].len,
|
|
44
|
+
errors.push(util.format(options.messages[key].len, "", rule.len));
|
|
42
45
|
}
|
|
43
46
|
} else {
|
|
44
47
|
getErro({ min, max, val, key, rule, errors, util, options });
|
|
@@ -3,7 +3,7 @@ import * as util from "../util";
|
|
|
3
3
|
import { hasOwn } from "../../type";
|
|
4
4
|
function required_default({ rule, checkValue, source, errors, options, type }) {
|
|
5
5
|
if (rule.required && (!hasOwn.call(source, rule.field) || util.isEmptyValue(checkValue, type || rule.type))) {
|
|
6
|
-
errors.push(util.format(options.messages.required,
|
|
6
|
+
errors.push(util.format(options.messages.required, ""));
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -17,11 +17,11 @@ const pattern = {
|
|
|
17
17
|
speczh: /^[0-9a-zA-Z_\u4E00-\u9FA5]+$/,
|
|
18
18
|
specialch: /^[0-9a-zA-Z_\-.]+$/,
|
|
19
19
|
specialch2: /^[0-9a-zA-Z_-]+$/,
|
|
20
|
-
url: /^([a-zA-Z]{3,})
|
|
20
|
+
url: /^(([a-zA-Z]{3,}):)?\/\/([\w-]+\.)+[\w]+(\/[a-zA-Z- ./?%&=]*)?/i,
|
|
21
21
|
version: /^\d+\.\d+(\.\d+)*$/
|
|
22
22
|
};
|
|
23
23
|
const types = {
|
|
24
|
-
integer: (value) => types.number(value) &&
|
|
24
|
+
integer: (value) => types.number(value) && /^[-]?[\d]+$/.test(value),
|
|
25
25
|
float: (value) => types.number(value) && !types.integer(value),
|
|
26
26
|
array: Array.isArray,
|
|
27
27
|
regexp(value) {
|
|
@@ -35,7 +35,7 @@ const types = {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
date: isDate,
|
|
38
|
-
number: isNumber,
|
|
38
|
+
number: (value) => isNumber(Number(value)),
|
|
39
39
|
object: (value) => isObject(value) && !types.array(value),
|
|
40
40
|
method: (value) => typeOf(value) === "function",
|
|
41
41
|
email: (value) => isNullOrEmpty(value) || !!value.match(pattern.email) && value.length < 255,
|
|
@@ -89,10 +89,10 @@ function type_default(rule, value, source, errors, options) {
|
|
|
89
89
|
const ruleType = rule.type;
|
|
90
90
|
if (custom.includes(ruleType)) {
|
|
91
91
|
if (!types[ruleType](value)) {
|
|
92
|
-
errors.push(util.format(options.messages.types[ruleType],
|
|
92
|
+
errors.push(util.format(options.messages.types[ruleType], "", rule.type));
|
|
93
93
|
}
|
|
94
94
|
} else if (ruleType && typeof value !== rule.type) {
|
|
95
|
-
errors.push(util.format(options.messages.types[ruleType],
|
|
95
|
+
errors.push(util.format(options.messages.types[ruleType], "", rule.type));
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
export {
|
|
@@ -2,7 +2,7 @@ import "../../../chunk-G2ADBYYC.js";
|
|
|
2
2
|
import * as util from "../util";
|
|
3
3
|
function whitespace_default(rule, checkValue, source, errors, options) {
|
|
4
4
|
if (/^\s+$/.test(checkValue) || checkValue === "") {
|
|
5
|
-
errors.push(util.format(options.messages.whitespace,
|
|
5
|
+
errors.push(util.format(options.messages.whitespace, ""));
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
export {
|
package/common/validate/util.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import { hasOwn, isNull } from "../type";
|
|
5
5
|
import { log } from "../xss";
|
|
6
6
|
const formatRegExp = /%[sdj%]/g;
|
|
7
|
-
|
|
7
|
+
const warning = () => void 0;
|
|
8
8
|
function convertFieldsError(errors) {
|
|
9
9
|
if (!errors || !errors.length) {
|
|
10
10
|
return null;
|
|
@@ -17,15 +17,14 @@ function convertFieldsError(errors) {
|
|
|
17
17
|
});
|
|
18
18
|
return fields;
|
|
19
19
|
}
|
|
20
|
-
function format(...
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const len = args.length;
|
|
24
|
-
if (typeof checkData === "function") {
|
|
25
|
-
return checkData.apply(null, args.slice(1));
|
|
20
|
+
function format(i18nTemplate, ...rest) {
|
|
21
|
+
if (typeof i18nTemplate === "function") {
|
|
22
|
+
return i18nTemplate(...rest);
|
|
26
23
|
}
|
|
27
|
-
if (typeof
|
|
28
|
-
let
|
|
24
|
+
if (typeof i18nTemplate === "string") {
|
|
25
|
+
let i = 0;
|
|
26
|
+
const len = rest.length;
|
|
27
|
+
let str = String(i18nTemplate).replace(formatRegExp, (matchChar) => {
|
|
29
28
|
if (matchChar === "%%") {
|
|
30
29
|
return "%";
|
|
31
30
|
}
|
|
@@ -35,21 +34,21 @@ function format(...args) {
|
|
|
35
34
|
switch (matchChar) {
|
|
36
35
|
case "%j":
|
|
37
36
|
try {
|
|
38
|
-
return JSON.stringify(
|
|
37
|
+
return JSON.stringify(rest[i++]);
|
|
39
38
|
} catch (e) {
|
|
40
39
|
return "[Circular]";
|
|
41
40
|
}
|
|
42
41
|
case "%d":
|
|
43
|
-
return Number(
|
|
42
|
+
return Number(rest[i++]);
|
|
44
43
|
case "%s":
|
|
45
|
-
return String(
|
|
44
|
+
return String(rest[i++]);
|
|
46
45
|
default:
|
|
47
46
|
return matchChar;
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
return str;
|
|
51
50
|
}
|
|
52
|
-
return
|
|
51
|
+
return i18nTemplate;
|
|
53
52
|
}
|
|
54
53
|
function isNativeStringType(type) {
|
|
55
54
|
return [
|
|
@@ -93,7 +92,7 @@ function asyncParallelArray(arrData, func, callback) {
|
|
|
93
92
|
const results = [];
|
|
94
93
|
const arrLength = arrData.length;
|
|
95
94
|
function checkCount(errors) {
|
|
96
|
-
results.push
|
|
95
|
+
results.push(...errors);
|
|
97
96
|
count++;
|
|
98
97
|
if (count === arrLength) {
|
|
99
98
|
callback(results);
|
|
@@ -124,7 +123,7 @@ function asyncSerialArray(arr, fn, cb) {
|
|
|
124
123
|
function flattenObjArr(objArr) {
|
|
125
124
|
const result = [];
|
|
126
125
|
Object.keys(objArr).forEach((item) => {
|
|
127
|
-
result.push
|
|
126
|
+
result.push(...objArr[item]);
|
|
128
127
|
});
|
|
129
128
|
return result;
|
|
130
129
|
}
|
|
@@ -153,7 +152,7 @@ function asyncMap(objArray, option, func, callback) {
|
|
|
153
152
|
const pending = new Promise((resolve, reject) => {
|
|
154
153
|
const errorFn = reject;
|
|
155
154
|
const next = (errors) => {
|
|
156
|
-
results.push
|
|
155
|
+
results.push(...errors);
|
|
157
156
|
total++;
|
|
158
157
|
if (total === objArrLength) {
|
|
159
158
|
callback(results);
|
|
@@ -10,7 +10,7 @@ function integer_default(rule, checkValue, callback, source, options) {
|
|
|
10
10
|
return callback();
|
|
11
11
|
}
|
|
12
12
|
rules.required({ rule, checkValue, source, errors, options });
|
|
13
|
-
if (void 0 !==
|
|
13
|
+
if (checkValue !== void 0 && checkValue !== "") {
|
|
14
14
|
rules.type(rule, checkValue, source, errors, options);
|
|
15
15
|
rules.range(rule, checkValue, source, errors, options);
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ function method_default(rule, checkValue, callback, source, options) {
|
|
|
10
10
|
return callback();
|
|
11
11
|
}
|
|
12
12
|
rules.required({ rule, checkValue, source, errors, options });
|
|
13
|
-
if (void 0
|
|
13
|
+
if (checkValue !== void 0) {
|
|
14
14
|
rules.type(rule, checkValue, source, errors, options);
|
|
15
15
|
}
|
|
16
16
|
}
|
package/currency/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "../chunk-G2ADBYYC.js";
|
|
2
4
|
import { isUndefined, isNull } from "../grid/static";
|
|
3
5
|
import { log } from "../common";
|
|
4
6
|
const init = ({ state, service, api }) => () => {
|
|
@@ -21,12 +23,17 @@ const initService = ({ props, service }) => {
|
|
|
21
23
|
textField: "currency_code",
|
|
22
24
|
valueField: "currency_code"
|
|
23
25
|
};
|
|
24
|
-
const {
|
|
25
|
-
const {
|
|
26
|
-
const
|
|
26
|
+
const { getCurrency, getDefaultCurrency, setDefaultCurrency } = (service == null ? void 0 : service.common) || {};
|
|
27
|
+
const { setting } = service || {};
|
|
28
|
+
const { options = {} } = setting || {};
|
|
29
|
+
const fetchCurrencyNoop = () => {
|
|
30
|
+
return Promise.resolve([]);
|
|
31
|
+
};
|
|
27
32
|
return {
|
|
28
|
-
fetchCurrency: props.fetchCurrency ||
|
|
29
|
-
fields: props.fields || options.Currency || defaultCurrencySetting
|
|
33
|
+
fetchCurrency: props.fetchCurrency || getCurrency || fetchCurrencyNoop,
|
|
34
|
+
fields: props.fields || options.Currency || defaultCurrencySetting,
|
|
35
|
+
fetchDefaultCurrency: props.fetchDefaultCurrency || getDefaultCurrency,
|
|
36
|
+
setDefaultCurrency: props.setDefaultCurrency || setDefaultCurrency
|
|
30
37
|
};
|
|
31
38
|
};
|
|
32
39
|
const fixServiceData = ({ props, service }) => (data) => {
|
|
@@ -52,9 +59,69 @@ const fixServiceData = ({ props, service }) => (data) => {
|
|
|
52
59
|
resolve(result);
|
|
53
60
|
});
|
|
54
61
|
};
|
|
62
|
+
const fetchDefaultCurrency = ({ state, props, emit, service }) => () => {
|
|
63
|
+
if (!service.fetchDefaultCurrency || !props.setDefault)
|
|
64
|
+
return;
|
|
65
|
+
const result = service.fetchDefaultCurrency();
|
|
66
|
+
if (result.then) {
|
|
67
|
+
result.then((res) => {
|
|
68
|
+
if (!res)
|
|
69
|
+
return;
|
|
70
|
+
state.defaultCurrency = res;
|
|
71
|
+
emit("update:modelValue", res);
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
state.defaultCurrency = result;
|
|
75
|
+
emit("update:modelValue", result);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const toogleDefaultCurrency = ({ state, service }) => (value, isActive) => {
|
|
79
|
+
if (!service.setDefaultCurrency)
|
|
80
|
+
return;
|
|
81
|
+
let setValue = isActive ? "" : value;
|
|
82
|
+
const result = service.setDefaultCurrency(setValue);
|
|
83
|
+
if (result.then) {
|
|
84
|
+
result.then(() => {
|
|
85
|
+
state.defaultCurrency = setValue;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const computedSearchConfig = ({ props, service }) => () => {
|
|
90
|
+
const { textField, valueField } = service.fields;
|
|
91
|
+
const { searchConfig } = props;
|
|
92
|
+
const handleOptions = (options) => {
|
|
93
|
+
return options.map((item) => ({
|
|
94
|
+
label: item[textField],
|
|
95
|
+
value: item[valueField]
|
|
96
|
+
}));
|
|
97
|
+
};
|
|
98
|
+
const searchMethod = (...args) => {
|
|
99
|
+
return new Promise((resolve) => {
|
|
100
|
+
const options = searchConfig.searchMethod(...args);
|
|
101
|
+
if (typeof options.then === "function") {
|
|
102
|
+
options.then((result) => resolve(handleOptions(result)));
|
|
103
|
+
} else {
|
|
104
|
+
resolve(handleOptions(options));
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const config = __spreadValues({}, props.searchConfig);
|
|
109
|
+
if (searchConfig && searchConfig.searchMethod) {
|
|
110
|
+
config.searchMethod = searchMethod;
|
|
111
|
+
}
|
|
112
|
+
return config;
|
|
113
|
+
};
|
|
114
|
+
const visibleChange = (emit) => (value) => {
|
|
115
|
+
emit("update:visible", value);
|
|
116
|
+
emit("visible-change", value);
|
|
117
|
+
};
|
|
55
118
|
export {
|
|
56
119
|
change,
|
|
120
|
+
computedSearchConfig,
|
|
121
|
+
fetchDefaultCurrency,
|
|
57
122
|
fixServiceData,
|
|
58
123
|
init,
|
|
59
|
-
initService
|
|
124
|
+
initService,
|
|
125
|
+
toogleDefaultCurrency,
|
|
126
|
+
visibleChange
|
|
60
127
|
};
|
package/currency/vue.js
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
init,
|
|
4
|
+
fixServiceData,
|
|
5
|
+
change,
|
|
6
|
+
initService,
|
|
7
|
+
fetchDefaultCurrency,
|
|
8
|
+
toogleDefaultCurrency,
|
|
9
|
+
computedSearchConfig,
|
|
10
|
+
visibleChange
|
|
11
|
+
} from "./index";
|
|
12
|
+
const api = ["state", "change", "toogleDefaultCurrency", "visibleChange"];
|
|
13
|
+
const renderless = (props, { watch, reactive, computed }, { service, emit }) => {
|
|
5
14
|
const api2 = {};
|
|
6
15
|
const $service = initService({ props, service });
|
|
7
16
|
const state = reactive({
|
|
8
17
|
options: [],
|
|
9
|
-
selectedValue: props.modelValue
|
|
18
|
+
selectedValue: props.modelValue,
|
|
19
|
+
defaultCurrency: "",
|
|
20
|
+
searchConfig: computed(() => api2.computedSearchConfig())
|
|
10
21
|
});
|
|
11
22
|
Object.assign(api2, {
|
|
12
23
|
state,
|
|
13
24
|
change: change(emit),
|
|
25
|
+
visibleChange: visibleChange(emit),
|
|
14
26
|
fixServiceData: fixServiceData({ props, service: $service }),
|
|
15
|
-
init: init({ state, service: $service, api: api2 })
|
|
27
|
+
init: init({ state, service: $service, api: api2 }),
|
|
28
|
+
fetchDefaultCurrency: fetchDefaultCurrency({ state, props, emit, service: $service }),
|
|
29
|
+
toogleDefaultCurrency: toogleDefaultCurrency({ state, props, service: $service }),
|
|
30
|
+
computedSearchConfig: computedSearchConfig({ props, service: $service })
|
|
16
31
|
});
|
|
17
32
|
watch(
|
|
18
33
|
() => props.modelValue,
|
|
@@ -22,6 +37,7 @@ const renderless = (props, { watch, reactive }, { service, emit }) => {
|
|
|
22
37
|
{ immediate: true }
|
|
23
38
|
);
|
|
24
39
|
api2.init();
|
|
40
|
+
api2.fetchDefaultCurrency();
|
|
25
41
|
return api2;
|
|
26
42
|
};
|
|
27
43
|
export {
|
package/date-panel/index.js
CHANGED
|
@@ -199,6 +199,20 @@ const handleYearPick = ({ api, state }) => (value) => {
|
|
|
199
199
|
state.currentView = DATEPICKER.Month;
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
+
const getDisabledNow = ({ state }) => () => {
|
|
203
|
+
let disabledDate = state.disabledDate;
|
|
204
|
+
if (!disabledDate)
|
|
205
|
+
return false;
|
|
206
|
+
return disabledDate(/* @__PURE__ */ new Date());
|
|
207
|
+
};
|
|
208
|
+
const getDisabledConfirm = ({ state }) => () => {
|
|
209
|
+
let disabledDate = state.disabledDate;
|
|
210
|
+
if (!disabledDate)
|
|
211
|
+
return false;
|
|
212
|
+
if (!state.value)
|
|
213
|
+
return true;
|
|
214
|
+
return disabledDate(state.value);
|
|
215
|
+
};
|
|
202
216
|
const dateToLocaleStringForIE = (timezone, value) => {
|
|
203
217
|
const localTimezone = getLocalTimezone();
|
|
204
218
|
const offsetTimezone = timezone - localTimezone;
|
|
@@ -426,6 +440,8 @@ export {
|
|
|
426
440
|
debounceChange,
|
|
427
441
|
doPick,
|
|
428
442
|
getDefaultValue,
|
|
443
|
+
getDisabledConfirm,
|
|
444
|
+
getDisabledNow,
|
|
429
445
|
getRenderTz,
|
|
430
446
|
getYearLabel,
|
|
431
447
|
handleClear,
|