@retailcrm/embed-ui-v1-components 0.9.17 → 0.9.19
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/dist/remote.cjs +17 -6
- package/dist/remote.d.ts +10 -4
- package/dist/remote.js +17 -6
- package/package.json +1 -1
package/dist/remote.cjs
CHANGED
|
@@ -2413,7 +2413,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2413
2413
|
default: false
|
|
2414
2414
|
}
|
|
2415
2415
|
},
|
|
2416
|
-
|
|
2416
|
+
emits: ["change", "update:value"],
|
|
2417
|
+
setup(__props, { emit: __emit }) {
|
|
2418
|
+
const emit = __emit;
|
|
2417
2419
|
const props = __props;
|
|
2418
2420
|
const state = vue.reactive({
|
|
2419
2421
|
expanded: props.expanded,
|
|
@@ -2442,6 +2444,11 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2442
2444
|
const equals = (a, b) => props.equalsFn(a, b);
|
|
2443
2445
|
const contains = (array, value) => array.some((v) => equals(v, value));
|
|
2444
2446
|
const navigableOptions = vue.computed(() => optionsRegistry.value.filter((option) => option.isMatched() && !option.disabled));
|
|
2447
|
+
const setValue = (value) => {
|
|
2448
|
+
state.value = value;
|
|
2449
|
+
emit("change", value);
|
|
2450
|
+
emit("update:value", value);
|
|
2451
|
+
};
|
|
2445
2452
|
vue.provide(RegisterKey, (option) => {
|
|
2446
2453
|
if (optionsRegistry.value.some((item) => item.id === option.id)) {
|
|
2447
2454
|
throw new Error(`[UiSelect] Component with id ${option.id} already registered. Unregister it before using again.`);
|
|
@@ -2474,12 +2481,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2474
2481
|
} else {
|
|
2475
2482
|
model.push(value);
|
|
2476
2483
|
}
|
|
2477
|
-
|
|
2484
|
+
setValue(model);
|
|
2478
2485
|
if (!props.multiple) {
|
|
2479
2486
|
close();
|
|
2480
2487
|
}
|
|
2481
2488
|
} else {
|
|
2482
|
-
|
|
2489
|
+
setValue(value);
|
|
2483
2490
|
close();
|
|
2484
2491
|
}
|
|
2485
2492
|
});
|
|
@@ -2533,9 +2540,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2533
2540
|
} else {
|
|
2534
2541
|
model.push(option.value);
|
|
2535
2542
|
}
|
|
2536
|
-
|
|
2543
|
+
setValue(model);
|
|
2537
2544
|
} else {
|
|
2538
|
-
|
|
2545
|
+
setValue(option.value);
|
|
2539
2546
|
close();
|
|
2540
2547
|
}
|
|
2541
2548
|
};
|
|
@@ -2664,7 +2671,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2664
2671
|
}, _ctx.$attrs, {
|
|
2665
2672
|
onInput,
|
|
2666
2673
|
onKeydown: onKeyDown,
|
|
2667
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) =>
|
|
2674
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => setValue($event)),
|
|
2668
2675
|
"onUpdate:expanded": _cache[1] || (_cache[1] = ($event) => state.expanded = $event)
|
|
2669
2676
|
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "width", "active-descendant"]),
|
|
2670
2677
|
vue.createVNode(vue.unref(UiSelectPopper), {
|
|
@@ -3038,6 +3045,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3038
3045
|
"UiAvatarList",
|
|
3039
3046
|
"UiAlert",
|
|
3040
3047
|
"UiButton",
|
|
3048
|
+
"UiCalendar",
|
|
3041
3049
|
"UiCheckbox",
|
|
3042
3050
|
"UiCollapse",
|
|
3043
3051
|
"UiCollapseBox",
|
|
@@ -3057,6 +3065,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3057
3065
|
"UiModalWindowSurface",
|
|
3058
3066
|
"UiNumberStepper",
|
|
3059
3067
|
"UiPageHeader",
|
|
3068
|
+
"UiPageHeaderLayout",
|
|
3060
3069
|
"UiPageHeaderTitle",
|
|
3061
3070
|
"UiPopper",
|
|
3062
3071
|
"UiPopperConnector",
|
|
@@ -3065,6 +3074,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3065
3074
|
"UiRadioSwitchOptionShell",
|
|
3066
3075
|
"UiRadioSwitchRoot",
|
|
3067
3076
|
"UiScrollBox",
|
|
3077
|
+
"UiSkeleton",
|
|
3068
3078
|
"UiSlider",
|
|
3069
3079
|
"UiSwitch",
|
|
3070
3080
|
"UiTab",
|
|
@@ -3085,6 +3095,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3085
3095
|
"UiTimePicker",
|
|
3086
3096
|
"UiToggleButton",
|
|
3087
3097
|
"UiToggleGroupRoot",
|
|
3098
|
+
// UiToolbar is host-only: remote trees can render toolbar items, but cannot create the toolbar container.
|
|
3088
3099
|
"UiToolbarButton",
|
|
3089
3100
|
"UiToolbarLink",
|
|
3090
3101
|
"UiTooltip",
|
package/dist/remote.d.ts
CHANGED
|
@@ -643,7 +643,10 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
643
643
|
type: BooleanConstructor;
|
|
644
644
|
default: boolean;
|
|
645
645
|
};
|
|
646
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
646
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
647
|
+
change: (value: unknown) => any;
|
|
648
|
+
"update:value": (value: unknown) => any;
|
|
649
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
647
650
|
/** Атрибут id корневого элемента выпадающего списка. Должен быть уникальным на странице */
|
|
648
651
|
id: {
|
|
649
652
|
type: StringConstructor;
|
|
@@ -759,7 +762,10 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
759
762
|
type: BooleanConstructor;
|
|
760
763
|
default: boolean;
|
|
761
764
|
};
|
|
762
|
-
}>> & Readonly<{
|
|
765
|
+
}>> & Readonly<{
|
|
766
|
+
onChange?: ((value: unknown) => any) | undefined;
|
|
767
|
+
"onUpdate:value"?: ((value: unknown) => any) | undefined;
|
|
768
|
+
}>, {
|
|
763
769
|
id: string;
|
|
764
770
|
placeholder: string;
|
|
765
771
|
disabled: boolean;
|
|
@@ -842,7 +848,7 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<{
|
|
|
842
848
|
R,
|
|
843
849
|
R,
|
|
844
850
|
OnCleanup
|
|
845
|
-
]) => any : (...
|
|
851
|
+
]) => any : (...args: [
|
|
846
852
|
any,
|
|
847
853
|
any,
|
|
848
854
|
OnCleanup
|
|
@@ -1186,7 +1192,7 @@ declare function __VLS_template_5(): {
|
|
|
1186
1192
|
R,
|
|
1187
1193
|
R,
|
|
1188
1194
|
OnCleanup
|
|
1189
|
-
]) => any : (...
|
|
1195
|
+
]) => any : (...args: [
|
|
1190
1196
|
any,
|
|
1191
1197
|
any,
|
|
1192
1198
|
OnCleanup
|
package/dist/remote.js
CHANGED
|
@@ -2411,7 +2411,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2411
2411
|
default: false
|
|
2412
2412
|
}
|
|
2413
2413
|
},
|
|
2414
|
-
|
|
2414
|
+
emits: ["change", "update:value"],
|
|
2415
|
+
setup(__props, { emit: __emit }) {
|
|
2416
|
+
const emit = __emit;
|
|
2415
2417
|
const props = __props;
|
|
2416
2418
|
const state = reactive({
|
|
2417
2419
|
expanded: props.expanded,
|
|
@@ -2440,6 +2442,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2440
2442
|
const equals = (a, b) => props.equalsFn(a, b);
|
|
2441
2443
|
const contains = (array, value) => array.some((v) => equals(v, value));
|
|
2442
2444
|
const navigableOptions = computed(() => optionsRegistry.value.filter((option) => option.isMatched() && !option.disabled));
|
|
2445
|
+
const setValue = (value) => {
|
|
2446
|
+
state.value = value;
|
|
2447
|
+
emit("change", value);
|
|
2448
|
+
emit("update:value", value);
|
|
2449
|
+
};
|
|
2443
2450
|
provide(RegisterKey, (option) => {
|
|
2444
2451
|
if (optionsRegistry.value.some((item) => item.id === option.id)) {
|
|
2445
2452
|
throw new Error(`[UiSelect] Component with id ${option.id} already registered. Unregister it before using again.`);
|
|
@@ -2472,12 +2479,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2472
2479
|
} else {
|
|
2473
2480
|
model.push(value);
|
|
2474
2481
|
}
|
|
2475
|
-
|
|
2482
|
+
setValue(model);
|
|
2476
2483
|
if (!props.multiple) {
|
|
2477
2484
|
close();
|
|
2478
2485
|
}
|
|
2479
2486
|
} else {
|
|
2480
|
-
|
|
2487
|
+
setValue(value);
|
|
2481
2488
|
close();
|
|
2482
2489
|
}
|
|
2483
2490
|
});
|
|
@@ -2531,9 +2538,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2531
2538
|
} else {
|
|
2532
2539
|
model.push(option.value);
|
|
2533
2540
|
}
|
|
2534
|
-
|
|
2541
|
+
setValue(model);
|
|
2535
2542
|
} else {
|
|
2536
|
-
|
|
2543
|
+
setValue(option.value);
|
|
2537
2544
|
close();
|
|
2538
2545
|
}
|
|
2539
2546
|
};
|
|
@@ -2662,7 +2669,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2662
2669
|
}, _ctx.$attrs, {
|
|
2663
2670
|
onInput,
|
|
2664
2671
|
onKeydown: onKeyDown,
|
|
2665
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) =>
|
|
2672
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => setValue($event)),
|
|
2666
2673
|
"onUpdate:expanded": _cache[1] || (_cache[1] = ($event) => state.expanded = $event)
|
|
2667
2674
|
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "width", "active-descendant"]),
|
|
2668
2675
|
createVNode(unref(UiSelectPopper), {
|
|
@@ -3036,6 +3043,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3036
3043
|
"UiAvatarList",
|
|
3037
3044
|
"UiAlert",
|
|
3038
3045
|
"UiButton",
|
|
3046
|
+
"UiCalendar",
|
|
3039
3047
|
"UiCheckbox",
|
|
3040
3048
|
"UiCollapse",
|
|
3041
3049
|
"UiCollapseBox",
|
|
@@ -3055,6 +3063,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3055
3063
|
"UiModalWindowSurface",
|
|
3056
3064
|
"UiNumberStepper",
|
|
3057
3065
|
"UiPageHeader",
|
|
3066
|
+
"UiPageHeaderLayout",
|
|
3058
3067
|
"UiPageHeaderTitle",
|
|
3059
3068
|
"UiPopper",
|
|
3060
3069
|
"UiPopperConnector",
|
|
@@ -3063,6 +3072,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3063
3072
|
"UiRadioSwitchOptionShell",
|
|
3064
3073
|
"UiRadioSwitchRoot",
|
|
3065
3074
|
"UiScrollBox",
|
|
3075
|
+
"UiSkeleton",
|
|
3066
3076
|
"UiSlider",
|
|
3067
3077
|
"UiSwitch",
|
|
3068
3078
|
"UiTab",
|
|
@@ -3083,6 +3093,7 @@ const createEndpointRoot = async (channel) => {
|
|
|
3083
3093
|
"UiTimePicker",
|
|
3084
3094
|
"UiToggleButton",
|
|
3085
3095
|
"UiToggleGroupRoot",
|
|
3096
|
+
// UiToolbar is host-only: remote trees can render toolbar items, but cannot create the toolbar container.
|
|
3086
3097
|
"UiToolbarButton",
|
|
3087
3098
|
"UiToolbarLink",
|
|
3088
3099
|
"UiTooltip",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@retailcrm/embed-ui-v1-components",
|
|
3
3
|
"bin": "./bin/embed-ui-v1-components.mjs",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.19",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "RetailDriverLLC <integration@retailcrm.ru>",
|
|
8
8
|
"repository": "git@github.com:retailcrm/embed-ui.git",
|