@ironsource/shared-ui 2.2.0-rc.0 → 2.2.0-rc.2

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 (30) hide show
  1. package/ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css +1 -0
  2. package/ChartTooltip.vue_vue_type_style_index_0_scoped_dc7e6298_lang.css +1 -0
  3. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_3bc0f416_lang.css +1 -0
  4. package/DropdownV4.vue_vue_type_style_index_0_scoped_445ebb01_lang.css +1 -0
  5. package/TooltipHeader.vue_vue_type_style_index_0_scoped_2177211f_lang.css +1 -0
  6. package/components/chart/ChartPlane.vue.js +3 -3
  7. package/components/chart/ChartPlane.vue2.js +4 -4
  8. package/components/chart/ChartTooltip.vue.js +2 -2
  9. package/components/chart/ChartTooltip.vue2.js +19 -16
  10. package/components/chart/TooltipHeader.vue.js +3 -3
  11. package/components/chart/TooltipHeader.vue2.js +33 -22
  12. package/components/chart/utils/utils.d.ts +5 -1
  13. package/components/chart/utils/utils.js +32 -22
  14. package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +15 -0
  15. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +3 -3
  16. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +81 -60
  17. package/components/dropdown/v4/DropdownV4.vue.d.ts +18 -0
  18. package/components/dropdown/v4/DropdownV4.vue.js +4 -4
  19. package/components/dropdown/v4/DropdownV4.vue2.js +143 -134
  20. package/components/dropdown/v4/dropdownStoryArgs.d.ts +11 -0
  21. package/components/dropdown/v4/index.d.ts +119 -2
  22. package/index.d.ts +238 -4
  23. package/package.json +1 -1
  24. package/testids/index.d.ts +2 -1
  25. package/testids/index.js +5 -5
  26. package/ChartPlane.vue_vue_type_style_index_0_scoped_a685cf5e_lang.css +0 -1
  27. package/ChartTooltip.vue_vue_type_style_index_0_scoped_9623dbbd_lang.css +0 -1
  28. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_64ae80dd_lang.css +0 -1
  29. package/DropdownV4.vue_vue_type_style_index_0_scoped_d3802d59_lang.css +0 -1
  30. package/TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css +0 -1
