@ironsource/shared-ui 2.1.11-rc.6 → 2.1.11-rc.60

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 (197) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +1 -0
  2. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_1aa6df01_lang.css +1 -0
  3. package/Chart.vue_vue_type_style_index_0_scoped_026d82c5_lang.css +1 -0
  4. package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +1 -0
  5. package/ChartLegend.vue_vue_type_style_index_0_scoped_aa32a103_lang.css +1 -0
  6. package/ChartLoader.vue_vue_type_style_index_0_scoped_ffa4cc66_lang.css +1 -0
  7. package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
  8. package/CheckboxV4.vue_vue_type_style_index_0_scoped_af4ae3c3_lang.css +1 -0
  9. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +1 -0
  10. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2a77c137_lang.css +1 -0
  11. package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
  12. package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
  13. package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +1 -0
  14. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_73bf9b5b_lang.css +1 -0
  15. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
  16. package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
  17. package/EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_lang.css +1 -0
  18. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
  19. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
  20. package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
  21. package/IconFlag.vue_vue_type_style_index_0_scoped_6526c390_lang.css +1 -0
  22. package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +1 -0
  23. package/OptionV4.vue_vue_type_style_index_0_scoped_5ff4b654_lang.css +1 -0
  24. package/PopoverV4.vue_vue_type_style_index_0_scoped_66694b4e_lang.css +1 -0
  25. package/README.md +4 -15
  26. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +1 -0
  27. package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
  28. package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +1 -0
  29. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
  30. package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +1 -0
  31. package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +1 -0
  32. package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
  33. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +1 -0
  34. package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
  35. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +1 -0
  36. package/Typography.vue_vue_type_style_index_0_scoped_07b259bf_lang.css +1 -0
  37. package/components/autocomplete/Autocomplete.vue2.js +3 -2
  38. package/components/chart/Chart.vue.d.ts +16 -3
  39. package/components/chart/Chart.vue.js +5 -5
  40. package/components/chart/Chart.vue2.js +145 -123
  41. package/components/chart/ChartHeader.vue.d.ts +13 -6
  42. package/components/chart/ChartHeader.vue.js +2 -2
  43. package/components/chart/ChartHeader.vue2.js +32 -29
  44. package/components/chart/ChartLegend.vue.d.ts +5 -0
  45. package/components/chart/ChartLegend.vue.js +3 -3
  46. package/components/chart/ChartLegend.vue2.js +110 -50
  47. package/components/chart/ChartLoader.vue.js +5 -23
  48. package/components/chart/ChartLoader.vue2.js +15 -0
  49. package/components/chart/ChartTooltip.vue.d.ts +4 -5
  50. package/components/chart/ChartTooltip.vue.js +2 -2
  51. package/components/chart/ChartTooltip.vue2.js +64 -43
  52. package/components/chart/SettingsHeader.vue.js +3 -3
  53. package/components/chart/SettingsHeader.vue2.js +34 -26
  54. package/components/chart/index.d.ts +55 -16
  55. package/components/chart/mockData.d.ts +22 -1
  56. package/components/chart/types.d.ts +15 -1
  57. package/components/chart/utils/utils.js +5 -5
  58. package/components/checkbox/v4/CheckboxV4.vue.js +3 -3
  59. package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
  60. package/components/datePicker/v4/DatePickerV4.vue2.js +8 -7
  61. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  62. package/components/dateRange/v4/DateRangeV4.vue2.js +9 -9
  63. package/components/dialog/v4/DialogV4.vue.d.ts +15 -0
  64. package/components/dialog/v4/DialogV4.vue.js +3 -3
  65. package/components/dialog/v4/DialogV4.vue2.js +80 -73
  66. package/components/dialog/v4/index.d.ts +58 -1
  67. package/components/dropdown/common/Dropdown.common.js +200 -189
  68. package/components/dropdown/v3/Dropdown.vue.d.ts +2 -2
  69. package/components/dropdown/v3/index.d.ts +39 -39
  70. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +1 -1
  71. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
  72. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
  73. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
  74. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  75. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +7 -7
  76. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +10 -0
  77. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  78. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +88 -47
  79. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +133 -0
  80. package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
  81. package/components/dropdown/v4/ConditionalDropdown.vue2.js +246 -0
  82. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  83. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +45 -46
  84. package/components/dropdown/v4/DropdownV4.vue.d.ts +26 -6
  85. package/components/dropdown/v4/DropdownV4.vue.js +2 -2
  86. package/components/dropdown/v4/DropdownV4.vue2.js +187 -167
  87. package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
  88. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  89. package/components/dropdown/v4/OptionV4.vue2.js +116 -91
  90. package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
  91. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  92. package/components/dropdown/v4/TreeDropdown.vue2.js +123 -113
  93. package/components/dropdown/v4/index.d.ts +431 -95
  94. package/components/dropdown/v4/index.js +6 -3
  95. package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
  96. package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
  97. package/components/filtersPanel/v4/FiltersPanelV4.vue.js +2 -2
  98. package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
  99. package/components/forms/FormCard.vue.js +3 -3
  100. package/components/forms/FormCard.vue2.js +1 -1
  101. package/components/icon/v4/IconFlag.vue.js +3 -3
  102. package/components/icon/v4/IconFlag.vue2.js +1 -1
  103. package/components/icon/v4/consts.d.ts +1 -1
  104. package/components/icon/v4/consts.js +1 -1
  105. package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
  106. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  107. package/components/inlineCopy/InlineCopy.vue2.js +24 -22
  108. package/components/inlineCopy/index.d.ts +9 -0
  109. package/components/input/v4/TextField.vue.js +3 -3
  110. package/components/input/v4/TextField.vue2.js +185 -165
  111. package/components/multibar/MultiBarMenu.vue2.js +3 -2
  112. package/components/popover/v4/PopoverV4.vue.d.ts +11 -1
  113. package/components/popover/v4/PopoverV4.vue.js +4 -3
  114. package/components/popover/v4/PopoverV4.vue2.js +40 -26
  115. package/components/popover/v4/index.d.ts +46 -8
  116. package/components/snackbar/v4/SnackbarV4.vue.d.ts +7 -116
  117. package/components/snackbar/v4/SnackbarV4.vue.js +5 -5
  118. package/components/snackbar/v4/SnackbarV4.vue2.js +62 -60
  119. package/components/sortableList/SortableItem.vue.d.ts +5 -0
  120. package/components/sortableList/SortableItem.vue.js +3 -3
  121. package/components/sortableList/SortableItem.vue2.js +86 -70
  122. package/components/sortableList/SortableItemLabel.vue.js +3 -3
  123. package/components/sortableList/SortableItemLabel.vue2.js +20 -23
  124. package/components/sortableList/SortableList.vue.d.ts +17 -1
  125. package/components/sortableList/SortableList.vue.js +4 -4
  126. package/components/sortableList/SortableList.vue2.js +113 -94
  127. package/components/sortableList/index.d.ts +63 -5
  128. package/components/table/common/Table.common.d.ts +1 -1
  129. package/components/table/common/Table.common.js +83 -77
  130. package/components/table/common/Table.types.d.ts +1 -1
  131. package/components/table/common/consts.d.ts +4 -0
  132. package/components/table/common/consts.js +7 -0
  133. package/components/table/v3/Table.vue.d.ts +1 -1
  134. package/components/table/v3/index.d.ts +5 -5
  135. package/components/table/v4/DataGrid.vue.d.ts +12 -2
  136. package/components/table/v4/DataGrid.vue.js +2 -2
  137. package/components/table/v4/DataGrid.vue2.js +164 -155
  138. package/components/table/v4/DataGridMenu.vue.js +5 -5
  139. package/components/table/v4/DataGridMenu.vue2.js +4 -3
  140. package/components/table/v4/MultipleDataGrid.vue.d.ts +1 -1
  141. package/components/table/v4/index.d.ts +84 -46
  142. package/components/table-cells/common/Editable.common.js +29 -23
  143. package/components/table-cells/common/EditableContext.d.ts +1 -0
  144. package/components/table-cells/v4/EditableV4.vue.d.ts +5 -0
  145. package/components/table-cells/v4/EditableV4.vue.js +3 -3
  146. package/components/table-cells/v4/EditableV4.vue2.js +11 -10
  147. package/components/table-cells/v4/index.d.ts +20 -1
  148. package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
  149. package/components/tooltip/v4/TooltipV4.vue.js +3 -3
  150. package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
  151. package/components/tooltip/v4/index.d.ts +39 -1
  152. package/components/typography/v4/Typography.vue.js +2 -2
  153. package/components/typography/v4/Typography.vue2.js +24 -18
  154. package/design-foundation.stories/icons/iconsData.d.ts +1 -1
  155. package/index.d.ts +1570 -328
  156. package/index.js +1 -1
  157. package/mocks/options.d.ts +19 -0
  158. package/mocks/words.d.ts +1 -1
  159. package/package.json +2 -1
  160. package/style/v4/grid.css +1 -1
  161. package/style/v4/grid.css.map +1 -1
  162. package/style/v4/spacings.scss +1 -0
  163. package/testids/index.d.ts +2 -0
  164. package/testids/index.js +13 -13
  165. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_lang.css +0 -1
  166. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +0 -1
  167. package/Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_lang.css +0 -1
  168. package/ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css +0 -1
  169. package/ChartLegend.vue_vue_type_style_index_0_scoped_c0f71a49_lang.css +0 -1
  170. package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +0 -1
  171. package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
  172. package/CheckboxV4.vue_vue_type_style_index_0_scoped_8e5b619a_lang.css +0 -1
  173. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css +0 -1
  174. package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
  175. package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
  176. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +0 -1
  177. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_9fa84b26_lang.css +0 -1
  178. package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +0 -1
  179. package/DropdownV4.vue_vue_type_style_index_0_scoped_111642c6_lang.css +0 -1
  180. package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +0 -1
  181. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
  182. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +0 -1
  183. package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
  184. package/IconFlag.vue_vue_type_style_index_0_scoped_7b09cc85_lang.css +0 -1
  185. package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +0 -1
  186. package/OptionV4.vue_vue_type_style_index_0_scoped_da829544_lang.css +0 -1
  187. package/PopoverV4.vue_vue_type_style_index_0_scoped_43b5cba4_lang.css +0 -1
  188. package/SettingsHeader.vue_vue_type_style_index_0_scoped_1791e4fe_lang.css +0 -1
  189. package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
  190. package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
  191. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
  192. package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
  193. package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +0 -1
  194. package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +0 -1
  195. package/TreeDropdown.vue_vue_type_style_index_0_scoped_985779f7_lang.css +0 -1
  196. package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
  197. package/consts/configs.js +0 -4
