@ironsource/shared-ui 2.1.6-rc.4 → 2.1.6-rc.40

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 (149) hide show
  1. package/Alert.vue_vue_type_style_index_0_scoped_a9f0dfcc_lang.css +1 -0
  2. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_lang.css +1 -0
  3. package/AppHeader.vue_vue_type_style_index_0_scoped_538ccdc6_lang.css +1 -0
  4. package/Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css +1 -0
  5. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_a8fdae89_lang.css +1 -0
  6. package/ChipV4.vue_vue_type_style_index_0_scoped_12c0f396_lang.css +1 -0
  7. package/DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css +1 -0
  8. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +1 -0
  9. package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +1 -0
  10. package/Dropdown.vue_vue_type_style_index_0_scoped_aaa8c4bb_lang.css +1 -0
  11. package/DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css +1 -0
  12. package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +1 -0
  13. package/FoldableSection.vue_vue_type_style_index_0_scoped_1a5f0e2e_lang.css +1 -0
  14. package/{FormCard.vue_vue_type_style_index_0_scoped_ef8b4e81_lang.css → FormCard.vue_vue_type_style_index_0_scoped_52ade67c_lang.css} +1 -1
  15. package/HelpIcon.vue_vue_type_style_index_0_scoped_06fce2e3_lang.css +1 -0
  16. package/IconV4.vue_vue_type_style_index_0_scoped_9d3c9cda_lang.css +1 -0
  17. package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +1 -0
  18. package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +1 -0
  19. package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +1 -0
  20. package/TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css +1 -0
  21. package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +1 -0
  22. package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +1 -0
  23. package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +1 -0
  24. package/components/alert/Alert.vue.d.ts +7 -0
  25. package/components/alert/Alert.vue.js +3 -3
  26. package/components/alert/Alert.vue2.js +44 -40
  27. package/components/alert/index.d.ts +27 -2
  28. package/components/appHeader/AppHeader.vue.d.ts +6 -2
  29. package/components/appHeader/AppHeader.vue.js +2 -2
  30. package/components/appHeader/AppHeader.vue2.js +30 -28
  31. package/components/appHeader/index.d.ts +6 -2
  32. package/components/autocomplete/Autocomplete.vue.d.ts +6 -0
  33. package/components/autocomplete/Autocomplete.vue.js +2 -2
  34. package/components/autocomplete/Autocomplete.vue2.js +45 -37
  35. package/components/autocomplete/index.d.ts +21 -1
  36. package/components/button/v4/ButtonV4.vue.d.ts +7 -7
  37. package/components/button/v4/IconButtonV4.vue.d.ts +4 -4
  38. package/components/button/v4/index.d.ts +61 -61
  39. package/components/chip/v4/Chip.types.d.ts +6 -0
  40. package/components/chip/v4/ChipV4.vue.d.ts +28 -35
  41. package/components/chip/v4/ChipV4.vue.js +3 -3
  42. package/components/chip/v4/ChipV4.vue2.js +28 -59
  43. package/components/chip/v4/index.d.ts +45 -148
  44. package/components/dialog/v3/Dialog.vue.d.ts +1 -1
  45. package/components/dialog/v3/index.d.ts +20 -20
  46. package/components/dialog/v4/DialogV4.vue.js +3 -3
  47. package/components/dialog/v4/DialogV4.vue2.js +67 -62
  48. package/components/dropdown/common/Dropdown.common.js +74 -69
  49. package/components/dropdown/common/Option.common.d.ts +1 -1
  50. package/components/dropdown/common/Option.common.js +9 -9
  51. package/components/dropdown/composables/useChildOptions.d.ts +7 -0
  52. package/components/dropdown/composables/useChildOptions.js +14 -0
  53. package/components/dropdown/v3/Dropdown.vue.d.ts +4 -0
  54. package/components/dropdown/v3/Dropdown.vue.js +4 -4
  55. package/components/dropdown/v3/Dropdown.vue2.js +32 -32
  56. package/components/dropdown/v3/index.d.ts +13 -1
  57. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +16 -3
  58. package/components/dropdown/v4/AppDropdownTrigger.vue.js +3 -3
  59. package/components/dropdown/v4/AppDropdownTrigger.vue2.js +102 -61
  60. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +2 -2
  61. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +1 -1
  62. package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +8 -3
  63. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  64. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +22 -21
  65. package/components/dropdown/v4/DropdownV4.vue.d.ts +35 -3
  66. package/components/dropdown/v4/DropdownV4.vue.js +2 -2
  67. package/components/dropdown/v4/DropdownV4.vue2.js +127 -114
  68. package/components/dropdown/v4/OptionV4.vue.d.ts +14 -3
  69. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  70. package/components/dropdown/v4/OptionV4.vue2.js +79 -56
  71. package/components/dropdown/v4/TreeDropdown.vue.d.ts +112 -0
  72. package/components/dropdown/v4/TreeDropdown.vue.js +7 -0
  73. package/components/dropdown/v4/TreeDropdown.vue2.js +122 -0
  74. package/components/dropdown/v4/dropdownStoryArgs.d.ts +1 -1
  75. package/components/dropdown/v4/index.d.ts +422 -38
  76. package/components/dropdown/v4/index.js +7 -4
  77. package/components/emptyState/v3/EmptyState.vue.d.ts +2 -2
  78. package/components/emptyState/v3/index.d.ts +47 -47
  79. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
  80. package/components/emptyState/v4/index.d.ts +7 -7
  81. package/components/forms/FormCard.vue.js +2 -2
  82. package/components/forms/FormCard.vue2.js +9 -9
  83. package/components/icon/v4/Icon.types.d.ts +1 -1
  84. package/components/icon/v4/IconV4.vue.d.ts +16 -6
  85. package/components/icon/v4/IconV4.vue.js +4 -4
  86. package/components/icon/v4/IconV4.vue2.js +36 -33
  87. package/components/icon/v4/index.d.ts +53 -15
  88. package/components/inlineCopy/InlineCopy.vue.d.ts +6 -2
  89. package/components/inlineCopy/InlineCopy.vue.js +3 -3
  90. package/components/inlineCopy/InlineCopy.vue2.js +23 -22
  91. package/components/inlineCopy/index.d.ts +6 -2
  92. package/components/input/v4/TextField.vue.d.ts +5 -0
  93. package/components/input/v4/TextField.vue.js +3 -3
  94. package/components/input/v4/TextField.vue2.js +24 -21
  95. package/components/input/v4/index.d.ts +20 -1
  96. package/components/layout/FoldableSection.vue.js +5 -5
  97. package/components/layout/FoldableSection.vue2.js +1 -1
  98. package/components/multibar/MultiBarMenu.vue2.js +12 -11
  99. package/components/shared/FieldLabel.vue.js +3 -3
  100. package/components/shared/FieldLabel.vue2.js +9 -9
  101. package/components/snackbar/v4/SnackbarV4.vue.d.ts +20 -20
  102. package/components/table/common/Table.common.d.ts +1 -0
  103. package/components/table/common/Table.common.js +65 -61
  104. package/components/table/v4/DataGrid.vue.d.ts +9 -1
  105. package/components/table/v4/DataGrid.vue.js +3 -3
  106. package/components/table/v4/DataGrid.vue2.js +180 -176
  107. package/components/table/v4/DataGridMenu.vue2.js +3 -2
  108. package/components/table/v4/HelpIcon.vue.js +5 -5
  109. package/components/table/v4/HelpIcon.vue2.js +5 -5
  110. package/components/table/v4/index.d.ts +29 -5
  111. package/components/textArea/v4/TextAreaV4.vue.js +3 -3
  112. package/components/textArea/v4/TextAreaV4.vue2.js +1 -1
  113. package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
  114. package/components/toggle/v4/ToggleV4.vue.js +3 -3
  115. package/components/toggle/v4/ToggleV4.vue2.js +12 -12
  116. package/components/toggle/v4/index.d.ts +20 -20
  117. package/components/tooltip/v4/TooltipV4.vue.d.ts +6 -2
  118. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  119. package/components/tooltip/v4/TooltipV4.vue2.js +21 -19
  120. package/components/tooltip/v4/index.d.ts +17 -5
  121. package/composables/useFormValidation.js +19 -13
  122. package/design-foundation.stories/icons/iconsData.d.ts +5 -1
  123. package/index.d.ts +1451 -688
  124. package/mocks/apps.d.ts +1 -0
  125. package/mocks/options.d.ts +12 -0
  126. package/package.json +1 -1
  127. package/utils/text.d.ts +1 -0
  128. package/utils/text.js +9 -0
  129. package/Alert.vue_vue_type_style_index_0_scoped_d6680a72_lang.css +0 -1
  130. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_0267d003_lang.css +0 -1
  131. package/AppHeader.vue_vue_type_style_index_0_scoped_c148fc7a_lang.css +0 -1
  132. package/Autocomplete.vue_vue_type_style_index_0_scoped_62faa8e0_lang.css +0 -1
  133. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_889042cf_lang.css +0 -1
  134. package/ChipV4.vue_vue_type_style_index_0_scoped_78d7c9c0_lang.css +0 -1
  135. package/DataGrid.vue_vue_type_style_index_0_scoped_c96fba2c_lang.css +0 -1
  136. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c9783327_lang.css +0 -1
  137. package/DialogV4.vue_vue_type_style_index_0_scoped_c3004ba3_lang.css +0 -1
  138. package/Dropdown.vue_vue_type_style_index_0_scoped_d4f8e790_lang.css +0 -1
  139. package/DropdownV4.vue_vue_type_style_index_0_scoped_0968078f_lang.css +0 -1
  140. package/FieldLabel.vue_vue_type_style_index_0_scoped_72ab1f25_lang.css +0 -1
  141. package/FoldableSection.vue_vue_type_style_index_0_scoped_8d0fd203_lang.css +0 -1
  142. package/HelpIcon.vue_vue_type_style_index_0_scoped_7a611779_lang.css +0 -1
  143. package/IconV4.vue_vue_type_style_index_0_scoped_a78f8a3e_lang.css +0 -1
  144. package/InlineCopy.vue_vue_type_style_index_0_scoped_ff9f4a0f_lang.css +0 -1
  145. package/OptionV4.vue_vue_type_style_index_0_scoped_b8375219_lang.css +0 -1
  146. package/TextAreaV4.vue_vue_type_style_index_0_scoped_8199b662_lang.css +0 -1
  147. package/TextField.vue_vue_type_style_index_0_scoped_07687bcc_lang.css +0 -1
  148. package/ToggleV4.vue_vue_type_style_index_0_scoped_ad231e8c_lang.css +0 -1
  149. package/TooltipV4.vue_vue_type_style_index_0_scoped_25809092_lang.css +0 -1
