@ironsource/shared-ui 2.1.11-test.5 → 2.1.11-test.51

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 (182) 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_277fde76_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_a1c626cd_lang.css +1 -0
  6. package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
  7. package/CheckboxV4.vue_vue_type_style_index_0_scoped_af4ae3c3_lang.css +1 -0
  8. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +1 -0
  9. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css +1 -0
  10. package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
  11. package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
  12. package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +1 -0
  13. package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
  14. package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
  15. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
  16. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
  17. package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
  18. package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +1 -0
  19. package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +1 -0
  20. package/PopoverV4.vue_vue_type_style_index_0_scoped_66694b4e_lang.css +1 -0
  21. package/README.md +4 -15
  22. package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
  23. package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +1 -0
  24. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
  25. package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +1 -0
  26. package/TextField.vue_vue_type_style_index_0_scoped_2e327aa1_lang.css +1 -0
  27. package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
  28. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +1 -0
  29. package/TooltipV4.vue_vue_type_style_index_0_scoped_82b46d6d_lang.css +1 -0
  30. package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +1 -0
  31. package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +1 -0
  32. package/components/autocomplete/Autocomplete.vue2.js +3 -2
  33. package/components/button/v3/Button.vue.d.ts +6 -6
  34. package/components/button/v3/index.d.ts +14 -14
  35. package/components/button/v4/ToggleButtonGroupAB.vue.d.ts +3 -1
  36. package/components/button/v4/ToggleButtonGroupAB.vue.js +2 -2
  37. package/components/button/v4/ToggleButtonGroupAB.vue2.js +44 -39
  38. package/components/button/v4/index.d.ts +9 -3
  39. package/components/chart/Chart.vue.d.ts +17 -4
  40. package/components/chart/Chart.vue.js +5 -5
  41. package/components/chart/Chart.vue2.js +127 -110
  42. package/components/chart/ChartHeader.vue.d.ts +13 -6
  43. package/components/chart/ChartHeader.vue.js +2 -2
  44. package/components/chart/ChartHeader.vue2.js +32 -29
  45. package/components/chart/ChartLegend.vue.d.ts +5 -0
  46. package/components/chart/ChartLegend.vue.js +3 -3
  47. package/components/chart/ChartLegend.vue2.js +99 -49
  48. package/components/chart/ChartTooltip.vue.d.ts +4 -5
  49. package/components/chart/ChartTooltip.vue.js +2 -2
  50. package/components/chart/ChartTooltip.vue2.js +64 -43
  51. package/components/chart/SettingsHeader.vue2.js +3 -2
  52. package/components/chart/index.d.ts +74 -35
  53. package/components/chart/mockData.d.ts +15 -2
  54. package/components/chart/types.d.ts +15 -1
  55. package/components/chart/utils/utils.js +5 -5
  56. package/components/checkbox/v4/CheckboxV4.vue.js +3 -3
  57. package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
  58. package/components/datePicker/v4/DatePickerV4.vue2.js +8 -7
  59. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  60. package/components/dateRange/v4/DateRangeV4.vue2.js +9 -9
  61. package/components/dialog/v4/DialogV4.vue.d.ts +15 -0
  62. package/components/dialog/v4/DialogV4.vue.js +3 -3
  63. package/components/dialog/v4/DialogV4.vue2.js +80 -73
  64. package/components/dialog/v4/index.d.ts +58 -1
  65. package/components/dropdown/common/Dropdown.common.js +200 -189
  66. package/components/dropdown/v3/Dropdown.vue.d.ts +2 -2
  67. package/components/dropdown/v3/index.d.ts +39 -39
  68. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +1 -1
  69. package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
  70. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
  71. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
  72. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  73. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +7 -7
  74. package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +10 -0
  75. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  76. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +88 -47
  77. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +110 -0
  78. package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
  79. package/components/dropdown/v4/ConditionalDropdown.vue2.js +224 -0
  80. package/components/dropdown/v4/DropdownV4.vue.d.ts +32 -11
  81. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  82. package/components/dropdown/v4/DropdownV4.vue2.js +153 -138
  83. package/components/dropdown/v4/OptionV4.vue.d.ts +10 -0
  84. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  85. package/components/dropdown/v4/OptionV4.vue2.js +135 -98
  86. package/components/dropdown/v4/TreeDropdown.vue.d.ts +6 -1
  87. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  88. package/components/dropdown/v4/TreeDropdown.vue2.js +165 -120
  89. package/components/dropdown/v4/index.d.ts +443 -110
  90. package/components/dropdown/v4/index.js +6 -3
  91. package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
  92. package/components/emptyState/v3/index.d.ts +7 -7
  93. package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
  94. package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
  95. package/components/filtersPanel/v4/FiltersPanelV4.vue.js +2 -2
  96. package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
  97. package/components/forms/FormCard.vue.js +3 -3
  98. package/components/forms/FormCard.vue2.js +1 -1
  99. package/components/icon/v4/consts.d.ts +1 -1
  100. package/components/icon/v4/consts.js +1 -1
  101. package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
  102. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  103. package/components/inlineCopy/InlineCopy.vue2.js +24 -22
  104. package/components/inlineCopy/index.d.ts +9 -0
  105. package/components/input/v4/TextField.vue.js +3 -3
  106. package/components/input/v4/TextField.vue2.js +12 -12
  107. package/components/multibar/MultiBarMenu.vue2.js +3 -2
  108. package/components/popover/v4/PopoverV4.vue.d.ts +14 -2
  109. package/components/popover/v4/PopoverV4.vue.js +4 -3
  110. package/components/popover/v4/PopoverV4.vue2.js +40 -24
  111. package/components/popover/v4/index.d.ts +55 -11
  112. package/components/snackbar/v4/SnackbarV4.vue.d.ts +7 -116
  113. package/components/snackbar/v4/SnackbarV4.vue.js +5 -5
  114. package/components/snackbar/v4/SnackbarV4.vue2.js +62 -60
  115. package/components/sortableList/SortableItem.vue.js +3 -3
  116. package/components/sortableList/SortableItem.vue2.js +57 -56
  117. package/components/sortableList/SortableItemLabel.vue.js +3 -3
  118. package/components/sortableList/SortableItemLabel.vue2.js +20 -23
  119. package/components/sortableList/SortableList.vue.d.ts +1 -1
  120. package/components/sortableList/SortableList.vue.js +3 -3
  121. package/components/sortableList/SortableList.vue2.js +82 -76
  122. package/components/sortableList/index.d.ts +4 -4
  123. package/components/table/common/Table.common.d.ts +1 -1
  124. package/components/table/common/Table.common.js +83 -77
  125. package/components/table/common/Table.types.d.ts +1 -1
  126. package/components/table/common/consts.d.ts +4 -0
  127. package/components/table/common/consts.js +7 -0
  128. package/components/table/v3/Table.vue.d.ts +1 -1
  129. package/components/table/v3/index.d.ts +5 -5
  130. package/components/table/v4/DataGrid.vue.d.ts +12 -2
  131. package/components/table/v4/DataGrid.vue.js +2 -2
  132. package/components/table/v4/DataGrid.vue2.js +164 -155
  133. package/components/table/v4/DataGridMenu.vue.js +5 -5
  134. package/components/table/v4/DataGridMenu.vue2.js +4 -3
  135. package/components/table/v4/index.d.ts +64 -26
  136. package/components/table-cells/common/Editable.common.js +24 -19
  137. package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
  138. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  139. package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
  140. package/components/tooltip/v4/index.d.ts +39 -1
  141. package/components/typography/v4/Typography.vue.js +3 -3
  142. package/components/typography/v4/Typography.vue2.js +24 -18
  143. package/composables/useFormValidation.d.ts +1 -1
  144. package/design-foundation.stories/icons/iconsData.d.ts +1 -1
  145. package/index.d.ts +1426 -320
  146. package/index.js +1 -1
  147. package/mocks/options.d.ts +48 -6
  148. package/mocks/words.d.ts +1 -1
  149. package/package.json +3 -239
  150. package/style/v4/grid.css +1 -1
  151. package/style/v4/grid.css.map +1 -1
  152. package/style/v4/spacings.scss +1 -0
  153. package/testids/index.d.ts +1 -0
  154. package/testids/index.js +13 -13
  155. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_lang.css +0 -1
  156. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +0 -1
  157. package/Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_lang.css +0 -1
  158. package/ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css +0 -1
  159. package/ChartLegend.vue_vue_type_style_index_0_scoped_c0f71a49_lang.css +0 -1
  160. package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
  161. package/CheckboxV4.vue_vue_type_style_index_0_scoped_8e5b619a_lang.css +0 -1
  162. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css +0 -1
  163. package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
  164. package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
  165. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +0 -1
  166. package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +0 -1
  167. package/DropdownV4.vue_vue_type_style_index_0_scoped_e899ec7a_lang.css +0 -1
  168. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
  169. package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_39061862_lang.css +0 -1
  170. package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
  171. package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +0 -1
  172. package/OptionV4.vue_vue_type_style_index_0_scoped_4070942a_lang.css +0 -1
  173. package/PopoverV4.vue_vue_type_style_index_0_scoped_74bbce13_lang.css +0 -1
  174. package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
  175. package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
  176. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
  177. package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
  178. package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +0 -1
  179. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_9d9e51c0_lang.css +0 -1
  180. package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +0 -1
  181. package/TreeDropdown.vue_vue_type_style_index_0_scoped_6ac5f602_lang.css +0 -1
  182. package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
