@ck-ui/component-library 0.3.0 → 1.0.0

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 (122) hide show
  1. package/dist/DropdownFooter-CYkg2g5d.js +89 -0
  2. package/dist/{OptionList-BNaH2PnX.js → OptionList-DN1xZbnV.js} +29 -29
  3. package/dist/assets/DropdownFooter-DjdPf69A.css +1 -0
  4. package/dist/assets/index-B81zpOpq.css +1 -0
  5. package/dist/assets/index-BoQKDmZt.css +1 -0
  6. package/dist/assets/index-Cdmws__2.css +1 -0
  7. package/dist/assets/index-CtR-jzNi.css +1 -0
  8. package/dist/assets/index-PKpDB4Cl.css +1 -0
  9. package/dist/assets/index-i-aBFBOq.css +1 -0
  10. package/dist/assets/{styles-CbbBUzsN.css → styles-Bqfs9eXV.css} +1 -1
  11. package/dist/assets/styles-CYxKrBqL.css +1 -0
  12. package/dist/assets/styles-CZCmGNUn.css +1 -0
  13. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  14. package/dist/components/Breadcrumb/index.js +53 -47
  15. package/dist/components/CKCheckbox/index.d.ts.map +1 -1
  16. package/dist/components/CKCheckbox/index.js +22 -21
  17. package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts +3 -1
  18. package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts.map +1 -1
  19. package/dist/components/CostComparatorTable/_helpers/CostCell.js +30 -28
  20. package/dist/components/CostComparatorTable/_helpers/HeaderCheckbox.js +1 -1
  21. package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts +7 -0
  22. package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts.map +1 -1
  23. package/dist/components/CostComparatorTable/index.d.ts +1 -1
  24. package/dist/components/CostComparatorTable/index.d.ts.map +1 -1
  25. package/dist/components/CostComparatorTable/index.js +93 -85
  26. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  27. package/dist/components/DateRangePicker/DateRangePicker.js +1685 -1651
  28. package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +10 -0
  29. package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
  30. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  31. package/dist/components/FusionChart/_config/builders.js +141 -141
  32. package/dist/components/FusionChart/_config/helpers.js +2 -2
  33. package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
  34. package/dist/components/FusionChart/_helpers/doughnutHelper.js +56 -43
  35. package/dist/components/FusionChart/index.d.ts.map +1 -1
  36. package/dist/components/FusionChart/index.js +356 -340
  37. package/dist/components/Loader/_types/loader.types.d.ts +10 -0
  38. package/dist/components/Loader/_types/loader.types.d.ts.map +1 -0
  39. package/dist/components/Loader/_types/loader.types.js +1 -0
  40. package/dist/components/Loader/index.d.ts +6 -0
  41. package/dist/components/Loader/index.d.ts.map +1 -0
  42. package/dist/components/Loader/index.js +37 -0
  43. package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts +27 -0
  44. package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts.map +1 -0
  45. package/dist/components/MAVDropdown/_types/mavDropdown.types.js +1 -0
  46. package/dist/components/MAVDropdown/index.d.ts +6 -0
  47. package/dist/components/MAVDropdown/index.d.ts.map +1 -0
  48. package/dist/components/MAVDropdown/index.js +162 -0
  49. package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +33 -33
  50. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +22 -0
  51. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -0
  52. package/dist/components/MultiSelect/SimpleMultiSelect.js +221 -0
  53. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  54. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  55. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
  56. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  57. package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
  58. package/dist/components/MultiSelect/_helpers/TagContent.d.ts.map +1 -1
  59. package/dist/components/MultiSelect/_helpers/TagContent.js +20 -19
  60. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
  61. package/dist/components/MultiSelect/_helpers/TriggerButton.js +39 -34
  62. package/dist/components/MultiSelect/_types/type.d.ts +3 -0
  63. package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
  64. package/dist/components/MultiSelect/index.d.ts +1 -1
  65. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  66. package/dist/components/MultiSelect/index.js +133 -131
  67. package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts +28 -0
  68. package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts.map +1 -0
  69. package/dist/components/ProfileDropdown/_types/profileDropdown.types.js +13 -0
  70. package/dist/components/ProfileDropdown/constants.d.ts +3 -0
  71. package/dist/components/ProfileDropdown/constants.d.ts.map +1 -0
  72. package/dist/components/ProfileDropdown/constants.js +8 -0
  73. package/dist/components/ProfileDropdown/index.d.ts +6 -0
  74. package/dist/components/ProfileDropdown/index.d.ts.map +1 -0
  75. package/dist/components/ProfileDropdown/index.js +154 -0
  76. package/dist/components/Search/index.js +35 -35
  77. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts +2 -1
  78. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts.map +1 -1
  79. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +7 -3
  80. package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts +2 -2
  81. package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts.map +1 -1
  82. package/dist/components/SingleSelectDropdown/index.d.ts +1 -1
  83. package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
  84. package/dist/components/SingleSelectDropdown/index.js +61 -57
  85. package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts +1 -0
  86. package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts.map +1 -1
  87. package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.js +39 -40
  88. package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
  89. package/dist/components/Table/_helpers/ColumnManager/index.js +453 -448
  90. package/dist/components/Table/_helpers/ExpandableRow/index.d.ts.map +1 -1
  91. package/dist/components/Table/_helpers/ExpandableRow/index.js +30 -20
  92. package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +2 -2
  93. package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
  94. package/dist/components/Table/_helpers/GroupedHeader/index.js +79 -87
  95. package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
  96. package/dist/components/Table/_helpers/TableFilterModal/index.js +14 -14
  97. package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
  98. package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
  99. package/dist/components/Table/_helpers/TableRows.js +288 -283
  100. package/dist/components/Table/_types/table.types.d.ts +9 -3
  101. package/dist/components/Table/_types/table.types.d.ts.map +1 -1
  102. package/dist/components/Table/_utils/table.utils.d.ts +3 -0
  103. package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
  104. package/dist/components/Table/_utils/table.utils.js +73 -23
  105. package/dist/components/Table/index.d.ts +1 -1
  106. package/dist/components/Table/index.d.ts.map +1 -1
  107. package/dist/components/Table/index.js +382 -357
  108. package/dist/main.d.ts +5 -0
  109. package/dist/main.d.ts.map +1 -1
  110. package/dist/main.js +91 -81
  111. package/dist/styles.module-BXby6f8d.js +16 -0
  112. package/dist/styles.module-Dojg5FTS.js +41 -0
  113. package/package.json +1 -1
  114. package/dist/DropdownFooter-C20yRiDR.js +0 -84
  115. package/dist/assets/DropdownFooter-C7Cml53c.css +0 -1
  116. package/dist/assets/index-BQ0m7FKV.css +0 -1
  117. package/dist/assets/index-Dudb2XKF.css +0 -1
  118. package/dist/assets/index-w7AdSPwF.css +0 -1
  119. package/dist/assets/styles-BA66-SUu.css +0 -1
  120. package/dist/assets/styles-CflOKRvX.css +0 -1
  121. package/dist/styles.module-CCyijXTv.js +0 -16
  122. package/dist/styles.module-CmWIIYpK.js +0 -41
