@ironsource/shared-ui 2.1.12-rc.2 → 2.1.12-rc.21

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 (183) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css +1 -0
  2. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
  3. package/ButtonV4.vue_vue_type_style_index_0_scoped_d7948c77_lang.css +1 -0
  4. package/Chart.vue_vue_type_style_index_0_scoped_03771fa3_lang.css +1 -0
  5. package/ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css +1 -0
  6. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_79dc2883_lang.css +1 -0
  7. package/ChartLegend.vue_vue_type_style_index_0_scoped_fd9e4ea2_lang.css +1 -0
  8. package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +1 -0
  9. package/ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css +1 -0
  10. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8d5521da_lang.css +1 -0
  11. package/DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css +1 -0
  12. package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
  13. package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
  14. package/DropdownV4.vue_vue_type_style_index_0_scoped_08cb822e_lang.css +1 -0
  15. package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
  16. package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
  17. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
  18. package/OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css +1 -0
  19. package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
  20. package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
  21. package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
  22. package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
  23. package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
  24. package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
  25. package/components/appIcon/index.d.ts +3 -3
  26. package/components/banner/Banner.vue.d.ts +3 -3
  27. package/components/banner/index.d.ts +7 -7
  28. package/components/button/common/consts.d.ts +1 -0
  29. package/components/button/v3/Button.vue.d.ts +3 -3
  30. package/components/button/v3/ButtonBase.vue.d.ts +3 -3
  31. package/components/button/v3/IconButton.vue.d.ts +3 -3
  32. package/components/button/v3/index.d.ts +14 -14
  33. package/components/button/v4/ButtonV4.vue.d.ts +4 -3
  34. package/components/button/v4/ButtonV4.vue.js +3 -3
  35. package/components/button/v4/ButtonV4.vue2.js +1 -1
  36. package/components/chart/Chart.vue.d.ts +149 -38
  37. package/components/chart/Chart.vue.js +3 -3
  38. package/components/chart/Chart.vue2.js +146 -297
  39. package/components/chart/ChartHeader.vue.d.ts +45 -11
  40. package/components/chart/ChartHeader.vue.js +3 -3
  41. package/components/chart/ChartHeader.vue2.js +64 -53
  42. package/components/chart/ChartHeaderTrend.vue.d.ts +48 -0
  43. package/components/chart/ChartHeaderTrend.vue.js +7 -0
  44. package/components/chart/ChartHeaderTrend.vue2.js +95 -0
  45. package/components/chart/ChartLegend.vue.d.ts +24 -0
  46. package/components/chart/ChartLegend.vue.js +3 -3
  47. package/components/chart/ChartLegend.vue2.js +82 -63
  48. package/components/chart/ChartPlane.vue.d.ts +221 -0
  49. package/components/chart/ChartPlane.vue.js +7 -0
  50. package/components/chart/ChartPlane.vue2.js +368 -0
  51. package/components/chart/ChartStoryArgs.d.ts +179 -0
  52. package/components/chart/ChartTooltip.vue.d.ts +22 -2
  53. package/components/chart/ChartTooltip.vue.js +2 -2
  54. package/components/chart/ChartTooltip.vue2.js +50 -55
  55. package/components/chart/LegendSorting.vue.d.ts +37 -0
  56. package/components/chart/LegendSorting.vue.js +45 -0
  57. package/components/chart/LegendSorting.vue2.js +4 -0
  58. package/components/chart/SettingsHeader.vue.d.ts +1 -0
  59. package/components/chart/SettingsHeader.vue.js +3 -3
  60. package/components/chart/SettingsHeader.vue2.js +17 -16
  61. package/components/chart/SubHeader.vue.d.ts +52 -0
  62. package/components/chart/SubHeader.vue.js +7 -0
  63. package/components/chart/SubHeader.vue2.js +61 -0
  64. package/components/chart/TooltipHeader.vue.d.ts +50 -0
  65. package/components/chart/TooltipHeader.vue.js +7 -0
  66. package/components/chart/TooltipHeader.vue2.js +69 -0
  67. package/components/chart/colorPalette.d.ts +4 -0
  68. package/components/chart/colorPalette.js +54 -0
  69. package/components/chart/composables/useChartHeight.d.ts +5 -0
  70. package/components/chart/composables/useChartHeight.js +24 -0
  71. package/components/chart/composables/useColorsMap.d.ts +10 -0
  72. package/components/chart/composables/useColorsMap.js +46 -0
  73. package/components/chart/composables/useTooltipPosition.d.ts +1 -1
  74. package/components/chart/composables/useTooltipPosition.js +11 -15
  75. package/components/chart/consts.d.ts +29 -7
  76. package/components/chart/consts.js +41 -21
  77. package/components/chart/index.d.ts +515 -118
  78. package/components/chart/mockData.d.ts +44 -5
  79. package/components/chart/types.d.ts +37 -6
  80. package/components/chart/types.js +5 -2
  81. package/components/chart/utils/formatNumber.d.ts +0 -1
  82. package/components/chart/utils/highlightUtils.d.ts +3 -0
  83. package/components/chart/utils/highlightUtils.js +18 -0
  84. package/components/chart/utils/utils.d.ts +3 -2
  85. package/components/chart/utils/utils.js +23 -8
  86. package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
  87. package/components/checkbox/v3/index.d.ts +7 -7
  88. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  89. package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
  90. package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
  91. package/components/dialog/v4/DialogV4.vue.js +4 -4
  92. package/components/dialog/v4/DialogV4.vue2.js +1 -1
  93. package/components/dialog/v4/index.d.ts +7 -7
  94. package/components/dropdown/common/Dropdown.common.js +92 -85
  95. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
  96. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +1 -1
  97. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  98. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +1 -1
  99. package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
  100. package/components/dropdown/v4/ConditionalDropdown.vue2.js +76 -76
  101. package/components/dropdown/v4/DropdownV4.vue.d.ts +8 -0
  102. package/components/dropdown/v4/DropdownV4.vue.js +4 -4
  103. package/components/dropdown/v4/DropdownV4.vue2.js +105 -95
  104. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
  105. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
  106. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
  107. package/components/dropdown/v4/OptionV4.vue.d.ts +8 -0
  108. package/components/dropdown/v4/OptionV4.vue.js +3 -3
  109. package/components/dropdown/v4/OptionV4.vue2.js +91 -69
  110. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  111. package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
  112. package/components/dropdown/v4/index.d.ts +64 -2
  113. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
  114. package/components/emptyState/v4/index.d.ts +7 -7
  115. package/components/forms/FormRow.vue.d.ts +9 -2
  116. package/components/forms/FormRow.vue.js +3 -3
  117. package/components/forms/FormRow.vue2.js +25 -14
  118. package/components/forms/index.d.ts +25 -5
  119. package/components/search/v3/index.d.ts +3 -3
  120. package/components/shared/FieldLabel.vue.d.ts +19 -7
  121. package/components/shared/FieldLabel.vue.js +3 -3
  122. package/components/shared/FieldLabel.vue2.js +50 -37
  123. package/components/table/v4/DataGrid.vue.d.ts +4 -3
  124. package/components/table/v4/DataGrid.vue.js +4 -4
  125. package/components/table/v4/DataGrid.vue2.js +151 -142
  126. package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
  127. package/components/table/v4/index.d.ts +15 -14
  128. package/components/tabs/v3/Tabs.vue.d.ts +3 -3
  129. package/components/tabs/v3/index.d.ts +7 -7
  130. package/components/tooltip/common/Tooltip.types.d.ts +1 -0
  131. package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
  132. package/components/tooltip/v3/Tooltip.vue.js +2 -2
  133. package/components/tooltip/v3/Tooltip.vue2.js +1 -1
  134. package/components/tooltip/v3/index.d.ts +7 -7
  135. package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
  136. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  137. package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
  138. package/components/tooltip/v4/index.d.ts +7 -7
  139. package/components/typography/Text.vue.d.ts +3 -3
  140. package/components/typography/index.d.ts +7 -7
  141. package/composables/useFormValidation.d.ts +1 -0
  142. package/composables/useFormValidation.js +32 -27
  143. package/composables/useFullPageHeight.d.ts +10 -0
  144. package/composables/useFullPageHeight.js +15 -0
  145. package/consts/common.d.ts +1 -0
  146. package/consts/common.js +4 -0
  147. package/consts/regex.d.ts +1 -0
  148. package/consts/regex.js +2 -1
  149. package/index.d.ts +211 -81
  150. package/index.js +106 -100
  151. package/package.json +1 -1
  152. package/testids/index.d.ts +2 -1
  153. package/testids/index.js +10 -10
  154. package/utils/formatNumbers.d.ts +1 -1
  155. package/utils/formatNumbers.js +19 -6
  156. package/utils/index.js +7 -0
  157. package/utils/text.d.ts +3 -0
  158. package/utils/text.js +24 -5
  159. package/utils/totals.d.ts +5 -0
  160. package/utils/totals.js +9 -0
  161. package/utils/utils.d.ts +1 -0
  162. package/utils/utils.js +4 -0
  163. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
  164. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_lang.css +0 -1
  165. package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
  166. package/Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css +0 -1
  167. package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +0 -1
  168. package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +0 -1
  169. package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +0 -1
  170. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css +0 -1
  171. package/DataGrid.vue_vue_type_style_index_0_scoped_020072b0_lang.css +0 -1
  172. package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
  173. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
  174. package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
  175. package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
  176. package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
  177. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
  178. package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
  179. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
  180. package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
  181. package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
  182. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
  183. package/components/chart/utils/formatNumber.js +0 -11