@@ -1,10 +1,13 @@
1
- import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css"; import { defineComponent as V, ref as b, computed as p, openBlock as _, createElementBlock as C, mergeProps as n, unref as t, createElementVNode as d, createVNode as c, withCtx as w, createTextVNode as B, toDisplayString as k, withDirectives as u, vShow as f, withModifiers as v } from "vue";
2
- import m 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 x from "../../typography/v4/Typography.vue.js";
5
- import { DropdownTestIdModifiers as o } from "../../../testids/index.js";
6
- import { useTestIdAttrs as A } from "../../../utils/testIds.js";
7
- const N = { class: "chip-trigger--content" }, I = { class: "chip-trigger--icon" }, $ = ["onClick"], M = /* @__PURE__ */ V({
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({
8
11
  __name: "ChipDropdownTrigger",
9
12
  props: {
10
13
  label: { default: "Status" },
@@ -17,59 +20,97 @@ const N = { class: "chip-trigger--content" }, I = { class: "chip-trigger--icon"
17
20
  options: null,
18
21
  selectedOption: null,
19
22
  displayValue: null,
20
- multi: { type: Boolean }
23
+ multi: { type: Boolean },
24
+ cancelAllSelectedDisplay: { type: Boolean, default: !1 },
25
+ displayValueInQuotes: { type: Boolean, default: !1 }
21
26
  },
22
27
  emits: ["clear"],
23
- setup(r, { emit: h }) {
24
- const e = r, y = () => {
25
- h("clear");
26
- }, i = b(!0), g = (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) => {
27
32
  let a = l;
28
- return Array.isArray(l) && (l.length > 1 ? a = `${l[0]}, +${l[1]}` : a = l[0] ? `${l[0]}` : ""), i.value = !!a, a ? `${e.label}: ${a}` : e.label;
29
- }, T = 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(
30
40
  () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
31
- ), s = A(e.testId, o), O = p(() => {
41
+ ), s = E(e.testId, i), n = m(() => {
32
42
  if (!e.multi)
33
43
  return e.selectedOption ? e.displayValue(e.selectedOption) : "";
34
44
  if (Array.isArray(e.selectedOption))
35
- return e.selectedOption.length ? e.allSelected ? ["All"] : e.selectedOption.length == 1 && e.displayValue ? [e.displayValue(e.selectedOption[0])] : [
45
+ return e.selectedOption.length ? e.allSelected && !e.cancelAllSelectedDisplay ? ["All"] : e.selectedOption.length == 1 && e.displayValue ? [e.displayValue(e.selectedOption[0])] : [
36
46
  e.displayValue(e.selectedOption[0]),
37
47
  e.selectedOption.length - 1
38
48
  ] : [];
39
49
  });
40
- return (l, a) => (_(), C("div", n({
41
- class: ["chip-trigger", [t(T), { active: i.value, disabled: r.disabled, open: r.open }]]
42
- }, t(s)[t(o).BUTTON]), [
43
- d("div", N, [
44
- c(t(x), n({ variant: "chipLabel" }, t(s)[t(o).BUTTON_CONTENT]), {
45
- default: w(() => [
46
- B(k(g(t(O))), 1)
47
- ]),
48
- _: 1
49
- }, 16),
50
- u(d("div", I, [
51
- c(t(m), {
52
- name: "caret-down",
53
- size: "16px"
54
- })
55
- ], 512), [
56
- [f, !i.value]
57
- ]),
58
- u(d("div", n({ class: "x-circle-wrapper" }, t(s)[t(o).BUTTON_CLEAR], {
59
- onClick: v(y, ["stop"])
60
- }), [
61
- c(t(m), {
62
- name: "x-circle",
63
- size: "16px",
64
- type: "fill"
65
- })
66
- ], 16, $), [
67
- [f, i.value]
68
- ])
69
- ])
70
- ], 16));
50
+ D([() => e.selectedOption, o], async () => {
51
+ await F(100), T.value = o.value && U(o.value);
52
+ });
53
+ const w = m(() => T.value ? `${h(n.value)}${g(
54
+ n.value
55
+ )}` : "");
56
+ return (l, a) => (I(), S(t(L), {
57
+ text: t(w),
58
+ class: "tooltip-option",
59
+ placement: "top"
60
+ }, {
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", {
66
+ ref_key: "textContainerRef",
67
+ ref: o,
68
+ class: "chip-trigger--content"
69
+ }, [
70
+ d(t(C), p({
71
+ class: "chip-trigger--text",
72
+ variant: "chipLabel"
73
+ }, t(s)[t(i).BUTTON_CONTENT]), {
74
+ default: y(() => [
75
+ V(v(h(t(n))), 1)
76
+ ]),
77
+ _: 1
78
+ }, 16),
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), {
90
+ name: "caret-down",
91
+ size: "16px"
92
+ })
93
+ ], 512), [
94
+ [_, !r.value]
95
+ ]),
96
+ x(c("div", p({ class: "x-circle-wrapper" }, t(s)[t(i).BUTTON_CLEAR], {
97
+ onClick: $(B, ["stop"])
98
+ }), [
99
+ d(t(b), {
100
+ name: "x-circle",
101
+ size: "16px",
102
+ type: "fill"
103
+ })
104
+ ], 16, z), [
105
+ [_, r.value]
106
+ ])
107
+ ], 512)
108
+ ], 16)
109
+ ]),
110
+ _: 1
111
+ }, 8, ["text"]));
71
112
  }
