@ironsource/shared-ui 2.1.11-test.99 → 2.1.12-rc.0

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 (89) hide show
  1. package/Chart.vue_vue_type_style_index_0_scoped_026d82c5_lang.css +1 -0
  2. package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +1 -0
  3. package/ChartLoader.vue_vue_type_style_index_0_scoped_ffa4cc66_lang.css +1 -0
  4. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8e026669_lang.css +1 -0
  5. package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +1 -0
  6. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_73bf9b5b_lang.css +1 -0
  7. package/EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_lang.css +1 -0
  8. package/IconFlag.vue_vue_type_style_index_0_scoped_6526c390_lang.css +1 -0
  9. package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +1 -0
  10. package/SnackbarV4.vue_vue_type_style_index_0_scoped_1b650c39_lang.css +1 -0
  11. package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +1 -0
  12. package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +1 -0
  13. package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +1 -0
  14. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +1 -0
  15. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  16. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +1 -0
  17. package/Typography.vue_vue_type_style_index_0_scoped_07b259bf_lang.css +1 -0
  18. package/components/chart/Chart.vue.d.ts +5 -0
  19. package/components/chart/Chart.vue.js +3 -3
  20. package/components/chart/Chart.vue2.js +116 -108
  21. package/components/chart/ChartLegend.vue.js +3 -3
  22. package/components/chart/ChartLegend.vue2.js +64 -54
  23. package/components/chart/ChartLoader.vue.js +5 -23
  24. package/components/chart/ChartLoader.vue2.js +15 -0
  25. package/components/chart/index.d.ts +20 -1
  26. package/components/chart/mockData.d.ts +8 -0
  27. package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
  28. package/components/dateRange/v4/DateRangeV4.vue2.js +86 -81
  29. package/components/dropdown/common/Dropdown.common.js +65 -65
  30. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +5 -3
  31. package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
  32. package/components/dropdown/v4/ConditionalDropdown.vue2.js +106 -100
  33. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  34. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +45 -46
  35. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  36. package/components/dropdown/v4/OptionV4.vue2.js +97 -98
  37. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  38. package/components/dropdown/v4/TreeDropdown.vue2.js +86 -86
  39. package/components/dropdown/v4/index.d.ts +5 -3
  40. package/components/icon/v4/IconFlag.vue.js +3 -3
  41. package/components/icon/v4/IconFlag.vue2.js +1 -1
  42. package/components/input/v4/TextField.vue.js +3 -3
  43. package/components/input/v4/TextField.vue2.js +184 -164
  44. package/components/snackbar/v4/SnackbarV4.vue.js +3 -3
  45. package/components/snackbar/v4/SnackbarV4.vue2.js +1 -1
  46. package/components/sortableList/SortableItem.vue.d.ts +5 -0
  47. package/components/sortableList/SortableItem.vue.js +3 -3
  48. package/components/sortableList/SortableItem.vue2.js +76 -61
  49. package/components/sortableList/SortableList.vue.d.ts +16 -0
  50. package/components/sortableList/SortableList.vue.js +3 -3
  51. package/components/sortableList/SortableList.vue2.js +100 -87
  52. package/components/sortableList/index.d.ts +59 -1
  53. package/components/table/v4/DataGrid.vue.d.ts +1 -1
  54. package/components/table/v4/MultipleDataGrid.vue.d.ts +1 -1
  55. package/components/table/v4/index.d.ts +40 -40
  56. package/components/table-cells/common/Editable.common.js +8 -7
  57. package/components/table-cells/common/EditableContext.d.ts +1 -0
  58. package/components/table-cells/v4/EditableV4.vue.d.ts +5 -0
  59. package/components/table-cells/v4/EditableV4.vue.js +3 -3
  60. package/components/table-cells/v4/EditableV4.vue2.js +11 -10
  61. package/components/table-cells/v4/index.d.ts +20 -1
  62. package/components/tooltip/v4/TooltipV4.vue.js +3 -3
  63. package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
  64. package/components/typography/v4/Typography.vue.js +3 -3
  65. package/components/typography/v4/Typography.vue2.js +1 -1
  66. package/index.d.ts +248 -90
  67. package/index.js +1 -1
  68. package/mocks/apps.d.ts +1 -0
  69. package/mocks/randomValue.d.ts +1 -0
  70. package/package.json +3 -3
  71. package/testids/index.d.ts +1 -0
  72. package/testids/index.js +13 -13
  73. package/Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css +0 -1
  74. package/ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css +0 -1
  75. package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +0 -1
  76. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_b2684c5f_lang.css +0 -1
  77. package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +0 -1
  78. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_9fa84b26_lang.css +0 -1
  79. package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +0 -1
  80. package/IconFlag.vue_vue_type_style_index_0_scoped_7b09cc85_lang.css +0 -1
  81. package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +0 -1
  82. package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +0 -1
  83. package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +0 -1
  84. package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +0 -1
  85. package/TextField.vue_vue_type_style_index_0_scoped_2e327aa1_lang.css +0 -1
  86. package/TooltipV4.vue_vue_type_style_index_0_scoped_82b46d6d_lang.css +0 -1
  87. package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +0 -1
  88. package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +0 -1
  89. package/consts/configs.js +0 -4