@@ -1,13 +1,13 @@
1
- import "../../../OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css"; import { defineComponent as P, ref as C, watch as S, computed as V, openBlock as o, createBlock as m, unref as n, createSlots as A, withCtx as s, createElementVNode as c, normalizeClass as v, createCommentVNode as i, createElementBlock as l, renderSlot as y, createVNode as a, toDisplayString as u, createTextVNode as f, withModifiers as I, Fragment as F, renderList as L } from "vue";
1
+ import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css"; import { defineComponent as S, ref as w, watch as V, computed as A, openBlock as o, createBlock as f, unref as n, createSlots as F, withCtx as d, createElementVNode as c, normalizeClass as p, createCommentVNode as i, createElementBlock as l, renderSlot as u, createVNode as a, toDisplayString as r, createTextVNode as g, withModifiers as C, Fragment as L, renderList as N } from "vue";
2
2
  import "../../typography/Heading.vue.js";
3
- import N from "../../typography/Text.vue.js";
4
- import j from "../../checkbox/v4/CheckboxV4.vue.js";
5
- import T from "../../icon/v4/IconV4.vue.js";
6
- import R from "../../icon/v4/IconFlag.vue.js";
7
- import { NOOP as D } from "@vue/shared";
8
- import { optionCommon as q } from "../common/Option.common.js";
9
- import g from "../../typography/v4/Typography.vue.js";
10
- import G from "../../tooltip/v4/TooltipV4.vue.js";
3
+ import j from "../../typography/Text.vue.js";
4
+ import R from "../../checkbox/v4/CheckboxV4.vue.js";
5
+ import m from "../../icon/v4/IconV4.vue.js";
6
+ import D from "../../icon/v4/IconFlag.vue.js";
7
+ import { NOOP as q } from "@vue/shared";
8
+ import { optionCommon as G } from "../common/Option.common.js";
9
+ import T from "../../typography/v4/Typography.vue.js";
10
+ import I from "../../tooltip/v4/TooltipV4.vue.js";
11
11
  import { isElementTruncated as H } from "../../../utils/text.js";