72
113
  });
73
114
  export {
74
- M as default
115
+ K as default
75
116
  };
@@ -0,0 +1,133 @@
1
+ import { IconTypes } from '@is-ssp/icon/v4/Icon.types';
2
+ type SelectedCondition = {
3
+ label: string;
4
+ value: string;
5
+ multi: boolean;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
+ selectedCondition: SelectedCondition | null;
9
+ appliedSelections: unknown | unknown[];
10
+ conditionalOptions: SelectedCondition[];
11
+ label: string;
12
+ testId?: string;
13
+ comparingKey: string;
14
+ fetchFnCallback: (q: string) => Promise<unknown[]>;
15
+ optionNameKey: string;
16
+ minCharsToStart?: number;
17
+ isOpen?: boolean;
18
+ searchQuery?: string;
19
+ loadMoreFn?: () => Promise<any[]>;
20
+ infiniteLoading?: boolean;
21
+ fetchDataDebounceTime?: number;
22
+ autoFocusSearch?: boolean;
23
+ groupedOptions?: boolean;
24
+ optionFlagKey?: string;
25
+ optionIconKey?: string;
26
+ optionImageKey?: string;
27
+ optionIconType?: IconTypes;
28
+ loadingOverride?: boolean;
29
+ }>, {
30
+ label: string;
31
+ testId: string;
32
+ comparingKey: string;
33
+ optionNameKey: string;
34
+ minCharsToStart: number;
35
+ isOpen: boolean;
36
+ searchQuery: string;
37
+ loadMoreFn: any;
38
+ infiniteLoading: boolean;
39
+ fetchDataDebounceTime: number;
40
+ autoFocusSearch: boolean;
41
+ groupedOptions: boolean;
42
+ optionFlagKey: string;
43
+ optionIconKey: string;
44
+ optionImageKey: string;
45
+ optionIconType: any;
46
+ loadingOverride: boolean;
47
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
+ "update:selectedCondition": (value: SelectedCondition) => void;
49
+ "update:appliedSelections": (value: unknown) => void;
50
+ clear: () => void;
51
+ closed: () => void;
52
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
53
+ selectedCondition: SelectedCondition | null;
54
+ appliedSelections: unknown | unknown[];
55
+ conditionalOptions: SelectedCondition[];
56
+ label: string;
57
+ testId?: string;
58
+ comparingKey: string;
59
+ fetchFnCallback: (q: string) => Promise<unknown[]>;
60
+ optionNameKey: string;
61
+ minCharsToStart?: number;
62
+ isOpen?: boolean;
63
+ searchQuery?: string;
64
+ loadMoreFn?: () => Promise<any[]>;
65
+ infiniteLoading?: boolean;
66
+ fetchDataDebounceTime?: number;
67
+ autoFocusSearch?: boolean;
68
+ groupedOptions?: boolean;
69
+ optionFlagKey?: string;
70
+ optionIconKey?: string;
71
+ optionImageKey?: string;
72
+ optionIconType?: IconTypes;
73
+ loadingOverride?: boolean;
74
+ }>, {
75
+ label: string;
76
+ testId: string;
77
+ comparingKey: string;
78
+ optionNameKey: string;
79
+ minCharsToStart: number;
80
+ isOpen: boolean;
81
+ searchQuery: string;
82
+ loadMoreFn: any;
83
+ infiniteLoading: boolean;
84
+ fetchDataDebounceTime: number;
85
+ autoFocusSearch: boolean;
86
+ groupedOptions: boolean;
87
+ optionFlagKey: string;
88
+ optionIconKey: string;
89
+ optionImageKey: string;
90
+ optionIconType: any;
91
+ loadingOverride: boolean;
92
+ }>>> & {
93
+ onClear?: () => any;
94
+ onClosed?: () => any;
95
+ "onUpdate:selectedCondition"?: (value: SelectedCondition) => any;
96
+ "onUpdate:appliedSelections"?: (value: unknown) => any;
97
+ }, {
98
+ label: string;
99
+ testId: string;
100
+ isOpen: boolean;
101
+ infiniteLoading: boolean;
102
+ optionNameKey: string;
103
+ optionIconKey: string;
104
+ optionImageKey: string;
105
+ optionIconType: IconTypes;
106
+ optionFlagKey: string;
107
+ groupedOptions: boolean;
108
+ comparingKey: string;
109
+ minCharsToStart: number;
110
+ searchQuery: string;
111
+ loadMoreFn: () => Promise<any[]>;
112
+ fetchDataDebounceTime: number;
113
+ autoFocusSearch: boolean;
114
+ loadingOverride: boolean;
115
+ }>;
116
+ export default _default;
117
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
118
+ type __VLS_TypePropsToRuntimeProps<T> = {
119
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
120
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
121
+ } : {
122
+ type: import('vue').PropType<T[K]>;
123
+ required: true;
124
+ };
125
+ };
126
+ type __VLS_WithDefaults<P, D> = {
127
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
128
+ default: D[K];
129
+ }> : P[K];
130
+ };
131
+ type __VLS_Prettify<T> = {
132
+ [K in keyof T]: T[K];
133
+ } & {};
@@ -0,0 +1,7 @@
1
+ import o from "./ConditionalDropdown.vue2.js";
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2a77c137_lang.css"; //*');
4
+ const n = /* @__PURE__ */ _(o, [["__scopeId", "data-v-2a77c137"]]);
5
+ export {
6
+ n as default
7
+ };
@@ -0,0 +1,246 @@
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2a77c137_lang.css"; import { defineComponent as W, computed as O, ref as s, watch as k, onMounted as q, openBlock as L, createBlock as G, unref as d, 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 N from "./DropdownV4.vue.js";
3
+ import "./DefaultDropdownTrigger.vue.js";
4
+ import "./IconButtonDropdownTrigger.vue.js";
5
+ import ae from "./ChipDropdownTrigger.vue.js";
6
+ import "./AppDropdownTrigger.vue.js";
7
+ import te from "./ButtonDropdownTrigger.vue.js";
8
+ import "./ButtonFilterDropdownTrigger.vue.js";
9
+ import "./TreeDropdown.vue.js";
10
+ import "./OptionV4.vue.js";
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 = {
16
+ key: 0,
17
+ class: "custom-list-area"
18
+ }, we = /* @__PURE__ */ W({
19
+ __name: "ConditionalDropdown",
20
+ props: {
21
+ selectedCondition: null,
22
+ appliedSelections: null,
23
+ conditionalOptions: null,
24
+ label: { default: "" },
25
+ testId: { default: "" },
26
+ comparingKey: { default: "id" },
27
+ fetchFnCallback: null,
28
+ optionNameKey: { default: "name" },
29
+ minCharsToStart: { default: 3 },
30
+ isOpen: { type: Boolean, default: !1 },
31
+ searchQuery: { default: "" },
32
+ loadMoreFn: { type: Function, default: null },
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: "" },
38
+ optionIconKey: { default: "" },
39
+ optionImageKey: { default: "" },
40
+ optionIconType: { default: null },
41
+ loadingOverride: { type: Boolean, default: !1 }
42
+ },
43
+ emits: ["update:selectedCondition", "update:appliedSelections", "clear", "closed"],
44
+ setup(u, { emit: h }) {
45
+ const e = u, S = O({
46
+ get: () => e.appliedSelections,
47
+ set: (l) => {
48
+ h("update:appliedSelections", l);
49
+ }
50
+ }), n = O({
51
+ get: () => e.selectedCondition || e.conditionalOptions[0],
52
+ set: (l) => {
53
+ h("update:selectedCondition", l);
54
+ }
55
+ }), F = () => {
56
+ const { appliedSelections: l } = e;
57
+ return l ? Array.isArray(l) ? l : [l] : [];
58
+ }, K = s(null), c = s(!0), a = s([]), r = s(F()), w = s(!0), p = s(!1), C = s(!1), i = s(e.searchQuery), B = s(""), m = s(e.label), T = s([]), U = O(() => (!i.value || i.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
59
+ const l = c.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
60
+ if (e.groupedOptions) {
61
+ let o = 0;
62
+ return a.value.forEach((g) => {
63
+ g.options && (o = o + g.options.length);
64
+ }), o > 4 ? o : l;
65
+ }
66
+ return t > l ? t : l;
67
+ }), M = (l, t) => {
68
+ if (e.infiniteLoading && n.value.multi && Array.isArray(r.value) && r.value.length && l && t.length) {
69
+ const o = [], g = r.value.filter(
70
+ (v) => v[e.optionNameKey].includes(l)
71
+ );
72
+ return t.forEach((v) => {
73
+ g.find(
74
+ (j) => j[e.comparingKey] === v[e.comparingKey]
75
+ ) && o.push(v[e.comparingKey]);
76
+ }), g.filter(
77
+ (v) => !o.includes(v[e.comparingKey])
78
+ );
79
+ }
80
+ return [];
81
+ }, A = async (l) => {
82
+ try {
83
+ p.value = !0;
84
+ const t = await e.fetchFnCallback(l), o = M(
85
+ l,
86
+ t
87
+ );
88
+ a.value = [...o, ...t], p.value = !1;
89
+ } catch (t) {
90
+ p.value = !1, console.error("Error fetching data:", t);
91
+ }
92
+ }, E = async () => {
93
+ if (e.infiniteLoading)
94
+ try {
95
+ C.value = !0;
96
+ const l = await e.loadMoreFn();
97
+ C.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
98
+ } catch (l) {
99
+ C.value = !1, console.error("Error fetching data:", l);
100
+ }
101
+ }, V = ue(
102
+ A,
103
+ e.fetchDataDebounceTime
104
+ ), b = (l) => {
105
+ l.length >= e.minCharsToStart ? (V(l), K.value?.scrollTo(0)) : e.infiniteLoading && n.value.multi ? a.value = T.value || [] : a.value = [];
106
+ }, x = () => {
107
+ i.value && a.value.length && !p.value && !n.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
108
+ name: i.value,
109
+ conditionalOptions: !0,
110
+ conditionalName: n.value.label,
111
+ [e.comparingKey]: i.value
112
+ } : a.value = [
113
+ {
114
+ name: i.value,
115
+ conditionalOptions: !0,
116
+ conditionalName: n.value.label,
117
+ [e.comparingKey]: i.value
118
+ },
119
+ ...a.value
120
+ ] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
121
+ }, D = () => {
122
+ c.value && r.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${n.value.label.toLowerCase()}`;
123
+ };
124
+ k(i, () => {
125
+ b(i.value);
126
+ }), k([n, a], () => {
127
+ x();
128
+ }), k(
129
+ () => e.loadingOverride,
130
+ (l, t) => {
131
+ !l && t && !e.infiniteLoading && A(e.searchQuery);
132
+ }
133
+ );
134
+ const P = () => {
135
+ c.value && r.value.length === 0 ? (n.value = null, S.value = [], n.value = null) : (B.value = i.value, S.value = c.value ? [...r.value] : { ...r.value }, w.value = c.value), D();
136
+ };
137
+ k(n, (l, t) => {
138
+ n.value.multi ? (p.value = !0, !t.multi && l.multi && Array.isArray(e.appliedSelections) && (r.value = e.appliedSelections), setTimeout(() => {
139
+ p.value = !1, c.value = !0;
140
+ }, 100)) : setTimeout(() => {
141
+ c.value = !1;
142
+ }, 100);
143
+ });
144
+ const Q = (l) => {
145
+ T.value = l;
146
+ }, R = () => {
147
+ r.value = [], S.value = [], n.value = null, m.value = e.label, i.value = "", h("clear");
148
+ }, z = (l) => {
149
+ l && n.value.multi && e.infiniteLoading && r.value && (a.value = r.value, i.value && b(i.value));
150
+ };
151
+ q(() => {
152
+ (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && b(e.searchQuery), D();
153
+ });
154
+ const $ = () => {
155
+ h("closed");
156
+ };
157
+ return (l, t) => (L(), G(d(N), {
158
+ ref_key: "dropdownRef",
159
+ ref: K,
160
+ selected: r.value,
161
+ "onUpdate:selected": t[2] || (t[2] = (o) => r.value = o),
162
+ "predefined-trigger": "chip",
163
+ "display-value": (o) => o?.[u.optionNameKey],
164
+ multi: c.value,
165
+ options: a.value,
166
+ placeholder: m.value,
167
+ "search-placeholder": "Search",
168
+ "option-name-key": u.optionNameKey,
169
+ "with-conditions": "",
170
+ "inline-search": "",
171
+ "custom-number-of-displayed-options": d(I),
172
+ "options-list-width": "330px",
173
+ loading: p.value || u.loadingOverride,
174
+ "load-more-loading": C.value,
175
+ "comparing-key": u.comparingKey,
176
+ "is-open": u.isOpen,
177
+ "infinite-loading": u.infiniteLoading,
178
+ "show-select-all": !u.infiniteLoading && !i.value,
179
+ "grouped-options": u.groupedOptions,
180
+ "option-flag-key": u.optionFlagKey,
181
+ "option-image-key": u.optionImageKey,
182
+ "option-icon-key": u.optionIconKey,
183
+ "option-icon-type": u.optionIconType,
184
+ "onUpdate:isOpen": z,
185
+ onOnsearch: b,
186
+ onApply: P,
187
+ onLoadMore: E,
188
+ onUnsavedSelectionUpdate: Q,
189
+ onClosed: $
190
+ }, {
191
+ "dropdown-trigger": f(({ defaultTriggerProps: o }) => [
192
+ y(d(ae), H(o, {
193
+ label: m.value,
194
+ "selected-option": d(S),
195
+ multi: w.value,
196
+ "cancel-all-selected-display": "",
197
+ "display-value-in-quotes": !Array.isArray(r.value) && r.value.conditionalOptions,
198
+ onClear: R
199
+ }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes"])
200
+ ]),
201
+ "dropdown-conditions": f(() => [
202
+ J("div", re, [
203
+ y(d(N), {
204
+ selected: d(n),
205
+ "onUpdate:selected": t[0] || (t[0] = (o) => X(n) ? n.value = o : null),
206
+ options: u.conditionalOptions,
207
+ "option-name-key": "label",
208
+ "display-value": (o) => o?.label,
209
+ container: ".conditional-container",
210
+ size: "small"
211
+ }, {
212
+ "dropdown-trigger": f(({ buttonTriggerProps: o }) => [
213
+ y(d(te), Y(Z(o)), null, 16)
214
+ ]),
215
+ _: 1
216
+ }, 8, ["selected", "options", "display-value"])
217
+ ])
218
+ ]),
219
+ "inline-search": f(() => [
220
+ y(d(ne), {
221
+ modelValue: i.value,
222
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => i.value = o),
223
+ class: "inline-search",
224
+ placeholder: "Search",
225
+ variant: "transparent",
226
+ size: "md",
227
+ "auto-focus": u.autoFocusSearch
228
+ }, null, 8, ["modelValue", "auto-focus"])
229
+ ]),
230
+ "custom-list-area": f(() => [
231
+ !a.value.length && !p.value ? (L(), _("div", se, [
232
+ y(ie, { variant: "body1" }, {
233
+ default: f(() => [
234
+ ee(le(d(U)), 1)
235
+ ]),
236
+ _: 1
237
+ })
238
+ ])) : oe("", !0)
239
+ ]),
240
+ _: 1
241
+ }, 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"]));
242
+ }
243
+ });
244
+ export {
245
+ we as default
246
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./DefaultDropdownTrigger.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_9fa84b26_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-9fa84b26"]]);
3
+ // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_73bf9b5b_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-73bf9b5b"]]);
5
5
  export {
6
6
  p as default
7
7
  };