@@ -1,12 +1,12 @@
1
- import "../../../ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_9d9e51c0_lang.css"; import { defineComponent as I, ref as i, onMounted as b, openBlock as g, createElementBlock as k, createVNode as n, mergeProps as a, unref as e, withCtx as r, createTextVNode as f, createBlock as A, createElementVNode as C, renderSlot as N, createCommentVNode as w } from "vue";
2
- import c from "./ButtonV4.vue.js";
3
- import { useVModel as y } from "@vueuse/core";
4
- import O from "../../icon/v4/IconV4.vue.js";
1
+ import "../../../ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css"; import { defineComponent as A, ref as s, onMounted as C, computed as y, openBlock as f, createElementBlock as N, createVNode as a, mergeProps as p, unref as e, withCtx as r, createTextVNode as B, createBlock as w, createElementVNode as O, renderSlot as R, createCommentVNode as x } from "vue";
2
+ import i from "./ButtonV4.vue.js";
3
+ import { useVModel as E } from "@vueuse/core";
4
+ import G from "../../icon/v4/IconV4.vue.js";
5
5
  import "../../icon/v4/IconFlag.vue.js";
6
- import x from "../../popover/v4/PopoverV4.vue.js";
7
- import { useTestIdAttrs as E } from "../../../utils/testIds.js";
8
- import { ToggleButtonGroupABTestIdModifiers as p } from "../../../testids/index.js";
9
- const G = { class: "group-button-wrapper" }, M = { class: "popover-trigger" }, D = /* @__PURE__ */ I({
6
+ import M from "../../popover/v4/PopoverV4.vue.js";
7
+ import { useTestIdAttrs as $ } from "../../../utils/testIds.js";
8
+ import { ToggleButtonGroupABTestIdModifiers as u } from "../../../testids/index.js";
9
+ const h = { class: "group-button-wrapper" }, U = { class: "popover-trigger" }, K = /* @__PURE__ */ A({
10
10
  __name: "ToggleButtonGroupAB",
11
11
  props: {
12
12
  modelValue: null,
@@ -15,81 +15,86 @@ const G = { class: "group-button-wrapper" }, M = { class: "popover-trigger" }, D
15
15
  popoverProps: null
16
16
  },
17
17
  emits: ["update:modelValue"],
18
- setup(d, { emit: B }) {
19
- const t = d, m = i(!1), T = (o) => {
20
- m.value = o;
21
- }, u = E(
18
+ setup(d, { expose: T, emit: P }) {
19
+ const t = d, m = s(null), v = s(!1), _ = (o) => {
20
+ v.value = o;
21
+ }, c = $(
22
22
  t.testId,
23
- p,
23
+ u,
24
24
  !0
25
- ), P = i(
25
+ ), V = s(
26
26
  t.popoverProps ? { ...t.popoverProps } : {}
27
- ), l = i(), V = y(t, "modelValue", B);
28
- b(() => {
27
+ ), l = s(), k = E(t, "modelValue", P);
28
+ C(() => {
29
29
  l.value = t.modelValue;
30
30
  });
31
- const v = (o) => {
32
- l.value = o, V.value = o;
33
- };
34
- return (o, s) => (g(), k("div", G, [
35
- n(c, a({
31
+ const g = (o) => {
32
+ l.value = o, k.value = o;
33
+ }, I = y(() => m.value?.toggle);
34
+ return T({
35
+ toggle: I
36
+ }), (o, n) => (f(), N("div", h, [
37
+ a(i, p({
36
38
  class: ["toggle-button", { "selected-a": l.value === "a" }],
37
39
  color: "primary",
38
40
  variant: "outlined"
39
- }, e(u)[e(p).BUTTON_A], {
40
- onClick: s[0] || (s[0] = (_) => v("a"))
41
+ }, e(c)[e(u).BUTTON_A], {
42
+ onClick: n[0] || (n[0] = (b) => g("a"))
41
43
  }), {
42
44
  default: r(() => [
43
- f(" A ")
45
+ B(" A ")
44
46
  ]),
45
47
  _: 1
46
48
  }, 16, ["class"]),
47
- n(c, a({
49
+ a(i, p({
48
50
  class: ["toggle-button", { "selected-b": l.value === "b" }],
49
51
  color: "primary",
50
52
  variant: "outlined"
51
- }, e(u)[e(p).BUTTON_B], {
52
- onClick: s[1] || (s[1] = (_) => v("b"))
53
+ }, e(c)[e(u).BUTTON_B], {
54
+ onClick: n[1] || (n[1] = (b) => g("b"))
53
55
  }), {
54
56
  default: r(() => [
55
- f(" B ")
57
+ B(" B ")
56
58
  ]),
57
59
  _: 1
58
60
  }, 16, ["class"]),
59
- d.withPopover ? (g(), A(c, a({
61
+ d.withPopover ? (f(), w(i, p({
60
62
  key: 0,
61
63
  class: [
62
64
  "toggle-button",
63
65
  {
64
- "trigger-active": m.value
66
+ "trigger-active": v.value
65
67
  }
66
68
  ],
67
69
  color: "primary",
68
70
  variant: "outlined"
69
- }, e(u)[e(p).POPOVER_TRIGGER]), {
71
+ }, e(c)[e(u).POPOVER_TRIGGER]), {
70
72
  default: r(() => [
71
- n(e(x), a({
72
- ...P.value
73
- }, { onIsOpen: T }), {
73
+ a(e(M), p({
74
+ ref_key: "popoverRef",
75
+ ref: m
76
+ }, {
77
+ ...V.value
78
+ }, { onIsOpen: _ }), {
74
79
  trigger: r(() => [
75
- C("div", M, [
76
- n(e(O), {
80
+ O("div", U, [
81
+ a(e(G), {
77
82
  name: "caret-down",
78
83
  size: "16px"
79
84
  })
80
85
  ])
81
86
  ]),
82
87
  content: r(() => [
83
- N(o.$slots, "popover-content", {}, void 0, !0)
88
+ R(o.$slots, "popover-content", {}, void 0, !0)
84
89
  ]),
85
90
  _: 3
86
91
  }, 16)
87
92
  ]),
88
93
  _: 3
89
- }, 16, ["class"])) : w("", !0)
94
+ }, 16, ["class"])) : x("", !0)
90
95
  ]));
91
96
  }
92
97
  });
93
98
  export {
94
- D as default
99
+ K as default
95
100
  };
@@ -374,7 +374,9 @@ declare const ButtonTypes: () => (({
374
374
  };
375
375
  }>> & {
376
376
  "onUpdate:modelValue"?: (...args: any[]) => any;
377
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
377
+ }, {
378
+ toggle: import("vue").ComputedRef<(value?: boolean) => boolean>;
379
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
378
380
  "update:modelValue": (...args: any[]) => void;
379
381
  }, string, {
380
382
  testId: string;
@@ -426,7 +428,9 @@ declare const ButtonTypes: () => (({
426
428
  };
427
429
  }>> & {
428
430
  "onUpdate:modelValue"?: (...args: any[]) => any;
429
- } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
431
+ } & import("vue").ShallowUnwrapRef<{
432
+ toggle: import("vue").ComputedRef<(value?: boolean) => boolean>;
433
+ }> & {} & import("vue").ComponentCustomProperties & {};
430
434
  __isFragment?: never;
431
435
  __isTeleport?: never;
432
436
  __isSuspense?: never;
@@ -458,7 +462,9 @@ declare const ButtonTypes: () => (({
458
462
  };
459
463
  }>> & {
460
464
  "onUpdate:modelValue"?: (...args: any[]) => any;
461
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
465
+ }, {
466
+ toggle: import("vue").ComputedRef<(value?: boolean) => boolean>;
467
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
462
468
  "update:modelValue": (...args: any[]) => void;
463
469
  }, string, {
464
470
  testId: string;
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
9
9
  tickCount?: number;
10
10
  header?: string;
11
11
  subheader?: string;
12
- subheaderTooltip?: string;
12
+ withSubheaderTooltip?: boolean;
13
13
  hideLegend?: boolean;
14
14
  minVisible?: number;
15
15
  maxVisible?: number;
@@ -18,6 +18,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
18
18
  noDataTitle?: string;
19
19
  noDataSubtitle?: string;
20
20
  withSettingsHeader?: boolean;
21
+ maxLimitTooltipText?: string;
22
+ withAnimation?: boolean;
21
23
  }>, {
22
24
  chartType: ChartType;
23
25
  dataSets: () => any[];
@@ -37,6 +39,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
37
39
  noDataTitle: string;
38
40
  noDataSubtitle: string;
39
41
  withSettingsHeader: boolean;
42
+ withSubheaderTooltip: boolean;
43
+ maxLimitTooltipText: string;
44
+ withAnimation: boolean;
40
45
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
46
  "update:chartType": (chartType: ChartType) => void;
42
47
  "update:visibleIds": (visibleIds: unknown[]) => void;
@@ -50,7 +55,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
50
55
  tickCount?: number;
51
56
  header?: string;
52
57
  subheader?: string;
53
- subheaderTooltip?: string;
58
+ withSubheaderTooltip?: boolean;
54
59
  hideLegend?: boolean;
55
60
  minVisible?: number;
56
61
  maxVisible?: number;
@@ -59,6 +64,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
59
64
  noDataTitle?: string;
60
65
  noDataSubtitle?: string;
61
66
  withSettingsHeader?: boolean;
67
+ maxLimitTooltipText?: string;
68
+ withAnimation?: boolean;
62
69
  }>, {
63
70
  chartType: ChartType;
64
71
  dataSets: () => any[];
@@ -78,31 +85,37 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
78
85
  noDataTitle: string;
79
86
  noDataSubtitle: string;
80
87
  withSettingsHeader: boolean;
88
+ withSubheaderTooltip: boolean;
89
+ maxLimitTooltipText: string;
90
+ withAnimation: boolean;
81
91
  }>>> & {
82
92
  "onUpdate:visibleIds"?: (visibleIds: unknown[]) => any;
83
93
  "onUpdate:chartType"?: (chartType: ChartType) => any;
84
94
  }, {
85
95
  header: string;
86
96
  loading: boolean;
97
+ parsing: ChartParsingConfig;
87
98
  xAxisFormat: ValueFormat;
88
99
  yAxisFormat: ValueFormat;
89
- parsing: ChartParsingConfig;
90
100
  visibleIds: unknown[];
91
101
  minVisible: number;
92
102
  maxVisible: number;
103
+ maxLimitTooltipText: string;
93
104
  chartType: ChartType;
94
105
  withSettingsHeader: boolean;
95
106
  subheader: string;
96
- subheaderTooltip: string;
107
+ withSubheaderTooltip: boolean;
97
108
  dataSets: ChartDataSet[];
98
109
  hideLegend: boolean;
99
110
  tickCount: number;
100
111
  noDataIcon: string;
101
112
  noDataTitle: string;
102
113
  noDataSubtitle: string;
114
+ withAnimation: boolean;
103
115
  }>, {
104
116
  metric?(_: {}): any;
105
117
  breakdowns?(_: {}): any;
118
+ "subheader-tooltip"?(_: {}): any;
106
119
  }>;
107
120
  export default _default;
108
121
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
- import e from "./Chart.vue2.js";
2
- /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_lang.css"; //*');
4
- const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-ea1e5c3e"]]);
1
+ import o from "./Chart.vue2.js";
2
+ /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../Chart.vue_vue_type_style_index_0_scoped_277fde76_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-277fde76"]]);
5
5
  export {
6
- a as default
6
+ p as default
7
7
  };
@@ -1,23 +1,23 @@
1
- import "../../Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_lang.css"; import { defineComponent as X, ref as g, computed as i, onMounted as j, watch as C, nextTick as q, openBlock as d, createElementBlock as k, Fragment as R, createBlock as m, unref as u, isRef as V, withCtx as O, renderSlot as D, createCommentVNode as v, createElementVNode as f, createVNode as F, normalizeStyle as J } from "vue";
2
- import { useVModel as Q } from "@vueuse/core";
3
- import { Chart as N, ArcElement as Y, LineElement as ee, BarElement as te, PointElement as ae, LineController as oe, BarController as re, PieController as ie, ScatterController as le, CategoryScale as ne, LinearScale as se, Filler as de, Tooltip as ue } from "chart.js";
4
- import { HoverVerticalLine as ce } from "./plugins/HoverVerticalLine.js";
5
- import { formatValue as H, calcStepSize as fe } from "./utils/utils.js";
6
- import { DEFAULT_TICK_COUNT as pe, DEFAULT_MIN_VISIBLE as he, DEFAULT_MAX_VISIBLE as me, COLOR_PALETTE as ve, POINT_BORDER_COLOR as be, TICK_LABEL_COLOR as P, TICK_LABEL_FONT as U, GRID_LINE_COLOR as M } from "./consts.js";
1
+ import "../../Chart.vue_vue_type_style_index_0_scoped_277fde76_lang.css"; import { defineComponent as q, computed as l, ref as g, onMounted as J, watch as T, nextTick as Q, openBlock as d, createElementBlock as C, Fragment as O, createBlock as f, unref as u, isRef as D, withCtx as k, renderSlot as x, createCommentVNode as v, createElementVNode as p, normalizeClass as Y, createVNode as F, normalizeStyle as _ } from "vue";
2
+ import { useVModel as ee } from "@vueuse/core";
3
+ import { Chart as N, ArcElement as te, LineElement as ae, BarElement as oe, PointElement as ie, LineController as le, BarController as re, PieController as ne, ScatterController as se, CategoryScale as de, LinearScale as ue, Filler as ce, Tooltip as pe } from "chart.js";
4
+ import { HoverVerticalLine as me } from "./plugins/HoverVerticalLine.js";
5
+ import { formatValue as H, calcStepSize as he } from "./utils/utils.js";
6
+ import { DEFAULT_TICK_COUNT as fe, DEFAULT_MIN_VISIBLE as ve, DEFAULT_MAX_VISIBLE as ye, COLOR_PALETTE as be, POINT_BORDER_COLOR as ge, TICK_LABEL_COLOR as U, TICK_LABEL_FONT as P, GRID_LINE_COLOR as z } from "./consts.js";
7
7
  import { ChartType as n } from "./types.js";
8
- import { useTooltipPosition as ye } from "./composables/useTooltipPosition.js";
9
- import ge from "./ChartTooltip.vue.js";
10
- import Ce from "./ChartLegend.vue.js";
11
- import ke from "./ChartHeader.vue.js";
12
- import { hexColorToRgba as Te } from "../../utils/color.js";
8
+ import { useTooltipPosition as Te } from "./composables/useTooltipPosition.js";
9
+ import Ce from "./ChartTooltip.vue.js";
10
+ import ke from "./ChartLegend.vue.js";
11
+ import xe from "./ChartHeader.vue.js";
12
+ import { hexColorToRgba as Le } from "../../utils/color.js";
13
13
  import { useChartValues as Se } from "./composables/useChartValues.js";
14
- import Le from "./ChartLoader.vue.js";
15
- import xe from "../emptyState/v4/EmptyStateV4.vue.js";
16
- import Be from "./SettingsHeader.vue.js";
17
- const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = { class: "header-wrapper" }, Ee = { class: "chart" }, Re = {
14
+ import we from "./ChartLoader.vue.js";
15
+ import Be from "../emptyState/v4/EmptyStateV4.vue.js";
16
+ import Ie from "./SettingsHeader.vue.js";
17
+ const Ae = { class: "chart-container" }, Ee = { class: "header-wrapper" }, Ve = { class: "chart" }, Re = {
18
18
  key: 0,
19
19
  class: "chart-sidebar"
20
- }, Xe = /* @__PURE__ */ X({
20
+ }, qe = /* @__PURE__ */ q({
21
21
  __name: "Chart",
22
22
  props: {
23
23
  dataSets: { default: () => [] },
@@ -26,75 +26,81 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
26
26
  parsing: { default: void 0 },
27
27
  xAxisFormat: { default: "string" },
28
28
  yAxisFormat: { default: "number" },
29
- tickCount: { default: pe },
29
+ tickCount: { default: fe },
30
30
  header: { default: "" },
31
31
  subheader: { default: "" },
32
- subheaderTooltip: { default: "" },
32
+ withSubheaderTooltip: { type: Boolean, default: !1 },
33
33
  hideLegend: { type: Boolean, default: !1 },
34
- minVisible: { default: he },
35
- maxVisible: { default: me },
34
+ minVisible: { default: ve },
35
+ maxVisible: { default: ye },
36
36
  loading: { type: Boolean, default: !1 },
37
37
  noDataIcon: { default: "file-x" },
38
38
  noDataTitle: { default: "No data to display" },
39
39
  noDataSubtitle: { default: "Search again with different filters" },
40
- withSettingsHeader: { type: Boolean, default: !0 }
40
+ withSettingsHeader: { type: Boolean, default: !0 },
41
+ maxLimitTooltipText: { default: "" },
42
+ withAnimation: { type: Boolean, default: !0 }
41
43
  },
42
44
  emits: ["update:chartType", "update:visibleIds"],
43
- setup(a, { emit: T }) {
45
+ setup(a, { emit: L }) {
44
46
  const t = a;
45
47
  N.register(
46
- Y,
47
- ee,
48
48
  te,
49
49
  ae,
50
50
  oe,
51
- re,
52
51
  ie,
53
52
  le,
53
+ re,
54
54
  ne,
55
55
  se,
56
56
  de,
57
57
  ue,
58
- ce
58
+ ce,
59
+ pe,
60
+ me
59
61
  );
60
- const c = Q(t, "chartType", T), p = g(null);
62
+ const c = ee(t, "chartType", L), M = l(
63
+ () => t.withAnimation ? "" : "none"
64
+ ), m = g(null);
61
65
  let s = null;
62
- const S = i(() => t.dataSets.length === 0), L = i(() => !t.loading && !S.value), b = () => {
63
- p.value && (s && s.destroy(), s = new N(p.value, B.value));
64
- }, z = () => {
65
- s && (s.data.datasets = y.value, s.options = B.value.options, s.update());
66
+ const S = l(() => t.dataSets.length === 0), w = l(() => !t.loading && !S.value), y = () => {
67
+ m.value && (s && s.destroy(), s = new N(m.value, I.value));
68
+ }, $ = () => {
69
+ s && (s.data.datasets = b.value, s.options = I.value.options, s.update(M.value));
66
70
  };
67
- j(b), C(() => t.chartType, b), C(L, async (e) => {
68
- e && (await q(), b());
69
- }), C([() => t.visibleIds, () => t.dataSets], z);
70
- const h = i(
71
+ J(y), T(() => t.chartType, y), T(w, async (e) => {
72
+ e && (await Q(), y());
73
+ }), T([() => t.visibleIds, () => t.dataSets], $);
74
+ const h = l(
71
75
  () => t.chartType === n.StackedLine || t.chartType === n.StackedBar
72
- ), $ = i(
76
+ ), K = l(
73
77
  () => t.chartType === n.Line || t.chartType === n.StackedLine
74
- ), x = i(
78
+ ), B = l(
75
79
  () => t.dataSets.filter((e) => t.visibleIds.includes(e.id))
76
- ), y = i(() => x.value.map((e, o) => {
77
- const r = e.color || ve[o] || "#000000";
80
+ ), b = l(() => B.value.map((e, o) => {
81
+ const i = e.color || be[o] || "#000000";
78
82
  return {
79
83
  ...e,
80
84
  fill: h.value ? "start" : void 0,
81
- backgroundColor: Te(
82
- r,
85
+ backgroundColor: Le(
86
+ i,
83
87
  t.chartType === n.StackedLine ? 10 : 70
84
88
  ),
85
- borderColor: r,
86
- pointBackgroundColor: r,
87
- pointHoverBorderColor: r,
89
+ borderColor: i,
90
+ pointBackgroundColor: i,
91
+ pointHoverBorderColor: i,
88
92
  maxBarThickness: 50,
89
- clip: 5
93
+ clip: 5,
90
94
  // draw a bit outside the chart area
95
+ icon: e.icon || null,
96
+ iconType: e.iconType || "branded"
91
97
  };
92
- })), B = i(
98
+ })), I = l(
93
99
  () => ({
94
100
  type: t.chartType == n.Bar || t.chartType === n.StackedBar ? "bar" : "line",
95
101
  // Chart Data
96
102
  data: {
97
- datasets: y.value
103
+ datasets: b.value
98
104
  },
99
105
  // Chart Options
100
106
  options: {
@@ -108,17 +114,17 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
108
114
  plugins: {
109
115
  legend: { display: !1 },
110
116
  title: { display: !1 },
111
- hoverVerticalLine: $.value,
117
+ hoverVerticalLine: K.value,
112
118
  // tooltip
113
119
  tooltip: {
114
120
  enabled: !1,
115
121
  position: "average",
116
122
  external: ({ tooltip: e }) => {
117
- l.value = { ...e };
123
+ r.value = { ...e };
118
124
  },
119
125
  callbacks: {
120
126
  footer: (e) => {
121
- const o = e.reduce((r, G) => r + (G.parsed.y || 0), 0);
127
+ const o = e.reduce((i, j) => i + (j.parsed.y || 0), 0);
122
128
  return ["Total", String(o)];
123
129
  }
124
130
  }
@@ -146,7 +152,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
146
152
  borderWidth: 0,
147
153
  hoverRadius: 4,
148
154
  hoverBorderWidth: 2,
149
- pointHoverBackgroundColor: be
155
+ pointHoverBackgroundColor: ge
150
156
  },
151
157
  bar: {
152
158
  borderRadius: 4
@@ -161,8 +167,8 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
161
167
  // stack on top of each other
162
168
  // ticks
163
169
  ticks: {
164
- color: P,
165
- font: U,
170
+ color: U,
171
+ font: P,
166
172
  padding: 4,
167
173
  callback: function(e) {
168
174
  return H(
@@ -173,7 +179,7 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
173
179
  },
174
180
  // grid lines
175
181
  grid: {
176
- color: M,
182
+ color: z,
177
183
  drawOnChartArea: !1,
178
184
  drawTicks: !0,
179
185
  drawBorder: !1,
@@ -189,17 +195,17 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
189
195
  // stack on top of each other
190
196
  // ticks
191
197
  ticks: {
192
- color: P,
193
- font: U,
198
+ color: U,
199
+ font: P,
194
200
  padding: 8,
195
- stepSize: E.value,
196
- min: A.value,
197
- max: E.value * t.tickCount,
201
+ stepSize: R.value,
202
+ min: V.value,
203
+ max: R.value * t.tickCount,
198
204
  callback: (e) => H(e, t.yAxisFormat)
199
205
  },
200
206
  // grid lines
201
207
  grid: {
202
- color: M,
208
+ color: z,
203
209
  drawOnChartArea: !0,
204
210
  drawTicks: !1
205
211
  }
@@ -207,87 +213,98 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
207
213
  }
208
214
  }
209
215
  })
210
- ), K = i(
211
- () => y.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
212
- ), W = i(() => t.dataSets.map((e) => ({
216
+ ), W = l(
217
+ () => b.value.reduce((e, o) => (e[o.id] = o.borderColor, e), {})
218
+ ), Z = l(() => t.dataSets.map((e) => ({
213
219
  id: e.id,
214
220
  label: e.label,
215
- color: K.value[e.id] || null
216
- }))), I = g(null), l = g(null), { position: w } = ye(
217
- p,
218
- I,
219
- l
220
- ), Z = i(() => ({
221
- left: `${w.value.left}px`,
222
- top: `${w.value.top}px`,
223
- opacity: l.value?.opacity || 0
224
- })), { minValue: A, maxValue: _ } = Se({
221
+ caption: e.caption || null,
222
+ color: W.value[e.id] || null,
223
+ icon: e.icon || null,
224
+ iconType: e.iconType || "branded"
225
+ }))), A = g(null), r = g(null), { position: E } = Te(
226
+ m,
227
+ A,
228
+ r
229
+ ), G = l(() => ({
230
+ left: `${E.value.left}px`,
231
+ top: `${E.value.top}px`,
232
+ opacity: r.value?.opacity || 0
233
+ })), { minValue: V, maxValue: X } = Se({
225
234
  parsingConfig: t.parsing,
226
- dataSets: x,
235
+ dataSets: B,
227
236
  isStacked: h
228
- }), E = i(
229
- () => fe(A.value, _.value, t.tickCount)
237
+ }), R = l(
238
+ () => he(V.value, X.value, t.tickCount)
230
239
  );
231
- return (e, o) => (d(), k(R, null, [
232
- a.withSettingsHeader ? (d(), m(Be, {
240
+ return (e, o) => (d(), C(O, null, [
241
+ a.withSettingsHeader ? (d(), f(Ie, {
233
242
  key: 0,
234
243
  "chart-type": u(c),
235
- "onUpdate:chart-type": o[0] || (o[0] = (r) => V(c) ? c.value = r : null),
244
+ "onUpdate:chart-type": o[0] || (o[0] = (i) => D(c) ? c.value = i : null),
236
245
  "hide-legend": a.hideLegend
237
246
  }, {
238
- metric: O(() => [
239
- D(e.$slots, "metric", {}, void 0, !0)
247
+ metric: k(() => [
248
+ x(e.$slots, "metric", {}, void 0, !0)
240
249
  ]),
241
- breakdowns: O(() => [
242
- D(e.$slots, "breakdowns", {}, void 0, !0)
250
+ breakdowns: k(() => [
251
+ x(e.$slots, "breakdowns", {}, void 0, !0)
243
252
  ]),
244
253
  _: 3
245
254
  }, 8, ["chart-type", "hide-legend"])) : v("", !0),
246
- f("div", Ie, [
247
- u(L) ? (d(), k(R, { key: 0 }, [
248
- f("section", we, [
249
- f("div", Ae, [
250
- F(ke, {
255
+ p("div", Ae, [
256
+ u(w) ? (d(), C(O, { key: 0 }, [
257
+ p("section", {
258
+ class: Y(["chart-content", [{ "with-legend": !a.hideLegend }]])
259
+ }, [
260
+ p("div", Ee, [
261
+ F(xe, {
251
262
  "chart-type": u(c),
252
- "onUpdate:chart-type": o[1] || (o[1] = (r) => V(c) ? c.value = r : null),
263
+ "onUpdate:chart-type": o[1] || (o[1] = (i) => D(c) ? c.value = i : null),
253
264
  "with-settings-header": a.withSettingsHeader,
254
265
  header: a.header,
255
266
  subheader: a.subheader,
256
- "subheader-tooltip": a.subheaderTooltip
257
- }, null, 8, ["chart-type", "with-settings-header", "header", "subheader", "subheader-tooltip"])
267
+ "with-subheader-tooltip": a.withSubheaderTooltip
268
+ }, {
269
+ "subheader-tooltip": k(() => [
270
+ x(e.$slots, "subheader-tooltip", {}, void 0, !0)
271
+ ]),
272
+ _: 3
273
+ }, 8, ["chart-type", "with-settings-header", "header", "subheader", "with-subheader-tooltip"])
258
274
  ]),
259
- f("div", Ee, [
260
- f("canvas", {
275
+ p("div", Ve, [
276
+ p("canvas", {
261
277
  ref_key: "chartRef",
262
- ref: p,
278
+ ref: m,
263
279
  class: "chart__canvas"
264
280
  }, null, 512),
265
- f("div", {
281
+ p("div", {
266
282
  ref_key: "tooltipRef",
267
- ref: I,
283
+ ref: A,
268
284
  class: "chart__tooltip",
269
- style: J(u(Z))
285
+ style: _(u(G))
270
286
  }, [
271
- l.value ? (d(), m(ge, {
287
+ r.value ? (d(), f(Ce, {
272
288
  key: 0,
273
- title: String(l.value.title),
274
- "data-points": l.value.dataPoints,
289
+ title: String(r.value.title),
290
+ "data-points": r.value.dataPoints,
275
291
  "x-axis-format": a.xAxisFormat,
276
292
  "y-axis-format": a.yAxisFormat,
277
- "total-label": l.value.footer[0],
278
- "total-value": Number(l.value.footer[1])
293
+ "total-label": r.value.footer[0],
294
+ "total-value": Number(r.value.footer[1])
279
295
  }, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : v("", !0)
280
296
  ], 4)
281
297
  ])
282
- ]),
283
- a.hideLegend ? v("", !0) : (d(), k("section", Re, [
284
- F(Ce, {
285
- items: u(W),
298
+ ], 2),
299
+ a.hideLegend ? v("", !0) : (d(), C("section", Re, [
300
+ F(ke, {
301
+ items: u(Z),
286
302
  "visible-ids": a.visibleIds,
287
- "onUpdate:visibleIds": o[2] || (o[2] = (r) => T("update:visibleIds", r))
288
- }, null, 8, ["items", "visible-ids"])
303
+ "max-limit-tooltip-text": a.maxLimitTooltipText,
304
+ "onUpdate:visibleIds": o[2] || (o[2] = (i) => L("update:visibleIds", i))
305
+ }, null, 8, ["items", "visible-ids", "max-limit-tooltip-text"])
289
306
  ]))
290
- ], 64)) : a.loading ? (d(), m(Le, { key: 1 })) : u(S) ? (d(), m(u(xe), {
307
+ ], 64)) : a.loading ? (d(), f(we, { key: 1 })) : u(S) ? (d(), f(u(Be), {
291
308
  key: 2,
292
309
  title: a.noDataTitle,
293
310
  subtitle: a.noDataSubtitle,
@@ -298,5 +315,5 @@ const Ie = { class: "chart-container" }, we = { class: "chart-content" }, Ae = {
298
315
  }
299
316
  });
300
317
  export {
301
- Xe as default
318
+ qe as default
302
319
  };