@ironsource/shared-ui 2.1.12-rc.31 → 2.1.12-rc.32

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 (40) hide show
  1. package/DataGrid.vue_vue_type_style_index_0_scoped_36ec94a7_lang.css +1 -0
  2. package/DataGridHeader.vue_vue_type_style_index_0_scoped_840e700c_lang.css +1 -0
  3. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css +1 -0
  4. package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css +1 -0
  5. package/RadioButton.vue_vue_type_style_index_0_scoped_1da367f8_lang.css +1 -0
  6. package/TooltipHeader.vue_vue_type_style_index_0_scoped_5160f12d_lang.css +1 -0
  7. package/components/chart/TooltipHeader.vue.js +2 -2
  8. package/components/chart/TooltipHeader.vue2.js +21 -20
  9. package/components/chart/utils/utils.js +14 -13
  10. package/components/dateRange/common/DateRange.common.js +60 -60
  11. package/components/radioButton/v3/RadioButton.vue.d.ts +5 -0
  12. package/components/radioButton/v3/RadioButton.vue.js +3 -3
  13. package/components/radioButton/v3/RadioButton.vue2.js +32 -31
  14. package/components/radioButton/v3/index.d.ts +20 -1
  15. package/components/table/v4/DataGrid.vue.d.ts +4 -4
  16. package/components/table/v4/DataGrid.vue.js +3 -3
  17. package/components/table/v4/DataGrid.vue2.js +237 -245
  18. package/components/table/v4/DataGridHeader.vue.d.ts +85 -0
  19. package/components/table/v4/DataGridHeader.vue.js +7 -0
  20. package/components/table/v4/DataGridHeader.vue2.js +82 -0
  21. package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
  22. package/components/table/v4/DataGridRowsCounter.vue2.js +12 -12
  23. package/components/table/v4/MultipleDataGrid.vue.d.ts +6 -5
  24. package/components/table/v4/MultipleDataGrid.vue.js +2 -2
  25. package/components/table/v4/MultipleDataGrid.vue2.js +91 -90
  26. package/components/table/v4/index.d.ts +552 -305
  27. package/components/table/v4/index.js +7 -4
  28. package/components/table/v4/storyUtils.d.ts +8 -0
  29. package/index.d.ts +1578 -1085
  30. package/index.js +1 -1
  31. package/package.json +1 -1
  32. package/utils/date.d.ts +1 -0
  33. package/utils/date.js +9 -0
  34. package/utils/formatNumbers.d.ts +1 -1
  35. package/utils/formatNumbers.js +38 -21
  36. package/DataGrid.vue_vue_type_style_index_0_scoped_8e8df067_lang.css +0 -1
  37. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +0 -1
  38. package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_020a9896_lang.css +0 -1
  39. package/RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css +0 -1
  40. package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +0 -1