@@ -0,0 +1 @@
1
+ .chart-plane-container[data-v-3c887f7e]{--headerHeight: var(--4efc2842);width:100%;height:var(--60310e6c);position:relative}.header-wrapper[data-v-3c887f7e]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-3c887f7e]{padding-top:var(--headerHeight);height:100%}.chart-empty[data-v-3c887f7e]{background:var(--background-paper)}.chart[data-v-3c887f7e]{width:100%;height:100%;position:relative}.chart__canvas[data-v-3c887f7e]{width:100%;height:100%}.chart__tooltip[data-v-3c887f7e]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
@@ -0,0 +1 @@
1
+ .chart-tooltip[data-v-dc7e6298]{color:var(--text-primary);background:var(--common-white);box-shadow:0 4px 8px -2px #1018281f;border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-md);width:280px;padding:calc(var(--spacing-100) - 1px)}.color-box[data-v-dc7e6298]{min-width:12px;width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.color-box+.platform-icon[data-v-dc7e6298]{margin-left:calc(var(--spacing-50) - var(--spacing-100))}.list[data-v-dc7e6298]{list-style:none;margin:0;padding:0}.list__item[data-v-dc7e6298]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-dc7e6298]:last-child{margin-bottom:0}.platform-icon[data-v-dc7e6298]{color:var(--action-active);margin-right:var(--spacing-50)}.popover-label-wrapper[data-v-dc7e6298]{display:flex;width:120px;flex-grow:1}.truncated-label[data-v-dc7e6298]{max-width:95%}.tooltip-footer[data-v-dc7e6298]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-dc7e6298]{flex-grow:1}
@@ -0,0 +1 @@
1
+ .default-dropdown-wrapper[data-v-3bc0f416]{position:relative}.dropdown-trigger[data-v-3bc0f416]{width:100%;padding:.3125rem .4375rem;display:flex;column-gap:.25rem;max-width:100%;box-sizing:border-box;border-radius:var(--border-radius-md);border:1px solid var(--action-outlined-border);background:var(--default-main);cursor:pointer;user-select:none;position:relative}.dropdown-trigger[data-v-3bc0f416]:hover{border:1px solid var(--action-active);background:var(--action-hover)}.dropdown-trigger.small[data-v-3bc0f416]{padding:.1875rem .4375rem}.dropdown-trigger.large[data-v-3bc0f416]{padding:.5625rem .4375rem}.dropdown-trigger.disabled[data-v-3bc0f416]{border:1px solid var(--action-outlined-border, #bbb);background:var(--action-disabled-background, #f1f1f1);cursor:not-allowed}.dropdown-trigger.disabled .displayed-value[data-v-3bc0f416],.dropdown-trigger.disabled .caret-down[data-v-3bc0f416]{color:var(--text-disabled)}.dropdown-trigger.open[data-v-3bc0f416]{padding:.25rem .375rem;border:2px solid var(--primary-main)}.dropdown-trigger.open.small[data-v-3bc0f416]{padding:.125rem .375rem}.dropdown-trigger.open.large[data-v-3bc0f416]{padding:.5rem .375rem}.dropdown-trigger.state-error[data-v-3bc0f416],.dropdown-trigger.state-success[data-v-3bc0f416],.dropdown-trigger.state-warning[data-v-3bc0f416]{padding:4px 6px}.dropdown-trigger.state-error.small[data-v-3bc0f416],.dropdown-trigger.state-success.small[data-v-3bc0f416],.dropdown-trigger.state-warning.small[data-v-3bc0f416]{padding:.1875rem .4375rem}.dropdown-trigger.state-error.large[data-v-3bc0f416],.dropdown-trigger.state-success.large[data-v-3bc0f416],.dropdown-trigger.state-warning.large[data-v-3bc0f416]{padding:.5625rem .4375rem}.dropdown-trigger.state-error[data-v-3bc0f416]{border:2px solid var(--error-main)}.dropdown-trigger.state-success[data-v-3bc0f416]{border:2px solid var(--success-main)}.dropdown-trigger.state-warning[data-v-3bc0f416]{border:2px solid var(--warning-dark)}.dropdown-trigger .caret-down[data-v-3bc0f416]{color:var(--action-active)}.content[data-v-3bc0f416]{display:flex;flex:1;gap:.25rem;align-items:center;color:var(--text-primary)}.content .displayed-value[data-v-3bc0f416]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content .image[data-v-3bc0f416]{width:20px;height:20px;flex:none}.content .image img[data-v-3bc0f416]{border-radius:4px;width:100%;height:100%}.content .start-icon[data-v-3bc0f416]{display:flex;color:var(--action-active)}.content .status-dot[data-v-3bc0f416]{padding-right:.25rem}.content .status-dot>div[data-v-3bc0f416]{position:relative;top:-1px}.dropdown-field-label[data-v-3bc0f416]{color:var(--text-primary)}.dropdown-field-help-text[data-v-3bc0f416]{margin-top:4px;position:absolute}.flag[data-v-3bc0f416]{width:16px;height:16px}.flag img[data-v-3bc0f416]{width:16px;height:16px;border-radius:50%}.inline-error[data-v-3bc0f416]{cursor:pointer;color:var(--error-main);display:flex;justify-content:center;align-items:center}
@@ -0,0 +1 @@
1
+ .v-enter-active[data-v-445ebb01],.v-leave-active[data-v-445ebb01]{transition:opacity .25s ease}ol[data-v-445ebb01],ul[data-v-445ebb01],menu[data-v-445ebb01]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-445ebb01],.dropdown.full-width .button__container[data-v-445ebb01]{width:100%}.dropdown-list-wrapper[data-v-445ebb01]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-445ebb01]{padding:.5rem}.list-container--multi[data-v-445ebb01]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-445ebb01]{display:flex;gap:4px;padding-bottom:.25rem}.inline-search .inline-search-wrapper .search-container[data-v-445ebb01]{width:100%}.inline-search .list-container[data-v-445ebb01]{padding-top:0}.no-result-container[data-v-445ebb01]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-445ebb01]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-445ebb01]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-445ebb01]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.list--with-conditions[data-v-445ebb01]{min-height:0;margin-bottom:0}.image-slot[data-v-445ebb01]{margin-right:.5rem}.actions-wrapper[data-v-445ebb01]{display:flex;width:100%;padding:.5rem .5rem .5rem .125rem;padding-bottom:0;border-top:1px solid var(--common-divider);justify-content:space-between;margin-top:.25rem}.dropdown-footer[data-v-445ebb01]{display:flex;width:100%;padding:.5rem .5rem .375rem .4375rem;border-top:1px solid var(--common-divider);margin-top:.25rem}.apply-button[data-v-445ebb01]{margin-left:.5rem}
@@ -0,0 +1 @@
1
+ .tooltip-title-wrapper[data-v-2177211f]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .main-title[data-v-2177211f]{display:flex;align-items:center;gap:.25rem}.tooltip-title-wrapper .title-text[data-v-2177211f]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tooltip-title-wrapper .title-image[data-v-2177211f]{width:20px;height:20px;border-radius:4px}.tooltip-title-wrapper .tooltip-sub-title[data-v-2177211f]{color:var(--text-secondary)}.tooltip-title-wrapper .platform-icon[data-v-2177211f]{color:var(--action-active)}
@@ -1,7 +1,7 @@
1
1
  import e from "./ChartPlane.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartPlane.vue_vue_type_style_index_0_scoped_a685cf5e_lang.css"; //*');
