@retailcrm/embed-ui-v1-components 0.9.11 → 0.9.12
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/host.cjs +14 -2
- package/dist/host.d.ts +19 -2
- package/dist/host.js +14 -2
- package/dist/remote.cjs +72 -24
- package/dist/remote.d.ts +238 -11
- package/dist/remote.js +74 -26
- package/package.json +2 -2
package/dist/host.cjs
CHANGED
|
@@ -9583,7 +9583,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9583
9583
|
const width = vue.ref("auto");
|
|
9584
9584
|
const visible = vue.computed(() => props.opened);
|
|
9585
9585
|
const autoScroll = async () => {
|
|
9586
|
-
const option = scrollable.value?.querySelector(".ui-v1-select-option_selected");
|
|
9586
|
+
const option = scrollable.value?.querySelector(".ui-v1-select-option_active") ?? scrollable.value?.querySelector(".ui-v1-select-option_selected");
|
|
9587
9587
|
if (scrollable.value && option) {
|
|
9588
9588
|
scrollable.value.scrollTop = option.offsetTop;
|
|
9589
9589
|
}
|
|
@@ -9600,6 +9600,8 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9600
9600
|
return style;
|
|
9601
9601
|
});
|
|
9602
9602
|
__expose({
|
|
9603
|
+
autoScroll,
|
|
9604
|
+
updateWidth,
|
|
9603
9605
|
adjust: () => popper.value?.adjust(),
|
|
9604
9606
|
dispose: () => popper.value?.dispose(),
|
|
9605
9607
|
show: () => popper.value?.show(),
|
|
@@ -9773,7 +9775,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9773
9775
|
/** Нажатие клавиши в поле ввода */
|
|
9774
9776
|
"keydown"
|
|
9775
9777
|
],
|
|
9776
|
-
setup(__props, { emit: __emit }) {
|
|
9778
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9777
9779
|
const props = __props;
|
|
9778
9780
|
const emit = __emit;
|
|
9779
9781
|
const i18n = vue.computed(() => _i18n$2.init(vue.inject(I18nInjectKey, null)?.locale ?? _i18n$2.fallback));
|
|
@@ -9864,6 +9866,16 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9864
9866
|
emit("update:value", value);
|
|
9865
9867
|
emit("clear", event);
|
|
9866
9868
|
};
|
|
9869
|
+
__expose({
|
|
9870
|
+
open,
|
|
9871
|
+
close,
|
|
9872
|
+
onClick,
|
|
9873
|
+
onKeyDown,
|
|
9874
|
+
onInput,
|
|
9875
|
+
onFocus,
|
|
9876
|
+
onBlur,
|
|
9877
|
+
onClear
|
|
9878
|
+
});
|
|
9867
9879
|
vue.watch(() => props.value, () => {
|
|
9868
9880
|
updateSelectionWidth();
|
|
9869
9881
|
if (props.multiple && props.expanded) {
|
package/dist/host.d.ts
CHANGED
|
@@ -787,9 +787,26 @@ declare type UiScrollBoxProperties = {
|
|
|
787
787
|
showOnHover?: boolean;
|
|
788
788
|
showOnMac?: boolean;
|
|
789
789
|
};
|
|
790
|
-
export declare const UiSelectPopper: DefineComponent<
|
|
790
|
+
export declare const UiSelectPopper: DefineComponent<UiSelectPopperProperties, {
|
|
791
791
|
target: Ref<HTMLElement | null>;
|
|
792
|
-
}, UiPopperMethods>;
|
|
792
|
+
}, UiSelectPopperMethods & UiPopperMethods>;
|
|
793
|
+
declare type UiSelectPopperMethods = {
|
|
794
|
+
autoScroll(): void;
|
|
795
|
+
updateWidth(): void;
|
|
796
|
+
};
|
|
797
|
+
declare type UiSelectPopperProperties = {
|
|
798
|
+
opened?: boolean;
|
|
799
|
+
targetTriggers?: Trigger[] | TriggerSchema;
|
|
800
|
+
popperTriggers?: Trigger[] | TriggerSchema;
|
|
801
|
+
popperFitTrigger?: boolean;
|
|
802
|
+
placement?: Side | `${Side}-${Alignment}` | PlacementOptions;
|
|
803
|
+
popperClass?: string;
|
|
804
|
+
popperOptions?: Omit<UiPopperProperties, 'placement' | 'shown' | 'target' | 'triggers'>;
|
|
805
|
+
disabled?: boolean;
|
|
806
|
+
readonly?: boolean;
|
|
807
|
+
multiple?: boolean;
|
|
808
|
+
ticker?: boolean;
|
|
809
|
+
};
|
|
793
810
|
export declare const UiSelectTrigger: DefineComponent<UiSelectTriggerProperties, UiSelectTriggerMethods>;
|
|
794
811
|
declare type UiSelectTriggerMethods = {
|
|
795
812
|
open(): void;
|
package/dist/host.js
CHANGED
|
@@ -9581,7 +9581,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
9581
9581
|
const width = ref("auto");
|
|
9582
9582
|
const visible = computed(() => props.opened);
|
|
9583
9583
|
const autoScroll = async () => {
|
|
9584
|
-
const option = scrollable.value?.querySelector(".ui-v1-select-option_selected");
|
|
9584
|
+
const option = scrollable.value?.querySelector(".ui-v1-select-option_active") ?? scrollable.value?.querySelector(".ui-v1-select-option_selected");
|
|
9585
9585
|
if (scrollable.value && option) {
|
|
9586
9586
|
scrollable.value.scrollTop = option.offsetTop;
|
|
9587
9587
|
}
|
|
@@ -9598,6 +9598,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
9598
9598
|
return style;
|
|
9599
9599
|
});
|
|
9600
9600
|
__expose({
|
|
9601
|
+
autoScroll,
|
|
9602
|
+
updateWidth,
|
|
9601
9603
|
adjust: () => popper.value?.adjust(),
|
|
9602
9604
|
dispose: () => popper.value?.dispose(),
|
|
9603
9605
|
show: () => popper.value?.show(),
|
|
@@ -9771,7 +9773,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
9771
9773
|
/** Нажатие клавиши в поле ввода */
|
|
9772
9774
|
"keydown"
|
|
9773
9775
|
],
|
|
9774
|
-
setup(__props, { emit: __emit }) {
|
|
9776
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9775
9777
|
const props = __props;
|
|
9776
9778
|
const emit = __emit;
|
|
9777
9779
|
const i18n = computed(() => _i18n$2.init(inject(I18nInjectKey, null)?.locale ?? _i18n$2.fallback));
|
|
@@ -9862,6 +9864,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
9862
9864
|
emit("update:value", value);
|
|
9863
9865
|
emit("clear", event);
|
|
9864
9866
|
};
|
|
9867
|
+
__expose({
|
|
9868
|
+
open,
|
|
9869
|
+
close,
|
|
9870
|
+
onClick,
|
|
9871
|
+
onKeyDown,
|
|
9872
|
+
onInput,
|
|
9873
|
+
onFocus,
|
|
9874
|
+
onBlur,
|
|
9875
|
+
onClear
|
|
9876
|
+
});
|
|
9865
9877
|
watch(() => props.value, () => {
|
|
9866
9878
|
updateSelectionWidth();
|
|
9867
9879
|
if (props.multiple && props.expanded) {
|
package/dist/remote.cjs
CHANGED
|
@@ -106,15 +106,19 @@ const UiCopyButton = remote.defineRemoteComponent(
|
|
|
106
106
|
const UiDateType = "UiDate";
|
|
107
107
|
const UiDate = remote.defineRemoteComponent(UiDateType);
|
|
108
108
|
const UiDatePickerType = "UiDatePicker";
|
|
109
|
-
const UiDatePicker = remote.defineRemoteComponent(
|
|
110
|
-
|
|
111
|
-
[
|
|
109
|
+
const UiDatePicker = remote.defineRemoteComponent(UiDatePickerType, {
|
|
110
|
+
emits: [
|
|
112
111
|
"open",
|
|
113
112
|
"close",
|
|
114
113
|
"change",
|
|
115
114
|
"update:value"
|
|
116
|
-
]
|
|
117
|
-
|
|
115
|
+
],
|
|
116
|
+
methods: {
|
|
117
|
+
open: remote.defineRemoteMethod(),
|
|
118
|
+
close: remote.defineRemoteMethod(),
|
|
119
|
+
toggle: remote.defineRemoteMethod()
|
|
120
|
+
}
|
|
121
|
+
});
|
|
118
122
|
const UiErrorType = "UiError";
|
|
119
123
|
const UiError = remote.defineRemoteComponent(
|
|
120
124
|
UiErrorType,
|
|
@@ -436,20 +440,33 @@ const events = [
|
|
|
436
440
|
"clear"
|
|
437
441
|
];
|
|
438
442
|
const UiTextboxType = "UiTextbox";
|
|
439
|
-
const UiTextbox = remote.defineRemoteComponent(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
)
|
|
443
|
+
const UiTextbox = remote.defineRemoteComponent(UiTextboxType, {
|
|
444
|
+
emits: events,
|
|
445
|
+
methods: {
|
|
446
|
+
getSelectionStart: remote.defineRemoteMethod(),
|
|
447
|
+
getSelectionEnd: remote.defineRemoteMethod(),
|
|
448
|
+
setSelectionRange: remote.defineRemoteMethod(),
|
|
449
|
+
focus: remote.defineRemoteMethod(),
|
|
450
|
+
blur: remote.defineRemoteMethod(),
|
|
451
|
+
select: remote.defineRemoteMethod(),
|
|
452
|
+
insert: remote.defineRemoteMethod(),
|
|
453
|
+
clear: remote.defineRemoteMethod()
|
|
454
|
+
}
|
|
455
|
+
});
|
|
443
456
|
const UiTimePickerType = "UiTimePicker";
|
|
444
|
-
const UiTimePicker = remote.defineRemoteComponent(
|
|
445
|
-
|
|
446
|
-
[
|
|
457
|
+
const UiTimePicker = remote.defineRemoteComponent(UiTimePickerType, {
|
|
458
|
+
emits: [
|
|
447
459
|
"change",
|
|
448
460
|
"update:value",
|
|
449
461
|
"focus",
|
|
450
462
|
"blur"
|
|
451
|
-
]
|
|
452
|
-
|
|
463
|
+
],
|
|
464
|
+
methods: {
|
|
465
|
+
open: remote.defineRemoteMethod(),
|
|
466
|
+
close: remote.defineRemoteMethod(),
|
|
467
|
+
focus: remote.defineRemoteMethod()
|
|
468
|
+
}
|
|
469
|
+
});
|
|
453
470
|
const UiToolbarButtonType = "UiToolbarButton";
|
|
454
471
|
const UiToolbarButton = remote.defineRemoteComponent(
|
|
455
472
|
UiToolbarButtonType,
|
|
@@ -695,9 +712,8 @@ const RegisterHeaderOptionKey = Symbol("UiSelectOptionGroupRegisterHeaderOption"
|
|
|
695
712
|
const UnregisterHeaderOptionKey = Symbol("UiSelectOptionGroupUnregisterHeaderOption");
|
|
696
713
|
const I18nInjectKey = Symbol("$embedI18n");
|
|
697
714
|
const UiSelectTriggerType = "UiSelectTrigger";
|
|
698
|
-
const UiSelectTrigger = remote.defineRemoteComponent(
|
|
699
|
-
|
|
700
|
-
[
|
|
715
|
+
const UiSelectTrigger = remote.defineRemoteComponent(UiSelectTriggerType, {
|
|
716
|
+
emits: [
|
|
701
717
|
"input",
|
|
702
718
|
"focus",
|
|
703
719
|
"blur",
|
|
@@ -705,20 +721,33 @@ const UiSelectTrigger = remote.defineRemoteComponent(
|
|
|
705
721
|
"clear",
|
|
706
722
|
"update:value",
|
|
707
723
|
"update:expanded"
|
|
708
|
-
]
|
|
709
|
-
|
|
724
|
+
],
|
|
725
|
+
methods: {
|
|
726
|
+
open: remote.defineRemoteMethod(),
|
|
727
|
+
close: remote.defineRemoteMethod(),
|
|
728
|
+
onClick: remote.defineRemoteMethod(),
|
|
729
|
+
onKeyDown: remote.defineRemoteMethod(),
|
|
730
|
+
onInput: remote.defineRemoteMethod(),
|
|
731
|
+
onFocus: remote.defineRemoteMethod(),
|
|
732
|
+
onBlur: remote.defineRemoteMethod(),
|
|
733
|
+
onClear: remote.defineRemoteMethod()
|
|
734
|
+
}
|
|
735
|
+
});
|
|
710
736
|
const UiSelectPopperType = "UiSelectPopper";
|
|
711
|
-
const UiSelectPopper = remote.defineRemoteComponent(
|
|
712
|
-
|
|
713
|
-
[
|
|
737
|
+
const UiSelectPopper = remote.defineRemoteComponent(UiSelectPopperType, {
|
|
738
|
+
emits: [
|
|
714
739
|
"update:visible",
|
|
715
740
|
"show",
|
|
716
741
|
"hide",
|
|
717
742
|
"shown",
|
|
718
743
|
"hidden",
|
|
719
744
|
"dispose"
|
|
720
|
-
]
|
|
721
|
-
|
|
745
|
+
],
|
|
746
|
+
methods: {
|
|
747
|
+
autoScroll: remote.defineRemoteMethod(),
|
|
748
|
+
updateWidth: remote.defineRemoteMethod()
|
|
749
|
+
}
|
|
750
|
+
});
|
|
722
751
|
const UiSelectOptionType = "UiSelectOption";
|
|
723
752
|
remote.defineRemoteComponent(
|
|
724
753
|
UiSelectOptionType
|
|
@@ -856,6 +885,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
856
885
|
const noResult = vue.computed(() => i18n.value.t("search.noResult", { filter: state.filter }));
|
|
857
886
|
const optionsRegistry = vue.ref([]);
|
|
858
887
|
const activeOptionId = vue.ref(null);
|
|
888
|
+
const popper = vue.useTemplateRef("popper");
|
|
859
889
|
const selection = vue.computed(() => {
|
|
860
890
|
const model = arraify(state.value);
|
|
861
891
|
const selectedOptions = [];
|
|
@@ -1028,6 +1058,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1028
1058
|
activeOptionId.value = null;
|
|
1029
1059
|
}
|
|
1030
1060
|
};
|
|
1061
|
+
const syncPopper = async () => {
|
|
1062
|
+
if (!state.expanded) {
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
await remote.nextTick();
|
|
1066
|
+
await popper.value?.updateWidth();
|
|
1067
|
+
await popper.value?.autoScroll();
|
|
1068
|
+
};
|
|
1031
1069
|
vue.watch(() => props.expanded, (newVal) => {
|
|
1032
1070
|
state.expanded = newVal;
|
|
1033
1071
|
if (!newVal) {
|
|
@@ -1041,6 +1079,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1041
1079
|
vue.watch(() => state.expanded, (expanded) => {
|
|
1042
1080
|
if (expanded) {
|
|
1043
1081
|
resolveHighlightedOption("selected-first");
|
|
1082
|
+
void syncPopper();
|
|
1044
1083
|
} else {
|
|
1045
1084
|
activeOptionId.value = null;
|
|
1046
1085
|
}
|
|
@@ -1052,7 +1091,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1052
1091
|
const exists = navigableOptions.value.some((option) => option.id === activeOptionId.value);
|
|
1053
1092
|
if (!exists) {
|
|
1054
1093
|
resolveHighlightedOption("selected-first");
|
|
1094
|
+
void syncPopper();
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
vue.watch(activeOptionId, (next, prev) => {
|
|
1098
|
+
if (!state.expanded || next === prev) {
|
|
1099
|
+
return;
|
|
1055
1100
|
}
|
|
1101
|
+
void syncPopper();
|
|
1056
1102
|
});
|
|
1057
1103
|
return (_ctx, _cache) => {
|
|
1058
1104
|
return vue.openBlock(), vue.createBlock(vue.unref(UiPopperConnector), null, {
|
|
@@ -1081,6 +1127,8 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1081
1127
|
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "active-descendant"]),
|
|
1082
1128
|
vue.createVNode(vue.unref(UiSelectPopper), {
|
|
1083
1129
|
id: resolvedId.value,
|
|
1130
|
+
ref_key: "popper",
|
|
1131
|
+
ref: popper,
|
|
1084
1132
|
disabled: __props.disabled || __props.readonly,
|
|
1085
1133
|
multiple: __props.multiple,
|
|
1086
1134
|
opened: state.expanded,
|
package/dist/remote.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { Alignment } from '@floating-ui/dom';
|
|
2
2
|
import { AllowedComponentProps } from 'vue';
|
|
3
3
|
import { Channel } from '@omnicajs/vue-remote/remote';
|
|
4
|
+
import { ComponentCustomProperties } from 'vue';
|
|
4
5
|
import { ComponentCustomProps } from 'vue';
|
|
6
|
+
import { ComponentInternalInstance } from 'vue';
|
|
5
7
|
import { ComponentOptionsBase } from 'vue';
|
|
6
8
|
import { ComponentOptionsMixin } from 'vue';
|
|
7
9
|
import { ComponentProvideOptions } from 'vue';
|
|
10
|
+
import { ComponentPublicInstance } from 'vue';
|
|
8
11
|
import { ComputedOptions } from 'vue';
|
|
9
12
|
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
13
|
+
import { DebuggerEvent } from 'vue';
|
|
10
14
|
import { DefineComponent } from 'vue';
|
|
11
15
|
import { ExtractPropTypes } from 'vue';
|
|
12
16
|
import { GlobalComponents } from 'vue';
|
|
@@ -14,6 +18,8 @@ import { GlobalDirectives } from 'vue';
|
|
|
14
18
|
import { HTMLAttributes } from 'vue';
|
|
15
19
|
import { InjectionKey } from 'vue';
|
|
16
20
|
import { MethodOptions } from 'vue';
|
|
21
|
+
import { nextTick } from 'vue';
|
|
22
|
+
import { OnCleanup } from '@vue/reactivity';
|
|
17
23
|
import { PropType } from 'vue';
|
|
18
24
|
import { PublicProps } from 'vue';
|
|
19
25
|
import { Ref } from 'vue';
|
|
@@ -26,9 +32,13 @@ import { SerializedEvent } from '@omnicajs/vue-remote/types/events';
|
|
|
26
32
|
import { SerializedFocusEvent } from '@omnicajs/vue-remote/types/events';
|
|
27
33
|
import { SerializedInputEvent } from '@omnicajs/vue-remote/types/events';
|
|
28
34
|
import { SerializedKeyboardEvent } from '@omnicajs/vue-remote/types/events';
|
|
35
|
+
import { ShallowUnwrapRef } from 'vue';
|
|
29
36
|
import { Side } from '@floating-ui/dom';
|
|
37
|
+
import { Slot } from 'vue';
|
|
30
38
|
import { Strategy } from '@floating-ui/dom';
|
|
31
39
|
import { VNodeProps } from 'vue';
|
|
40
|
+
import { WatchOptions } from 'vue';
|
|
41
|
+
import { WatchStopHandle } from 'vue';
|
|
32
42
|
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
33
43
|
/** Id для связки label/control */
|
|
34
44
|
id: {
|
|
@@ -360,7 +370,90 @@ declare const __VLS_component_2: DefineComponent<ExtractPropTypes<{
|
|
|
360
370
|
textboxSize: "xs" | "sm" | "lg" | "md" | "xl" | SIZE_4;
|
|
361
371
|
popperFitTrigger: boolean;
|
|
362
372
|
equalsFn: (a: unknown, b: unknown) => boolean;
|
|
363
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
373
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
374
|
+
popper: ({
|
|
375
|
+
$: ComponentInternalInstance;
|
|
376
|
+
$data: {
|
|
377
|
+
[x: string]: never;
|
|
378
|
+
};
|
|
379
|
+
$props: Partial<{}> & Omit<{
|
|
380
|
+
readonly [x: string]: any;
|
|
381
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>;
|
|
382
|
+
$attrs: {
|
|
383
|
+
[x: string]: unknown;
|
|
384
|
+
};
|
|
385
|
+
$refs: {
|
|
386
|
+
[x: string]: unknown;
|
|
387
|
+
};
|
|
388
|
+
$slots: Readonly<{
|
|
389
|
+
[name: string]: Slot<any> | undefined;
|
|
390
|
+
}>;
|
|
391
|
+
$root: ComponentPublicInstance | null;
|
|
392
|
+
$parent: ComponentPublicInstance | null;
|
|
393
|
+
$host: Element | null;
|
|
394
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
395
|
+
$el: any;
|
|
396
|
+
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<RemoteProperties<UiSelectPopperProperties>>>, {
|
|
397
|
+
[x: string]: unknown;
|
|
398
|
+
}, {
|
|
399
|
+
[x: string]: never;
|
|
400
|
+
}, {
|
|
401
|
+
[x: string]: never;
|
|
402
|
+
}, {
|
|
403
|
+
autoScroll: () => Promise<void>;
|
|
404
|
+
updateWidth: () => Promise<void>;
|
|
405
|
+
}, {
|
|
406
|
+
'update:visible': (visible: boolean) => boolean;
|
|
407
|
+
show: () => boolean;
|
|
408
|
+
hide: () => boolean;
|
|
409
|
+
shown: () => boolean;
|
|
410
|
+
hidden: () => boolean;
|
|
411
|
+
dispose: () => boolean;
|
|
412
|
+
}, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
413
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
414
|
+
created?: (() => void) | (() => void)[];
|
|
415
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
416
|
+
mounted?: (() => void) | (() => void)[];
|
|
417
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
418
|
+
updated?: (() => void) | (() => void)[];
|
|
419
|
+
activated?: (() => void) | (() => void)[];
|
|
420
|
+
deactivated?: (() => void) | (() => void)[];
|
|
421
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
422
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
423
|
+
destroyed?: (() => void) | (() => void)[];
|
|
424
|
+
unmounted?: (() => void) | (() => void)[];
|
|
425
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
426
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
427
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
428
|
+
};
|
|
429
|
+
$forceUpdate: () => void;
|
|
430
|
+
$nextTick: nextTick;
|
|
431
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [
|
|
432
|
+
R,
|
|
433
|
+
R,
|
|
434
|
+
OnCleanup
|
|
435
|
+
]) => any : (...args: [
|
|
436
|
+
any,
|
|
437
|
+
any,
|
|
438
|
+
OnCleanup
|
|
439
|
+
]) => any, options?: WatchOptions): WatchStopHandle;
|
|
440
|
+
} & Readonly<{}> & Omit<Readonly<ExtractPropTypes<RemoteProperties<UiSelectPopperProperties>>>, string> & ShallowUnwrapRef<{
|
|
441
|
+
[x: string]: unknown;
|
|
442
|
+
}> & {
|
|
443
|
+
[x: string]: never;
|
|
444
|
+
} & {
|
|
445
|
+
[x: string]: unknown;
|
|
446
|
+
} & MethodOptions & {
|
|
447
|
+
autoScroll: () => Promise<void>;
|
|
448
|
+
updateWidth: () => Promise<void>;
|
|
449
|
+
} & ComponentCustomProperties & {} & {
|
|
450
|
+
$slots: {
|
|
451
|
+
[x: string]: never;
|
|
452
|
+
} & {
|
|
453
|
+
default?: (...args: never[]) => unknown;
|
|
454
|
+
};
|
|
455
|
+
}) | null;
|
|
456
|
+
}, any>;
|
|
364
457
|
declare const __VLS_component_3: DefineComponent<ExtractPropTypes<{
|
|
365
458
|
/** Значение опции */
|
|
366
459
|
value: {
|
|
@@ -494,7 +587,90 @@ declare function __VLS_template_2(): {
|
|
|
494
587
|
slots: {
|
|
495
588
|
default?(_: {}): any;
|
|
496
589
|
};
|
|
497
|
-
refs: {
|
|
590
|
+
refs: {
|
|
591
|
+
popper: ({
|
|
592
|
+
$: ComponentInternalInstance;
|
|
593
|
+
$data: {
|
|
594
|
+
[x: string]: never;
|
|
595
|
+
};
|
|
596
|
+
$props: Partial<{}> & Omit<{
|
|
597
|
+
readonly [x: string]: any;
|
|
598
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>;
|
|
599
|
+
$attrs: {
|
|
600
|
+
[x: string]: unknown;
|
|
601
|
+
};
|
|
602
|
+
$refs: {
|
|
603
|
+
[x: string]: unknown;
|
|
604
|
+
};
|
|
605
|
+
$slots: Readonly<{
|
|
606
|
+
[name: string]: Slot<any> | undefined;
|
|
607
|
+
}>;
|
|
608
|
+
$root: ComponentPublicInstance | null;
|
|
609
|
+
$parent: ComponentPublicInstance | null;
|
|
610
|
+
$host: Element | null;
|
|
611
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
612
|
+
$el: any;
|
|
613
|
+
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<RemoteProperties<UiSelectPopperProperties>>>, {
|
|
614
|
+
[x: string]: unknown;
|
|
615
|
+
}, {
|
|
616
|
+
[x: string]: never;
|
|
617
|
+
}, {
|
|
618
|
+
[x: string]: never;
|
|
619
|
+
}, {
|
|
620
|
+
autoScroll: () => Promise<void>;
|
|
621
|
+
updateWidth: () => Promise<void>;
|
|
622
|
+
}, {
|
|
623
|
+
'update:visible': (visible: boolean) => boolean;
|
|
624
|
+
show: () => boolean;
|
|
625
|
+
hide: () => boolean;
|
|
626
|
+
shown: () => boolean;
|
|
627
|
+
hidden: () => boolean;
|
|
628
|
+
dispose: () => boolean;
|
|
629
|
+
}, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
630
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
631
|
+
created?: (() => void) | (() => void)[];
|
|
632
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
633
|
+
mounted?: (() => void) | (() => void)[];
|
|
634
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
635
|
+
updated?: (() => void) | (() => void)[];
|
|
636
|
+
activated?: (() => void) | (() => void)[];
|
|
637
|
+
deactivated?: (() => void) | (() => void)[];
|
|
638
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
639
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
640
|
+
destroyed?: (() => void) | (() => void)[];
|
|
641
|
+
unmounted?: (() => void) | (() => void)[];
|
|
642
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
643
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
644
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
645
|
+
};
|
|
646
|
+
$forceUpdate: () => void;
|
|
647
|
+
$nextTick: nextTick;
|
|
648
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [
|
|
649
|
+
R,
|
|
650
|
+
R,
|
|
651
|
+
OnCleanup
|
|
652
|
+
]) => any : (...args: [
|
|
653
|
+
any,
|
|
654
|
+
any,
|
|
655
|
+
OnCleanup
|
|
656
|
+
]) => any, options?: WatchOptions): WatchStopHandle;
|
|
657
|
+
} & Readonly<{}> & Omit<Readonly<ExtractPropTypes<RemoteProperties<UiSelectPopperProperties>>>, string> & ShallowUnwrapRef<{
|
|
658
|
+
[x: string]: unknown;
|
|
659
|
+
}> & {
|
|
660
|
+
[x: string]: never;
|
|
661
|
+
} & {
|
|
662
|
+
[x: string]: unknown;
|
|
663
|
+
} & MethodOptions & {
|
|
664
|
+
autoScroll: () => Promise<void>;
|
|
665
|
+
updateWidth: () => Promise<void>;
|
|
666
|
+
} & ComponentCustomProperties & {} & {
|
|
667
|
+
$slots: {
|
|
668
|
+
[x: string]: never;
|
|
669
|
+
} & {
|
|
670
|
+
default?: (...args: never[]) => unknown;
|
|
671
|
+
};
|
|
672
|
+
}) | null;
|
|
673
|
+
};
|
|
498
674
|
rootEl: any;
|
|
499
675
|
};
|
|
500
676
|
declare function __VLS_template_3(): {
|
|
@@ -1546,7 +1722,11 @@ export declare const UiDatePicker: {
|
|
|
1546
1722
|
[x: string]: never;
|
|
1547
1723
|
}, {
|
|
1548
1724
|
[x: string]: never;
|
|
1549
|
-
},
|
|
1725
|
+
}, {
|
|
1726
|
+
open: () => Promise<void>;
|
|
1727
|
+
close: () => Promise<void>;
|
|
1728
|
+
toggle: () => Promise<void>;
|
|
1729
|
+
}, {
|
|
1550
1730
|
open: () => boolean;
|
|
1551
1731
|
close: () => boolean;
|
|
1552
1732
|
change: (value: Date | Date[] | null) => boolean;
|
|
@@ -1571,7 +1751,11 @@ export declare const UiDatePicker: {
|
|
|
1571
1751
|
[x: string]: never;
|
|
1572
1752
|
}, ComputedOptions & {
|
|
1573
1753
|
[x: string]: never;
|
|
1574
|
-
}, MethodOptions
|
|
1754
|
+
}, MethodOptions & {
|
|
1755
|
+
open: () => Promise<void>;
|
|
1756
|
+
close: () => Promise<void>;
|
|
1757
|
+
toggle: () => Promise<void>;
|
|
1758
|
+
}, {}>;
|
|
1575
1759
|
__isFragment?: never;
|
|
1576
1760
|
__isTeleport?: never;
|
|
1577
1761
|
__isSuspense?: never;
|
|
@@ -1581,7 +1765,11 @@ export declare const UiDatePicker: {
|
|
|
1581
1765
|
[x: string]: never;
|
|
1582
1766
|
}, {
|
|
1583
1767
|
[x: string]: never;
|
|
1584
|
-
},
|
|
1768
|
+
}, {
|
|
1769
|
+
open: () => Promise<void>;
|
|
1770
|
+
close: () => Promise<void>;
|
|
1771
|
+
toggle: () => Promise<void>;
|
|
1772
|
+
}, {
|
|
1585
1773
|
open: () => boolean;
|
|
1586
1774
|
close: () => boolean;
|
|
1587
1775
|
change: (value: Date | Date[] | null) => boolean;
|
|
@@ -2807,7 +2995,16 @@ export declare const UiTextbox: {
|
|
|
2807
2995
|
[x: string]: never;
|
|
2808
2996
|
}, {
|
|
2809
2997
|
[x: string]: never;
|
|
2810
|
-
},
|
|
2998
|
+
}, {
|
|
2999
|
+
getSelectionStart: () => Promise<number | null>;
|
|
3000
|
+
getSelectionEnd: () => Promise<number | null>;
|
|
3001
|
+
setSelectionRange: (start: number, end: number) => Promise<void>;
|
|
3002
|
+
focus: () => Promise<void>;
|
|
3003
|
+
blur: () => Promise<void>;
|
|
3004
|
+
select: () => Promise<void>;
|
|
3005
|
+
insert: (value: string) => Promise<void>;
|
|
3006
|
+
clear: () => Promise<void>;
|
|
3007
|
+
}, {
|
|
2811
3008
|
input: (event: SerializedInputEvent) => boolean;
|
|
2812
3009
|
keydown: (event: SerializedKeyboardEvent) => boolean;
|
|
2813
3010
|
paste: (event: SerializedEvent) => boolean;
|
|
@@ -2837,7 +3034,16 @@ export declare const UiTextbox: {
|
|
|
2837
3034
|
[x: string]: never;
|
|
2838
3035
|
}, ComputedOptions & {
|
|
2839
3036
|
[x: string]: never;
|
|
2840
|
-
}, MethodOptions
|
|
3037
|
+
}, MethodOptions & {
|
|
3038
|
+
getSelectionStart: () => Promise<number | null>;
|
|
3039
|
+
getSelectionEnd: () => Promise<number | null>;
|
|
3040
|
+
setSelectionRange: (start: number, end: number) => Promise<void>;
|
|
3041
|
+
focus: () => Promise<void>;
|
|
3042
|
+
blur: () => Promise<void>;
|
|
3043
|
+
select: () => Promise<void>;
|
|
3044
|
+
insert: (value: string) => Promise<void>;
|
|
3045
|
+
clear: () => Promise<void>;
|
|
3046
|
+
}, {}>;
|
|
2841
3047
|
__isFragment?: never;
|
|
2842
3048
|
__isTeleport?: never;
|
|
2843
3049
|
__isSuspense?: never;
|
|
@@ -2847,7 +3053,16 @@ export declare const UiTextbox: {
|
|
|
2847
3053
|
[x: string]: never;
|
|
2848
3054
|
}, {
|
|
2849
3055
|
[x: string]: never;
|
|
2850
|
-
},
|
|
3056
|
+
}, {
|
|
3057
|
+
getSelectionStart: () => Promise<number | null>;
|
|
3058
|
+
getSelectionEnd: () => Promise<number | null>;
|
|
3059
|
+
setSelectionRange: (start: number, end: number) => Promise<void>;
|
|
3060
|
+
focus: () => Promise<void>;
|
|
3061
|
+
blur: () => Promise<void>;
|
|
3062
|
+
select: () => Promise<void>;
|
|
3063
|
+
insert: (value: string) => Promise<void>;
|
|
3064
|
+
clear: () => Promise<void>;
|
|
3065
|
+
}, {
|
|
2851
3066
|
input: (event: SerializedInputEvent) => boolean;
|
|
2852
3067
|
keydown: (event: SerializedKeyboardEvent) => boolean;
|
|
2853
3068
|
paste: (event: SerializedEvent) => boolean;
|
|
@@ -2914,7 +3129,11 @@ export declare const UiTimePicker: {
|
|
|
2914
3129
|
[x: string]: never;
|
|
2915
3130
|
}, {
|
|
2916
3131
|
[x: string]: never;
|
|
2917
|
-
},
|
|
3132
|
+
}, {
|
|
3133
|
+
open: () => Promise<void>;
|
|
3134
|
+
close: () => Promise<void>;
|
|
3135
|
+
focus: () => Promise<void>;
|
|
3136
|
+
}, {
|
|
2918
3137
|
change: (value: string) => boolean;
|
|
2919
3138
|
'update:value': (value: string) => boolean;
|
|
2920
3139
|
focus: (event: FocusEvent) => boolean;
|
|
@@ -2939,7 +3158,11 @@ export declare const UiTimePicker: {
|
|
|
2939
3158
|
[x: string]: never;
|
|
2940
3159
|
}, ComputedOptions & {
|
|
2941
3160
|
[x: string]: never;
|
|
2942
|
-
}, MethodOptions
|
|
3161
|
+
}, MethodOptions & {
|
|
3162
|
+
open: () => Promise<void>;
|
|
3163
|
+
close: () => Promise<void>;
|
|
3164
|
+
focus: () => Promise<void>;
|
|
3165
|
+
}, {}>;
|
|
2943
3166
|
__isFragment?: never;
|
|
2944
3167
|
__isTeleport?: never;
|
|
2945
3168
|
__isSuspense?: never;
|
|
@@ -2949,7 +3172,11 @@ export declare const UiTimePicker: {
|
|
|
2949
3172
|
[x: string]: never;
|
|
2950
3173
|
}, {
|
|
2951
3174
|
[x: string]: never;
|
|
2952
|
-
},
|
|
3175
|
+
}, {
|
|
3176
|
+
open: () => Promise<void>;
|
|
3177
|
+
close: () => Promise<void>;
|
|
3178
|
+
focus: () => Promise<void>;
|
|
3179
|
+
}, {
|
|
2953
3180
|
change: (value: string) => boolean;
|
|
2954
3181
|
'update:value': (value: string) => boolean;
|
|
2955
3182
|
focus: (event: FocusEvent) => boolean;
|
package/dist/remote.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineRemoteComponent, createRemoteRoot } from "@omnicajs/vue-remote/remote";
|
|
2
|
-
import { openBlock, createElementBlock, createElementVNode, defineComponent, mergeProps, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, unref, withCtx, reactive, computed, inject, ref, provide, watch, createBlock, onBeforeMount, onBeforeUnmount, createSlots, onMounted, getCurrentInstance } from "vue";
|
|
1
|
+
import { defineRemoteComponent, defineRemoteMethod, nextTick, createRemoteRoot } from "@omnicajs/vue-remote/remote";
|
|
2
|
+
import { openBlock, createElementBlock, createElementVNode, defineComponent, mergeProps, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, unref, withCtx, reactive, computed, inject, ref, useTemplateRef, provide, watch, createBlock, onBeforeMount, onBeforeUnmount, createSlots, onMounted, getCurrentInstance } from "vue";
|
|
3
3
|
import isEqual from "lodash.isequal";
|
|
4
4
|
import { preview } from "@retailcrm/image-preview";
|
|
5
5
|
import { ru, es, enGB } from "date-fns/locale";
|
|
@@ -104,15 +104,19 @@ const UiCopyButton = defineRemoteComponent(
|
|
|
104
104
|
const UiDateType = "UiDate";
|
|
105
105
|
const UiDate = defineRemoteComponent(UiDateType);
|
|
106
106
|
const UiDatePickerType = "UiDatePicker";
|
|
107
|
-
const UiDatePicker = defineRemoteComponent(
|
|
108
|
-
|
|
109
|
-
[
|
|
107
|
+
const UiDatePicker = defineRemoteComponent(UiDatePickerType, {
|
|
108
|
+
emits: [
|
|
110
109
|
"open",
|
|
111
110
|
"close",
|
|
112
111
|
"change",
|
|
113
112
|
"update:value"
|
|
114
|
-
]
|
|
115
|
-
|
|
113
|
+
],
|
|
114
|
+
methods: {
|
|
115
|
+
open: defineRemoteMethod(),
|
|
116
|
+
close: defineRemoteMethod(),
|
|
117
|
+
toggle: defineRemoteMethod()
|
|
118
|
+
}
|
|
119
|
+
});
|
|
116
120
|
const UiErrorType = "UiError";
|
|
117
121
|
const UiError = defineRemoteComponent(
|
|
118
122
|
UiErrorType,
|
|
@@ -434,20 +438,33 @@ const events = [
|
|
|
434
438
|
"clear"
|
|
435
439
|
];
|
|
436
440
|
const UiTextboxType = "UiTextbox";
|
|
437
|
-
const UiTextbox = defineRemoteComponent(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
)
|
|
441
|
+
const UiTextbox = defineRemoteComponent(UiTextboxType, {
|
|
442
|
+
emits: events,
|
|
443
|
+
methods: {
|
|
444
|
+
getSelectionStart: defineRemoteMethod(),
|
|
445
|
+
getSelectionEnd: defineRemoteMethod(),
|
|
446
|
+
setSelectionRange: defineRemoteMethod(),
|
|
447
|
+
focus: defineRemoteMethod(),
|
|
448
|
+
blur: defineRemoteMethod(),
|
|
449
|
+
select: defineRemoteMethod(),
|
|
450
|
+
insert: defineRemoteMethod(),
|
|
451
|
+
clear: defineRemoteMethod()
|
|
452
|
+
}
|
|
453
|
+
});
|
|
441
454
|
const UiTimePickerType = "UiTimePicker";
|
|
442
|
-
const UiTimePicker = defineRemoteComponent(
|
|
443
|
-
|
|
444
|
-
[
|
|
455
|
+
const UiTimePicker = defineRemoteComponent(UiTimePickerType, {
|
|
456
|
+
emits: [
|
|
445
457
|
"change",
|
|
446
458
|
"update:value",
|
|
447
459
|
"focus",
|
|
448
460
|
"blur"
|
|
449
|
-
]
|
|
450
|
-
|
|
461
|
+
],
|
|
462
|
+
methods: {
|
|
463
|
+
open: defineRemoteMethod(),
|
|
464
|
+
close: defineRemoteMethod(),
|
|
465
|
+
focus: defineRemoteMethod()
|
|
466
|
+
}
|
|
467
|
+
});
|
|
451
468
|
const UiToolbarButtonType = "UiToolbarButton";
|
|
452
469
|
const UiToolbarButton = defineRemoteComponent(
|
|
453
470
|
UiToolbarButtonType,
|
|
@@ -693,9 +710,8 @@ const RegisterHeaderOptionKey = Symbol("UiSelectOptionGroupRegisterHeaderOption"
|
|
|
693
710
|
const UnregisterHeaderOptionKey = Symbol("UiSelectOptionGroupUnregisterHeaderOption");
|
|
694
711
|
const I18nInjectKey = Symbol("$embedI18n");
|
|
695
712
|
const UiSelectTriggerType = "UiSelectTrigger";
|
|
696
|
-
const UiSelectTrigger = defineRemoteComponent(
|
|
697
|
-
|
|
698
|
-
[
|
|
713
|
+
const UiSelectTrigger = defineRemoteComponent(UiSelectTriggerType, {
|
|
714
|
+
emits: [
|
|
699
715
|
"input",
|
|
700
716
|
"focus",
|
|
701
717
|
"blur",
|
|
@@ -703,20 +719,33 @@ const UiSelectTrigger = defineRemoteComponent(
|
|
|
703
719
|
"clear",
|
|
704
720
|
"update:value",
|
|
705
721
|
"update:expanded"
|
|
706
|
-
]
|
|
707
|
-
|
|
722
|
+
],
|
|
723
|
+
methods: {
|
|
724
|
+
open: defineRemoteMethod(),
|
|
725
|
+
close: defineRemoteMethod(),
|
|
726
|
+
onClick: defineRemoteMethod(),
|
|
727
|
+
onKeyDown: defineRemoteMethod(),
|
|
728
|
+
onInput: defineRemoteMethod(),
|
|
729
|
+
onFocus: defineRemoteMethod(),
|
|
730
|
+
onBlur: defineRemoteMethod(),
|
|
731
|
+
onClear: defineRemoteMethod()
|
|
732
|
+
}
|
|
733
|
+
});
|
|
708
734
|
const UiSelectPopperType = "UiSelectPopper";
|
|
709
|
-
const UiSelectPopper = defineRemoteComponent(
|
|
710
|
-
|
|
711
|
-
[
|
|
735
|
+
const UiSelectPopper = defineRemoteComponent(UiSelectPopperType, {
|
|
736
|
+
emits: [
|
|
712
737
|
"update:visible",
|
|
713
738
|
"show",
|
|
714
739
|
"hide",
|
|
715
740
|
"shown",
|
|
716
741
|
"hidden",
|
|
717
742
|
"dispose"
|
|
718
|
-
]
|
|
719
|
-
|
|
743
|
+
],
|
|
744
|
+
methods: {
|
|
745
|
+
autoScroll: defineRemoteMethod(),
|
|
746
|
+
updateWidth: defineRemoteMethod()
|
|
747
|
+
}
|
|
748
|
+
});
|
|
720
749
|
const UiSelectOptionType = "UiSelectOption";
|
|
721
750
|
defineRemoteComponent(
|
|
722
751
|
UiSelectOptionType
|
|
@@ -854,6 +883,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
854
883
|
const noResult = computed(() => i18n.value.t("search.noResult", { filter: state.filter }));
|
|
855
884
|
const optionsRegistry = ref([]);
|
|
856
885
|
const activeOptionId = ref(null);
|
|
886
|
+
const popper = useTemplateRef("popper");
|
|
857
887
|
const selection = computed(() => {
|
|
858
888
|
const model = arraify(state.value);
|
|
859
889
|
const selectedOptions = [];
|
|
@@ -1026,6 +1056,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1026
1056
|
activeOptionId.value = null;
|
|
1027
1057
|
}
|
|
1028
1058
|
};
|
|
1059
|
+
const syncPopper = async () => {
|
|
1060
|
+
if (!state.expanded) {
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
await nextTick();
|
|
1064
|
+
await popper.value?.updateWidth();
|
|
1065
|
+
await popper.value?.autoScroll();
|
|
1066
|
+
};
|
|
1029
1067
|
watch(() => props.expanded, (newVal) => {
|
|
1030
1068
|
state.expanded = newVal;
|
|
1031
1069
|
if (!newVal) {
|
|
@@ -1039,6 +1077,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1039
1077
|
watch(() => state.expanded, (expanded) => {
|
|
1040
1078
|
if (expanded) {
|
|
1041
1079
|
resolveHighlightedOption("selected-first");
|
|
1080
|
+
void syncPopper();
|
|
1042
1081
|
} else {
|
|
1043
1082
|
activeOptionId.value = null;
|
|
1044
1083
|
}
|
|
@@ -1050,7 +1089,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1050
1089
|
const exists = navigableOptions.value.some((option) => option.id === activeOptionId.value);
|
|
1051
1090
|
if (!exists) {
|
|
1052
1091
|
resolveHighlightedOption("selected-first");
|
|
1092
|
+
void syncPopper();
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
watch(activeOptionId, (next, prev) => {
|
|
1096
|
+
if (!state.expanded || next === prev) {
|
|
1097
|
+
return;
|
|
1053
1098
|
}
|
|
1099
|
+
void syncPopper();
|
|
1054
1100
|
});
|
|
1055
1101
|
return (_ctx, _cache) => {
|
|
1056
1102
|
return openBlock(), createBlock(unref(UiPopperConnector), null, {
|
|
@@ -1079,6 +1125,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1079
1125
|
}), null, 16, ["id", "value", "multiple", "selection", "filter", "filterable", "clearable", "expanded", "invalid", "disabled", "readonly", "placeholder-only", "placeholder", "textbox-size", "active-descendant"]),
|
|
1080
1126
|
createVNode(unref(UiSelectPopper), {
|
|
1081
1127
|
id: resolvedId.value,
|
|
1128
|
+
ref_key: "popper",
|
|
1129
|
+
ref: popper,
|
|
1082
1130
|
disabled: __props.disabled || __props.readonly,
|
|
1083
1131
|
multiple: __props.multiple,
|
|
1084
1132
|
opened: state.expanded,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retailcrm/embed-ui-v1-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.12",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RetailDriverLLC <integration@retailcrm.ru>",
|
|
7
7
|
"repository": "git@github.com:retailcrm/embed-ui.git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vue": "^3.5"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@omnicajs/vue-remote": "^0.2.
|
|
57
|
+
"@omnicajs/vue-remote": "^0.2.18",
|
|
58
58
|
"@remote-ui/rpc": "^1.4.7",
|
|
59
59
|
"@retailcrm/image-preview": "^1.0.2",
|
|
60
60
|
"date-fns": "^4.1.0",
|