@ironsource/shared-ui 2.1.12-rc.25 → 2.1.12-rc.26
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/ChartPlane.vue_vue_type_style_index_0_scoped_ff7e556e_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_0963bb3c_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_1f7f7f9c_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css +1 -0
- package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +1 -1
- package/components/chart/ChartPlane.vue.d.ts +1 -1
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +141 -141
- package/components/chart/index.d.ts +24 -24
- package/components/chart/utils/utils.d.ts +1 -2
- package/components/chart/utils/utils.js +13 -19
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +17 -9
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +133 -123
- package/components/dropdown/v4/DropdownV4.vue.d.ts +5 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +41 -39
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +41 -39
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
- package/components/dropdown/v4/index.d.ts +452 -107
- package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
- package/components/includeExclude/index.d.ts +40 -40
- package/components/switch/v4/SwitchV4.vue.d.ts +11 -0
- package/components/switch/v4/SwitchV4.vue.js +2 -2
- package/components/switch/v4/SwitchV4.vue2.js +39 -26
- package/components/switch/v4/index.d.ts +18 -0
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +4 -4
- package/index.d.ts +955 -229
- package/mocks/optionsWithIcons.d.ts +1 -0
- package/package.json +1 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_92ead583_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_3dc741c1_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_fa120cf6_lang.css +0 -1
- package/components/chart/composables/useChartValues.d.ts +0 -12
- package/components/chart/composables/useChartValues.js +0 -32
|
@@ -23,12 +23,12 @@ declare const ChartTypes: () => ({
|
|
|
23
23
|
yAxisFormat: import("./types").ValueFormat;
|
|
24
24
|
valueSuffix: string;
|
|
25
25
|
valuePrefix: string;
|
|
26
|
-
dataSets: import("./types").ChartDataSet[];
|
|
27
26
|
trendTooltip: any;
|
|
28
27
|
subheader: string;
|
|
29
28
|
subheaderTooltip: any;
|
|
30
29
|
trendValue: string | number;
|
|
31
30
|
trendDirection: TrendDirection;
|
|
31
|
+
dataSets: import("./types").ChartDataSet[];
|
|
32
32
|
tickCount: number;
|
|
33
33
|
truncateTickLabels: boolean;
|
|
34
34
|
keepSubheaderVisible: boolean;
|
|
@@ -118,11 +118,6 @@ declare const ChartTypes: () => ({
|
|
|
118
118
|
type: import("vue").PropType<string>;
|
|
119
119
|
default: string;
|
|
120
120
|
};
|
|
121
|
-
dataSets: {
|
|
122
|
-
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
123
|
-
required: true;
|
|
124
|
-
default: () => any[];
|
|
125
|
-
};
|
|
126
121
|
trendTooltip: {
|
|
127
122
|
type: import("vue").PropType<{
|
|
128
123
|
header?: string;
|
|
@@ -150,6 +145,11 @@ declare const ChartTypes: () => ({
|
|
|
150
145
|
type: import("vue").PropType<TrendDirection>;
|
|
151
146
|
default: TrendDirection;
|
|
152
147
|
};
|
|
148
|
+
dataSets: {
|
|
149
|
+
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
150
|
+
required: true;
|
|
151
|
+
default: () => any[];
|
|
152
|
+
};
|
|
153
153
|
tickCount: {
|
|
154
154
|
type: import("vue").PropType<number>;
|
|
155
155
|
default: number;
|
|
@@ -214,7 +214,7 @@ declare const ChartTypes: () => ({
|
|
|
214
214
|
"onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
|
|
215
215
|
"onUpdate:sortSelected"?: (sortOption: unknown) => any;
|
|
216
216
|
"onUpdate:chartType"?: (chartType: ChartType) => any;
|
|
217
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "
|
|
217
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "loading" | "visibleIds" | "minVisible" | "maxVisible" | "maxLimitTooltipText" | "sortSelected" | "sortOptions" | "sortOptionNameKey" | "chartType" | "hideLegend" | "xAxisFormat" | "xAxisDateInterval" | "totalsChart" | "parsing" | "yAxisFormat" | "valueSuffix" | "valuePrefix" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "dataSets" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts">;
|
|
218
218
|
$attrs: {
|
|
219
219
|
[x: string]: unknown;
|
|
220
220
|
};
|
|
@@ -302,11 +302,6 @@ declare const ChartTypes: () => ({
|
|
|
302
302
|
type: import("vue").PropType<string>;
|
|
303
303
|
default: string;
|
|
304
304
|
};
|
|
305
|
-
dataSets: {
|
|
306
|
-
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
307
|
-
required: true;
|
|
308
|
-
default: () => any[];
|
|
309
|
-
};
|
|
310
305
|
trendTooltip: {
|
|
311
306
|
type: import("vue").PropType<{
|
|
312
307
|
header?: string;
|
|
@@ -334,6 +329,11 @@ declare const ChartTypes: () => ({
|
|
|
334
329
|
type: import("vue").PropType<TrendDirection>;
|
|
335
330
|
default: TrendDirection;
|
|
336
331
|
};
|
|
332
|
+
dataSets: {
|
|
333
|
+
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
334
|
+
required: true;
|
|
335
|
+
default: () => any[];
|
|
336
|
+
};
|
|
337
337
|
tickCount: {
|
|
338
338
|
type: import("vue").PropType<number>;
|
|
339
339
|
default: number;
|
|
@@ -421,12 +421,12 @@ declare const ChartTypes: () => ({
|
|
|
421
421
|
yAxisFormat: import("./types").ValueFormat;
|
|
422
422
|
valueSuffix: string;
|
|
423
423
|
valuePrefix: string;
|
|
424
|
-
dataSets: import("./types").ChartDataSet[];
|
|
425
424
|
trendTooltip: any;
|
|
426
425
|
subheader: string;
|
|
427
426
|
subheaderTooltip: any;
|
|
428
427
|
trendValue: string | number;
|
|
429
428
|
trendDirection: TrendDirection;
|
|
429
|
+
dataSets: import("./types").ChartDataSet[];
|
|
430
430
|
tickCount: number;
|
|
431
431
|
truncateTickLabels: boolean;
|
|
432
432
|
keepSubheaderVisible: boolean;
|
|
@@ -536,11 +536,6 @@ declare const ChartTypes: () => ({
|
|
|
536
536
|
type: import("vue").PropType<string>;
|
|
537
537
|
default: string;
|
|
538
538
|
};
|
|
539
|
-
dataSets: {
|
|
540
|
-
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
541
|
-
required: true;
|
|
542
|
-
default: () => any[];
|
|
543
|
-
};
|
|
544
539
|
trendTooltip: {
|
|
545
540
|
type: import("vue").PropType<{
|
|
546
541
|
header?: string;
|
|
@@ -568,6 +563,11 @@ declare const ChartTypes: () => ({
|
|
|
568
563
|
type: import("vue").PropType<TrendDirection>;
|
|
569
564
|
default: TrendDirection;
|
|
570
565
|
};
|
|
566
|
+
dataSets: {
|
|
567
|
+
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
568
|
+
required: true;
|
|
569
|
+
default: () => any[];
|
|
570
|
+
};
|
|
571
571
|
tickCount: {
|
|
572
572
|
type: import("vue").PropType<number>;
|
|
573
573
|
default: number;
|
|
@@ -710,11 +710,6 @@ declare const ChartTypes: () => ({
|
|
|
710
710
|
type: import("vue").PropType<string>;
|
|
711
711
|
default: string;
|
|
712
712
|
};
|
|
713
|
-
dataSets: {
|
|
714
|
-
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
715
|
-
required: true;
|
|
716
|
-
default: () => any[];
|
|
717
|
-
};
|
|
718
713
|
trendTooltip: {
|
|
719
714
|
type: import("vue").PropType<{
|
|
720
715
|
header?: string;
|
|
@@ -742,6 +737,11 @@ declare const ChartTypes: () => ({
|
|
|
742
737
|
type: import("vue").PropType<TrendDirection>;
|
|
743
738
|
default: TrendDirection;
|
|
744
739
|
};
|
|
740
|
+
dataSets: {
|
|
741
|
+
type: import("vue").PropType<import("./types").ChartDataSet[]>;
|
|
742
|
+
required: true;
|
|
743
|
+
default: () => any[];
|
|
744
|
+
};
|
|
745
745
|
tickCount: {
|
|
746
746
|
type: import("vue").PropType<number>;
|
|
747
747
|
default: number;
|
|
@@ -829,12 +829,12 @@ declare const ChartTypes: () => ({
|
|
|
829
829
|
yAxisFormat: import("./types").ValueFormat;
|
|
830
830
|
valueSuffix: string;
|
|
831
831
|
valuePrefix: string;
|
|
832
|
-
dataSets: import("./types").ChartDataSet[];
|
|
833
832
|
trendTooltip: any;
|
|
834
833
|
subheader: string;
|
|
835
834
|
subheaderTooltip: any;
|
|
836
835
|
trendValue: string | number;
|
|
837
836
|
trendDirection: TrendDirection;
|
|
837
|
+
dataSets: import("./types").ChartDataSet[];
|
|
838
838
|
tickCount: number;
|
|
839
839
|
truncateTickLabels: boolean;
|
|
840
840
|
keepSubheaderVisible: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { PrepareTicksLabelArgs, ValueFormat } from '@/components/chart/types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat) => string;
|
|
2
|
+
export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat, formatLowDigits?: boolean) => string;
|
|
4
3
|
export declare const prepareTickLabel: ({ label, format, availableSpace, truncate, }: PrepareTicksLabelArgs) => string | string[];
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import { format as
|
|
2
|
-
import { TICK_LABEL_FONT as
|
|
3
|
-
import { nFormatter as
|
|
4
|
-
import { truncateTextToFit as
|
|
5
|
-
import { REGEX_LINEBREAK as
|
|
6
|
-
const
|
|
7
|
-
if (e === 0)
|
|
8
|
-
return 0;
|
|
9
|
-
const n = t - r, o = n / e * 0.4;
|
|
10
|
-
return (n + o) / e;
|
|
11
|
-
}, a = (r, t) => t === "day" ? f(new Date(r), "EEEE") : t === "number" ? d(r) : t === "date" ? f(new Date(r), "MMM dd") : t === "dateLong" ? f(new Date(r), "MMM dd, yyyy") : String(r), w = ({
|
|
1
|
+
import { format as e } from "date-fns";
|
|
2
|
+
import { TICK_LABEL_FONT as p } from "../consts.js";
|
|
3
|
+
import { nFormatter as E } from "../../../utils/formatNumbers.js";
|
|
4
|
+
import { truncateTextToFit as a } from "../../../utils/text.js";
|
|
5
|
+
import { REGEX_LINEBREAK as m } from "../../../consts/regex.js";
|
|
6
|
+
const c = (r, t, n = !1) => t === "day" ? e(new Date(r), "EEEE") : t === "number" ? E(r, n) : t === "date" ? e(new Date(r), "MMM dd") : t === "dateLong" ? e(new Date(r), "MMM dd, yyyy") : String(r), w = ({
|
|
12
7
|
label: r,
|
|
13
8
|
format: t,
|
|
14
|
-
availableSpace:
|
|
15
|
-
truncate:
|
|
9
|
+
availableSpace: n,
|
|
10
|
+
truncate: i = !1
|
|
16
11
|
}) => {
|
|
17
|
-
const s =
|
|
18
|
-
const
|
|
19
|
-
return
|
|
12
|
+
const s = m.test(r), o = (d) => {
|
|
13
|
+
const f = c(d, t);
|
|
14
|
+
return i && n > 0 ? a(f, p, n) : f;
|
|
20
15
|
};
|
|
21
|
-
return s ? r.split(
|
|
16
|
+
return s ? r.split(m).map(o) : o(r);
|
|
22
17
|
};
|
|
23
18
|
export {
|
|
24
|
-
|
|
25
|
-
a as formatValue,
|
|
19
|
+
c as formatValue,
|
|
26
20
|
w as prepareTickLabel
|
|
27
21
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { IconTypes } from '@is-ssp/icon/v4/Icon.types';
|
|
2
1
|
type SelectedCondition = {
|
|
3
2
|
label: string;
|
|
4
3
|
value: string;
|
|
5
4
|
multi: boolean;
|
|
6
5
|
};
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
-
selectedCondition: SelectedCondition
|
|
9
|
-
appliedSelections: unknown
|
|
6
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
selectedCondition: SelectedCondition;
|
|
8
|
+
appliedSelections: unknown;
|
|
10
9
|
conditionalOptions: SelectedCondition[];
|
|
11
10
|
label: string;
|
|
12
11
|
testId?: string;
|
|
@@ -24,7 +23,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
24
23
|
optionFlagKey?: string;
|
|
25
24
|
optionIconKey?: string;
|
|
26
25
|
optionImageKey?: string;
|
|
27
|
-
optionIconType?:
|
|
26
|
+
optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
28
27
|
loadingOverride?: boolean;
|
|
29
28
|
triggerShownValuesCount?: number;
|
|
30
29
|
}>, {
|
|
@@ -52,8 +51,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
52
51
|
clear: () => void;
|
|
53
52
|
closed: () => void;
|
|
54
53
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
55
|
-
selectedCondition: SelectedCondition
|
|
56
|
-
appliedSelections: unknown
|
|
54
|
+
selectedCondition: SelectedCondition;
|
|
55
|
+
appliedSelections: unknown;
|
|
57
56
|
conditionalOptions: SelectedCondition[];
|
|
58
57
|
label: string;
|
|
59
58
|
testId?: string;
|
|
@@ -71,7 +70,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
71
70
|
optionFlagKey?: string;
|
|
72
71
|
optionIconKey?: string;
|
|
73
72
|
optionImageKey?: string;
|
|
74
|
-
optionIconType?:
|
|
73
|
+
optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
75
74
|
loadingOverride?: boolean;
|
|
76
75
|
triggerShownValuesCount?: number;
|
|
77
76
|
}>, {
|
|
@@ -107,7 +106,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
107
106
|
optionNameKey: string;
|
|
108
107
|
optionIconKey: string;
|
|
109
108
|
optionImageKey: string;
|
|
110
|
-
optionIconType:
|
|
109
|
+
optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
111
110
|
optionFlagKey: string;
|
|
112
111
|
groupedOptions: boolean;
|
|
113
112
|
comparingKey: string;
|
|
@@ -117,6 +116,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
117
116
|
fetchDataDebounceTime: number;
|
|
118
117
|
autoFocusSearch: boolean;
|
|
119
118
|
loadingOverride: boolean;
|
|
119
|
+
}>, {
|
|
120
|
+
"option-end"?(_: {
|
|
121
|
+
option: any;
|
|
122
|
+
}): any;
|
|
120
123
|
}>;
|
|
121
124
|
export default _default;
|
|
122
125
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -136,3 +139,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
136
139
|
type __VLS_Prettify<T> = {
|
|
137
140
|
[K in keyof T]: T[K];
|
|
138
141
|
} & {};
|
|
142
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
143
|
+
new (): {
|
|
144
|
+
$slots: S;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ConditionalDropdown.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../ConditionalDropdown.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css"; //*');
|
|
4
|
+
const n = /* @__PURE__ */ _(o, [["__scopeId", "data-v-683b8a75"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
n as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../../ConditionalDropdown.
|
|
2
|
-
import
|
|
1
|
+
import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css"; import { defineComponent as W, computed as O, ref as s, watch as h, onMounted as q, openBlock as F, createBlock as G, unref as c, createSlots as H, withCtx as v, createVNode as S, mergeProps as J, createElementVNode as X, isRef as Y, normalizeProps as Z, guardReactiveProps as _, createElementBlock as ee, createTextVNode as le, toDisplayString as oe, createCommentVNode as te, renderSlot as ae } from "vue";
|
|
2
|
+
import L from "./DropdownV4.vue.js";
|
|
3
3
|
import "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import ne from "./ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "./AppDropdownTrigger.vue.js";
|
|
7
7
|
import "./ButtonDropdownTrigger.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import ie from "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useDebounceFn as
|
|
15
|
-
const
|
|
12
|
+
import ue from "../../search/v4/SearchV4.vue.js";
|
|
13
|
+
import re from "../../typography/v4/Typography.vue.js";
|
|
14
|
+
import { useDebounceFn as se } from "@vueuse/core";
|
|
15
|
+
const de = { class: "conditional-container" }, ce = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "custom-list-area"
|
|
18
|
-
},
|
|
18
|
+
}, Ae = /* @__PURE__ */ W({
|
|
19
19
|
__name: "ConditionalDropdown",
|
|
20
20
|
props: {
|
|
21
21
|
selectedCondition: null,
|
|
@@ -42,69 +42,69 @@ const re = { class: "conditional-container" }, se = {
|
|
|
42
42
|
triggerShownValuesCount: { default: 1 }
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:selectedCondition", "update:appliedSelections", "clear", "closed"],
|
|
45
|
-
setup(
|
|
46
|
-
const e =
|
|
45
|
+
setup(i, { emit: C }) {
|
|
46
|
+
const e = i, m = O({
|
|
47
47
|
get: () => e.appliedSelections,
|
|
48
48
|
set: (l) => {
|
|
49
|
-
|
|
49
|
+
C("update:appliedSelections", l);
|
|
50
50
|
}
|
|
51
|
-
}), u =
|
|
51
|
+
}), u = O({
|
|
52
52
|
get: () => e.selectedCondition || e.conditionalOptions[0],
|
|
53
53
|
set: (l) => {
|
|
54
|
-
|
|
54
|
+
C("update:selectedCondition", l);
|
|
55
55
|
}
|
|
56
|
-
}),
|
|
56
|
+
}), k = () => {
|
|
57
57
|
const { appliedSelections: l } = e;
|
|
58
58
|
return l ? Array.isArray(l) ? l : [l] : [];
|
|
59
|
-
},
|
|
60
|
-
const l = p.value ? 4 : 4.5,
|
|
59
|
+
}, T = s(null), p = s(!0), a = s([]), n = s(k()), A = s(!0), d = s(!1), b = s(!1), r = s(e.searchQuery), B = s(""), g = s(e.label), K = s([]), U = O(() => (!r.value || r.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
|
|
60
|
+
const l = p.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
|
|
61
61
|
if (e.groupedOptions) {
|
|
62
|
-
let
|
|
63
|
-
return a.value.forEach((
|
|
64
|
-
|
|
65
|
-
}),
|
|
62
|
+
let o = 0;
|
|
63
|
+
return a.value.forEach((y) => {
|
|
64
|
+
y.options && (o = o + y.options.length);
|
|
65
|
+
}), o > 4 ? o : l;
|
|
66
66
|
}
|
|
67
|
-
return
|
|
68
|
-
}), M = (l,
|
|
69
|
-
if (e.infiniteLoading && u.value.multi && Array.isArray(
|
|
70
|
-
const
|
|
71
|
-
(
|
|
67
|
+
return t > l ? t : l;
|
|
68
|
+
}), M = (l, t) => {
|
|
69
|
+
if (e.infiniteLoading && u.value.multi && Array.isArray(n.value) && n.value.length && l && t.length) {
|
|
70
|
+
const o = [], y = n.value.filter(
|
|
71
|
+
(f) => f[e.optionNameKey].includes(l)
|
|
72
72
|
);
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
(j) => j[e.comparingKey] ===
|
|
76
|
-
) &&
|
|
77
|
-
}),
|
|
78
|
-
(
|
|
73
|
+
return t.forEach((f) => {
|
|
74
|
+
y.find(
|
|
75
|
+
(j) => j[e.comparingKey] === f[e.comparingKey]
|
|
76
|
+
) && o.push(f[e.comparingKey]);
|
|
77
|
+
}), y.filter(
|
|
78
|
+
(f) => !o.includes(f[e.comparingKey])
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
return [];
|
|
82
|
-
},
|
|
82
|
+
}, N = async (l) => {
|
|
83
83
|
try {
|
|
84
84
|
d.value = !0;
|
|
85
|
-
const
|
|
85
|
+
const t = await e.fetchFnCallback(l), o = M(
|
|
86
86
|
l,
|
|
87
|
-
|
|
87
|
+
t
|
|
88
88
|
);
|
|
89
|
-
a.value = [...
|
|
90
|
-
} catch (
|
|
91
|
-
d.value = !1, console.error("Error fetching data:",
|
|
89
|
+
a.value = [...o, ...t], d.value = !1;
|
|
90
|
+
} catch (t) {
|
|
91
|
+
d.value = !1, console.error("Error fetching data:", t);
|
|
92
92
|
}
|
|
93
93
|
}, E = async () => {
|
|
94
94
|
if (e.infiniteLoading)
|
|
95
95
|
try {
|
|
96
|
-
|
|
96
|
+
b.value = !0;
|
|
97
97
|
const l = await e.loadMoreFn();
|
|
98
|
-
|
|
98
|
+
b.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
|
|
99
99
|
} catch (l) {
|
|
100
|
-
|
|
100
|
+
b.value = !1, console.error("Error fetching data:", l);
|
|
101
101
|
}
|
|
102
|
-
},
|
|
103
|
-
|
|
102
|
+
}, P = se(
|
|
103
|
+
N,
|
|
104
104
|
e.fetchDataDebounceTime
|
|
105
|
-
),
|
|
106
|
-
l.length >= e.minCharsToStart ? (
|
|
107
|
-
},
|
|
105
|
+
), w = (l) => {
|
|
106
|
+
l.length >= e.minCharsToStart ? (P(l), T.value?.scrollTo(0)) : e.infiniteLoading && u.value.multi ? a.value = K.value || [] : a.value = [];
|
|
107
|
+
}, Q = () => {
|
|
108
108
|
r.value && a.value.length && !d.value && !u.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
|
|
109
109
|
[e.optionNameKey]: r.value,
|
|
110
110
|
conditionalOptions: !0,
|
|
@@ -119,131 +119,141 @@ const re = { class: "conditional-container" }, se = {
|
|
|
119
119
|
},
|
|
120
120
|
...a.value
|
|
121
121
|
] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
|
|
122
|
-
},
|
|
123
|
-
p.value &&
|
|
122
|
+
}, D = () => {
|
|
123
|
+
p.value && n.value.length === 0 ? g.value = e.label : g.value = `${e.label} ${u.value.label.toLowerCase()}`;
|
|
124
124
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}),
|
|
128
|
-
|
|
129
|
-
}),
|
|
125
|
+
h(r, () => {
|
|
126
|
+
w(r.value);
|
|
127
|
+
}), h([u, a], () => {
|
|
128
|
+
Q();
|
|
129
|
+
}), h(
|
|
130
130
|
() => e.loadingOverride,
|
|
131
|
-
(l,
|
|
132
|
-
!l &&
|
|
131
|
+
(l, t) => {
|
|
132
|
+
!l && t && !e.infiniteLoading && N(e.searchQuery);
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
|
-
const
|
|
136
|
-
p.value &&
|
|
135
|
+
const V = () => {
|
|
136
|
+
p.value && n.value.length === 0 ? (u.value = null, m.value = [], u.value = null) : (B.value = r.value, m.value = p.value ? [...n.value] : { ...n.value }, A.value = p.value), D();
|
|
137
137
|
};
|
|
138
|
-
|
|
139
|
-
u.value.multi ? (d.value = !0, !
|
|
138
|
+
h(u, (l, t) => {
|
|
139
|
+
u.value.multi ? (d.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
|
|
140
140
|
d.value = !1, p.value = !0;
|
|
141
|
-
}, 100)) : (!
|
|
142
|
-
!
|
|
141
|
+
}, 100)) : (!t.multi && !l.multi && (d.value = !0), setTimeout(() => {
|
|
142
|
+
!t.multi && !l.multi && (d.value = !1), p.value = !1;
|
|
143
143
|
}, 100));
|
|
144
|
+
}), h(m, () => {
|
|
145
|
+
n.value = k();
|
|
144
146
|
});
|
|
145
|
-
const
|
|
147
|
+
const $ = (l) => {
|
|
146
148
|
K.value = l;
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
l && u.value.multi && e.infiniteLoading &&
|
|
149
|
+
}, x = () => {
|
|
150
|
+
n.value = [], m.value = [], u.value = null, g.value = e.label, r.value = "", C("clear");
|
|
151
|
+
}, R = (l) => {
|
|
152
|
+
l && u.value.multi && e.infiniteLoading && n.value && (a.value = n.value, r.value && w(r.value));
|
|
151
153
|
};
|
|
152
154
|
q(() => {
|
|
153
|
-
(e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) &&
|
|
155
|
+
(e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && w(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, n.value = e.appliedSelections, K.value = e.appliedSelections), D();
|
|
154
156
|
});
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
+
const z = () => {
|
|
158
|
+
C("closed");
|
|
157
159
|
};
|
|
158
|
-
return (l,
|
|
160
|
+
return (l, t) => (F(), G(c(L), {
|
|
159
161
|
ref_key: "dropdownRef",
|
|
160
|
-
ref:
|
|
161
|
-
selected:
|
|
162
|
-
"onUpdate:selected":
|
|
162
|
+
ref: T,
|
|
163
|
+
selected: n.value,
|
|
164
|
+
"onUpdate:selected": t[2] || (t[2] = (o) => n.value = o),
|
|
163
165
|
"predefined-trigger": "chip",
|
|
164
|
-
"display-value": (
|
|
166
|
+
"display-value": (o) => o?.[i.optionNameKey],
|
|
165
167
|
multi: p.value,
|
|
166
168
|
options: a.value,
|
|
167
|
-
placeholder:
|
|
169
|
+
placeholder: g.value,
|
|
168
170
|
"search-placeholder": "Search",
|
|
169
|
-
"option-name-key":
|
|
171
|
+
"option-name-key": i.optionNameKey,
|
|
170
172
|
"with-conditions": "",
|
|
171
173
|
"inline-search": "",
|
|
172
174
|
"custom-number-of-displayed-options": c(I),
|
|
173
175
|
"options-list-width": "330px",
|
|
174
|
-
loading: d.value ||
|
|
175
|
-
"load-more-loading":
|
|
176
|
-
"comparing-key":
|
|
177
|
-
"is-open":
|
|
178
|
-
"infinite-loading":
|
|
179
|
-
"show-select-all": !
|
|
180
|
-
"grouped-options":
|
|
181
|
-
"option-flag-key":
|
|
182
|
-
"option-image-key":
|
|
183
|
-
"option-icon-key":
|
|
184
|
-
"option-icon-type":
|
|
185
|
-
"trigger-shown-values-count":
|
|
186
|
-
"onUpdate:isOpen":
|
|
187
|
-
onOnsearch:
|
|
188
|
-
onApply:
|
|
176
|
+
loading: d.value || i.loadingOverride,
|
|
177
|
+
"load-more-loading": b.value,
|
|
178
|
+
"comparing-key": i.comparingKey,
|
|
179
|
+
"is-open": i.isOpen,
|
|
180
|
+
"infinite-loading": i.infiniteLoading,
|
|
181
|
+
"show-select-all": !i.infiniteLoading && !r.value,
|
|
182
|
+
"grouped-options": i.groupedOptions,
|
|
183
|
+
"option-flag-key": i.optionFlagKey,
|
|
184
|
+
"option-image-key": i.optionImageKey,
|
|
185
|
+
"option-icon-key": i.optionIconKey,
|
|
186
|
+
"option-icon-type": i.optionIconType,
|
|
187
|
+
"trigger-shown-values-count": i.triggerShownValuesCount,
|
|
188
|
+
"onUpdate:isOpen": R,
|
|
189
|
+
onOnsearch: w,
|
|
190
|
+
onApply: V,
|
|
189
191
|
onLoadMore: E,
|
|
190
|
-
onUnsavedSelectionUpdate:
|
|
191
|
-
onClosed:
|
|
192
|
-
}, {
|
|
193
|
-
"dropdown-trigger":
|
|
194
|
-
|
|
195
|
-
label:
|
|
196
|
-
"selected-option": c(
|
|
197
|
-
multi:
|
|
192
|
+
onUnsavedSelectionUpdate: $,
|
|
193
|
+
onClosed: z
|
|
194
|
+
}, H({
|
|
195
|
+
"dropdown-trigger": v(({ defaultTriggerProps: o }) => [
|
|
196
|
+
S(c(ne), J(o, {
|
|
197
|
+
label: g.value,
|
|
198
|
+
"selected-option": c(m),
|
|
199
|
+
multi: A.value,
|
|
198
200
|
"cancel-all-selected-display": "",
|
|
199
|
-
"display-value-in-quotes": !Array.isArray(
|
|
200
|
-
"shown-values-count":
|
|
201
|
-
onClear:
|
|
201
|
+
"display-value-in-quotes": !Array.isArray(n.value) && n.value.conditionalOptions,
|
|
202
|
+
"shown-values-count": i.triggerShownValuesCount,
|
|
203
|
+
onClear: x
|
|
202
204
|
}), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes", "shown-values-count"])
|
|
203
205
|
]),
|
|
204
|
-
"dropdown-conditions":
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
"dropdown-conditions": v(() => [
|
|
207
|
+
X("div", de, [
|
|
208
|
+
S(c(L), {
|
|
207
209
|
selected: c(u),
|
|
208
|
-
"onUpdate:selected":
|
|
209
|
-
options:
|
|
210
|
+
"onUpdate:selected": t[0] || (t[0] = (o) => Y(u) ? u.value = o : null),
|
|
211
|
+
options: i.conditionalOptions,
|
|
210
212
|
"option-name-key": "label",
|
|
211
|
-
"display-value": (
|
|
213
|
+
"display-value": (o) => o?.label,
|
|
212
214
|
container: ".conditional-container",
|
|
213
215
|
size: "small"
|
|
214
216
|
}, {
|
|
215
|
-
"dropdown-trigger":
|
|
216
|
-
|
|
217
|
+
"dropdown-trigger": v(({ buttonTriggerProps: o }) => [
|
|
218
|
+
S(c(ie), Z(_(o)), null, 16)
|
|
217
219
|
]),
|
|
218
220
|
_: 1
|
|
219
221
|
}, 8, ["selected", "options", "display-value"])
|
|
220
222
|
])
|
|
221
223
|
]),
|
|
222
|
-
"inline-search":
|
|
223
|
-
|
|
224
|
+
"inline-search": v(() => [
|
|
225
|
+
S(c(ue), {
|
|
224
226
|
modelValue: r.value,
|
|
225
|
-
"onUpdate:modelValue":
|
|
227
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
226
228
|
class: "inline-search",
|
|
227
229
|
placeholder: "Search",
|
|
228
230
|
variant: "transparent",
|
|
229
231
|
size: "md",
|
|
230
|
-
"auto-focus":
|
|
232
|
+
"auto-focus": i.autoFocusSearch
|
|
231
233
|
}, null, 8, ["modelValue", "auto-focus"])
|
|
232
234
|
]),
|
|
233
|
-
"custom-list-area":
|
|
234
|
-
!a.value.length && !d.value ? (
|
|
235
|
-
|
|
236
|
-
default:
|
|
237
|
-
|
|
235
|
+
"custom-list-area": v(() => [
|
|
236
|
+
!a.value.length && !d.value ? (F(), ee("div", ce, [
|
|
237
|
+
S(re, { variant: "body1" }, {
|
|
238
|
+
default: v(() => [
|
|
239
|
+
le(oe(c(U)), 1)
|
|
238
240
|
]),
|
|
239
241
|
_: 1
|
|
240
242
|
})
|
|
241
|
-
])) :
|
|
243
|
+
])) : te("", !0)
|
|
242
244
|
]),
|
|
243
|
-
_:
|
|
244
|
-
},
|
|
245
|
+
_: 2
|
|
246
|
+
}, [
|
|
247
|
+
l.$slots["option-end"] ? {
|
|
248
|
+
name: "option-end",
|
|
249
|
+
fn: v(({ option: o }) => [
|
|
250
|
+
ae(l.$slots, "option-end", { option: o }, void 0, !0)
|
|
251
|
+
]),
|
|
252
|
+
key: "0"
|
|
253
|
+
} : void 0
|
|
254
|
+
]), 1032, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "load-more-loading", "comparing-key", "is-open", "infinite-loading", "show-select-all", "grouped-options", "option-flag-key", "option-image-key", "option-icon-key", "option-icon-type", "trigger-shown-values-count"]));
|
|
245
255
|
}
|
|
246
256
|
});
|
|
247
257
|
export {
|
|
248
|
-
|
|
258
|
+
Ae as default
|
|
249
259
|
};
|