12
12
  import { promiseTimeout as J } from "@vueuse/core";
13
13
  const Q = { class: "multiline-tooltip" }, U = {
@@ -34,7 +34,10 @@ const Q = { class: "multiline-tooltip" }, U = {
34
34
  }, ne = {
35
35
  key: 4,
36
36
  class: "end-icon"
37
- }, oe = ["onClick"], ie = { key: 0 }, pe = /* @__PURE__ */ P({
37
+ }, oe = {
38
+ key: 5,
39
+ class: "option-warning"
40
+ }, ie = { key: 6 }, le = ["onClick"], ae = { key: 0 }, pe = /* @__PURE__ */ S({
38
41
  __name: "OptionV4",
39
42
  props: {
40
43
  option: { default: null },
@@ -47,6 +50,7 @@ const Q = { class: "multiline-tooltip" }, U = {
47
50
  nameKey: { default: null },
48
51
  imageKey: { default: null },
49
52
  iconKey: { default: null },
53
+ warningKey: { default: null },
50
54
  iconType: { default: "regular" },
51
55
  endIconKey: { default: null },
52
56
  endIconType: { default: "regular" },
@@ -63,48 +67,48 @@ const Q = { class: "multiline-tooltip" }, U = {
63
67
  },
64
68
  emits: ["toggleTreeCollapse"],
65
69
  setup(e, { emit: O }) {
66
- const d = e, { selected: h, id: w, onClick: $, api: K } = q(d), B = (t) => {
67
- d.stopOptionClickEventPropagation && t.stopPropagation(), d.disabled ? D() : $(t);
68
- }, p = C(null), b = C(!1);
69
- S([() => d.treeChildShown, p], async () => {
70
- await J(100), b.value = p.value && H(p.value);
70
+ const s = e, { selected: K, id: $, onClick: B, api: x } = G(s), z = (t) => {
71
+ s.stopOptionClickEventPropagation && t.stopPropagation(), s.disabled ? q() : B(t);
72
+ }, v = w(null), b = w(!1);
73
+ V([() => s.treeChildShown, v], async () => {
74
+ await J(100), b.value = v.value && H(v.value);
71
75
  });
72
- const M = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[d.nameKey] : "", x = V(() => M(d.option)), z = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, E = () => {
73
- O("toggleTreeCollapse", d.option);
76
+ const M = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[s.nameKey] : "", h = A(() => M(s.option)), E = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, P = () => {
77
+ O("toggleTreeCollapse", s.option);
74
78
  };
75
- return (t, k) => (o(), m(n(G), {
76
- text: n(x),
77
- "test-id": z(e.option),
79
+ return (t, k) => (o(), f(n(I), {
80
+ text: n(h),
81
+ "test-id": E(e.option),
78
82
  placement: e.toolTipPlacement,
79
83
  class: "tooltip-option"
80
- }, A({
81
- default: s(() => [
84
+ }, F({
85
+ default: d(() => [
82
86
  c("div", {
83
87
  ref: "el",
84
- class: v(["item-container", {
88
+ class: p(["item-container", {
85
89
  "item-container--disabled": e.disabled,
86
90
  "item-container--active": e.nameKey ? !1 : e.active,
87
- "item-container--selected": n(h),
91
+ "item-container--selected": n(K),
88
92
  "item-container--multi": e.isMulti
89
93
  }])
90
94
  }, [
91
95
  c("div", {
92
- class: v(["item", {
96
+ class: p(["item", {
93
97
  "item--multi": e.isMulti,
94
98
  "item--with-icon": t.$slots["icon-start"] || t.$slots.image
95
99
  }])
96
100
  }, [
97
- e.isMulti || e.selectAllOption ? (o(), m(n(j), {
101
+ e.isMulti || e.selectAllOption ? (o(), f(n(R), {
98
102
  key: 0,
99
- id: n(w).toString(),
103
+ id: n($).toString(),
100
104
  tabindex: "-1",
101
105
  class: "checkbox",
102
- "is-checked": n(h),
106
+ "is-checked": n(K),
103
107
  "is-indeterminate": e.isIndeterminate,
104
- onClick: k[0] || (k[0] = (r) => B(r))
108
+ onClick: k[0] || (k[0] = (y) => z(y))
105
109
  }, null, 8, ["id", "is-checked", "is-indeterminate"])) : i("", !0),
106
110
  !e.option?.conditionalOptions && (t.$slots.image || e.imageKey) ? (o(), l("div", U, [
107
- y(t.$slots, "image", {}, () => [
111
+ u(t.$slots, "image", {}, () => [
108
112
  e.imageKey ? (o(), l("img", {
109
113
  key: 0,
110
114
  src: e.option[e.imageKey]
@@ -112,16 +116,16 @@ const Q = { class: "multiline-tooltip" }, U = {
112
116
  ], !0)
113
117
  ])) : i("", !0),
114
118
  !e.option?.conditionalOptions && (t.$slots.flag || e.optionFlagKey) ? (o(), l("div", X, [
115
- y(t.$slots, "flag", {}, () => [
116
- e.optionFlagKey ? (o(), m(n(R), {
119
+ u(t.$slots, "flag", {}, () => [
120
+ e.optionFlagKey ? (o(), f(n(D), {
117
121
  key: 0,
118
122
  "country-code": e.option[e.optionFlagKey]
119
123
  }, null, 8, ["country-code"])) : i("", !0)
120
124
  ], !0)
121
125
  ])) : i("", !0),
122
126
  !e.option?.conditionalOptions && (t.$slots["icon-start"] || e.iconKey) ? (o(), l("div", Y, [
123
- y(t.$slots, "icon-start", {}, () => [
124
- a(n(T), {
127
+ u(t.$slots, "icon-start", {}, () => [
128
+ a(n(m), {
125
129
  type: e.iconType,
126
130
  name: e.option[e.iconKey],
127
131
  size: e.iconType === "regular" ? "20px" : "16px"
@@ -130,49 +134,49 @@ const Q = { class: "multiline-tooltip" }, U = {
130
134
  ])) : i("", !0),
131
135
  c("div", {
132
136
  ref_key: "textContainerRef",
133
- ref: p,
137
+ ref: v,
134
138
  class: "text-container"
135
139
  }, [
136
- a(n(g), {
140
+ a(n(T), {
137
141
  class: "option-text",
138
142
  variant: "body2"
139
143
  }, {
140
- default: s(() => [
141
- y(t.$slots, "default", {}, () => [
144
+ default: d(() => [
145
+ u(t.$slots, "default", {}, () => [
142
146
  c("div", {
143
- class: v(`option-content-${e.optionTwoLinesVariant} option-content`)
147
+ class: p(`option-content-${e.optionTwoLinesVariant} option-content`)
144
148
  }, [
145
149
  e.option?.conditionalOptions ? (o(), l("div", _, [
146
- a(n(g), {
150
+ a(n(T), {
147
151
  variant: "body2",
148
152
  class: "conditional-option-label"
149
153
  }, {
150
- default: s(() => [
151
- f(u(e.option.conditionalName) + ": ", 1)
154
+ default: d(() => [
155
+ g(r(e.option.conditionalName) + ": ", 1)
152
156
  ]),
153
157
  _: 1
154
158
  }),
155
- a(n(g), {
159
+ a(n(T), {
156
160
  variant: "h5",
157
161
  class: "conditional-option-value"
158
162
  }, {
159
- default: s(() => [
160
- f('"' + u(e.option[e.nameKey]) + '"', 1)
163
+ default: d(() => [
164
+ g('"' + r(e.option[e.nameKey]) + '"', 1)
161
165
  ]),
162
166
  _: 1
163
167
  })
164
- ])) : (o(), l("div", Z, u(e.option[e.nameKey]), 1)),
168
+ ])) : (o(), l("div", Z, r(e.option[e.nameKey]), 1)),
165
169
  e.endTextIconKey && e.option[e.endTextIconKey] ? (o(), l("span", ee, [
166
- a(n(T), {
170
+ a(n(m), {
167
171
  type: "regular",
168
172
  name: e.option[e.endTextIconKey],
169
173
  size: "16px"
170
174
  }, null, 8, ["name"])
171
175
  ])) : i("", !0),
172
176
  e.optionTwoLinesKey ? (o(), l("div", te, [
173
- a(n(g), { variant: "caption" }, {
174
- default: s(() => [
175
- f(u(e.option[e.optionTwoLinesKey]), 1)
177
+ a(n(T), { variant: "caption" }, {
178
+ default: d(() => [
179
+ g(r(e.option[e.optionTwoLinesKey]), 1)
176
180
  ]),
177
181
  _: 1
178
182
  })
@@ -182,44 +186,62 @@ const Q = { class: "multiline-tooltip" }, U = {
182
186
  ]),
183
187
  _: 3
184
188
  }),
185
- e.subtitle ? (o(), m(n(N), {
189
+ e.subtitle ? (o(), f(n(j), {
186
190
  key: 0,
187
191
  class: "subtitle",
188
192
  size: "xs"
189
193
  }, {
190
- default: s(() => [
191
- f(u(e.subtitle), 1)
194
+ default: d(() => [
195
+ g(r(e.subtitle), 1)
192
196
  ]),
193
197
  _: 1
194
198
  })) : i("", !0)
195
199
  ], 512),
196
200
  t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (o(), l("div", ne, [
197
- y(t.$slots, "icon-end", {}, () => [
198
- a(n(T), {
201
+ u(t.$slots, "icon-end", {}, () => [
202
+ a(n(m), {
199
203
  type: e.endIconType || "regular",
200
204
  name: e.option[e.endIconKey],
201
205
  size: e.endIconType === "regular" || e.endIconType === "ab-test" ? "20px" : "16px"
202
206
  }, null, 8, ["type", "name", "size"])
203
207
  ], !0)
204
208
  ])) : i("", !0),
209
+ e.warningKey && e.option?.[e.warningKey] ? (o(), l("div", oe, [
210
+ a(n(I), {
211
+ text: e.option[e.warningKey],
212
+ placement: "top"
213
+ }, {
214
+ default: d(() => [
215
+ a(n(m), {
216
+ class: "option-warning__icon",
217
+ name: "warning-circle",
218
+ size: "16px"
219
+ })
220
+ ]),
221
+ _: 1
222
+ }, 8, ["text"])
223
+ ])) : i("", !0),
224
+ t.$slots["option-end"] ? (o(), l("div", ie, [
225
+ u(t.$slots, "option-end", { option: e.option }, void 0, !0)
226
+ ])) : i("", !0),
205
227
  e.treeMainOption ? (o(), l("div", {
206
- key: 5,
228
+ key: 7,
207
229
  class: "tree-main-arrow-wrapper",
208
- onClick: I(E, ["stop"])
230
+ onClick: C(P, ["stop"])
209
231
  }, [
210
- a(n(T), {
232
+ a(n(m), {
211
233
  name: "caret-down",
212
234
  size: "16px",
213
- class: v(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
235
+ class: p(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
214
236
  }, null, 8, ["class"])
215
- ], 8, oe)) : i("", !0)
237
+ ], 8, le)) : i("", !0)
216
238
  ], 2),
217
- n(K).clearable && n(h) ? (o(), l("div", ie, [
239
+ n(x).clearable && n(K) ? (o(), l("div", ae, [
218
240
  c("button", {
219
241
  class: "clear-button",
220
- onClick: k[1] || (k[1] = I((r) => n(K).clearSelection(), ["prevent", "stop"]))
242
+ onClick: k[1] || (k[1] = C((y) => n(x).clearSelection(), ["prevent", "stop"]))
221
243
  }, [
222
- a(n(T), {
244
+ a(n(m), {
223
245
  name: "close",
224
246
  width: "8",
225
247
  height: "8"
@@ -230,16 +252,16 @@ const Q = { class: "multiline-tooltip" }, U = {
230
252
  ]),
231
253
  _: 2
232
254
  }, [
233
- Array.isArray(n(x)) ? {
255
+ Array.isArray(n(h)) ? {
234
256
  name: "tooltip",
235
- fn: s(() => [
257
+ fn: d(() => [
236
258
  c("div", Q, [
237
- (o(!0), l(F, null, L(n(x), (r) => (o(), m(n(g), {
238
- key: r,
259
+ (o(!0), l(L, null, N(n(h), (y) => (o(), f(n(T), {
260
+ key: y,
239
261
  variant: "body2"
240
262
  }, {
241
- default: s(() => [
242
- f(u(r), 1)
263
+ default: d(() => [
264
+ g(r(y), 1)
243
265
  ]),
244
266
  _: 2
245
267
  }, 1024))), 128))
@@ -1,7 +1,7 @@
1
1
  import o from "./TreeDropdown.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-b883d1fa"]]);
3
+ // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-4ba9e4bd"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css"; import { defineComponent as ee, provide as ne, ref as c, computed as K, onMounted as le, watch as g, openBlock as C, createBlock as D, unref as d, withCtx as f, createVNode as I, mergeProps as z, createSlots as te, renderSlot as oe, createElementVNode as M, withModifiers as S, createTextVNode as ie, createElementBlock as B, withDirectives as de, Fragment as ae, renderList as re, vShow as se, createCommentVNode as ce } from "vue";
2
- import ue from "./DropdownV4.vue.js";
3
- import pe from "./DefaultDropdownTrigger.vue.js";
1
+ import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css"; import { defineComponent as ne, provide as le, ref as c, computed as K, onMounted as te, watch as E, openBlock as g, createBlock as D, unref as d, withCtx as h, createVNode as C, mergeProps as z, createSlots as oe, renderSlot as ie, createElementVNode as M, withModifiers as S, createTextVNode as de, createElementBlock as B, withDirectives as ae, Fragment as se, renderList as re, vShow as ce, createCommentVNode as ue } from "vue";
2
+ import pe from "./DropdownV4.vue.js";
3
+ import ye from "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
5
  import "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
@@ -9,14 +9,14 @@ import "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import w from "./OptionV4.vue.js";
11
11
  import "./ConditionalDropdown.vue.js";
12
- import { useChildOptions as ye } from "../composables/useChildOptions.js";
12
+ import { useChildOptions as he } from "../composables/useChildOptions.js";
13
13
  import fe from "../../search/v4/SearchV4.vue.js";
14
- import { useTestIdAttrs as he } from "../../../utils/testIds.js";
14
+ import { useTestIdAttrs as ve } from "../../../utils/testIds.js";
15
15
  import { DropdownTestIdModifiers as $ } from "../../../testids/index.js";
16
- const ve = {
16
+ const me = {
17
17
  key: 0,
18
18
  class: "child-options"
19
- }, qe = /* @__PURE__ */ ee({
19
+ }, Ae = /* @__PURE__ */ ne({
20
20
  __name: "TreeDropdown",
21
21
  props: {
22
22
  options: null,
@@ -44,7 +44,7 @@ const ve = {
44
44
  emits: ["update:selected", "update:isOpen"],
45
45
  setup(t, { emit: b }) {
46
46
  const n = t;
47
- ne("isTreeDropdown", !0);
47
+ le("isTreeDropdown", !0);
48
48
  const m = c([]), u = c([]), T = c({}), O = c(!1), i = c([...n.selected]), p = c(""), x = c(!0), N = K(() => u.value.reduce((e, o) => (o[n.optionChildrenKey] && o[n.optionChildrenKey].length && o[n.optionChildrenKey].forEach(() => {
49
49
  e = e + 1;
50
50
  }), o[n.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
@@ -53,9 +53,9 @@ const ve = {
53
53
  ...e[n.optionChildrenKey]
54
54
  ]);
55
55
  }), m.value = [...n.options], u.value = [...n.options];
56
- }, { hasChildren: h, getChildren: v, allChildrenSelected: k, someChildrenSelected: P } = ye(i, n.optionChildrenKey), q = (e) => {
57
- if (h(e)) {
58
- k(e) ? i.value = i.value.filter(
56
+ }, { hasChildren: f, getChildren: v, allChildrenSelected: I, someChildrenSelected: P } = he(i, n.optionChildrenKey), q = (e) => {
57
+ if (f(e)) {
58
+ I(e) ? i.value = i.value.filter(
59
59
  (o) => !v(e).includes(o)
60
60
  ) : i.value = [
61
61
  ...i.value.filter((o) => !v(e).includes(o)),
@@ -66,7 +66,7 @@ const ve = {
66
66
  i.value.includes(e) ? i.value = i.value.filter(
67
67
  (o) => o !== e
68
68
  ) : i.value = [...i.value, e];
69
- }, A = (e) => i.value.includes(e), J = (e) => 1 + (h(e) ? v(e).length : 0), j = () => {
69
+ }, A = (e) => i.value.includes(e), J = (e) => 1 + (f(e) ? v(e).length : 0), j = () => {
70
70
  b("update:selected", i.value), L.value = y.value;
71
71
  }, F = () => {
72
72
  i.value = [];
@@ -76,8 +76,8 @@ const ve = {
76
76
  if (n.selected?.includes(l))
77
77
  e.add(l);
78
78
  else if (l[n.optionChildrenKey] && l[n.optionChildrenKey].length) {
79
- for (const r of l[n.optionChildrenKey])
80
- if (n.selected?.includes(r)) {
79
+ for (const s of l[n.optionChildrenKey])
80
+ if (n.selected?.includes(s)) {
81
81
  e.add(l);
82
82
  break;
83
83
  }
@@ -88,61 +88,56 @@ const ve = {
88
88
  !n.selected.includes(l) && !e.has(l) && o.push(l);
89
89
  }), o;
90
90
  };
91
- le(() => {
91
+ te(() => {
92
92
  O.value || (U(), O.value = !0, n.preExpandedOptions && n.preExpandedOptions.forEach((e) => {
93
93
  a.value[e] = 1;
94
94
  }));
95
- }), g(
95
+ }), E(
96
96
  () => n.options,
97
97
  () => {
98
98
  U();
99
99
  }
100
- ), g(
100
+ ), E(
101
101
  () => n.selected,
102
102
  (e, o) => {
103
103
  JSON.stringify(e) !== JSON.stringify(o) && (i.value = [...n.selected]);
104
104
  }
105
105
  );
106
- const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value), H = K(() => !y.value && i.value.length > 0), L = c(y.value);
107
- g(
108
- () => n.isOpen,
109
- () => {
110
- n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
111
- }
112
- );
113
- const a = c({}), Q = (e) => {
106
+ const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value), H = K(() => !y.value && i.value.length > 0), L = c(y.value), Q = (e) => {
107
+ b("update:isOpen", e), n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
108
+ }, a = c({}), R = (e) => {
114
109
  a.value[e[n.optionUniqueIdKey]] ? delete a.value[e[n.optionUniqueIdKey]] : a.value[e[n.optionUniqueIdKey]] = 1;
115
110
  };
116
- function R(e, o) {
117
- const l = e.toLowerCase(), r = [];
118
- return o.value.forEach((s) => {
119
- const E = s[n.optionNameKey].toLowerCase().includes(l), V = T.value[s[n.optionUniqueIdKey]]?.filter(
120
- (_) => _[n.optionNameKey].toLowerCase().includes(l)
111
+ function W(e, o) {
112
+ const l = e.toLowerCase(), s = [];
113
+ return o.value.forEach((r) => {
114
+ const k = r[n.optionNameKey].toLowerCase().includes(l), V = T.value[r[n.optionUniqueIdKey]]?.filter(
115
+ (ee) => ee[n.optionNameKey].toLowerCase().includes(l)
121
116
  ) || [];
122
- (E || V.length > 0) && (s[n.optionChildrenKey] = V, r.push(s));
123
- }), r;
117
+ (k || V.length > 0) && (r[n.optionChildrenKey] = V, s.push(r));
118
+ }), s;
124
119
  }
125
- const W = (e) => {
126
- const o = R(e, u);
120
+ const X = (e) => {
121
+ const o = W(e, u);
127
122
  e && (Object.keys(a.value).forEach((l) => {
128
123
  delete a.value[l];
129
124
  }), o.forEach((l) => {
130
125
  Array.isArray(l[n.optionChildrenKey]) && l[n.optionChildrenKey].length && (a.value[l[n.optionUniqueIdKey]] = 1);
131
126
  })), m.value = o;
132
- }, X = K(() => {
127
+ }, Y = K(() => {
133
128
  const e = n.options.length, o = n.options.reduce(
134
- (l, r) => (a.value[r[n.optionUniqueIdKey]] && (l = l + r[n.optionChildrenKey].length), l),
129
+ (l, s) => (a.value[s[n.optionUniqueIdKey]] && (l = l + s[n.optionChildrenKey].length), l),
135
130
  0
136
131
  );
137
132
  return e + o;
138
133
  });
139
- g(
134
+ E(
140
135
  () => p.value,
141
136
  () => {
142
- W(p.value), x.value = !p.value;
137
+ X(p.value), x.value = !p.value;
143
138
  }
144
139
  );
145
- const Y = () => {
140
+ const Z = () => {
146
141
  y.value ? i.value = [] : (i.value = [], u.value.forEach((e) => {
147
142
  if (e[n.optionChildrenKey] && e[n.optionChildrenKey].length)
148
143
  for (const o of e[n.optionChildrenKey])
@@ -150,8 +145,8 @@ const ve = {
150
145
  else
151
146
  i.value = [e, ...i.value];
152
147
  }));
153
- }, Z = he(n.testId, $);
154
- return (e, o) => (C(), D(d(ue), {
148
+ }, _ = ve(n.testId, $);
149
+ return (e, o) => (g(), D(d(pe), {
155
150
  multi: "",
156
151
  class: "tree-dropdown",
157
152
  "show-select-all": x.value,
@@ -170,27 +165,27 @@ const ve = {
170
165
  "override-option-count-calculation": J,
171
166
  "trigger-show-all-selected-text": !1,
172
167
  "predefined-trigger": "default",
173
- "custom-number-of-displayed-options": d(X),
174
- "onUpdate:isOpen": o[2] || (o[2] = (l) => b("update:isOpen", l)),
168
+ "custom-number-of-displayed-options": d(Y),
169
+ "onUpdate:isOpen": Q,
175
170
  onApply: j,
176
171
  onClear: F
177
172
  }, {
178
- "dropdown-trigger": f(({ defaultTriggerProps: l }) => [
179
- I(d(pe), z(l, {
173
+ "dropdown-trigger": h(({ defaultTriggerProps: l }) => [
174
+ C(d(ye), z(l, {
180
175
  "all-selected": L.value,
181
176
  "show-all-selected-text": ""
182
- }), te({ _: 2 }, [
177
+ }), oe({ _: 2 }, [
183
178
  e.$slots["trigger-end-icon"] ? {
184
179
  name: "end-icon",
185
- fn: f(() => [
186
- oe(e.$slots, "trigger-end-icon", {}, void 0, !0)
180
+ fn: h(() => [
181
+ ie(e.$slots, "trigger-end-icon", {}, void 0, !0)
187
182
  ]),
188
183
  key: "0"
189
184
  } : void 0
190
185
  ]), 1040, ["all-selected"])
191
186
  ]),
192
- "inline-search": f(() => [
193
- I(d(fe), {
187
+ "inline-search": h(() => [
188
+ C(d(fe), {
194
189
  modelValue: p.value,
195
190
  "onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
196
191
  class: "tree-search",
@@ -201,30 +196,30 @@ const ve = {
201
196
  "test-id": t.testId
202
197
  }, null, 8, ["modelValue", "placeholder", "test-id"])
203
198
  ]),
204
- "select-all": f(() => [
199
+ "select-all": h(() => [
205
200
  M("li", null, [
206
- I(d(w), z({
201
+ C(d(w), z({
207
202
  "aria-selected": d(y),
208
203
  "aria-disabled": !!t.disabled,
209
204
  "selected-prop": d(y),
210
205
  "is-indeterminate": d(H),
211
206
  "is-multi": "",
212
207
  "select-all-option": ""
213
- }, d(Z)[d($).SELECT_ALL], {
214
- onClick: o[1] || (o[1] = S((l) => Y(), ["stop"]))
208
+ }, d(_)[d($).SELECT_ALL], {
209
+ onClick: o[1] || (o[1] = S((l) => Z(), ["stop"]))
215
210
  }), {
216
- default: f(() => [
217
- ie(" Select all ")
211
+ default: h(() => [
212
+ de(" Select all ")
218
213
  ]),
219
214
  _: 1
220
215
  }, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
221
216
  ])
222
217
  ]),
223
- default: f(({ option: l, index: r }) => [
224
- I(d(w), {
218
+ default: h(({ option: l, index: s }) => [
219
+ C(d(w), {
225
220
  option: l,
226
- "selected-prop": d(h)(l) ? d(k)(l) : A(l),
227
- "is-indeterminate": !d(k)(l) && d(P)(l),
221
+ "selected-prop": d(f)(l) ? d(I)(l) : A(l),
222
+ "is-indeterminate": !d(I)(l) && d(P)(l),
228
223
  disabled: l[t.disabledOptionKey],
229
224
  "name-key": t.optionNameKey,
230
225
  "image-key": t.optionImageKey,
@@ -233,20 +228,20 @@ const ve = {
233
228
  "end-icon-key": t.optionEndIconKey,
234
229
  "end-icon-type": t.optionEndIconType,
235
230
  "end-text-icon-key": t.optionEndTextIconKey,
236
- "tree-main-option": d(h)(l),
231
+ "tree-main-option": d(f)(l),
237
232
  "tree-main-option-expanded": a.value[l[t.optionUniqueIdKey]],
238
233
  "stop-option-click-event-propagation": "",
239
234
  "is-multi": "",
240
235
  onClick: S(() => q(l), ["stop"]),
241
- onToggleTreeCollapse: Q
236
+ onToggleTreeCollapse: R
242
237
  }, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-main-option", "tree-main-option-expanded", "onClick"]),
243
- d(h)(l) ? (C(), B("div", ve, [
244
- de(M("div", null, [
245
- (C(!0), B(ae, null, re(d(v)(l), (s, E) => (C(), D(d(w), {
246
- key: `${r}-${E}`,
247
- option: s,
248
- "selected-prop": A(s),
249
- disabled: s[t.disabledOptionKey],
238
+ d(f)(l) ? (g(), B("div", me, [
239
+ ae(M("div", null, [
240
+ (g(!0), B(se, null, re(d(v)(l), (r, k) => (g(), D(d(w), {
241
+ key: `${s}-${k}`,
242
+ option: r,
243
+ "selected-prop": A(r),
244
+ disabled: r[t.disabledOptionKey],
250
245
  "name-key": t.optionNameKey,
251
246
  "image-key": t.optionImageKey,
252
247
  "icon-key": t.optionIconKey,
@@ -257,17 +252,17 @@ const ve = {
257
252
  "tree-child-shown": a.value[l[t.optionUniqueIdKey]],
258
253
  "stop-option-click-event-propagation": "",
259
254
  "is-multi": "",
260
- onClick: S(() => q(s), ["stop"])
255
+ onClick: S(() => q(r), ["stop"])
261
256
  }, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-child-shown", "onClick"]))), 128))
262
257
  ], 512), [
263
- [se, a.value[l[t.optionUniqueIdKey]]]
258
+ [ce, a.value[l[t.optionUniqueIdKey]]]
264
259
  ])
265
- ])) : ce("", !0)
260
+ ])) : ue("", !0)
266
261
  ]),
267
262
  _: 3
268
263
  }, 8, ["show-select-all", "is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled", "custom-number-of-displayed-options"]));
269
264
  }
270
265
  });
271
266
  export {
272
- qe as default
267
+ Ae as default
273
268
  };