@opentiny/vue-renderless 3.28.1 → 3.29.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/alert/vue.js +4 -1
- package/base-select/index.js +6 -3
- package/base-select/vue.js +1 -1
- package/date-range/index.js +1 -1
- package/dialog-box/vue.js +4 -1
- package/dialog-select/index.js +1 -1
- package/drawer/index.js +6 -0
- package/drawer/vue.js +3 -1
- package/fluent-editor/index.js +72 -4
- package/fluent-editor/vue.js +3 -1
- package/form-item/index.js +1 -1
- package/form-item/vue.js +11 -1
- package/grid-select/index.js +3 -3
- package/guide/index.js +17 -11
- package/guide/vue.js +2 -1
- package/input/vue.js +1 -1
- package/modal/index.js +11 -11
- package/modal/vue.js +3 -0
- package/notify/vue.js +4 -1
- package/package.json +3 -3
- package/picker/vue.js +3 -2
- package/qr-code/vue.js +3 -1
- package/rate/index.js +3 -1
- package/search/vue.js +6 -1
- package/select/index.js +6 -3
- package/select/vue.js +5 -4
- package/statistic/index.js +48 -1
- package/statistic/vue.js +31 -11
- package/tag-group/index.js +3 -0
- package/tag-input/index.js +91 -0
- package/tag-input/vue.js +72 -0
- package/time/index.js +22 -0
- package/time/vue.js +14 -2
- package/types/alert.type.d.ts +2 -0
- package/types/button-group.type.d.ts +5 -0
- package/types/date-picker.type.d.ts +1 -1
- package/types/dialog-box.type.d.ts +2 -0
- package/types/drawer.type.d.ts +2 -0
- package/types/{dropdown-item.type-b3ced3ce.d.ts → dropdown-item.type-f83b014f.d.ts} +1 -1
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-a54e1c06.d.ts → form.type-e0db2f7c.d.ts} +9 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +1 -1
- package/types/modal.type.d.ts +2 -0
- package/types/popeditor.type.d.ts +2 -2
- package/types/popover.type.d.ts +1 -1
- package/types/rate.type.d.ts +4 -0
- package/types/search.type.d.ts +1 -0
- package/types/statistic.type.d.ts +17 -1
- package/types/tag-input.type.d.ts +113 -0
- package/types/transfer.type.d.ts +3 -3
- package/types/tree-menu.type.d.ts +1 -1
- package/types/upload-dragger.type.d.ts +1 -1
- package/types/{upload-list.type-36a8374a.d.ts → upload-list.type-d5ff675d.d.ts} +1 -1
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
package/select/vue.js
CHANGED
|
@@ -116,10 +116,10 @@ import {
|
|
|
116
116
|
computedCurrentSizeMap,
|
|
117
117
|
watchOptionsWhenAutoSelect
|
|
118
118
|
} from "./index";
|
|
119
|
-
import { debounce
|
|
119
|
+
import { debounce } from "@opentiny/utils";
|
|
120
120
|
import { isNumber } from "@opentiny/utils";
|
|
121
121
|
import { useUserAgent } from "@opentiny/vue-hooks";
|
|
122
|
-
import { isServer } from "@opentiny/utils";
|
|
122
|
+
import { isServer, nanoid } from "@opentiny/utils";
|
|
123
123
|
const api = [
|
|
124
124
|
"state",
|
|
125
125
|
"nodeCollapse",
|
|
@@ -288,7 +288,8 @@ const initState = ({
|
|
|
288
288
|
currentSizeMap: computed(() => api2.computedCurrentSizeMap()),
|
|
289
289
|
rootAutoTipConfig: computed(() => __spreadValues({
|
|
290
290
|
content: state.displayOnlyContent,
|
|
291
|
-
always: !!state.displayOnlyContent
|
|
291
|
+
always: !!state.displayOnlyContent,
|
|
292
|
+
popperClass: "tiny-select__popper-maxh-50"
|
|
292
293
|
}, props.tooltipConfig)),
|
|
293
294
|
ariaListId: "tiny-select-" + nanoid.api.nanoid(8)
|
|
294
295
|
}));
|
|
@@ -506,7 +507,7 @@ const addApi = ({
|
|
|
506
507
|
debouncRquest: debouncRquest({ api: api2, state, props }),
|
|
507
508
|
defaultOnQueryChange: defaultOnQueryChange({ props, state, constants, api: api2, nextTick, vm }),
|
|
508
509
|
queryChange: queryChange({ props, state, constants, api: api2, nextTick, vm }),
|
|
509
|
-
mounted: mounted({ api: api2, parent, state, props, vm, designConfig }),
|
|
510
|
+
mounted: mounted({ api: api2, parent, state, props, vm, designConfig, nextTick }),
|
|
510
511
|
unMount: unMount({ api: api2, parent, vm, state }),
|
|
511
512
|
watchOptimizeOpts: watchOptimizeOpts({ props, state }),
|
|
512
513
|
handleDropdownClick: handleDropdownClick({ props, vm, state, emit }),
|
package/statistic/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const getIntegerAndDecimal = ({ props }) => () => {
|
|
|
8
8
|
if (isFunction(props.formatter)) {
|
|
9
9
|
return props.formatter(props.value);
|
|
10
10
|
}
|
|
11
|
-
if (
|
|
11
|
+
if (typeof props.value !== "number") {
|
|
12
12
|
return props.value;
|
|
13
13
|
}
|
|
14
14
|
let displayValue = String(props.value).split(".");
|
|
@@ -26,7 +26,54 @@ const getIntegerAndDecimal = ({ props }) => () => {
|
|
|
26
26
|
}
|
|
27
27
|
return [integer, decimal].join(decimal ? "." : "");
|
|
28
28
|
};
|
|
29
|
+
const animateValue = ({ props, state }) => () => {
|
|
30
|
+
if (!props.useAnimation)
|
|
31
|
+
return;
|
|
32
|
+
let AnimationId = null;
|
|
33
|
+
const start = props.startValue;
|
|
34
|
+
const end = Number(props.value);
|
|
35
|
+
const duration = props.duration;
|
|
36
|
+
if (Number.isNaN(end)) {
|
|
37
|
+
state.animatingValue = props.value;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const startTime = performance.now();
|
|
41
|
+
const cancel = () => {
|
|
42
|
+
if (AnimationId) {
|
|
43
|
+
cancelAnimationFrame(AnimationId);
|
|
44
|
+
AnimationId = null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
if (AnimationId) {
|
|
48
|
+
cancel();
|
|
49
|
+
}
|
|
50
|
+
const getDecimalPlaces = (num) => {
|
|
51
|
+
if (Math.floor(num) === num)
|
|
52
|
+
return 0;
|
|
53
|
+
const decimalPart = num.toString().split(".")[1];
|
|
54
|
+
return decimalPart ? decimalPart.length : 0;
|
|
55
|
+
};
|
|
56
|
+
const decimalPlaces = getDecimalPlaces(end);
|
|
57
|
+
const multiplier = 10 ** decimalPlaces;
|
|
58
|
+
const animate = (currentTime) => {
|
|
59
|
+
const elapsed = currentTime - startTime;
|
|
60
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
61
|
+
const easeOutExpo = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t);
|
|
62
|
+
const current = start + (end - start) * easeOutExpo(progress);
|
|
63
|
+
state.animatingValue = Math.round(current * multiplier) / multiplier;
|
|
64
|
+
if (progress < 1) {
|
|
65
|
+
AnimationId = requestAnimationFrame(animate);
|
|
66
|
+
} else {
|
|
67
|
+
state.animatingValue = end;
|
|
68
|
+
AnimationId = null;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
AnimationId = requestAnimationFrame(() => {
|
|
72
|
+
AnimationId = requestAnimationFrame(animate);
|
|
73
|
+
});
|
|
74
|
+
};
|
|
29
75
|
export {
|
|
76
|
+
animateValue,
|
|
30
77
|
getIntegerAndDecimal,
|
|
31
78
|
isNumber
|
|
32
79
|
};
|
package/statistic/vue.js
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../chunk-G2ADBYYC.js";
|
|
5
|
+
import { getIntegerAndDecimal, animateValue } from "./index";
|
|
6
|
+
const api = ["state", "getIntegerAndDecimal", "animateValue"];
|
|
4
7
|
const renderless = (props, hooks) => {
|
|
5
|
-
const
|
|
6
|
-
getIntegerAndDecimal: getIntegerAndDecimal({ props })
|
|
7
|
-
};
|
|
8
|
-
const { reactive, computed } = hooks;
|
|
8
|
+
const { reactive, computed, watch } = hooks;
|
|
9
9
|
const state = reactive({
|
|
10
|
-
value: computed(() => api2.getIntegerAndDecimal(props))
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
value: computed(() => api2.getIntegerAndDecimal(props)),
|
|
11
|
+
animatingValue: props.value,
|
|
12
|
+
displayValue: computed(() => {
|
|
13
|
+
if (props.useAnimation) {
|
|
14
|
+
const tempProps = __spreadProps(__spreadValues({}, props), { value: state.animatingValue });
|
|
15
|
+
return getIntegerAndDecimal({ props: tempProps })();
|
|
16
|
+
}
|
|
17
|
+
return state.value;
|
|
18
|
+
})
|
|
14
19
|
});
|
|
20
|
+
const api2 = {
|
|
21
|
+
state,
|
|
22
|
+
getIntegerAndDecimal: getIntegerAndDecimal({ props }),
|
|
23
|
+
animateValue: animateValue({ props, state })
|
|
24
|
+
};
|
|
25
|
+
watch(
|
|
26
|
+
() => props.value,
|
|
27
|
+
(newVal) => {
|
|
28
|
+
if (props.useAnimation) {
|
|
29
|
+
state.animatingValue = props.startValue;
|
|
30
|
+
api2.animateValue();
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{ immediate: true }
|
|
34
|
+
);
|
|
15
35
|
return api2;
|
|
16
36
|
};
|
|
17
37
|
export {
|
package/tag-group/index.js
CHANGED
|
@@ -26,6 +26,9 @@ const getHiddenTags = ({ props, vm, state }) => () => {
|
|
|
26
26
|
Array.from(tags).forEach((el, index) => {
|
|
27
27
|
const item = props.data[index];
|
|
28
28
|
const element = el;
|
|
29
|
+
if (element.offsetHeight === 0) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
29
32
|
if (element.offsetTop >= element.offsetHeight && item) {
|
|
30
33
|
state.hiddenTags.push(__spreadValues({}, item));
|
|
31
34
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
const addTag = ({ emit, props, state }) => () => {
|
|
3
|
+
const value = state.currentValue.trim();
|
|
4
|
+
if (!value) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
if (state.tagList.length >= props.max) {
|
|
8
|
+
state.currentValue = "";
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const tags = [...state.tagList || []];
|
|
12
|
+
let newTags = [value];
|
|
13
|
+
if (props.separator !== void 0) {
|
|
14
|
+
newTags = value.split(props.separator).filter((val) => val);
|
|
15
|
+
}
|
|
16
|
+
tags.push(...newTags);
|
|
17
|
+
state.tagList = tags;
|
|
18
|
+
emit("update:modelValue", tags);
|
|
19
|
+
state.currentValue = "";
|
|
20
|
+
};
|
|
21
|
+
const removeTag = ({ emit, props, state }) => (index) => {
|
|
22
|
+
state.tagList.splice(index, 1);
|
|
23
|
+
emit("update:modelValue", state.tagList);
|
|
24
|
+
};
|
|
25
|
+
const handleBackspace = ({ emit, props, state }) => () => {
|
|
26
|
+
if (state.currentValue === "") {
|
|
27
|
+
state.tagList.pop();
|
|
28
|
+
emit("update:modelValue", state.tagList);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const handleClear = ({ emit, props, state }) => () => {
|
|
32
|
+
state.tagList = [];
|
|
33
|
+
emit("update:modelValue", state.tagList);
|
|
34
|
+
state.currentValue = "";
|
|
35
|
+
};
|
|
36
|
+
const handleMouseOver = ({ state }) => (event) => {
|
|
37
|
+
state.isHovering = true;
|
|
38
|
+
};
|
|
39
|
+
const handleMouseLeave = ({ state }) => () => {
|
|
40
|
+
state.isHovering = false;
|
|
41
|
+
};
|
|
42
|
+
const handleInputFocus = ({ state }) => () => {
|
|
43
|
+
state.isFocused = true;
|
|
44
|
+
};
|
|
45
|
+
const handleInputBlur = ({ state }) => () => {
|
|
46
|
+
state.isFocused = false;
|
|
47
|
+
};
|
|
48
|
+
const handleDragStart = ({ state }) => (index, event) => {
|
|
49
|
+
var _a;
|
|
50
|
+
state.draggingIndex = index;
|
|
51
|
+
if (event.target) {
|
|
52
|
+
(_a = event.dataTransfer) == null ? void 0 : _a.setData("text/plain", event.target);
|
|
53
|
+
event.dataTransfer.effectAllowed = "move";
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const handleDragOver = () => (index, event) => {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
event.dataTransfer.dropEffect = "move";
|
|
59
|
+
};
|
|
60
|
+
const handleDragEnter = ({ state, emit }) => (index, event) => {
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
if (index === state.draggingIndex)
|
|
63
|
+
return;
|
|
64
|
+
state.dragTargetIndex = index;
|
|
65
|
+
};
|
|
66
|
+
const handleDrop = ({ emit, props, state }) => (index, event) => {
|
|
67
|
+
var _a;
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
const newTags = [...(_a = state.tagList) != null ? _a : []];
|
|
70
|
+
const draggingTag = newTags[state.draggingIndex];
|
|
71
|
+
newTags.splice(state.draggingIndex, 1);
|
|
72
|
+
newTags.splice(state.dragTargetIndex, 0, draggingTag);
|
|
73
|
+
state.draggingIndex = null;
|
|
74
|
+
state.dragTargetIndex = null;
|
|
75
|
+
state.tagList = newTags;
|
|
76
|
+
emit("update:modelValue", newTags);
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
addTag,
|
|
80
|
+
handleBackspace,
|
|
81
|
+
handleClear,
|
|
82
|
+
handleDragEnter,
|
|
83
|
+
handleDragOver,
|
|
84
|
+
handleDragStart,
|
|
85
|
+
handleDrop,
|
|
86
|
+
handleInputBlur,
|
|
87
|
+
handleInputFocus,
|
|
88
|
+
handleMouseLeave,
|
|
89
|
+
handleMouseOver,
|
|
90
|
+
removeTag
|
|
91
|
+
};
|
package/tag-input/vue.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import {
|
|
3
|
+
addTag,
|
|
4
|
+
removeTag,
|
|
5
|
+
handleBackspace,
|
|
6
|
+
handleClear,
|
|
7
|
+
handleMouseLeave,
|
|
8
|
+
handleMouseOver,
|
|
9
|
+
handleInputFocus,
|
|
10
|
+
handleInputBlur,
|
|
11
|
+
handleDragEnter,
|
|
12
|
+
handleDragStart,
|
|
13
|
+
handleDragOver,
|
|
14
|
+
handleDrop
|
|
15
|
+
} from "./index";
|
|
16
|
+
const api = [
|
|
17
|
+
"addTag",
|
|
18
|
+
"removeTag",
|
|
19
|
+
"state",
|
|
20
|
+
"handleBackspace",
|
|
21
|
+
"handleClear",
|
|
22
|
+
"handleMouseLeave",
|
|
23
|
+
"handleMouseOver",
|
|
24
|
+
"handleInputFocus",
|
|
25
|
+
"handleInputBlur",
|
|
26
|
+
"handleDragStart",
|
|
27
|
+
"handleDragOver",
|
|
28
|
+
"handleDragEnter",
|
|
29
|
+
"handleDrop"
|
|
30
|
+
];
|
|
31
|
+
const renderless = (props, { reactive, computed, ref }, { emit, parent }) => {
|
|
32
|
+
const state = reactive({
|
|
33
|
+
currentValue: "",
|
|
34
|
+
tagList: props.modelValue || [],
|
|
35
|
+
disabled: computed(() => props.disabled),
|
|
36
|
+
closeable: computed(() => !props.readonly && !props.disabled),
|
|
37
|
+
showClearIcon: computed(() => {
|
|
38
|
+
return props.clearable && !props.readonly && !props.disabled && (state.isHovering || state.isFocused) && ((props.modelValue || []).length > 0 || state.currentValue);
|
|
39
|
+
}),
|
|
40
|
+
showTagList: computed(() => {
|
|
41
|
+
const limit = props.minCollapsedNum < props.max ? props.minCollapsedNum : props.max;
|
|
42
|
+
return (state.tagList || []).slice(0, limit);
|
|
43
|
+
}),
|
|
44
|
+
collapsedTagList: computed(() => {
|
|
45
|
+
return props.minCollapsedNum < props.max ? (state.tagList || []).slice(props.minCollapsedNum) : [];
|
|
46
|
+
}),
|
|
47
|
+
isHovering: false,
|
|
48
|
+
isFocused: false,
|
|
49
|
+
draggingIndex: null,
|
|
50
|
+
dragTargetIndex: null
|
|
51
|
+
});
|
|
52
|
+
const api2 = {
|
|
53
|
+
state,
|
|
54
|
+
addTag: addTag({ emit, props, state }),
|
|
55
|
+
removeTag: removeTag({ emit, props, state }),
|
|
56
|
+
handleBackspace: handleBackspace({ emit, props, state }),
|
|
57
|
+
handleClear: handleClear({ emit, props, state }),
|
|
58
|
+
handleMouseLeave: handleMouseLeave({ state }),
|
|
59
|
+
handleMouseOver: handleMouseOver({ state }),
|
|
60
|
+
handleInputBlur: handleInputBlur({ state }),
|
|
61
|
+
handleInputFocus: handleInputFocus({ state }),
|
|
62
|
+
handleDragStart: handleDragStart({ emit, props, state }),
|
|
63
|
+
handleDragOver: handleDragOver(),
|
|
64
|
+
handleDragEnter: handleDragEnter({ emit, state }),
|
|
65
|
+
handleDrop: handleDrop({ emit, props, state })
|
|
66
|
+
};
|
|
67
|
+
return api2;
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
api,
|
|
71
|
+
renderless
|
|
72
|
+
};
|
package/time/index.js
CHANGED
|
@@ -19,11 +19,32 @@ const watchVisible = ({ nextTick, vm, state, api }) => (value) => {
|
|
|
19
19
|
state.oldValue = state.value;
|
|
20
20
|
vm.$refs.spinner.emitSelectRange("hours");
|
|
21
21
|
api.adjustSpinners();
|
|
22
|
+
api.adjustPosition();
|
|
22
23
|
});
|
|
23
24
|
} else {
|
|
24
25
|
state.needInitAdjust = true;
|
|
25
26
|
}
|
|
26
27
|
};
|
|
28
|
+
const adjustPosition = ({ vm, state }) => () => {
|
|
29
|
+
const panel = vm.$el;
|
|
30
|
+
if (!panel)
|
|
31
|
+
return;
|
|
32
|
+
const parentElement = panel.parentElement;
|
|
33
|
+
if (!parentElement)
|
|
34
|
+
return;
|
|
35
|
+
const parentRect = parentElement.getBoundingClientRect();
|
|
36
|
+
const viewportWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
37
|
+
const panelWidth = panel.offsetWidth || 240;
|
|
38
|
+
const wouldOverflowRight = parentRect.left + panelWidth > viewportWidth;
|
|
39
|
+
const wouldOverflowLeft = parentRect.right - panelWidth < 0;
|
|
40
|
+
if (wouldOverflowRight && !wouldOverflowLeft) {
|
|
41
|
+
state.alignDirection = "right";
|
|
42
|
+
} else if (wouldOverflowLeft && !wouldOverflowRight) {
|
|
43
|
+
state.alignDirection = "left";
|
|
44
|
+
} else {
|
|
45
|
+
state.alignDirection = "";
|
|
46
|
+
}
|
|
47
|
+
};
|
|
27
48
|
const handleCancel = ({ state, emit }) => () => {
|
|
28
49
|
emit("pick", state.oldValue, false);
|
|
29
50
|
};
|
|
@@ -75,6 +96,7 @@ const displayValue = ({ state, t }) => () => {
|
|
|
75
96
|
return formattedValue;
|
|
76
97
|
};
|
|
77
98
|
export {
|
|
99
|
+
adjustPosition,
|
|
78
100
|
adjustSpinners,
|
|
79
101
|
changeSelectionRange,
|
|
80
102
|
displayValue,
|
package/time/vue.js
CHANGED
|
@@ -10,11 +10,20 @@ import {
|
|
|
10
10
|
handleChange,
|
|
11
11
|
setSelectionRange,
|
|
12
12
|
displayValue,
|
|
13
|
-
handleConfirm
|
|
13
|
+
handleConfirm,
|
|
14
|
+
adjustPosition
|
|
14
15
|
} from "./index";
|
|
15
16
|
import { compuAmPmMode } from "../time-range";
|
|
16
17
|
import { isDate1 as isDate } from "@opentiny/utils";
|
|
17
|
-
const api = [
|
|
18
|
+
const api = [
|
|
19
|
+
"state",
|
|
20
|
+
"handleChange",
|
|
21
|
+
"setSelectionRange",
|
|
22
|
+
"handleCancel",
|
|
23
|
+
"handleConfirm",
|
|
24
|
+
"adjustSpinners",
|
|
25
|
+
"adjustPosition"
|
|
26
|
+
];
|
|
18
27
|
const initState = ({ reactive, props, computed, api: api2 }) => {
|
|
19
28
|
const state = reactive({
|
|
20
29
|
popperClass: "",
|
|
@@ -30,6 +39,8 @@ const initState = ({ reactive, props, computed, api: api2 }) => {
|
|
|
30
39
|
visible: false,
|
|
31
40
|
showTimePickerButton: false,
|
|
32
41
|
needInitAdjust: true,
|
|
42
|
+
alignDirection: "",
|
|
43
|
+
// 对齐方向: 'left', 'right', 或 '' (默认)
|
|
33
44
|
displayValue: computed(() => api2.displayValue()),
|
|
34
45
|
showSeconds: computed(() => (state.format || "").includes("ss")),
|
|
35
46
|
useArrow: computed(() => state.arrowControl || props.timeArrowControl || false),
|
|
@@ -48,6 +59,7 @@ const renderless = (props, { computed, onMounted, reactive, watch, nextTick }, {
|
|
|
48
59
|
state,
|
|
49
60
|
compuAmPmMode: compuAmPmMode(state),
|
|
50
61
|
adjustSpinners: adjustSpinners(vm),
|
|
62
|
+
adjustPosition: adjustPosition({ vm, state }),
|
|
51
63
|
handleCancel: handleCancel({ state, emit }),
|
|
52
64
|
setSelectionRange: setSelectionRange({ state, emit }),
|
|
53
65
|
watchVisible: watchVisible({ nextTick, vm, state, api: api2 }),
|
package/types/alert.type.d.ts
CHANGED
|
@@ -113,6 +113,8 @@ interface IAlertState {
|
|
|
113
113
|
contentDefaultHeight: number;
|
|
114
114
|
contentMaxHeight: number;
|
|
115
115
|
scrollStatus: boolean;
|
|
116
|
+
titleId: string;
|
|
117
|
+
contentId: string;
|
|
116
118
|
}
|
|
117
119
|
type IAlertProps = ExtractPropTypes<typeof alertProps>;
|
|
118
120
|
type IAlertConstants = typeof $constants;
|
|
@@ -33,6 +33,11 @@ declare const buttonGroupProps: {
|
|
|
33
33
|
type: BooleanConstructor;
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
|
+
displayMode: {
|
|
37
|
+
type: PropType<"default" | "merged">;
|
|
38
|
+
default: string;
|
|
39
|
+
validator: (val: string) => boolean;
|
|
40
|
+
};
|
|
36
41
|
tiny_mode: StringConstructor;
|
|
37
42
|
tiny_mode_root: BooleanConstructor;
|
|
38
43
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -120,7 +120,7 @@ declare const datePickerProps: {
|
|
|
120
120
|
underlay: {
|
|
121
121
|
type: ObjectConstructor;
|
|
122
122
|
};
|
|
123
|
-
}, () =>
|
|
123
|
+
}, () => _opentiny_vue_common.VNode<vue.RendererNode, vue.RendererElement, {
|
|
124
124
|
[key: string]: any;
|
|
125
125
|
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<_opentiny_vue_common.ExtractPropTypes<{
|
|
126
126
|
shape: {
|
package/types/drawer.type.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ declare const computedWidth: ({ state, designConfig, props, constants }: Pick<ID
|
|
|
80
80
|
declare const close: ({ api }: {
|
|
81
81
|
api: IDrawerApi;
|
|
82
82
|
}) => (force?: boolean) => void;
|
|
83
|
+
declare const closed: ({ state, emit }: Pick<IDrawerRenderlessParams, 'state' | 'emit'>) => () => void;
|
|
83
84
|
declare const watchVisible: ({ state, api }: Pick<IDrawerRenderlessParams, 'state' | 'api'>) => (value: boolean) => void;
|
|
84
85
|
declare const open: ({ state, emit, vm }: Pick<IDrawerRenderlessParams, 'state' | 'emit' | 'vm'>) => () => void;
|
|
85
86
|
declare const confirm: ({ api }: {
|
|
@@ -124,6 +125,7 @@ interface IDrawerApi {
|
|
|
124
125
|
open: ReturnType<typeof open>;
|
|
125
126
|
confirm: ReturnType<typeof confirm>;
|
|
126
127
|
close: ReturnType<typeof close>;
|
|
128
|
+
closed: ReturnType<typeof closed>;
|
|
127
129
|
mousemove: ReturnType<typeof mousemove>;
|
|
128
130
|
mouseup: ReturnType<typeof mouseup>;
|
|
129
131
|
mousedown: ReturnType<typeof mousedown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { k as IDropdownItemApi, i as IDropdownItemConstants, q as IDropdownItemMfDataStore, p as IDropdownItemOptionStyle, h as IDropdownItemProps, m as IDropdownItemRenderlessParamUtils, l as IDropdownItemRenderlessParams, j as IDropdownItemState, n as IDropdownItemStyle, o as IDropdownItemTag, g as IDropdownItemVm } from './dropdown-item.type-
|
|
2
|
+
export { k as IDropdownItemApi, i as IDropdownItemConstants, q as IDropdownItemMfDataStore, p as IDropdownItemOptionStyle, h as IDropdownItemProps, m as IDropdownItemRenderlessParamUtils, l as IDropdownItemRenderlessParams, j as IDropdownItemState, n as IDropdownItemStyle, o as IDropdownItemTag, g as IDropdownItemVm } from './dropdown-item.type-f83b014f.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import './dropdown.type.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { b as IDropdownMenuApi, e as IDropdownMenuPopperParams, I as IDropdownMenuProps, d as IDropdownMenuRenderlessParamUtils, c as IDropdownMenuRenderlessParams, a as IDropdownMenuState, f as IDropdownMenuVm } from './dropdown-item.type-
|
|
2
|
+
export { b as IDropdownMenuApi, e as IDropdownMenuPopperParams, I as IDropdownMenuProps, d as IDropdownMenuRenderlessParamUtils, c as IDropdownMenuRenderlessParams, a as IDropdownMenuState, f as IDropdownMenuVm } from './dropdown-item.type-f83b014f.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import './dropdown.type.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-
|
|
2
|
+
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-d5ff675d.js';
|
|
3
3
|
import './shared.type.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-
|
|
2
|
+
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-e0db2f7c.js';
|
|
3
3
|
import './shared.type.js';
|
|
@@ -137,6 +137,10 @@ declare const formItemProps: {
|
|
|
137
137
|
};
|
|
138
138
|
messageType: StringConstructor;
|
|
139
139
|
label: StringConstructor;
|
|
140
|
+
labelLine: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: number;
|
|
143
|
+
};
|
|
140
144
|
labelWidth: StringConstructor;
|
|
141
145
|
manual: BooleanConstructor;
|
|
142
146
|
popperOptions: {
|
|
@@ -293,6 +297,10 @@ interface IFormItemState {
|
|
|
293
297
|
isErrorBlock: boolean;
|
|
294
298
|
tooltipType: string;
|
|
295
299
|
isMultiple: boolean;
|
|
300
|
+
errorId: string;
|
|
301
|
+
labelId: string;
|
|
302
|
+
disabled?: boolean;
|
|
303
|
+
inlineMessage?: boolean | string;
|
|
296
304
|
}
|
|
297
305
|
type IFormItemConstants = typeof $constants;
|
|
298
306
|
type IFormItemProps = ExtractPropTypes<typeof formItemProps>;
|
|
@@ -332,6 +340,7 @@ interface IFormItemApi {
|
|
|
332
340
|
onFieldChange: ReturnType<typeof onFieldChange>;
|
|
333
341
|
addValidateEvents: ReturnType<typeof addValidateEvents>;
|
|
334
342
|
validate: ReturnType<typeof validate$1>;
|
|
343
|
+
validateOrigin: ReturnType<typeof validate$1>;
|
|
335
344
|
getDisplayedValue: ReturnType<typeof getDisplayedValue>;
|
|
336
345
|
clearDisplayedValue: ReturnType<typeof clearDisplayedValue>;
|
|
337
346
|
handleMouseenter: ReturnType<typeof handleMouseenter>;
|
package/types/form.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-
|
|
2
|
+
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-e0db2f7c.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/input.type.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ declare const calculateNodeStyling: () => (targetElement: HTMLElement) => {
|
|
|
248
248
|
borderSize: number;
|
|
249
249
|
boxSizing: string;
|
|
250
250
|
};
|
|
251
|
-
declare const calcTextareaHeight: ({ api, hiddenTextarea, props, state, mode, constants }: Pick<IInputRenderlessParams, "
|
|
251
|
+
declare const calcTextareaHeight: ({ api, hiddenTextarea, props, state, mode, constants }: Pick<IInputRenderlessParams, "state" | "props" | "mode" | "api" | "constants"> & {
|
|
252
252
|
hiddenTextarea: HTMLTextAreaElement | null;
|
|
253
253
|
}) => (targetElement: HTMLTextAreaElement, minRows?: number, maxRows?: null) => {
|
|
254
254
|
minHeight?: string | undefined;
|
package/types/modal.type.d.ts
CHANGED
|
@@ -190,6 +190,8 @@ interface IModalState {
|
|
|
190
190
|
prevEvent: null | Event;
|
|
191
191
|
options: any[];
|
|
192
192
|
theme: string | undefined;
|
|
193
|
+
titleId: string;
|
|
194
|
+
contentId: string;
|
|
193
195
|
}
|
|
194
196
|
type IModalProps = ExtractPropTypes<typeof modalProps>;
|
|
195
197
|
type IModalConstants = typeof $constants;
|
|
@@ -94,7 +94,7 @@ declare const popeditorProps: {
|
|
|
94
94
|
underlay: {
|
|
95
95
|
type: ObjectConstructor;
|
|
96
96
|
};
|
|
97
|
-
}, () =>
|
|
97
|
+
}, () => _opentiny_vue_common.VNode<vue.RendererNode, vue.RendererElement, {
|
|
98
98
|
[key: string]: any;
|
|
99
99
|
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<_opentiny_vue_common.ExtractPropTypes<{
|
|
100
100
|
shape: {
|
|
@@ -136,7 +136,7 @@ declare const popeditorProps: {
|
|
|
136
136
|
underlay: {
|
|
137
137
|
type: ObjectConstructor;
|
|
138
138
|
};
|
|
139
|
-
}, () =>
|
|
139
|
+
}, () => _opentiny_vue_common.VNode<vue.RendererNode, vue.RendererElement, {
|
|
140
140
|
[key: string]: any;
|
|
141
141
|
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<_opentiny_vue_common.ExtractPropTypes<{
|
|
142
142
|
shape: {
|
package/types/popover.type.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ declare const popoverProps: {
|
|
|
93
93
|
*
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
|
-
declare const mounted: ({ api, state, constants, props, nextTick, mode }: Pick<IPopoverRenderlessParams, "
|
|
96
|
+
declare const mounted: ({ api, state, constants, props, nextTick, mode }: Pick<IPopoverRenderlessParams, "state" | "props" | "nextTick" | "mode" | "api"> & {
|
|
97
97
|
constants: {
|
|
98
98
|
IDPREFIX: string;
|
|
99
99
|
};
|
package/types/rate.type.d.ts
CHANGED
|
@@ -99,6 +99,10 @@ declare const rateProps: {
|
|
|
99
99
|
type: StringConstructor;
|
|
100
100
|
default: string;
|
|
101
101
|
};
|
|
102
|
+
clearable: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
102
106
|
tiny_mode: StringConstructor;
|
|
103
107
|
tiny_mode_root: BooleanConstructor;
|
|
104
108
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
package/types/search.type.d.ts
CHANGED
|
@@ -100,6 +100,7 @@ interface ISearchState {
|
|
|
100
100
|
showClear: boolean;
|
|
101
101
|
formItemSize: string;
|
|
102
102
|
searchSize: string;
|
|
103
|
+
instanceId: string;
|
|
103
104
|
}
|
|
104
105
|
type ISearchProps = ExtractPropTypes<typeof searchProps>;
|
|
105
106
|
type ISearchRenderlessParams = ISharedRenderlessFunctionParams<never> & {
|
|
@@ -27,6 +27,18 @@ declare const statisticProps: {
|
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
default: string;
|
|
29
29
|
};
|
|
30
|
+
duration: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
startValue: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
useAnimation: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
30
42
|
tiny_mode: StringConstructor;
|
|
31
43
|
tiny_mode_root: BooleanConstructor;
|
|
32
44
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -39,10 +51,14 @@ declare const statisticProps: {
|
|
|
39
51
|
type IStatisticProps = ExtractPropTypes<typeof statisticProps>;
|
|
40
52
|
type IStatisticConstants = typeof $constants;
|
|
41
53
|
interface IStatisticState {
|
|
42
|
-
|
|
54
|
+
value: string | number;
|
|
55
|
+
animatingValue: number | string;
|
|
56
|
+
IStatisticState: number | string;
|
|
43
57
|
}
|
|
44
58
|
interface IStatisticApi {
|
|
59
|
+
state: IStatisticState;
|
|
45
60
|
getIntegerAndDecimal: (value: string | number) => string | undefined;
|
|
61
|
+
animateValue: () => void;
|
|
46
62
|
}
|
|
47
63
|
type IStatisticPcRenderlessParams = ISharedRenderlessFunctionParams<never> & {
|
|
48
64
|
state: IStatisticState;
|