@@ -1,12 +1,12 @@
1
- import "../../SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css"; import { defineComponent as P, useSlots as E, computed as x, watch as $, ref as I, openBlock as l, createElementBlock as i, normalizeClass as f, unref as e, withModifiers as u, createElementVNode as a, createVNode as h, createBlock as r, withCtx as b, createTextVNode as S, toDisplayString as w, createCommentVNode as d, renderSlot as R, mergeProps as F, normalizeProps as D, Fragment as j, renderList as q } from "vue";
2
- import V from "../typography/v4/Typography.vue.js";
1
+ import "../../SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css"; import { defineComponent as P, useCssVars as E, useSlots as $, computed as C, watch as I, ref as R, openBlock as l, createElementBlock as n, normalizeClass as f, unref as t, withModifiers as u, createElementVNode as c, createVNode as h, createBlock as a, withCtx as b, createTextVNode as S, toDisplayString as V, createCommentVNode as d, renderSlot as D, mergeProps as F, normalizeProps as j, Fragment as q, renderList as A } from "vue";
2
+ import L from "../typography/v4/Typography.vue.js";
3
3
  import m from "../icon/v4/IconV4.vue.js";
4
- import L from "../icon/v4/IconFlag.vue.js";
5
- import A from "./SortableItemLabel.vue.js";
6
- import { useVirtualList as G } from "@vueuse/core";
7
- import { matchString as J } from "../../utils/search.js";
8
- import { useHoverEffect as K } from "./composables/useHoverEffect.js";
9
- const U = { class: "draggable-handle" }, W = { class: "item__prefix" }, X = ["onClick"], Y = { class: "item__text" }, Z = ["onClick"], ae = /* @__PURE__ */ P({
4
+ import w from "../icon/v4/IconFlag.vue.js";
5
+ import G from "./SortableItemLabel.vue.js";
6
+ import { useVirtualList as J } from "@vueuse/core";
7
+ import { matchString as K } from "../../utils/search.js";
8
+ import { useHoverEffect as U } from "./composables/useHoverEffect.js";
9
+ const W = { class: "draggable-handle" }, X = { class: "item__prefix" }, Y = ["onClick"], Z = { class: "item__text" }, _ = ["onClick"], ce = /* @__PURE__ */ P({
10
10
  __name: "SortableItem",
11
11
  props: {
12
12
  item: null,
@@ -15,127 +15,142 @@ const U = { class: "draggable-handle" }, W = { class: "item__prefix" }, X = ["on
15
15
  isSelected: { type: Boolean, default: !1 },
16
16
  selectedChildId: { default: null },
17
17
  searchQuery: { default: null },
18
+ childListMaxHeight: { default: "530px" },
18
19
  searchHandler: { type: Function, default: null },
19
20
  displayValue: null
20
21
  },
21
22
  emits: ["toggle", "select", "selectChild"],
22
- setup(t, { emit: y }) {
23
- const n = t, Q = E(), B = () => {
24
- y("toggle", !n.isOpen);
25
- }, g = x(() => (n.item.children || []).filter(
26
- (o) => n.searchHandler ? n.searchHandler(o, n.searchQuery) : J(o.displayText, n.searchQuery)
27
- )), k = x(() => g.value.length > 0), H = (c) => c.id === n.selectedChildId, {
28
- list: M,
29
- containerProps: T,
30
- wrapperProps: z,
23
+ setup(e, { emit: y }) {
24
+ const s = e;
25
+ E((r) => ({
26
+ "480cd4cc": e.childListMaxHeight
27
+ }));
28
+ const H = $(), M = () => {
29
+ y("toggle", !s.isOpen);
30
+ }, g = C(() => (s.item.children || []).filter(
31
+ (o) => s.searchHandler ? s.searchHandler(o, s.searchQuery) : K(o.displayText, s.searchQuery)
32
+ )), k = C(() => g.value.length > 0), z = (r) => r.id === s.selectedChildId, {
33
+ list: Q,
34
+ containerProps: B,
35
+ wrapperProps: T,
31
36
  scrollTo: N
32
- } = G(g, {
37
+ } = J(g, {
33
38
  itemHeight: 34
34
39
  });
35
- $(
36
- () => n.searchQuery,
40
+ I(
41
+ () => s.searchQuery,
37
42
  () => N(0)
38
43
  );
39
- const p = I(null), { handleMouseout: v, handleMouseover: C } = K(
44
+ const p = R(null), { handleMouseout: v, handleMouseover: x } = U(
40
45
  p,
41
46
  "sortable-item--hovered"
42
47
  );
43
- return (c, o) => (l(), i("div", {
48
+ return (r, o) => (l(), n("div", {
44
49
  ref_key: "itemRef",
45
50
  ref: p,
46
- class: f(["sortable-item", { "sortable-item--selected": t.isSelected }]),
51
+ class: f(["sortable-item", { "sortable-item--selected": e.isSelected }]),
47
52
  onMouseover: o[1] || (o[1] = //@ts-ignore
48
- (...s) => e(C) && e(C)(...s)),
53
+ (...i) => t(x) && t(x)(...i)),
49
54
  onMouseout: o[2] || (o[2] = //@ts-ignore
50
- (...s) => e(v) && e(v)(...s)),
51
- onClick: o[3] || (o[3] = u((s) => y("select"), ["stop"]))
55
+ (...i) => t(v) && t(v)(...i)),
56
+ onClick: o[3] || (o[3] = u((i) => y("select"), ["stop"]))
52
57
  }, [
53
- a("div", {
54
- class: f(["item", { "drag-allowed": !t.item.isLocked && !t.searchQuery }])
58
+ c("div", {
59
+ class: f(["item", {
60
+ "drag-allowed": !e.item.isLocked && !e.searchQuery,
61
+ "item--selected": e.isSelected && !e.selectedChildId
62
+ }])
55
63
  }, [
56
- a("div", U, [
57
- h(e(m), {
64
+ c("div", W, [
65
+ h(t(m), {
58
66
  name: "dots-six-vertical",
59
- width: "20px",
67
+ size: "20px",
60
68
  type: "bold"
61
69
  })
62
70
  ]),
63
- a("div", W, [
64
- t.item.isLocked ? (l(), r(e(m), {
71
+ c("div", X, [
72
+ e.item.isLocked ? (l(), a(t(m), {
65
73
  key: 1,
66
74
  class: "locked-icon",
67
75
  name: "lock",
68
- width: "16px"
69
- })) : (l(), r(e(V), {
76
+ size: "16px"
77
+ })) : (l(), a(t(L), {
70
78
  key: 0,
71
79
  class: "order-num",
72
80
  variant: "subtitle2"
73
81
  }, {
74
82
  default: b(() => [
75
- S(w(t.index + 1) + ". ", 1)
83
+ S(V(e.index + 1) + ". ", 1)
76
84
  ]),
77
85
  _: 1
78
86
  }))
79
87
  ]),
80
- e(k) && !t.searchQuery ? (l(), i("div", {
88
+ t(k) && !e.searchQuery ? (l(), n("div", {
81
89
  key: 0,
82
90
  class: "expand-icon",
83
- onClick: u(B, ["stop"])
91
+ onClick: u(M, ["stop"])
84
92
  }, [
85
- t.isOpen ? (l(), r(e(m), {
93
+ e.isOpen ? (l(), a(t(m), {
86
94
  key: 0,
87
95
  name: "caret-down",
88
96
  size: "16px"
89
- })) : (l(), r(e(m), {
97
+ })) : (l(), a(t(m), {
90
98
  key: 1,
91
99
  name: "caret-right",
92
100
  size: "16px"
93
101
  }))
94
- ], 8, X)) : d("", !0),
95
- a("div", Y, [
96
- t.item.countryFlag ? (l(), r(e(L), {
102
+ ], 8, Y)) : d("", !0),
103
+ c("div", Z, [
104
+ e.item.countryFlag ? (l(), a(t(w), {
97
105
  key: 0,
98
106
  class: "country-flag",
99
- "country-code": t.item.countryFlag
107
+ "country-code": e.item.countryFlag
100
108
  }, null, 8, ["country-code"])) : d("", !0),
101
- h(A, {
102
- "display-value": t.displayValue,
103
- item: t.item
109
+ h(G, {
110
+ "display-value": e.displayValue,
111
+ item: e.item
104
112
  }, null, 8, ["display-value", "item"])
105
113
  ]),
106
- e(Q).menu ? (l(), i("div", {
114
+ t(H).menu ? (l(), n("div", {
107
115
  key: 1,
108
116
  class: "item__menu",
109
117
  onClick: o[0] || (o[0] = u(() => {
110
118
  }, ["stop"]))
111
119
  }, [
112
- R(c.$slots, "menu", {}, void 0, !0)
120
+ D(r.$slots, "menu", {}, void 0, !0)
113
121
  ])) : d("", !0)
114
122
  ], 2),
115
- a("div", F(e(T), { class: "child-list" }), [
116
- e(k) && t.isOpen ? (l(), i("ul", D(F({ key: 0 }, e(z))), [
117
- (l(!0), i(j, null, q(e(M), ({ data: s, index: O }) => (l(), i("li", {
123
+ c("div", F(t(B), { class: "child-list" }), [
124
+ t(k) && e.isOpen ? (l(), n("ul", j(F({ key: 0 }, t(T))), [
125
+ (l(!0), n(q, null, A(t(Q), ({ data: i, index: O }) => (l(), n("li", {
118
126
  key: O,
119
- class: f({ selected: H(s) }),
120
- onClick: u((_) => y("selectChild", s), ["stop"])
127
+ class: f({ selected: z(i) }),
128
+ onClick: u((ee) => y("selectChild", i), ["stop"])
121
129
  }, [
122
- s.countryFlag ? (l(), r(e(L), {
130
+ i.countryFlag ? (l(), a(t(w), {
123
131
  key: 0,
124
132
  class: "country-flag",
125
- "country-code": s.countryFlag
133
+ "country-code": i.countryFlag
126
134
  }, null, 8, ["country-code"])) : d("", !0),
127
- h(e(V), { variant: "body2" }, {
135
+ h(t(L), {
136
+ class: "country-title",
137
+ variant: "body2",
138
+ "tooltip-placement": "top",
139
+ "tooltip-text": e.displayValue(i),
140
+ "is-truncated": "",
141
+ "with-tooltip": ""
142
+ }, {
128
143
  default: b(() => [
129
- S(w(t.displayValue(s)), 1)
144
+ S(V(e.displayValue(i)), 1)
130
145
  ]),
131
146
  _: 2
132
- }, 1024)
133
- ], 10, Z))), 128))
147
+ }, 1032, ["tooltip-text"])
148
+ ], 10, _))), 128))
134
149
  ], 16)) : d("", !0)
135
150
  ], 16)
136
151
  ], 34));
137
152
  }
138
153
  });
139
154
  export {
140
- ae as default
155
+ ce as default
141
156
  };
@@ -12,6 +12,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
12
12
  isLoading?: boolean;
13
13
  loadingRowCount?: number;
14
14
  emptyStateTitle?: string;
15
+ childListMaxHeight?: string;
16
+ isSticky?: boolean;
17
+ zIndexBase?: number;
15
18
  testId?: string;
16
19
  }>, {
17
20
  items: () => any[];
@@ -26,6 +29,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
26
29
  isLoading: boolean;
27
30
  loadingRowCount: number;
28
31
  emptyStateTitle: string;
32
+ childListMaxHeight: string;
33
+ isSticky: boolean;
34
+ zIndexBase: number;
29
35
  testId: string;
30
36
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
37
  sortableItemDragged: (event: {
@@ -51,6 +57,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
51
57
  isLoading?: boolean;
52
58
  loadingRowCount?: number;
53
59
  emptyStateTitle?: string;
60
+ childListMaxHeight?: string;
61
+ isSticky?: boolean;
62
+ zIndexBase?: number;
54
63
  testId?: string;
55
64
  }>, {
56
65
  items: () => any[];
@@ -65,6 +74,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
65
74
  isLoading: boolean;
66
75
  loadingRowCount: number;
67
76
  emptyStateTitle: string;
77
+ childListMaxHeight: string;
78
+ isSticky: boolean;
79
+ zIndexBase: number;
68
80
  testId: string;
69
81
  }>>> & {
70
82
  onClearSearch?: () => any;
@@ -85,13 +97,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
85
97
  searchPlaceholder: string;
86
98
  items: SortableListItem[];
87
99
  selectedChildId: string | number;
100
+ childListMaxHeight: string;
88
101
  searchHandler: (item: SortableListItem, searchQuery: string) => boolean;
89
102
  openId: string | number;
90
103
  selectedId: string | number;
91
104
  showSearch: boolean;
92
105
  loadingRowCount: number;
93
106
  emptyStateTitle: string;
107
+ isSticky: boolean;
108
+ zIndexBase: number;
94
109
  }>, {
110
+ header?(_: {}): any;
95
111
  menu?(_: {
96
112
  item: SortableListItem;
97
113
  }): any;
@@ -1,7 +1,7 @@
1
1
  import o from "./SortableList.vue2.js";
2
2
  /* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css"; //*');
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-156c01ca"]]);
3
+ // import "../../SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css"; //*');
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8f267f88"]]);
5
5
  export {
6
- c as default
6
+ p as default
7
7
  };
@@ -1,21 +1,21 @@
1
- import "../../SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css"; import { defineComponent as G, useSlots as U, computed as p, ref as M, openBlock as s, createElementBlock as i, mergeProps as T, unref as l, createBlock as g, isRef as $, createCommentVNode as m, withCtx as y, Fragment as V, renderList as D, createSlots as w, renderSlot as S, createElementVNode as K, createVNode as x, createTextVNode as Q, toDisplayString as j } from "vue";
2
- import { VueDraggable as z } from "vue-draggable-plus";
3
- import q from "./SortableItem.vue.js";
4
- import J from "../search/v4/SearchV4.vue.js";
5
- import W from "../typography/v4/Typography.vue.js";
6
- import X from "../skeleton/v4/SkeletonV4.vue.js";
7
- import { useVModel as Y } from "@vueuse/core";
8
- import { matchString as H } from "../../utils/search.js";
9
- import { useTestIdAttrs as Z } from "../../utils/testIds.js";
10
- import { SortableListTestIdModifiers as I } from "../../testids/index.js";
1
+ import "../../SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css"; import { defineComponent as P, useCssVars as z, useSlots as G, computed as S, ref as U, openBlock as s, createElementBlock as r, mergeProps as V, unref as l, normalizeClass as K, renderSlot as g, createCommentVNode as h, createBlock as p, isRef as A, withCtx as I, Fragment as x, renderList as B, createSlots as E, createElementVNode as Q, createVNode as H, createTextVNode as j, toDisplayString as J } from "vue";
2
+ import { VueDraggable as W } from "vue-draggable-plus";
3
+ import N from "./SortableItem.vue.js";
4
+ import X from "../search/v4/SearchV4.vue.js";
5
+ import Y from "../typography/v4/Typography.vue.js";
6
+ import Z from "../skeleton/v4/SkeletonV4.vue.js";
7
+ import { useVModel as _ } from "@vueuse/core";
8
+ import { matchString as q } from "../../utils/search.js";
9
+ import { useTestIdAttrs as ee } from "../../utils/testIds.js";
10
+ import { SortableListTestIdModifiers as v } from "../../testids/index.js";
11
11
  import { DRAG_CURSOR_CSS_CLASS as O } from "./consts.js";
12
- const _ = {
12
+ const te = {
13
13
  key: 1,
14
14
  class: "sortable-list-container"
15
- }, ee = { class: "loader-bars" }, te = {
15
+ }, le = { class: "loader-bars" }, de = {
16
16
  key: 3,
17
17
  class: "empty-state-title"
18
- }, fe = /* @__PURE__ */ G({
18
+ }, ye = /* @__PURE__ */ P({
19
19
  __name: "SortableList",
20
20
  props: {
21
21
  items: { default: () => [] },
@@ -30,137 +30,150 @@ const _ = {
30
30
  isLoading: { type: Boolean, default: !1 },
31
31
  loadingRowCount: { default: 3 },
32
32
  emptyStateTitle: { default: "No results" },
33
+ childListMaxHeight: { default: "530px" },
34
+ isSticky: { type: Boolean, default: !0 },
35
+ zIndexBase: { default: 100 },
33
36
  testId: { default: "" }
34
37
  },
35
38
  emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
36
- setup(d, { emit: o }) {
37
- const r = d, R = U(), u = Y(r, "search", o), v = p(() => !!u.value?.trim()), C = p(() => v.value ? r.items.filter((t) => {
39
+ setup(d, { emit: n }) {
40
+ const i = d;
41
+ z((t) => ({
42
+ "2b5787e0": d.zIndexBase
43
+ }));
44
+ const y = G(), u = _(i, "search", n), k = S(() => !!u.value?.trim()), C = S(() => k.value ? i.items.filter((t) => {
38
45
  const a = t.children || [], e = u.value;
39
- return r.searchHandler ? r.searchHandler(t, e) : H(t.displayText, e) || // match parent item
40
- a.some((n) => H(n.displayText, e));
41
- }) : r.items), h = p({
46
+ return i.searchHandler ? i.searchHandler(t, e) : q(t.displayText, e) || // match parent item
47
+ a.some((o) => q(o.displayText, e));
48
+ }) : i.items), f = S({
42
49
  get() {
43
50
  return C.value.filter((t) => !t.isLocked);
44
51
  },
45
52
  set(t) {
46
- o("update:items", [...t, ...k.value]);
53
+ n("update:items", [...t, ...L.value]);
47
54
  }
48
- }), k = p(
55
+ }), L = S(
49
56
  () => C.value.filter((t) => t.isLocked)
50
- ), b = M(!1), F = (t) => {
57
+ ), b = U(!1), F = (t) => {
51
58
  b.value = !0, setTimeout(() => t.target.classList.add(O), 50);
52
- }, P = (t) => {
53
- const { target: a, item: e, newIndex: n } = t;
59
+ }, M = (t) => {
60
+ const { target: a, item: e, newIndex: o } = t;
54
61
  b.value = !1, a.classList.remove(O);
55
62
  const c = e.attributes["data-id"]?.value;
56
- o("sortableItemDragged", { id: c, newIndex: n });
57
- }, A = (t) => (v.value || t.id === r.openId) && !b.value, B = (t, a) => {
58
- a ? o("update:openId", t.id) : o("update:openId", null);
59
- }, f = (t) => t.id === r.selectedId, E = (t) => {
60
- o("update:selectedId", t.id), o("update:selectedChildId", null);
61
- }, N = (t, a) => {
62
- o("update:selectedChildId", t.id), o("update:selectedId", a.id), o("update:openId", a.id);
63
- }, L = Z(r.testId, I);
64
- return (t, a) => (s(), i("div", T({ class: "sortable-list-and-search-container" }, l(L)[l(I).CONTAINER]), [
65
- d.showSearch ? (s(), g(l(J), {
63
+ n("sortableItemDragged", { id: c, newIndex: o });
64
+ }, D = (t) => (k.value || t.id === i.openId) && !b.value, R = (t, a) => {
65
+ a ? n("update:openId", t.id) : n("update:openId", null);
66
+ }, m = (t) => t.id === i.selectedId, $ = (t) => {
67
+ n("update:selectedId", t.id), n("update:selectedChildId", null);
68
+ }, w = (t, a) => {
69
+ n("update:selectedChildId", t.id), n("update:selectedId", a.id), n("update:openId", a.id);
70
+ }, T = ee(i.testId, v);
71
+ return (t, a) => (s(), r("div", V({ class: "sortable-list-and-header-container" }, l(T)[l(v).CONTAINER]), [
72
+ l(y).header || d.showSearch ? (s(), r("div", {
66
73
  key: 0,
67
- modelValue: l(u),
68
- "onUpdate:modelValue": a[0] || (a[0] = (e) => $(u) ? u.value = e : null),
69
- class: "list-search",
70
- placeholder: d.searchPlaceholder,
71
- "test-id": d.testId,
72
- onOnClear: a[1] || (a[1] = (e) => o("clearSearch"))
73
- }, null, 8, ["modelValue", "placeholder", "test-id"])) : m("", !0),
74
- d.isLoading ? S(t.$slots, "loader", { key: 2 }, () => [
75
- K("div", ee, [
76
- (s(!0), i(V, null, D(d.loadingRowCount, (e) => (s(), i("div", { key: e }, [
77
- x(l(X), {
74
+ class: K(["header-container", { sticky: d.isSticky }])
75
+ }, [
76
+ l(y).header ? g(t.$slots, "header", { key: 0 }, void 0, !0) : h("", !0),
77
+ d.showSearch ? (s(), p(l(X), {
78
+ key: 1,
79
+ modelValue: l(u),
80
+ "onUpdate:modelValue": a[0] || (a[0] = (e) => A(u) ? u.value = e : null),
81
+ placeholder: d.searchPlaceholder,
82
+ "test-id": d.testId,
83
+ onOnClear: a[1] || (a[1] = (e) => n("clearSearch"))
84
+ }, null, 8, ["modelValue", "placeholder", "test-id"])) : h("", !0)
85
+ ], 2)) : h("", !0),
86
+ d.isLoading ? g(t.$slots, "loader", { key: 2 }, () => [
87
+ Q("div", le, [
88
+ (s(!0), r(x, null, B(d.loadingRowCount, (e) => (s(), r("div", { key: e }, [
89
+ H(l(Z), {
78
90
  round: "",
79
91
  class: "loader-bar"
80
92
  })
81
93
  ]))), 128))
82
94
  ])
83
- ], !0) : (s(), i("div", _, [
84
- l(h).length ? (s(), g(l(z), T({
95
+ ], !0) : (s(), r("div", te, [
96
+ l(f).length ? (s(), p(l(W), V({
85
97
  key: 0,
86
- modelValue: l(h),
87
- "onUpdate:modelValue": a[2] || (a[2] = (e) => $(h) ? h.value = e : null),
98
+ modelValue: l(f),
99
+ "onUpdate:modelValue": a[2] || (a[2] = (e) => A(f) ? f.value = e : null),
88
100
  class: "sortable-list",
89
101
  filter: ".expand-icon",
90
102
  animation: 150,
91
103
  handle: ".draggable-handle",
92
- disabled: l(v)
93
- }, l(L)[l(I).DRAGGABLE_LIST], {
104
+ disabled: l(k)
105
+ }, l(T)[l(v).DRAGGABLE_LIST], {
94
106
  onStart: F,
95
- onEnd: P
107
+ onEnd: M
96
108
  }), {
97
- default: y(() => [
98
- (s(!0), i(V, null, D(l(h), (e, n) => (s(), g(q, {
109
+ default: I(() => [
110
+ (s(!0), r(x, null, B(l(f), (e, o) => (s(), p(N, {
99
111
  key: e.id,
100
112
  "data-id": e.id,
101
113
  item: e,
102
- index: n,
103
- "is-open": A(e),
104
- "is-selected": f(e),
105
- "selected-child-id": f(e) ? d.selectedChildId : null,
114
+ index: o,
115
+ "is-open": D(e),
116
+ "is-selected": m(e),
117
+ "selected-child-id": m(e) ? d.selectedChildId : null,
106
118
  "display-value": d.displayValue,
107
119
  "search-query": l(u),
108
120
  "search-handler": d.searchHandler,
109
- onToggle: (c) => B(e, c),
110
- onSelect: (c) => E(e),
111
- onSelectChild: (c) => N(c, e)
112
- }, w({ _: 2 }, [
113
- l(R).menu ? {
121
+ onToggle: (c) => R(e, c),
122
+ onSelect: (c) => $(e),
123
+ onSelectChild: (c) => w(c, e)
124
+ }, E({ _: 2 }, [
125
+ l(y).menu ? {
114
126
  name: "menu",
115
- fn: y(() => [
116
- S(t.$slots, "menu", { item: e }, void 0, !0)
127
+ fn: I(() => [
128
+ g(t.$slots, "menu", { item: e }, void 0, !0)
117
129
  ]),
118
130
  key: "0"
119
131
  } : void 0
120
132
  ]), 1032, ["data-id", "item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
121
133
  ]),
122
134
  _: 3
123
- }, 16, ["modelValue", "disabled"])) : m("", !0),
124
- l(k).length ? (s(), i("div", T({
135
+ }, 16, ["modelValue", "disabled"])) : h("", !0),
136
+ l(L).length ? (s(), r("div", V({
125
137
  key: 1,
126
138
  class: "locked-list"
127
- }, l(L)[l(I).LOCKED_LIST]), [
128
- (s(!0), i(V, null, D(l(k), (e) => (s(), g(q, {
139
+ }, l(T)[l(v).LOCKED_LIST]), [
140
+ (s(!0), r(x, null, B(l(L), (e) => (s(), p(N, {
129
141
  key: e.id,
130
142
  item: e,
131
- "is-open": A(e),
132
- "is-selected": f(e),
133
- "selected-child-id": f(e) ? d.selectedChildId : null,
143
+ "is-open": D(e),
144
+ "is-selected": m(e),
145
+ "selected-child-id": m(e) ? d.selectedChildId : null,
134
146
  "display-value": d.displayValue,
135
147
  "search-query": l(u),
136
148
  "on-search": d.searchHandler,
137
- onToggle: (n) => B(e, n),
138
- onSelect: (n) => E(e),
139
- onSelectChild: (n) => N(n, e)
140
- }, w({ _: 2 }, [
141
- l(R).menu ? {
149
+ "child-list-max-height": d.childListMaxHeight,
150
+ onToggle: (o) => R(e, o),
151
+ onSelect: (o) => $(e),
152
+ onSelectChild: (o) => w(o, e)
153
+ }, E({ _: 2 }, [
154
+ l(y).menu ? {
142
155
  name: "menu",
143
- fn: y(() => [
144
- S(t.$slots, "menu", { item: e }, void 0, !0)
156
+ fn: I(() => [
157
+ g(t.$slots, "menu", { item: e }, void 0, !0)
145
158
  ]),
146
159
  key: "0"
147
160
  } : void 0
148
- ]), 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "onToggle", "onSelect", "onSelectChild"]))), 128))
149
- ], 16)) : m("", !0)
161
+ ]), 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "child-list-max-height", "onToggle", "onSelect", "onSelectChild"]))), 128))
162
+ ], 16)) : h("", !0)
150
163
  ])),
151
- !l(C).length && !d.isLoading ? (s(), i("div", te, [
152
- S(t.$slots, "empty-state", {}, () => [
153
- x(l(W), { variant: "body2" }, {
154
- default: y(() => [
155
- Q(j(d.emptyStateTitle), 1)
164
+ !l(C).length && !d.isLoading ? (s(), r("div", de, [
165
+ g(t.$slots, "empty-state", {}, () => [
166
+ H(l(Y), { variant: "body2" }, {
167
+ default: I(() => [
168
+ j(J(d.emptyStateTitle), 1)
156
169
  ]),
157
170
  _: 1
158
171
  })
159
172
  ], !0)
160
- ])) : m("", !0)
173
+ ])) : h("", !0)
161
174
  ], 16));
162
175
  }
163
176
  });
164
177
  export {
165
- fe as default
178
+ ye as default
166
179
  };