@ironsource/shared-ui 2.1.11-test.41 → 2.1.11-test.44

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 (79) hide show
  1. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +1 -0
  2. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css +1 -0
  3. package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
  4. package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
  5. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
  6. package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
  7. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
  8. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
  9. package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
  10. package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +1 -0
  11. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
  12. package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +1 -0
  13. package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
  14. package/TreeDropdown.vue_vue_type_style_index_0_scoped_a898b632_lang.css +1 -0
  15. package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +1 -0
  16. package/components/dialog/v4/DialogV4.vue.d.ts +5 -0
  17. package/components/dialog/v4/DialogV4.vue.js +3 -3
  18. package/components/dialog/v4/DialogV4.vue2.js +52 -49
  19. package/components/dialog/v4/index.d.ts +20 -1
  20. package/components/dropdown/common/Dropdown.common.js +36 -34
  21. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  22. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +55 -40
  23. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +20 -0
  24. package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
  25. package/components/dropdown/v4/ConditionalDropdown.vue2.js +136 -97
  26. package/components/dropdown/v4/DropdownV4.vue.d.ts +2 -0
  27. package/components/dropdown/v4/DropdownV4.vue.js +2 -2
  28. package/components/dropdown/v4/DropdownV4.vue2.js +7 -7
  29. package/components/dropdown/v4/TreeDropdown.vue.d.ts +5 -0
  30. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  31. package/components/dropdown/v4/TreeDropdown.vue2.js +165 -158
  32. package/components/dropdown/v4/index.d.ts +67 -2
  33. package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
  34. package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
  35. package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
  36. package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +1 -1
  37. package/components/forms/FormCard.vue.js +3 -3
  38. package/components/forms/FormCard.vue2.js +1 -1
  39. package/components/sortableList/SortableItem.vue.js +3 -3
  40. package/components/sortableList/SortableItem.vue2.js +57 -56
  41. package/components/sortableList/SortableItemLabel.vue.js +3 -3
  42. package/components/sortableList/SortableItemLabel.vue2.js +20 -23
  43. package/components/sortableList/SortableList.vue.js +3 -3
  44. package/components/sortableList/SortableList.vue2.js +82 -76
  45. package/components/table/common/Table.common.d.ts +1 -1
  46. package/components/table/common/Table.common.js +78 -70
  47. package/components/table/common/consts.d.ts +4 -0
  48. package/components/table/common/consts.js +7 -0
  49. package/components/table/v4/DataGrid.vue.d.ts +10 -5
  50. package/components/table/v4/DataGrid.vue.js +3 -3
  51. package/components/table/v4/DataGrid.vue2.js +173 -171
  52. package/components/table/v4/DataGridMenu.vue.js +5 -5
  53. package/components/table/v4/DataGridMenu.vue2.js +1 -1
  54. package/components/table/v4/index.d.ts +39 -20
  55. package/components/table-cells/common/Editable.common.js +24 -19
  56. package/components/typography/v4/Typography.vue.js +3 -3
  57. package/components/typography/v4/Typography.vue2.js +24 -18
  58. package/index.d.ts +252 -46
  59. package/index.js +1 -1
  60. package/package.json +1 -1
  61. package/style/v4/grid.css +1 -1
  62. package/style/v4/grid.css.map +1 -1
  63. package/style/v4/spacings.scss +1 -0
  64. package/testids/index.d.ts +1 -0
  65. package/testids/index.js +13 -13
  66. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +0 -1
  67. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +0 -1
  68. package/DataGrid.vue_vue_type_style_index_0_scoped_2406226b_lang.css +0 -1
  69. package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
  70. package/DialogV4.vue_vue_type_style_index_0_scoped_c65df8d7_lang.css +0 -1
  71. package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +0 -1
  72. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
  73. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +0 -1
  74. package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
  75. package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
  76. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
  77. package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
  78. package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +0 -1
  79. package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./ChipDropdownTrigger.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css"; //*');
