@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.
Files changed (43) hide show
  1. package/ChartPlane.vue_vue_type_style_index_0_scoped_ff7e556e_lang.css +1 -0
  2. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css +1 -0
  3. package/DataGrid.vue_vue_type_style_index_0_scoped_0963bb3c_lang.css +1 -0
  4. package/DropdownV4.vue_vue_type_style_index_0_scoped_1f7f7f9c_lang.css +1 -0
  5. package/OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css +1 -0
  6. package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
  7. package/components/chart/Chart.vue.d.ts +1 -1
  8. package/components/chart/ChartPlane.vue.d.ts +1 -1
  9. package/components/chart/ChartPlane.vue.js +3 -3
  10. package/components/chart/ChartPlane.vue2.js +141 -141
  11. package/components/chart/index.d.ts +24 -24
  12. package/components/chart/utils/utils.d.ts +1 -2
  13. package/components/chart/utils/utils.js +13 -19
  14. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +17 -9
  15. package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
  16. package/components/dropdown/v4/ConditionalDropdown.vue2.js +133 -123
  17. package/components/dropdown/v4/DropdownV4.vue.d.ts +5 -0
  18. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  19. package/components/dropdown/v4/DropdownV4.vue2.js +41 -39
  20. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  21. package/components/dropdown/v4/OptionV4.vue2.js +41 -39
  22. package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
  23. package/components/dropdown/v4/index.d.ts +452 -107
  24. package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
  25. package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
  26. package/components/includeExclude/index.d.ts +40 -40
  27. package/components/switch/v4/SwitchV4.vue.d.ts +11 -0
  28. package/components/switch/v4/SwitchV4.vue.js +2 -2
  29. package/components/switch/v4/SwitchV4.vue2.js +39 -26
  30. package/components/switch/v4/index.d.ts +18 -0
  31. package/components/table/v4/DataGrid.vue.js +4 -4
  32. package/components/table/v4/DataGrid.vue2.js +4 -4
  33. package/index.d.ts +955 -229
  34. package/mocks/optionsWithIcons.d.ts +1 -0
  35. package/package.json +1 -1
  36. package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +0 -1
  37. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css +0 -1
  38. package/DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css +0 -1
  39. package/DropdownV4.vue_vue_type_style_index_0_scoped_92ead583_lang.css +0 -1
  40. package/OptionV4.vue_vue_type_style_index_0_scoped_3dc741c1_lang.css +0 -1
  41. package/SwitchV4.vue_vue_type_style_index_0_scoped_fa120cf6_lang.css +0 -1
  42. package/components/chart/composables/useChartValues.d.ts +0 -12
  43. 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" | "dataSets" | "trendTooltip" | "subheader" | "subheaderTooltip" | "trendValue" | "trendDirection" | "tickCount" | "truncateTickLabels" | "keepSubheaderVisible" | "empty" | "noDataIcon" | "noDataTitle" | "noDataSubtitle" | "withAnimation" | "tooltipTotalType" | "tooltipTotalCalcFn" | "tooltipOrder" | "fullHeight" | "fullHeightBottomSpacing" | "withSettingsHeader" | "extraCharts">;
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 calcStepSize: (min: number, max: number, tickCount: number) => number;
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 f } from "date-fns";
2
- import { TICK_LABEL_FONT as c } from "../consts.js";
3
- import { nFormatter as d } from "../../../utils/formatNumbers.js";
4
- import { truncateTextToFit as E } from "../../../utils/text.js";
5
- import { REGEX_LINEBREAK as i } from "../../../consts/regex.js";
6
- const g = (r, t, e) => {
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: e,
15
- truncate: n = !1
9
+ availableSpace: n,
10
+ truncate: i = !1
16
11
  }) => {
17
- const s = i.test(r), o = (p) => {
18
- const m = a(p, t);
19
- return n && e > 0 ? E(m, c, e) : m;
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(i).map(o) : o(r);
16
+ return s ? r.split(m).map(o) : o(r);
22
17
  };
23
18
  export {
24
- g as calcStepSize,
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 | null;
9
- appliedSelections: unknown | 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?: IconTypes;
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 | null;
56
- appliedSelections: unknown | 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?: IconTypes;
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: IconTypes;
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 e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cce87267"]]);
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
- p as default
6
+ n as default
7
7
  };
@@ -1,21 +1,21 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css"; import { defineComponent as W, computed as w, ref as s, watch as O, onMounted as q, openBlock as D, createBlock as G, unref as c, withCtx as f, createVNode as y, mergeProps as H, createElementVNode as J, isRef as X, normalizeProps as Y, guardReactiveProps as Z, createElementBlock as _, createTextVNode as ee, toDisplayString as le, createCommentVNode as oe } from "vue";
2
- import F from "./DropdownV4.vue.js";
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 te from "./ChipDropdownTrigger.vue.js";
5
+ import ne from "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
7
7
  import "./ButtonDropdownTrigger.vue.js";
8
- import ae from "./ButtonFilterDropdownTrigger.vue.js";
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 ne from "../../search/v4/SearchV4.vue.js";
13
- import ie from "../../typography/v4/Typography.vue.js";
14
- import { useDebounceFn as ue } from "@vueuse/core";
15
- const re = { class: "conditional-container" }, se = {
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
- }, ke = /* @__PURE__ */ W({
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(n, { emit: h }) {
46
- const e = n, S = w({
45
+ setup(i, { emit: C }) {
46
+ const e = i, m = O({
47
47
  get: () => e.appliedSelections,
48
48
  set: (l) => {
49
- h("update:appliedSelections", l);
49
+ C("update:appliedSelections", l);
50
50
  }
51
- }), u = w({
51
+ }), u = O({
52
52
  get: () => e.selectedCondition || e.conditionalOptions[0],
53
53
  set: (l) => {
54
- h("update:selectedCondition", l);
54
+ C("update:selectedCondition", l);
55
55
  }
56
- }), L = () => {
56
+ }), k = () => {
57
57
  const { appliedSelections: l } = e;
58
58
  return l ? Array.isArray(l) ? l : [l] : [];
59
- }, k = s(null), p = s(!0), a = s([]), i = s(L()), T = s(!0), d = s(!1), C = s(!1), r = s(e.searchQuery), B = s(""), m = s(e.label), K = s([]), U = w(() => (!r.value || r.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = w(() => {
60
- const l = p.value ? 4 : 4.5, o = a.value.length > 4 ? a.value.length : l;
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 t = 0;
63
- return a.value.forEach((g) => {
64
- g.options && (t = t + g.options.length);
65
- }), t > 4 ? t : l;
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 o > l ? o : l;
68
- }), M = (l, o) => {
69
- if (e.infiniteLoading && u.value.multi && Array.isArray(i.value) && i.value.length && l && o.length) {
70
- const t = [], g = i.value.filter(
71
- (v) => v[e.optionNameKey].includes(l)
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 o.forEach((v) => {
74
- g.find(
75
- (j) => j[e.comparingKey] === v[e.comparingKey]
76
- ) && t.push(v[e.comparingKey]);
77
- }), g.filter(
78
- (v) => !t.includes(v[e.comparingKey])
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
- }, A = async (l) => {
82
+ }, N = async (l) => {
83
83
  try {
84
84
  d.value = !0;
85
- const o = await e.fetchFnCallback(l), t = M(
85
+ const t = await e.fetchFnCallback(l), o = M(
86
86
  l,
87
- o
87
+ t
88
88
  );
89
- a.value = [...t, ...o], d.value = !1;
90
- } catch (o) {
91
- d.value = !1, console.error("Error fetching data:", o);
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
- C.value = !0;
96
+ b.value = !0;
97
97
  const l = await e.loadMoreFn();
98
- C.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
98
+ b.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
99
99
  } catch (l) {
100
- C.value = !1, console.error("Error fetching data:", l);
100
+ b.value = !1, console.error("Error fetching data:", l);
101
101
  }
102
- }, x = ue(
103
- A,
102
+ }, P = se(
103
+ N,
104
104
  e.fetchDataDebounceTime
105
- ), b = (l) => {
106
- l.length >= e.minCharsToStart ? (x(l), k.value?.scrollTo(0)) : e.infiniteLoading && u.value.multi ? a.value = K.value || [] : a.value = [];
107
- }, P = () => {
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
- }, N = () => {
123
- p.value && i.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${u.value.label.toLowerCase()}`;
122
+ }, D = () => {
123
+ p.value && n.value.length === 0 ? g.value = e.label : g.value = `${e.label} ${u.value.label.toLowerCase()}`;
124
124
  };
125
- O(r, () => {
126
- b(r.value);
127
- }), O([u, a], () => {
128
- P();
129
- }), O(
125
+ h(r, () => {
126
+ w(r.value);
127
+ }), h([u, a], () => {
128
+ Q();
129
+ }), h(
130
130
  () => e.loadingOverride,
131
- (l, o) => {
132
- !l && o && !e.infiniteLoading && A(e.searchQuery);
131
+ (l, t) => {
132
+ !l && t && !e.infiniteLoading && N(e.searchQuery);
133
133
  }
134
134
  );
135
- const Q = () => {
136
- p.value && i.value.length === 0 ? (u.value = null, S.value = [], u.value = null) : (B.value = r.value, S.value = p.value ? [...i.value] : { ...i.value }, T.value = p.value), N();
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
- O(u, (l, o) => {
139
- u.value.multi ? (d.value = !0, !o.multi && l.multi && (Array.isArray(e.appliedSelections) ? i.value = e.appliedSelections : i.value = [e.appliedSelections]), setTimeout(() => {
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)) : (!o.multi && !l.multi && (d.value = !0), setTimeout(() => {
142
- !o.multi && !l.multi && (d.value = !1), p.value = !1;
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 V = (l) => {
147
+ const $ = (l) => {
146
148
  K.value = l;
147
- }, R = () => {
148
- i.value = [], S.value = [], u.value = null, m.value = e.label, r.value = "", h("clear");
149
- }, z = (l) => {
150
- l && u.value.multi && e.infiniteLoading && i.value && (a.value = i.value, r.value && b(r.value));
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) && b(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, i.value = e.appliedSelections, K.value = e.appliedSelections), N();
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
- h("closed");
157
+ const z = () => {
158
+ C("closed");
157
159
  };
158
- return (l, o) => (D(), G(c(F), {
160
+ return (l, t) => (F(), G(c(L), {
159
161
  ref_key: "dropdownRef",
160
- ref: k,
161
- selected: i.value,
162
- "onUpdate:selected": o[2] || (o[2] = (t) => i.value = t),
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": (t) => t?.[n.optionNameKey],
166
+ "display-value": (o) => o?.[i.optionNameKey],
165
167
  multi: p.value,
166
168
  options: a.value,
167
- placeholder: m.value,
169
+ placeholder: g.value,
168
170
  "search-placeholder": "Search",
169
- "option-name-key": n.optionNameKey,
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 || n.loadingOverride,
175
- "load-more-loading": C.value,
176
- "comparing-key": n.comparingKey,
177
- "is-open": n.isOpen,
178
- "infinite-loading": n.infiniteLoading,
179
- "show-select-all": !n.infiniteLoading && !r.value,
180
- "grouped-options": n.groupedOptions,
181
- "option-flag-key": n.optionFlagKey,
182
- "option-image-key": n.optionImageKey,
183
- "option-icon-key": n.optionIconKey,
184
- "option-icon-type": n.optionIconType,
185
- "trigger-shown-values-count": n.triggerShownValuesCount,
186
- "onUpdate:isOpen": z,
187
- onOnsearch: b,
188
- onApply: Q,
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: V,
191
- onClosed: $
192
- }, {
193
- "dropdown-trigger": f(({ defaultTriggerProps: t }) => [
194
- y(c(te), H(t, {
195
- label: m.value,
196
- "selected-option": c(S),
197
- multi: T.value,
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(i.value) && i.value.conditionalOptions,
200
- "shown-values-count": n.triggerShownValuesCount,
201
- onClear: R
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": f(() => [
205
- J("div", re, [
206
- y(c(F), {
206
+ "dropdown-conditions": v(() => [
207
+ X("div", de, [
208
+ S(c(L), {
207
209
  selected: c(u),
208
- "onUpdate:selected": o[0] || (o[0] = (t) => X(u) ? u.value = t : null),
209
- options: n.conditionalOptions,
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": (t) => t?.label,
213
+ "display-value": (o) => o?.label,
212
214
  container: ".conditional-container",
213
215
  size: "small"
214
216
  }, {
215
- "dropdown-trigger": f(({ buttonTriggerProps: t }) => [
216
- y(c(ae), Y(Z(t)), null, 16)
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": f(() => [
223
- y(c(ne), {
224
+ "inline-search": v(() => [
225
+ S(c(ue), {
224
226
  modelValue: r.value,
225
- "onUpdate:modelValue": o[1] || (o[1] = (t) => r.value = t),
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": n.autoFocusSearch
232
+ "auto-focus": i.autoFocusSearch
231
233
  }, null, 8, ["modelValue", "auto-focus"])
232
234
  ]),
233
- "custom-list-area": f(() => [
234
- !a.value.length && !d.value ? (D(), _("div", se, [
235
- y(ie, { variant: "body1" }, {
236
- default: f(() => [
237
- ee(le(c(U)), 1)
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
- ])) : oe("", !0)
243
+ ])) : te("", !0)
242
244
  ]),
243
- _: 1
244
- }, 8, ["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
+ _: 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
- ke as default
258
+ Ae as default
249
259
  };