@tectra-ng/charts 0.2.6 → 0.3.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 (97) hide show
  1. package/fesm2022/tectra-ng-charts-bar-list.mjs +8 -2
  2. package/fesm2022/tectra-ng-charts-bar-list.mjs.map +1 -1
  3. package/fesm2022/tectra-ng-charts-boxplot.mjs +11 -2
  4. package/fesm2022/tectra-ng-charts-boxplot.mjs.map +1 -1
  5. package/fesm2022/tectra-ng-charts-bullet.mjs +8 -2
  6. package/fesm2022/tectra-ng-charts-bullet.mjs.map +1 -1
  7. package/fesm2022/tectra-ng-charts-candlestick.mjs +8 -2
  8. package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-charts-column.mjs +11 -2
  10. package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-charts-combo.mjs +11 -2
  12. package/fesm2022/tectra-ng-charts-combo.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-charts-core.mjs +38 -2
  14. package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-charts-funnel.mjs +8 -2
  16. package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -1
  17. package/fesm2022/tectra-ng-charts-gantt.mjs +12 -3
  18. package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-charts-gauge.mjs +12 -2
  20. package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-charts-heatmap.mjs +14 -2
  22. package/fesm2022/tectra-ng-charts-heatmap.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-charts-line.mjs +8 -2
  24. package/fesm2022/tectra-ng-charts-line.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-charts-org-chart.mjs +43 -4
  26. package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-charts-pie.mjs +11 -2
  28. package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-charts-radar.mjs +12 -2
  30. package/fesm2022/tectra-ng-charts-radar.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-charts-radial-bar.mjs +11 -2
  32. package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-charts-range-area.mjs +8 -2
  34. package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-charts-rank-line.mjs +8 -2
  36. package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-charts-sankey.mjs +11 -2
  38. package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-charts-scatter.mjs +11 -2
  40. package/fesm2022/tectra-ng-charts-scatter.mjs.map +1 -1
  41. package/fesm2022/tectra-ng-charts-segmented-bar.mjs +12 -2
  42. package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-charts-sunburst.mjs +8 -2
  44. package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-charts-treemap.mjs +8 -2
  46. package/fesm2022/tectra-ng-charts-treemap.mjs.map +1 -1
  47. package/fesm2022/tectra-ng-charts-waterfall.mjs +8 -2
  48. package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -1
  49. package/package.json +5 -5
  50. package/types/tectra-ng-charts-bar-list.d.ts +1 -0
  51. package/types/tectra-ng-charts-bar-list.d.ts.map +1 -1
  52. package/types/tectra-ng-charts-boxplot.d.ts +1 -0
  53. package/types/tectra-ng-charts-boxplot.d.ts.map +1 -1
  54. package/types/tectra-ng-charts-bullet.d.ts +1 -0
  55. package/types/tectra-ng-charts-bullet.d.ts.map +1 -1
  56. package/types/tectra-ng-charts-candlestick.d.ts +1 -0
  57. package/types/tectra-ng-charts-candlestick.d.ts.map +1 -1
  58. package/types/tectra-ng-charts-column.d.ts +1 -0
  59. package/types/tectra-ng-charts-column.d.ts.map +1 -1
  60. package/types/tectra-ng-charts-combo.d.ts +1 -0
  61. package/types/tectra-ng-charts-combo.d.ts.map +1 -1
  62. package/types/tectra-ng-charts-core.d.ts +6 -0
  63. package/types/tectra-ng-charts-core.d.ts.map +1 -1
  64. package/types/tectra-ng-charts-funnel.d.ts +1 -0
  65. package/types/tectra-ng-charts-funnel.d.ts.map +1 -1
  66. package/types/tectra-ng-charts-gantt.d.ts +1 -0
  67. package/types/tectra-ng-charts-gantt.d.ts.map +1 -1
  68. package/types/tectra-ng-charts-gauge.d.ts +1 -0
  69. package/types/tectra-ng-charts-gauge.d.ts.map +1 -1
  70. package/types/tectra-ng-charts-heatmap.d.ts +3 -0
  71. package/types/tectra-ng-charts-heatmap.d.ts.map +1 -1
  72. package/types/tectra-ng-charts-line.d.ts +1 -0
  73. package/types/tectra-ng-charts-line.d.ts.map +1 -1
  74. package/types/tectra-ng-charts-org-chart.d.ts +3 -0
  75. package/types/tectra-ng-charts-org-chart.d.ts.map +1 -1
  76. package/types/tectra-ng-charts-pie.d.ts +1 -0
  77. package/types/tectra-ng-charts-pie.d.ts.map +1 -1
  78. package/types/tectra-ng-charts-radar.d.ts +1 -0
  79. package/types/tectra-ng-charts-radar.d.ts.map +1 -1
  80. package/types/tectra-ng-charts-radial-bar.d.ts +1 -0
  81. package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -1
  82. package/types/tectra-ng-charts-range-area.d.ts +1 -0
  83. package/types/tectra-ng-charts-range-area.d.ts.map +1 -1
  84. package/types/tectra-ng-charts-rank-line.d.ts +1 -0
  85. package/types/tectra-ng-charts-rank-line.d.ts.map +1 -1
  86. package/types/tectra-ng-charts-sankey.d.ts +1 -0
  87. package/types/tectra-ng-charts-sankey.d.ts.map +1 -1
  88. package/types/tectra-ng-charts-scatter.d.ts +1 -0
  89. package/types/tectra-ng-charts-scatter.d.ts.map +1 -1
  90. package/types/tectra-ng-charts-segmented-bar.d.ts +1 -0
  91. package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -1
  92. package/types/tectra-ng-charts-sunburst.d.ts +1 -0
  93. package/types/tectra-ng-charts-sunburst.d.ts.map +1 -1
  94. package/types/tectra-ng-charts-treemap.d.ts +1 -0
  95. package/types/tectra-ng-charts-treemap.d.ts.map +1 -1
  96. package/types/tectra-ng-charts-waterfall.d.ts +1 -0
  97. package/types/tectra-ng-charts-waterfall.d.ts.map +1 -1
@@ -1,10 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from "@angular/core";
3
3
  import { chartNumberFormatter } from "@tectra-ng/charts/core";
4
- import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
4
+ import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
5
5
  import { TxLocaleService } from "@tectra-ng/core/i18n";
6
6
  import { optionalBoolean } from "@tectra-ng/core/utils";
7
- import { toStyleObject } from "@tectra-ng/themes";
7
+ import { chartTokens, toStyleObject } from "@tectra-ng/themes";
8
+ import { provideTxIconDefaults, txIconDot, txIconInfo, txIconList } from "@tectra-ng/icons";
8
9
  function segmentedBarSegments(items, format, percentFormat = format) {
9
10
  const list = items ?? [];
10
11
  const positive = (value) => Number.isFinite(value) ? Math.max(value, 0) : 0;
@@ -24,7 +25,14 @@ function segmentedBarSegments(items, format, percentFormat = format) {
24
25
  };
25
26
  });
26
27
  }
28
+ const SEGMENTED_BAR_ICON_DEFAULTS = {
29
+ dot: txIconDot,
30
+ info: txIconInfo,
31
+ list: txIconList
32
+ };
33
+ const SEGMENTED_BAR_THEME = { chart: chartTokens };
27
34
  var TxSegmentedBar = class TxSegmentedBar {
35
+ segmentedBarTheme = injectTokens(SEGMENTED_BAR_THEME);
28
36
  locale = inject(TxLocaleService);
29
37
  items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
30
38
  size = input("small", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
@@ -191,6 +199,7 @@ var TxSegmentedBar = class TxSegmentedBar {
191
199
  ngImport: i0,
192
200
  template: "@let parts = passThrough();\n<div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n>\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n</div>\n\n@if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n}\n",
193
201
  styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-segmented-bar__track{display:flex;overflow:hidden}.tx-segmented-bar__segment{display:block;height:100%}.tx-segmented-bar__legend{display:flex;flex-wrap:wrap;align-items:center}.tx-segmented-bar__legend-item{display:inline-flex;align-items:center}.tx-segmented-bar__dot{flex-shrink:0}.tx-segmented-bar__aside{display:inline-flex;align-items:center;margin-inline-start:auto}.tx-segmented-bar__aside:empty{display:none}:host([data-styled]){gap:var(--tx-chart-segmented-bar-gap)}:host([data-styled]) [data-tone]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-primary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-primary-text)}:host([data-styled]) [data-tone=secondary]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-secondary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-secondary-text)}:host([data-styled]) [data-tone=success]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-success-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-success-text)}:host([data-styled]) [data-tone=info]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-info-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-info-text)}:host([data-styled]) [data-tone=warn]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-warn-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-warn-text)}:host([data-styled]) [data-tone=danger]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-danger-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-danger-text)}:host([data-styled]) [data-tone=neutral]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-neutral-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-neutral-text)}:host([data-styled]) .tx-segmented-bar__track{gap:var(--tx-chart-segmented-bar-track-gap);height:var(--tx-chart-segmented-bar-track-height);border-radius:var(--tx-chart-segmented-bar-track-radius);background:var(--tx-chart-segmented-bar-track-background)}:host([data-styled]) .tx-segmented-bar__segment{min-width:var(--tx-chart-segmented-bar-segment-min-width);background:var(--tx-segmented-bar-tone);transition:width var(--tx-chart-segmented-bar-duration) ease}:host([data-styled]) .tx-segmented-bar__segment:first-child{border-start-start-radius:var(--tx-chart-segmented-bar-track-radius);border-end-start-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__segment:last-child{border-start-end-radius:var(--tx-chart-segmented-bar-track-radius);border-end-end-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-legend-gap-x);row-gap:var(--tx-chart-segmented-bar-legend-gap-y);font-size:var(--tx-chart-segmented-bar-legend-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-segmented-bar__legend-item{gap:var(--tx-chart-segmented-bar-legend-item-gap)}:host([data-styled]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-dot-size);height:var(--tx-chart-segmented-bar-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-segmented-bar-tone)}:host([data-styled]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-label-color)}:host([data-styled]) .tx-segmented-bar__value{color:var(--tx-chart-segmented-bar-value-color);font-weight:var(--tx-chart-segmented-bar-value-font-weight)}:host([data-styled]) .tx-segmented-bar__percent{color:var(--tx-chart-segmented-bar-percent-color)}:host([data-styled]) .tx-segmented-bar__aside{gap:var(--tx-chart-segmented-bar-legend-item-gap);color:var(--tx-chart-segmented-bar-aside-color)}:host([data-styled].tx-segmented-bar--mono) .tx-segmented-bar__label{font-family:var(--tx-chart-segmented-bar-mono-font-family)}:host([data-styled][data-size=large]){gap:var(--tx-chart-segmented-bar-large-gap)}:host([data-styled][data-size=large]) .tx-segmented-bar__track{height:var(--tx-chart-segmented-bar-large-track-height);border-radius:var(--tx-chart-segmented-bar-large-track-radius)}:host([data-styled][data-size=large]) .tx-segmented-bar__segment{display:flex;align-items:center;justify-content:center;min-width:var(--tx-chart-segmented-bar-large-segment-min-width);border-radius:0;color:var(--tx-segmented-bar-tone-text);font-size:var(--tx-chart-segmented-bar-large-segment-font-size);font-weight:var(--tx-chart-segmented-bar-large-segment-font-weight);font-variant-numeric:tabular-nums}:host([data-styled][data-size=large]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-large-legend-gap-x);font-size:var(--tx-chart-segmented-bar-large-legend-font-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-large-dot-size);height:var(--tx-chart-segmented-bar-large-dot-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-large-label-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-segmented-bar__segment{transition:none}}\n"],
202
+ viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],
194
203
  changeDetection: i0.ChangeDetectionStrategy.OnPush
195
204
  });
196
205
  };
@@ -212,6 +221,7 @@ i0.ɵɵngDeclareClassMetadata({
212
221
  "[attr.data-size]": "size()",
213
222
  "[class.tx-segmented-bar--mono]": "monoLabels()"
214
223
  },
224
+ viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],
215
225
  template: "@let parts = passThrough();\n<div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n>\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n</div>\n\n@if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n}\n",