4
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-039dd922"]]);
3
+ // import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css"; //*');
4
+ const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e43ac1c9"]]);
5
5
  export {
6
- d as default
6
+ c as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css"; import { defineComponent as B, ref as d, computed as p, watch as _, openBlock as A, createBlock as k, unref as t, withCtx as g, createElementVNode as r, mergeProps as u, createVNode as f, createTextVNode as D, toDisplayString as I, withDirectives as V, vShow as O, withModifiers as N } from "vue";
2
- import x from "../../icon/v4/IconV4.vue.js";
1
+ import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css"; import { defineComponent as k, ref as f, computed as m, watch as D, openBlock as I, createBlock as S, unref as t, withCtx as y, createElementVNode as c, mergeProps as p, createVNode as d, createTextVNode as V, toDisplayString as v, withDirectives as x, vShow as _, withModifiers as $ } from "vue";
2
+ import b from "../../icon/v4/IconV4.vue.js";
3
3
  import "../../icon/v4/IconFlag.vue.js";
4
- import S from "../../typography/v4/Typography.vue.js";
5
- import { DropdownTestIdModifiers as s } from "../../../testids/index.js";
6
- import { useTestIdAttrs as $ } from "../../../utils/testIds.js";
7
- import { isElementTruncated as E } from "../../../utils/text.js";
8
- import { promiseTimeout as R } from "@vueuse/core";
9
- import U from "../../tooltip/v4/TooltipV4.vue.js";
10
- const z = { class: "chip-trigger--icon" }, L = ["onClick"], K = /* @__PURE__ */ B({
4
+ import C from "../../typography/v4/Typography.vue.js";
5
+ import { DropdownTestIdModifiers as i } from "../../../testids/index.js";
6
+ import { useTestIdAttrs as E } from "../../../utils/testIds.js";
7
+ import { isElementTruncated as U } from "../../../utils/text.js";
8
+ import { promiseTimeout as F } from "@vueuse/core";
9
+ import L from "../../tooltip/v4/TooltipV4.vue.js";
10
+ const R = { class: "chip-trigger--icon" }, z = ["onClick"], K = /* @__PURE__ */ k({
11
11
  __name: "ChipDropdownTrigger",
12
12
  props: {
13
13
  label: { default: "Status" },
@@ -25,17 +25,20 @@ const z = { class: "chip-trigger--icon" }, L = ["onClick"], K = /* @__PURE__ */
25
25
  displayValueInQuotes: { type: Boolean, default: !1 }
26
26
  },
27
27
  emits: ["clear"],
28
- setup(n, { emit: v }) {
29
- const e = n, C = () => {
30
- v("clear");
31
- }, o = d(null), i = d(!0), m = d(!1), y = (l) => {
28
+ setup(u, { emit: A }) {
29
+ const e = u, B = () => {
30
+ A("clear");
31
+ }, o = f(null), r = f(!0), T = f(!1), h = (l) => {
32
32
  let a = l;
33
- Array.isArray(l) && (l.length > 1 ? a = `${l[0]}, +${l[1]}` : a = l[0] ? `${l[0]}` : ""), i.value = !!a;
34
- let T = a;
35
- return e.displayValueInQuotes && (T = `"${a}"`), a ? `${e.label}: ${T}` : e.label;
36
- }, b = p(
33
+ Array.isArray(l) && (l.length > 1 ? a = `${l[0]}` : a = l[0] ? `${l[0]}` : ""), r.value = !!a;
34
+ let O = a;
35
+ return e.displayValueInQuotes && (O = `"${a}"`), a ? `${e.label}: ${O}` : e.label;
36
+ }, g = (l) => {
37
+ let a = "";
38
+ return Array.isArray(l) && l.length > 1 && (a = `, +${l[1]}`), a;
39
+ }, N = m(
37
40
  () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
38
- ), c = $(e.testId, s), h = p(() => {
41
+ ), s = E(e.testId, i), n = m(() => {
39
42
  if (!e.multi)
40
43
  return e.selectedOption ? e.displayValue(e.selectedOption) : "";
41
44
  if (Array.isArray(e.selectedOption))
@@ -44,50 +47,62 @@ const z = { class: "chip-trigger--icon" }, L = ["onClick"], K = /* @__PURE__ */
44
47
  e.selectedOption.length - 1
45
48
  ] : [];
46
49
  });
47
- _([() => e.selectedOption, o], async () => {
48
- await R(100), m.value = o.value && E(o.value);
50
+ D([() => e.selectedOption, o], async () => {
51
+ await F(100), T.value = o.value && U(o.value);
49
52
  });
50
- const w = p(() => m.value ? y(h.value) : "");
51
- return (l, a) => (A(), k(t(U), {
53
+ const w = m(() => T.value ? `${h(n.value)}${g(
54
+ n.value
55
+ )}` : "");
56
+ return (l, a) => (I(), S(t(L), {
52
57
  text: t(w),
53
- class: "tooltip-option"
58
+ class: "tooltip-option",
59
+ placement: "top"
54
60
  }, {
55
- default: g(() => [
56
- r("div", u({
57
- class: ["chip-trigger", [t(b), { active: i.value, disabled: n.disabled, open: n.open }]]
58
- }, t(c)[t(s).BUTTON]), [
59
- r("div", {
61
+ default: y(() => [
62
+ c("div", p({
63
+ class: ["chip-trigger", [t(N), { active: r.value, disabled: u.disabled, open: u.open }]]
64
+ }, t(s)[t(i).BUTTON]), [
65
+ c("div", {
60
66
  ref_key: "textContainerRef",
61
67
  ref: o,
62
68
  class: "chip-trigger--content"
63
69
  }, [
64
- f(t(S), u({
70
+ d(t(C), p({
65
71
  class: "chip-trigger--text",
66
72
  variant: "chipLabel"
67
- }, t(c)[t(s).BUTTON_CONTENT]), {
68
- default: g(() => [
69
- D(I(y(t(h))), 1)
73
+ }, t(s)[t(i).BUTTON_CONTENT]), {
74
+ default: y(() => [
75
+ V(v(h(t(n))), 1)
70
76
  ]),
71
77
  _: 1
72
78
  }, 16),
73
- V(r("div", z, [
74
- f(t(x), {
79
+ d(t(C), p({
80
+ class: "chip-trigger--suffix",
81
+ variant: "chipLabel"
82
+ }, t(s)[t(i).BUTTON_CONTENT_SUFFIX]), {
83
+ default: y(() => [
84
+ V(v(g(t(n))), 1)
85
+ ]),
86
+ _: 1
87
+ }, 16),
88
+ x(c("div", R, [
89
+ d(t(b), {
75
90
  name: "caret-down",
76
91
  size: "16px"
77
92
  })
78
93
  ], 512), [
79
- [O, !i.value]
94
+ [_, !r.value]
80
95
  ]),
81
- V(r("div", u({ class: "x-circle-wrapper" }, t(c)[t(s).BUTTON_CLEAR], {
82
- onClick: N(C, ["stop"])
96
+ x(c("div", p({ class: "x-circle-wrapper" }, t(s)[t(i).BUTTON_CLEAR], {
97
+ onClick: $(B, ["stop"])
83
98
  }), [
84
- f(t(x), {
99
+ d(t(b), {
85
100
  name: "x-circle",
86
101
  size: "16px",
87
102
  type: "fill"
88
103
  })
89
- ], 16, L), [
90
- [O, i.value]
104
+ ], 16, z), [
105
+ [_, r.value]
91
106
  ])
92
107
  ], 512)
93
108
  ], 16)
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
17
  searchQuery?: string;
18
18
  loadMoreFn?: () => Promise<void>;
19
19
  infiniteLoading?: boolean;
20
+ fetchDataDebounceTime?: number;
21
+ autoFocusSearch?: boolean;
22
+ groupedOptions?: boolean;
23
+ optionFlagKey?: string;
20
24
  }>, {
21
25
  label: string;
22
26
  testId: string;
@@ -27,6 +31,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
27
31
  searchQuery: string;
28
32
  loadMoreFn: any;
29
33
  infiniteLoading: boolean;
34
+ fetchDataDebounceTime: number;
35
+ autoFocusSearch: boolean;
36
+ groupedOptions: boolean;
37
+ optionFlagKey: string;
30
38
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
39
  "update:selectedCondition": (value: SelectedCondition) => void;
32
40
  "update:appliedSelections": (value: unknown) => void;
@@ -45,6 +53,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
45
53
  searchQuery?: string;
46
54
  loadMoreFn?: () => Promise<void>;
47
55
  infiniteLoading?: boolean;
56
+ fetchDataDebounceTime?: number;
57
+ autoFocusSearch?: boolean;
58
+ groupedOptions?: boolean;
59
+ optionFlagKey?: string;
48
60
  }>, {
49
61
  label: string;
50
62
  testId: string;
@@ -55,6 +67,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
55
67
  searchQuery: string;
56
68
  loadMoreFn: any;
57
69
  infiniteLoading: boolean;
70
+ fetchDataDebounceTime: number;
71
+ autoFocusSearch: boolean;
72
+ groupedOptions: boolean;
73
+ optionFlagKey: string;
58
74
  }>>> & {
59
75
  onClear?: () => any;
60
76
  "onUpdate:selectedCondition"?: (value: SelectedCondition) => any;
@@ -65,10 +81,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
65
81
  isOpen: boolean;
66
82
  infiniteLoading: boolean;
67
83
  optionNameKey: string;
84
+ optionFlagKey: string;
85
+ groupedOptions: boolean;
68
86
  comparingKey: string;
69
87
  minCharsToStart: number;
70
88
  searchQuery: string;
71
89
  loadMoreFn: () => Promise<void>;
90
+ fetchDataDebounceTime: number;
91
+ autoFocusSearch: boolean;
72
92
  }>;
73
93
  export default _default;
74
94
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -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_2aee12ad_lang.css"; //*');
4
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2aee12ad"]]);
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css"; //*');
4
+ const n = /* @__PURE__ */ _(o, [["__scopeId", "data-v-8f96cf5a"]]);
5
5
  export {
6
- d as default
6
+ n as default
7
7
  };
@@ -1,21 +1,21 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css"; import { defineComponent as F, computed as h, ref as r, watch as w, onMounted as E, openBlock as k, createBlock as Q, unref as s, withCtx as v, createVNode as f, mergeProps as P, createElementVNode as R, isRef as z, normalizeProps as U, guardReactiveProps as $, createElementBlock as q, createTextVNode as I, toDisplayString as j, createCommentVNode as G } from "vue";
2
- import T from "./DropdownV4.vue.js";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css"; import { defineComponent as $, computed as C, ref as s, watch as w, onMounted as I, openBlock as T, createBlock as j, unref as d, withCtx as f, createVNode as y, mergeProps as q, createElementVNode as G, isRef as H, normalizeProps as J, guardReactiveProps as W, createElementBlock as X, createTextVNode as Y, toDisplayString as Z, createCommentVNode as _ } from "vue";
2
+ import A from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
- import H from "./ChipDropdownTrigger.vue.js";
5
+ import ee from "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
7
- import J from "./ButtonDropdownTrigger.vue.js";
7
+ import le from "./ButtonDropdownTrigger.vue.js";
8
8
  import "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import "./OptionV4.vue.js";
11
11
  import "./ConditionalDropdown.vue.js";
12
- import W from "../../search/v4/SearchV4.vue.js";
13
- import X from "../../typography/v4/Typography.vue.js";
14
- import { useDebounceFn as Y } from "@vueuse/core";
15
- const Z = { class: "conditional-container" }, _ = {
12
+ import ae from "../../search/v4/SearchV4.vue.js";
13
+ import te from "../../typography/v4/Typography.vue.js";
14
+ import { useDebounceFn as oe } from "@vueuse/core";
15
+ const ne = { class: "conditional-container" }, ie = {
16
16
  key: 0,
17
17
  class: "custom-list-area"
18
- }, me = /* @__PURE__ */ F({
18
+ }, Oe = /* @__PURE__ */ $({
19
19
  __name: "ConditionalDropdown",
20
20
  props: {
21
21
  selectedCondition: null,
@@ -30,156 +30,195 @@ const Z = { class: "conditional-container" }, _ = {
30
30
  isOpen: { type: Boolean, default: !1 },
31
31
  searchQuery: { default: "" },
32
32
  loadMoreFn: { type: Function, default: null },
33
- infiniteLoading: { type: Boolean, default: !1 }
33
+ infiniteLoading: { type: Boolean, default: !1 },
34
+ fetchDataDebounceTime: { default: 400 },
35
+ autoFocusSearch: { type: Boolean, default: !0 },
36
+ groupedOptions: { type: Boolean, default: !1 },
37
+ optionFlagKey: { default: "" }
34
38
  },
35
39
  emits: ["update:selectedCondition", "update:appliedSelections", "clear"],
36
- setup(c, { emit: b }) {
37
- const e = c, y = h({
40
+ setup(r, { emit: O }) {
41
+ const e = r, h = C({
38
42
  get: () => e.appliedSelections,
39
- set: (a) => {
40
- b("update:appliedSelections", a);
43
+ set: (l) => {
44
+ O("update:appliedSelections", l);
41
45
  }
42
- }), o = h({
46
+ }), n = C({
43
47
  get: () => e.selectedCondition || e.conditionalOptions[0],
44
- set: (a) => {
45
- b("update:selectedCondition", a);
48
+ set: (l) => {
49
+ O("update:selectedCondition", l);
46
50
  }
47
- }), S = r(null), p = r(!0), l = r([]), u = r([]), O = r(!0), d = r(!1), g = r(!1), t = r(e.searchQuery), N = r(""), m = r(e.label), D = h(() => (!t.value || t.value?.length < e.minCharsToStart) && !l.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), M = h(() => {
48
- const a = p.value ? 3 : 4.5;
49
- return l.value.length ? null : a;
50
- }), A = async (a) => {
51
+ }), k = s(null), p = s(!0), t = s([]), u = s([]), K = s(!0), c = s(!1), S = s(!1), i = s(e.searchQuery), N = s(""), m = s(e.label), D = s([]), L = C(() => (!i.value || i.value?.length < e.minCharsToStart) && !t.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), F = C(() => {
52
+ const l = p.value ? 4 : 4.5, o = t.value.length > 4 ? t.value.length : l;
53
+ if (e.groupedOptions) {
54
+ let a = 0;
55
+ return t.value.forEach((g) => {
56
+ g.options && (a = a + g.options.length);
57
+ }), a > 4 ? a : l;
58
+ }
59
+ return o > l ? o : l;
60
+ }), U = (l, o) => {
61
+ if (e.infiniteLoading && n.value.multi && Array.isArray(u.value) && u.value.length && l && o.length) {
62
+ const a = [], g = u.value.filter(
63
+ (v) => v[e.optionNameKey].includes(l)
64
+ );
65
+ return o.forEach((v) => {
66
+ g.find(
67
+ (z) => z[e.comparingKey] === v[e.comparingKey]
68
+ ) && a.push(v[e.comparingKey]);
69
+ }), g.filter(
70
+ (v) => !a.includes(v[e.comparingKey])
71
+ );
72
+ }
73
+ return [];
74
+ }, B = async (l) => {
51
75
  try {
52
- d.value = !0;
53
- const i = await e.fetchFnCallback(a);
54
- l.value = i, d.value = !1;
55
- } catch (i) {
56
- d.value = !1, console.error("Error fetching data:", i);
76
+ c.value = !0;
77
+ const o = await e.fetchFnCallback(l), a = U(
78
+ l,
79
+ o
80
+ );
81
+ t.value = [...a, ...o], c.value = !1;
82
+ } catch (o) {
83
+ c.value = !1, console.error("Error fetching data:", o);
57
84
  }
58
- }, K = async () => {
85
+ }, M = async () => {
59
86
  if (e.infiniteLoading)
60
87
  try {
61
- g.value = !0;
62
- const a = await e.loadMoreFn();
63
- g.value = !1, Array.isArray(a) && (l.value = [...l.value, ...a]);
64
- } catch (a) {
65
- g.value = !1, console.error("Error fetching data:", a);
88
+ S.value = !0;
89
+ const l = await e.loadMoreFn();
90
+ S.value = !1, Array.isArray(l) && (t.value = [...t.value, ...l]);
91
+ } catch (l) {
92
+ S.value = !1, console.error("Error fetching data:", l);
66
93
  }
67
- }, L = Y(A, 400), C = (a) => {
68
- a.length >= e.minCharsToStart ? (L(a), S.value.scrollTo(0)) : l.value = [];
94
+ }, E = oe(
95
+ B,
96
+ e.fetchDataDebounceTime
97
+ ), b = (l) => {
98
+ l.length >= e.minCharsToStart ? (E(l), k.value?.scrollTo(0)) : e.infiniteLoading && n.value.multi ? t.value = D.value || [] : t.value = [];
69
99
  }, V = () => {
70
- t.value && l.value.length && !d.value && !o.value.multi ? l.value[0].conditionalOptions ? l.value[0] = {
71
- name: t.value,
100
+ i.value && t.value.length && !c.value && !n.value.multi ? t.value[0].conditionalOptions ? t.value[0] = {
101
+ name: i.value,
72
102
  conditionalOptions: !0,
73
- conditionalName: o.value.label,
74
- [e.comparingKey]: t.value
75
- } : l.value = [
103
+ conditionalName: n.value.label,
104
+ [e.comparingKey]: i.value
105
+ } : t.value = [
76
106
  {
77
- name: t.value,
107
+ name: i.value,
78
108
  conditionalOptions: !0,
79
- conditionalName: o.value.label,
80
- [e.comparingKey]: t.value
109
+ conditionalName: n.value.label,
110
+ [e.comparingKey]: i.value
81
111
  },
82
- ...l.value
83
- ] : l.value.length && l.value[0].conditionalOptions && l.value.shift();
112
+ ...t.value
113
+ ] : t.value.length && t.value[0].conditionalOptions && t.value.shift();
84
114
  };
85
- w(t, () => {
86
- C(t.value);
87
- }), w([o, l], () => {
115
+ w(i, () => {
116
+ b(i.value);
117
+ }), w([n, t], () => {
88
118
  V();
89
119
  });
90
120
  const x = () => {
91
- p.value && u.value.length === 0 ? (o.value = null, y.value = [], o.value = null, m.value = e.label) : (N.value = t.value, m.value = `${e.label} ${o.value.label.toLowerCase()}`, y.value = p.value ? [...u.value] : { ...u.value }, O.value = p.value);
121
+ p.value && u.value.length === 0 ? (n.value = null, h.value = [], n.value = null, m.value = e.label) : (N.value = i.value, m.value = `${e.label} ${n.value.label.toLowerCase()}`, h.value = p.value ? [...u.value] : { ...u.value }, K.value = p.value);
92
122
  };
93
- w(o, () => {
94
- o.value.multi ? (d.value = !0, u.value = [], setTimeout(() => {
95
- d.value = !1, p.value = !0;
123
+ w(n, (l, o) => {
124
+ n.value.multi ? (c.value = !0, !o.multi && l.multi && Array.isArray(e.appliedSelections) && (u.value = e.appliedSelections), setTimeout(() => {
125
+ c.value = !1, p.value = !0;
96
126
  }, 100)) : setTimeout(() => {
97
127
  p.value = !1;
98
128
  }, 100);
99
129
  });
100
- const B = () => {
101
- u.value = [], y.value = [], o.value = null, m.value = e.label, t.value = "", b("clear");
130
+ const Q = (l) => {
131
+ D.value = l;
132
+ }, P = () => {
133
+ u.value = [], h.value = [], n.value = null, m.value = e.label, i.value = "", O("clear");
134
+ }, R = (l) => {
135
+ l && n.value.multi && e.infiniteLoading && u.value && (t.value = u.value, i.value && b(i.value));
102
136
  };
103
- return E(() => {
104
- e.searchQuery && C(e.searchQuery);
105
- }), (a, i) => (k(), Q(s(T), {
137
+ return I(() => {
138
+ (e.searchQuery || !e.infiniteLoading) && b(e.searchQuery);
139
+ }), (l, o) => (T(), j(d(A), {
106
140
  ref_key: "dropdownRef",
107
- ref: S,
141
+ ref: k,
108
142
  selected: u.value,
109
- "onUpdate:selected": i[2] || (i[2] = (n) => u.value = n),
143
+ "onUpdate:selected": o[2] || (o[2] = (a) => u.value = a),
110
144
  "predefined-trigger": "chip",
111
- "display-value": (n) => n?.[c.optionNameKey],
145
+ "display-value": (a) => a?.[r.optionNameKey],
112
146
  multi: p.value,
113
- options: l.value,
147
+ options: t.value,
114
148
  placeholder: m.value,
115
149
  "search-placeholder": "Search",
116
- "option-name-key": c.optionNameKey,
150
+ "option-name-key": r.optionNameKey,
117
151
  "with-conditions": "",
118
152
  "inline-search": "",
119
- "custom-number-of-displayed-options": s(M),
153
+ "custom-number-of-displayed-options": d(F),
120
154
  "options-list-width": "330px",
121
- loading: d.value,
122
- "load-more-loading": g.value,
123
- "comparing-key": c.comparingKey,
124
- "is-open": c.isOpen,
125
- "infinite-loading": c.infiniteLoading,
126
- onOnsearch: C,
155
+ loading: c.value,
156
+ "load-more-loading": S.value,
157
+ "comparing-key": r.comparingKey,
158
+ "is-open": r.isOpen,
159
+ "infinite-loading": r.infiniteLoading,
160
+ "show-select-all": !r.infiniteLoading && !i.value,
161
+ "grouped-options": r.groupedOptions,
162
+ "option-flag-key": r.optionFlagKey,
163
+ "onUpdate:isOpen": R,
164
+ onOnsearch: b,
127
165
  onApply: x,
128
- onLoadMore: K
166
+ onLoadMore: M,
167
+ onUnsavedSelectionUpdate: Q
129
168
  }, {
130
- "dropdown-trigger": v(({ defaultTriggerProps: n }) => [
131
- f(s(H), P(n, {
169
+ "dropdown-trigger": f(({ defaultTriggerProps: a }) => [
170
+ y(d(ee), q(a, {
132
171
  label: m.value,
133
- "selected-option": s(y),
134
- multi: O.value,
172
+ "selected-option": d(h),
173
+ multi: K.value,
135
174
  "cancel-all-selected-display": "",
136
175
  "display-value-in-quotes": !Array.isArray(u.value) && u.value.conditionalOptions,
137
- onClear: B
176
+ onClear: P
138
177
  }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes"])
139
178
  ]),
140
- "dropdown-conditions": v(() => [
141
- R("div", Z, [
142
- f(s(T), {
143
- selected: s(o),
144
- "onUpdate:selected": i[0] || (i[0] = (n) => z(o) ? o.value = n : null),
145
- options: c.conditionalOptions,
179
+ "dropdown-conditions": f(() => [
180
+ G("div", ne, [
181
+ y(d(A), {
182
+ selected: d(n),
183
+ "onUpdate:selected": o[0] || (o[0] = (a) => H(n) ? n.value = a : null),
184
+ options: r.conditionalOptions,
146
185
  "option-name-key": "label",
147
- "display-value": (n) => n?.label,
186
+ "display-value": (a) => a?.label,
148
187
  container: ".conditional-container",
149
188
  size: "small"
150
189
  }, {
151
- "dropdown-trigger": v(({ buttonTriggerProps: n }) => [
152
- f(s(J), U($(n)), null, 16)
190
+ "dropdown-trigger": f(({ buttonTriggerProps: a }) => [
191
+ y(d(le), J(W(a)), null, 16)
153
192
  ]),
154
193
  _: 1
155
194
  }, 8, ["selected", "options", "display-value"])
156
195
  ])
157
196
  ]),
158
- "inline-search": v(() => [
159
- f(s(W), {
160
- modelValue: t.value,
161
- "onUpdate:modelValue": i[1] || (i[1] = (n) => t.value = n),
197
+ "inline-search": f(() => [
198
+ y(d(ae), {
199
+ modelValue: i.value,
200
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => i.value = a),
162
201
  class: "inline-search",
163
202
  placeholder: "Search",
164
203
  variant: "transparent",
165
204
  size: "md",
166
- "auto-focus": ""
167
- }, null, 8, ["modelValue"])
205
+ "auto-focus": r.autoFocusSearch
206
+ }, null, 8, ["modelValue", "auto-focus"])
168
207
  ]),
169
- "custom-list-area": v(() => [
170
- !l.value.length && !d.value ? (k(), q("div", _, [
171
- f(X, { variant: "body1" }, {
172
- default: v(() => [
173
- I(j(s(D)), 1)
208
+ "custom-list-area": f(() => [
209
+ !t.value.length && !c.value ? (T(), X("div", ie, [
210
+ y(te, { variant: "body1" }, {
211
+ default: f(() => [
212
+ Y(Z(d(L)), 1)
174
213
  ]),
175
214
  _: 1
176
215
  })
177
- ])) : G("", !0)
216
+ ])) : _("", !0)
178
217
  ]),
179
218
  _: 1
180
- }, 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"]));
219
+ }, 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"]));
181
220
  }
182
221
  });
183
222
  export {
184
- me as default
223
+ Oe as default
185
224
  };
@@ -134,6 +134,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
134
134
  onsearch: (value: string) => void;
135
135
  loadMore: () => void;
136
136
  allSelectedChanged: (value: boolean) => void;
137
+ unsavedSelectionUpdate: (value: unknown[]) => void;
137
138
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
138
139
  modelValue?: unknown;
139
140
  selected?: unknown;
@@ -264,6 +265,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
264
265
  "onUpdate:isOpen"?: (value: unknown) => any;
265
266
  onOnsearch?: (value: string) => any;
266
267
  onLoadMore?: () => any;
268
+ onUnsavedSelectionUpdate?: (value: unknown[]) => any;
267
269
  onOpened?: () => any;
268
270
  onClosed?: () => any;
269
271
  }, {
@@ -1,8 +1,8 @@
1
1
  import o from "./DropdownV4.vue2.js";
2
2
  /* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css"; //*');
3
+ // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-6466948d"]]);
5
+ const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-75002075"]]);
6
6
  export {
7
7
  r as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as fe, computed as G, openBlock as n, createElementBlock as r, mergeProps as y, unref as t, renderSlot as f, createElementVNode as m, createVNode as i, withCtx as u, Transition as me, normalizeClass as O, normalizeStyle as pe, createTextVNode as T, createCommentVNode as a, isRef as ge, toDisplayString as U, withModifiers as W, Fragment as Te, renderList as ke, toRaw as C, createBlock as X, resolveDynamicComponent as he } from "vue";
1
+ import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as fe, computed as U, openBlock as n, createElementBlock as r, mergeProps as y, unref as t, renderSlot as f, createElementVNode as m, createVNode as i, withCtx as u, Transition as me, normalizeClass as O, normalizeStyle as pe, createTextVNode as T, createCommentVNode as a, isRef as ge, toDisplayString as G, withModifiers as W, Fragment as Te, renderList as ke, toRaw as C, createBlock as X, resolveDynamicComponent as he } from "vue";
2
2
  import L from "../../button/v4/ButtonV4.vue.js";
3
3
  import "../../button/v4/IconButtonV4.vue.js";
4
4
  import "../../button/v4/ButtonGroup.vue.js";
@@ -36,7 +36,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
36
36
  }, Me = {
37
37
  key: 1,
38
38
  class: "actions-wrapper"
39
- }, He = { class: "actions-clear-all" }, Ge = { class: "actions-apply-cancel" }, Tt = /* @__PURE__ */ fe({
39
+ }, He = { class: "actions-clear-all" }, Ue = { class: "actions-apply-cancel" }, Tt = /* @__PURE__ */ fe({
40
40
  __name: "DropdownV4",
41
41
  props: {
42
42
  modelValue: { default: null },
@@ -101,7 +101,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
101
101
  overrideOptionCountCalculation: { type: Function, default: null },
102
102
  withConditions: { type: Boolean, default: !1 }
103
103
  },
104
- emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard", "onsearch", "loadMore", "allSelectedChanged"],
104
+ emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard", "onsearch", "loadMore", "allSelectedChanged", "unsavedSelectionUpdate"],
105
105
  setup(e, { expose: j, emit: B }) {
106
106
  const d = e, F = {
107
107
  MULTILINE_LIST_HEIGHT: 48,
@@ -142,7 +142,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
142
142
  onClearAllSelections: z,
143
143
  clearAll: ue,
144
144
  isGroup: ce
145
- } = Ke(d, B, F), g = Ae(d.testId, p), $ = G(() => !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT ? be : d.predefinedTrigger === k.APP ? ve : null), { width: M } = Ee(R), ye = G(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT || d.predefinedTrigger === k.APP ? M.value - 2 > 240 ? `${M.value - 2}px` : `${F.DROPLIST_MIN_WIDTH}px` : "auto"), H = () => {
145
+ } = Ke(d, B, F), g = Ae(d.testId, p), $ = U(() => !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT ? be : d.predefinedTrigger === k.APP ? ve : null), { width: M } = Ee(R), ye = U(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT || d.predefinedTrigger === k.APP ? M.value - 2 > 240 ? `${M.value - 2}px` : `${F.DROPLIST_MIN_WIDTH}px` : "auto"), H = () => {
146
146
  I();
147
147
  };
148
148
  return j({
@@ -242,7 +242,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
242
242
  !t(_).length && !e.loading && !e.withConditions ? (n(), r("li", Re, [
243
243
  i(t(Y), y({ variant: "body2" }, t(g)[t(p).NO_RESULT]), {
244
244
  default: u(() => [
245
- T(U(e.noResultsText), 1)
245
+ T(G(e.noResultsText), 1)
246
246
  ]),
247
247
  _: 1
248
248
  }, 16)
@@ -279,7 +279,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
279
279
  e.groupedOptions && t(ce)(o) ? f(c.$slots, "group-option", { key: 0 }, () => [
280
280
  i(Le, null, {
281
281
  default: u(() => [
282
- T(U(e.displayValue(o) || o[e.optionNameKey]), 1)
282
+ T(G(e.displayValue(o) || o[e.optionNameKey]), 1)
283
283
  ]),
284
284
  _: 2
285
285
  }, 1024)
@@ -339,7 +339,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
339
339
  _: 1
340
340
  }, 16)
341
341
  ]),
342
- m("div", Ge, [
342
+ m("div", Ue, [
343
343
  i(t(L), y(
344
344
  {
345
345
  ref_key: "cancel",