@retailcrm/embed-ui-v1-components 0.9.18 → 0.9.21
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/AGENTS.md +8 -0
- package/README.md +5 -1
- package/bin/embed-ui-v1-components.mjs +32 -24
- package/bin/postinstall.mjs +2 -2
- package/dist/host.cjs +19 -13
- package/dist/host.css +8 -10
- package/dist/host.d.ts +52 -58
- package/dist/host.js +19 -13
- package/dist/remote.cjs +110 -100
- package/dist/remote.d.ts +30 -36
- package/dist/remote.js +110 -100
- package/docs/AGENT-DESIGN-GUIDELINES.md +463 -0
- package/docs/AI.md +89 -6
- package/docs/FORMAT.md +11 -9
- package/docs/PROFILES.md +9 -5
- package/docs/README.md +14 -5
- package/docs/assets/page-guidelines/card-settings-page.png +0 -0
- package/docs/assets/page-guidelines/collapse-block-page.png +0 -0
- package/docs/assets/page-guidelines/entity-list-page.png +0 -0
- package/docs/assets/page-guidelines/modal-sidebar.png +0 -0
- package/docs/assets/page-guidelines/modal-window.png +0 -0
- package/docs/assets/page-guidelines/multi-column-page.png +0 -0
- package/docs/profiles/UiAddButton.yml +30 -0
- package/docs/profiles/UiAlert.yml +27 -0
- package/docs/profiles/UiAvatar.yml +26 -0
- package/docs/profiles/UiAvatarList.yml +28 -0
- package/docs/profiles/UiButton.yml +1 -8
- package/docs/profiles/UiCalendar.yml +28 -0
- package/docs/profiles/UiCheckbox.yml +32 -0
- package/docs/profiles/UiCollapse.yml +34 -0
- package/docs/profiles/UiCollapseBox.yml +30 -0
- package/docs/profiles/UiCollapseGroup.yml +26 -0
- package/docs/profiles/UiCopyButton.yml +35 -0
- package/docs/profiles/UiDate.yml +28 -0
- package/docs/profiles/UiDatePicker.yml +30 -0
- package/docs/profiles/UiError.yml +45 -0
- package/docs/profiles/UiField.yml +1 -15
- package/docs/profiles/UiImage.yml +28 -0
- package/docs/profiles/UiInfobox.yml +33 -0
- package/docs/profiles/UiLink.yml +40 -0
- package/docs/profiles/UiLoader.yml +35 -0
- package/docs/profiles/UiMenuItem.yml +38 -0
- package/docs/profiles/UiMenuItemGroup.yml +27 -0
- package/docs/profiles/UiModalSidebar.yml +32 -0
- package/docs/profiles/UiModalWindow.yml +42 -0
- package/docs/profiles/UiModalWindowSurface.yml +32 -0
- package/docs/profiles/UiNumberStepper.yml +36 -0
- package/docs/profiles/UiPageHeader.yml +1 -23
- package/docs/profiles/UiPopper.yml +1 -13
- package/docs/profiles/UiPopperConnector.yml +7 -25
- package/docs/profiles/UiPopperTarget.yml +7 -25
- package/docs/profiles/UiRadio.yml +40 -0
- package/docs/profiles/UiRadioSwitch.yml +1 -32
- package/docs/profiles/UiRadioSwitchOption.yml +9 -13
- package/docs/profiles/UiScrollBox.yml +34 -0
- package/docs/profiles/UiSelect.yml +1 -44
- package/docs/profiles/UiSelectOption.yml +32 -0
- package/docs/profiles/UiSelectOptionGroup.yml +30 -0
- package/docs/profiles/UiSkeleton.yml +32 -0
- package/docs/profiles/UiSlider.yml +40 -0
- package/docs/profiles/UiSwitch.yml +38 -0
- package/docs/profiles/UiTab.yml +7 -16
- package/docs/profiles/UiTabGroup.yml +1 -30
- package/docs/profiles/UiTable.yml +148 -0
- package/docs/profiles/UiTableBodyCell.yml +28 -0
- package/docs/profiles/UiTableColumn.yml +39 -0
- package/docs/profiles/UiTableFooterButton.yml +43 -0
- package/docs/profiles/UiTableFooterSection.yml +37 -0
- package/docs/profiles/UiTableHeadCell.yml +28 -0
- package/docs/profiles/UiTableSorter.yml +29 -0
- package/docs/profiles/UiTag.yml +38 -0
- package/docs/profiles/UiTextbox.yml +1 -32
- package/docs/profiles/UiTimePicker.yml +40 -0
- package/docs/profiles/UiToggleButton.yml +1 -11
- package/docs/profiles/UiToggleGroup.yml +1 -13
- package/docs/profiles/UiToggleGroupOption.yml +9 -11
- package/docs/profiles/UiToolbarButton.yml +37 -0
- package/docs/profiles/UiToolbarLink.yml +37 -0
- package/docs/profiles/UiTooltip.yml +38 -0
- package/docs/profiles/UiTransition.yml +37 -0
- package/docs/profiles/UiYandexMap.yml +53 -0
- package/package.json +15 -15
package/dist/remote.js
CHANGED
|
@@ -152,7 +152,7 @@ const _hoisted_3$3 = {
|
|
|
152
152
|
class: "ui-v1-field__required-mark",
|
|
153
153
|
"aria-hidden": "true"
|
|
154
154
|
};
|
|
155
|
-
const _hoisted_4$
|
|
155
|
+
const _hoisted_4$2 = {
|
|
156
156
|
key: 1,
|
|
157
157
|
class: "ui-v1-field__hint"
|
|
158
158
|
};
|
|
@@ -231,7 +231,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
231
231
|
]),
|
|
232
232
|
__props.required ? (openBlock(), createElementBlock("span", _hoisted_3$3, " * ")) : createCommentVNode("", true)
|
|
233
233
|
], 8, _hoisted_2$3)) : createCommentVNode("", true),
|
|
234
|
-
__props.hint || _ctx.$slots.hint ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
234
|
+
__props.hint || _ctx.$slots.hint ? (openBlock(), createElementBlock("span", _hoisted_4$2, [
|
|
235
235
|
createVNode(unref(UiPopperConnector), null, {
|
|
236
236
|
default: withCtx(() => [
|
|
237
237
|
createVNode(unref(UiPopperTarget), {
|
|
@@ -402,14 +402,15 @@ const UiPageHeaderTitle = defineRemoteComponent(UiPageHeaderTitleType, {
|
|
|
402
402
|
blur: defineRemoteMethod()
|
|
403
403
|
}
|
|
404
404
|
});
|
|
405
|
-
const _hoisted_1$5 = {
|
|
406
|
-
const _hoisted_2$2 = {
|
|
405
|
+
const _hoisted_1$5 = {
|
|
407
406
|
key: 0,
|
|
408
|
-
class: "ui-v1-page-
|
|
407
|
+
class: "ui-v1-page-header__actions"
|
|
409
408
|
};
|
|
410
|
-
const
|
|
409
|
+
const _hoisted_2$2 = { class: "ui-v1-page-header__main" };
|
|
410
|
+
const _hoisted_3$2 = { class: "ui-v1-page-header__body" };
|
|
411
|
+
const _hoisted_4$1 = {
|
|
411
412
|
key: 0,
|
|
412
|
-
class: "ui-v1-page-
|
|
413
|
+
class: "ui-v1-page-header__addon"
|
|
413
414
|
};
|
|
414
415
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
415
416
|
...{
|
|
@@ -495,60 +496,62 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
495
496
|
"ui-v1-page-header_readonly": __props.readonly
|
|
496
497
|
}
|
|
497
498
|
}, _ctx.$attrs), [
|
|
498
|
-
|
|
499
|
-
createVNode(unref(UiPopperConnector), null, {
|
|
500
|
-
default: withCtx(() => [
|
|
501
|
-
createVNode(unref(UiPopperTarget), {
|
|
502
|
-
tag: "div",
|
|
503
|
-
class: "ui-v1-page-header__title"
|
|
504
|
-
}, {
|
|
505
|
-
default: withCtx(() => [
|
|
506
|
-
createVNode(unref(UiPageHeaderTitle), {
|
|
507
|
-
id: __props.id,
|
|
508
|
-
ref_key: "header",
|
|
509
|
-
ref: header,
|
|
510
|
-
value: valueState.value,
|
|
511
|
-
placeholder: __props.placeholder,
|
|
512
|
-
error: __props.error,
|
|
513
|
-
invalid: __props.invalid,
|
|
514
|
-
editable: __props.editable,
|
|
515
|
-
autofocus: __props.autofocus,
|
|
516
|
-
autoselect: __props.autoselect,
|
|
517
|
-
readonly: __props.readonly,
|
|
518
|
-
disabled: __props.disabled,
|
|
519
|
-
onBlur: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("blur", $event)),
|
|
520
|
-
onChange: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("change", $event)),
|
|
521
|
-
onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("focus", $event)),
|
|
522
|
-
onKeydown: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("keydown", $event)),
|
|
523
|
-
"onUpdate:value": onUpdateValue
|
|
524
|
-
}, null, 8, ["id", "value", "placeholder", "error", "invalid", "editable", "autofocus", "autoselect", "readonly", "disabled"])
|
|
525
|
-
]),
|
|
526
|
-
_: 1
|
|
527
|
-
}),
|
|
528
|
-
displayInvalid.value && __props.error ? (openBlock(), createBlock(unref(UiTooltip), {
|
|
529
|
-
key: 0,
|
|
530
|
-
"target-triggers": {
|
|
531
|
-
hide: [""]
|
|
532
|
-
},
|
|
533
|
-
"offset-main-axis": 8,
|
|
534
|
-
visible: "",
|
|
535
|
-
placement: "right"
|
|
536
|
-
}, {
|
|
537
|
-
default: withCtx(() => [
|
|
538
|
-
createTextVNode(toDisplayString(__props.error), 1)
|
|
539
|
-
]),
|
|
540
|
-
_: 1
|
|
541
|
-
})) : createCommentVNode("", true)
|
|
542
|
-
]),
|
|
543
|
-
_: 1
|
|
544
|
-
}),
|
|
545
|
-
_ctx.$slots.addon ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
546
|
-
renderSlot(_ctx.$slots, "addon")
|
|
547
|
-
])) : createCommentVNode("", true)
|
|
548
|
-
]),
|
|
549
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
499
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
550
500
|
renderSlot(_ctx.$slots, "actions")
|
|
551
|
-
])) : createCommentVNode("", true)
|
|
501
|
+
])) : createCommentVNode("", true),
|
|
502
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
503
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
504
|
+
createVNode(unref(UiPopperConnector), null, {
|
|
505
|
+
default: withCtx(() => [
|
|
506
|
+
createVNode(unref(UiPopperTarget), {
|
|
507
|
+
tag: "div",
|
|
508
|
+
class: "ui-v1-page-header__title"
|
|
509
|
+
}, {
|
|
510
|
+
default: withCtx(() => [
|
|
511
|
+
createVNode(unref(UiPageHeaderTitle), {
|
|
512
|
+
id: __props.id,
|
|
513
|
+
ref_key: "header",
|
|
514
|
+
ref: header,
|
|
515
|
+
value: valueState.value,
|
|
516
|
+
placeholder: __props.placeholder,
|
|
517
|
+
error: __props.error,
|
|
518
|
+
invalid: __props.invalid,
|
|
519
|
+
editable: __props.editable,
|
|
520
|
+
autofocus: __props.autofocus,
|
|
521
|
+
autoselect: __props.autoselect,
|
|
522
|
+
readonly: __props.readonly,
|
|
523
|
+
disabled: __props.disabled,
|
|
524
|
+
onBlur: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("blur", $event)),
|
|
525
|
+
onChange: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("change", $event)),
|
|
526
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("focus", $event)),
|
|
527
|
+
onKeydown: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("keydown", $event)),
|
|
528
|
+
"onUpdate:value": onUpdateValue
|
|
529
|
+
}, null, 8, ["id", "value", "placeholder", "error", "invalid", "editable", "autofocus", "autoselect", "readonly", "disabled"])
|
|
530
|
+
]),
|
|
531
|
+
_: 1
|
|
532
|
+
}),
|
|
533
|
+
displayInvalid.value && __props.error ? (openBlock(), createBlock(unref(UiTooltip), {
|
|
534
|
+
key: 0,
|
|
535
|
+
"target-triggers": {
|
|
536
|
+
hide: [""]
|
|
537
|
+
},
|
|
538
|
+
"offset-main-axis": 8,
|
|
539
|
+
visible: "",
|
|
540
|
+
placement: "right"
|
|
541
|
+
}, {
|
|
542
|
+
default: withCtx(() => [
|
|
543
|
+
createTextVNode(toDisplayString(__props.error), 1)
|
|
544
|
+
]),
|
|
545
|
+
_: 1
|
|
546
|
+
})) : createCommentVNode("", true)
|
|
547
|
+
]),
|
|
548
|
+
_: 1
|
|
549
|
+
}),
|
|
550
|
+
_ctx.$slots.addon ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
551
|
+
renderSlot(_ctx.$slots, "addon")
|
|
552
|
+
])) : createCommentVNode("", true)
|
|
553
|
+
])
|
|
554
|
+
])
|
|
552
555
|
], 16);
|
|
553
556
|
};
|
|
554
557
|
}
|
|
@@ -584,13 +587,13 @@ var SIZE$4 = /* @__PURE__ */ ((SIZE2) => {
|
|
|
584
587
|
SIZE2["LG"] = "lg";
|
|
585
588
|
return SIZE2;
|
|
586
589
|
})(SIZE$4 || {});
|
|
587
|
-
const AppearanceKey = Symbol("UiRadioSwitchAppearance");
|
|
588
|
-
const SizeKey$1 = Symbol("UiRadioSwitchSize");
|
|
589
|
-
const RegistryKey$1 = Symbol("UiRadioSwitchRegistry");
|
|
590
|
-
const UpdateKey = Symbol("UiRadioSwitchUpdate");
|
|
591
|
-
const FocusableIdKey$1 = Symbol("UiRadioSwitchFocusableId");
|
|
592
|
-
const SetFocusableIdKey$1 = Symbol("UiRadioSwitchSetFocusableId");
|
|
593
|
-
const MoveFocusKey$1 = Symbol("UiRadioSwitchMoveFocus");
|
|
590
|
+
const AppearanceKey = /* @__PURE__ */ Symbol("UiRadioSwitchAppearance");
|
|
591
|
+
const SizeKey$1 = /* @__PURE__ */ Symbol("UiRadioSwitchSize");
|
|
592
|
+
const RegistryKey$1 = /* @__PURE__ */ Symbol("UiRadioSwitchRegistry");
|
|
593
|
+
const UpdateKey = /* @__PURE__ */ Symbol("UiRadioSwitchUpdate");
|
|
594
|
+
const FocusableIdKey$1 = /* @__PURE__ */ Symbol("UiRadioSwitchFocusableId");
|
|
595
|
+
const SetFocusableIdKey$1 = /* @__PURE__ */ Symbol("UiRadioSwitchSetFocusableId");
|
|
596
|
+
const MoveFocusKey$1 = /* @__PURE__ */ Symbol("UiRadioSwitchMoveFocus");
|
|
594
597
|
const useAppearance = () => inject(AppearanceKey, computed(() => APPEARANCE$2.DEFAULT));
|
|
595
598
|
const useSize$1 = () => inject(SizeKey$1, computed(() => SIZE$4.MD));
|
|
596
599
|
const useRegistry$1 = () => inject(RegistryKey$1, {
|
|
@@ -1659,13 +1662,13 @@ var UiToggleButtonSize = /* @__PURE__ */ ((UiToggleButtonSize2) => {
|
|
|
1659
1662
|
UiToggleButtonSize2["XS"] = "xs";
|
|
1660
1663
|
return UiToggleButtonSize2;
|
|
1661
1664
|
})(UiToggleButtonSize || {});
|
|
1662
|
-
const FocusableIdKey = Symbol("UiToggleGroupFocusableId");
|
|
1663
|
-
const MoveFocusKey = Symbol("UiToggleGroupMoveFocus");
|
|
1664
|
-
const RegistryKey = Symbol("UiToggleGroupRegistry");
|
|
1665
|
-
const SetFocusableIdKey = Symbol("UiToggleGroupSetFocusableId");
|
|
1666
|
-
const SizeKey = Symbol("UiToggleGroupSize");
|
|
1667
|
-
const DisabledKey = Symbol("UiToggleGroupDisabled");
|
|
1668
|
-
const ToggleKey$1 = Symbol("UiToggleGroupToggle");
|
|
1665
|
+
const FocusableIdKey = /* @__PURE__ */ Symbol("UiToggleGroupFocusableId");
|
|
1666
|
+
const MoveFocusKey = /* @__PURE__ */ Symbol("UiToggleGroupMoveFocus");
|
|
1667
|
+
const RegistryKey = /* @__PURE__ */ Symbol("UiToggleGroupRegistry");
|
|
1668
|
+
const SetFocusableIdKey = /* @__PURE__ */ Symbol("UiToggleGroupSetFocusableId");
|
|
1669
|
+
const SizeKey = /* @__PURE__ */ Symbol("UiToggleGroupSize");
|
|
1670
|
+
const DisabledKey = /* @__PURE__ */ Symbol("UiToggleGroupDisabled");
|
|
1671
|
+
const ToggleKey$1 = /* @__PURE__ */ Symbol("UiToggleGroupToggle");
|
|
1669
1672
|
const useFocusableId = () => inject(FocusableIdKey, computed(() => null));
|
|
1670
1673
|
const useMoveFocus = () => inject(MoveFocusKey, () => {
|
|
1671
1674
|
});
|
|
@@ -2226,24 +2229,24 @@ const highlight = (text, term, style) => text.replace(
|
|
|
2226
2229
|
);
|
|
2227
2230
|
let counter = 0;
|
|
2228
2231
|
const uid = (prefix = "ui-v1-select") => `${prefix}-${++counter}`;
|
|
2229
|
-
const IsSelectedKey = Symbol("UiSelectedIsSelected");
|
|
2230
|
-
const RegisterKey = Symbol("UiSelectRegister");
|
|
2231
|
-
const SyncKey = Symbol("UiSelectSync");
|
|
2232
|
-
const UnregisterKey = Symbol("UiSelectUnregister");
|
|
2233
|
-
const ToggleKey = Symbol("UiSelectToggle");
|
|
2234
|
-
const FilterKey = Symbol("UiSelectFilter");
|
|
2235
|
-
const FilteredKey = Symbol("UiSelectFiltered");
|
|
2236
|
-
const TickerKey = Symbol("UiSelectTicker");
|
|
2237
|
-
const MultipleKey = Symbol("UiSelectMultiple");
|
|
2238
|
-
const ActiveOptionIdKey = Symbol("UiSelectActiveOptionId");
|
|
2239
|
-
const FastenedKey = Symbol("UiSelectFastened");
|
|
2240
|
-
const UnregisterOptionKey = Symbol("UiSelectUnregisterOption");
|
|
2241
|
-
const RegisterOptionKey = Symbol("UiSelectRegisterOption");
|
|
2242
|
-
const RegisterGroupKey = Symbol("UiSelectOptionGroupRegister");
|
|
2243
|
-
const UnregisterGroupKey = Symbol("UiSelectOptionGroupUnregister");
|
|
2244
|
-
const RegisterHeaderOptionKey = Symbol("UiSelectOptionGroupRegisterHeaderOption");
|
|
2245
|
-
const UnregisterHeaderOptionKey = Symbol("UiSelectOptionGroupUnregisterHeaderOption");
|
|
2246
|
-
const I18nInjectKey = Symbol("$embedI18n");
|
|
2232
|
+
const IsSelectedKey = /* @__PURE__ */ Symbol("UiSelectedIsSelected");
|
|
2233
|
+
const RegisterKey = /* @__PURE__ */ Symbol("UiSelectRegister");
|
|
2234
|
+
const SyncKey = /* @__PURE__ */ Symbol("UiSelectSync");
|
|
2235
|
+
const UnregisterKey = /* @__PURE__ */ Symbol("UiSelectUnregister");
|
|
2236
|
+
const ToggleKey = /* @__PURE__ */ Symbol("UiSelectToggle");
|
|
2237
|
+
const FilterKey = /* @__PURE__ */ Symbol("UiSelectFilter");
|
|
2238
|
+
const FilteredKey = /* @__PURE__ */ Symbol("UiSelectFiltered");
|
|
2239
|
+
const TickerKey = /* @__PURE__ */ Symbol("UiSelectTicker");
|
|
2240
|
+
const MultipleKey = /* @__PURE__ */ Symbol("UiSelectMultiple");
|
|
2241
|
+
const ActiveOptionIdKey = /* @__PURE__ */ Symbol("UiSelectActiveOptionId");
|
|
2242
|
+
const FastenedKey = /* @__PURE__ */ Symbol("UiSelectFastened");
|
|
2243
|
+
const UnregisterOptionKey = /* @__PURE__ */ Symbol("UiSelectUnregisterOption");
|
|
2244
|
+
const RegisterOptionKey = /* @__PURE__ */ Symbol("UiSelectRegisterOption");
|
|
2245
|
+
const RegisterGroupKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupRegister");
|
|
2246
|
+
const UnregisterGroupKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupUnregister");
|
|
2247
|
+
const RegisterHeaderOptionKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupRegisterHeaderOption");
|
|
2248
|
+
const UnregisterHeaderOptionKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupUnregisterHeaderOption");
|
|
2249
|
+
const I18nInjectKey = /* @__PURE__ */ Symbol("$embedI18n");
|
|
2247
2250
|
const UiSelectTriggerType = "UiSelectTrigger";
|
|
2248
2251
|
const UiSelectTrigger = defineRemoteComponent(UiSelectTriggerType, {
|
|
2249
2252
|
emits: [
|
|
@@ -2307,7 +2310,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2307
2310
|
/** Атрибут placeholder нативного поля ввода input */
|
|
2308
2311
|
placeholder: {
|
|
2309
2312
|
type: String,
|
|
2310
|
-
default: "
|
|
2313
|
+
default: ""
|
|
2311
2314
|
},
|
|
2312
2315
|
/** Отображает иконку сброса введённого или выбранного значения в виде крестика */
|
|
2313
2316
|
clearable: {
|
|
@@ -2411,7 +2414,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2411
2414
|
default: false
|
|
2412
2415
|
}
|
|
2413
2416
|
},
|
|
2414
|
-
|
|
2417
|
+
emits: ["change", "update:value"],
|
|
2418
|
+
setup(__props, { emit: __emit }) {
|
|
2419
|
+
const emit = __emit;
|
|
2415
2420
|
const props = __props;
|
|
2416
2421
|
const state = reactive({
|
|
2417
2422
|
expanded: props.expanded,
|
|
@@ -2440,6 +2445,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2440
2445
|
const equals = (a, b) => props.equalsFn(a, b);
|
|
2441
2446
|
const contains = (array, value) => array.some((v) => equals(v, value));
|
|
2442
2447
|
const navigableOptions = computed(() => optionsRegistry.value.filter((option) => option.isMatched() && !option.disabled));
|
|
2448
|
+
const setValue = (value) => {
|
|
2449
|
+
state.value = value;
|
|
2450
|
+
emit("change", value);
|
|
2451
|
+
emit("update:value", value);
|
|
2452
|
+
};
|
|
2443
2453
|
provide(RegisterKey, (option) => {
|
|
2444
2454
|
if (optionsRegistry.value.some((item) => item.id === option.id)) {
|
|
2445
2455
|
throw new Error(`[UiSelect] Component with id ${option.id} already registered. Unregister it before using again.`);
|
|
@@ -2472,12 +2482,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2472
2482
|
} else {
|
|
2473
2483
|
model.push(value);
|
|
2474
2484
|
}
|
|
2475
|
-
|
|
2485
|
+
setValue(model);
|
|
2476
2486
|
if (!props.multiple) {
|
|
2477
2487
|
close();
|
|
2478
2488
|
}
|
|
2479
2489
|
} else {
|
|
2480
|
-
|
|
2490
|
+
setValue(value);
|
|
2481
2491
|
close();
|
|
2482
2492
|
}
|
|
2483
2493
|
});
|
|
@@ -2531,9 +2541,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2531
2541
|
} else {
|
|
2532
2542
|
model.push(option.value);
|
|
2533
2543
|
}
|
|
2534
|
-
|
|
2544
|
+
setValue(model);
|
|
2535
2545
|
} else {
|
|
2536
|
-
|
|
2546
|
+
setValue(option.value);
|
|
2537
2547
|
close();
|
|
2538
2548
|
}
|
|
2539
2549
|
};
|
|
@@ -2662,7 +2672,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2662
2672
|
}, _ctx.$attrs, {
|
|
2663
2673
|
onInput,
|
|
2664
2674
|
onKeydown: onKeyDown,
|
|
2665
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) =>
|
|
2675
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => setValue($event)),
|
|
2666
2676
|
"onUpdate:expanded": _cache[1] || (_cache[1] = ($event) => state.expanded = $event)
|
|
2667
2677
|
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "width", "active-descendant"]),
|
|
2668
2678
|
createVNode(unref(UiSelectPopper), {
|
|
@@ -3102,7 +3112,7 @@ const mountEndpointRoot = async (channel) => {
|
|
|
3102
3112
|
await root.mount();
|
|
3103
3113
|
return root;
|
|
3104
3114
|
};
|
|
3105
|
-
const ImageWorkersKey = Symbol("$image.workers");
|
|
3115
|
+
const ImageWorkersKey = /* @__PURE__ */ Symbol("$image.workers");
|
|
3106
3116
|
const usePreview = (workers = ref([])) => {
|
|
3107
3117
|
const _workers = inject(ImageWorkersKey, workers);
|
|
3108
3118
|
return {
|