216
226
  styles: [":host{display:flex;flex-direction:column;min-width:0}.tx-segmented-bar__track{display:flex;overflow:hidden}.tx-segmented-bar__segment{display:block;height:100%}.tx-segmented-bar__legend{display:flex;flex-wrap:wrap;align-items:center}.tx-segmented-bar__legend-item{display:inline-flex;align-items:center}.tx-segmented-bar__dot{flex-shrink:0}.tx-segmented-bar__aside{display:inline-flex;align-items:center;margin-inline-start:auto}.tx-segmented-bar__aside:empty{display:none}:host([data-styled]){gap:var(--tx-chart-segmented-bar-gap)}:host([data-styled]) [data-tone]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-primary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-primary-text)}:host([data-styled]) [data-tone=secondary]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-secondary-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-secondary-text)}:host([data-styled]) [data-tone=success]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-success-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-success-text)}:host([data-styled]) [data-tone=info]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-info-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-info-text)}:host([data-styled]) [data-tone=warn]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-warn-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-warn-text)}:host([data-styled]) [data-tone=danger]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-danger-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-danger-text)}:host([data-styled]) [data-tone=neutral]{--tx-segmented-bar-tone: var(--tx-chart-segmented-bar-neutral-color);--tx-segmented-bar-tone-text: var(--tx-chart-segmented-bar-neutral-text)}:host([data-styled]) .tx-segmented-bar__track{gap:var(--tx-chart-segmented-bar-track-gap);height:var(--tx-chart-segmented-bar-track-height);border-radius:var(--tx-chart-segmented-bar-track-radius);background:var(--tx-chart-segmented-bar-track-background)}:host([data-styled]) .tx-segmented-bar__segment{min-width:var(--tx-chart-segmented-bar-segment-min-width);background:var(--tx-segmented-bar-tone);transition:width var(--tx-chart-segmented-bar-duration) ease}:host([data-styled]) .tx-segmented-bar__segment:first-child{border-start-start-radius:var(--tx-chart-segmented-bar-track-radius);border-end-start-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__segment:last-child{border-start-end-radius:var(--tx-chart-segmented-bar-track-radius);border-end-end-radius:var(--tx-chart-segmented-bar-track-radius)}:host([data-styled]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-legend-gap-x);row-gap:var(--tx-chart-segmented-bar-legend-gap-y);font-size:var(--tx-chart-segmented-bar-legend-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-segmented-bar__legend-item{gap:var(--tx-chart-segmented-bar-legend-item-gap)}:host([data-styled]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-dot-size);height:var(--tx-chart-segmented-bar-dot-size);border-radius:var(--tx-radius-full);background:var(--tx-segmented-bar-tone)}:host([data-styled]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-label-color)}:host([data-styled]) .tx-segmented-bar__value{color:var(--tx-chart-segmented-bar-value-color);font-weight:var(--tx-chart-segmented-bar-value-font-weight)}:host([data-styled]) .tx-segmented-bar__percent{color:var(--tx-chart-segmented-bar-percent-color)}:host([data-styled]) .tx-segmented-bar__aside{gap:var(--tx-chart-segmented-bar-legend-item-gap);color:var(--tx-chart-segmented-bar-aside-color)}:host([data-styled].tx-segmented-bar--mono) .tx-segmented-bar__label{font-family:var(--tx-chart-segmented-bar-mono-font-family)}:host([data-styled][data-size=large]){gap:var(--tx-chart-segmented-bar-large-gap)}:host([data-styled][data-size=large]) .tx-segmented-bar__track{height:var(--tx-chart-segmented-bar-large-track-height);border-radius:var(--tx-chart-segmented-bar-large-track-radius)}:host([data-styled][data-size=large]) .tx-segmented-bar__segment{display:flex;align-items:center;justify-content:center;min-width:var(--tx-chart-segmented-bar-large-segment-min-width);border-radius:0;color:var(--tx-segmented-bar-tone-text);font-size:var(--tx-chart-segmented-bar-large-segment-font-size);font-weight:var(--tx-chart-segmented-bar-large-segment-font-weight);font-variant-numeric:tabular-nums}:host([data-styled][data-size=large]) .tx-segmented-bar__legend{column-gap:var(--tx-chart-segmented-bar-large-legend-gap-x);font-size:var(--tx-chart-segmented-bar-large-legend-font-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__dot{width:var(--tx-chart-segmented-bar-large-dot-size);height:var(--tx-chart-segmented-bar-large-dot-size)}:host([data-styled][data-size=large]) .tx-segmented-bar__label{color:var(--tx-chart-segmented-bar-large-label-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-segmented-bar__segment{transition:none}}\n"]
217
227
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-segmented-bar.mjs","names":[],"sources":["../../../../packages/charts/segmented-bar/src/segmented-bar-segments.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.html"],"sourcesContent":["import { TxChartValueFormatter } from '@tectra-ng/charts/core';\nimport { TxSegmentedBarItem, TxSegmentedBarSegment } from './segmented-bar.types';\n\nexport function segmentedBarSegments(\n items: readonly TxSegmentedBarItem[] | null | undefined,\n format: TxChartValueFormatter,\n percentFormat: TxChartValueFormatter = format,\n): TxSegmentedBarSegment[] {\n const list = items ?? [];\n const positive = (value: number) => (Number.isFinite(value) ? Math.max(value, 0) : 0);\n const total = list.reduce((sum, item) => sum + positive(item.value), 0);\n return list.map((item) => {\n const value = positive(item.value);\n const share = total ? (value / total) * 100 : 0;\n return {\n key: item.key,\n label: item.label,\n raw: value,\n value: format(value),\n share,\n percent: `${percentFormat(Math.round(share * 10) / 10)}%`,\n tone: item.tone ?? 'primary',\n isEmpty: value === 0,\n };\n });\n}\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { TxChartValueFormat, chartNumberFormatter } from '@tectra-ng/charts/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { segmentedBarSegments } from './segmented-bar-segments';\nimport { TxSegmentedBarItem, TxSegmentedBarPart, TxSegmentedBarSize } from './segmented-bar.types';\n\n@Component({\n selector: 'tx-segmented-bar',\n templateUrl: './segmented-bar.component.html',\n styleUrl: './segmented-bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-segmented-bar',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-segmented-bar--mono]': 'monoLabels()',\n },\n})\nexport class TxSegmentedBar {\n private locale = inject(TxLocaleService);\n\n readonly items = input<readonly TxSegmentedBarItem[] | null | undefined>([]);\n readonly size = input<TxSegmentedBarSize>('small');\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValue = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showPercent = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly hideEmptyInLegend = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly monoLabels = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxSegmentedBarPart, TxSegmentedBar> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('segmentedBar', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly segments = computed(() =>\n segmentedBarSegments(this.items(), chartNumberFormatter(this.intl(), this.valueFormat()), chartNumberFormatter(this.intl())),\n );\n readonly barSegments = computed(() => this.segments().filter((segment) => !segment.isEmpty));\n readonly legendSegments = computed(() => (this.hideEmptyInLegend() ? this.barSegments() : this.segments()));\n readonly summary = computed(() => {\n const parts = this.segments().map((segment) => `${segment.label}: ${segment.value} (${segment.percent})`);\n return [this.ariaLabel(), ...parts].filter(Boolean).join(', ');\n });\n}\n","@let parts = passThrough();\n<div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n>\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n</div>\n\n@if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>\n}\n"],"mappings":";;;;;;;AAGA,SAAgB,qBACd,OACA,QACA,gBAAuC,QAAM;CAE7C,MAAM,OAAO,SAAS,CAAA;CACtB,MAAM,YAAY,UAAmB,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI;CACnF,MAAM,QAAQ,KAAK,QAAQ,KAAK,SAAS,MAAM,SAAS,KA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A,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,IAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,IAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,kBAAA;IAAA,gCAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UCvB3B;EAgDA,QAAA,CAAA,k8JAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;ADzBa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAd1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,iBAGX,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,kCAAkC;GACnC;GAAA,UAAA;GAAA,QAAA,CAAA,k8JAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-segmented-bar.mjs","names":[],"sources":["../../../../packages/charts/segmented-bar/src/segmented-bar-segments.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.icons.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.theme.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.ts","../../../../packages/charts/segmented-bar/src/segmented-bar.component.html"],"sourcesContent":["import { TxChartValueFormatter } from '@tectra-ng/charts/core';\nimport { TxSegmentedBarItem, TxSegmentedBarSegment } from './segmented-bar.types';\n\nexport function segmentedBarSegments(\n items: readonly TxSegmentedBarItem[] | null | undefined,\n format: TxChartValueFormatter,\n percentFormat: TxChartValueFormatter = format,\n): TxSegmentedBarSegment[] {\n const list = items ?? [];\n const positive = (value: number) => (Number.isFinite(value) ? Math.max(value, 0) : 0);\n const total = list.reduce((sum, item) => sum + positive(item.value), 0);\n return list.map((item) => {\n const value = positive(item.value);\n const share = total ? (value / total) * 100 : 0;\n return {\n key: item.key,\n label: item.label,\n raw: value,\n value: format(value),\n share,\n percent: `${percentFormat(Math.round(share * 10) / 10)}%`,\n tone: item.tone ?? 'primary',\n isEmpty: value === 0,\n };\n });\n}\n","import { TxIconSet, txIconDot, txIconInfo, txIconList } from '@tectra-ng/icons';\n\nexport const SEGMENTED_BAR_ICON_DEFAULTS: TxIconSet = {\n dot: txIconDot,\n info: txIconInfo,\n list: txIconList,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const SEGMENTED_BAR_THEME = {\n chart: chartTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, inject, input } from '@angular/core';\nimport { TxChartValueFormat, chartNumberFormatter } from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { segmentedBarSegments } from './segmented-bar-segments';\nimport { TxSegmentedBarItem, TxSegmentedBarPart, TxSegmentedBarSize } from './segmented-bar.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { SEGMENTED_BAR_ICON_DEFAULTS } from './segmented-bar.icons';\nimport { SEGMENTED_BAR_THEME } from './segmented-bar.theme';\n\n@Component({\n selector: 'tx-segmented-bar',\n templateUrl: './segmented-bar.component.html',\n styleUrl: './segmented-bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-segmented-bar',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-segmented-bar--mono]': 'monoLabels()',\n },\n viewProviders: [provideTxIconDefaults(SEGMENTED_BAR_ICON_DEFAULTS)],\n})\nexport class TxSegmentedBar {\n private readonly segmentedBarTheme = injectTokens(SEGMENTED_BAR_THEME);\n\n private locale = inject(TxLocaleService);\n\n readonly items = input<readonly TxSegmentedBarItem[] | null | undefined>([]);\n readonly size = input<TxSegmentedBarSize>('small');\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValue = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showPercent = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly hideEmptyInLegend = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly monoLabels = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxSegmentedBarPart, TxSegmentedBar> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('segmentedBar', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly segments = computed(() =>\n segmentedBarSegments(this.items(), chartNumberFormatter(this.intl(), this.valueFormat()), chartNumberFormatter(this.intl())),\n );\n readonly barSegments = computed(() => this.segments().filter((segment) => !segment.isEmpty));\n readonly legendSegments = computed(() => (this.hideEmptyInLegend() ? this.barSegments() : this.segments()));\n readonly summary = computed(() => {\n const parts = this.segments().map((segment) => `${segment.label}: ${segment.value} (${segment.percent})`);\n return [this.ariaLabel(), ...parts].filter(Boolean).join(', ');\n });\n}\n","@let parts = passThrough();\n<div\n class=\"tx-segmented-bar__track\"\n [class]=\"parts.track?.class\"\n [style]=\"parts.track?.style\"\n [attr.role]=\"showLegend() ? null : 'img'\"\n [attr.aria-label]=\"showLegend() ? null : summary()\"\n [attr.aria-hidden]=\"showLegend() || null\"\n>\n @for (segment of barSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__segment\"\n [class]=\"parts.segment?.class\"\n [style]=\"parts.segment?.style\"\n [attr.data-tone]=\"segment.tone\"\n [style.width.%]=\"segment.share\"\n [title]=\"segment.label + ': ' + segment.value\"\n >\n @if (size() === 'large') {\n {{ segment.percent }}\n }\n </span>\n }\n</div>\n\n@if (showLegend()) {\n <div class=\"tx-segmented-bar__legend\" [class]=\"parts.legend?.class\" [style]=\"parts.legend?.style\" role=\"list\" [attr.aria-label]=\"ariaLabel() || null\">\n @for (segment of legendSegments(); track segment.key) {\n <span\n class=\"tx-segmented-bar__legend-item\"\n [class]=\"parts.legendItem?.class\"\n [style]=\"parts.legendItem?.style\"\n [attr.data-tone]=\"segment.tone\"\n role=\"listitem\"\n >\n <span class=\"tx-segmented-bar__dot\" [class]=\"parts.dot?.class\" [style]=\"parts.dot?.style\" aria-hidden=\"true\"></span>\n <span class=\"tx-segmented-bar__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">{{ segment.label }}</span>\n @if (showValue()) {\n <span class=\"tx-segmented-bar__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ segment.value }}</span>\n }\n @if (showPercent()) {\n <span class=\"tx-segmented-bar__percent\" [class]=\"parts.percent?.class\" [style]=\"parts.percent?.style\">{{ segment.percent }}</span>\n }\n </span>\n }\n <span class=\"tx-segmented-bar__aside\" [class]=\"parts.aside?.class\" [style]=\"parts.aside?.style\"><ng-content /></span>\n </div>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tB,oBAAoB;IACpB,kCAAkC;GACnC;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,k8JAAA;EAAA,CAAA"}
@@ -1,10 +1,11 @@
1
1
  import { TX_FULL_CIRCLE, TxChartFrame, TxChartTooltipTemplate, arcPath, chartNumberFormatter, initialChartSize, injectChartEntrance, polar, readTokenNumber, seriesColor, textWidth } from "@tectra-ng/charts/core";
2
2
  import * as i0 from "@angular/core";
3
3
  import { ChangeDetectionStrategy, Component, ElementRef, afterRenderEffect, booleanAttribute, computed, contentChild, inject, input, linkedSignal, output, signal, viewChild } from "@angular/core";
4
- import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
4
+ import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
5
5
  import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
6
6
  import { optionalBoolean } from "@tectra-ng/core/utils";
7
- import { toStyleObject } from "@tectra-ng/themes";
7
+ import { chartTokens, toStyleObject } from "@tectra-ng/themes";
8
+ import { provideTxIconDefaults, txIconChartPie } from "@tectra-ng/icons";
8
9
  function sunburstValue(item) {
9
10
  const own = item.value !== null && item.value !== void 0 && Number.isFinite(item.value) ? Math.max(0, item.value) : null;
10
11
  const children = (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0);
@@ -72,6 +73,8 @@ function sunburstArcAt(arcs, x, y, cx, cy) {
72
73
  if (angle < 0) angle += TX_FULL_CIRCLE;
73
74
  return arcs.find((arc) => distance >= arc.inner && distance <= arc.outer && angle >= arc.start && angle < arc.end) ?? null;
74
75
  }
76
+ const SUNBURST_ICON_DEFAULTS = { "chart-pie": txIconChartPie };
77
+ const SUNBURST_THEME = { chart: chartTokens };
75
78
  const DEFAULTS = {
76
79
  hole: .3,
77
80
  corner: 3,
@@ -80,6 +83,7 @@ const DEFAULTS = {
80
83
  const PADDING = 6;
81
84
  const CENTER = "center";
82
85
  var TxSunburstChart = class TxSunburstChart {
86
+ sunburstTheme = injectTokens(SUNBURST_THEME);
83
87
  locale = inject(TxLocaleService);
84
88
  host = inject(ElementRef);
85
89
  translations = injectTranslations();
@@ -561,6 +565,7 @@ var TxSunburstChart = class TxSunburstChart {
561
565
  "zoomReset"
562
566
  ]
563
567
  }],
568
+ viewProviders: [provideTxIconDefaults(SUNBURST_ICON_DEFAULTS)],
564
569
  changeDetection: i0.ChangeDetectionStrategy.OnPush
565
570
  });
566
571
  };