@@ -0,0 +1 @@
1
+ .sticky[data-v-36ec94a7]{position:sticky}.table-container[data-v-36ec94a7]{width:100%;position:relative;display:flex;flex-direction:column}.table-head-container[data-v-36ec94a7]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-36ec94a7]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-36ec94a7]{display:inline-table}.table-row[data-v-36ec94a7]{position:relative}.table-row.loading[data-v-36ec94a7]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-36ec94a7]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-36ec94a7]{border-bottom:none}.expanded-row[data-v-36ec94a7]{grid-column:var(--45c28f25);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-36ec94a7]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md);border-collapse:collapse;border-spacing:0}table.hasFooter[data-v-36ec94a7]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-36ec94a7],table th[data-v-36ec94a7]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-36ec94a7]:first-of-type,table th[data-v-36ec94a7]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-36ec94a7]:last-of-type,table th[data-v-36ec94a7]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-36ec94a7],table th.expand-toggle-cell[data-v-36ec94a7]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-36ec94a7]{border-bottom:none;z-index:calc(var(--760f151e) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-36ec94a7]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--b1b12644)}table>thead>tr>th[data-v-36ec94a7]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.isSortable[data-v-36ec94a7]{cursor:pointer}table>thead>tr>td[data-v-36ec94a7]{display:flex;align-items:center}table>thead>tr>th.bordered[data-v-36ec94a7],table>thead>tr>td.bordered[data-v-36ec94a7]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-36ec94a7],table>thead>tr>td.bordered.isStickyRight[data-v-36ec94a7]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-36ec94a7],table>thead>tr>td.isTextRight[data-v-36ec94a7]{justify-content:flex-end}table>thead.sticky[data-v-36ec94a7]{position:sticky;top:0;background:var(--background-default)}table>thead.isStickyHeader[data-v-36ec94a7]{z-index:calc(var(--760f151e) + 2);top:calc(var(--spacing-800) - 1px)}table .totals-row[data-v-36ec94a7]{height:40px}table .totals-row[data-v-36ec94a7]:hover{background:var(--background-paper-elevation-1)}table .totals-row>td.sticky[data-v-36ec94a7]{background-color:var(--background-default)}table>tbody[data-v-36ec94a7]{display:block}table>tbody>*>tr[data-v-36ec94a7]{background-color:var(--background-default);height:auto;display:grid;align-items:center;grid-template-columns:var(--b1b12644)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-36ec94a7]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-36ec94a7],table>tbody>*>tr.activeMenu>td[data-v-36ec94a7]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-36ec94a7]{background-color:var(--background-default);border:none;min-width:0;display:flex;height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-36ec94a7]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-36ec94a7]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-36ec94a7]{justify-content:flex-end;text-align:right}.underlined[data-v-36ec94a7]{border-bottom:.0625rem dashed var(--default-outlined-border)}.underlined[data-v-36ec94a7]:hover{cursor:help}.section-container[data-v-36ec94a7]{left:0}.sections[data-v-36ec94a7]{display:flex}.section[data-v-36ec94a7]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-36ec94a7]{width:100%}.empty-state[data-v-36ec94a7]{min-height:250px}.floating-row[data-v-36ec94a7]{display:flex;inset:0;pointer-events:none;position:absolute;z-index:calc(var(--760f151e) + 1)}.floating-row *[data-v-36ec94a7-s]{pointer-events:auto}.bg[data-v-36ec94a7]{background:var(--background-default)}
@@ -0,0 +1 @@
1
+ .table-header[data-v-840e700c]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header--standalone[data-v-840e700c]{border:1px solid var(--common-divider);border-top-right-radius:var(--border-radius-md);border-top-left-radius:var(--border-radius-md)}.table-header .table-title[data-v-840e700c]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-840e700c]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-840e700c]{width:13.75rem}.table-header.isStickyHeader[data-v-840e700c]{z-index:calc(var(--c8ef23c8) + 3);top:0}.table-header-pre-search-content[data-v-840e700c]{margin-right:var(--spacing-100);display:flex;align-items:center}.table-header-actions[data-v-840e700c]{margin-left:var(--spacing-100);display:flex;align-items:center}
@@ -0,0 +1 @@
1
+ .data-grid-rows-counter[data-v-e38c881a]{color:var(--text-secondary)}.text-strong[data-v-e38c881a]{color:var(--text-primary)}
@@ -0,0 +1 @@
1
+ .multi-table-container[data-v-3caa1d7b]{border-radius:var(--border-radius-md);border:1px solid var(--common-divider);display:flex;flex-direction:column;overflow-y:auto;width:100%}.multi-table-container .multi-table-header[data-v-3caa1d7b]{border-bottom:none;height:calc(var(--spacing-800) - 2px)}.multi-table-container .multi-table-header[data-v-3caa1d7b] .search-wrapper{width:auto}.multi-table-container[data-v-3caa1d7b] table{display:table;border:unset;border-radius:unset}.multi-table-container[data-v-3caa1d7b] thead{border-top:1px solid var(--common-divider)}.multi-table-container .tables-container[data-v-3caa1d7b] thead.sticky{top:62px}.multi-table-container .empty-state[data-v-3caa1d7b]{min-height:250px}
@@ -0,0 +1 @@
1
+ .label[data-v-1da367f8]{color:#41454d}.radio-button[data-v-1da367f8]{display:flex;align-items:flex-start}.radio-button--disabled[data-v-1da367f8]{opacity:.7;cursor:default}.radio-button--disabled .label[data-v-1da367f8]{cursor:default}.helper-text[data-v-1da367f8]{margin-left:-1.5rem;margin-top:.25rem;color:#53575b}.helper-text--error[data-v-1da367f8]{color:#da564f}.helper-text--text[data-v-1da367f8]{color:#696a6b}.wrapper[data-v-1da367f8]{display:inline-flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;background-color:transparent;outline:0;border:0;margin:0;cursor:pointer;user-select:none;vertical-align:middle;appearance:none;text-decoration:none;padding:.125rem .5rem;border-radius:50%}.label[data-v-1da367f8]{cursor:pointer;color:#53575b;flex-direction:column;display:inline-flex}.circle[data-v-1da367f8]{border-radius:50%;width:16px;transition:all .2s ease-in-out 0s;height:16px}.circle[data-v-1da367f8]:not(.circle--selected){box-shadow:#a9afb4 0 0 0 2px inset}.circle--selected[data-v-1da367f8]{background-color:#3083ff}.circle[data-v-1da367f8]:before{display:block;width:16px;height:16px;background-image:radial-gradient(rgb(255,255,255),rgb(255,255,255) 3px,transparent 28%);content:""}input[data-v-1da367f8]{cursor:inherit;position:absolute;opacity:0;width:100%;height:100%;top:0;left:0;margin:0;padding:0;z-index:1}
@@ -0,0 +1 @@
1
+ .tooltip-title-wrapper[data-v-5160f12d]{display:flex;flex-direction:column;color:var(--text-primary);margin-bottom:var(--spacing-100)}.tooltip-title-wrapper .main-title[data-v-5160f12d]{display:flex;align-items:center;gap:.25rem}.tooltip-title-wrapper .title-text[data-v-5160f12d]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tooltip-title-wrapper .title-image[data-v-5160f12d]{width:20px;height:20px;border-radius:4px}.tooltip-title-wrapper .tooltip-sub-title[data-v-5160f12d]{color:var(--text-secondary)}.tooltip-title-wrapper .platform-icon[data-v-5160f12d]{color:var(--action-active)}
@@ -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_3b15c693_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-3b15c693"]]);
3
+ // import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_5160f12d_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-5160f12d"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,12 +1,13 @@
1
- import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_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 D, withCtx as d, createTextVNode as x, toDisplayString as p } from "vue";
1
+ import "../../TooltipHeader.vue_vue_type_style_index_0_scoped_5160f12d_lang.css"; import { defineComponent as v, computed as u, openBlock as i, createElementBlock as f, createElementVNode as A, unref as t, createCommentVNode as s, createBlock as m, createVNode as D, withCtx as d, createTextVNode as x, toDisplayString as p } from "vue";
2
+ import { getUTCDate as T } from "../../utils/date.js";
2
3
  import { formatValue as r } from "./utils/utils.js";