4
- const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-a685cf5e"]]);
3
+ // import "../../ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css"; //*');
4
+ const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-3c887f7e"]]);
5
5
  export {
6
- s as default
6
+ a as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../ChartPlane.vue_vue_type_style_index_0_scoped_a685cf5e_lang.css"; import { defineComponent as ne, useCssVars as se, unref as n, computed as i, ref as E, onMounted as de, watch as v, nextTick as ce, openBlock as p, createElementBlock as S, createVNode as ue, isRef as fe, createSlots as pe, withCtx as he, renderSlot as me, createCommentVNode as L, createElementVNode as R, normalizeStyle as Te, createBlock as I, mergeProps as ve } from "vue";
1
+ import "../../ChartPlane.vue_vue_type_style_index_0_scoped_3c887f7e_lang.css"; import { defineComponent as ne, useCssVars as se, unref as n, computed as i, ref as E, onMounted as de, watch as v, nextTick as ce, openBlock as p, createElementBlock as S, createVNode as ue, isRef as fe, createSlots as pe, withCtx as he, renderSlot as me, createCommentVNode as L, createElementVNode as R, normalizeStyle as Te, createBlock as I, mergeProps as ve } from "vue";
2
2
  import { Chart as V, ArcElement as ye, LineElement as Ce, BarElement as ge, PointElement as be, LineController as xe, BarController as Ae, PieController as ke, ScatterController as Ee, CategoryScale as Se, LinearScale as Le, Filler as Re, Tooltip as Ie } from "chart.js";
3
3
  import { HoverVerticalLine as De } from "./plugins/HoverVerticalLine.js";
4
4
  import { prepareTickLabel as Be, formatValue as Oe } from "./utils/utils.js";
@@ -69,8 +69,8 @@ const rt = { class: "chart-plane-container" }, it = {
69
69
  setup(o, { emit: z }) {
70
70
  const e = o;
71
71
  se((t) => ({
72
- "6a964917": n(oe),
73
- "322ee3fc": o.height
72
+ "4efc2842": n(oe),
73
+ "60310e6c": o.height
74
74
  }));
75
75
  const W = Xe(Be);
76
76
  V.register(
@@ -272,7 +272,7 @@ const rt = { class: "chart-plane-container" }, it = {
272
272
  count: e.tickCount + 1,
273
273
  padding: 8,
274
274
  min: 0,
275
- callback: (t) => e.valuePrefix + Oe(t, e.yAxisFormat, !0) + e.valueSuffix
275
+ callback: (t) => e.valuePrefix + Oe(t, e.yAxisFormat, { formatLowDigits: !0 }) + e.valueSuffix
276
276
  },
277
277
  // grid lines
278
278
  grid: {
@@ -1,7 +1,7 @@
1
1
  import o from "./ChartTooltip.vue2.js";
2
2
  /* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_9623dbbd_lang.css"; //*');
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9623dbbd"]]);
3
+ // import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_dc7e6298_lang.css"; //*');
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dc7e6298"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,15 +1,15 @@
1
- import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_9623dbbd_lang.css"; import { defineComponent as v, openBlock as l, createElementBlock as o, mergeProps as h, unref as e, createBlock as f, createCommentVNode as r, Fragment as b, renderList as C, createElementVNode as c, normalizeStyle as k, createVNode as i, withCtx as s, createTextVNode as u, toDisplayString as n } from "vue";
1
+ import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_dc7e6298_lang.css"; import { defineComponent as v, openBlock as l, createElementBlock as o, mergeProps as h, unref as e, createBlock as f, createCommentVNode as r, Fragment as b, renderList as g, createElementVNode as c, normalizeStyle as C, createVNode as i, withCtx as s, createTextVNode as u, toDisplayString as n } from "vue";
2
2
  import d from "../typography/v4/Typography.vue.js";
3
- import A from "../icon/v4/IconV4.vue.js";
3
+ import k from "../icon/v4/IconV4.vue.js";
4
4
  import "../icon/v4/IconFlag.vue.js";
5
5
  import { formatValue as m } from "./utils/utils.js";
6
- import I from "./TooltipHeader.vue.js";
7
- import { useTestIdAttrs as T } from "../../utils/testIds.js";
6
+ import A from "./TooltipHeader.vue.js";
7
+ import { useTestIdAttrs as I } from "../../utils/testIds.js";
8
8
  import { ChartTooltipTestIdModifiers as x } from "../../testids/index.js";
9
- const g = {
9
+ const T = {
10
10
  key: 1,
11
11
  class: "list"
12
- }, p = { class: "popover-label-wrapper" }, V = {
12
+ }, p = { class: "popover-label-wrapper" }, S = {
13
13
  key: 2,
14
14
  class: "tooltip-footer"
15
15
  }, O = /* @__PURE__ */ v({
@@ -28,9 +28,9 @@ const g = {
28
28
  testId: { default: "" }
29
29
  },
30
30
  setup(t) {
31
- const y = T(t.testId, x);
32
- return (N, S) => (l(), o("div", h({ class: "chart-tooltip" }, e(y)[e(x).CONTAINER]), [
33
- t.title ? (l(), f(I, {
31
+ const y = I(t.testId, x);
32
+ return (w, F) => (l(), o("div", h({ class: "chart-tooltip" }, e(y)[e(x).CONTAINER]), [
33
+ t.title ? (l(), f(A, {
34
34
  key: 0,
35
35
  title: t.title,
36
36
  "data-points": t.dataPoints,
@@ -38,18 +38,18 @@ const g = {
38
38
  "x-axis-format": t.xAxisFormat,
39
39
  "x-axis-date-interval": t.xAxisDateInterval
40
40
  }, null, 8, ["title", "data-points", "totals-chart", "x-axis-format", "x-axis-date-interval"])) : r("", !0),
41
- t.totalsChart ? r("", !0) : (l(), o("ul", g, [
42
- (l(!0), o(b, null, C(t.dataPoints, (a) => (l(), o("li", {
41
+ t.totalsChart ? r("", !0) : (l(), o("ul", T, [
42
+ (l(!0), o(b, null, g(t.dataPoints, (a) => (l(), o("li", {
43
43
  key: a.datasetIndex,
44
44
  class: "list__item"
45
45
  }, [
46
46
  c("span", {
47
47
  class: "color-box",
48
- style: k({
48
+ style: C({
49
49
  backgroundColor: String(a.dataset.pointBackgroundColor)
50
50
  })
51
51
  }, null, 4),
52
- a.dataset.icon ? (l(), f(e(A), {
52
+ a.dataset.icon ? (l(), f(e(k), {
53
53
  key: 0,
54
54
  class: "platform-icon",
55
55
  type: a.dataset.iconType,
@@ -70,13 +70,16 @@ const g = {
70
70
  ]),
71
71
  i(e(d), { variant: "body2" }, {
72
72
  default: s(() => [
73
- u(n(t.valuePrefix + e(m)(a.parsed.y, t.yAxisFormat, !0, !1) + t.valueSuffix), 1)
73
+ u(n(t.valuePrefix + e(m)(a.parsed.y, t.yAxisFormat, {
74
+ formatLowDigits: !0,
75
+ withSuffixSpace: !1
76
+ }) + t.valueSuffix), 1)
74
77
  ]),
75
78
  _: 2
76
79
  }, 1024)
77
80
  ]))), 128))
78
81
  ])),
79
- t.totalValue !== null ? (l(), o("div", V, [
82
+ t.totalValue !== null ? (l(), o("div", S, [
80
83
  i(e(d), {
81
84
  variant: "body2",
82
85
  class: "flex-grow"
@@ -88,7 +91,7 @@ const g = {
88
91
  }),
89
92
  i(e(d), { variant: "body2" }, {
90
93
  default: s(() => [
91
- u(n(t.valuePrefix + e(m)(t.totalValue, t.yAxisFormat, !0) + t.valueSuffix), 1)
94
+ u(n(t.valuePrefix + e(m)(t.totalValue, t.yAxisFormat, { formatLowDigits: !0 }) + t.valueSuffix), 1)
92
95
  ]),
93
96
  _: 1
94
97
  })
@@ -1,7 +1,7 @@
1
1
  import o from "./TooltipHeader.vue2.js";
2
2
  /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-da3532aa"]]);
3
+ // import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_2177211f_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2177211f"]]);
5
5
  export {
6
- p as default
6
+ s as default
7
7
  };
@@ -1,12 +1,13 @@
1
- import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css"; import { defineComponent as v, computed as m, openBlock as n, createElementBlock as f, createElementVNode as A, unref as t, createCommentVNode as s, createBlock as u, createVNode as T, withCtx as d, createTextVNode as x, toDisplayString as p } from "vue";
1
+ import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_2177211f_lang.css"; import { defineComponent as g, computed as f, openBlock as i, createElementBlock as d, createElementVNode as v, unref as t, createCommentVNode as s, createBlock as u, createVNode as A, withCtx as x, createTextVNode as p, toDisplayString as h } from "vue";
2
2
  import { formatValue as o } from "./utils/utils.js";
3
3
  import y from "../typography/v4/Typography.vue.js";
4
4
  import { DateInterval as c } from "./types.js";
5
5
  import k from "../icon/v4/IconV4.vue.js";
6
6
  import O from "../icon/v4/IconFlag.vue.js";
7
- import { startOfWeek as C, startOfDay as h, endOfWeek as F, startOfMonth as I, endOfMonth as E } from "date-fns";
8
- import { LONG_DATE_FORMAT as i } from "./consts.js";
9
- const N = { class: "tooltip-title-wrapper" }, L = { class: "main-title" }, M = ["src"], K = /* @__PURE__ */ v({
7
+ import { startOfWeek as F, startOfDay as T, endOfWeek as I, startOfMonth as w, endOfMonth as E } from "date-fns";
8
+ import { LONG_DATE_FORMAT as n } from "./consts.js";
9
+ import { getUTCDate as m } from "../../utils/date.js";
10
+ const N = { class: "tooltip-title-wrapper" }, L = { class: "main-title" }, M = ["src"], S = /* @__PURE__ */ g({
10
11
  __name: "TooltipHeader",
11
12
  props: {
12
13
  title: { default: "" },
@@ -16,48 +17,58 @@ const N = { class: "tooltip-title-wrapper" }, L = { class: "main-title" }, M = [
16
17
  totalsChart: { type: Boolean, default: !1 }
17
18
  },
18
19
  setup(a) {
19
- const e = a, r = m(() => e.dataPoints.length ? e.dataPoints[0].dataset : null), D = m(() => e.totalsChart ? r.value?.label || e.title : e.xAxisFormat === "date" ? g(new Date(e.title)) : o(e.title, e.xAxisFormat)), g = (l) => e.xAxisDateInterval === c.WEEKLY ? `
20
- ${o(C(l), i)} -
21
- ${o(h(F(l)), i)}
20
+ const e = a, r = f(() => e.dataPoints.length ? e.dataPoints[0].dataset : null), C = f(() => e.totalsChart ? r.value?.label || e.title : e.xAxisFormat === "date" ? D(new Date(e.title)) : o(e.title, e.xAxisFormat)), D = (l) => e.xAxisDateInterval === c.WEEKLY ? `
21
+ ${o(F(m(l)), n, {
22
+ withUTC: !1
23
+ })} -
24
+ ${o(T(I(m(l))), n, {
25
+ withUTC: !1
26
+ })}
22
27
  ` : e.xAxisDateInterval === c.MONTHLY ? `
23
- ${o(I(l), i)} -
24
- ${o(h(E(l)), i)}
25
- ` : o(l, i);
26
- return (l, V) => (n(), f("div", N, [
27
- A("div", L, [
28
- a.totalsChart && t(r)?.image ? (n(), f("img", {
28
+ ${o(w(m(l)), n, {
29
+ withUTC: !1
30
+ })} -
31
+ ${o(
32
+ T(E(m(l))),
33
+ n,
34
+ { withUTC: !1 }
35
+ )}
36
+ ` : o(l, n);
37
+ return (l, U) => (i(), d("div", N, [
38
+ v("div", L, [
39
+ a.totalsChart && t(r)?.image ? (i(), d("img", {
29
40
  key: 0,
30
41
  class: "title-image",
31
42
  src: t(r)?.image
32
43
  }, null, 8, M)) : s("", !0),
33
- a.totalsChart && t(r)?.countryFlag ? (n(), u(t(O), {
44
+ a.totalsChart && t(r)?.countryFlag ? (i(), u(t(O), {
34
45
  key: 1,
35
46
  "country-code": t(r).countryFlag
36
47
  }, null, 8, ["country-code"])) : s("", !0),
37
- a.totalsChart && t(r)?.icon ? (n(), u(t(k), {
48
+ a.totalsChart && t(r)?.icon ? (i(), u(t(k), {
38
49
  key: 2,
39
50
  class: "platform-icon",
40
51
  type: t(r)?.iconType,
41
52
  name: t(r)?.icon,
42
53
  size: "16px"
43
54
  }, null, 8, ["type", "name"])) : s("", !0),
44
- T(t(y), {
55
+ A(t(y), {
45
56
  class: "title-text",
46
57
  variant: "subtitle2"
47
58
  }, {
48
- default: d(() => [
49
- x(p(t(D)), 1)
59
+ default: x(() => [
60
+ p(h(t(C)), 1)
50
61
  ]),
51
62
  _: 1
52
63
  })
53
64
  ]),
54
- a.xAxisFormat === "date" && a.xAxisDateInterval !== t(c).WEEKLY && a.xAxisDateInterval !== t(c).MONTHLY ? (n(), u(t(y), {
65
+ a.xAxisFormat === "date" && a.xAxisDateInterval !== t(c).WEEKLY && a.xAxisDateInterval !== t(c).MONTHLY ? (i(), u(t(y), {
55
66
  key: 0,
56
67
  class: "tooltip-sub-title",
57
68
  variant: "caption"
58
69
  }, {
59
- default: d(() => [
60
- x(p(t(o)(a.title, "day")), 1)
70
+ default: x(() => [
71
+ p(h(t(o)(a.title, "day")), 1)
61
72
  ]),
62
73
  _: 1
63
74
  })) : s("", !0)
@@ -65,5 +76,5 @@ const N = { class: "tooltip-title-wrapper" }, L = { class: "main-title" }, M = [
65
76
  }
66
77
  });
67
78
  export {
68
- K as default
79
+ S as default
69
80
  };
@@ -1,3 +1,7 @@
1
1
  import { PrepareTicksLabelArgs, ValueFormat } from '@/components/chart/types';
2
- export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat, formatLowDigits?: boolean, withSuffixSpace?: boolean) => string;
2
+ export declare const formatValue: (value: number | string | Date, valueFormat: ValueFormat, options?: {
3
+ formatLowDigits?: boolean;
4
+ withSuffixSpace?: boolean;
5
+ withUTC?: boolean;
6
+ }) => string;
3
7
  export declare const prepareTickLabel: ({ label, format, availableSpace, truncate, }: PrepareTicksLabelArgs) => string | string[];
@@ -1,27 +1,37 @@
1
- import { getUTCDate as e } from "../../../utils/date.js";
2
- import { format as f } from "date-fns";
3
- import { TICK_LABEL_FONT as d } from "../consts.js";
4
- import { nFormatter as L, DEFAULT_FALLBACK as T } from "../../../utils/formatNumbers.js";
5
- import { truncateTextToFit as c } from "../../../utils/text.js";
6
- import { REGEX_LINEBREAK as s } from "../../../consts/regex.js";
7
- const u = (r, t, o = !1, n = !0) => t === "day" ? f(e(r), "EEEE") : t === "number" ? L(
8
- r,
9
- o,
10
- T,
11
- n
12
- ) : t === "date" ? f(e(r), "MMM dd") : t === "dateLong" ? f(e(r), "MMM dd, yyyy") : String(r), B = ({
13
- label: r,
14
- format: t,
15
- availableSpace: o,
16
- truncate: n = !1
1
+ import { getUTCDate as f } from "../../../utils/date.js";
2
+ import { format as m } from "date-fns";
3
+ import { TICK_LABEL_FONT as c } from "../consts.js";
4
+ import { nFormatter as E, DEFAULT_FALLBACK as T } from "../../../utils/formatNumbers.js";
5
+ import { truncateTextToFit as a } from "../../../utils/text.js";
6
+ import { REGEX_LINEBREAK as p } from "../../../consts/regex.js";
7
+ const d = (t, r, e = {
8
+ formatLowDigits: !1,
9
+ withSuffixSpace: !0,
10
+ withUTC: !0
17
11
  }) => {
18
- const p = s.test(r), m = (E) => {
19
- const i = u(E, t);
20
- return n && o > 0 ? c(i, d, o) : i;
12
+ const { formatLowDigits: i, withSuffixSpace: n, withUTC: o } = e;
13
+ return r === "day" ? m(o ? f(t) : new Date(t), "EEEE") : r === "number" ? E(
14
+ t,
15
+ i,
16
+ T,
17
+ n
18
+ ) : r === "date" ? m(o ? f(t) : new Date(t), "MMM dd") : r === "dateLong" ? m(
19
+ o ? f(t) : new Date(t),
20
+ "MMM dd, yyyy"
21
+ ) : String(t);
22
+ }, h = ({
23
+ label: t,
24
+ format: r,
25
+ availableSpace: e,
26
+ truncate: i = !1
27
+ }) => {
28
+ const n = p.test(t), o = (L) => {
29
+ const s = d(L, r);
30
+ return i && e > 0 ? a(s, c, e) : s;
21
31
  };
22
- return p ? r.split(s).map(m) : m(r);
32
+ return n ? t.split(p).map(o) : o(t);
23
33
  };
24
34
  export {
25
- u as formatValue,
26
- B as prepareTickLabel
35
+ d as formatValue,
36
+ h as prepareTickLabel
27
37
  };
@@ -26,6 +26,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
26
26
  allSelected?: boolean;
27
27
  optionFlagKey?: string;
28
28
  statusDotType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
29
+ inlineError?: boolean;
30
+ inlineErrorText?: string;
31
+ inlineErrorTextPlacement?: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
29
32
  }>, {
30
33
  placeholder: string;
31
34
  selectedOption: any;
@@ -53,6 +56,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
53
56
  allSelected: boolean;
54
57
  optionFlagKey: any;
55
58
  statusDotType: any;
59
+ inlineError: boolean;
60
+ inlineErrorText: string;
61
+ inlineErrorTextPlacement: string;
56
62
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
57
63
  click: () => void;
58
64
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -83,6 +89,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
83
89
  allSelected?: boolean;
84
90
  optionFlagKey?: string;
85
91
  statusDotType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
92
+ inlineError?: boolean;
93
+ inlineErrorText?: string;
94
+ inlineErrorTextPlacement?: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
86
95
  }>, {
87
96
  placeholder: string;
88
97
  selectedOption: any;
@@ -110,6 +119,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
110
119
  allSelected: boolean;
111
120
  optionFlagKey: any;
112
121
  statusDotType: any;
122
+ inlineError: boolean;
123
+ inlineErrorText: string;
124
+ inlineErrorTextPlacement: string;
113
125
  }>>> & {
114
126
  onClick?: () => any;
115
127
  }, {
@@ -125,6 +137,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
125
137
  hoverHelpText: string;
126
138
  hoverHelpTextPlacement: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
127
139
  placeholder: string;
140
+ inlineError: boolean;
141
+ inlineErrorText: string;
142
+ inlineErrorTextPlacement: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
128
143
  feedbackText: string;
129
144
  feedbackVariant: "success" | "warning" | "error";
130
145
  multi: boolean;
@@ -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_64ae80dd_lang.css"; //*');
4
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-64ae80dd"]]);
3
+ // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_3bc0f416_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-3bc0f416"]]);
5
5
  export {
6
- d as default
6
+ p as default
7
7
  };
@@ -1,24 +1,28 @@
1
- import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_64ae80dd_lang.css"; import { defineComponent as I, computed as u, openBlock as a, createElementBlock as d, createBlock as m, createCommentVNode as n, createElementVNode as c, mergeProps as h, unref as l, renderSlot as i, createVNode as r, withCtx as O, createTextVNode as B, toDisplayString as $ } from "vue";
1
+ import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_3bc0f416_lang.css"; import { defineComponent as I, computed as f, openBlock as o, createElementBlock as d, createBlock as T, createCommentVNode as n, createElementVNode as p, mergeProps as y, unref as l, renderSlot as r, createVNode as s, withCtx as g, createTextVNode as x, toDisplayString as B } from "vue";
2
2
  import w from "../../typography/v4/Typography.vue.js";
3
- import { DropdownTestIdModifiers as f } from "../../../testids/index.js";
4
- import g from "../../icon/v4/IconV4.vue.js";
5
- import K from "../../icon/v4/IconFlag.vue.js";
6
- import V from "../../shared/FieldLabel.vue.js";
7
- import { useTestIdAttrs as A } from "../../../utils/testIds.js";
8
- import D from "../../statusDot/StatusDot.vue.js";
9
- const N = { class: "default-dropdown-wrapper" }, S = { class: "content" }, x = {
3
+ import { DropdownTestIdModifiers as c } from "../../../testids/index.js";
4
+ import m from "../../icon/v4/IconV4.vue.js";
5
+ import $ from "../../icon/v4/IconFlag.vue.js";
6
+ import K from "../../shared/FieldLabel.vue.js";
7
+ import { useTestIdAttrs as V } from "../../../utils/testIds.js";
8
+ import A from "../../statusDot/StatusDot.vue.js";
9
+ import E from "../../tooltip/v4/TooltipV4.vue.js";
10
+ const D = { class: "default-dropdown-wrapper" }, N = { class: "content" }, S = {
10
11
  key: 0,
11
12
  class: "image"
12
- }, C = ["src"], F = {
13
+ }, P = ["src"], C = {
13
14
  key: 1,
14
15
  class: "flag"
15
- }, P = {
16
+ }, F = {
16
17
  key: 2,
17
18
  class: "start-icon"
18
19
  }, z = {
19
20
  key: 3,
20
21
  class: "status-dot"
21
- }, E = { key: 0 }, H = { class: "caret-down" }, Q = /* @__PURE__ */ I({
22
+ }, H = {
23
+ key: 0,
24
+ class: "inline-error"
25
+ }, L = { key: 1 }, R = { class: "caret-down" }, Z = /* @__PURE__ */ I({
22
26
  __name: "DefaultDropdownTrigger",
23
27
  props: {
24
28
  placeholder: { default: "Select" },
@@ -47,81 +51,98 @@ const N = { class: "default-dropdown-wrapper" }, S = { class: "content" }, x = {
47
51
  showAllSelectedText: { type: Boolean, default: !0 },
48
52
  allSelected: { type: Boolean, default: !1 },
49
53
  optionFlagKey: { default: null },
50
- statusDotType: { default: null }
54
+ statusDotType: { default: null },
55
+ inlineError: { type: Boolean, default: !1 },
56
+ inlineErrorText: { default: "" },
57
+ inlineErrorTextPlacement: { default: "top" }
51
58
  },
52
59
  emits: ["click"],
53
- setup(t, { emit: T }) {
54
- const e = t, v = u(
55
- () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
60
+ setup(e, { emit: v }) {
61
+ const t = e, k = f(
62
+ () => t.feedbackVariant ? `state-${t.feedbackVariant}` : ""
56
63
  ), b = () => {
57
- T("click");
58
- }, p = A(e.testId, f), k = u(() => e.multi ? !Array.isArray(e.selectedOption) || !e.selectedOption?.length ? e.placeholder : e.showAllSelectedText && e.allSelected ? `All selected (${e.selectedOption.length})` : e.selectedOption?.length === 1 && e.displayValue ? e.displayValue(e.selectedOption[0]) : `${e.selectedOption.length} selected` : e.selectedOption ? e.displayValue(e.selectedOption) : e.placeholder), s = u(() => {
59
- if (!e.selectedOption)
64
+ v("click");
65
+ }, u = V(t.testId, c), O = f(() => t.multi ? !Array.isArray(t.selectedOption) || !t.selectedOption?.length ? t.placeholder : t.showAllSelectedText && t.allSelected ? `All selected (${t.selectedOption.length})` : t.selectedOption?.length === 1 && t.displayValue ? t.displayValue(t.selectedOption[0]) : `${t.selectedOption.length} selected` : t.selectedOption ? t.displayValue(t.selectedOption) : t.placeholder), i = f(() => {
66
+ if (!t.selectedOption)
60
67
  return null;
61
- if (!e.multi)
62
- return e.selectedOption;
63
- if (Array.isArray(e.selectedOption))
64
- return e.selectedOption.length === 1 ? e.selectedOption[0] : null;
68
+ if (!t.multi)
69
+ return t.selectedOption;
70
+ if (Array.isArray(t.selectedOption))
71
+ return t.selectedOption.length === 1 ? t.selectedOption[0] : null;
65
72
  });
66
- return (o, y) => (a(), d("div", N, [
67
- t.label ? (a(), m(V, {
73
+ return (a, h) => (o(), d("div", D, [
74
+ e.label ? (o(), T(K, {
68
75
  key: 0,
69
- label: t.label,
70
- mandatory: t.mandatory,
71
- "hover-help-text": t.hoverHelpText,
72
- "hover-help-text-placement": t.hoverHelpTextPlacement,
73
- disabled: t.disabled,
74
- "test-id": t.testId,
76
+ label: e.label,
77
+ mandatory: e.mandatory,
78
+ "hover-help-text": e.hoverHelpText,
79
+ "hover-help-text-placement": e.hoverHelpTextPlacement,
80
+ disabled: e.disabled,
81
+ "test-id": e.testId,
75
82
  class: "dropdown-field-label"
76
83
  }, null, 8, ["label", "mandatory", "hover-help-text", "hover-help-text-placement", "disabled", "test-id"])) : n("", !0),
77
- c("div", h({
78
- class: ["dropdown-trigger", [t.size, l(v), { open: t.open, disabled: t.disabled }]]
79
- }, l(p)[l(f).BUTTON_WRAPPER], {
80
- onClick: y[0] || (y[0] = (R) => b())
84
+ p("div", y({
85
+ class: ["dropdown-trigger", [e.size, l(k), { open: e.open, disabled: e.disabled }]]
86
+ }, l(u)[l(c).BUTTON_WRAPPER], {
87
+ onClick: h[0] || (h[0] = (U) => b())
81
88
  }), [
82
- c("div", S, [
83
- o.$slots.image || l(s) && t.optionImageKey ? (a(), d("div", x, [
84
- i(o.$slots, "image", {}, () => [
85
- t.optionImageKey ? (a(), d("img", {
89
+ p("div", N, [
90
+ a.$slots.image || l(i) && e.optionImageKey ? (o(), d("div", S, [
91
+ r(a.$slots, "image", {}, () => [
92
+ e.optionImageKey ? (o(), d("img", {
86
93
  key: 0,
87
- src: l(s)[t.optionImageKey]
88
- }, null, 8, C)) : n("", !0)
94
+ src: l(i)[e.optionImageKey]
95
+ }, null, 8, P)) : n("", !0)
89
96
  ], !0)
90
97
  ])) : n("", !0),
91
- o.$slots.flag || l(s) && t.optionFlagKey ? (a(), d("div", F, [
92
- i(o.$slots, "flag", {}, () => [
93
- t.optionFlagKey ? (a(), m(l(K), {
98
+ a.$slots.flag || l(i) && e.optionFlagKey ? (o(), d("div", C, [
99
+ r(a.$slots, "flag", {}, () => [
100
+ e.optionFlagKey ? (o(), T(l($), {
94
101
  key: 0,
95
- "country-code": l(s)[t.optionFlagKey]
102
+ "country-code": l(i)[e.optionFlagKey]
96
103
  }, null, 8, ["country-code"])) : n("", !0)
97
104
  ], !0)
98
105
  ])) : n("", !0),
99
- o.$slots["icon-start"] || l(s) && t.optionIconKey ? (a(), d("div", P, [
100
- i(o.$slots, "icon-start", {}, () => [
101
- r(l(g), {
102
- type: t.optionIconType,
103
- name: l(s)[t.optionIconKey],
106
+ a.$slots["icon-start"] || l(i) && e.optionIconKey ? (o(), d("div", F, [
107
+ r(a.$slots, "icon-start", {}, () => [
108
+ s(l(m), {
109
+ type: e.optionIconType,
110
+ name: l(i)[e.optionIconKey],
104
111
  size: "20px"
105
112
  }, null, 8, ["type", "name"])
106
113
  ], !0)
107
114
  ])) : n("", !0),
108
- t.statusDotType ? (a(), d("div", z, [
109
- r(l(D), { type: t.statusDotType }, null, 8, ["type"])
115
+ e.statusDotType ? (o(), d("div", z, [
116
+ s(l(A), { type: e.statusDotType }, null, 8, ["type"])
110
117
  ])) : n("", !0),
111
- i(o.$slots, "displayed-value", {}, () => [
112
- r(l(w), h({ variant: "body1" }, l(p)[l(f).BUTTON_CONTENT], { class: "displayed-value" }), {
113
- default: O(() => [
114
- B($(l(k)), 1)
118
+ r(a.$slots, "displayed-value", {}, () => [
119
+ s(l(w), y({ variant: "body1" }, l(u)[l(c).BUTTON_CONTENT], { class: "displayed-value" }), {
120
+ default: g(() => [
121
+ x(B(l(O)), 1)
115
122
  ]),
116
123
  _: 1
117
124
  }, 16)
118
125
  ], !0)
119
126
  ]),
120
- o.$slots["end-icon"] ? (a(), d("div", E, [
121
- i(o.$slots, "end-icon", {}, void 0, !0)
127
+ e.inlineError && e.inlineErrorText ? (o(), d("div", H, [
128
+ s(l(E), y({
129
+ text: e.inlineErrorText,
130
+ placement: e.inlineErrorTextPlacement
131
+ }, l(u)[l(c).TOOLTIP]), {
132
+ default: g(() => [
133
+ s(l(m), {
134
+ name: "warning-circle",
135
+ size: "16px"
136
+ })
137
+ ]),
138
+ _: 1
139
+ }, 16, ["text", "placement"])
140
+ ])) : n("", !0),
141
+ a.$slots["end-icon"] ? (o(), d("div", L, [
142
+ r(a.$slots, "end-icon", {}, void 0, !0)
122
143
  ])) : n("", !0),
123
- c("div", H, [
124
- r(l(g), {
144
+ p("div", R, [
145
+ s(l(m), {
125
146
  name: "caret-down",
126
147
  size: "20px"
127
148
  })
@@ -131,5 +152,5 @@ const N = { class: "default-dropdown-wrapper" }, S = { class: "content" }, x = {
131
152
  }
132
153
  });
133
154
  export {
134
- Q as default
155
+ Z as default
135
156
  };