@cedar-design/ui-vue 1.1.0 → 1.1.1
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/es/_components/field-presentation/EditorPanel.vue.mjs +1 -1
- package/es/_components/field-presentation/editor-pending.mjs +4 -0
- package/es/_components/field-presentation/with-field-presentation.mjs +33 -7
- package/es/_components/picker-field/PickerField.vue.mjs +6 -12
- package/es/_components/picker-field/range-labels.mjs +16 -0
- package/es/_components/selected-options/style/index.css +33 -15
- package/es/_components/selection-field/use-selection-session.mjs +1 -0
- package/es/_components/virtual-list-v2/VirtualList2.vue.mjs +21 -3
- package/es/_utils/modal-focus.mjs +9 -2
- package/es/_utils/modal-surface.mjs +9 -3
- package/es/anchor/style/index.css +1 -1
- package/es/auto-complete/auto-complete.mjs +2 -2
- package/es/auto-complete/presentation.mjs +1 -0
- package/es/auto-complete/props.mjs +2 -0
- package/es/auto-complete/style/index.css +7 -2
- package/es/back-top/style/index.css +1 -1
- package/es/button/base.mjs +6 -0
- package/es/button/index.mjs +8 -8
- package/es/button/style/index.css +1 -1
- package/es/card/Card.vue.mjs +46 -12
- package/es/carousel/style/index.css +1 -1
- package/es/cascader/CascaderMenu.vue.mjs +2 -2
- package/es/cascader/cascader-option.mjs +11 -6
- package/es/cascader/field-adapter.mjs +1 -0
- package/es/cascader/props.mjs +2 -0
- package/es/cascader/style/index.css +36 -9
- package/es/cascader/use-cascader-focus.mjs +9 -6
- package/es/cedar.css +187 -79
- package/es/cedar.esm.js +21694 -21413
- package/es/checkbox/base.mjs +6 -0
- package/es/checkbox/checkbox-group.vue.mjs +2 -2
- package/es/checkbox/index.mjs +1 -1
- package/es/checkbox/presentation.mjs +2 -2
- package/es/checkbox/style/index.css +1 -1
- package/es/countdown/use-countdown.mjs +7 -2
- package/es/date/DatePanelActions.vue.mjs +1 -1
- package/es/date/DateShortcuts.vue.mjs +1 -1
- package/es/date/picker/panels/Footer2.vue.mjs +1 -1
- package/es/date/picker/panels/Shortcuts2.vue.mjs +1 -1
- package/es/date/picker/style/index.css +1 -1
- package/es/dialog/Dialog.vue.mjs +1 -1
- package/es/ellipsis/style/index.css +1 -1
- package/es/form/FormItem2.vue.mjs +35 -7
- package/es/form/FormItemLabel.vue.mjs +4 -3
- package/es/form/focus-explicit-label.mjs +28 -0
- package/es/form/style/index.css +1 -1
- package/es/input/base.mjs +7 -0
- package/es/input/index.mjs +16 -16
- package/es/layout/style/index.css +1 -1
- package/es/nav-menu/style/index.css +1 -1
- package/es/pagination/PageInput.vue.mjs +2 -2
- package/es/pagination/style/index.css +2 -2
- package/es/people-select/PeopleSelect.mjs +23 -50
- package/es/people-select/Person.vue.mjs +1 -1
- package/es/people-select/emits.mjs +1 -1
- package/es/people-select/people-select.mjs +6 -8
- package/es/people-select/presentation.mjs +3 -1
- package/es/people-select/props.mjs +9 -3
- package/es/people-select/selection.mjs +43 -0
- package/es/people-select/style/index.css +6 -0
- package/es/progress/style/index.css +2 -2
- package/es/radio/style/index.css +1 -1
- package/es/rate/style/index.css +1 -1
- package/es/ripple/index.mjs +57 -1
- package/es/scheduler/style/index.css +1 -1
- package/es/search/HistoryContent.vue.mjs +3 -3
- package/es/search/props.mjs +0 -1
- package/es/search/search.vue.mjs +1 -1
- package/es/select/props.mjs +2 -0
- package/es/select/select.mjs +10 -4
- package/es/select/style/index.css +22 -12
- package/es/select/use-select-controller.mjs +14 -2
- package/es/slider/Slider.vue.mjs +39 -21
- package/es/slider/SliderInput.vue.mjs +4 -2
- package/es/slider/style/index.css +2 -2
- package/es/steps/style/index.css +10 -10
- package/es/switch/Switch.vue.mjs +6 -1
- package/es/switch/style/index.css +1 -1
- package/es/table/structural-slot.mjs +17 -0
- package/es/table/style/index.css +2 -2
- package/es/table/table-tbody.mjs +2 -1
- package/es/table/table-td.mjs +3 -2
- package/es/table/table-th.mjs +3 -2
- package/es/table/table-thead.mjs +2 -1
- package/es/table/table-tr.mjs +3 -2
- package/es/table/table.mjs +22 -5
- package/es/tabs/style/index.css +1 -1
- package/es/time/picker/Panel2.vue.mjs +1 -1
- package/es/time/picker/RangePanel2.vue.mjs +1 -1
- package/es/tree/style/index.css +1 -1
- package/es/tree-select/panel.mjs +3 -1
- package/es/tree-select/presentation.mjs +1 -0
- package/es/tree-select/props.mjs +2 -0
- package/es/tree-select/style/index.css +49 -7
- package/es/trigger/interaction.mjs +1 -1
- package/es/trigger/popup-move-focus.mjs +6 -6
- package/es/trigger/position.mjs +41 -3
- package/es/trigger/positioner.mjs +28 -5
- package/es/trigger/trigger.mjs +1 -1
- package/es/upload/composables/use-upload-queue.mjs +9 -1
- package/es/upload/composables/use-uploader.mjs +31 -11
- package/es/upload/upload.vue.mjs +10 -2
- package/lib/_components/field-presentation/EditorPanel.vue.js +3 -3
- package/lib/_components/field-presentation/editor-pending.js +4 -0
- package/lib/_components/field-presentation/with-field-presentation.js +32 -6
- package/lib/_components/picker-field/PickerField.vue.js +6 -12
- package/lib/_components/picker-field/range-labels.js +16 -0
- package/lib/_components/selected-options/style/index.css +33 -15
- package/lib/_components/selection-field/use-selection-session.js +1 -0
- package/lib/_components/virtual-list-v2/VirtualList2.vue.js +20 -2
- package/lib/_utils/modal-focus.js +9 -2
- package/lib/_utils/modal-surface.js +9 -3
- package/lib/anchor/style/index.css +1 -1
- package/lib/auto-complete/auto-complete.js +2 -2
- package/lib/auto-complete/presentation.js +1 -0
- package/lib/auto-complete/props.js +2 -0
- package/lib/auto-complete/style/index.css +7 -2
- package/lib/back-top/style/index.css +1 -1
- package/lib/button/base.js +6 -0
- package/lib/button/index.js +4 -4
- package/lib/button/style/index.css +1 -1
- package/lib/card/Card.vue.js +47 -13
- package/lib/carousel/style/index.css +1 -1
- package/lib/cascader/CascaderMenu.vue.js +2 -2
- package/lib/cascader/cascader-option.js +11 -6
- package/lib/cascader/field-adapter.js +1 -0
- package/lib/cascader/props.js +2 -0
- package/lib/cascader/style/index.css +36 -9
- package/lib/cascader/use-cascader-focus.js +9 -6
- package/lib/cedar.cjs.js +1149 -738
- package/lib/cedar.css +187 -79
- package/lib/checkbox/base.js +6 -0
- package/lib/checkbox/index.js +4 -4
- package/lib/checkbox/presentation.js +2 -2
- package/lib/checkbox/style/index.css +1 -1
- package/lib/countdown/use-countdown.js +7 -2
- package/lib/date/DatePanelActions.vue.js +3 -3
- package/lib/date/DateShortcuts.vue.js +2 -2
- package/lib/date/picker/panels/Footer2.vue.js +2 -2
- package/lib/date/picker/panels/Shortcuts2.vue.js +2 -2
- package/lib/date/picker/style/index.css +1 -1
- package/lib/dialog/Dialog.vue.js +3 -3
- package/lib/ellipsis/style/index.css +1 -1
- package/lib/form/FormItem2.vue.js +35 -7
- package/lib/form/FormItemLabel.vue.js +3 -2
- package/lib/form/focus-explicit-label.js +28 -0
- package/lib/form/style/index.css +1 -1
- package/lib/input/base.js +7 -0
- package/lib/input/index.js +4 -4
- package/lib/layout/style/index.css +1 -1
- package/lib/nav-menu/style/index.css +1 -1
- package/lib/pagination/PageInput.vue.js +2 -2
- package/lib/pagination/style/index.css +2 -2
- package/lib/people-select/PeopleSelect.js +22 -49
- package/lib/people-select/Person.vue.js +3 -3
- package/lib/people-select/emits.js +1 -1
- package/lib/people-select/people-select.js +6 -8
- package/lib/people-select/presentation.js +3 -1
- package/lib/people-select/props.js +9 -3
- package/lib/people-select/selection.js +43 -0
- package/lib/people-select/style/index.css +6 -0
- package/lib/progress/style/index.css +2 -2
- package/lib/radio/style/index.css +1 -1
- package/lib/rate/style/index.css +1 -1
- package/lib/ripple/index.js +57 -1
- package/lib/scheduler/style/index.css +1 -1
- package/lib/search/HistoryContent.vue.js +4 -4
- package/lib/search/props.js +0 -1
- package/lib/search/search.vue.js +2 -2
- package/lib/select/props.js +2 -0
- package/lib/select/select.js +10 -4
- package/lib/select/style/index.css +22 -12
- package/lib/select/use-select-controller.js +14 -2
- package/lib/slider/Slider.vue.js +38 -20
- package/lib/slider/SliderInput.vue.js +4 -2
- package/lib/slider/style/index.css +2 -2
- package/lib/steps/style/index.css +10 -10
- package/lib/switch/Switch.vue.js +5 -0
- package/lib/switch/style/index.css +1 -1
- package/lib/table/structural-slot.js +17 -0
- package/lib/table/style/index.css +2 -2
- package/lib/table/table-tbody.js +2 -1
- package/lib/table/table-td.js +3 -2
- package/lib/table/table-th.js +3 -2
- package/lib/table/table-thead.js +2 -1
- package/lib/table/table-tr.js +3 -2
- package/lib/table/table.js +21 -4
- package/lib/tabs/style/index.css +1 -1
- package/lib/time/picker/Panel2.vue.js +2 -2
- package/lib/time/picker/RangePanel2.vue.js +2 -2
- package/lib/tree/style/index.css +1 -1
- package/lib/tree-select/panel.js +3 -1
- package/lib/tree-select/presentation.js +1 -0
- package/lib/tree-select/props.js +2 -0
- package/lib/tree-select/style/index.css +49 -7
- package/lib/trigger/popup-move-focus.js +6 -6
- package/lib/trigger/position.js +40 -2
- package/lib/trigger/positioner.js +27 -4
- package/lib/trigger/trigger.js +1 -1
- package/lib/upload/composables/use-upload-queue.js +9 -1
- package/lib/upload/composables/use-uploader.js +31 -11
- package/lib/upload/upload.vue.js +9 -1
- package/package.json +6 -6
- package/types/_components/field-presentation/editor-pending.d.ts +3 -0
- package/types/_components/field-presentation/with-field-presentation.d.ts +2 -0
- package/types/_components/picker-field/range-labels.d.ts +1 -0
- package/types/_utils/modal-focus.d.ts +1 -0
- package/types/auto-complete/auto-complete.d.ts +9 -0
- package/types/auto-complete/index.d.ts +30 -0
- package/types/auto-complete/presentation.d.ts +9 -0
- package/types/auto-complete/props.d.ts +5 -0
- package/types/button/base.d.ts +266 -0
- package/types/button/index.d.ts +5 -1
- package/types/cascader/Cascader.vue.d.ts +9 -0
- package/types/cascader/index.d.ts +30 -0
- package/types/cascader/presentation.d.ts +15 -0
- package/types/cascader/props.d.ts +5 -0
- package/types/cascader/use-cascader-controller.d.ts +4 -0
- package/types/checkbox/base.d.ts +361 -0
- package/types/checkbox/index.d.ts +5 -1
- package/types/date/picker/DateRangePicker.vue.d.ts +12 -496
- package/types/date/picker/DateRangePickerPanel.vue.d.ts +12 -496
- package/types/date/picker/Picker.vue.d.ts +12 -496
- package/types/date/picker/PickerPanel.vue.d.ts +12 -496
- package/types/date/picker/panels/Footer.vue.d.ts +3 -124
- package/types/date/picker/panels/Shortcuts.vue.d.ts +3 -124
- package/types/date/picker/panels/date/Index.vue.d.ts +3 -124
- package/types/date/picker/panels/week/Index.vue.d.ts +3 -124
- package/types/form/FormItemLabel.vue.d.ts +2 -2
- package/types/form/context.d.ts +1 -1
- package/types/form/focus-explicit-label.d.ts +2 -0
- package/types/input/base.d.ts +481 -0
- package/types/input/index.d.ts +5 -1
- package/types/people-select/PeopleSelect.d.ts +38 -16
- package/types/people-select/emits.d.ts +3 -2
- package/types/people-select/index.d.ts +135 -63
- package/types/people-select/people-select.d.ts +47 -16
- package/types/people-select/presentation.d.ts +46 -16
- package/types/people-select/props.d.ts +17 -6
- package/types/people-select/selection.d.ts +11 -0
- package/types/people-select/types.d.ts +5 -1
- package/types/popconfirm/Popconfirm.vue.d.ts +2 -0
- package/types/popconfirm/index.d.ts +8 -0
- package/types/select/index.d.ts +30 -0
- package/types/select/native-editor-owner.d.ts +1 -0
- package/types/select/props.d.ts +5 -0
- package/types/select/select.d.ts +9 -0
- package/types/select/use-select-controller.d.ts +5 -0
- package/types/slider/SliderInput.vue.d.ts +4 -0
- package/types/table/structural-slot.d.ts +3 -0
- package/types/table/table-operation-td.d.ts +2 -0
- package/types/time/picker/Panel.vue.d.ts +3 -124
- package/types/time/picker/RangePanel.vue.d.ts +6 -248
- package/types/time/presentation/TimePanelContent.vue.d.ts +9 -372
- package/types/transfer/Transfer.vue.d.ts +4 -0
- package/types/transfer/TransferView.vue.d.ts +2 -0
- package/types/transfer/index.d.ts +16 -0
- package/types/transfer/presentation.d.ts +4 -0
- package/types/tree/BaseNode.vue.d.ts +2 -0
- package/types/tree/TransitionNodeList.vue.d.ts +2 -0
- package/types/tree-select/TreeSelect.vue.d.ts +13 -0
- package/types/tree-select/index.d.ts +50 -0
- package/types/tree-select/presentation.d.ts +13 -0
- package/types/tree-select/props.d.ts +5 -0
- package/types/trigger/position.d.ts +1 -0
- package/types/typography/EditContent.vue.d.ts +6 -0
- package/types/upload/composables/use-upload-queue.d.ts +1 -0
- package/types/upload/composables/use-uploader.d.ts +2 -0
- package/types/upload/upload.vue.d.ts +3 -3
- package/umd/_components/selected-options/style/index.css +33 -15
- package/umd/anchor/style/index.css +1 -1
- package/umd/auto-complete/style/index.css +7 -2
- package/umd/back-top/style/index.css +1 -1
- package/umd/button/style/index.css +1 -1
- package/umd/carousel/style/index.css +1 -1
- package/umd/cascader/style/index.css +36 -9
- package/umd/cedar.css +187 -79
- package/umd/cedar.js +6 -6
- package/umd/checkbox/style/index.css +1 -1
- package/umd/date/picker/style/index.css +1 -1
- package/umd/ellipsis/style/index.css +1 -1
- package/umd/form/style/index.css +1 -1
- package/umd/layout/style/index.css +1 -1
- package/umd/nav-menu/style/index.css +1 -1
- package/umd/pagination/style/index.css +2 -2
- package/umd/people-select/style/index.css +6 -0
- package/umd/progress/style/index.css +2 -2
- package/umd/radio/style/index.css +1 -1
- package/umd/rate/style/index.css +1 -1
- package/umd/scheduler/style/index.css +1 -1
- package/umd/select/style/index.css +22 -12
- package/umd/slider/style/index.css +2 -2
- package/umd/steps/style/index.css +10 -10
- package/umd/switch/style/index.css +1 -1
- package/umd/table/style/index.css +2 -2
- package/umd/tabs/style/index.css +1 -1
- package/umd/tree/style/index.css +1 -1
- package/umd/tree-select/style/index.css +49 -7
|
@@ -9,9 +9,11 @@ function rafThrottle(callback, ownerView) {
|
|
|
9
9
|
let frame;
|
|
10
10
|
let frameView;
|
|
11
11
|
let latest;
|
|
12
|
+
let latestTarget;
|
|
12
13
|
let generation = 0;
|
|
13
14
|
const run = (event) => {
|
|
14
15
|
latest = event;
|
|
16
|
+
latestTarget = event?.currentTarget ?? event?.target;
|
|
15
17
|
if (frame !== void 0) {
|
|
16
18
|
return;
|
|
17
19
|
}
|
|
@@ -29,8 +31,10 @@ function rafThrottle(callback, ownerView) {
|
|
|
29
31
|
frame = void 0;
|
|
30
32
|
frameView = void 0;
|
|
31
33
|
const currentEvent = latest;
|
|
34
|
+
const currentTarget = latestTarget;
|
|
32
35
|
latest = void 0;
|
|
33
|
-
|
|
36
|
+
latestTarget = void 0;
|
|
37
|
+
callback(currentEvent, currentTarget);
|
|
34
38
|
});
|
|
35
39
|
};
|
|
36
40
|
run.cancel = () => {
|
|
@@ -41,6 +45,7 @@ function rafThrottle(callback, ownerView) {
|
|
|
41
45
|
frame = void 0;
|
|
42
46
|
frameView = void 0;
|
|
43
47
|
latest = void 0;
|
|
48
|
+
latestTarget = void 0;
|
|
44
49
|
};
|
|
45
50
|
return run;
|
|
46
51
|
}
|
|
@@ -56,6 +61,7 @@ function useTriggerPositioner(options, context) {
|
|
|
56
61
|
let scrollPositions = /* @__PURE__ */ new WeakMap();
|
|
57
62
|
let windowPositions = /* @__PURE__ */ new WeakMap();
|
|
58
63
|
let scrollViews = [];
|
|
64
|
+
let slotRoots = [];
|
|
59
65
|
function update() {
|
|
60
66
|
const reference = context.reference.value;
|
|
61
67
|
const popup = context.popup.value;
|
|
@@ -144,10 +150,10 @@ function useTriggerPositioner(options, context) {
|
|
|
144
150
|
}
|
|
145
151
|
}
|
|
146
152
|
const scrolling = rafThrottle(
|
|
147
|
-
(
|
|
153
|
+
(_event, eventTarget) => {
|
|
148
154
|
const shouldClose = options.scrollToClose || context.globalScrollToClose.value;
|
|
149
|
-
if (shouldClose &&
|
|
150
|
-
const target =
|
|
155
|
+
if (shouldClose && eventTarget) {
|
|
156
|
+
const target = eventTarget;
|
|
151
157
|
const previous = scrollPositions.get(target) ?? [
|
|
152
158
|
target.scrollTop,
|
|
153
159
|
target.scrollLeft
|
|
@@ -192,11 +198,26 @@ function useTriggerPositioner(options, context) {
|
|
|
192
198
|
for (const element of scrollElements)
|
|
193
199
|
element.removeEventListener("scroll", scrolling);
|
|
194
200
|
for (const view of scrollViews) view.removeEventListener("scroll", onWindowScroll);
|
|
201
|
+
for (const slot of slotRoots) slot.removeEventListener("slotchange", onSlotChange);
|
|
202
|
+
slotRoots = [];
|
|
195
203
|
scrollViews = [];
|
|
196
204
|
scrollElements = [];
|
|
197
205
|
scrollPositions = /* @__PURE__ */ new WeakMap();
|
|
198
206
|
windowPositions = /* @__PURE__ */ new WeakMap();
|
|
199
207
|
}
|
|
208
|
+
function onSlotChange() {
|
|
209
|
+
positionGeneration++;
|
|
210
|
+
const reference = context.reference.value;
|
|
211
|
+
const popup = context.popup.value;
|
|
212
|
+
const nextElements = [.../* @__PURE__ */ new Set([...position.getScrollElements(reference), ...position.getScrollElements(popup)])];
|
|
213
|
+
const nextViews = [.../* @__PURE__ */ new Set([...position.getScrollViews(reference), ...position.getScrollViews(popup)])];
|
|
214
|
+
const nextRoots = [.../* @__PURE__ */ new Set([...position.getSlotChangeRoots(reference), ...position.getSlotChangeRoots(popup)])];
|
|
215
|
+
function changed(before, after) {
|
|
216
|
+
return before.length !== after.length || before.some((item, index) => item !== after[index]);
|
|
217
|
+
}
|
|
218
|
+
if (changed(scrollElements, nextElements) || changed(scrollViews, nextViews) || changed(slotRoots, nextRoots)) bindScroll();
|
|
219
|
+
vue.nextTick(update);
|
|
220
|
+
}
|
|
200
221
|
function bindScroll() {
|
|
201
222
|
unbindScroll();
|
|
202
223
|
const reference = context.reference.value;
|
|
@@ -204,6 +225,8 @@ function useTriggerPositioner(options, context) {
|
|
|
204
225
|
const active = options.updateAtScroll || options.scrollToClose || context.globalUpdateAtScroll.value || context.globalScrollToClose.value;
|
|
205
226
|
if (!active || !reference || !popup || !context.visible.value || suspended)
|
|
206
227
|
return;
|
|
228
|
+
slotRoots = [.../* @__PURE__ */ new Set([...position.getSlotChangeRoots(reference), ...position.getSlotChangeRoots(popup)])];
|
|
229
|
+
for (const slot of slotRoots) slot.addEventListener("slotchange", onSlotChange);
|
|
207
230
|
scrollElements = [
|
|
208
231
|
.../* @__PURE__ */ new Set([
|
|
209
232
|
...position.getScrollElements(reference),
|
package/lib/trigger/trigger.js
CHANGED
|
@@ -146,7 +146,7 @@ const _Trigger = /* @__PURE__ */ vue.defineComponent({
|
|
|
146
146
|
});
|
|
147
147
|
return () => {
|
|
148
148
|
const referenceNodes = mergeFirstReferenceClass(slots.default?.() ?? [], visible.value ? props2.openedClass : void 0);
|
|
149
|
-
const contentNodes = slots.content?.() ?? [];
|
|
149
|
+
const contentNodes = renderState.rendered.value ? slots.content?.() ?? [] : [];
|
|
150
150
|
const hiddenByEmpty = props2.hideEmpty && isEmptyContent(contentNodes);
|
|
151
151
|
nodes.value = referenceNodes;
|
|
152
152
|
return vue.createVNode(vue.Fragment, null, [referenceNodes, vue.createVNode(vue.Teleport, {
|
|
@@ -4,10 +4,13 @@ const vue = require("vue");
|
|
|
4
4
|
function useUploadQueue(options) {
|
|
5
5
|
const inner = vue.ref((options.defaultValue?.() ?? []).map((file) => ({ ...file })));
|
|
6
6
|
const fileList = vue.computed(() => options.modelValue?.() ?? inner.value);
|
|
7
|
+
let revision = 0;
|
|
7
8
|
let pending;
|
|
8
9
|
let pendingBase;
|
|
9
10
|
const mutationList = () => pending && fileList.value === pendingBase ? pending : fileList.value;
|
|
10
11
|
function commit(next, changed) {
|
|
12
|
+
const currentRevision = ++revision;
|
|
13
|
+
const startedActive = options.isActive?.() ?? true;
|
|
11
14
|
pendingBase = fileList.value;
|
|
12
15
|
pending = next;
|
|
13
16
|
if (options.modelValue?.() === void 0) inner.value = next;
|
|
@@ -18,7 +21,7 @@ function useUploadQueue(options) {
|
|
|
18
21
|
}
|
|
19
22
|
});
|
|
20
23
|
options.onUpdateModelValue?.(next);
|
|
21
|
-
options.onChange?.(next, changed);
|
|
24
|
+
if (revision === currentRevision && (!startedActive || (options.isActive?.() ?? true))) options.onChange?.(next, changed);
|
|
22
25
|
}
|
|
23
26
|
function append(files) {
|
|
24
27
|
if (files.length) commit([...mutationList(), ...files], files[0]);
|
|
@@ -57,6 +60,11 @@ function useUploadQueue(options) {
|
|
|
57
60
|
}
|
|
58
61
|
function reset() {
|
|
59
62
|
if (fileList.value.length) commit([]);
|
|
63
|
+
else {
|
|
64
|
+
revision++;
|
|
65
|
+
pending = void 0;
|
|
66
|
+
pendingBase = void 0;
|
|
67
|
+
}
|
|
60
68
|
}
|
|
61
69
|
return {
|
|
62
70
|
fileList,
|
|
@@ -11,6 +11,7 @@ const useFilePicker = require("./use-file-picker.js");
|
|
|
11
11
|
const useUploadQueue = require("./use-upload-queue.js");
|
|
12
12
|
function useUploader(options) {
|
|
13
13
|
const feedback = usePendingFeedback.usePendingFeedback();
|
|
14
|
+
const preparation = usePendingFeedback.usePendingFeedback();
|
|
14
15
|
let active = true;
|
|
15
16
|
let inactive = false;
|
|
16
17
|
let generation = 0;
|
|
@@ -28,7 +29,8 @@ function useUploader(options) {
|
|
|
28
29
|
modelValue: options.modelValue,
|
|
29
30
|
defaultValue: options.defaultValue,
|
|
30
31
|
onChange: options.onChange,
|
|
31
|
-
onUpdateModelValue: options.onUpdateModelValue
|
|
32
|
+
onUpdateModelValue: options.onUpdateModelValue,
|
|
33
|
+
isActive: () => active && !inactive
|
|
32
34
|
});
|
|
33
35
|
const replacementTarget = vue.ref();
|
|
34
36
|
const metadataVersion = vue.ref(0);
|
|
@@ -166,8 +168,8 @@ function useUploader(options) {
|
|
|
166
168
|
}
|
|
167
169
|
function enqueue(files, rejected, previous) {
|
|
168
170
|
const epoch = generation;
|
|
169
|
-
adding = adding.then(() => prepareFiles(files, rejected, epoch, previous)).catch(() => {
|
|
170
|
-
});
|
|
171
|
+
adding = preparation.track(() => adding.then(() => prepareFiles(files, rejected, epoch, previous)).catch(() => {
|
|
172
|
+
}));
|
|
171
173
|
return adding;
|
|
172
174
|
}
|
|
173
175
|
async function prepareFiles(files, initialRejected, epoch, previous) {
|
|
@@ -179,7 +181,9 @@ function useUploader(options) {
|
|
|
179
181
|
candidates = await feedback.track(() => options.beforeAdd(files));
|
|
180
182
|
for (const file of files) if (!candidates.includes(file)) rejected.push({ file, reason: "before-add" });
|
|
181
183
|
} catch {
|
|
182
|
-
|
|
184
|
+
if (valid(epoch)) {
|
|
185
|
+
reject([...rejected, ...files.map((file) => ({ file, reason: "before-add" }))]);
|
|
186
|
+
}
|
|
183
187
|
return;
|
|
184
188
|
}
|
|
185
189
|
}
|
|
@@ -250,7 +254,15 @@ function useUploader(options) {
|
|
|
250
254
|
return;
|
|
251
255
|
}
|
|
252
256
|
reject(rejected);
|
|
257
|
+
if (!valid(epoch)) {
|
|
258
|
+
items.forEach((item) => release(item.uid));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
253
261
|
if (rejected.some((file) => file.reason === "max-files")) options.onExceed?.(candidates, queue.fileList.value);
|
|
262
|
+
if (!valid(epoch)) {
|
|
263
|
+
items.forEach((item) => release(item.uid));
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
254
266
|
if (!items.length) return;
|
|
255
267
|
if (previous) {
|
|
256
268
|
if (!sameTarget(previous)) {
|
|
@@ -270,9 +282,13 @@ function useUploader(options) {
|
|
|
270
282
|
items.forEach((file) => pendingAuto.add(file.uid));
|
|
271
283
|
if (previous) {
|
|
272
284
|
queue.replace(previous, items[0]);
|
|
285
|
+
if (!valid(epoch)) return;
|
|
273
286
|
options.onReplace?.(items[0], previous);
|
|
274
287
|
} else queue.append(items);
|
|
275
|
-
|
|
288
|
+
for (const file of items) {
|
|
289
|
+
if (!valid(epoch)) return;
|
|
290
|
+
options.onRead?.(vue.reactive(file));
|
|
291
|
+
}
|
|
276
292
|
await vue.nextTick();
|
|
277
293
|
}
|
|
278
294
|
async function submit(file) {
|
|
@@ -282,6 +298,7 @@ function useUploader(options) {
|
|
|
282
298
|
}
|
|
283
299
|
async function uploadFile(file) {
|
|
284
300
|
if (attempts.has(file.uid)) return;
|
|
301
|
+
const epoch = generation;
|
|
285
302
|
const attempt = {};
|
|
286
303
|
attempts.set(file.uid, attempt);
|
|
287
304
|
const current = () => active && !inactive && attempts.get(file.uid) === attempt && queue.fileList.value.some(
|
|
@@ -332,7 +349,7 @@ function useUploader(options) {
|
|
|
332
349
|
status: changed.status,
|
|
333
350
|
percent: changed.percent
|
|
334
351
|
});
|
|
335
|
-
options.onProgress?.(changed, event);
|
|
352
|
+
if (valid(epoch) && current()) options.onProgress?.(changed, event);
|
|
336
353
|
};
|
|
337
354
|
const handleSuccess = (response) => {
|
|
338
355
|
if (!current()) return;
|
|
@@ -348,7 +365,7 @@ function useUploader(options) {
|
|
|
348
365
|
percent: changed.percent,
|
|
349
366
|
response
|
|
350
367
|
});
|
|
351
|
-
options.onSuccess?.(changed);
|
|
368
|
+
if (valid(epoch)) options.onSuccess?.(changed);
|
|
352
369
|
};
|
|
353
370
|
const handleError = (error) => {
|
|
354
371
|
if (!current()) return;
|
|
@@ -364,7 +381,7 @@ function useUploader(options) {
|
|
|
364
381
|
percent: changed.percent,
|
|
365
382
|
error
|
|
366
383
|
});
|
|
367
|
-
options.onError?.(changed);
|
|
384
|
+
if (valid(epoch)) options.onError?.(changed);
|
|
368
385
|
};
|
|
369
386
|
const requestOptions = {
|
|
370
387
|
action: options.action?.(),
|
|
@@ -394,7 +411,7 @@ function useUploader(options) {
|
|
|
394
411
|
attempts.delete(file.uid);
|
|
395
412
|
const changed = { ...item, status: "error", percent: 0, error };
|
|
396
413
|
queue.patch(file.uid, changed);
|
|
397
|
-
options.onError?.(changed);
|
|
414
|
+
if (valid(epoch)) options.onError?.(changed);
|
|
398
415
|
}
|
|
399
416
|
}
|
|
400
417
|
function abort(file) {
|
|
@@ -423,7 +440,7 @@ function useUploader(options) {
|
|
|
423
440
|
cancelAttempt(file.uid);
|
|
424
441
|
pendingAuto.delete(file.uid);
|
|
425
442
|
queue.remove(file);
|
|
426
|
-
options.onRemove?.(file);
|
|
443
|
+
if (valid(epoch)) options.onRemove?.(file);
|
|
427
444
|
} catch {
|
|
428
445
|
} finally {
|
|
429
446
|
if (removals.get(file.uid) === token) removals.delete(file.uid);
|
|
@@ -446,8 +463,9 @@ function useUploader(options) {
|
|
|
446
463
|
});
|
|
447
464
|
}
|
|
448
465
|
function reset() {
|
|
449
|
-
feedback.cancel();
|
|
450
466
|
if (disabled.value) return;
|
|
467
|
+
feedback.cancel();
|
|
468
|
+
preparation.cancel();
|
|
451
469
|
generation++;
|
|
452
470
|
replacementTarget.value = void 0;
|
|
453
471
|
adding = Promise.resolve();
|
|
@@ -488,6 +506,8 @@ function useUploader(options) {
|
|
|
488
506
|
});
|
|
489
507
|
return {
|
|
490
508
|
guardPending: feedback.pending,
|
|
509
|
+
/** @internal Coordinates deferred field confirmation with file preparation. */
|
|
510
|
+
editorPending: vue.computed(() => feedback.pending.value || preparation.pending.value),
|
|
491
511
|
fileList: queue.fileList,
|
|
492
512
|
maxReached,
|
|
493
513
|
disabled,
|
package/lib/upload/upload.vue.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const PendingFeedback_vue_vue_type_script_setup_true_lang = require("../_components/pending-feedback/PendingFeedback.vue.js");
|
|
5
|
+
const editorPending = require("../_components/field-presentation/editor-pending.js");
|
|
5
6
|
const iconsVue = require("@cedar-design/icons-vue");
|
|
6
7
|
const globalConfig = require("../_utils/global-config.js");
|
|
7
8
|
const previewApi = require("../image/preview-api.js");
|
|
@@ -135,6 +136,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
});
|
|
139
|
+
const editorPending$1 = vue.inject(editorPending.fieldEditorControlPending, void 0);
|
|
140
|
+
vue.watch(uploader.editorPending, (value) => {
|
|
141
|
+
if (editorPending$1) editorPending$1.value = value;
|
|
142
|
+
}, { flush: "sync" });
|
|
143
|
+
vue.onBeforeUnmount(() => {
|
|
144
|
+
if (editorPending$1) editorPending$1.value = false;
|
|
145
|
+
});
|
|
138
146
|
const {
|
|
139
147
|
fileList,
|
|
140
148
|
maxReached,
|
|
@@ -250,7 +258,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
250
258
|
class: vue.normalizeClass(vue.unref(n)("input")),
|
|
251
259
|
type: "file",
|
|
252
260
|
accept: _ctx.accept,
|
|
253
|
-
capture: _ctx.capture,
|
|
261
|
+
capture: _ctx.capture === false ? void 0 : _ctx.capture === true ? "" : _ctx.capture,
|
|
254
262
|
multiple: !vue.unref(replacementTarget) && (_ctx.multiple || _ctx.directory),
|
|
255
263
|
disabled: vue.unref(disabledState),
|
|
256
264
|
webkitdirectory: !vue.unref(replacementTarget) && _ctx.directory || void 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedar-design/ui-vue",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
65
65
|
"sortablejs": "^1.15.3",
|
|
66
66
|
"zod": "^4.1.12",
|
|
67
|
-
"@cedar-design/icons-vue": "1.1.
|
|
68
|
-
"@cedar-design/shared-vue": "1.1.
|
|
69
|
-
"@cedar-design/use-vue": "1.1.
|
|
67
|
+
"@cedar-design/icons-vue": "1.1.2",
|
|
68
|
+
"@cedar-design/shared-vue": "1.1.1",
|
|
69
|
+
"@cedar-design/use-vue": "1.1.1"
|
|
70
70
|
},
|
|
71
71
|
"lint-staged": {
|
|
72
72
|
"src/**/*.{js,ts,tsx,vue}": [
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
"vuepress": "2.0.0-rc.18",
|
|
154
154
|
"vuepress-plugin-md-enhance": "^2.0.0-rc.43",
|
|
155
155
|
"vuepress-theme-hope": "2.0.0-rc.61",
|
|
156
|
-
"@cedar-design/
|
|
157
|
-
"@cedar-design/
|
|
156
|
+
"@cedar-design/resolver-vue": "1.1.1",
|
|
157
|
+
"@cedar-design/cli-vue": "1.1.1"
|
|
158
158
|
},
|
|
159
159
|
"peerDependencies": {
|
|
160
160
|
"vue": "^3.5.12"
|
|
@@ -11,6 +11,8 @@ export interface FieldEditorContext {
|
|
|
11
11
|
readonly: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface FieldPresentationAdapter {
|
|
14
|
+
/** Selection editors commit on a completed choice when confirmation is disabled. */
|
|
15
|
+
selectionConfirmation?: 'update' | 'select';
|
|
14
16
|
/** Pause selection mutations during loading while leaving search text editable. */
|
|
15
17
|
pauseSelectionWhileLoading?: boolean;
|
|
16
18
|
/** Explicit completion notifications owned by final deferred acceptance. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePickerRangeLabels(kind: () => 'date' | 'time'): import("vue").ComputedRef<string[]>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Modal ownership follows the popup stack, including teleported child Triggers. */
|
|
2
2
|
export declare function useModalFocus(root: () => HTMLElement | undefined, active: () => boolean, isTop: (event?: Event) => boolean, lockScroll?: () => boolean, ownerDocument?: () => Document | undefined): {
|
|
3
3
|
focus: () => void;
|
|
4
|
+
focusAfterEnter: () => void;
|
|
4
5
|
restore: () => void;
|
|
5
6
|
trap: (event: KeyboardEvent) => void;
|
|
6
7
|
};
|
|
@@ -110,6 +110,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
110
110
|
default: undefined;
|
|
111
111
|
};
|
|
112
112
|
defaultOpen: BooleanConstructor;
|
|
113
|
+
needConfirm: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: undefined;
|
|
116
|
+
};
|
|
113
117
|
searchDelay: {
|
|
114
118
|
type: NumberConstructor;
|
|
115
119
|
default: number;
|
|
@@ -244,6 +248,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
244
248
|
default: undefined;
|
|
245
249
|
};
|
|
246
250
|
defaultOpen: BooleanConstructor;
|
|
251
|
+
needConfirm: {
|
|
252
|
+
type: BooleanConstructor;
|
|
253
|
+
default: undefined;
|
|
254
|
+
};
|
|
247
255
|
searchDelay: {
|
|
248
256
|
type: NumberConstructor;
|
|
249
257
|
default: number;
|
|
@@ -287,6 +295,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
287
295
|
defaultValue: string;
|
|
288
296
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
289
297
|
showWordLimit: boolean;
|
|
298
|
+
needConfirm: boolean;
|
|
290
299
|
options: readonly (import("..").SelectOptionGroup | AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | AutoCompleteOption>;
|
|
291
300
|
searchDelay: number;
|
|
292
301
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -112,6 +112,10 @@ declare const AutoComplete: import("../_utils/global-config").CedarComponentWith
|
|
|
112
112
|
default: undefined;
|
|
113
113
|
};
|
|
114
114
|
defaultOpen: BooleanConstructor;
|
|
115
|
+
needConfirm: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: undefined;
|
|
118
|
+
};
|
|
115
119
|
searchDelay: {
|
|
116
120
|
type: NumberConstructor;
|
|
117
121
|
default: number;
|
|
@@ -168,6 +172,7 @@ declare const AutoComplete: import("../_utils/global-config").CedarComponentWith
|
|
|
168
172
|
defaultValue: string;
|
|
169
173
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
170
174
|
showWordLimit: boolean;
|
|
175
|
+
needConfirm: boolean;
|
|
171
176
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
172
177
|
searchDelay: number;
|
|
173
178
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -292,6 +297,10 @@ declare const AutoComplete: import("../_utils/global-config").CedarComponentWith
|
|
|
292
297
|
default: undefined;
|
|
293
298
|
};
|
|
294
299
|
defaultOpen: BooleanConstructor;
|
|
300
|
+
needConfirm: {
|
|
301
|
+
type: BooleanConstructor;
|
|
302
|
+
default: undefined;
|
|
303
|
+
};
|
|
295
304
|
searchDelay: {
|
|
296
305
|
type: NumberConstructor;
|
|
297
306
|
default: number;
|
|
@@ -335,6 +344,7 @@ declare const AutoComplete: import("../_utils/global-config").CedarComponentWith
|
|
|
335
344
|
defaultValue: string;
|
|
336
345
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
337
346
|
showWordLimit: boolean;
|
|
347
|
+
needConfirm: boolean;
|
|
338
348
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
339
349
|
searchDelay: number;
|
|
340
350
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -456,6 +466,10 @@ declare const AutoComplete: import("../_utils/global-config").CedarComponentWith
|
|
|
456
466
|
default: undefined;
|
|
457
467
|
};
|
|
458
468
|
defaultOpen: BooleanConstructor;
|
|
469
|
+
needConfirm: {
|
|
470
|
+
type: BooleanConstructor;
|
|
471
|
+
default: undefined;
|
|
472
|
+
};
|
|
459
473
|
searchDelay: {
|
|
460
474
|
type: NumberConstructor;
|
|
461
475
|
default: number;
|
|
@@ -512,6 +526,7 @@ declare const AutoComplete: import("../_utils/global-config").CedarComponentWith
|
|
|
512
526
|
defaultValue: string;
|
|
513
527
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
514
528
|
showWordLimit: boolean;
|
|
529
|
+
needConfirm: boolean;
|
|
515
530
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
516
531
|
searchDelay: number;
|
|
517
532
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -634,6 +649,10 @@ export declare const _AutoCompleteComponent: import("../_utils/global-config").C
|
|
|
634
649
|
default: undefined;
|
|
635
650
|
};
|
|
636
651
|
defaultOpen: BooleanConstructor;
|
|
652
|
+
needConfirm: {
|
|
653
|
+
type: BooleanConstructor;
|
|
654
|
+
default: undefined;
|
|
655
|
+
};
|
|
637
656
|
searchDelay: {
|
|
638
657
|
type: NumberConstructor;
|
|
639
658
|
default: number;
|
|
@@ -690,6 +709,7 @@ export declare const _AutoCompleteComponent: import("../_utils/global-config").C
|
|
|
690
709
|
defaultValue: string;
|
|
691
710
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
692
711
|
showWordLimit: boolean;
|
|
712
|
+
needConfirm: boolean;
|
|
693
713
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
694
714
|
searchDelay: number;
|
|
695
715
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -814,6 +834,10 @@ export declare const _AutoCompleteComponent: import("../_utils/global-config").C
|
|
|
814
834
|
default: undefined;
|
|
815
835
|
};
|
|
816
836
|
defaultOpen: BooleanConstructor;
|
|
837
|
+
needConfirm: {
|
|
838
|
+
type: BooleanConstructor;
|
|
839
|
+
default: undefined;
|
|
840
|
+
};
|
|
817
841
|
searchDelay: {
|
|
818
842
|
type: NumberConstructor;
|
|
819
843
|
default: number;
|
|
@@ -857,6 +881,7 @@ export declare const _AutoCompleteComponent: import("../_utils/global-config").C
|
|
|
857
881
|
defaultValue: string;
|
|
858
882
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
859
883
|
showWordLimit: boolean;
|
|
884
|
+
needConfirm: boolean;
|
|
860
885
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
861
886
|
searchDelay: number;
|
|
862
887
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -978,6 +1003,10 @@ export declare const _AutoCompleteComponent: import("../_utils/global-config").C
|
|
|
978
1003
|
default: undefined;
|
|
979
1004
|
};
|
|
980
1005
|
defaultOpen: BooleanConstructor;
|
|
1006
|
+
needConfirm: {
|
|
1007
|
+
type: BooleanConstructor;
|
|
1008
|
+
default: undefined;
|
|
1009
|
+
};
|
|
981
1010
|
searchDelay: {
|
|
982
1011
|
type: NumberConstructor;
|
|
983
1012
|
default: number;
|
|
@@ -1034,6 +1063,7 @@ export declare const _AutoCompleteComponent: import("../_utils/global-config").C
|
|
|
1034
1063
|
defaultValue: string;
|
|
1035
1064
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
1036
1065
|
showWordLimit: boolean;
|
|
1066
|
+
needConfirm: boolean;
|
|
1037
1067
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
1038
1068
|
searchDelay: number;
|
|
1039
1069
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -109,6 +109,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
109
109
|
default: undefined;
|
|
110
110
|
};
|
|
111
111
|
defaultOpen: BooleanConstructor;
|
|
112
|
+
needConfirm: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: undefined;
|
|
115
|
+
};
|
|
112
116
|
searchDelay: {
|
|
113
117
|
type: NumberConstructor;
|
|
114
118
|
default: number;
|
|
@@ -243,6 +247,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
243
247
|
default: undefined;
|
|
244
248
|
};
|
|
245
249
|
defaultOpen: BooleanConstructor;
|
|
250
|
+
needConfirm: {
|
|
251
|
+
type: BooleanConstructor;
|
|
252
|
+
default: undefined;
|
|
253
|
+
};
|
|
246
254
|
searchDelay: {
|
|
247
255
|
type: NumberConstructor;
|
|
248
256
|
default: number;
|
|
@@ -286,6 +294,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
286
294
|
defaultValue: string;
|
|
287
295
|
maxLength: import("../_utils/text-input-value").TextInputMaxLength;
|
|
288
296
|
showWordLimit: boolean;
|
|
297
|
+
needConfirm: boolean;
|
|
289
298
|
options: readonly (import("..").SelectOptionGroup | import("./props").AutoCompleteOption)[] | import("../_hooks/use-option-request").OptionsLoader<import("..").SelectOptionGroup | import("./props").AutoCompleteOption>;
|
|
290
299
|
searchDelay: number;
|
|
291
300
|
filterOption: import("./props").AutoCompleteFilterOption;
|
|
@@ -161,6 +161,11 @@ export declare const autoCompleteProps: {
|
|
|
161
161
|
default: undefined;
|
|
162
162
|
};
|
|
163
163
|
defaultOpen: BooleanConstructor;
|
|
164
|
+
/** 弹出编辑是否需要确认;默认选中候选项即提交,自定义文本通过确认提交。 */
|
|
165
|
+
needConfirm: {
|
|
166
|
+
type: BooleanConstructor;
|
|
167
|
+
default: undefined;
|
|
168
|
+
};
|
|
164
169
|
searchDelay: {
|
|
165
170
|
type: NumberConstructor;
|
|
166
171
|
default: number;
|