@@ -584,6 +589,7 @@ i0.ɵɵngDeclareClassMetadata({
584
589
  "[class.tx-sunburst-chart--entering]": "entrance.active()",
585
590
  "[class.tx-sunburst-chart--active]": "activeArc() !== null"
586
591
  },
592
+ viewProviders: [provideTxIconDefaults(SUNBURST_ICON_DEFAULTS)],
587
593
  template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n actionKeys\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-pie\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g class=\"tx-sunburst-chart__segments\" [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\">\n @for (segment of segments(); track segment.key) {\n <svg:path\n class=\"tx-sunburst-chart__segment\"\n [class.tx-sunburst-chart__segment--lit]=\"isLit(segment.key)\"\n [class.tx-sunburst-chart__segment--drill]=\"segment.hasChildren && drill()\"\n [class]=\"passThrough().segment?.class\"\n [style]=\"passThrough().segment?.style\"\n [attr.data-key]=\"segment.key\"\n [attr.data-depth]=\"segment.depth\"\n [attr.d]=\"segment.d\"\n [style.fill]=\"segment.fill\"\n />\n }\n </svg:g>\n @if (showLabels()) {\n <svg:g class=\"tx-sunburst-chart__labels\">\n @for (segment of segments(); track segment.key) {\n @if (segment.text) {\n <svg:text\n class=\"tx-sunburst-chart__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n >\n {{ segment.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n <svg:g\n class=\"tx-sunburst-chart__center\"\n [class.tx-sunburst-chart__center--up]=\"center().canGoUp\"\n [class.tx-sunburst-chart__center--hover]=\"active() === 'center'\"\n [class]=\"passThrough().center?.class\"\n [style]=\"passThrough().center?.style\"\n >\n <svg:circle class=\"tx-sunburst-chart__hole\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"holeRadius()\" />\n @if (center().canGoUp) {\n <svg:path\n class=\"tx-sunburst-chart__back\"\n [attr.d]=\"'M' + (fit().cx - 4) + ',' + (fit().cy - centerFont().value * 0.95 - 4) + 'l4,-4l4,4'\"\n />\n }\n <svg:text\n class=\"tx-sunburst-chart__center-value\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55\"\n [style.font-size.px]=\"centerFont().value\"\n >\n {{ center().value }}\n </svg:text>\n <svg:text\n class=\"tx-sunburst-chart__center-label\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55 + 6\"\n [style.font-size.px]=\"centerFont().label\"\n >\n {{ center().label }}\n </svg:text>\n </svg:g>\n</tx-chart-frame>\n",
588
594
  styles: [":host{display:block;min-width:0}:host(.tx-sunburst-chart--fill){height:100%}.tx-sunburst-chart__segments{transform-box:view-box}.tx-sunburst-chart__segment{stroke:transparent}.tx-sunburst-chart__labels,.tx-sunburst-chart__center text,.tx-sunburst-chart__back{pointer-events:none}.tx-sunburst-chart__hole{fill:transparent}.tx-sunburst-chart__back{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}.tx-sunburst-chart__center--up,.tx-sunburst-chart__segment--drill{cursor:pointer}:host([data-styled]) .tx-sunburst-chart__segment{stroke:var(--tx-chart-sunburst-gap-color);stroke-width:var(--tx-chart-sunburst-gap);stroke-linejoin:round;transition:opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-sunburst-chart__label{fill:var(--tx-chart-sunburst-label-color);font-size:var(--tx-chart-sunburst-label-font-size);font-weight:var(--tx-chart-sunburst-label-font-weight);filter:var(--tx-chart-sunburst-label-shadow)}:host([data-styled]) .tx-sunburst-chart__hole{transition:fill var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-sunburst-chart__center--hover .tx-sunburst-chart__hole{fill:var(--tx-chart-sunburst-center-hover-background)}:host([data-styled]) .tx-sunburst-chart__back{stroke:var(--tx-chart-sunburst-center-label-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-sunburst-chart__center-value{fill:var(--tx-chart-sunburst-center-value-color);font-weight:var(--tx-chart-sunburst-center-value-font-weight);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-sunburst-chart__center-label{fill:var(--tx-chart-sunburst-center-label-color)}:host([data-styled].tx-sunburst-chart--active) .tx-sunburst-chart__segment:not(.tx-sunburst-chart__segment--lit){opacity:var(--tx-chart-sunburst-dimmed-opacity)}:host([data-styled].tx-sunburst-chart--entering) .tx-sunburst-chart__segments{animation:tx-sunburst-chart-grow var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}:host([data-styled].tx-sunburst-chart--entering) .tx-sunburst-chart__labels{animation:tx-sunburst-chart-fade var(--tx-chart-motion-enter-duration) ease both}@keyframes tx-sunburst-chart-grow{0%{transform:scale(.82) rotate(-25deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}@keyframes tx-sunburst-chart-fade{0%,50%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-sunburst-chart__segment,:host([data-styled]) .tx-sunburst-chart__segments,:host([data-styled]) .tx-sunburst-chart__labels,:host([data-styled]) .tx-sunburst-chart__hole{transition:none;animation:none}}\n"]
589
595
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-sunburst.mjs","names":[],"sources":["../../../../packages/charts/sunburst/src/sunburst-layout.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.html"],"sourcesContent":["import { TX_FULL_CIRCLE, seriesColor } from '@tectra-ng/charts/core';\nimport { TxSunburstArc, TxSunburstItem } from './sunburst-chart.types';\n\nexport function sunburstValue(item: TxSunburstItem): number {\n const own = item.value !== null && item.value !== undefined && Number.isFinite(item.value) ? Math.max(0, item.value) : null;\n const children = (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0);\n return own ?? children;\n}\n\nexport function sunburstFocus(roots: readonly TxSunburstItem[], path: readonly number[]): { items: readonly TxSunburstItem[]; trail: TxSunburstItem[] } {\n let items = roots;\n const trail: TxSunburstItem[] = [];\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n trail.push(item);\n items = item.children ?? [];\n }\n return { items, trail };\n}\n\nexport interface TxSunburstOptions {\n levels: number;\n radius: number;\n hole: number;\n focus: readonly number[];\n}\n\nexport function sunburstArcs(roots: readonly TxSunburstItem[], options: TxSunburstOptions): TxSunburstArc[] {\n const { items, trail } = sunburstFocus(roots, options.focus);\n const levels = Math.max(1, Math.floor(options.levels));\n const inner = options.radius * Math.min(0.9, Math.max(0, options.hole));\n const ring = (options.radius - inner) / levels;\n const sum = items.reduce((acc, item) => acc + sunburstValue(item), 0);\n const focused = trail[trail.length - 1];\n const total = focused ? Math.max(sunburstValue(focused), sum) : sum;\n const arcs: TxSunburstArc[] = [];\n const topIndex = options.focus[0];\n const inherited = trail.reduce<string | undefined>((color, item) => item.color ?? color, undefined);\n\n const walk = (list: readonly TxSunburstItem[], path: number[], start: number, span: number, depth: number, parentValue: number, color: string | undefined) => {\n let cursor = start;\n list.forEach((item, index) => {\n const value = sunburstValue(item);\n if (value <= 0) return;\n const sweep = parentValue > 0 ? (value / parentValue) * span : 0;\n const itemPath = [...path, index];\n const base = item.color ?? color ?? seriesColor(undefined, topIndex ?? itemPath[0]);\n arcs.push({\n key: itemPath.join('.'),\n path: itemPath,\n item,\n label: item.label,\n value,\n depth,\n start: cursor,\n end: cursor + sweep,\n inner: inner + (depth - 1) * ring,\n outer: inner + depth * ring,\n base,\n share: total ? value / total : 0,\n parentShare: parentValue ? value / parentValue : 0,\n hasChildren: !!item.children?.some((child) => sunburstValue(child) > 0),\n });\n if (depth < levels && item.children?.length) {\n walk(item.children, itemPath, cursor, sweep, depth + 1, Math.max(value, (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0)), item.color ?? color ?? base);\n }\n cursor += sweep;\n });\n };\n walk(items, [...options.focus], 0, TX_FULL_CIRCLE, 1, total, inherited);\n return arcs;\n}\n\nexport function sunburstArcAt(arcs: readonly TxSunburstArc[], x: number, y: number, cx: number, cy: number): TxSunburstArc | null {\n const distance = Math.hypot(x - cx, y - cy);\n let angle = Math.atan2(x - cx, -(y - cy));\n if (angle < 0) angle += TX_FULL_CIRCLE;\n return arcs.find((arc) => distance >= arc.inner && distance <= arc.outer && angle >= arc.start && angle < arc.end) ?? null;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipPlacement,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n arcPath,\n chartNumberFormatter,\n initialChartSize,\n injectChartEntrance,\n polar,\n readTokenNumber,\n textWidth,\n} from '@tectra-ng/charts/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { sunburstArcAt, sunburstArcs, sunburstFocus, sunburstValue } from './sunburst-layout';\nimport { TxSunburstArc, TxSunburstChartPart, TxSunburstEvent, TxSunburstItem } from './sunburst-chart.types';\n\nconst DEFAULTS = { hole: 0.3, corner: 3, fontSize: 11 };\nconst PADDING = 6;\nconst CENTER = 'center';\n\n@Component({\n selector: 'tx-sunburst-chart',\n imports: [TxChartFrame],\n templateUrl: './sunburst-chart.component.html',\n styleUrl: './sunburst-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-sunburst-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-sunburst-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-sunburst-chart--entering]': 'entrance.active()',\n '[class.tx-sunburst-chart--active]': 'activeArc() !== null',\n },\n})\nexport class TxSunburstChart {\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly data = input<TxSunburstItem | readonly TxSunburstItem[] | null | undefined>([]);\n readonly levels = input(3);\n readonly height = input<TxChartHeight>(380);\n readonly showLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly drill = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly totalLabel = input('');\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxSunburstChartPart, TxSunburstChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly segmentClick = output<TxSunburstEvent>();\n readonly focusChange = output<string[]>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('sunburstChart', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n readonly geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly roots = computed<readonly TxSunburstItem[]>(() => {\n const data = this.data();\n return !data ? [] : Array.isArray(data) ? data : [data as TxSunburstItem];\n });\n readonly focus = linkedSignal<readonly TxSunburstItem[], number[]>({ source: this.roots, computation: () => [] });\n readonly active = signal<string | null>(null);\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n readonly isEmpty = computed(() => !this.roots().some((item) => sunburstValue(item) > 0));\n\n readonly fit = computed(() => {\n const { width, height } = this.size();\n return { cx: width / 2, cy: height / 2, radius: Math.max(10, Math.min(width, height) / 2 - PADDING) };\n });\n\n readonly arcs = computed(() => sunburstArcs(this.roots(), { levels: this.levels(), radius: this.fit().radius, hole: this.geometry().hole, focus: this.focus() }));\n readonly inner = computed(() => this.fit().radius * Math.min(0.9, Math.max(0, this.geometry().hole)));\n readonly holeRadius = computed(() => Math.max(0, this.inner() - 2));\n readonly trail = computed(() => sunburstFocus(this.roots(), this.focus()).trail);\n readonly activeArc = computed(() => {\n const key = this.active();\n return key && key !== CENTER ? (this.arcs().find((arc) => arc.key === key) ?? null) : null;\n });\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => {\n const format = chartNumberFormatter(this.intl(), 'percent');\n return (share: number) => format(Number((share * 100).toFixed(1)));\n });\n\n readonly segments = computed(() => {\n const { cx, cy } = this.fit();\n const corner = this.geometry().corner;\n const fontSize = this.geometry().fontSize;\n return this.arcs().map((arc) => {\n const middle = (arc.start + arc.end) / 2;\n const radius = (arc.inner + arc.outer) / 2;\n const at = polar(cx, cy, radius, middle);\n const room = (arc.end - arc.start) * radius;\n const fits = this.showLabels() && room >= textWidth(arc.label, fontSize) + 8 && arc.outer - arc.inner >= fontSize + 6;\n return {\n ...arc,\n d: arcPath(cx, cy, arc.inner, arc.outer, arc.start, arc.end, corner),\n fill: arc.depth > 1 ? `color-mix(in srgb, ${arc.base} calc(100% - ${arc.depth - 1} * var(--tx-chart-sunburst-level-fade, 22%)), var(--tx-chart-sunburst-fade-base, transparent))` : arc.base,\n labelX: at.x,\n labelY: at.y,\n text: fits ? arc.label : null,\n };\n });\n });\n\n readonly center = computed(() => {\n const t = this.translations();\n const trail = this.trail();\n const focused = trail[trail.length - 1];\n const value = focused ? sunburstValue(focused) : this.roots().reduce((sum, item) => sum + sunburstValue(item), 0);\n return { label: focused?.label ?? (this.totalLabel() || t.chartTotal), value: this.valueFormatter()(value), canGoUp: trail.length > 0 && this.drill() };\n });\n\n readonly centerFont = computed(() => {\n const inner = this.inner();\n return { value: Math.max(12, Math.min(24, inner * 0.32)), label: Math.max(10, Math.min(13, inner * 0.17)) };\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const arc = this.activeArc();\n if (!arc || !this.showTooltip()) return null;\n const t = this.translations();\n const { cx, cy } = this.fit();\n const middle = (arc.start + arc.end) / 2;\n const at = polar(cx, cy, arc.outer + 2, middle);\n const sin = Math.sin(middle);\n const cos = Math.cos(middle);\n const placement: TxChartTooltipPlacement = Math.abs(sin) >= Math.SQRT1_2 ? (sin > 0 ? 'right' : 'left') : cos > 0 ? 'top' : 'bottom';\n const names = this.names(arc.path);\n return {\n title: names.slice(0, -1).join(' / '),\n rows: [\n { label: arc.label, value: this.valueFormatter()(arc.value), color: arc.base, raw: arc.value, seriesIndex: 0, active: true },\n ...(arc.depth > 1 || this.focus().length ? [{ label: t.chartOfParent, value: this.percentFormatter()(arc.parentShare), color: 'transparent', raw: arc.parentShare, seriesIndex: 1 }] : []),\n { label: t.chartOfTotal, value: this.percentFormatter()(arc.share), color: 'transparent', raw: arc.share, seriesIndex: 2 },\n ],\n index: 0,\n x: at.x,\n y: at.y,\n placement,\n };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const top = this.arcs().filter((arc) => arc.depth === 1);\n const parts = top.map((arc) => `${arc.label} ${this.percentFormatter()(arc.share)}`);\n const text = `${t.chartSunburst}, ${this.center().label} ${this.center().value}: ${parts.join(', ')}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'share', label: t.chartOfTotal },\n ],\n rows: this.arcs().map((arc) => ({ label: this.names(arc.path).join(' / '), cells: [this.valueFormatter()(arc.value), this.percentFormatter()(arc.share)] })),\n };\n });\n\n constructor() {\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n isLit(key: string): boolean {\n const active = this.activeArc();\n return !active || active.key === key || active.key.startsWith(`${key}.`);\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const { cx, cy } = this.fit();\n const inCenter = Math.hypot(event.x - cx, event.y - cy) < this.inner();\n const arc = inCenter ? null : sunburstArcAt(this.arcs(), event.x, event.y, cx, cy);\n this.active.set(inCenter && this.center().canGoUp ? CENTER : (arc?.key ?? null));\n if (event.type !== 'click') return;\n if (inCenter) this.up();\n else if (arc) this.select(arc);\n }\n\n onNavigate(event: KeyboardEvent): void {\n const arcs = this.arcs();\n if (!arcs.length) return;\n const current = this.activeArc();\n if (event.key === 'Escape' || event.key === 'Backspace') {\n if (current) this.active.set(null);\n else this.up();\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n if (current) this.select(current);\n return;\n }\n let next: TxSunburstArc | undefined;\n if (!current) {\n next = arcs.find((arc) => arc.depth === 1);\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n const siblings = arcs.filter((arc) => arc.depth === current.depth && arc.path.slice(0, -1).join('.') === current.path.slice(0, -1).join('.'));\n const at = siblings.indexOf(current);\n next = siblings[(at + (event.key === 'ArrowRight' ? 1 : -1) + siblings.length) % siblings.length];\n } else if (event.key === 'ArrowDown') {\n next = arcs.find((arc) => arc.depth === current.depth + 1 && arc.key.startsWith(`${current.key}.`)) ?? current;\n } else if (event.key === 'ArrowUp') {\n next = arcs.find((arc) => arc.key === current.path.slice(0, -1).join('.')) ?? current;\n } else if (event.key === 'Home' || event.key === 'End') {\n const top = arcs.filter((arc) => arc.depth === 1);\n next = event.key === 'Home' ? top[0] : top[top.length - 1];\n }\n if (!next) return;\n this.active.set(next.key);\n this.frame()?.announce(`${this.names(next.path).join(' / ')}: ${this.valueFormatter()(next.value)}, ${this.percentFormatter()(next.share)}`);\n }\n\n up(): void {\n if (!this.focus().length || !this.drill()) return;\n this.focus.update((path) => path.slice(0, -1));\n this.afterDrill();\n }\n\n private select(arc: TxSunburstArc): void {\n this.segmentClick.emit({ path: this.names(arc.path), value: arc.value, item: arc.item });\n if (!this.drill() || !arc.hasChildren) return;\n this.focus.set(arc.path);\n this.afterDrill();\n }\n\n private afterDrill(): void {\n this.active.set(null);\n this.entrance.play();\n const names = this.names(this.focus());\n this.focusChange.emit(names);\n this.frame()?.announce(names.length ? names.join(' / ') : this.center().label);\n }\n\n private names(path: readonly number[]): string[] {\n const names: string[] = [];\n let items = this.roots();\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n names.push(item.label);\n items = item.children ?? [];\n }\n return names;\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n hole: readTokenNumber(element, '--tx-chart-sunburst-hole', DEFAULTS.hole),\n corner: this.isUnstyled() ? 0 : readTokenNumber(element, '--tx-chart-sunburst-corner-radius', DEFAULTS.corner),\n fontSize: readTokenNumber(element, '--tx-chart-sunburst-label-font-size', DEFAULTS.fontSize),\n };\n const current = this.geometry();\n if (current.hole !== next.hole || current.corner !== next.corner || current.fontSize !== next.fontSize) this.geometry.set(next);\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n actionKeys\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-pie\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g class=\"tx-sunburst-chart__segments\" [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\">\n @for (segment of segments(); track segment.key) {\n <svg:path\n class=\"tx-sunburst-chart__segment\"\n [class.tx-sunburst-chart__segment--lit]=\"isLit(segment.key)\"\n [class.tx-sunburst-chart__segment--drill]=\"segment.hasChildren && drill()\"\n [class]=\"passThrough().segment?.class\"\n [style]=\"passThrough().segment?.style\"\n [attr.data-key]=\"segment.key\"\n [attr.data-depth]=\"segment.depth\"\n [attr.d]=\"segment.d\"\n [style.fill]=\"segment.fill\"\n />\n }\n </svg:g>\n @if (showLabels()) {\n <svg:g class=\"tx-sunburst-chart__labels\">\n @for (segment of segments(); track segment.key) {\n @if (segment.text) {\n <svg:text\n class=\"tx-sunburst-chart__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n >\n {{ segment.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n <svg:g\n class=\"tx-sunburst-chart__center\"\n [class.tx-sunburst-chart__center--up]=\"center().canGoUp\"\n [class.tx-sunburst-chart__center--hover]=\"active() === 'center'\"\n [class]=\"passThrough().center?.class\"\n [style]=\"passThrough().center?.style\"\n >\n <svg:circle class=\"tx-sunburst-chart__hole\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"holeRadius()\" />\n @if (center().canGoUp) {\n <svg:path\n class=\"tx-sunburst-chart__back\"\n [attr.d]=\"'M' + (fit().cx - 4) + ',' + (fit().cy - centerFont().value * 0.95 - 4) + 'l4,-4l4,4'\"\n />\n }\n <svg:text\n class=\"tx-sunburst-chart__center-value\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55\"\n [style.font-size.px]=\"centerFont().value\"\n >\n {{ center().value }}\n </svg:text>\n <svg:text\n class=\"tx-sunburst-chart__center-label\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55 + 6\"\n [style.font-size.px]=\"centerFont().label\"\n >\n {{ center().label }}\n </svg:text>\n </svg:g>\n</tx-chart-frame>\n"],"mappings":";;;;;;;AAGA,SAAgB,cAAc,MAAoB;CAChD,MAAM,MAAM,KAAK,UAAU,QAAQ,KAAK,UAAU,UAAa,OAAO,SAAS,KAAK,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI;CACvH,MAAM,YAAY,KAAK,YAAY,CAAA,EAAA,CAAI,QAAQ,KAAK,UAAU,MAAM,cAAc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AA,aAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC3B,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-sunburst.mjs","names":[],"sources":["../../../../packages/charts/sunburst/src/sunburst-layout.ts","../../../../packages/charts/sunburst/src/sunburst.icons.ts","../../../../packages/charts/sunburst/src/sunburst.theme.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.ts","../../../../packages/charts/sunburst/src/sunburst-chart.component.html"],"sourcesContent":["import { TX_FULL_CIRCLE, seriesColor } from '@tectra-ng/charts/core';\nimport { TxSunburstArc, TxSunburstItem } from './sunburst-chart.types';\n\nexport function sunburstValue(item: TxSunburstItem): number {\n const own = item.value !== null && item.value !== undefined && Number.isFinite(item.value) ? Math.max(0, item.value) : null;\n const children = (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0);\n return own ?? children;\n}\n\nexport function sunburstFocus(roots: readonly TxSunburstItem[], path: readonly number[]): { items: readonly TxSunburstItem[]; trail: TxSunburstItem[] } {\n let items = roots;\n const trail: TxSunburstItem[] = [];\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n trail.push(item);\n items = item.children ?? [];\n }\n return { items, trail };\n}\n\nexport interface TxSunburstOptions {\n levels: number;\n radius: number;\n hole: number;\n focus: readonly number[];\n}\n\nexport function sunburstArcs(roots: readonly TxSunburstItem[], options: TxSunburstOptions): TxSunburstArc[] {\n const { items, trail } = sunburstFocus(roots, options.focus);\n const levels = Math.max(1, Math.floor(options.levels));\n const inner = options.radius * Math.min(0.9, Math.max(0, options.hole));\n const ring = (options.radius - inner) / levels;\n const sum = items.reduce((acc, item) => acc + sunburstValue(item), 0);\n const focused = trail[trail.length - 1];\n const total = focused ? Math.max(sunburstValue(focused), sum) : sum;\n const arcs: TxSunburstArc[] = [];\n const topIndex = options.focus[0];\n const inherited = trail.reduce<string | undefined>((color, item) => item.color ?? color, undefined);\n\n const walk = (list: readonly TxSunburstItem[], path: number[], start: number, span: number, depth: number, parentValue: number, color: string | undefined) => {\n let cursor = start;\n list.forEach((item, index) => {\n const value = sunburstValue(item);\n if (value <= 0) return;\n const sweep = parentValue > 0 ? (value / parentValue) * span : 0;\n const itemPath = [...path, index];\n const base = item.color ?? color ?? seriesColor(undefined, topIndex ?? itemPath[0]);\n arcs.push({\n key: itemPath.join('.'),\n path: itemPath,\n item,\n label: item.label,\n value,\n depth,\n start: cursor,\n end: cursor + sweep,\n inner: inner + (depth - 1) * ring,\n outer: inner + depth * ring,\n base,\n share: total ? value / total : 0,\n parentShare: parentValue ? value / parentValue : 0,\n hasChildren: !!item.children?.some((child) => sunburstValue(child) > 0),\n });\n if (depth < levels && item.children?.length) {\n walk(item.children, itemPath, cursor, sweep, depth + 1, Math.max(value, (item.children ?? []).reduce((sum, child) => sum + sunburstValue(child), 0)), item.color ?? color ?? base);\n }\n cursor += sweep;\n });\n };\n walk(items, [...options.focus], 0, TX_FULL_CIRCLE, 1, total, inherited);\n return arcs;\n}\n\nexport function sunburstArcAt(arcs: readonly TxSunburstArc[], x: number, y: number, cx: number, cy: number): TxSunburstArc | null {\n const distance = Math.hypot(x - cx, y - cy);\n let angle = Math.atan2(x - cx, -(y - cy));\n if (angle < 0) angle += TX_FULL_CIRCLE;\n return arcs.find((arc) => distance >= arc.inner && distance <= arc.outer && angle >= arc.start && angle < arc.end) ?? null;\n}\n","import { TxIconSet, txIconChartPie } from '@tectra-ng/icons';\n\nexport const SUNBURST_ICON_DEFAULTS: TxIconSet = {\n 'chart-pie': txIconChartPie,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const SUNBURST_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipPlacement,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n arcPath,\n chartNumberFormatter,\n initialChartSize,\n injectChartEntrance,\n polar,\n readTokenNumber,\n textWidth,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { sunburstArcAt, sunburstArcs, sunburstFocus, sunburstValue } from './sunburst-layout';\nimport { TxSunburstArc, TxSunburstChartPart, TxSunburstEvent, TxSunburstItem } from './sunburst-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { SUNBURST_ICON_DEFAULTS } from './sunburst.icons';\nimport { SUNBURST_THEME } from './sunburst.theme';\n\nconst DEFAULTS = { hole: 0.3, corner: 3, fontSize: 11 };\nconst PADDING = 6;\nconst CENTER = 'center';\n\n@Component({\n selector: 'tx-sunburst-chart',\n imports: [TxChartFrame],\n templateUrl: './sunburst-chart.component.html',\n styleUrl: './sunburst-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-sunburst-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-sunburst-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-sunburst-chart--entering]': 'entrance.active()',\n '[class.tx-sunburst-chart--active]': 'activeArc() !== null',\n },\n viewProviders: [provideTxIconDefaults(SUNBURST_ICON_DEFAULTS)],\n})\nexport class TxSunburstChart {\n private readonly sunburstTheme = injectTokens(SUNBURST_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly data = input<TxSunburstItem | readonly TxSunburstItem[] | null | undefined>([]);\n readonly levels = input(3);\n readonly height = input<TxChartHeight>(380);\n readonly showLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly drill = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly totalLabel = input('');\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxSunburstChartPart, TxSunburstChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly segmentClick = output<TxSunburstEvent>();\n readonly focusChange = output<string[]>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('sunburstChart', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n readonly geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly roots = computed<readonly TxSunburstItem[]>(() => {\n const data = this.data();\n return !data ? [] : Array.isArray(data) ? data : [data as TxSunburstItem];\n });\n readonly focus = linkedSignal<readonly TxSunburstItem[], number[]>({ source: this.roots, computation: () => [] });\n readonly active = signal<string | null>(null);\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n readonly isEmpty = computed(() => !this.roots().some((item) => sunburstValue(item) > 0));\n\n readonly fit = computed(() => {\n const { width, height } = this.size();\n return { cx: width / 2, cy: height / 2, radius: Math.max(10, Math.min(width, height) / 2 - PADDING) };\n });\n\n readonly arcs = computed(() => sunburstArcs(this.roots(), { levels: this.levels(), radius: this.fit().radius, hole: this.geometry().hole, focus: this.focus() }));\n readonly inner = computed(() => this.fit().radius * Math.min(0.9, Math.max(0, this.geometry().hole)));\n readonly holeRadius = computed(() => Math.max(0, this.inner() - 2));\n readonly trail = computed(() => sunburstFocus(this.roots(), this.focus()).trail);\n readonly activeArc = computed(() => {\n const key = this.active();\n return key && key !== CENTER ? (this.arcs().find((arc) => arc.key === key) ?? null) : null;\n });\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => {\n const format = chartNumberFormatter(this.intl(), 'percent');\n return (share: number) => format(Number((share * 100).toFixed(1)));\n });\n\n readonly segments = computed(() => {\n const { cx, cy } = this.fit();\n const corner = this.geometry().corner;\n const fontSize = this.geometry().fontSize;\n return this.arcs().map((arc) => {\n const middle = (arc.start + arc.end) / 2;\n const radius = (arc.inner + arc.outer) / 2;\n const at = polar(cx, cy, radius, middle);\n const room = (arc.end - arc.start) * radius;\n const fits = this.showLabels() && room >= textWidth(arc.label, fontSize) + 8 && arc.outer - arc.inner >= fontSize + 6;\n return {\n ...arc,\n d: arcPath(cx, cy, arc.inner, arc.outer, arc.start, arc.end, corner),\n fill: arc.depth > 1 ? `color-mix(in srgb, ${arc.base} calc(100% - ${arc.depth - 1} * var(--tx-chart-sunburst-level-fade, 22%)), var(--tx-chart-sunburst-fade-base, transparent))` : arc.base,\n labelX: at.x,\n labelY: at.y,\n text: fits ? arc.label : null,\n };\n });\n });\n\n readonly center = computed(() => {\n const t = this.translations();\n const trail = this.trail();\n const focused = trail[trail.length - 1];\n const value = focused ? sunburstValue(focused) : this.roots().reduce((sum, item) => sum + sunburstValue(item), 0);\n return { label: focused?.label ?? (this.totalLabel() || t.chartTotal), value: this.valueFormatter()(value), canGoUp: trail.length > 0 && this.drill() };\n });\n\n readonly centerFont = computed(() => {\n const inner = this.inner();\n return { value: Math.max(12, Math.min(24, inner * 0.32)), label: Math.max(10, Math.min(13, inner * 0.17)) };\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const arc = this.activeArc();\n if (!arc || !this.showTooltip()) return null;\n const t = this.translations();\n const { cx, cy } = this.fit();\n const middle = (arc.start + arc.end) / 2;\n const at = polar(cx, cy, arc.outer + 2, middle);\n const sin = Math.sin(middle);\n const cos = Math.cos(middle);\n const placement: TxChartTooltipPlacement = Math.abs(sin) >= Math.SQRT1_2 ? (sin > 0 ? 'right' : 'left') : cos > 0 ? 'top' : 'bottom';\n const names = this.names(arc.path);\n return {\n title: names.slice(0, -1).join(' / '),\n rows: [\n { label: arc.label, value: this.valueFormatter()(arc.value), color: arc.base, raw: arc.value, seriesIndex: 0, active: true },\n ...(arc.depth > 1 || this.focus().length ? [{ label: t.chartOfParent, value: this.percentFormatter()(arc.parentShare), color: 'transparent', raw: arc.parentShare, seriesIndex: 1 }] : []),\n { label: t.chartOfTotal, value: this.percentFormatter()(arc.share), color: 'transparent', raw: arc.share, seriesIndex: 2 },\n ],\n index: 0,\n x: at.x,\n y: at.y,\n placement,\n };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const top = this.arcs().filter((arc) => arc.depth === 1);\n const parts = top.map((arc) => `${arc.label} ${this.percentFormatter()(arc.share)}`);\n const text = `${t.chartSunburst}, ${this.center().label} ${this.center().value}: ${parts.join(', ')}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'share', label: t.chartOfTotal },\n ],\n rows: this.arcs().map((arc) => ({ label: this.names(arc.path).join(' / '), cells: [this.valueFormatter()(arc.value), this.percentFormatter()(arc.share)] })),\n };\n });\n\n constructor() {\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n isLit(key: string): boolean {\n const active = this.activeArc();\n return !active || active.key === key || active.key.startsWith(`${key}.`);\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const { cx, cy } = this.fit();\n const inCenter = Math.hypot(event.x - cx, event.y - cy) < this.inner();\n const arc = inCenter ? null : sunburstArcAt(this.arcs(), event.x, event.y, cx, cy);\n this.active.set(inCenter && this.center().canGoUp ? CENTER : (arc?.key ?? null));\n if (event.type !== 'click') return;\n if (inCenter) this.up();\n else if (arc) this.select(arc);\n }\n\n onNavigate(event: KeyboardEvent): void {\n const arcs = this.arcs();\n if (!arcs.length) return;\n const current = this.activeArc();\n if (event.key === 'Escape' || event.key === 'Backspace') {\n if (current) this.active.set(null);\n else this.up();\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n if (current) this.select(current);\n return;\n }\n let next: TxSunburstArc | undefined;\n if (!current) {\n next = arcs.find((arc) => arc.depth === 1);\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n const siblings = arcs.filter((arc) => arc.depth === current.depth && arc.path.slice(0, -1).join('.') === current.path.slice(0, -1).join('.'));\n const at = siblings.indexOf(current);\n next = siblings[(at + (event.key === 'ArrowRight' ? 1 : -1) + siblings.length) % siblings.length];\n } else if (event.key === 'ArrowDown') {\n next = arcs.find((arc) => arc.depth === current.depth + 1 && arc.key.startsWith(`${current.key}.`)) ?? current;\n } else if (event.key === 'ArrowUp') {\n next = arcs.find((arc) => arc.key === current.path.slice(0, -1).join('.')) ?? current;\n } else if (event.key === 'Home' || event.key === 'End') {\n const top = arcs.filter((arc) => arc.depth === 1);\n next = event.key === 'Home' ? top[0] : top[top.length - 1];\n }\n if (!next) return;\n this.active.set(next.key);\n this.frame()?.announce(`${this.names(next.path).join(' / ')}: ${this.valueFormatter()(next.value)}, ${this.percentFormatter()(next.share)}`);\n }\n\n up(): void {\n if (!this.focus().length || !this.drill()) return;\n this.focus.update((path) => path.slice(0, -1));\n this.afterDrill();\n }\n\n private select(arc: TxSunburstArc): void {\n this.segmentClick.emit({ path: this.names(arc.path), value: arc.value, item: arc.item });\n if (!this.drill() || !arc.hasChildren) return;\n this.focus.set(arc.path);\n this.afterDrill();\n }\n\n private afterDrill(): void {\n this.active.set(null);\n this.entrance.play();\n const names = this.names(this.focus());\n this.focusChange.emit(names);\n this.frame()?.announce(names.length ? names.join(' / ') : this.center().label);\n }\n\n private names(path: readonly number[]): string[] {\n const names: string[] = [];\n let items = this.roots();\n for (const index of path) {\n const item = items[index];\n if (!item) break;\n names.push(item.label);\n items = item.children ?? [];\n }\n return names;\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n hole: readTokenNumber(element, '--tx-chart-sunburst-hole', DEFAULTS.hole),\n corner: this.isUnstyled() ? 0 : readTokenNumber(element, '--tx-chart-sunburst-corner-radius', DEFAULTS.corner),\n fontSize: readTokenNumber(element, '--tx-chart-sunburst-label-font-size', DEFAULTS.fontSize),\n };\n const current = this.geometry();\n if (current.hole !== next.hole || current.corner !== next.corner || current.fontSize !== next.fontSize) this.geometry.set(next);\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n actionKeys\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-pie\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g class=\"tx-sunburst-chart__segments\" [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\">\n @for (segment of segments(); track segment.key) {\n <svg:path\n class=\"tx-sunburst-chart__segment\"\n [class.tx-sunburst-chart__segment--lit]=\"isLit(segment.key)\"\n [class.tx-sunburst-chart__segment--drill]=\"segment.hasChildren && drill()\"\n [class]=\"passThrough().segment?.class\"\n [style]=\"passThrough().segment?.style\"\n [attr.data-key]=\"segment.key\"\n [attr.data-depth]=\"segment.depth\"\n [attr.d]=\"segment.d\"\n [style.fill]=\"segment.fill\"\n />\n }\n </svg:g>\n @if (showLabels()) {\n <svg:g class=\"tx-sunburst-chart__labels\">\n @for (segment of segments(); track segment.key) {\n @if (segment.text) {\n <svg:text\n class=\"tx-sunburst-chart__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n >\n {{ segment.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n <svg:g\n class=\"tx-sunburst-chart__center\"\n [class.tx-sunburst-chart__center--up]=\"center().canGoUp\"\n [class.tx-sunburst-chart__center--hover]=\"active() === 'center'\"\n [class]=\"passThrough().center?.class\"\n [style]=\"passThrough().center?.style\"\n >\n <svg:circle class=\"tx-sunburst-chart__hole\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"holeRadius()\" />\n @if (center().canGoUp) {\n <svg:path\n class=\"tx-sunburst-chart__back\"\n [attr.d]=\"'M' + (fit().cx - 4) + ',' + (fit().cy - centerFont().value * 0.95 - 4) + 'l4,-4l4,4'\"\n />\n }\n <svg:text\n class=\"tx-sunburst-chart__center-value\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55\"\n [style.font-size.px]=\"centerFont().value\"\n >\n {{ center().value }}\n </svg:text>\n <svg:text\n class=\"tx-sunburst-chart__center-label\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"fit().cy + centerFont().value * 0.3 - centerFont().label * 0.55 + 6\"\n [style.font-size.px]=\"centerFont().label\"\n >\n {{ center().label }}\n </svg:text>\n </svg:g>\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAGA,SAAgB,cAAc,MAAoB;CAChD,MAAM,MAAM,KAAK,UAAU,QAAQ,KAAK,UAAU,UAAa,OAAO,SAAS,KAAK,KAAK,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI;CACvH,MAAM,YAAY,KAAK,YAAY,CAAA,EAAA,CAAI,QAAQ,KAAK,UAAU,MAAM,cAAc,KAAK,GAAG,CAAC;CAC3F,OAAO,OAAO;AAChB;AAEA,SAAgB,cAAc,OAAkC,MAAuB;CACrF,IAAI,QAAQ;CACZ,MAAM,QAA0B,CAAA;CAChC,KAAK,MAAM,SAAS,MAAM;EACxB,MAAM,OAAO,MAAM;EACnB,IAAI,CAAC,MAAM;EACX,MAAM,KAAK,IAAI;EACf,QAAQ,KAAK,YAAY,CAAA;CAC3B;CACA,OAAO;EAAE;EAAO;CAAK;AACvB;AASA,SAAgB,aAAa,OAAkC,SAA0B;CACvF,MAAM,EAAE,OAAO,UAAU,cAAc,OAAO,QAAQ,KAAK;CAC3D,MAAM,SAAS,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,MAAM,CAAC;CACrD,MAAM,QAAQ,QAAQ,SAAS,KAAK,IAAI,IAAK,KAAK,IAAI,GAAG,QAAQ,IAAI,CAAC;CACtE,MAAM,QAAQ,QAAQ,SAAS,SAAS;CACxC,MAAM,MAAM,MAAM,QAAQ,KAAK,SAAS,MAAM,cAAc,IAAI,GAAG,CAAC;CACpE,MAAM,UAAU,MAAM,MAAM,SAAS;CACrC,MAAM,QAAQ,UAAU,KAAK,IAAI,cAAc,OAAO,GAAG,GAAG,IA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A,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC3B,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -2,10 +2,11 @@ import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, inject, input, linkedSignal, output, signal, viewChild } from "@angular/core";
3
3
  import { NgTemplateOutlet } from "@angular/common";
4
4
  import { TxChartFrame, TxChartTooltipTemplate, chartNumberFormatter, chartSummary, initialChartSize, injectChartEntrance, seriesColor } from "@tectra-ng/charts/core";
5
- import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
6
6
  import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
7
7
  import { optionalBoolean } from "@tectra-ng/core/utils";
8
- import { toStyleObject } from "@tectra-ng/themes";
8
+ import { chartTokens, toStyleObject } from "@tectra-ng/themes";
9
+ import { provideTxIconDefaults, txIconThLarge } from "@tectra-ng/icons";
9
10
  function worst(row, side) {
10
11
  const sum = row.reduce((total, value) => total + value, 0);
11
12
  if (!sum || !side) return Infinity;
@@ -106,9 +107,12 @@ i0.ɵɵngDeclareClassMetadata({
106
107
  args: [{ selector: "ng-template[txTreemapTile]" }]
107
108
  }]
108
109
  });
110
+ const TREEMAP_ICON_DEFAULTS = { "th-large": txIconThLarge };
111
+ const TREEMAP_THEME = { chart: chartTokens };
109
112
  const MIN_LABEL_WIDTH = 36;
110
113
  const GROUP_HEADER = 22;
111
114
  var TxTreemap = class TxTreemap {
115
+ treemapTheme = injectTokens(TREEMAP_THEME);
112
116
  locale = inject(TxLocaleService);
113
117
  translations = injectTranslations();
114
118
  items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
@@ -520,6 +524,7 @@ var TxTreemap = class TxTreemap {
520
524
  "ngTemplateOutletInjector"
521
525
  ]
522
526
  }],
527
+ viewProviders: [provideTxIconDefaults(TREEMAP_ICON_DEFAULTS)],
523
528
  changeDetection: i0.ChangeDetectionStrategy.OnPush
524
529
  });
525
530
  };
@@ -542,6 +547,7 @@ i0.ɵɵngDeclareClassMetadata({
542
547
  "[class.tx-treemap--entering]": "entrance.active()",
543
548
  "[class.tx-treemap--hovering]": "hovered() !== null"
544
549
  },
550
+ viewProviders: [provideTxIconDefaults(TREEMAP_ICON_DEFAULTS)],
545
551
  template: "@let parts = passThrough();\n<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n emptyIcon=\"th-large\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"parts\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"hovered.set(null)\"\n>\n @for (group of layout().groups; track group.key) {\n <svg:g class=\"tx-treemap__group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <svg:rect class=\"tx-treemap__group-box\" [attr.x]=\"group.x\" [attr.y]=\"group.y\" [attr.width]=\"group.width\" [attr.height]=\"group.height\" />\n @if (group.width > 40) {\n <svg:text\n class=\"tx-treemap__group-label\"\n [class]=\"parts.groupLabel?.class\"\n [style]=\"parts.groupLabel?.style\"\n [attr.x]=\"group.x + 8\"\n [attr.y]=\"group.y + 11\"\n dominant-baseline=\"central\"\n >\n {{ group.label }}\n </svg:text>\n }\n </svg:g>\n }\n <svg:g class=\"tx-treemap__tiles\">\n @for (tile of layout().tiles; track tile.key) {\n <svg:g class=\"tx-treemap__tile-group\" [class.tx-treemap__tile-group--hovered]=\"hovered() === tile.index\">\n <svg:rect\n class=\"tx-treemap__tile\"\n [class]=\"parts.tile?.class\"\n [style]=\"parts.tile?.style\"\n [style.--tx-treemap-color]=\"tile.color\"\n [attr.data-index]=\"tile.index\"\n [attr.x]=\"tile.x\"\n [attr.y]=\"tile.y\"\n [attr.width]=\"tile.width\"\n [attr.height]=\"tile.height\"\n />\n @if (tileTemplate(); as custom) {\n <svg:foreignObject class=\"tx-treemap__tile-box\" [attr.x]=\"tile.x\" [attr.y]=\"tile.y\" [attr.width]=\"tile.width\" [attr.height]=\"tile.height\">\n <xhtml:div class=\"tx-treemap__tile-content\" [class]=\"parts.tileContent?.class\" [style]=\"parts.tileContent?.style\">\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"tileContext(tile)\" />\n </xhtml:div>\n </svg:foreignObject>\n } @else if (tile.nameFits) {\n <svg:foreignObject class=\"tx-treemap__tile-box\" [attr.x]=\"tile.x\" [attr.y]=\"tile.y\" [attr.width]=\"tile.width\" [attr.height]=\"tile.height\">\n <xhtml:div class=\"tx-treemap__tile-content\" [class]=\"parts.tileContent?.class\" [style]=\"parts.tileContent?.style\">\n <xhtml:span class=\"tx-treemap__tile-label\" [class]=\"parts.tileLabel?.class\" [style]=\"parts.tileLabel?.style\">{{ tile.label }}</xhtml:span>\n @if (tile.valueFits) {\n <xhtml:span class=\"tx-treemap__tile-value\" [class]=\"parts.tileValue?.class\" [style]=\"parts.tileValue?.style\">{{ tile.valueText }}</xhtml:span>\n }\n </xhtml:div>\n </svg:foreignObject>\n }\n </svg:g>\n }\n </svg:g>\n</tx-chart-frame>\n",
546
552
  styles: [":host{display:block;max-width:100%;min-width:0}.tx-treemap__tile{fill:var(--tx-treemap-color)}.tx-treemap__tile-box,.tx-treemap__group-label{pointer-events:none}.tx-treemap__tile-content{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;overflow:hidden}.tx-treemap__tile-label,.tx-treemap__tile-value{display:block;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}:host([data-styled]) .tx-treemap__tile{rx:var(--tx-chart-treemap-radius);stroke:var(--tx-chart-treemap-gap-color);stroke-width:var(--tx-chart-treemap-gap);transition:fill var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-treemap__group-box{fill:var(--tx-chart-treemap-group-background);stroke:var(--tx-chart-treemap-gap-color);stroke-width:var(--tx-chart-treemap-gap);rx:var(--tx-chart-treemap-radius)}:host([data-styled]) .tx-treemap__group-label{fill:var(--tx-chart-treemap-group-label-color);font-size:var(--tx-chart-treemap-group-label-font-size);font-weight:var(--tx-chart-treemap-group-label-font-weight)}:host([data-styled]) .tx-treemap__tile-content{gap:var(--tx-chart-treemap-label-gap);padding:var(--tx-chart-treemap-label-padding);color:var(--tx-chart-treemap-label-color);line-height:1.2;transition:opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-treemap__tile-label,:host([data-styled]) .tx-treemap__tile-value{filter:var(--tx-chart-treemap-label-shadow)}:host([data-styled]) .tx-treemap__tile-label{font-size:var(--tx-chart-treemap-label-font-size);font-weight:var(--tx-chart-treemap-label-font-weight)}:host([data-styled]) .tx-treemap__tile-value{font-size:var(--tx-chart-treemap-value-font-size);font-weight:var(--tx-chart-treemap-value-font-weight);font-variant-numeric:tabular-nums}:host([data-styled].tx-treemap--hovering) .tx-treemap__tile-group:not(.tx-treemap__tile-group--hovered) .tx-treemap__tile{fill:color-mix(in oklab,var(--tx-treemap-color) var(--tx-chart-treemap-dimmed-strength),var(--tx-chart-treemap-dimmed-base))}:host([data-styled].tx-treemap--hovering) .tx-treemap__tile-group:not(.tx-treemap__tile-group--hovered) .tx-treemap__tile-content{opacity:.6}:host([data-styled].tx-treemap--entering) .tx-treemap__tiles{animation:tx-treemap-enter var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}@keyframes tx-treemap-enter{0%{opacity:0}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-treemap__tile,:host([data-styled]) .tx-treemap__tile-content,:host([data-styled]) .tx-treemap__tiles{transition:none;animation:none}}\n"]
547
553
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-treemap.mjs","names":[],"sources":["../../../../packages/charts/treemap/src/treemap-layout.ts","../../../../packages/charts/treemap/src/treemap-tile.directive.ts","../../../../packages/charts/treemap/src/treemap.component.ts","../../../../packages/charts/treemap/src/treemap.component.html"],"sourcesContent":["import { TxTreemapItem, TxTreemapNode, TxTreemapRect } from './treemap.types';\n\nfunction worst(row: readonly number[], side: number): number {\n const sum = row.reduce((total, value) => total + value, 0);\n if (!sum || !side) return Infinity;\n const max = Math.max(...row);\n const min = Math.min(...row);\n const side2 = side * side;\n const sum2 = sum * sum;\n return Math.max((side2 * max) / sum2, sum2 / (side2 * min));\n}\n\nexport function squarify<T>(items: readonly { value: number; item: T }[], rect: TxTreemapRect): TxTreemapNode<T>[] {\n const indexed = items\n .map((entry, index) => ({ ...entry, index }))\n .filter((entry) => Number.isFinite(entry.value) && entry.value > 0)\n .sort((a, b) => b.value - a.value);\n const total = indexed.reduce((sum, entry) => sum + entry.value, 0);\n const nodes: TxTreemapNode<T>[] = [];\n if (!total || rect.width <= 0 || rect.height <= 0) return nodes;\n const scale = (rect.width * rect.height) / total;\n const areas = indexed.map((entry) => entry.value * scale);\n let { x, y, width, height } = rect;\n let start = 0;\n while (start < areas.length) {\n const side = Math.min(width, height);\n let end = start + 1;\n while (end < areas.length && worst(areas.slice(start, end + 1), side) <= worst(areas.slice(start, end), side)) {\n end += 1;\n }\n const row = areas.slice(start, end);\n const sum = row.reduce((total, area) => total + area, 0);\n const horizontal = width >= height;\n const thickness = horizontal ? sum / height : sum / width;\n let offset = 0;\n row.forEach((area, position) => {\n const entry = indexed[start + position];\n const length = area / thickness;\n nodes.push({\n index: entry.index,\n value: entry.value,\n item: entry.item,\n x: horizontal ? x : x + offset,\n y: horizontal ? y + offset : y,\n width: horizontal ? thickness : length,\n height: horizontal ? length : thickness,\n });\n offset += length;\n });\n if (horizontal) {\n x += thickness;\n width -= thickness;\n } else {\n y += thickness;\n height -= thickness;\n }\n start = end;\n }\n return nodes;\n}\n\nexport function treemapValue(item: TxTreemapItem): number {\n if (item.children?.length) {\n return item.children.reduce((sum, child) => sum + Math.max(0, treemapValue(child)), 0);\n }\n return Number.isFinite(item.value) ? Math.max(0, item.value ?? 0) : 0;\n}\n\nexport function insetRect(rect: TxTreemapRect, inset: number): TxTreemapRect {\n const half = inset / 2;\n return {\n x: rect.x + half,\n y: rect.y + half,\n width: Math.max(0, rect.width - inset),\n height: Math.max(0, rect.height - inset),\n };\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxTreemapTileContext } from './treemap.types';\n\n@Directive({ selector: 'ng-template[txTreemapTile]' })\nexport class TxTreemapTileTemplate {\n readonly template = inject<TemplateRef<TxTreemapTileContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxTreemapTileTemplate, context: unknown): context is TxTreemapTileContext {\n return !!context;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipFormatter,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n chartNumberFormatter,\n chartSummary,\n initialChartSize,\n injectChartEntrance,\n seriesColor,\n} from '@tectra-ng/charts/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { insetRect, squarify, treemapValue } from './treemap-layout';\nimport { TxTreemapTileTemplate } from './treemap-tile.directive';\nimport { TxTreemapGroup, TxTreemapItem, TxTreemapPart, TxTreemapTile, TxTreemapTileContext, TxTreemapTileEvent } from './treemap.types';\n\nconst LABEL_SIZE = 13;\nconst VALUE_SIZE = 12;\nconst LABEL_PADDING = 8;\nconst MIN_LABEL_WIDTH = 36;\nconst GROUP_HEADER = 22;\nconst GROUP_PADDING = 3;\n\n@Component({\n selector: 'tx-treemap',\n imports: [TxChartFrame, NgTemplateOutlet],\n templateUrl: './treemap.component.html',\n styleUrl: './treemap.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-treemap',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-treemap--entering]': 'entrance.active()',\n '[class.tx-treemap--hovering]': 'hovered() !== null',\n },\n})\nexport class TxTreemap {\n private locale = inject(TxLocaleService);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxTreemapItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(350);\n readonly showDataLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValues = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly tooltipFormatter = input<TxChartTooltipFormatter | null>(null);\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTreemapPart, TxTreemap> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly tileClick = output<TxTreemapTileEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n readonly tileTemplate = contentChild(TxTreemapTileTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('treemap', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n\n readonly size = linkedSignal(() => initialChartSize(this.height(), null));\n readonly hovered = signal<number | null>(null);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => chartNumberFormatter(this.intl(), 'percent'));\n\n readonly roots = computed(() => (this.items() ?? []).filter((item) => treemapValue(item) > 0));\n readonly total = computed(() => this.roots().reduce((sum, item) => sum + treemapValue(item), 0));\n readonly isEmpty = computed(() => this.total() <= 0);\n\n readonly layout = computed(() => {\n const { width, height } = this.size();\n const total = this.total();\n const tiles: TxTreemapTile[] = [];\n const groups: TxTreemapGroup[] = [];\n const roots = this.roots();\n const nodes = squarify(\n roots.map((item) => ({ value: treemapValue(item), item })),\n { x: 0, y: 0, width, height },\n );\n for (const node of nodes) {\n const color = seriesColor(node.item.color, node.index);\n const children = (node.item.children ?? []).filter((child) => treemapValue(child) > 0);\n if (!children.length) {\n tiles.push(this.tile(node, [node.index], node.item.label, null, color, total));\n continue;\n }\n groups.push({ key: `g${node.index}`, label: node.item.label, value: node.value, color, x: node.x, y: node.y, width: node.width, height: node.height });\n const inner = insetRect({ x: node.x, y: node.y + GROUP_HEADER, width: node.width, height: Math.max(0, node.height - GROUP_HEADER) }, GROUP_PADDING * 2);\n for (const child of squarify(children.map((item) => ({ value: treemapValue(item), item })), inner)) {\n tiles.push(this.tile(child, [node.index, child.index], child.item.label, node.item.label, child.item.color ?? color, total));\n }\n }\n return { tiles: tiles.map((tile, index) => ({ ...tile, index })), groups };\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.hovered();\n const tile = index === null ? undefined : this.layout().tiles[index];\n if (!tile || !this.showTooltip()) return null;\n const custom = this.tooltipFormatter();\n const value = custom ? custom(tile.value, { seriesIndex: tile.path[0], dataPointIndex: index ?? 0 }) : this.valueFormatter()(tile.value);\n return {\n title: tile.group ?? '',\n rows: [{ label: tile.label, value, share: this.percentFormatter()(Number(tile.share.toFixed(1))), color: tile.color, raw: tile.value, seriesIndex: tile.path[0], active: true }],\n index: index ?? 0,\n x: tile.x + tile.width / 2,\n y: tile.y,\n placement: 'top',\n };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const text = `${chartSummary(t, this.intl(), t.chartTreemap, 1, this.layout().tiles.length, null)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(this.total())}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n const format = this.valueFormatter();\n const percent = this.percentFormatter();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'share', label: t.chartShare },\n ],\n rows: this.layout().tiles.map((tile) => ({\n label: tile.group ? `${tile.group} / ${tile.label}` : tile.label,\n cells: [format(tile.value), percent(Number(tile.share.toFixed(1)))],\n })),\n };\n });\n\n tileContext(tile: TxTreemapTile): TxTreemapTileContext {\n return {\n $implicit: tile,\n tile,\n label: tile.label,\n value: tile.valueText,\n share: this.percentFormatter()(Number(tile.share.toFixed(1))),\n color: tile.color,\n width: tile.width,\n height: tile.height,\n };\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.hovered.set(null);\n return;\n }\n const index = this.layout().tiles.findIndex((tile) => event.x >= tile.x && event.x <= tile.x + tile.width && event.y >= tile.y && event.y <= tile.y + tile.height);\n this.hovered.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const tile = this.layout().tiles[index];\n this.tileClick.emit({ index, path: tile.path, label: tile.label, group: tile.group, value: tile.value, share: tile.share });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.hovered.set(null);\n return;\n }\n const count = this.layout().tiles.length;\n if (!count) return;\n const current = this.hovered();\n const forward = event.key === 'ArrowRight' || event.key === 'ArrowDown';\n const next = event.key === 'Home' ? 0 : event.key === 'End' ? count - 1 : current === null ? (forward ? 0 : count - 1) : (current + (forward ? 1 : -1) + count) % count;\n this.hovered.set(next);\n const tile = this.layout().tiles[next];\n this.frame()?.announce(`${tile.group ? `${tile.group}, ` : ''}${tile.label}: ${this.valueFormatter()(tile.value)}, ${this.percentFormatter()(Number(tile.share.toFixed(1)))}`);\n }\n\n private tile(node: { x: number; y: number; width: number; height: number; value: number }, path: number[], label: string, group: string | null, color: string, total: number): TxTreemapTile {\n const nameFits = this.showDataLabels() && node.width >= MIN_LABEL_WIDTH && node.height >= LABEL_SIZE + LABEL_PADDING * 2;\n const value = this.valueFormatter()(node.value);\n const valueFits = nameFits && this.showValues() && node.height >= LABEL_SIZE + VALUE_SIZE + LABEL_PADDING * 2 + 4;\n return {\n key: path.join('.'),\n index: 0,\n path,\n label,\n group,\n value: node.value,\n share: total ? (node.value / total) * 100 : 0,\n color,\n x: node.x,\n y: node.y,\n width: node.width,\n height: node.height,\n nameFits,\n valueFits,\n valueText: value,\n };\n }\n}\n","@let parts = passThrough();\n<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n emptyIcon=\"th-large\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"parts\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"hovered.set(null)\"\n>\n @for (group of layout().groups; track group.key) {\n <svg:g class=\"tx-treemap__group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <svg:rect class=\"tx-treemap__group-box\" [attr.x]=\"group.x\" [attr.y]=\"group.y\" [attr.width]=\"group.width\" [attr.height]=\"group.height\" />\n @if (group.width > 40) {\n <svg:text\n class=\"tx-treemap__group-label\"\n [class]=\"parts.groupLabel?.class\"\n [style]=\"parts.groupLabel?.style\"\n [attr.x]=\"group.x + 8\"\n [attr.y]=\"group.y + 11\"\n dominant-baseline=\"central\"\n >\n {{ group.label }}\n </svg:text>\n }\n </svg:g>\n }\n <svg:g class=\"tx-treemap__tiles\">\n @for (tile of layout().tiles; track tile.key) {\n <svg:g class=\"tx-treemap__tile-group\" [class.tx-treemap__tile-group--hovered]=\"hovered() === tile.index\">\n <svg:rect\n class=\"tx-treemap__tile\"\n [class]=\"parts.tile?.class\"\n [style]=\"parts.tile?.style\"\n [style.--tx-treemap-color]=\"tile.color\"\n [attr.data-index]=\"tile.index\"\n [attr.x]=\"tile.x\"\n [attr.y]=\"tile.y\"\n [attr.width]=\"tile.width\"\n [attr.height]=\"tile.height\"\n />\n @if (tileTemplate(); as custom) {\n <svg:foreignObject class=\"tx-treemap__tile-box\" [attr.x]=\"tile.x\" [attr.y]=\"tile.y\" [attr.width]=\"tile.width\" [attr.height]=\"tile.height\">\n <xhtml:div class=\"tx-treemap__tile-content\" [class]=\"parts.tileContent?.class\" [style]=\"parts.tileContent?.style\">\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"tileContext(tile)\" />\n </xhtml:div>\n </svg:foreignObject>\n } @else if (tile.nameFits) {\n <svg:foreignObject class=\"tx-treemap__tile-box\" [attr.x]=\"tile.x\" [attr.y]=\"tile.y\" [attr.width]=\"tile.width\" [attr.height]=\"tile.height\">\n <xhtml:div class=\"tx-treemap__tile-content\" [class]=\"parts.tileContent?.class\" [style]=\"parts.tileContent?.style\">\n <xhtml:span class=\"tx-treemap__tile-label\" [class]=\"parts.tileLabel?.class\" [style]=\"parts.tileLabel?.style\">{{ tile.label }}</xhtml:span>\n @if (tile.valueFits) {\n <xhtml:span class=\"tx-treemap__tile-value\" [class]=\"parts.tileValue?.class\" [style]=\"parts.tileValue?.style\">{{ tile.valueText }}</xhtml:span>\n }\n </xhtml:div>\n </svg:foreignObject>\n }\n </svg:g>\n }\n </svg:g>\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAEA,SAAS,MAAM,KAAwB,MAAY;CACjD,MAAM,MAAM,IAAI,QAAQ,OAAO,UAAU,QAAQ,OAAO,CAAC;CACzD,IAAI,CAAC,OAAO,CAAC,MAAM,OAAO;CAC1B,MAAM,MAAM,KAAK,IAAI,GAAG,GAAG;CAC3B,MAAM,MAAM,KAAK,IAAI,GAAG,GAAG;CAC3B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,MAAM;CACnB,OAAO,KAAK,IAAK,QAAQ,MAAO,MAAM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ACzB,qBAAqB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBACvB,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-treemap.mjs","names":[],"sources":["../../../../packages/charts/treemap/src/treemap-layout.ts","../../../../packages/charts/treemap/src/treemap-tile.directive.ts","../../../../packages/charts/treemap/src/treemap.icons.ts","../../../../packages/charts/treemap/src/treemap.theme.ts","../../../../packages/charts/treemap/src/treemap.component.ts","../../../../packages/charts/treemap/src/treemap.component.html"],"sourcesContent":["import { TxTreemapItem, TxTreemapNode, TxTreemapRect } from './treemap.types';\n\nfunction worst(row: readonly number[], side: number): number {\n const sum = row.reduce((total, value) => total + value, 0);\n if (!sum || !side) return Infinity;\n const max = Math.max(...row);\n const min = Math.min(...row);\n const side2 = side * side;\n const sum2 = sum * sum;\n return Math.max((side2 * max) / sum2, sum2 / (side2 * min));\n}\n\nexport function squarify<T>(items: readonly { value: number; item: T }[], rect: TxTreemapRect): TxTreemapNode<T>[] {\n const indexed = items\n .map((entry, index) => ({ ...entry, index }))\n .filter((entry) => Number.isFinite(entry.value) && entry.value > 0)\n .sort((a, b) => b.value - a.value);\n const total = indexed.reduce((sum, entry) => sum + entry.value, 0);\n const nodes: TxTreemapNode<T>[] = [];\n if (!total || rect.width <= 0 || rect.height <= 0) return nodes;\n const scale = (rect.width * rect.height) / total;\n const areas = indexed.map((entry) => entry.value * scale);\n let { x, y, width, height } = rect;\n let start = 0;\n while (start < areas.length) {\n const side = Math.min(width, height);\n let end = start + 1;\n while (end < areas.length && worst(areas.slice(start, end + 1), side) <= worst(areas.slice(start, end), side)) {\n end += 1;\n }\n const row = areas.slice(start, end);\n const sum = row.reduce((total, area) => total + area, 0);\n const horizontal = width >= height;\n const thickness = horizontal ? sum / height : sum / width;\n let offset = 0;\n row.forEach((area, position) => {\n const entry = indexed[start + position];\n const length = area / thickness;\n nodes.push({\n index: entry.index,\n value: entry.value,\n item: entry.item,\n x: horizontal ? x : x + offset,\n y: horizontal ? y + offset : y,\n width: horizontal ? thickness : length,\n height: horizontal ? length : thickness,\n });\n offset += length;\n });\n if (horizontal) {\n x += thickness;\n width -= thickness;\n } else {\n y += thickness;\n height -= thickness;\n }\n start = end;\n }\n return nodes;\n}\n\nexport function treemapValue(item: TxTreemapItem): number {\n if (item.children?.length) {\n return item.children.reduce((sum, child) => sum + Math.max(0, treemapValue(child)), 0);\n }\n return Number.isFinite(item.value) ? Math.max(0, item.value ?? 0) : 0;\n}\n\nexport function insetRect(rect: TxTreemapRect, inset: number): TxTreemapRect {\n const half = inset / 2;\n return {\n x: rect.x + half,\n y: rect.y + half,\n width: Math.max(0, rect.width - inset),\n height: Math.max(0, rect.height - inset),\n };\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxTreemapTileContext } from './treemap.types';\n\n@Directive({ selector: 'ng-template[txTreemapTile]' })\nexport class TxTreemapTileTemplate {\n readonly template = inject<TemplateRef<TxTreemapTileContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxTreemapTileTemplate, context: unknown): context is TxTreemapTileContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconThLarge } from '@tectra-ng/icons';\n\nexport const TREEMAP_ICON_DEFAULTS: TxIconSet = {\n 'th-large': txIconThLarge,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const TREEMAP_THEME = {\n chart: chartTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipFormatter,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n chartNumberFormatter,\n chartSummary,\n initialChartSize,\n injectChartEntrance,\n seriesColor,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { insetRect, squarify, treemapValue } from './treemap-layout';\nimport { TxTreemapTileTemplate } from './treemap-tile.directive';\nimport { TxTreemapGroup, TxTreemapItem, TxTreemapPart, TxTreemapTile, TxTreemapTileContext, TxTreemapTileEvent } from './treemap.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { TREEMAP_ICON_DEFAULTS } from './treemap.icons';\nimport { TREEMAP_THEME } from './treemap.theme';\n\nconst LABEL_SIZE = 13;\nconst VALUE_SIZE = 12;\nconst LABEL_PADDING = 8;\nconst MIN_LABEL_WIDTH = 36;\nconst GROUP_HEADER = 22;\nconst GROUP_PADDING = 3;\n\n@Component({\n selector: 'tx-treemap',\n imports: [TxChartFrame, NgTemplateOutlet],\n templateUrl: './treemap.component.html',\n styleUrl: './treemap.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-treemap',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-treemap--entering]': 'entrance.active()',\n '[class.tx-treemap--hovering]': 'hovered() !== null',\n },\n viewProviders: [provideTxIconDefaults(TREEMAP_ICON_DEFAULTS)],\n})\nexport class TxTreemap {\n private readonly treemapTheme = injectTokens(TREEMAP_THEME);\n\n private locale = inject(TxLocaleService);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxTreemapItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(350);\n readonly showDataLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValues = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly tooltipFormatter = input<TxChartTooltipFormatter | null>(null);\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTreemapPart, TxTreemap> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly tileClick = output<TxTreemapTileEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n readonly tileTemplate = contentChild(TxTreemapTileTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('treemap', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n\n readonly size = linkedSignal(() => initialChartSize(this.height(), null));\n readonly hovered = signal<number | null>(null);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => chartNumberFormatter(this.intl(), 'percent'));\n\n readonly roots = computed(() => (this.items() ?? []).filter((item) => treemapValue(item) > 0));\n readonly total = computed(() => this.roots().reduce((sum, item) => sum + treemapValue(item), 0));\n readonly isEmpty = computed(() => this.total() <= 0);\n\n readonly layout = computed(() => {\n const { width, height } = this.size();\n const total = this.total();\n const tiles: TxTreemapTile[] = [];\n const groups: TxTreemapGroup[] = [];\n const roots = this.roots();\n const nodes = squarify(\n roots.map((item) => ({ value: treemapValue(item), item })),\n { x: 0, y: 0, width, height },\n );\n for (const node of nodes) {\n const color = seriesColor(node.item.color, node.index);\n const children = (node.item.children ?? []).filter((child) => treemapValue(child) > 0);\n if (!children.length) {\n tiles.push(this.tile(node, [node.index], node.item.label, null, color, total));\n continue;\n }\n groups.push({ key: `g${node.index}`, label: node.item.label, value: node.value, color, x: node.x, y: node.y, width: node.width, height: node.height });\n const inner = insetRect({ x: node.x, y: node.y + GROUP_HEADER, width: node.width, height: Math.max(0, node.height - GROUP_HEADER) }, GROUP_PADDING * 2);\n for (const child of squarify(children.map((item) => ({ value: treemapValue(item), item })), inner)) {\n tiles.push(this.tile(child, [node.index, child.index], child.item.label, node.item.label, child.item.color ?? color, total));\n }\n }\n return { tiles: tiles.map((tile, index) => ({ ...tile, index })), groups };\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.hovered();\n const tile = index === null ? undefined : this.layout().tiles[index];\n if (!tile || !this.showTooltip()) return null;\n const custom = this.tooltipFormatter();\n const value = custom ? custom(tile.value, { seriesIndex: tile.path[0], dataPointIndex: index ?? 0 }) : this.valueFormatter()(tile.value);\n return {\n title: tile.group ?? '',\n rows: [{ label: tile.label, value, share: this.percentFormatter()(Number(tile.share.toFixed(1))), color: tile.color, raw: tile.value, seriesIndex: tile.path[0], active: true }],\n index: index ?? 0,\n x: tile.x + tile.width / 2,\n y: tile.y,\n placement: 'top',\n };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const text = `${chartSummary(t, this.intl(), t.chartTreemap, 1, this.layout().tiles.length, null)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(this.total())}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n const format = this.valueFormatter();\n const percent = this.percentFormatter();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'share', label: t.chartShare },\n ],\n rows: this.layout().tiles.map((tile) => ({\n label: tile.group ? `${tile.group} / ${tile.label}` : tile.label,\n cells: [format(tile.value), percent(Number(tile.share.toFixed(1)))],\n })),\n };\n });\n\n tileContext(tile: TxTreemapTile): TxTreemapTileContext {\n return {\n $implicit: tile,\n tile,\n label: tile.label,\n value: tile.valueText,\n share: this.percentFormatter()(Number(tile.share.toFixed(1))),\n color: tile.color,\n width: tile.width,\n height: tile.height,\n };\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.hovered.set(null);\n return;\n }\n const index = this.layout().tiles.findIndex((tile) => event.x >= tile.x && event.x <= tile.x + tile.width && event.y >= tile.y && event.y <= tile.y + tile.height);\n this.hovered.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const tile = this.layout().tiles[index];\n this.tileClick.emit({ index, path: tile.path, label: tile.label, group: tile.group, value: tile.value, share: tile.share });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.hovered.set(null);\n return;\n }\n const count = this.layout().tiles.length;\n if (!count) return;\n const current = this.hovered();\n const forward = event.key === 'ArrowRight' || event.key === 'ArrowDown';\n const next = event.key === 'Home' ? 0 : event.key === 'End' ? count - 1 : current === null ? (forward ? 0 : count - 1) : (current + (forward ? 1 : -1) + count) % count;\n this.hovered.set(next);\n const tile = this.layout().tiles[next];\n this.frame()?.announce(`${tile.group ? `${tile.group}, ` : ''}${tile.label}: ${this.valueFormatter()(tile.value)}, ${this.percentFormatter()(Number(tile.share.toFixed(1)))}`);\n }\n\n private tile(node: { x: number; y: number; width: number; height: number; value: number }, path: number[], label: string, group: string | null, color: string, total: number): TxTreemapTile {\n const nameFits = this.showDataLabels() && node.width >= MIN_LABEL_WIDTH && node.height >= LABEL_SIZE + LABEL_PADDING * 2;\n const value = this.valueFormatter()(node.value);\n const valueFits = nameFits && this.showValues() && node.height >= LABEL_SIZE + VALUE_SIZE + LABEL_PADDING * 2 + 4;\n return {\n key: path.join('.'),\n index: 0,\n path,\n label,\n group,\n value: node.value,\n share: total ? (node.value / total) * 100 : 0,\n color,\n x: node.x,\n y: node.y,\n width: node.width,\n height: node.height,\n nameFits,\n valueFits,\n valueText: value,\n };\n }\n}\n","@let parts = passThrough();\n<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n emptyIcon=\"th-large\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"parts\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"hovered.set(null)\"\n>\n @for (group of layout().groups; track group.key) {\n <svg:g class=\"tx-treemap__group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <svg:rect class=\"tx-treemap__group-box\" [attr.x]=\"group.x\" [attr.y]=\"group.y\" [attr.width]=\"group.width\" [attr.height]=\"group.height\" />\n @if (group.width > 40) {\n <svg:text\n class=\"tx-treemap__group-label\"\n [class]=\"parts.groupLabel?.class\"\n [style]=\"parts.groupLabel?.style\"\n [attr.x]=\"group.x + 8\"\n [attr.y]=\"group.y + 11\"\n dominant-baseline=\"central\"\n >\n {{ group.label }}\n </svg:text>\n }\n </svg:g>\n }\n <svg:g class=\"tx-treemap__tiles\">\n @for (tile of layout().tiles; track tile.key) {\n <svg:g class=\"tx-treemap__tile-group\" [class.tx-treemap__tile-group--hovered]=\"hovered() === tile.index\">\n <svg:rect\n class=\"tx-treemap__tile\"\n [class]=\"parts.tile?.class\"\n [style]=\"parts.tile?.style\"\n [style.--tx-treemap-color]=\"tile.color\"\n [attr.data-index]=\"tile.index\"\n [attr.x]=\"tile.x\"\n [attr.y]=\"tile.y\"\n [attr.width]=\"tile.width\"\n [attr.height]=\"tile.height\"\n />\n @if (tileTemplate(); as custom) {\n <svg:foreignObject class=\"tx-treemap__tile-box\" [attr.x]=\"tile.x\" [attr.y]=\"tile.y\" [attr.width]=\"tile.width\" [attr.height]=\"tile.height\">\n <xhtml:div class=\"tx-treemap__tile-content\" [class]=\"parts.tileContent?.class\" [style]=\"parts.tileContent?.style\">\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"tileContext(tile)\" />\n </xhtml:div>\n </svg:foreignObject>\n } @else if (tile.nameFits) {\n <svg:foreignObject class=\"tx-treemap__tile-box\" [attr.x]=\"tile.x\" [attr.y]=\"tile.y\" [attr.width]=\"tile.width\" [attr.height]=\"tile.height\">\n <xhtml:div class=\"tx-treemap__tile-content\" [class]=\"parts.tileContent?.class\" [style]=\"parts.tileContent?.style\">\n <xhtml:span class=\"tx-treemap__tile-label\" [class]=\"parts.tileLabel?.class\" [style]=\"parts.tileLabel?.style\">{{ tile.label }}</xhtml:span>\n @if (tile.valueFits) {\n <xhtml:span class=\"tx-treemap__tile-value\" [class]=\"parts.tileValue?.class\" [style]=\"parts.tileValue?.style\">{{ tile.valueText }}</xhtml:span>\n }\n </xhtml:div>\n </svg:foreignObject>\n }\n </svg:g>\n }\n </svg:g>\n</tx-chart-frame>\n"],"mappings":";;;;;;;;;AAEA,SAAS,MAAM,KAAwB,MAAY;CACjD,MAAM,MAAM,IAAI,QAAQ,OAAO,UAAU,QAAQ,OAAO,CAAC;CACzD,IAAI,CAAC,OAAO,CAAC,MAAM,OAAO;CAC1B,MAAM,MAAM,KAAK,IAAI,GAAG,GAAG;CAC3B,MAAM,MAAM,KAAK,IAAI,GAAG,GAAG;CAC3B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,MAAM;CACnB,OAAO,KAAK,IAAK,QAAQ,MAAO,MAAM,QAAQ,QAAQ,IAAI;AAC5D;AAEA,SAAgB,SAAY,OAA8C,MAAmB;CAC3F,MAAM,UAAU,MACb,KAAK,OAAO,WAAW;EAAE,GAAG;EAAO;CAAK,EAAG,CAAC,CAC5C,QAAQ,UAAU,OAAO,SAAS,MAAM,KAAK,KAAK,MAAM,QAAQ,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