@@ -1,19 +1,23 @@
1
- import "../../../OptionV4.vue_vue_type_style_index_0_scoped_b8375219_lang.css"; import { defineComponent as B, openBlock as o, createBlock as m, unref as i, withCtx as r, createElementVNode as a, normalizeClass as g, createCommentVNode as l, createElementBlock as s, renderSlot as u, createVNode as f, createTextVNode as b, toDisplayString as k, withModifiers as $ } from "vue";
1
+ import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css"; import { defineComponent as B, ref as z, computed as N, openBlock as i, createBlock as f, unref as n, withCtx as y, createElementVNode as s, normalizeClass as v, createCommentVNode as o, createElementBlock as l, renderSlot as c, createVNode as d, createTextVNode as K, toDisplayString as h, withModifiers as V } from "vue";
2
2
  import "../../typography/Heading.vue.js";
3
- import I from "../../typography/Text.vue.js";
4
- import z from "../../checkbox/v4/CheckboxV4.vue.js";
5
- import p from "../../icon/v4/IconV4.vue.js";
6
- import { NOOP as N } from "@vue/shared";
7
- import { optionCommon as V } from "../common/Option.common.js";
8
- import w from "../../typography/v4/Typography.vue.js";
9
- import O from "../../tooltip/v4/TooltipV4.vue.js";
10
- const P = {
3
+ import w from "../../typography/Text.vue.js";
4
+ import O from "../../checkbox/v4/CheckboxV4.vue.js";
5
+ import T from "../../icon/v4/IconV4.vue.js";
6
+ import { NOOP as P } from "@vue/shared";
7
+ import { optionCommon as S } from "../common/Option.common.js";
8
+ import E from "../../typography/v4/Typography.vue.js";
9
+ import j from "../../tooltip/v4/TooltipV4.vue.js";
10
+ import { isElementTruncated as M } from "../../../utils/text.js";
11
+ const R = {
11
12
  key: 1,
12
13
  class: "image"
13
- }, S = ["src"], j = {
14
+ }, A = ["src"], D = {
14
15
  key: 2,
15
16
  class: "start-icon"
16
- }, E = { class: "text-container" }, M = { key: 0 }, R = /* @__PURE__ */ B({
17
+ }, q = {
18
+ key: 3,
19
+ class: "end-icon"
20
+ }, F = { key: 0 }, _ = /* @__PURE__ */ B({
17
21
  __name: "OptionV4",
18
22
  props: {
19
23
  option: { default: null },
@@ -27,92 +31,111 @@ const P = {
27
31
  imageKey: { default: null },
28
32
  iconKey: { default: null },
29
33
  iconType: { default: "regular" },
34
+ endIconKey: { default: null },
35
+ endIconType: { default: "regular" },
30
36
  toolTipPlacement: { default: "right" }
31
37
  },
32
38
  setup(e) {
33
- const h = e, { selected: c, isMulti: d, id: v, onClick: x, api: y } = V(h), K = (t) => t && typeof t == "object" && "optionTooltipText" in t ? t.optionTooltipText : "", C = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null;
34
- return (t, n) => (o(), m(i(O), {
35
- text: K(e.option),
36
- "test-id": C(e.option),
39
+ const g = e, { selected: r, isMulti: u, id: I, onClick: x, api: b } = S(g), m = z(null), p = N(
40
+ () => m.value && M(m.value)
41
+ ), C = (t) => t && typeof t == "object" && "optionTooltipText" in t ? t.optionTooltipText : p.value ? t[g.nameKey] : "", $ = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null;
42
+ return (t, a) => (i(), f(n(j), {
43
+ text: C(e.option),
44
+ "test-id": $(e.option),
37
45
  placement: e.toolTipPlacement,
38
46
  class: "tooltip-option"
39
47
  }, {
40
- default: r(() => [
41
- a("div", {
48
+ default: y(() => [
49
+ s("div", {
42
50
  ref: "el",
43
- class: g(["item-container", {
51
+ class: v(["item-container", {
44
52
  "item-container--disabled": e.disabled,
45
53
  "item-container--active": e.nameKey ? !1 : e.active,
46
- "item-container--selected": i(c),
47
- "item-container--multi": i(d)
54
+ "item-container--selected": n(r),
55
+ "item-container--multi": n(u)
48
56
  }])
49
57
  }, [
50
- a("div", {
51
- class: g(["item", {
52
- "item--multi": i(d),
58
+ s("div", {
59
+ class: v(["item", {
60
+ "item--multi": n(u),
53
61
  "item--with-icon": t.$slots["icon-start"] || t.$slots.image
54
62
  }])
55
63
  }, [
56
- i(d) ? (o(), m(i(z), {
64
+ n(u) ? (i(), f(n(O), {
57
65
  key: 0,
58
- id: i(v).toString(),
66
+ id: n(I).toString(),
59
67
  tabindex: "-1",
60
68
  class: "checkbox",
61
- size: "sm",
62
- "is-checked": i(c),
63
- "is-indeterminate": e.isIndeterminate && !e.option,
64
- onClick: n[0] || (n[0] = (T) => e.disabled ? i(N)() : i(x)(T))
65
- }, null, 8, ["id", "is-checked", "is-indeterminate"])) : l("", !0),
66
- t.$slots.image || e.imageKey ? (o(), s("div", P, [
67
- u(t.$slots, "image", {}, () => [
68
- e.imageKey ? (o(), s("img", {
69
+ "is-checked": n(r),
70
+ "is-indeterminate": e.isIndeterminate,
71
+ onClick: a[0] || (a[0] = (k) => e.disabled ? n(P)() : n(x)(k))
72
+ }, null, 8, ["id", "is-checked", "is-indeterminate"])) : o("", !0),
73
+ t.$slots.image || e.imageKey ? (i(), l("div", R, [
74
+ c(t.$slots, "image", {}, () => [
75
+ e.imageKey ? (i(), l("img", {
69
76
  key: 0,
70
77
  src: e.option[e.imageKey]
71
- }, null, 8, S)) : l("", !0)
78
+ }, null, 8, A)) : o("", !0)
72
79
  ], !0)
73
- ])) : l("", !0),
74
- t.$slots["icon-start"] || e.iconKey ? (o(), s("div", j, [
75
- u(t.$slots, "icon-start", {}, () => [
76
- f(i(p), {
80
+ ])) : o("", !0),
81
+ t.$slots["icon-start"] || e.iconKey ? (i(), l("div", D, [
82
+ c(t.$slots, "icon-start", {}, () => [
83
+ d(n(T), {
77
84
  type: e.iconType,
78
85
  name: e.option[e.iconKey],
79
86
  size: e.iconType === "regular" ? "20px" : "16px"
80
87
  }, null, 8, ["type", "name", "size"])
81
88
  ], !0)
82
- ])) : l("", !0),
83
- a("div", E, [
84
- f(i(w), { variant: "body2" }, {
85
- default: r(() => [
86
- u(t.$slots, "default", {}, () => [
87
- b(k(e.option[e.nameKey]), 1)
89
+ ])) : o("", !0),
90
+ s("div", {
91
+ ref_key: "textContainerRef",
92
+ ref: m,
93
+ class: "text-container"
94
+ }, [
95
+ d(n(E), {
96
+ class: "option-text",
97
+ variant: "body2"
98
+ }, {
99
+ default: y(() => [
100
+ c(t.$slots, "default", {}, () => [
101
+ K(h(e.option[e.nameKey]), 1)
88
102
  ], !0)
89
103
  ]),
90
104
  _: 3
91
105
  }),
92
- e.subtitle ? (o(), m(i(I), {
106
+ e.subtitle ? (i(), f(n(w), {
93
107
  key: 0,
94
108
  class: "subtitle",
95
109
  size: "xs"
96
110
  }, {
97
- default: r(() => [
98
- b(k(e.subtitle), 1)
111
+ default: y(() => [
112
+ K(h(e.subtitle), 1)
99
113
  ]),
100
114
  _: 1
101
- })) : l("", !0)
102
- ])
115
+ })) : o("", !0)
116
+ ], 512),
117
+ t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (i(), l("div", q, [
118
+ c(t.$slots, "icon-end", {}, () => [
119
+ d(n(T), {
120
+ type: e.endIconType,
121
+ name: e.option[e.endIconKey],
122
+ size: e.endIconType === "regular" || e.endIconType === "ab-test" ? "20px" : "16px"
123
+ }, null, 8, ["type", "name", "size"])
124
+ ], !0)
125
+ ])) : o("", !0)
103
126
  ], 2),
104
- i(y).clearable && i(c) ? (o(), s("div", M, [
105
- a("button", {
127
+ n(b).clearable && n(r) ? (i(), l("div", F, [
128
+ s("button", {
106
129
  class: "clear-button",
107
- onClick: n[1] || (n[1] = $((T) => i(y).clearSelection(), ["prevent", "stop"]))
130
+ onClick: a[1] || (a[1] = V((k) => n(b).clearSelection(), ["prevent", "stop"]))
108
131
  }, [
109
- f(i(p), {
132
+ d(n(T), {
110
133
  name: "close",
111
134
  width: "8",
112
- height: 8
135
+ height: "8"
113
136
  })
114
137
  ])
115
- ])) : l("", !0)
138
+ ])) : o("", !0)
116
139
  ], 2)
117
140
  ]),
118
141
  _: 3
@@ -120,5 +143,5 @@ const P = {
120
143
  }
121
144
  });
122
145
  export {
123
- R as default
146
+ _ as default
124
147
  };
@@ -0,0 +1,112 @@
1
+ import { IconTypes } from '@is-ssp/icon/v4/Icon.types';
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ options: unknown[];
4
+ selected?: unknown[];
5
+ isOpen?: boolean;
6
+ placeholder?: string;
7
+ inlineSearchPlaceholder?: string;
8
+ size?: 'small' | 'medium' | 'large';
9
+ disabled?: boolean;
10
+ testId?: string;
11
+ displayValue: (option: unknown) => string;
12
+ optionNameKey?: string;
13
+ optionIconKey?: string;
14
+ optionImageKey?: string;
15
+ optionIconType?: IconTypes;
16
+ optionEndIconKey?: string;
17
+ optionEndIconType?: IconTypes;
18
+ valueToCopy?: string;
19
+ disabledOptionKey?: string;
20
+ optionChildrenKey?: string;
21
+ }>, {
22
+ selected: any;
23
+ placeholder: string;
24
+ inlineSearchPlaceholder: string;
25
+ size: string;
26
+ disabled: boolean;
27
+ testId: string;
28
+ optionNameKey: string;
29
+ optionIconKey: string;
30
+ optionImageKey: string;
31
+ optionIconType: any;
32
+ optionEndIconKey: string;
33
+ optionEndIconType: any;
34
+ valueToCopy: any;
35
+ disabledOptionKey: string;
36
+ optionChildrenKey: string;
37
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
+ "update:selected": (value: unknown) => void;
39
+ "update:isOpen": (value: unknown) => void;
40
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
41
+ options: unknown[];
42
+ selected?: unknown[];
43
+ isOpen?: boolean;
44
+ placeholder?: string;
45
+ inlineSearchPlaceholder?: string;
46
+ size?: 'small' | 'medium' | 'large';
47
+ disabled?: boolean;
48
+ testId?: string;
49
+ displayValue: (option: unknown) => string;
50
+ optionNameKey?: string;
51
+ optionIconKey?: string;
52
+ optionImageKey?: string;
53
+ optionIconType?: IconTypes;
54
+ optionEndIconKey?: string;
55
+ optionEndIconType?: IconTypes;
56
+ valueToCopy?: string;
57
+ disabledOptionKey?: string;
58
+ optionChildrenKey?: string;
59
+ }>, {
60
+ selected: any;
61
+ placeholder: string;
62
+ inlineSearchPlaceholder: string;
63
+ size: string;
64
+ disabled: boolean;
65
+ testId: string;
66
+ optionNameKey: string;
67
+ optionIconKey: string;
68
+ optionImageKey: string;
69
+ optionIconType: any;
70
+ optionEndIconKey: string;
71
+ optionEndIconType: any;
72
+ valueToCopy: any;
73
+ disabledOptionKey: string;
74
+ optionChildrenKey: string;
75
+ }>>> & {
76
+ "onUpdate:selected"?: (value: unknown) => any;
77
+ "onUpdate:isOpen"?: (value: unknown) => any;
78
+ }, {
79
+ disabled: boolean;
80
+ size: 'small' | 'medium' | 'large';
81
+ testId: string;
82
+ selected: unknown[];
83
+ placeholder: string;
84
+ inlineSearchPlaceholder: string;
85
+ optionNameKey: string;
86
+ optionIconKey: string;
87
+ optionImageKey: string;
88
+ optionIconType: IconTypes;
89
+ optionEndIconKey: string;
90
+ optionEndIconType: IconTypes;
91
+ valueToCopy: string;
92
+ disabledOptionKey: string;
93
+ optionChildrenKey: string;
94
+ }>;
95
+ export default _default;
96
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
97
+ type __VLS_TypePropsToRuntimeProps<T> = {
98
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
99
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
100
+ } : {
101
+ type: import('vue').PropType<T[K]>;
102
+ required: true;
103
+ };
104
+ };
105
+ type __VLS_WithDefaults<P, D> = {
106
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
107
+ default: D[K];
108
+ }> : P[K];
109
+ };
110
+ type __VLS_Prettify<T> = {
111
+ [K in keyof T]: T[K];
112
+ } & {};
@@ -0,0 +1,7 @@
1
+ import o from "./TreeDropdown.vue2.js";
2
+ /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-142eab98"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,122 @@
1
+ import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css"; import { defineComponent as w, ref as S, watch as T, openBlock as u, createBlock as f, unref as o, withCtx as E, createVNode as N, withModifiers as k, createElementBlock as h, Fragment as B, renderList as x, createCommentVNode as z } from "vue";
2
+ import V from "./DropdownV4.vue.js";
3
+ import "./DefaultDropdownTrigger.vue.js";
4
+ import "./IconButtonDropdownTrigger.vue.js";
5
+ import "./ChipDropdownTrigger.vue.js";
6
+ import "./AppDropdownTrigger.vue.js";
7
+ import "./ButtonDropdownTrigger.vue.js";
8
+ import "./ButtonFilterDropdownTrigger.vue.js";
9
+ import "./TreeDropdown.vue.js";
10
+ import v from "./OptionV4.vue.js";
11
+ import { useChildOptions as D } from "../composables/useChildOptions.js";
12
+ const P = {
13
+ key: 0,
14
+ class: "child-options"
15
+ }, Q = /* @__PURE__ */ w({
16
+ __name: "TreeDropdown",
17
+ props: {
18
+ options: null,
19
+ selected: { default: null },
20
+ isOpen: { type: Boolean },
21
+ placeholder: { default: "Select" },
22
+ inlineSearchPlaceholder: { default: "Search" },
23
+ size: { default: "medium" },
24
+ disabled: { type: Boolean, default: !1 },
25
+ testId: { default: "" },
26
+ displayValue: null,
27
+ optionNameKey: { default: "" },
28
+ optionIconKey: { default: "" },
29
+ optionImageKey: { default: "" },
30
+ optionIconType: { default: null },
31
+ optionEndIconKey: { default: "" },
32
+ optionEndIconType: { default: null },
33
+ valueToCopy: { default: null },
34
+ disabledOptionKey: { default: "disabled" },
35
+ optionChildrenKey: { default: "" }
36
+ },
37
+ emits: ["update:selected", "update:isOpen"],
38
+ setup(e, { emit: y }) {
39
+ const a = e, l = S(a.selected);
40
+ T(
41
+ () => a.selected,
42
+ () => {
43
+ l.value = [...a.selected];
44
+ }
45
+ );
46
+ const { hasChildren: c, getChildren: d, allChildrenSelected: r, someChildrenSelected: K } = D(l, a.optionChildrenKey), p = (n) => {
47
+ if (c(n)) {
48
+ r(n) ? l.value = l.value.filter(
49
+ (i) => !d(n).includes(i)
50
+ ) : l.value = [
51
+ ...l.value.filter((i) => !d(n).includes(i)),
52
+ ...d(n)
53
+ ];
54
+ return;
55
+ }
56
+ l.value.includes(n) ? l.value = l.value.filter(
57
+ (i) => i !== n
58
+ ) : l.value = [...l.value, n];
59
+ }, m = (n) => l.value.includes(n), C = (n) => 1 + (c(n) ? d(n).length : 0), I = () => {
60
+ y("update:selected", l.value);
61
+ }, g = () => {
62
+ l.value = [];
63
+ };
64
+ return (n, i) => (u(), f(o(V), {
65
+ multi: "",
66
+ class: "tree-dropdown",
67
+ "show-select-all": !1,
68
+ "is-open": e.isOpen,
69
+ options: e.options,
70
+ selected: e.selected,
71
+ "display-value": e.displayValue,
72
+ placeholder: e.placeholder,
73
+ "inline-search-placeholder": e.inlineSearchPlaceholder,
74
+ "option-name-key": e.optionNameKey,
75
+ size: e.size,
76
+ "test-id": e.testId,
77
+ disabled: e.disabled,
78
+ "disable-virtual-scroll": "",
79
+ "override-option-count-calculation": C,
80
+ "trigger-show-all-selected-text": !1,
81
+ "onUpdate:selected": i[0] || (i[0] = (t) => y("update:selected", t)),
82
+ "onUpdate:isOpen": i[1] || (i[1] = (t) => y("update:isOpen", t)),
83
+ onApply: I,
84
+ onClear: g
85
+ }, {
86
+ default: E(({ option: t, index: b }) => [
87
+ N(o(v), {
88
+ option: t,
89
+ "selected-prop": o(c)(t) ? o(r)(t) : m(t),
90
+ "is-indeterminate": !o(r)(t) && o(K)(t),
91
+ disabled: t[e.disabledOptionKey],
92
+ "name-key": e.optionNameKey,
93
+ "image-key": e.optionImageKey,
94
+ "icon-key": e.optionIconKey,
95
+ "icon-type": e.optionIconType,
96
+ "end-icon-key": e.optionEndIconKey,
97
+ "end-icon-type": e.optionEndIconType,
98
+ onClick: k(() => p(t), ["stop"])
99
+ }, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "onClick"]),
100
+ o(c)(t) ? (u(), h("div", P, [
101
+ (u(!0), h(B, null, x(o(d)(t), (s, O) => (u(), f(o(v), {
102
+ key: `${b}-${O}`,
103
+ option: s,
104
+ "selected-prop": m(s),
105
+ disabled: s[e.disabledOptionKey],
106
+ "name-key": e.optionNameKey,
107
+ "image-key": e.optionImageKey,
108
+ "icon-key": e.optionIconKey,
109
+ "icon-type": e.optionIconType,
110
+ "end-icon-key": e.optionEndIconKey,
111
+ "end-icon-type": e.optionEndIconType,
112
+ onClick: k(() => p(s), ["stop"])
113
+ }, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "onClick"]))), 128))
114
+ ])) : z("", !0)
115
+ ]),
116
+ _: 1
117
+ }, 8, ["is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled"]));
118
+ }
119
+ });
120
+ export {
121
+ Q as default
122
+ };
@@ -220,7 +220,7 @@ export declare const dropDownStoryArgs: {
220
220
  };
221
221
  };
222
222
  optionIconType: {
223
- options: ("fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test")[];
223
+ options: ("fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat")[];
224
224
  table: {
225
225
  category: string;
226
226
  };