@@ -1,8 +1,8 @@
1
- import { jsxs as b, jsx as c } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as e } from "react/jsx-runtime";
2
2
  import { useRef as p, useLayoutEffect as m } from "react";
3
3
  import { LG as _ } from "../../constants.js";
4
- import { mergeClasses as t } from "../../utils/mergeClasses.js";
5
- import '../../assets/index-rrYSS2rl.css';const e = {
4
+ import { mergeClasses as x } from "../../utils/mergeClasses.js";
5
+ import '../../assets/index-rrYSS2rl.css';const c = {
6
6
  "ckds-checkbox-wrapper": "_ckds-checkbox-wrapper_2erx7_1",
7
7
  "ckds-checkbox": "_ckds-checkbox_2erx7_1",
8
8
  "ckds-checkbox-sm": "_ckds-checkbox-sm_2erx7_63",
@@ -11,49 +11,50 @@ import '../../assets/index-rrYSS2rl.css';const e = {
11
11
  "ckds-checkbox-indeterminate": "_ckds-checkbox-indeterminate_2erx7_99"
12
12
  };
13
13
  function w({
14
- checked: k,
15
- indeterminate: o = !1,
16
- onChange: x,
14
+ checked: o,
15
+ indeterminate: s = !1,
16
+ onChange: t,
17
17
  wrapperClassName: d = "",
18
18
  classname: h = "",
19
19
  disabled: a = !1,
20
20
  size: i = _,
21
21
  ...n
22
22
  }) {
23
- const s = p(null);
23
+ const k = p(null);
24
24
  return m(() => {
25
- s.current && (s.current.indeterminate = o, s.current.checked = !!k);
26
- }, [o, k]), /* @__PURE__ */ b(
25
+ k.current && (k.current.indeterminate = s, k.current.checked = !!o);
26
+ }, [s, o]), /* @__PURE__ */ b(
27
27
  "label",
28
28
  {
29
- className: t(
30
- e["ckds-checkbox-wrapper"],
31
- e[d]
29
+ className: x(
30
+ c["ckds-checkbox-wrapper"],
31
+ c[d]
32
32
  ),
33
33
  children: [
34
- /* @__PURE__ */ c(
34
+ /* @__PURE__ */ e(
35
35
  "input",
36
36
  {
37
- ref: s,
37
+ ref: k,
38
38
  type: "checkbox",
39
- checked: k,
39
+ checked: o,
40
40
  onChange: (r) => {
41
- x?.(r.target.checked);
41
+ t?.(r.target.checked);
42
42
  },
43
43
  onClick: (r) => r.stopPropagation(),
44
44
  disabled: a,
45
45
  ...n
46
46
  }
47
47
  ),
48
- /* @__PURE__ */ c(
48
+ /* @__PURE__ */ e(
49
49
  "span",
50
50
  {
51
- className: t(
52
- e["ckds-checkbox"],
53
- e[`ckds-checkbox-${i}`],
51
+ className: x(
52
+ c["ckds-checkbox"],
53
+ c[`ckds-checkbox-${i}`],
54
+ s && c["ckds-checkbox-indeterminate"],
54
55
  h
55
56
  ),
56
- children: o ? /* @__PURE__ */ c("svg", { className: e["ckds-checkbox-tick"], viewBox: "0 0 16 16", children: /* @__PURE__ */ c("path", { d: "M4 8H12" }) }) : /* @__PURE__ */ c("svg", { className: e["ckds-checkbox-tick"], viewBox: "0 0 16 16", children: /* @__PURE__ */ c("path", { d: "M4 8.5L7 11.5L12 5.5" }) })
57
+ children: s ? /* @__PURE__ */ e("svg", { className: c["ckds-checkbox-tick"], viewBox: "0 0 16 16", children: /* @__PURE__ */ e("path", { d: "M4 8H12" }) }) : /* @__PURE__ */ e("svg", { className: c["ckds-checkbox-tick"], viewBox: "0 0 16 16", children: /* @__PURE__ */ e("path", { d: "M4 8.5L7 11.5L12 5.5" }) })
57
58
  }
58
59
  )
59
60
  ]
@@ -21,6 +21,8 @@ interface CostCellProps<TRow> {
21
21
  formatValue: FormatValue<TRow>;
22
22
  /** Consumer-supplied diff-class resolver. */
23
23
  compareValues: CompareValues;
24
+ /** Column text alignment, forwarded from the column definition. */
25
+ align?: "left" | "center" | "right";
24
26
  }
25
27
  /**
26
28
  * Body cell wrapper that handles:
@@ -31,6 +33,6 @@ interface CostCellProps<TRow> {
31
33
  * The library never produces color classes itself — `compareValues` is what
32
34
  * chooses them. We just apply the returned class to the cell wrapper.
33
35
  */
34
- export declare function CostCell<TRow extends Record<string, unknown>>({ columnKey, columnIndex, orderedKeys, row, valueMapKey, value, comparatorMode, selected, formatValue, compareValues, }: CostCellProps<TRow>): ReactNode;
36
+ export declare function CostCell<TRow extends Record<string, unknown>>({ columnKey, columnIndex, orderedKeys, row, valueMapKey, value, comparatorMode, selected, formatValue, compareValues, align, }: CostCellProps<TRow>): ReactNode;
35
37
  export {};
36
38
  //# sourceMappingURL=CostCell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CostCell.d.ts","sourceRoot":"","sources":["../../../../lib/components/CostComparatorTable/_helpers/CostCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEtF,UAAU,aAAa,CAAC,IAAI;IAC1B,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oEAAoE;IACpE,GAAG,EAAE,IAAI,CAAC;IACV,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,8BAA8B;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,6CAA6C;IAC7C,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC7D,SAAS,EACT,WAAW,EACX,WAAW,EACX,GAAG,EACH,WAAW,EACX,KAAK,EACL,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,GACd,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,SAAS,CAmCjC"}
1
+ {"version":3,"file":"CostCell.d.ts","sourceRoot":"","sources":["../../../../lib/components/CostComparatorTable/_helpers/CostCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEtF,UAAU,aAAa,CAAC,IAAI;IAC1B,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oEAAoE;IACpE,GAAG,EAAE,IAAI,CAAC;IACV,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,8BAA8B;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,6CAA6C;IAC7C,aAAa,EAAE,aAAa,CAAC;IAC7B,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC7D,SAAS,EACT,WAAW,EACX,WAAW,EACX,GAAG,EACH,WAAW,EACX,KAAK,EACL,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,EACb,KAAK,GACN,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,SAAS,CAoCjC"}
@@ -1,52 +1,54 @@
1
- import { jsx as x } from "react/jsx-runtime";
1
+ import { jsx as N } from "react/jsx-runtime";
2
2
  import "react";
3
- import { s as d } from "../../../styles.module-CCyijXTv.js";
4
- import { mergeClasses as N } from "../../../utils/mergeClasses.js";
3
+ import { s as d } from "../../../styles.module-BXby6f8d.js";
4
+ import { mergeClasses as g } from "../../../utils/mergeClasses.js";
5
5
  import { pickPrecision as V } from "../_utils/costComparator.utils.js";
6
- function P({
6
+ function O({
7
7
  columnKey: s,
8
8
  columnIndex: e,
9
- orderedKeys: o,
10
- row: r,
11
- valueMapKey: i,
9
+ orderedKeys: n,
10
+ row: t,
11
+ valueMapKey: r,
12
12
  value: b,
13
- comparatorMode: C,
14
- selected: n,
15
- formatValue: k,
16
- compareValues: p
13
+ comparatorMode: x,
14
+ selected: o,
15
+ formatValue: C,
16
+ compareValues: p,
17
+ align: k
17
18
  }) {
18
- const t = Number(b ?? 0), m = V(t);
19
- let f = "", a = !1;
20
- if (C)
21
- if (!n.includes(s))
19
+ const i = Number(b ?? 0), m = V(i);
20
+ let l = "", a = !1;
21
+ if (x)
22
+ if (!o.includes(s))
22
23
  a = !0;
23
24
  else {
24
- const c = n.indexOf(s);
25
+ const c = o.indexOf(s);
25
26
  if (c > 0) {
26
- const l = n[c - 1], v = u(r, i, l);
27
- f = p(t, v, m);
27
+ const f = o[c - 1], v = u(t, r, f);
28
+ l = p(i, v, m);
28
29
  }
29
30
  }
30
31
  else if (e > 0) {
31
- const c = o[e - 1], l = u(r, i, c);
32
- f = p(t, l, m);
32
+ const c = n[e - 1], f = u(t, r, c);
33
+ l = p(i, f, m);
33
34
  }
34
- return /* @__PURE__ */ x(
35
+ return /* @__PURE__ */ N(
35
36
  "span",
36
37
  {
37
- className: N(
38
+ className: g(
38
39
  d["ckds-cost-cell"],
39
40
  a ? d["ckds-disabled"] : "",
40
- f
41
+ l
41
42
  ),
42
- children: k(t, r, s)
43
+ style: { textAlign: k },
44
+ children: C(i, t, s)
43
45
  }
44
46
  );
45
47
  }
46
- function u(s, e, o) {
47
- const i = s[e];
48
- return Number(i?.[o] ?? 0);
48
+ function u(s, e, n) {
49
+ const r = s[e];
50
+ return Number(r?.[n] ?? 0);
49
51
  }
50
52
  export {
51
- P as CostCell
53
+ O as CostCell
52
54
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
2
  import { CKCheckbox as h } from "../../CKCheckbox/index.js";
3
- import { s as e } from "../../../styles.module-CCyijXTv.js";
3
+ import { s as e } from "../../../styles.module-BXby6f8d.js";
4
4
  function l({ label: c, checked: r, disabled: a, onToggle: o }) {
5
5
  return /* @__PURE__ */ d("span", { className: `${e["ckds-header-checkbox"]} ${a ? e["ckds-disabled"] : ""}`, children: [
6
6
  /* @__PURE__ */ s(
@@ -3,10 +3,13 @@ import { ReactNode } from 'react';
3
3
  * One date / period column the user can compare across.
4
4
  * `key` is the lookup key used inside each row's value map (e.g. "01-Jan").
5
5
  * `label` is what is shown in the header cell.
6
+ * `align` controls text alignment for the header and cells of this column.
6
7
  */
7
8
  export interface ComparatorColumn {
8
9
  key: string;
9
10
  label?: string;
11
+ /** Text alignment for the column header and cells. Defaults to "left". */
12
+ align?: "left" | "center" | "right";
10
13
  }
11
14
  /**
12
15
  * Granularity hint. Used by the default header sorter to parse keys
@@ -70,6 +73,10 @@ export interface CostComparatorTableProps<TRow extends Record<string, unknown>>
70
73
  /** Sticky behaviour. Defaults to first + last (group + total). */
71
74
  stickyStart?: "none" | "first" | "firstTwo";
72
75
  stickyEnd?: "none" | "last";
76
+ /** Text alignment for the group (service) column. Defaults to "left". */
77
+ groupColumnAlign?: "left" | "center" | "right";
78
+ /** Text alignment for the total column. Defaults to "left". */
79
+ totalColumnAlign?: "left" | "center" | "right";
73
80
  }
74
81
  /**
75
82
  * Shape of every row CustomTable actually receives after we flatten.
@@ -1 +1 @@
1
- {"version":3,"file":"costComparatorTable.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/CostComparatorTable/_types/costComparatorTable.types.ts"],"names":[],"mappings":"AAAA,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AS,CAAC;IAEnB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAAC,IAAI,CAAE,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtE,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB"}
1
+ {"version":3,"file":"costComparatorTable.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/CostComparatorTable/_types/costComparatorTable.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,CAAC,IAAI,IAAI,CAC9B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,IAAI,GAAG,SAAS,EACrB,SAAS,EAAE,MAAM,KACd,SAAS,CAAC;AAEf;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,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O,CAAC;IACtE,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB"}
@@ -18,6 +18,6 @@ import { CostComparatorTableProps } from './_types/costComparatorTable.types';
18
18
  * on every render — required for the comparator toggle and selection state
19
19
  * to flow through to the header checkboxes.
20
20
  */
21
- export declare function CostComparatorTable<TRow extends Record<string, unknown>>({ data, comparatorColumns, groupKey, totalKey, valueKey, serviceHeader, footerTotalKey, granularity, formatValue, compareValues, legend, toggleLabel, maxHeight, virtualization, stickyStart, stickyEnd, }: CostComparatorTableProps<TRow>): import("react/jsx-runtime").JSX.Element;
21
+ export declare function CostComparatorTable<TRow extends Record<string, unknown>>({ data, comparatorColumns, groupKey, totalKey, valueKey, serviceHeader, footerTotalKey, granularity, formatValue, compareValues, legend, toggleLabel, maxHeight, virtualization, stickyStart, stickyEnd, groupColumnAlign, totalColumnAlign, }: CostComparatorTableProps<TRow>): import("react/jsx-runtime").JSX.Element;
22
22
  export default CostComparatorTable;
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/CostComparatorTable/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,oCAAoC,CAAC;AAI5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACxE,IAAI,EACJ,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAyB,EACzB,cAAwB,EACxB,WAAqB,EACrB,WAAW,EACX,aAAa,EACb,MAAM,EACN,WAAoC,EACpC,SAAS,EACT,cAAsB,EACtB,WAAqB,EACrB,SAAkB,GACnB,EAAE,wBAAwB,CAAC,IAAI,CAAC,2CA2LhC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/CostComparatorTable/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,oCAAoC,CAAC;AAI5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACxE,IAAI,EACJ,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,aAAyB,EACzB,cAAwB,EACxB,WAAqB,EACrB,WAAW,EACX,aAAa,EACb,MAAM,EACN,WAAoC,EACpC,SAAS,EACT,cAAsB,EACtB,WAAqB,EACrB,SAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,EAAE,wBAAwB,CAAC,IAAI,CAAC,2CAiMhC;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,177 +1,185 @@
1
- import { jsx as l, jsxs as h } from "react/jsx-runtime";
2
- import { useState as j, useMemo as p } from "react";
3
- import { CustomTable as I } from "../Table/index.js";
4
- import { Toggle as J } from "../Toggle/index.js";
5
- import { CostCell as O } from "./_helpers/CostCell.js";
6
- import { HeaderCheckbox as P } from "./_helpers/HeaderCheckbox.js";
7
- import { sortSelectedHeaders as Q } from "./_utils/costComparator.utils.js";
8
- import { s as r } from "../../styles.module-CCyijXTv.js";
9
- import { mergeClasses as U } from "../../utils/mergeClasses.js";
10
- function se({
1
+ import { jsx as l, jsxs as y } from "react/jsx-runtime";
2
+ import { useState as R, useMemo as p } from "react";
3
+ import { CustomTable as P } from "../Table/index.js";
4
+ import { Toggle as Q } from "../Toggle/index.js";
5
+ import { CostCell as U } from "./_helpers/CostCell.js";
6
+ import { HeaderCheckbox as W } from "./_helpers/HeaderCheckbox.js";
7
+ import { sortSelectedHeaders as X } from "./_utils/costComparator.utils.js";
8
+ import { s as r } from "../../styles.module-BXby6f8d.js";
9
+ import { mergeClasses as Y } from "../../utils/mergeClasses.js";
10
+ function le({
11
11
  data: b,
12
- comparatorColumns: o,
13
- groupKey: _,
14
- totalKey: m,
12
+ comparatorColumns: t,
13
+ groupKey: N,
14
+ totalKey: h,
15
15
  valueKey: n,
16
- serviceHeader: y = "Service",
17
- footerTotalKey: u = "Total",
18
- granularity: N = "Daily",
16
+ serviceHeader: M = "Service",
17
+ footerTotalKey: T = "Total",
18
+ granularity: w = "Daily",
19
19
  formatValue: i,
20
- compareValues: M,
21
- legend: T,
22
- toggleLabel: v = "Cost Comparator Mode",
23
- maxHeight: R,
24
- virtualization: z = !1,
25
- stickyStart: w = "first",
26
- stickyEnd: C = "last"
20
+ compareValues: x,
21
+ legend: S,
22
+ toggleLabel: z = "Cost Comparator Mode",
23
+ maxHeight: F,
24
+ virtualization: H = !1,
25
+ stickyStart: u = "first",
26
+ stickyEnd: D = "last",
27
+ groupColumnAlign: _,
28
+ totalColumnAlign: m
27
29
  }) {
28
- const [c, F] = j(!1), [g, S] = j([]), x = p(
29
- () => o.map((s) => s.key),
30
- [o]
31
- ), H = p(
30
+ const [c, L] = R(!1), [g, C] = R([]), j = p(
31
+ () => t.map((s) => s.key),
32
+ [t]
33
+ ), q = p(
32
34
  () => b.map((s) => {
33
- const d = s[n] ?? {}, t = {
34
- __group: s[_],
35
- __total: Number(s[m] ?? 0),
35
+ const d = s[n] ?? {}, o = {
36
+ __group: s[N],
37
+ __total: Number(s[h] ?? 0),
36
38
  __original: s
37
39
  };
38
- for (const e of o)
39
- t[e.key] = d[e.key];
40
- return t;
40
+ for (const e of t)
41
+ o[e.key] = d[e.key];
42
+ return o;
41
43
  }),
42
- [b, o, _, m, n]
43
- ), L = p(() => {
44
+ [b, t, N, h, n]
45
+ ), B = p(() => {
44
46
  const s = {
45
47
  accessorKey: "__group",
46
- header: y,
48
+ header: M,
47
49
  enableSorting: !1,
48
- cell: (e) => /* @__PURE__ */ l("span", { children: e.getValue() })
49
- }, d = o.map((e, k) => {
50
- const a = e.label ?? e.key, D = g.includes(e.key), A = c && !D;
50
+ align: _,
51
+ cell: (e) => /* @__PURE__ */ l("span", { style: { textAlign: _ }, children: e.getValue() })
52
+ }, d = t.map((e, k) => {
53
+ const a = e.label ?? e.key, v = g.includes(e.key), I = c && !v;
51
54
  return {
52
55
  accessorKey: e.key,
53
56
  enableSorting: !1,
57
+ align: e.align,
54
58
  header: () => c ? /* @__PURE__ */ l(
55
- P,
59
+ W,
56
60
  {
57
61
  label: a,
58
- checked: D,
59
- disabled: A,
62
+ checked: v,
63
+ disabled: I,
60
64
  onToggle: () => {
61
- S((f) => {
62
- const B = f.includes(e.key) ? f.filter((G) => G !== e.key) : [...f, e.key];
63
- return Q(B, N, o);
65
+ C((f) => {
66
+ const J = f.includes(e.key) ? f.filter((O) => O !== e.key) : [...f, e.key];
67
+ return X(J, w, t);
64
68
  });
65
69
  }
66
70
  }
67
71
  ) : /* @__PURE__ */ l("span", { className: r["ckds-header-label"], children: a }),
68
72
  cell: (f) => /* @__PURE__ */ l(
69
- O,
73
+ U,
70
74
  {
71
75
  columnKey: e.key,
72
76
  columnIndex: k,
73
- orderedKeys: x,
77
+ orderedKeys: j,
74
78
  row: f.row.original.__original,
75
79
  valueMapKey: n,
76
80
  value: f.getValue(),
77
81
  comparatorMode: c,
78
82
  selected: g,
79
83
  formatValue: i,
80
- compareValues: M
84
+ compareValues: x,
85
+ align: e.align
81
86
  }
82
87
  )
83
88
  };
84
- }), t = {
89
+ }), o = {
85
90
  accessorKey: "__total",
86
91
  header: "Total",
87
92
  enableSorting: !1,
88
- cell: (e) => /* @__PURE__ */ l("span", { className: r["ckds-total-cell"], children: i(
93
+ align: m,
94
+ cell: (e) => /* @__PURE__ */ l("span", { className: r["ckds-total-cell"], style: { textAlign: m }, children: i(
89
95
  Number(e.getValue() ?? 0),
90
96
  e.row.original.__original,
91
97
  "__total"
92
98
  ) })
93
99
  };
94
100
  return {
95
- columns: [s, ...d, t],
101
+ columns: [s, ...d, o],
96
102
  columnVisibility: {},
97
103
  wrapText: !1,
98
104
  stripedRows: !1,
99
- stickyStart: w,
100
- stickyEnd: C
105
+ stickyStart: u,
106
+ stickyEnd: D
101
107
  };
102
108
  }, [
103
- o,
109
+ t,
104
110
  c,
105
111
  g,
106
- N,
107
- x,
112
+ w,
113
+ j,
108
114
  n,
109
115
  i,
116
+ x,
110
117
  M,
111
- y,
112
- w,
113
- C
114
- ]), q = p(() => {
118
+ u,
119
+ D,
120
+ _,
121
+ m
122
+ ]), G = p(() => {
115
123
  const s = {};
116
- for (const e of o) s[e.key] = 0;
124
+ for (const e of t) s[e.key] = 0;
117
125
  let d = 0;
118
126
  for (const e of b) {
119
127
  const k = e[n] ?? {};
120
- for (const a of o)
128
+ for (const a of t)
121
129
  s[a.key] = (s[a.key] ?? 0) + Number(k[a.key] ?? 0);
122
- d += Number(e[m] ?? 0);
130
+ d += Number(e[h] ?? 0);
123
131
  }
124
- const t = { __group: u };
125
- for (const e of o) {
132
+ const o = { __group: T };
133
+ for (const e of t) {
126
134
  const k = s[e.key], a = c && !g.includes(e.key);
127
- t[e.key] = /* @__PURE__ */ l("span", { className: U(a ? r["ckds-disabled"] : ""), children: i(k, void 0, e.key) });
135
+ o[e.key] = /* @__PURE__ */ l("span", { className: Y(a ? r["ckds-disabled"] : ""), children: i(k, void 0, e.key) });
128
136
  }
129
- return t.__total = i(d, void 0, "__total"), t;
137
+ return o.__total = i(d, void 0, "__total"), o;
130
138
  }, [
131
139
  b,
132
- o,
140
+ t,
133
141
  n,
134
- m,
135
- u,
142
+ h,
143
+ T,
136
144
  c,
137
145
  g,
138
146
  i
139
147
  ]);
140
- return /* @__PURE__ */ h("div", { className: r["ckds-cost-comparator-wrapper"], children: [
141
- /* @__PURE__ */ h("div", { className: r["ckds-cost-comparator-toolbar"], children: [
142
- /* @__PURE__ */ h("label", { className: r["ckds-cost-comparator-toggle"], children: [
148
+ return /* @__PURE__ */ y("div", { className: r["ckds-cost-comparator-wrapper"], children: [
149
+ /* @__PURE__ */ y("div", { className: r["ckds-cost-comparator-toolbar"], children: [
150
+ /* @__PURE__ */ y("label", { className: r["ckds-cost-comparator-toggle"], children: [
143
151
  /* @__PURE__ */ l(
144
- J,
152
+ Q,
145
153
  {
146
154
  checked: c,
147
155
  onChange: (s) => {
148
- F(s), S([]);
156
+ L(s), C([]);
149
157
  },
150
158
  size: "small"
151
159
  }
152
160
  ),
153
- /* @__PURE__ */ l("span", { className: r["ckds-cost-comparator-toggle-label"], children: v })
161
+ /* @__PURE__ */ l("span", { className: r["ckds-cost-comparator-toggle-label"], children: z })
154
162
  ] }),
155
- T ? /* @__PURE__ */ l("div", { className: r["ckds-cost-comparator-legend"], children: T }) : null
163
+ S ? /* @__PURE__ */ l("div", { className: r["ckds-cost-comparator-legend"], children: S }) : null
156
164
  ] }),
157
165
  /* @__PURE__ */ l(
158
- I,
166
+ P,
159
167
  {
160
168
  config: {
161
169
  headers: [],
162
170
  showColumnManager: !1,
163
171
  showFilters: !1
164
172
  },
165
- data: H,
166
- externalTableConfig: L,
167
- totalRow: q,
168
- maxHeight: R,
169
- virtualization: z
173
+ data: q,
174
+ externalTableConfig: B,
175
+ totalRow: G,
176
+ maxHeight: F,
177
+ virtualization: H
170
178
  }
171
179
  )
172
180
  ] });
173
181
  }
174
182
  export {
175
- se as CostComparatorTable,
176
- se as default
183
+ le as CostComparatorTable,
184
+ le as default
177
185
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../lib/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAelG,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,oBAAoB,EAGrB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC;AA+H9D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoX1D,CAAC"}
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../lib/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAelG,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,oBAAoB,EAGrB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC;AA+H9D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2a1D,CAAC"}