3
4
  import y from "../typography/v4/Typography.vue.js";
4
5
  import { DateInterval as c } from "./types.js";
5
- import T from "../icon/v4/IconV4.vue.js";
6
- import k from "../icon/v4/IconFlag.vue.js";
7
- import { startOfWeek as C, endOfWeek as F, startOfMonth as I, endOfMonth as O } from "date-fns";
8
- import { LONG_DATE_FORMAT as i } from "./consts.js";
9
- const E = { class: "tooltip-title-wrapper" }, N = { class: "main-title" }, L = ["src"], P = /* @__PURE__ */ v({
6
+ import k from "../icon/v4/IconV4.vue.js";
7
+ import C from "../icon/v4/IconFlag.vue.js";
8
+ import { startOfWeek as F, endOfWeek as I, startOfMonth as O, endOfMonth as E } from "date-fns";
9
+ import { LONG_DATE_FORMAT as n } from "./consts.js";
10
+ const N = { class: "tooltip-title-wrapper" }, L = { class: "main-title" }, M = ["src"], S = /* @__PURE__ */ v({
10
11
  __name: "TooltipHeader",
11
12
  props: {
12
13
  title: { default: "" },
@@ -16,25 +17,25 @@ const E = { class: "tooltip-title-wrapper" }, N = { class: "main-title" }, L = [
16
17
  totalsChart: { type: Boolean, default: !1 }
17
18
  },
18
19
  setup(a) {
19
- const e = a, o = m(() => e.dataPoints.length ? e.dataPoints[0].dataset : null), h = m(() => e.totalsChart ? o.value?.label || e.title : e.xAxisFormat === "date" ? g(new Date(e.title)) : r(e.title, e.xAxisFormat)), g = (l) => e.xAxisDateInterval === c.WEEKLY ? `
20
- ${r(C(l), i)} -
21
- ${r(F(l), i)}
20
+ const e = a, o = u(() => e.dataPoints.length ? e.dataPoints[0].dataset : null), h = u(() => e.totalsChart ? o.value?.label || e.title : e.xAxisFormat === "date" ? g(T(e.title)) : r(e.title, e.xAxisFormat)), g = (l) => e.xAxisDateInterval === c.WEEKLY ? `
21
+ ${r(F(l), n)} -
22
+ ${r(I(l), n)}
22
23
  ` : e.xAxisDateInterval === c.MONTHLY ? `
23
- ${r(I(l), i)} -
24
- ${r(O(l), i)}
25
- ` : r(l, i);
26
- return (l, M) => (n(), f("div", E, [
27
- A("div", N, [
28
- a.totalsChart && t(o)?.image ? (n(), f("img", {
24
+ ${r(O(l), n)} -
25
+ ${r(E(l), n)}
26
+ ` : r(l, n);
27
+ return (l, V) => (i(), f("div", N, [
28
+ A("div", L, [
29
+ a.totalsChart && t(o)?.image ? (i(), f("img", {
29
30
  key: 0,
30
31
  class: "title-image",
31
32
  src: t(o)?.image
32
- }, null, 8, L)) : s("", !0),
33
- a.totalsChart && t(o)?.countryFlag ? (n(), u(t(k), {
33
+ }, null, 8, M)) : s("", !0),
34
+ a.totalsChart && t(o)?.countryFlag ? (i(), m(t(C), {
34
35
  key: 1,
35
36
  "country-code": t(o).countryFlag
36
37
  }, null, 8, ["country-code"])) : s("", !0),
37
- a.totalsChart && t(o)?.icon ? (n(), u(t(T), {
38
+ a.totalsChart && t(o)?.icon ? (i(), m(t(k), {
38
39
  key: 2,
39
40
  class: "platform-icon",
40
41
  type: t(o)?.iconType,
@@ -51,7 +52,7 @@ const E = { class: "tooltip-title-wrapper" }, N = { class: "main-title" }, L = [
51
52
  _: 1
52
53
  })
53
54
  ]),
54
- a.xAxisFormat === "date" && a.xAxisDateInterval !== t(c).WEEKLY && a.xAxisDateInterval !== t(c).MONTHLY ? (n(), u(t(y), {
55
+ a.xAxisFormat === "date" && a.xAxisDateInterval !== t(c).WEEKLY && a.xAxisDateInterval !== t(c).MONTHLY ? (i(), m(t(y), {
55
56
  key: 0,
56
57
  class: "tooltip-sub-title",
57
58
  variant: "caption"
@@ -65,5 +66,5 @@ const E = { class: "tooltip-title-wrapper" }, N = { class: "main-title" }, L = [
65
66
  }
66
67
  });
67
68
  export {
68
- P as default
69
+ S as default
69
70
  };
@@ -1,21 +1,22 @@
1
+ import { getUTCDate as n } from "../../../utils/date.js";
1
2
  import { format as e } from "date-fns";
2
- import { TICK_LABEL_FONT as p } from "../consts.js";
3
- import { nFormatter as E } from "../../../utils/formatNumbers.js";
4
- import { truncateTextToFit as a } from "../../../utils/text.js";
5
- import { REGEX_LINEBREAK as m } from "../../../consts/regex.js";
6
- const c = (r, t, n = !1) => t === "day" ? e(new Date(r), "EEEE") : t === "number" ? E(r, n) : t === "date" ? e(new Date(r), "MMM dd") : t === "dateLong" ? e(new Date(r), "MMM dd, yyyy") : String(r), w = ({
3
+ import { TICK_LABEL_FONT as E } from "../consts.js";
4
+ import { nFormatter as c } from "../../../utils/formatNumbers.js";
5
+ import { truncateTextToFit as T } from "../../../utils/text.js";
6
+ import { REGEX_LINEBREAK as i } from "../../../consts/regex.js";
7
+ const u = (r, t, o = !1) => t === "day" ? e(n(r), "EEEE") : t === "number" ? c(r, o) : t === "date" ? e(n(r), "MMM dd") : t === "dateLong" ? e(n(r), "MMM dd, yyyy") : String(r), _ = ({
7
8
  label: r,
8
9
  format: t,
9
- availableSpace: n,
10
- truncate: i = !1
10
+ availableSpace: o,
11
+ truncate: s = !1
11
12
  }) => {
12
- const s = m.test(r), o = (d) => {
13
- const f = c(d, t);
14
- return i && n > 0 ? a(f, p, n) : f;
13
+ const p = i.test(r), f = (d) => {
14
+ const m = u(d, t);
15
+ return s && o > 0 ? T(m, E, o) : m;
15
16
  };
16
- return s ? r.split(m).map(o) : o(r);
17
+ return p ? r.split(i).map(f) : f(r);
17
18
  };
18
19
  export {
19
- c as formatValue,
20
- w as prepareTickLabel
20
+ u as formatValue,
21
+ _ as prepareTickLabel
21
22
  };
@@ -3,13 +3,13 @@ import { useToggle as fe } from "../../../composables/useToggle.js";
3
3
  import { ref as r, computed as b, onMounted as de, onBeforeMount as ce, onUnmounted as ve, watch as Q } from "vue";
4
4
  import { min as me, addDays as ge, format as X } from "date-fns";
5
5
  import { presetsList as he, formatError as De, mandatoryValuesError as Me, navigatePrev as Z, navigateNext as V } from "./consts.common.js";
6
- import m from "./DateServices.common.js";
6
+ import d from "./DateServices.common.js";
7
7
  const pe = (o, y) => {
8
- const N = r(null), d = r({ started: !1, date: null }), x = r(!1), _ = 2, S = r({ from: null, to: null }), u = r({}), g = r([]), k = r(null), i = r({}), p = r({}), C = r(!1), w = r(null), s = r(null), j = r("left"), P = r(null), O = r(null), E = r([]), K = r(null), [D] = fe({ initialValue: !1 }), q = r(null);
8
+ const N = r(null), c = r({ started: !1, date: null }), x = r(!1), _ = 2, T = r({ from: null, to: null }), u = r({}), g = r([]), k = r(null), i = r({}), p = r({}), E = r(!1), w = r(null), s = r(null), j = r("left"), P = r(null), O = r(null), C = r([]), K = r(null), [D] = fe({ initialValue: !1 }), q = r(null);
9
9
  ie(q, () => {
10
10
  D.value = !1;
11
11
  });
12
- const L = (e, t) => {
12
+ const U = (e, t) => {
13
13
  const a = {
14
14
  weeks: [],
15
15
  days: {},
@@ -17,20 +17,20 @@ const pe = (o, y) => {
17
17
  year: t
18
18
  };
19
19
  let n, l;
20
- const c = new Date(t, e, 1).getDay();
21
- let v = 1;
22
- const f = /* @__PURE__ */ new Date();
20
+ const v = new Date(t, e, 1).getDay();
21
+ let m = 1;
22
+ const f = d.getCurrentTimeUTC();
23
23
  f.setHours(0, 0, 0, 0);
24
- const ue = m.daysInMonth(e, t);
24
+ const ue = d.daysInMonth(e, t);
25
25
  for (let I = 0; I < 6; I++) {
26
26
  l = [];
27
27
  for (let H = 0; H < 7; H++)
28
- n = {}, I === 0 && c > 0 && H < c && (n.value = 0), v > ue && (n.value = 0), !n.value && n.value !== 0 && (n.value = v, v += 1, a.days[n.value] = n, n.date = new Date(t, e, n.value), f < n.date ? n.isFuture = !0 : n.date.getTime() === f.getTime() && (n.isToday = !0, o.includeToday || (n.disabled = !0))), l.push(n);
28
+ n = {}, I === 0 && v > 0 && H < v && (n.value = 0), m > ue && (n.value = 0), !n.value && n.value !== 0 && (n.value = m, m += 1, a.days[n.value] = n, n.date = new Date(t, e, n.value), f < n.date ? n.isFuture = !0 : n.date.getTime() === f.getTime() && (n.isToday = !0, o.includeToday || (n.disabled = !0))), l.push(n);
29
29
  a.weeks.push(l);
30
30
  }
31
31
  return a;
32
- }, T = () => {
33
- let e = m.getCurrentTimeUTC();
32
+ }, S = () => {
33
+ let e = d.getCurrentTimeUTC();
34
34
  if (s.value && s.value.toEnd ? e = s.value.toEnd : o.range && o.range.to && (e = o.range.to), !u.value[`${e.getFullYear().toString()}_${e.getMonth().toString()}`]) {
35
35
  u.value = {}, g.value = [];
36
36
  for (let t = 0; t < _; t++) {
@@ -38,7 +38,7 @@ const pe = (o, y) => {
38
38
  a.setDate(1), a.setMonth(e.getMonth() - t);
39
39
  const n = `${a.getFullYear().toString()}_${a.getMonth().toString()}`;
40
40
  u.value[n] = {
41
- parsedMonth: L(
41
+ parsedMonth: U(
42
42
  a.getMonth(),
43
43
  a.getFullYear()
44
44
  ),
@@ -49,28 +49,28 @@ const pe = (o, y) => {
49
49
  }, z = (e, t) => {
50
50
  w.value = e;
51
51
  let a = e;
52
- e === "date" && (a = o.datePresetList), E.value = he[a], t && (s.value = {
52
+ e === "date" && (a = o.datePresetList), C.value = he[a], t && (s.value = {
53
53
  fromStart: null,
54
54
  fromEnd: null,
55
55
  toStart: null,
56
56
  toEnd: null
57
- }, S.value.from = "", S.value.to = "", d.value = { started: !1, date: null }, i.value = "custom"), y("rangeTypeChanged", w.value);
57
+ }, T.value.from = "", T.value.to = "", c.value = { started: !1, date: null }, i.value = "custom"), y("rangeTypeChanged", w.value);
58
58
  }, ee = (e) => {
59
- i.value = e.id, M(k.value[e.id].dates()), T();
59
+ i.value = e.id, M(k.value[e.id].dates()), S();
60
60
  }, M = (e, t = !1) => {
61
61
  let a = e;
62
- return !e.from && !e.to && e.preset ? a = k.value[e.preset]?.dates() : (!e || !e.from && !e.to) && (a = k.value[E.value[0]]), o.maxDaysInRange && (K.value = t ? ge(a.from, o.maxDaysInRange) : null), C.value = !1, !a.from || !a.to || !(a.from instanceof Date) || !(a.to instanceof Date) ? (O.value = De, C.value = !0, !1) : a.from > a.to ? (O.value = `"From" date can't be bigger than "To" date`, C.value = !0, !1) : (s.value = R(a), S.value.from = X(
62
+ return !e.from && !e.to && e.preset ? a = k.value[e.preset]?.dates() : (!e || !e.from && !e.to) && (a = k.value[C.value[0]]), o.maxDaysInRange && (K.value = t ? ge(a.from, o.maxDaysInRange) : null), E.value = !1, !a.from || !a.to || !(a.from instanceof Date) || !(a.to instanceof Date) ? (O.value = De, E.value = !0, !1) : a.from > a.to ? (O.value = `"From" date can't be bigger than "To" date`, E.value = !0, !1) : (s.value = R(a), T.value.from = X(
63
63
  s.value.fromStart,
64
64
  o.dateFormat
65
- ), S.value.to = X(s.value.toEnd, o.dateFormat), !0);
65
+ ), T.value.to = X(s.value.toEnd, o.dateFormat), !0);
66
66
  }, F = () => {
67
- i.value === "custom" ? P.value = m.getDateRangeString(s.value) : P.value = J.value, y("currentDateChanged", P.value);
67
+ i.value === "custom" ? P.value = d.getDateRangeString(s.value) : P.value = J.value, y("currentDateChanged", P.value);
68
68
  }, te = () => {
69
69
  if (s.value.fromStart == null || s.value.toEnd == null) {
70
- C.value = !0, O.value = Me;
70
+ E.value = !0, O.value = Me;
71
71
  return;
72
72
  }
73
- const e = m.getCurrentTimeUTC();
73
+ const e = d.getCurrentTimeUTC();
74
74
  s.value.toEnd > e && (s.value.toEnd = e), F(), p.value = i.value, y("rangeChanged", {
75
75
  from: s.value.fromStart,
76
76
  to: s.value.toEnd,
@@ -79,29 +79,29 @@ const pe = (o, y) => {
79
79
  }, ae = (e, t) => e ? Z : t ? V : null, ne = (e) => {
80
80
  let t = null, a = null;
81
81
  const n = _ - 1;
82
- let l = "", h = null, c = null;
82
+ let l = "", h = null, v = null;
83
83
  switch (e) {
84
84
  case V:
85
- Object.keys(u.value).forEach((v) => {
86
- const f = u.value[v];
85
+ Object.keys(u.value).forEach((m) => {
86
+ const f = u.value[m];
87
87
  f.order === 0 && (h = f), f.order === n ? (g.value.splice(
88
- g.value.indexOf(v),
88
+ g.value.indexOf(m),
89
89
  1
90
- ), delete u.value[v]) : f.order += 1;
90
+ ), delete u.value[m]) : f.order += 1;
91
91
  }), t = h.parsedMonth.month + 1, a = h.parsedMonth.year, t > 11 && (t = 0, a += 1), l = `${a.toString()}_${t.toString()}`, u.value[l] = {
92
- parsedMonth: L(t, a),
92
+ parsedMonth: U(t, a),
93
93
  order: 0
94
94
  }, g.value.push(l);
95
95
  break;
96
96
  case Z:
97
- Object.keys(u.value).forEach((v) => {
98
- const f = u.value[v];
99
- f.order === n && (c = f), f.order === 0 ? (g.value.splice(
100
- g.value.indexOf(v),
97
+ Object.keys(u.value).forEach((m) => {
98
+ const f = u.value[m];
99
+ f.order === n && (v = f), f.order === 0 ? (g.value.splice(
100
+ g.value.indexOf(m),
101
101
  1
102
- ), delete u.value[v]) : f.order -= 1;
103
- }), t = c.parsedMonth.month - 1, a = c.parsedMonth.year, t < 0 && (t = 11, a -= 1), l = `${a.toString()}_${t.toString()}`, u.value[l] = {
104
- parsedMonth: L(t, a),
102
+ ), delete u.value[m]) : f.order -= 1;
103
+ }), t = v.parsedMonth.month - 1, a = v.parsedMonth.year, t < 0 && (t = 11, a -= 1), l = `${a.toString()}_${t.toString()}`, u.value[l] = {
104
+ parsedMonth: U(t, a),
105
105
  order: n
106
106
  }, g.value.unshift(l);
107
107
  break;
@@ -111,10 +111,10 @@ const pe = (o, y) => {
111
111
  switch (w.value) {
112
112
  case "week":
113
113
  t = {
114
- fromStart: m.getFirstDayOfWeek(e.from),
115
- fromEnd: m.getLastDayOfWeek(e.from),
116
- toStart: m.getFirstDayOfWeek(e.to),
117
- toEnd: m.getLastDayOfWeek(e.to)
114
+ fromStart: d.getFirstDayOfWeek(e.from),
115
+ fromEnd: d.getLastDayOfWeek(e.from),
116
+ toStart: d.getFirstDayOfWeek(e.to),
117
+ toEnd: d.getLastDayOfWeek(e.to)
118
118
  };
119
119
  break;
120
120
  case "month":
@@ -124,13 +124,13 @@ const pe = (o, y) => {
124
124
  e.from.getMonth(),
125
125
  1
126
126
  ),
127
- fromEnd: m.getLastDayOfMonth(e.from),
127
+ fromEnd: d.getLastDayOfMonth(e.from),
128
128
  toStart: new Date(
129
129
  e.to.getFullYear(),
130
130
  e.to.getMonth(),
131
131
  1
132
132
  ),
133
- toEnd: m.getLastDayOfMonth(e.to)
133
+ toEnd: d.getLastDayOfMonth(e.to)
134
134
  };
135
135
  break;
136
136
  case "date":
@@ -144,10 +144,10 @@ const pe = (o, y) => {
144
144
  break;
145
145
  }
146
146
  return t;
147
- }, U = (e, t) => e.getUTCFullYear() === t.getUTCFullYear() && e.getUTCMonth() === t.getUTCMonth() && e.getUTCDate() === t.getUTCDate(), $ = (e) => {
147
+ }, L = (e, t) => e.getUTCFullYear() === t.getUTCFullYear() && e.getUTCMonth() === t.getUTCMonth() && e.getUTCDate() === t.getUTCDate(), $ = (e) => {
148
148
  let t = !1;
149
149
  if (!e.from && !e.to && e.preset) {
150
- const l = E.value.find(
150
+ const l = C.value.find(
151
151
  (h) => h.id === e.preset
152
152
  );
153
153
  i.value = l.id, t = !0;
@@ -157,15 +157,15 @@ const pe = (o, y) => {
157
157
  to: new Date(e.to)
158
158
  };
159
159
  a.from.setHours(0, 0, 0, 0), a.to.setHours(0, 0, 0, 0);
160
- const n = E.value.map((l) => l.id);
160
+ const n = C.value.map((l) => l.id);
161
161
  if (Object.keys(k.value).forEach((l) => {
162
162
  const h = k.value[l];
163
163
  if (l !== "custom" && !t && n.indexOf(l) !== -1) {
164
- const c = h.dates();
165
- c.from.setHours(0, 0, 0, 0), c.to.setHours(0, 0, 0, 0), U(c.from, a.from) && U(c.to, a.to) && (i.value = l, t = !0);
164
+ const v = h.dates();
165
+ v.from.setHours(0, 0, 0, 0), v.to.setHours(0, 0, 0, 0), L(v.from, a.from) && L(v.to, a.to) && (i.value = l, t = !0);
166
166
  }
167
167
  }), t) {
168
- const l = E.value.find(
168
+ const l = C.value.find(
169
169
  (h) => h.id === i.value
170
170
  );
171
171
  y("dateRangePresetNameChanged", l.name);
@@ -173,24 +173,24 @@ const pe = (o, y) => {
173
173
  y("dateRangePresetNameChanged", null), i.value = "custom";
174
174
  p.value = i.value;
175
175
  }, A = (e, t, a) => {
176
- if (!d.value.started)
177
- i.value = "custom", d.value.started = !0, d.value.date = new Date(a, t, e.value), M(
178
- { from: d.value.date, to: d.value.date },
176
+ if (!c.value.started)
177
+ i.value = "custom", c.value.started = !0, c.value.date = new Date(a, t, e.value), M(
178
+ { from: c.value.date, to: c.value.date },
179
179
  !0
180
180
  );
181
181
  else {
182
- const n = new Date(a, t, e.value), l = d.value.date;
183
- d.value.started = !1, d.value.date = null, n < l ? A(e, t, a) : M({ from: l, to: n });
182
+ const n = new Date(a, t, e.value), l = c.value.date;
183
+ c.value.started = !1, c.value.date = null, n < l ? A(e, t, a) : M({ from: l, to: n });
184
184
  }
185
185
  }, B = () => {
186
186
  const e = N.value.offsetLeft;
187
187
  return window.innerWidth - e > 930 ? "left" : "right";
188
188
  }, W = (e = !0) => {
189
- D.value = !D.value, D.value ? (j.value = B(), M(o.range), T(), y("opened")) : (M(o.range), T(), i.value = p.value, e && y("dismissed"));
189
+ D.value = !D.value, D.value ? (j.value = B(), M(o.range), S(), y("opened")) : (M(o.range), S(), i.value = p.value, e && y("dismissed"));
190
190
  }, G = () => {
191
191
  D.value && W();
192
192
  }, le = () => {
193
- k.value = m.getPresetsFunctions(o.includeToday), k.value.custom = {
193
+ k.value = d.getPresetsFunctions(o.includeToday), k.value.custom = {
194
194
  dates: () => o.range
195
195
  };
196
196
  }, oe = b(() => (g.value || []).reduce((e, t) => {
@@ -199,7 +199,7 @@ const pe = (o, y) => {
199
199
  ).length;
200
200
  return e && !n;
201
201
  }, !0)), Y = () => {
202
- o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), M(o.range), T(), F());
202
+ o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), M(o.range), S(), F());
203
203
  };
204
204
  de(() => {
205
205
  Y();
@@ -216,10 +216,10 @@ const pe = (o, y) => {
216
216
  e && e !== t && (x.value ? ($(e), M(e), F()) : Y());
217
217
  }
218
218
  ), Q(D, (e) => {
219
- e || (d.value.started = !1);
219
+ e || (c.value.started = !1);
220
220
  });
221
221
  const J = b(() => {
222
- const e = E.value.find(
222
+ const e = C.value.find(
223
223
  (t) => t.id === i.value
224
224
  );
225
225
  return e ? e.name : "";
@@ -233,21 +233,21 @@ const pe = (o, y) => {
233
233
  getMaxAllowedDate: se,
234
234
  selectedPresetName: J,
235
235
  selectedPreset: i,
236
- displayError: C,
236
+ displayError: E,
237
237
  rangeType: w,
238
238
  selectedRange: s,
239
239
  placement: j,
240
240
  currentDate: P,
241
241
  error: O,
242
- presets: E,
242
+ presets: C,
243
243
  isOpen: D,
244
244
  popup: q,
245
- selectionStart: d,
245
+ selectionStart: c,
246
246
  initialized: x,
247
- textDates: S,
247
+ textDates: T,
248
248
  currentMonths: u,
249
249
  displayedMonthsKeys: g,
250
- initMonths: T,
250
+ initMonths: S,
251
251
  changeType: z,
252
252
  presetChanged: ee,
253
253
  initRange: M,
@@ -256,7 +256,7 @@ const pe = (o, y) => {
256
256
  getNavigation: ae,
257
257
  navigationCallback: ne,
258
258
  getSelectedRangeByType: R,
259
- compareDates: U,
259
+ compareDates: L,
260
260
  determinePreset: $,
261
261
  selectionChanged: A,
262
262
  checkPlacement: B,
@@ -5,6 +5,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
5
5
  errorText?: string;
6
6
  modelValue?: string;
7
7
  testId?: string;
8
+ disabledButton?: boolean;
8
9
  }>, {
9
10
  label: string;
10
11
  name: string;
@@ -12,6 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
12
13
  errorText: string;
13
14
  modelValue: any;
14
15
  testId: string;
16
+ disabledButton: boolean;
15
17
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
18
  "update:modelValue": (...args: any[]) => void;
17
19
  change: (...args: any[]) => void;
@@ -22,6 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
22
24
  errorText?: string;
23
25
  modelValue?: string;
24
26
  testId?: string;
27
+ disabledButton?: boolean;
25
28
  }>, {
26
29
  label: string;
27
30
  name: string;
@@ -29,6 +32,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
29
32
  errorText: string;
30
33
  modelValue: any;
31
34
  testId: string;
35
+ disabledButton: boolean;
32
36
  }>>> & {
33
37
  onChange?: (...args: any[]) => any;
34
38
  "onUpdate:modelValue"?: (...args: any[]) => any;
@@ -39,6 +43,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
39
43
  modelValue: string;
40
44
  helperText: string;
41
45
  errorText: string;
46
+ disabledButton: boolean;
42
47
  }>, {
43
48
  default?(_: {}): any;
44
49
  }>;
@@ -1,7 +1,7 @@
1
1
  import o from "./RadioButton.vue2.js";
2
2
  /* empty css */import t from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css"; //*');
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3c6b715c"]]);
3
+ // import "../../../RadioButton.vue_vue_type_style_index_0_scoped_1da367f8_lang.css"; //*');
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1da367f8"]]);
5
5
  export {
6
- s as default
6
+ a as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import "../../../RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css"; import { defineComponent as E, openBlock as n, createElementBlock as I, normalizeClass as b, unref as e, createElementVNode as r, withDirectives as y, mergeProps as i, isRef as C, vModelRadio as N, renderSlot as g, createVNode as w, withCtx as u, createTextVNode as m, toDisplayString as f, createBlock as v, createCommentVNode as R } from "vue";
1
+ import "../../../RadioButton.vue_vue_type_style_index_0_scoped_1da367f8_lang.css"; import { defineComponent as y, openBlock as n, createElementBlock as E, normalizeClass as T, unref as t, createElementVNode as r, withDirectives as I, mergeProps as u, isRef as C, vModelRadio as N, renderSlot as g, createVNode as w, withCtx as i, createTextVNode as f, toDisplayString as m, createBlock as v, createCommentVNode as R } from "vue";
2
2
  import c from "../../typography/Text.vue.js";
3
3
  import { useRadio as z } from "../common/useRadio.js";
4
4
  import { RadioTestIdModifiers as o } from "../../../testids/index.js";
5
5
  import { useTestIdAttrs as A } from "../../../utils/testIds.js";
6
- const D = { class: "wrapper" }, L = ["value", "name", "disabled"], O = /* @__PURE__ */ E({
6
+ const D = { class: "wrapper" }, L = ["value", "name", "disabled"], O = /* @__PURE__ */ y({
7
7
  __name: "RadioButton",
8
8
  props: {
9
9
  label: { default: "" },
@@ -11,62 +11,63 @@ const D = { class: "wrapper" }, L = ["value", "name", "disabled"], O = /* @__PUR
11
11
  helperText: { default: "" },
12
12
  errorText: { default: "" },
13
13
  modelValue: { default: void 0 },
14
- testId: { default: "" }
14
+ testId: { default: "" },
15
+ disabledButton: { type: Boolean, default: !1 }
15
16
  },
16
17
  emits: ["update:modelValue", "change"],
17
- setup(t, { emit: V }) {
18
- const p = t, { radioRef: h, focus: x, disabled: T, modelValue: a, radioGroup: k } = z(
19
- p,
20
- V
21
- ), d = A(p.testId, o);
22
- return (B, l) => (n(), I("label", {
23
- class: b(["radio-button", { "radio-button--disabled": e(T) }])
18
+ setup(e, { emit: B }) {
19
+ const x = e, { radioRef: V, focus: p, disabled: b, modelValue: a, radioGroup: h } = z(
20
+ x,
21
+ B
22
+ ), d = A(x.testId, o);
23
+ return (k, l) => (n(), E("label", {
24
+ class: T(["radio-button", { "radio-button--disabled": t(b) }])
24
25
  }, [
25
26
  r("span", D, [
26
- y(r("input", i({
27
+ I(r("input", u({
27
28
  ref_key: "radioRef",
28
- ref: h,
29
+ ref: V,
29
30
  "onUpdate:modelValue": l[0] || (l[0] = (s) => C(a) ? a.value = s : null),
30
- value: t.label,
31
- name: t.name || e(k)?.name,
31
+ value: e.label,
32
+ name: e.name || t(h)?.name,
32
33
  type: "radio",
33
- disabled: e(T)
34
- }, e(d)[e(o).FIELD], {
35
- onFocus: l[1] || (l[1] = (s) => x.value = !0),
36
- onBlur: l[2] || (l[2] = (s) => x.value = !1)
34
+ disabled: t(b) || e.disabledButton
35
+ }, t(d)[t(o).FIELD], {
36
+ onFocus: l[1] || (l[1] = (s) => p.value = !0),
37
+ onBlur: l[2] || (l[2] = (s) => p.value = !1)
37
38
  }), null, 16, L), [
38
- [N, e(a)]
39
+ [N, t(a)]
39
40
  ]),
40
41
  r("span", {
41
- class: b([{ "circle--selected": e(a) === t.label }, "circle"])
42
+ class: T([{ "circle--selected": t(a) === e.label }, "circle"])
42
43
  }, null, 2)
43
44
  ]),
44
- r("span", i({ class: "label" }, e(d)[e(o).LABEL]), [
45
- g(B.$slots, "default", {}, () => [
45
+ r("span", u({ class: "label" }, t(d)[t(o).LABEL]), [
46
+ g(k.$slots, "default", {}, () => [
46
47
  w(c, { "is-truncated": "" }, {
47
- default: u(() => [
48
- m(f(t.label), 1)
48
+ default: i(() => [
49
+ f(m(e.label), 1)
49
50
  ]),
50
51
  _: 1
51
52
  })
52
53
  ], !0),
53
- !t.errorText && t.helperText ? (n(), v(c, {
54
+ !e.errorText && e.helperText ? (n(), v(c, {
54
55
  key: 0,
55
56
  class: "helper-text--text helper-text",
56
57
  size: "caption"
57
58
  }, {
58
- default: u(() => [
59
- m(f(t.helperText), 1)
59
+ default: i(() => [
60
+ f(m(e.helperText), 1)
60
61
  ]),
61
62
  _: 1
62
63
  })) : R("", !0),
63
- t.errorText ? (n(), v(c, i({
64
+ e.errorText ? (n(), v(c, u({
64
65
  key: 1,
65
66
  size: "caption",
66
67
  class: "helper-text--error helper-text"
67
- }, e(d)[e(o).ERROR_TEXT]), {
68
- default: u(() => [
69
- m(f(t.errorText), 1)
68
+ }, t(d)[t(o).ERROR_TEXT]), {
69
+ default: i(() => [
70
+ f(m(e.errorText), 1)
70
71
  ]),
71
72
  _: 1
72
73
  }, 16)) : R("", !0)