@tectra-ng/charts 0.2.6 → 0.3.1

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 +9 -3
  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 +13 -4
  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 +14 -7
  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, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, inject, input, linkedSignal, signal } from "@angular/core";
3
3
  import { TxChartFrame, arcBounds, arcSpan, chartNumberFormatter, initialChartSize, injectChartEntrance, linearTicks, polar, readTokenNumber, strokeArc, textWidth, tickFormatter } 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, formatMessage, 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, txIconGauge, txIconInfo } from "@tectra-ng/icons";
8
9
  function gaugeRatio(value, min, max) {
9
10
  if (value === null || !Number.isFinite(value) || !(max > min)) return 0;
10
11
  return Math.max(0, Math.min(1, (value - min) / (max - min)));
@@ -17,6 +18,12 @@ function gaugeNeedle(cx, cy, length, width) {
17
18
  const round = (value) => Math.round(value * 100) / 100;
18
19
  return `M${round(cx - half)},${round(cy)}L${round(cx - 1)},${round(cy - length)}L${round(cx + 1)},${round(cy - length)}L${round(cx + half)},${round(cy)}Z`;
19
20
  }
21
+ const GAUGE_ICON_DEFAULTS = {
22
+ "chart-pie": txIconChartPie,
23
+ gauge: txIconGauge,
24
+ info: txIconInfo
25
+ };
26
+ const GAUGE_THEME = { chart: chartTokens };
20
27
  const DEFAULTS = {
21
28
  thickness: .16,
22
29
  bandGap: 2,
@@ -31,6 +38,7 @@ const MIN_RADIUS = 8;
31
38
  const VALUE_GAP = 8;
32
39
  const LABEL_GAP = 6;
33
40
  var TxGauge = class TxGauge {
41
+ gaugeTheme = injectTokens(GAUGE_THEME);
34
42
  locale = inject(TxLocaleService);
35
43
  host = inject(ElementRef);
36
44
  translations = injectTranslations();
@@ -480,6 +488,7 @@ var TxGauge = class TxGauge {
480
488
  "zoomReset"
481
489
  ]
482
490
  }],
491
+ viewProviders: [provideTxIconDefaults(GAUGE_ICON_DEFAULTS)],
483
492
  changeDetection: i0.ChangeDetectionStrategy.OnPush
484
493
  });
485
494
  };
@@ -504,6 +513,7 @@ i0.ɵɵngDeclareClassMetadata({
504
513
  "[class.tx-gauge--entering]": "entrance.active()",
505
514
  "[class.tx-gauge--morph]": "morph()"
506
515
  },
516
+ viewProviders: [provideTxIconDefaults(GAUGE_ICON_DEFAULTS)],
507
517
  template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [interactive]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel() || label()\"\n emptyIcon=\"chart-pie\"\n [summary]=\"summary()\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n>\n <svg:path class=\"tx-gauge__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\" [attr.d]=\"track()\" [style.stroke-width.px]=\"width()\" />\n @for (band of bandArcs(); track band.key) {\n <svg:path\n class=\"tx-gauge__band\"\n [class]=\"passThrough().band?.class\"\n [style]=\"passThrough().band?.style\"\n [attr.d]=\"band.path\"\n [style.stroke]=\"band.color\"\n [style.stroke-width.px]=\"width()\"\n />\n }\n @if (progress()) {\n <svg:path\n class=\"tx-gauge__progress\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [attr.d]=\"progress()\"\n pathLength=\"1\"\n [style.stroke]=\"progressColor()\"\n [style.stroke-width.px]=\"width()\"\n />\n }\n @for (tick of tickMarks(); track tick.value) {\n <svg:g class=\"tx-gauge__tick\" [class]=\"passThrough().tick?.class\" [style]=\"passThrough().tick?.style\">\n <svg:line class=\"tx-gauge__tick-line\" [attr.x1]=\"tick.x1\" [attr.y1]=\"tick.y1\" [attr.x2]=\"tick.x2\" [attr.y2]=\"tick.y2\" />\n <svg:text class=\"tx-gauge__tick-label\" [attr.x]=\"tick.labelX\" [attr.y]=\"tick.labelY\" [attr.text-anchor]=\"tick.anchor\" dominant-baseline=\"middle\">{{ tick.label }}</svg:text>\n </svg:g>\n }\n @if (hasNeedle()) {\n <svg:g\n class=\"tx-gauge__needle\"\n [class]=\"passThrough().needle?.class\"\n [style]=\"passThrough().needle?.style\"\n [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\"\n [style.transform]=\"'rotate(' + needleRotation() + ')'\"\n [style.--tx-gauge-start]=\"startRotation()\"\n [style.--tx-gauge-angle]=\"needleRotation()\"\n >\n <svg:path class=\"tx-gauge__needle-body\" [attr.d]=\"needlePath()\" />\n <svg:circle class=\"tx-gauge__hub\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"geometry().hubRadius\" />\n </svg:g>\n }\n @if (showValue()) {\n <svg:text\n class=\"tx-gauge__value\"\n [class]=\"passThrough().value?.class\"\n [style]=\"passThrough().value?.style\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"valueY()\"\n [style.font-size.px]=\"valueFont().value\"\n >\n {{ formatted() }}\n </svg:text>\n @if (label()) {\n <svg:text\n class=\"tx-gauge__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"valueY() + 6\"\n [style.font-size.px]=\"valueFont().label\"\n >\n {{ label() }}\n </svg:text>\n }\n }\n</tx-chart-frame>\n",
508
518
  styles: [":host{display:block;min-width:0}:host(.tx-gauge--fill){height:100%}.tx-gauge__track,.tx-gauge__band,.tx-gauge__progress{fill:none}.tx-gauge__track{stroke:currentColor;stroke-opacity:.12;stroke-linecap:round}.tx-gauge__progress{stroke-linecap:round}:host([data-mode=needle]) .tx-gauge__track{stroke-linecap:butt}.tx-gauge__tick-line{stroke:currentColor}.tx-gauge__needle{transform-box:view-box}.tx-gauge__needle-body,.tx-gauge__hub{fill:currentColor}:host([data-styled]) .tx-gauge__track{stroke:var(--tx-chart-gauge-track-color);stroke-opacity:1}:host([data-styled]) .tx-gauge__tick-line{stroke:var(--tx-chart-gauge-tick-color)}:host([data-styled]) .tx-gauge__tick-label{fill:var(--tx-chart-gauge-tick-label-color);font-size:var(--tx-chart-gauge-tick-label-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-gauge__needle-body{fill:var(--tx-chart-gauge-needle-color)}:host([data-styled]) .tx-gauge__hub{fill:var(--tx-chart-gauge-hub-color);stroke:var(--tx-chart-gauge-needle-color);stroke-width:var(--tx-chart-gauge-hub-stroke-width)}:host([data-styled]) .tx-gauge__value{fill:var(--tx-chart-gauge-value-color);font-weight:var(--tx-chart-gauge-value-font-weight);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-gauge__label{fill:var(--tx-chart-gauge-label-color);font-weight:var(--tx-chart-gauge-label-font-weight)}:host([data-styled].tx-gauge--morph) .tx-gauge__progress{transition:d var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-gauge--morph) .tx-gauge__needle{transition:transform var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-gauge--entering) .tx-gauge__progress{stroke-dasharray:1 1;animation:tx-gauge-draw var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}:host([data-styled].tx-gauge--entering) .tx-gauge__needle{animation:tx-gauge-swing var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}@keyframes tx-gauge-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes tx-gauge-swing{0%{transform:rotate(var(--tx-gauge-start))}to{transform:rotate(var(--tx-gauge-angle))}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-gauge__progress,:host([data-styled]) .tx-gauge__needle{transition:none;animation:none}}\n"]
509
519
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-gauge.mjs","names":[],"sources":["../../../../packages/charts/gauge/src/gauge-layout.ts","../../../../packages/charts/gauge/src/gauge.component.ts","../../../../packages/charts/gauge/src/gauge.component.html"],"sourcesContent":["export function gaugeRatio(value: number | null, min: number, max: number): number {\n if (value === null || !Number.isFinite(value) || !(max > min)) return 0;\n return Math.max(0, Math.min(1, (value - min) / (max - min)));\n}\n\nexport function gaugeAngle(value: number | null, min: number, max: number, start: number, end: number): number {\n return start + (end - start) * gaugeRatio(value, min, max);\n}\n\nexport function gaugeNeedle(cx: number, cy: number, length: number, width: number): string {\n const half = width / 2;\n const round = (value: number) => Math.round(value * 100) / 100;\n return `M${round(cx - half)},${round(cy)}L${round(cx - 1)},${round(cy - length)}L${round(cx + 1)},${round(cy - length)}L${round(cx + half)},${round(cy)}Z`;\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, inject, input, linkedSignal, signal } from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartValueFormat,\n arcBounds,\n arcSpan,\n chartNumberFormatter,\n initialChartSize,\n injectChartEntrance,\n linearTicks,\n polar,\n readTokenNumber,\n strokeArc,\n textWidth,\n tickFormatter,\n} from '@tectra-ng/charts/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxLocaleService, formatMessage, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { gaugeAngle, gaugeNeedle } from './gauge-layout';\nimport { TxGaugeArc, TxGaugeBand, TxGaugePart, TxGaugeTick, TxGaugeTone } from './gauge.types';\n\nconst DEFAULTS = { thickness: 0.16, bandGap: 2, needleWidth: 6, hubRadius: 6, tickLength: 6, tickFontSize: 11 };\nconst PADDING = 6;\nconst TICK_GAP = 4;\nconst MIN_RADIUS = 8;\nconst VALUE_GAP = 8;\nconst LABEL_GAP = 6;\n\n@Component({\n selector: 'tx-gauge',\n imports: [TxChartFrame],\n templateUrl: './gauge.component.html',\n styleUrl: './gauge.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-gauge',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-mode]': 'hasNeedle() ? \"needle\" : \"progress\"',\n '[class.tx-gauge--fill]': 'typeof height() === \"string\"',\n '[class.tx-gauge--entering]': 'entrance.active()',\n '[class.tx-gauge--morph]': 'morph()',\n },\n})\nexport class TxGauge {\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly value = input<number | null | undefined>(null);\n readonly min = input(0);\n readonly max = input(100);\n readonly bands = input<readonly TxGaugeBand[] | null | undefined>([]);\n readonly needle = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly tone = input<TxGaugeTone>('primary');\n readonly color = input<string | undefined>(undefined);\n readonly startAngle = input(-120);\n readonly endAngle = input(120);\n readonly label = input('');\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly ticks = input(5);\n readonly showTicks = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValue = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly height = input<TxChartHeight>(220);\n readonly toolbar = input<boolean, unknown>(false, { 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<TxGaugePart, TxGauge> | 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('gauge', 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 morph = signal(false);\n readonly geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n readonly bandList = computed(() => this.bands() ?? []);\n readonly hasNeedle = computed(() => this.needle() ?? this.bandList().length > 0);\n readonly isEmpty = computed(() => {\n const value = this.value();\n return value === null || value === undefined || !Number.isFinite(value) || !(this.max() > this.min());\n });\n\n readonly span = computed(() => arcSpan(this.startAngle(), this.endAngle()));\n\n readonly tickValues = computed(() => (this.showTicks() ? linearTicks(this.min(), this.max(), Math.max(1, this.ticks())) : []));\n readonly tickFormat = computed(() => tickFormatter(this.intl(), this.tickValues(), this.valueFormat()));\n readonly tickRoom = computed(() => {\n const values = this.tickValues();\n if (!values.length) return 0;\n const { tickLength, tickFontSize } = this.geometry();\n const widest = Math.max(...values.map((value) => textWidth(this.tickFormat()(value), tickFontSize)));\n return TICK_GAP + tickLength + TICK_GAP + Math.max(widest, tickFontSize);\n });\n\n readonly fit = computed(() => {\n const { width, height } = this.size();\n const [start, end] = this.span();\n const bounds = arcBounds(start, end);\n const room = this.tickRoom();\n const below = (radius: number) => Math.max(bounds.maxY * (radius + room), this.textBelow(radius));\n const fits = (radius: number) =>\n (bounds.maxX - bounds.minX) * (radius + room) <= width - PADDING * 2 && -bounds.minY * (radius + room) + below(radius) <= height - PADDING * 2;\n let low = MIN_RADIUS;\n let high = Math.max(MIN_RADIUS, Math.min(width, height));\n for (let step = 0; step < 24; step++) {\n const middle = (low + high) / 2;\n if (fits(middle)) low = middle;\n else high = middle;\n }\n const top = -bounds.minY * (low + room);\n const used = top + below(low);\n return {\n cx: width / 2 - ((bounds.minX + bounds.maxX) / 2) * (low + room),\n cy: PADDING + (height - PADDING * 2 - used) / 2 + top,\n radius: low,\n };\n });\n readonly width = computed(() => Math.max(2, this.fit().radius * this.geometry().thickness));\n readonly arcRadius = computed(() => this.fit().radius - this.width() / 2);\n\n readonly angle = computed(() => gaugeAngle(this.value() ?? null, this.min(), this.max(), this.span()[0], this.span()[1]));\n\n readonly track = computed(() => {\n const fit = this.fit();\n const [start, end] = this.span();\n return strokeArc(fit.cx, fit.cy, this.arcRadius(), start, end);\n });\n\n readonly progress = computed(() => {\n if (this.hasNeedle() || this.isEmpty()) return '';\n const fit = this.fit();\n const start = this.span()[0];\n const angle = this.angle();\n return angle > start ? strokeArc(fit.cx, fit.cy, this.arcRadius(), start, Math.max(start + 1e-3, angle)) : '';\n });\n\n readonly progressColor = computed(() => this.color() ?? `var(--tx-chart-gauge-${this.tone()}-color)`);\n\n readonly bandArcs = computed<TxGaugeArc[]>(() => {\n const fit = this.fit();\n const [start, end] = this.span();\n const radius = this.arcRadius();\n const gap = this.bandList().length > 1 ? this.geometry().bandGap / Math.max(1, radius) / 2 : 0;\n return this.bandList().flatMap((band, index) => {\n const from = gaugeAngle(Math.min(band.from, band.to), this.min(), this.max(), start, end);\n const to = gaugeAngle(Math.max(band.from, band.to), this.min(), this.max(), start, end);\n const a = from > start + 1e-6 ? from + gap : from;\n const b = to < end - 1e-6 ? to - gap : to;\n if (b <= a) return [];\n return [{ key: `${index}:${band.from}:${band.to}`, path: strokeArc(fit.cx, fit.cy, radius, a, b), color: band.color ?? `var(--tx-chart-gauge-${band.tone ?? 'neutral'}-color)`, label: band.label ?? null }];\n });\n });\n\n readonly tickMarks = computed<TxGaugeTick[]>(() => {\n const fit = this.fit();\n const [start, end] = this.span();\n const { tickLength, tickFontSize } = this.geometry();\n const outer = fit.radius + TICK_GAP;\n const format = this.tickFormat();\n return this.tickValues().map((value) => {\n const angle = gaugeAngle(value, this.min(), this.max(), start, end);\n const from = polar(fit.cx, fit.cy, outer, angle);\n const to = polar(fit.cx, fit.cy, outer + tickLength, angle);\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n const text = polar(fit.cx, fit.cy, outer + tickLength + TICK_GAP + (Math.abs(cos) > 0.3 ? tickFontSize * 0.5 * Math.abs(cos) : 0), angle);\n return { value, x1: from.x, y1: from.y, x2: to.x, y2: to.y, labelX: text.x, labelY: text.y, label: format(value), anchor: sin > 0.3 ? 'start' : sin < -0.3 ? 'end' : 'middle' };\n });\n });\n\n readonly needlePath = computed(() => {\n const fit = this.fit();\n const length = fit.radius - this.width() * 0.5;\n return gaugeNeedle(fit.cx, fit.cy, length, this.geometry().needleWidth);\n });\n\n readonly needleRotation = computed(() => `${(this.angle() * 180) / Math.PI}deg`);\n readonly startRotation = computed(() => `${this.startAngle()}deg`);\n\n readonly formatted = computed(() => {\n const value = this.value();\n return value === null || value === undefined || !Number.isFinite(value) ? '—' : chartNumberFormatter(this.intl(), this.valueFormat())(value);\n });\n\n readonly valueFont = computed(() => this.fontsFor(this.fit().radius));\n readonly valueY = computed(() => this.fit().cy + this.valueOffset(this.fit().radius));\n\n readonly summary = computed(() => {\n const t = this.translations();\n const format = chartNumberFormatter(this.intl(), this.valueFormat());\n const band = this.bandList().find((item) => {\n const value = this.value();\n return value !== null && value !== undefined && value >= Math.min(item.from, item.to) && value <= Math.max(item.from, item.to);\n });\n const head = [this.ariaLabel(), t.chartGauge, this.label()].filter(Boolean).join(', ');\n const value = formatMessage(t.chartGaugeValue, { value: this.formatted(), min: format(this.min()), max: format(this.max()) }, this.intl());\n return `${head}: ${value}${band?.label ? `, ${band.label}` : ''}`;\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n private fontsFor(radius: number): { value: number; label: number } {\n return { value: Math.max(14, Math.min(34, radius * 0.24)), label: Math.max(10, Math.min(14, radius * 0.1)) };\n }\n\n private valueOffset(radius: number): number {\n const font = this.fontsFor(radius).value;\n return this.hasNeedle() ? this.geometry().hubRadius + VALUE_GAP + font * 0.8 : font * 0.3;\n }\n\n private textBelow(radius: number): number {\n if (!this.showValue()) return this.hasNeedle() ? this.geometry().hubRadius : 0;\n const fonts = this.fontsFor(radius);\n return this.valueOffset(radius) + (this.label() ? LABEL_GAP + fonts.label * 1.25 : fonts.value * 0.25);\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n thickness: readTokenNumber(element, '--tx-chart-gauge-thickness', DEFAULTS.thickness),\n bandGap: readTokenNumber(element, '--tx-chart-gauge-band-gap', DEFAULTS.bandGap),\n needleWidth: readTokenNumber(element, '--tx-chart-gauge-needle-width', DEFAULTS.needleWidth),\n hubRadius: readTokenNumber(element, '--tx-chart-gauge-hub-radius', DEFAULTS.hubRadius),\n tickLength: readTokenNumber(element, '--tx-chart-gauge-tick-length', DEFAULTS.tickLength),\n tickFontSize: readTokenNumber(element, '--tx-chart-gauge-tick-label-font-size', DEFAULTS.tickFontSize),\n };\n const current = this.geometry();\n if ((Object.keys(next) as (keyof typeof next)[]).some((key) => next[key] !== current[key])) {\n this.geometry.set(next);\n }\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [interactive]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel() || label()\"\n emptyIcon=\"chart-pie\"\n [summary]=\"summary()\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n>\n <svg:path class=\"tx-gauge__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\" [attr.d]=\"track()\" [style.stroke-width.px]=\"width()\" />\n @for (band of bandArcs(); track band.key) {\n <svg:path\n class=\"tx-gauge__band\"\n [class]=\"passThrough().band?.class\"\n [style]=\"passThrough().band?.style\"\n [attr.d]=\"band.path\"\n [style.stroke]=\"band.color\"\n [style.stroke-width.px]=\"width()\"\n />\n }\n @if (progress()) {\n <svg:path\n class=\"tx-gauge__progress\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [attr.d]=\"progress()\"\n pathLength=\"1\"\n [style.stroke]=\"progressColor()\"\n [style.stroke-width.px]=\"width()\"\n />\n }\n @for (tick of tickMarks(); track tick.value) {\n <svg:g class=\"tx-gauge__tick\" [class]=\"passThrough().tick?.class\" [style]=\"passThrough().tick?.style\">\n <svg:line class=\"tx-gauge__tick-line\" [attr.x1]=\"tick.x1\" [attr.y1]=\"tick.y1\" [attr.x2]=\"tick.x2\" [attr.y2]=\"tick.y2\" />\n <svg:text class=\"tx-gauge__tick-label\" [attr.x]=\"tick.labelX\" [attr.y]=\"tick.labelY\" [attr.text-anchor]=\"tick.anchor\" dominant-baseline=\"middle\">{{ tick.label }}</svg:text>\n </svg:g>\n }\n @if (hasNeedle()) {\n <svg:g\n class=\"tx-gauge__needle\"\n [class]=\"passThrough().needle?.class\"\n [style]=\"passThrough().needle?.style\"\n [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\"\n [style.transform]=\"'rotate(' + needleRotation() + ')'\"\n [style.--tx-gauge-start]=\"startRotation()\"\n [style.--tx-gauge-angle]=\"needleRotation()\"\n >\n <svg:path class=\"tx-gauge__needle-body\" [attr.d]=\"needlePath()\" />\n <svg:circle class=\"tx-gauge__hub\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"geometry().hubRadius\" />\n </svg:g>\n }\n @if (showValue()) {\n <svg:text\n class=\"tx-gauge__value\"\n [class]=\"passThrough().value?.class\"\n [style]=\"passThrough().value?.style\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"valueY()\"\n [style.font-size.px]=\"valueFont().value\"\n >\n {{ formatted() }}\n </svg:text>\n @if (label()) {\n <svg:text\n class=\"tx-gauge__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"valueY() + 6\"\n [style.font-size.px]=\"valueFont().label\"\n >\n {{ label() }}\n </svg:text>\n }\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;AAAA,SAAgB,WAAW,OAAsB,KAAa,KAAW;CACvE,IAAI,UAAU,QAAQ,CAAC,OAAO,SAAS,KAAK,KAAK,EAAE,MAAM,MAAM,OAAO;CACtE,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,QAAQ,QAAQ,MAAM,IAAI,CAAC;AAC7D;AAEA,SAAgB,WAAW,OAAsB,KAAa,KAAa,OAAe,KAAW;CACnG,OAAO,SAAS,MAAM,SAAS,WAAW,OAAO,KAAK,GAAG;AAC3D;AAEA,SAAgB,YAAY,IAAY,IAAY,QAAgB,OAAa;CAC/E,MAAM,OAAO,QAAQ;CACrB,MAAM,SAAS,UAAkB,KAAK,MAAM,QAAQ,GAAG,IAAI;CAC3D,OAAO,IAAI,MAAM,KAAK,IAAI,EAAC,GAAI,MAAM,EAAE,EAAC,GAAI,MAAM,KAAK,CAAC,EAAC,GAAI,MAAM,KAAK,MAAM,EAAC,GAAI,MAAM,KAAK,CAAC,EAAC,GAAI,MAAM,KAAK,MAAM,EAAC,GAAI,MAAM,KAAK,IAAI,EAAC,GAAI,MAAM,EAAE,EAAC;AACzJ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mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,kBAAA;IAAA,wBAAA;IAAA,4BAAA;IAAA,yBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UChDpB;EAqFA,QAAA,CAAA,6vEAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDpDY;GAAY,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;GAAA,SAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAeX,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EAjBnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SACX,CAAC,YAAY;GAAC,iBAGN,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,0BAA0B;IAC1B,8BAA8B;IAC9B,2BAA2B;GAC5B;GAAA,UAAA;GAAA,QAAA,CAAA,6vEAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-gauge.mjs","names":[],"sources":["../../../../packages/charts/gauge/src/gauge-layout.ts","../../../../packages/charts/gauge/src/gauge.icons.ts","../../../../packages/charts/gauge/src/gauge.theme.ts","../../../../packages/charts/gauge/src/gauge.component.ts","../../../../packages/charts/gauge/src/gauge.component.html"],"sourcesContent":["export function gaugeRatio(value: number | null, min: number, max: number): number {\n if (value === null || !Number.isFinite(value) || !(max > min)) return 0;\n return Math.max(0, Math.min(1, (value - min) / (max - min)));\n}\n\nexport function gaugeAngle(value: number | null, min: number, max: number, start: number, end: number): number {\n return start + (end - start) * gaugeRatio(value, min, max);\n}\n\nexport function gaugeNeedle(cx: number, cy: number, length: number, width: number): string {\n const half = width / 2;\n const round = (value: number) => Math.round(value * 100) / 100;\n return `M${round(cx - half)},${round(cy)}L${round(cx - 1)},${round(cy - length)}L${round(cx + 1)},${round(cy - length)}L${round(cx + half)},${round(cy)}Z`;\n}\n","import { TxIconSet, txIconChartPie, txIconGauge, txIconInfo } from '@tectra-ng/icons';\n\nexport const GAUGE_ICON_DEFAULTS: TxIconSet = {\n 'chart-pie': txIconChartPie,\n gauge: txIconGauge,\n info: txIconInfo,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const GAUGE_THEME = {\n chart: chartTokens,\n};\n","import { ChangeDetectionStrategy, Component, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, inject, input, linkedSignal, signal } from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartValueFormat,\n arcBounds,\n arcSpan,\n chartNumberFormatter,\n initialChartSize,\n injectChartEntrance,\n linearTicks,\n polar,\n readTokenNumber,\n strokeArc,\n textWidth,\n tickFormatter,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, formatMessage, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { gaugeAngle, gaugeNeedle } from './gauge-layout';\nimport { TxGaugeArc, TxGaugeBand, TxGaugePart, TxGaugeTick, TxGaugeTone } from './gauge.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { GAUGE_ICON_DEFAULTS } from './gauge.icons';\nimport { GAUGE_THEME } from './gauge.theme';\n\nconst DEFAULTS = { thickness: 0.16, bandGap: 2, needleWidth: 6, hubRadius: 6, tickLength: 6, tickFontSize: 11 };\nconst PADDING = 6;\nconst TICK_GAP = 4;\nconst MIN_RADIUS = 8;\nconst VALUE_GAP = 8;\nconst LABEL_GAP = 6;\n\n@Component({\n selector: 'tx-gauge',\n imports: [TxChartFrame],\n templateUrl: './gauge.component.html',\n styleUrl: './gauge.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-gauge',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-mode]': 'hasNeedle() ? \"needle\" : \"progress\"',\n '[class.tx-gauge--fill]': 'typeof height() === \"string\"',\n '[class.tx-gauge--entering]': 'entrance.active()',\n '[class.tx-gauge--morph]': 'morph()',\n },\n viewProviders: [provideTxIconDefaults(GAUGE_ICON_DEFAULTS)],\n})\nexport class TxGauge {\n private readonly gaugeTheme = injectTokens(GAUGE_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly value = input<number | null | undefined>(null);\n readonly min = input(0);\n readonly max = input(100);\n readonly bands = input<readonly TxGaugeBand[] | null | undefined>([]);\n readonly needle = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly tone = input<TxGaugeTone>('primary');\n readonly color = input<string | undefined>(undefined);\n readonly startAngle = input(-120);\n readonly endAngle = input(120);\n readonly label = input('');\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly ticks = input(5);\n readonly showTicks = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValue = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly height = input<TxChartHeight>(220);\n readonly toolbar = input<boolean, unknown>(false, { 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<TxGaugePart, TxGauge> | 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('gauge', 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 morph = signal(false);\n readonly geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n readonly bandList = computed(() => this.bands() ?? []);\n readonly hasNeedle = computed(() => this.needle() ?? this.bandList().length > 0);\n readonly isEmpty = computed(() => {\n const value = this.value();\n return value === null || value === undefined || !Number.isFinite(value) || !(this.max() > this.min());\n });\n\n readonly span = computed(() => arcSpan(this.startAngle(), this.endAngle()));\n\n readonly tickValues = computed(() => (this.showTicks() ? linearTicks(this.min(), this.max(), Math.max(1, this.ticks())) : []));\n readonly tickFormat = computed(() => tickFormatter(this.intl(), this.tickValues(), this.valueFormat()));\n readonly tickRoom = computed(() => {\n const values = this.tickValues();\n if (!values.length) return 0;\n const { tickLength, tickFontSize } = this.geometry();\n const widest = Math.max(...values.map((value) => textWidth(this.tickFormat()(value), tickFontSize)));\n return TICK_GAP + tickLength + TICK_GAP + Math.max(widest, tickFontSize);\n });\n\n readonly fit = computed(() => {\n const { width, height } = this.size();\n const [start, end] = this.span();\n const bounds = arcBounds(start, end);\n const room = this.tickRoom();\n const below = (radius: number) => Math.max(bounds.maxY * (radius + room), this.textBelow(radius));\n const fits = (radius: number) =>\n (bounds.maxX - bounds.minX) * (radius + room) <= width - PADDING * 2 && -bounds.minY * (radius + room) + below(radius) <= height - PADDING * 2;\n let low = MIN_RADIUS;\n let high = Math.max(MIN_RADIUS, Math.min(width, height));\n for (let step = 0; step < 24; step++) {\n const middle = (low + high) / 2;\n if (fits(middle)) low = middle;\n else high = middle;\n }\n const top = -bounds.minY * (low + room);\n const used = top + below(low);\n return {\n cx: width / 2 - ((bounds.minX + bounds.maxX) / 2) * (low + room),\n cy: PADDING + (height - PADDING * 2 - used) / 2 + top,\n radius: low,\n };\n });\n readonly width = computed(() => Math.max(2, this.fit().radius * this.geometry().thickness));\n readonly arcRadius = computed(() => this.fit().radius - this.width() / 2);\n\n readonly angle = computed(() => gaugeAngle(this.value() ?? null, this.min(), this.max(), this.span()[0], this.span()[1]));\n\n readonly track = computed(() => {\n const fit = this.fit();\n const [start, end] = this.span();\n return strokeArc(fit.cx, fit.cy, this.arcRadius(), start, end);\n });\n\n readonly progress = computed(() => {\n if (this.hasNeedle() || this.isEmpty()) return '';\n const fit = this.fit();\n const start = this.span()[0];\n const angle = this.angle();\n return angle > start ? strokeArc(fit.cx, fit.cy, this.arcRadius(), start, Math.max(start + 1e-3, angle)) : '';\n });\n\n readonly progressColor = computed(() => this.color() ?? `var(--tx-chart-gauge-${this.tone()}-color)`);\n\n readonly bandArcs = computed<TxGaugeArc[]>(() => {\n const fit = this.fit();\n const [start, end] = this.span();\n const radius = this.arcRadius();\n const gap = this.bandList().length > 1 ? this.geometry().bandGap / Math.max(1, radius) / 2 : 0;\n return this.bandList().flatMap((band, index) => {\n const from = gaugeAngle(Math.min(band.from, band.to), this.min(), this.max(), start, end);\n const to = gaugeAngle(Math.max(band.from, band.to), this.min(), this.max(), start, end);\n const a = from > start + 1e-6 ? from + gap : from;\n const b = to < end - 1e-6 ? to - gap : to;\n if (b <= a) return [];\n return [{ key: `${index}:${band.from}:${band.to}`, path: strokeArc(fit.cx, fit.cy, radius, a, b), color: band.color ?? `var(--tx-chart-gauge-${band.tone ?? 'neutral'}-color)`, label: band.label ?? null }];\n });\n });\n\n readonly tickMarks = computed<TxGaugeTick[]>(() => {\n const fit = this.fit();\n const [start, end] = this.span();\n const { tickLength, tickFontSize } = this.geometry();\n const outer = fit.radius + TICK_GAP;\n const format = this.tickFormat();\n return this.tickValues().map((value) => {\n const angle = gaugeAngle(value, this.min(), this.max(), start, end);\n const from = polar(fit.cx, fit.cy, outer, angle);\n const to = polar(fit.cx, fit.cy, outer + tickLength, angle);\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n const text = polar(fit.cx, fit.cy, outer + tickLength + TICK_GAP + (Math.abs(cos) > 0.3 ? tickFontSize * 0.5 * Math.abs(cos) : 0), angle);\n return { value, x1: from.x, y1: from.y, x2: to.x, y2: to.y, labelX: text.x, labelY: text.y, label: format(value), anchor: sin > 0.3 ? 'start' : sin < -0.3 ? 'end' : 'middle' };\n });\n });\n\n readonly needlePath = computed(() => {\n const fit = this.fit();\n const length = fit.radius - this.width() * 0.5;\n return gaugeNeedle(fit.cx, fit.cy, length, this.geometry().needleWidth);\n });\n\n readonly needleRotation = computed(() => `${(this.angle() * 180) / Math.PI}deg`);\n readonly startRotation = computed(() => `${this.startAngle()}deg`);\n\n readonly formatted = computed(() => {\n const value = this.value();\n return value === null || value === undefined || !Number.isFinite(value) ? '—' : chartNumberFormatter(this.intl(), this.valueFormat())(value);\n });\n\n readonly valueFont = computed(() => this.fontsFor(this.fit().radius));\n readonly valueY = computed(() => this.fit().cy + this.valueOffset(this.fit().radius));\n\n readonly summary = computed(() => {\n const t = this.translations();\n const format = chartNumberFormatter(this.intl(), this.valueFormat());\n const band = this.bandList().find((item) => {\n const value = this.value();\n return value !== null && value !== undefined && value >= Math.min(item.from, item.to) && value <= Math.max(item.from, item.to);\n });\n const head = [this.ariaLabel(), t.chartGauge, this.label()].filter(Boolean).join(', ');\n const value = formatMessage(t.chartGaugeValue, { value: this.formatted(), min: format(this.min()), max: format(this.max()) }, this.intl());\n return `${head}: ${value}${band?.label ? `, ${band.label}` : ''}`;\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n private fontsFor(radius: number): { value: number; label: number } {\n return { value: Math.max(14, Math.min(34, radius * 0.24)), label: Math.max(10, Math.min(14, radius * 0.1)) };\n }\n\n private valueOffset(radius: number): number {\n const font = this.fontsFor(radius).value;\n return this.hasNeedle() ? this.geometry().hubRadius + VALUE_GAP + font * 0.8 : font * 0.3;\n }\n\n private textBelow(radius: number): number {\n if (!this.showValue()) return this.hasNeedle() ? this.geometry().hubRadius : 0;\n const fonts = this.fontsFor(radius);\n return this.valueOffset(radius) + (this.label() ? LABEL_GAP + fonts.label * 1.25 : fonts.value * 0.25);\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n thickness: readTokenNumber(element, '--tx-chart-gauge-thickness', DEFAULTS.thickness),\n bandGap: readTokenNumber(element, '--tx-chart-gauge-band-gap', DEFAULTS.bandGap),\n needleWidth: readTokenNumber(element, '--tx-chart-gauge-needle-width', DEFAULTS.needleWidth),\n hubRadius: readTokenNumber(element, '--tx-chart-gauge-hub-radius', DEFAULTS.hubRadius),\n tickLength: readTokenNumber(element, '--tx-chart-gauge-tick-length', DEFAULTS.tickLength),\n tickFontSize: readTokenNumber(element, '--tx-chart-gauge-tick-label-font-size', DEFAULTS.tickFontSize),\n };\n const current = this.geometry();\n if ((Object.keys(next) as (keyof typeof next)[]).some((key) => next[key] !== current[key])) {\n this.geometry.set(next);\n }\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [interactive]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel() || label()\"\n emptyIcon=\"chart-pie\"\n [summary]=\"summary()\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n>\n <svg:path class=\"tx-gauge__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\" [attr.d]=\"track()\" [style.stroke-width.px]=\"width()\" />\n @for (band of bandArcs(); track band.key) {\n <svg:path\n class=\"tx-gauge__band\"\n [class]=\"passThrough().band?.class\"\n [style]=\"passThrough().band?.style\"\n [attr.d]=\"band.path\"\n [style.stroke]=\"band.color\"\n [style.stroke-width.px]=\"width()\"\n />\n }\n @if (progress()) {\n <svg:path\n class=\"tx-gauge__progress\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [attr.d]=\"progress()\"\n pathLength=\"1\"\n [style.stroke]=\"progressColor()\"\n [style.stroke-width.px]=\"width()\"\n />\n }\n @for (tick of tickMarks(); track tick.value) {\n <svg:g class=\"tx-gauge__tick\" [class]=\"passThrough().tick?.class\" [style]=\"passThrough().tick?.style\">\n <svg:line class=\"tx-gauge__tick-line\" [attr.x1]=\"tick.x1\" [attr.y1]=\"tick.y1\" [attr.x2]=\"tick.x2\" [attr.y2]=\"tick.y2\" />\n <svg:text class=\"tx-gauge__tick-label\" [attr.x]=\"tick.labelX\" [attr.y]=\"tick.labelY\" [attr.text-anchor]=\"tick.anchor\" dominant-baseline=\"middle\">{{ tick.label }}</svg:text>\n </svg:g>\n }\n @if (hasNeedle()) {\n <svg:g\n class=\"tx-gauge__needle\"\n [class]=\"passThrough().needle?.class\"\n [style]=\"passThrough().needle?.style\"\n [style.transform-origin]=\"fit().cx + 'px ' + fit().cy + 'px'\"\n [style.transform]=\"'rotate(' + needleRotation() + ')'\"\n [style.--tx-gauge-start]=\"startRotation()\"\n [style.--tx-gauge-angle]=\"needleRotation()\"\n >\n <svg:path class=\"tx-gauge__needle-body\" [attr.d]=\"needlePath()\" />\n <svg:circle class=\"tx-gauge__hub\" [attr.cx]=\"fit().cx\" [attr.cy]=\"fit().cy\" [attr.r]=\"geometry().hubRadius\" />\n </svg:g>\n }\n @if (showValue()) {\n <svg:text\n class=\"tx-gauge__value\"\n [class]=\"passThrough().value?.class\"\n [style]=\"passThrough().value?.style\"\n text-anchor=\"middle\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"valueY()\"\n [style.font-size.px]=\"valueFont().value\"\n >\n {{ formatted() }}\n </svg:text>\n @if (label()) {\n <svg:text\n class=\"tx-gauge__label\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"fit().cx\"\n [attr.y]=\"valueY() + 6\"\n [style.font-size.px]=\"valueFont().label\"\n >\n {{ label() }}\n </svg:text>\n }\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAAA,SAAgB,WAAW,OAAsB,KAAa,KAAW;CACvE,IAAI,UAAU,QAAQ,CAAC,OAAO,SAAS,KAAK,KAAK,EAAE,MAAM,MAAM,OAAO;CACtE,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,QAAQ,QAAQ,MAAM,IAAI,CAAC;AAC7D;AAEA,SAAgB,WAAW,OAAsB,KAAa,KAAa,OAAe,KAAW;CACnG,OAAO,SAAS,MAAM,SAAS,WAAW,OAAO,KAAK,GAAG;AAC3D;AAEA,SAAgB,YAAY,IAAY,IAAY,QAAgB,OAAa;CAC/E,MAAM,OAAO,QAAQ;CACrB,MAAM,SAAS,UAAkB,KAAK,MAAM,QAAQ,GAAG,IAAI;CAC3D,OAAO,IAAI,MAAM,KAAK,IAAI,EAAC,GAAI,MAAM,EAAE,EAAC,GAAI,MAAM,KAAK,CAAC,EAAC,GAAI,MAAM,KAAK,MAAM,EAAC,GAAI,MAAM,KAAK,CAAC,EAAC,GAAI,MAAM,KAAK,MAAM,EAAC,GAAI,MAAM,KAAK,IAAI,EAAC,GAAI,MAAM,EAAE,EAAC;AACzJ;ACXA,MAAa,sBAAiC;CAC5C,aAAa;CACb,OAAO;CACP,MAAM;AACP;ACJD,MAAa,cAAc,EACzB,OAAO,YACR;ACuBD,MAAM,WAAW;CAAE,WAAW;CAAM,SAAS;CAAG,aAAa;CAAG,WAAW;CAAG,YAAY;CAAG,cAAc;AAAE;AAC7G,MAAM,UAAU;AAChB,MAAM,W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;IAAA,4BAAA;IAAA,yBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UCpDpB;EAqFA,QAAA,CAAA,6vEAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDjDY;GAAY,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;GAAA,SAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,eAcP,CAAC,sBAAsB,mBAAmB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEhD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EAlBnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SACX,CAAC,YAAY;GAAC,iBAGN,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,0BAA0B;IAC1B,8BAA8B;IAC9B,2BAA2B;GAC5B;GAAA,eACc,CAAC,sBAAsB,mBAAmB,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,6vEAAA;EAAA,CAAA"}
@@ -1,11 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, input, output } from "@angular/core";
3
- import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
3
+ import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
4
4
  import { optionalBoolean } from "@tectra-ng/core/utils";
5
5
  import { TxTooltip } from "@tectra-ng/ui/tooltip";
6
+ import { provideTxIconDefaults, txIconInfo } from "@tectra-ng/icons";
7
+ import { chartTokens, toStyleObject } from "@tectra-ng/themes";
6
8
  import { NgTemplateOutlet } from "@angular/common";
7
9
  import { injectTranslations } from "@tectra-ng/core/i18n";
8
- import { toStyleObject } from "@tectra-ng/themes";
9
10
  function heatmapRowGroups(cells, groups) {
10
11
  let offset = 0;
11
12
  return groups.map((group) => {
@@ -186,7 +187,10 @@ i0.ɵɵngDeclareClassMetadata({
186
187
  args: [{ selector: "ng-template[txHeatmapRowValue]" }]
187
188
  }]
188
189
  });
190
+ const HEATMAP_ICON_DEFAULTS = { info: txIconInfo };
191
+ const HEATMAP_THEME = { chart: chartTokens };
189
192
  var TxHeatmapCellView = class TxHeatmapCellView {
193
+ heatmapTheme = injectTokens(HEATMAP_THEME);
190
194
  cell = input(null, ...ngDevMode ? [{ debugName: "cell" }] : /* istanbul ignore next */ []);
191
195
  level = input(null, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
192
196
  legend = input(false, {
@@ -309,6 +313,7 @@ var TxHeatmapCellView = class TxHeatmapCellView {
309
313
  outputs: ["tooltipShown", "tooltipHidden"],
310
314
  exportAs: ["txTooltip"]
311
315
  }],
316
+ viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],
312
317
  changeDetection: i0.ChangeDetectionStrategy.OnPush
313
318
  });
314
319
  };
@@ -327,6 +332,7 @@ i0.ɵɵngDeclareClassMetadata({
327
332
  class: "tx-heatmap-cell",
328
333
  "[attr.data-styled]": "!isUnstyled() || null"
329
334
  },
335
+ viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],
330
336
  template: "@let item = cell();\n@if (legend() || !item || item.hidden) {\n <span\n class=\"tx-heatmap-cell__box\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [class.tx-heatmap-cell__box--legend]=\"legend()\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n aria-hidden=\"true\"\n ></span>\n} @else if (item.interactive) {\n <button\n type=\"button\"\n class=\"tx-heatmap-cell__box tx-heatmap-cell__box--interactive\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n [tooltipDisabled]=\"!item.tooltip\"\n [attr.aria-label]=\"label()\"\n (click)=\"activate.emit()\"\n ></button>\n} @else {\n <span\n class=\"tx-heatmap-cell__box\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n [attr.role]=\"label() ? 'img' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-hidden]=\"label() ? null : 'true'\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n [tooltipDisabled]=\"!item.tooltip\"\n ></span>\n}\n",
331
337
  styles: [":host{display:block;flex-shrink:0}.tx-heatmap-cell__box{display:block;flex-shrink:0;margin:0;padding:0;border:0;appearance:none;background:transparent}.tx-heatmap-cell__box--hidden{visibility:hidden}:host([data-styled]) .tx-heatmap-cell__box{width:var(--tx-chart-heatmap-cell-size);height:var(--tx-chart-heatmap-cell-size);border-radius:var(--tx-chart-heatmap-cell-radius);transition:transform var(--tx-chart-heatmap-cell-duration) ease}:host([data-styled]) .tx-heatmap-cell__box--legend{width:var(--tx-chart-heatmap-legend-cell-size);height:var(--tx-chart-heatmap-legend-cell-size)}:host([data-styled]) .tx-heatmap-cell__box--success{background:var(--tx-chart-heatmap-success-color)}:host([data-styled]) .tx-heatmap-cell__box--danger{background:var(--tx-chart-heatmap-danger-color)}:host([data-styled]) .tx-heatmap-cell__box--warn{background:var(--tx-chart-heatmap-warn-color)}:host([data-styled]) .tx-heatmap-cell__box--info{background-color:color-mix(in srgb,var(--tx-chart-heatmap-info-color) var(--tx-chart-heatmap-info-tint),transparent);background-image:repeating-linear-gradient(135deg,var(--tx-chart-heatmap-info-color) 0 2px,transparent 2px 5px)}:host([data-styled]) .tx-heatmap-cell__box--pending{box-shadow:inset 0 0 0 1px var(--tx-chart-heatmap-pending-border-color)}:host([data-styled]) .tx-heatmap-cell__box--neutral{background:var(--tx-chart-heatmap-neutral-color)}:host([data-styled]) .tx-heatmap-cell__box--empty{background:var(--tx-chart-heatmap-empty-color)}:host([data-styled]) .tx-heatmap-cell__box--scale{background:color-mix(in srgb,var(--tx-chart-heatmap-scale-color) var(--tx-heatmap-level),var(--tx-chart-heatmap-scale-base))}:host([data-styled]) .tx-heatmap-cell__box--interactive{cursor:pointer}:host([data-styled]) .tx-heatmap-cell__box--interactive:hover,:host([data-styled]) .tx-heatmap-cell__box--interactive:focus-visible{transform:scale(var(--tx-chart-heatmap-cell-hover-scale))}:host([data-styled]) .tx-heatmap-cell__box--interactive:focus-visible{outline:var(--tx-chart-focus-ring-width) solid var(--tx-chart-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-heatmap-cell__box{transition:none}:host([data-styled]) .tx-heatmap-cell__box:hover,:host([data-styled]) .tx-heatmap-cell__box:focus-visible{transform:none}}\n"]
332
338
  }]
@@ -387,6 +393,7 @@ i0.ɵɵngDeclareClassMetadata({
387
393
  }
388
394
  });
389
395
  var TxHeatmapLegend = class TxHeatmapLegend {
396
+ heatmapTheme = injectTokens(HEATMAP_THEME);
390
397
  items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
391
398
  emptyLabel = input("", ...ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []);
392
399
  scale = input(null, ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
@@ -480,6 +487,7 @@ var TxHeatmapLegend = class TxHeatmapLegend {
480
487
  ],
481
488
  outputs: ["activate"]
482
489
  }],
490
+ viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],
483
491
  changeDetection: i0.ChangeDetectionStrategy.OnPush
484
492
  });
485
493
  };
@@ -514,6 +522,7 @@ i0.ɵɵngDeclareClassMetadata({
514
522
  class: "tx-heatmap-legend",
515
523
  "[attr.data-styled]": "!isUnstyled() || null"
516
524
  },
525
+ viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],
517
526
  styles: [":host{display:block}.tx-heatmap-legend__list{display:flex;flex-wrap:wrap;align-items:center;margin:0;padding:0;list-style:none}.tx-heatmap-legend__item{display:flex;align-items:center}:host([data-styled]) .tx-heatmap-legend__list{column-gap:var(--tx-chart-heatmap-legend-gap-x);row-gap:var(--tx-chart-heatmap-legend-gap-y);margin-top:var(--tx-chart-heatmap-legend-margin-top)}:host([data-styled]) .tx-heatmap-legend__item{gap:var(--tx-chart-heatmap-legend-item-gap);color:var(--tx-chart-heatmap-legend-color);font-size:var(--tx-chart-heatmap-legend-font-size)}\n"]
518
527
  }]
519
528
  }],
@@ -553,6 +562,7 @@ i0.ɵɵngDeclareClassMetadata({
553
562
  }
554
563
  });
555
564
  var TxHeatmap = class TxHeatmap {
565
+ heatmapTheme = injectTokens(HEATMAP_THEME);
556
566
  translations = injectTranslations();
557
567
  groups = input([], ...ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []);
558
568
  rows = input([], ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
@@ -785,6 +795,7 @@ var TxHeatmap = class TxHeatmap {
785
795
  ]
786
796
  }
787
797
  ],
798
+ viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],
788
799
  changeDetection: i0.ChangeDetectionStrategy.OnPush
789
800
  });
790
801
  };
@@ -809,6 +820,7 @@ i0.ɵɵngDeclareClassMetadata({
809
820
  "[style]": "hostStyle()",
810
821
  "[attr.data-styled]": "!isUnstyled() || null"
811
822
  },
823
+ viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],
812
824
  template: "@let label = text();\n@let parts = passThrough();\n@let valueTemplate = rowValueTemplate();\n@let headerTemplate = rowHeaderTemplate();\n<div\n class=\"tx-heatmap__scroll\"\n [class]=\"parts.scroll?.class\"\n [style]=\"parts.scroll?.style\"\n [style.max-height]=\"maxHeight()\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"label.region\"\n>\n <div class=\"tx-heatmap__grid\" [class]=\"parts.grid?.class\" [style]=\"parts.grid?.style\">\n <div class=\"tx-heatmap__row tx-heatmap__row--head\" [class]=\"parts.head?.class\" [style]=\"parts.head?.style\">\n <div class=\"tx-heatmap__lead tx-heatmap__lead--head\" [class]=\"parts.lead?.class\" [style]=\"parts.lead?.style\">{{ label.rowHeader }}</div>\n <div class=\"tx-heatmap__groups\" [class]=\"parts.groups?.class\" [style]=\"parts.groups?.style\">\n @for (group of groups(); track group.key) {\n <div class=\"tx-heatmap__group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <span class=\"tx-heatmap__group-label\" [class]=\"parts.groupLabel?.class\" [style]=\"parts.groupLabel?.style\" [attr.title]=\"group.label\">{{ group.label }}</span>\n <div class=\"tx-heatmap__columns\" [class]=\"parts.columns?.class\" [style]=\"parts.columns?.style\">\n @for (column of group.columns; track column.key) {\n <span class=\"tx-heatmap__column\" [class]=\"parts.column?.class\" [style]=\"parts.column?.style\">{{ column.label }}</span>\n }\n </div>\n </div>\n }\n </div>\n @if (valueTemplate) {\n <div class=\"tx-heatmap__value tx-heatmap__value--head\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ label.valueHeader }}</div>\n }\n </div>\n\n @for (line of layout(); track line.row.key) {\n <div class=\"tx-heatmap__row\" [class]=\"parts.row?.class\" [style]=\"parts.row?.style\">\n <div class=\"tx-heatmap__lead\" [class]=\"parts.lead?.class\" [style]=\"parts.lead?.style\">\n @if (headerTemplate) {\n <ng-container [ngTemplateOutlet]=\"headerTemplate\" [ngTemplateOutletContext]=\"line.context\" />\n } @else {\n {{ line.row.label ?? line.row.key }}\n }\n </div>\n <div class=\"tx-heatmap__groups\" [class]=\"parts.groups?.class\" [style]=\"parts.groups?.style\">\n @for (group of line.groups; track group.key) {\n <div class=\"tx-heatmap__columns\" [class]=\"parts.columns?.class\" [style]=\"parts.columns?.style\">\n @for (slot of group.slots; track slot.columnKey) {\n <tx-heatmap-cell\n [cell]=\"slot.cell\"\n [level]=\"slot.level\"\n [boxClass]=\"parts.cell?.class\"\n [boxStyle]=\"parts.cell?.style\"\n [unstyled]=\"isUnstyled()\"\n (activate)=\"onCellActivate(line.row, slot)\"\n />\n }\n </div>\n }\n </div>\n @if (valueTemplate) {\n <div class=\"tx-heatmap__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">\n <ng-container [ngTemplateOutlet]=\"valueTemplate\" [ngTemplateOutletContext]=\"line.context\" />\n </div>\n }\n </div>\n }\n </div>\n</div>\n\n@if (legend().length) {\n <tx-heatmap-legend\n [class]=\"parts.legend?.class\"\n [style]=\"parts.legend?.style\"\n [items]=\"legend()\"\n [emptyLabel]=\"label.empty\"\n [scale]=\"scale()\"\n [unstyled]=\"isUnstyled()\"\n />\n}\n",
813
825
  styles: [":host{display:block;min-width:0}.tx-heatmap__scroll{overflow:auto;overscroll-behavior-x:contain}.tx-heatmap__grid{display:flex;flex-direction:column;width:max-content;min-width:100%}.tx-heatmap__row{display:flex;align-items:center}.tx-heatmap__row--head{position:sticky;top:0;z-index:2;align-items:flex-end}.tx-heatmap__row--head .tx-heatmap__lead,.tx-heatmap__row--head .tx-heatmap__value{z-index:3;display:flex;align-items:flex-end;align-self:stretch}.tx-heatmap__lead{position:sticky;left:0;z-index:1;flex-shrink:0}.tx-heatmap__groups{display:flex;flex:1;align-items:flex-end}.tx-heatmap__group{display:flex;flex-direction:column;min-width:0}.tx-heatmap__group-label{display:block;overflow:hidden;max-width:0;min-width:100%;line-height:1;text-overflow:ellipsis;white-space:nowrap}.tx-heatmap__columns{display:flex}.tx-heatmap__column{flex-shrink:0;line-height:1;text-align:center}.tx-heatmap__value{position:sticky;right:0;z-index:1;display:flex;flex-shrink:0;justify-content:flex-end}:host([data-styled]) .tx-heatmap__scroll{max-height:var(--tx-chart-heatmap-max-height);padding-bottom:var(--tx-chart-heatmap-scroll-padding-bottom);border-radius:var(--tx-chart-heatmap-scroll-radius)}:host([data-styled]) .tx-heatmap__scroll:focus-visible{outline:var(--tx-chart-focus-ring-width) solid var(--tx-chart-focus-ring-color)}:host([data-styled]) .tx-heatmap__row{gap:var(--tx-chart-heatmap-row-gap);padding-block:var(--tx-chart-heatmap-row-padding-y);border-bottom:1px solid var(--tx-chart-heatmap-row-border-color)}:host([data-styled]) .tx-heatmap__row:last-child{border-bottom:0}:host([data-styled]) .tx-heatmap__row--head{padding-top:0;padding-bottom:var(--tx-chart-heatmap-head-padding-bottom);background:var(--tx-chart-heatmap-background)}:host([data-styled]) .tx-heatmap__lead{width:var(--tx-chart-heatmap-lead-width);padding-inline-end:var(--tx-chart-heatmap-lead-padding-end);color:var(--tx-chart-heatmap-lead-color);font-size:var(--tx-chart-heatmap-lead-font-size);background:var(--tx-chart-heatmap-background)}:host([data-styled]) .tx-heatmap__lead--head,:host([data-styled]) .tx-heatmap__value--head{color:var(--tx-chart-heatmap-head-color);font-size:var(--tx-chart-heatmap-head-font-size);font-weight:var(--tx-chart-heatmap-head-font-weight)}:host([data-styled]) .tx-heatmap__groups{gap:var(--tx-chart-heatmap-group-gap)}:host([data-styled]) .tx-heatmap__group{gap:var(--tx-chart-heatmap-group-label-gap)}:host([data-styled]) .tx-heatmap__group-label{color:var(--tx-chart-heatmap-group-label-color);font-size:var(--tx-chart-heatmap-group-label-font-size);font-weight:var(--tx-chart-heatmap-group-label-font-weight)}:host([data-styled]) .tx-heatmap__columns{gap:var(--tx-chart-heatmap-column-gap);min-width:var(--tx-chart-heatmap-columns-min-width)}:host([data-styled]) .tx-heatmap__column{width:var(--tx-chart-heatmap-cell-size);color:var(--tx-chart-heatmap-column-color);font-size:var(--tx-chart-heatmap-column-font-size);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-heatmap__value{width:var(--tx-chart-heatmap-value-width);background:var(--tx-chart-heatmap-background)}\n"]
814
826
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-heatmap.mjs","names":[],"sources":["../../../../packages/charts/heatmap/src/heatmap-layout.ts","../../../../packages/charts/heatmap/src/heatmap-calendar.ts","../../../../packages/charts/heatmap/src/heatmap-templates.directive.ts","../../../../packages/charts/heatmap/src/heatmap-cell.component.ts","../../../../packages/charts/heatmap/src/heatmap-cell.component.html","../../../../packages/charts/heatmap/src/heatmap-legend.component.ts","../../../../packages/charts/heatmap/src/heatmap.component.ts","../../../../packages/charts/heatmap/src/heatmap.component.html"],"sourcesContent":["import { TxHeatmapCell, TxHeatmapColumnGroup, TxHeatmapRow, TxHeatmapRowGroup, TxHeatmapScale } from './heatmap.types';\n\nexport function heatmapRowGroups(cells: readonly (TxHeatmapCell | null)[], groups: readonly TxHeatmapColumnGroup[]): TxHeatmapRowGroup[] {\n let offset = 0;\n return groups.map((group) => {\n const slots = group.columns.map((column, index) => ({ columnKey: column.key, cell: cells[offset + index] ?? null }));\n offset += group.columns.length;\n return { key: group.key, slots };\n });\n}\n\nexport function heatmapScale(rows: readonly TxHeatmapRow[], steps: number, min?: number, max?: number): TxHeatmapScale {\n let low = Infinity;\n let high = -Infinity;\n for (const row of rows) {\n for (const cell of row.cells) {\n const value = cell?.value;\n if (typeof value === 'number' && Number.isFinite(value)) {\n low = Math.min(low, value);\n high = Math.max(high, value);\n }\n }\n }\n return {\n min: min ?? (Number.isFinite(low) ? Math.min(low, 0) : 0),\n max: max ?? (Number.isFinite(high) ? high : 0),\n steps: Math.max(1, Math.round(steps)),\n };\n}\n\nexport function heatmapLevel(value: number | null | undefined, scale: TxHeatmapScale): number {\n if (typeof value !== 'number' || !Number.isFinite(value) || value <= scale.min) {\n return 0;\n }\n const span = scale.max - scale.min;\n const ratio = span > 0 ? Math.min(1, (value - scale.min) / span) : 1;\n return Math.max(1, Math.ceil(ratio * scale.steps)) / scale.steps;\n}\n\nexport function heatmapCellLabel(cell: TxHeatmapCell): string | null {\n return cell.ariaLabel || cell.tooltip || null;\n}\n","import { TxHeatmapCalendar, TxHeatmapCalendarOptions, TxHeatmapCalendarValue, TxHeatmapCell, TxHeatmapColumnGroup, TxHeatmapRow } from './heatmap.types';\n\nconst DAY = 86_400_000;\n\nfunction toDay(value: string | Date): number {\n const date = typeof value === 'string' ? new Date(`${value.slice(0, 10)}T00:00:00Z`) : new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate()));\n return Math.floor(date.getTime() / DAY);\n}\n\nfunction dayKey(day: number): string {\n return new Date(day * DAY).toISOString().slice(0, 10);\n}\n\nexport function heatmapCalendar(values: readonly TxHeatmapCalendarValue[], options: TxHeatmapCalendarOptions): TxHeatmapCalendar {\n const intl = options.intl ?? 'en-US';\n const firstDay = ((options.firstDayOfWeek ?? 1) % 7 + 7) % 7;\n const from = toDay(options.from);\n const to = toDay(options.to);\n const byDay = new Map<number, TxHeatmapCalendarValue>();\n for (const item of values) {\n byDay.set(toDay(item.date), item);\n }\n const weekday = (day: number) => (new Date(day * DAY).getUTCDay() - firstDay + 7) % 7;\n const start = from - weekday(from);\n const weeks = to < from ? 0 : Math.floor((to - start) / 7) + 1;\n const monthFormat = new Intl.DateTimeFormat(intl, { month: 'short', timeZone: 'UTC' });\n const dayFormat = new Intl.DateTimeFormat(intl, { weekday: 'short', timeZone: 'UTC' });\n const dateFormat = new Intl.DateTimeFormat(intl, { dateStyle: 'medium', timeZone: 'UTC' });\n const numberFormat = options.format ?? new Intl.NumberFormat(intl).format;\n\n const groups: TxHeatmapColumnGroup[] = [];\n for (let week = 0; week < weeks; week++) {\n const first = Math.max(start + week * 7, from);\n const date = new Date(first * DAY);\n const key = `${date.getUTCFullYear()}-${date.getUTCMonth()}`;\n let group = groups[groups.length - 1];\n if (!group || group.key !== key) {\n group = { key, label: monthFormat.format(date), columns: [] };\n groups.push(group);\n }\n group.columns.push({ key: dayKey(start + week * 7), label: '' });\n }\n\n const rows: TxHeatmapRow[] = Array.from({ length: 7 }, (_, index) => {\n const cells: (TxHeatmapCell | null)[] = [];\n for (let week = 0; week < weeks; week++) {\n const day = start + week * 7 + index;\n if (day < from || day > to) {\n cells.push({ hidden: true });\n continue;\n }\n const item = byDay.get(day);\n const value = item?.value ?? 0;\n const label = `${dateFormat.format(new Date(day * DAY))}: ${numberFormat(value)}`;\n cells.push({ value, tooltip: item?.tooltip ?? label, ariaLabel: label, interactive: options.interactive, data: item?.data ?? dayKey(day) });\n }\n return { key: `day-${index}`, label: dayFormat.format(new Date((start + index) * DAY)), cells };\n });\n\n return { groups, rows };\n}\n","import { Directive } from '@angular/core';\nimport { TxHeatmapRowContext } from './heatmap.types';\n\n@Directive({ selector: 'ng-template[txHeatmapRowHeader]' })\nexport class TxHeatmapRowHeader {\n static ngTemplateContextGuard(_directive: TxHeatmapRowHeader, context: unknown): context is TxHeatmapRowContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txHeatmapRowValue]' })\nexport class TxHeatmapRowValue {\n static ngTemplateContextGuard(_directive: TxHeatmapRowValue, context: unknown): context is TxHeatmapRowContext {\n return !!context;\n }\n}\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from '@angular/core';\nimport { injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { heatmapCellLabel } from './heatmap-layout';\nimport { TxHeatmapCell } from './heatmap.types';\n\n@Component({\n selector: 'tx-heatmap-cell',\n imports: [TxTooltip],\n templateUrl: './heatmap-cell.component.html',\n styleUrl: './heatmap-cell.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-heatmap-cell',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxHeatmapCellView {\n readonly cell = input<TxHeatmapCell | null>(null);\n readonly level = input<number | null>(null);\n readonly legend = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly boxClass = input<string | undefined>(undefined);\n readonly boxStyle = input<Record<string, string> | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly activate = output<void>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly label = computed(() => {\n const cell = this.cell();\n return cell ? heatmapCellLabel(cell) : null;\n });\n readonly kind = computed(() => {\n const cell = this.cell();\n if (!cell) {\n return 'empty';\n }\n if (cell.hidden) {\n return 'hidden';\n }\n if (typeof cell.value === 'number' && !cell.tone) {\n return (this.level() ?? 0) > 0 ? 'scale' : 'empty';\n }\n return cell.tone ?? 'empty';\n });\n readonly levelStyle = computed(() => {\n const level = this.level();\n return this.kind() === 'scale' && level ? `${Math.round(level * 100)}%` : null;\n });\n}\n","@let item = cell();\n@if (legend() || !item || item.hidden) {\n <span\n class=\"tx-heatmap-cell__box\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [class.tx-heatmap-cell__box--legend]=\"legend()\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n aria-hidden=\"true\"\n ></span>\n} @else if (item.interactive) {\n <button\n type=\"button\"\n class=\"tx-heatmap-cell__box tx-heatmap-cell__box--interactive\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n [tooltipDisabled]=\"!item.tooltip\"\n [attr.aria-label]=\"label()\"\n (click)=\"activate.emit()\"\n ></button>\n} @else {\n <span\n class=\"tx-heatmap-cell__box\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n [attr.role]=\"label() ? 'img' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-hidden]=\"label() ? null : 'true'\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n [tooltipDisabled]=\"!item.tooltip\"\n ></span>\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxHeatmapCellView } from './heatmap-cell.component';\nimport { TxHeatmapLegendItem, TxHeatmapScale } from './heatmap.types';\nimport { heatmapLevel } from './heatmap-layout';\n\n@Component({\n selector: 'tx-heatmap-legend',\n imports: [TxHeatmapCellView],\n template: `\n <ul class=\"tx-heatmap-legend__list\">\n @for (item of items(); track $index) {\n <li class=\"tx-heatmap-legend__item\">\n <tx-heatmap-cell [cell]=\"{ tone: item.tone, value: item.value }\" [level]=\"levelOf(item.value)\" legend [unstyled]=\"isUnstyled()\" />\n {{ item.label }}\n </li>\n }\n @if (emptyLabel()) {\n <li class=\"tx-heatmap-legend__item\">\n <tx-heatmap-cell legend [unstyled]=\"isUnstyled()\" />\n {{ emptyLabel() }}\n </li>\n }\n </ul>\n `,\n styleUrl: './heatmap-legend.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-heatmap-legend',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxHeatmapLegend {\n readonly items = input<readonly TxHeatmapLegendItem[]>([]);\n readonly emptyLabel = input('');\n readonly scale = input<TxHeatmapScale | null>(null);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n\n levelOf(value: number | undefined): number | null {\n const scale = this.scale();\n return scale && typeof value === 'number' ? heatmapLevel(value, scale) : null;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, input, output, TemplateRef } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxHeatmapCellView } from './heatmap-cell.component';\nimport { heatmapLevel, heatmapRowGroups, heatmapScale } from './heatmap-layout';\nimport { TxHeatmapLegend } from './heatmap-legend.component';\nimport { TxHeatmapRowHeader, TxHeatmapRowValue } from './heatmap-templates.directive';\nimport {\n TxHeatmapCell,\n TxHeatmapCellClick,\n TxHeatmapCellSlot,\n TxHeatmapColumnGroup,\n TxHeatmapLabels,\n TxHeatmapLegendItem,\n TxHeatmapPart,\n TxHeatmapRow,\n TxHeatmapRowContext,\n} from './heatmap.types';\n\n@Component({\n selector: 'tx-heatmap',\n imports: [NgTemplateOutlet, TxHeatmapCellView, TxHeatmapLegend],\n templateUrl: './heatmap.component.html',\n styleUrl: './heatmap.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-heatmap',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n})\nexport class TxHeatmap {\n readonly translations = injectTranslations();\n\n readonly groups = input<readonly TxHeatmapColumnGroup[]>([]);\n readonly rows = input<readonly TxHeatmapRow[]>([]);\n readonly legend = input<readonly TxHeatmapLegendItem[]>([]);\n readonly labels = input<Partial<TxHeatmapLabels>>({});\n readonly maxHeight = input<string | undefined>(undefined);\n readonly scaleSteps = input(5);\n readonly scaleMin = input<number | undefined>(undefined);\n readonly scaleMax = input<number | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxHeatmapPart, TxHeatmap> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly cellClick = output<TxHeatmapCellClick>();\n\n readonly rowHeaderTemplate = contentChild(TxHeatmapRowHeader, { read: TemplateRef<TxHeatmapRowContext> });\n readonly rowValueTemplate = contentChild(TxHeatmapRowValue, { read: TemplateRef<TxHeatmapRowContext> });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('heatmap', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n readonly text = computed<TxHeatmapLabels>(() => {\n const t = this.translations();\n return { rowHeader: '', valueHeader: '', empty: t.chartNoData, region: t.chartHeatmap, ...this.labels() };\n });\n readonly scale = computed(() => heatmapScale(this.rows(), this.scaleSteps(), this.scaleMin(), this.scaleMax()));\n readonly layout = computed(() => {\n const groups = this.groups();\n const scale = this.scale();\n return this.rows().map((row) => ({\n row,\n context: { $implicit: row, row } satisfies TxHeatmapRowContext,\n groups: heatmapRowGroups(row.cells, groups).map((group) => ({\n ...group,\n slots: group.slots.map((slot) => ({ ...slot, level: heatmapLevel(slot.cell?.value, scale) })),\n })),\n }));\n });\n\n onCellActivate(row: TxHeatmapRow, slot: TxHeatmapCellSlot): void {\n const cell: TxHeatmapCell | null = slot.cell;\n if (cell?.interactive) {\n this.cellClick.emit({ row, cell, columnKey: slot.columnKey });\n }\n }\n}\n","@let label = text();\n@let parts = passThrough();\n@let valueTemplate = rowValueTemplate();\n@let headerTemplate = rowHeaderTemplate();\n<div\n class=\"tx-heatmap__scroll\"\n [class]=\"parts.scroll?.class\"\n [style]=\"parts.scroll?.style\"\n [style.max-height]=\"maxHeight()\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"label.region\"\n>\n <div class=\"tx-heatmap__grid\" [class]=\"parts.grid?.class\" [style]=\"parts.grid?.style\">\n <div class=\"tx-heatmap__row tx-heatmap__row--head\" [class]=\"parts.head?.class\" [style]=\"parts.head?.style\">\n <div class=\"tx-heatmap__lead tx-heatmap__lead--head\" [class]=\"parts.lead?.class\" [style]=\"parts.lead?.style\">{{ label.rowHeader }}</div>\n <div class=\"tx-heatmap__groups\" [class]=\"parts.groups?.class\" [style]=\"parts.groups?.style\">\n @for (group of groups(); track group.key) {\n <div class=\"tx-heatmap__group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <span class=\"tx-heatmap__group-label\" [class]=\"parts.groupLabel?.class\" [style]=\"parts.groupLabel?.style\" [attr.title]=\"group.label\">{{ group.label }}</span>\n <div class=\"tx-heatmap__columns\" [class]=\"parts.columns?.class\" [style]=\"parts.columns?.style\">\n @for (column of group.columns; track column.key) {\n <span class=\"tx-heatmap__column\" [class]=\"parts.column?.class\" [style]=\"parts.column?.style\">{{ column.label }}</span>\n }\n </div>\n </div>\n }\n </div>\n @if (valueTemplate) {\n <div class=\"tx-heatmap__value tx-heatmap__value--head\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ label.valueHeader }}</div>\n }\n </div>\n\n @for (line of layout(); track line.row.key) {\n <div class=\"tx-heatmap__row\" [class]=\"parts.row?.class\" [style]=\"parts.row?.style\">\n <div class=\"tx-heatmap__lead\" [class]=\"parts.lead?.class\" [style]=\"parts.lead?.style\">\n @if (headerTemplate) {\n <ng-container [ngTemplateOutlet]=\"headerTemplate\" [ngTemplateOutletContext]=\"line.context\" />\n } @else {\n {{ line.row.label ?? line.row.key }}\n }\n </div>\n <div class=\"tx-heatmap__groups\" [class]=\"parts.groups?.class\" [style]=\"parts.groups?.style\">\n @for (group of line.groups; track group.key) {\n <div class=\"tx-heatmap__columns\" [class]=\"parts.columns?.class\" [style]=\"parts.columns?.style\">\n @for (slot of group.slots; track slot.columnKey) {\n <tx-heatmap-cell\n [cell]=\"slot.cell\"\n [level]=\"slot.level\"\n [boxClass]=\"parts.cell?.class\"\n [boxStyle]=\"parts.cell?.style\"\n [unstyled]=\"isUnstyled()\"\n (activate)=\"onCellActivate(line.row, slot)\"\n />\n }\n </div>\n }\n </div>\n @if (valueTemplate) {\n <div class=\"tx-heatmap__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">\n <ng-container [ngTemplateOutlet]=\"valueTemplate\" [ngTemplateOutletContext]=\"line.context\" />\n </div>\n }\n </div>\n }\n </div>\n</div>\n\n@if (legend().length) {\n <tx-heatmap-legend\n [class]=\"parts.legend?.class\"\n [style]=\"parts.legend?.style\"\n [items]=\"legend()\"\n [emptyLabel]=\"label.empty\"\n [scale]=\"scale()\"\n [unstyled]=\"isUnstyled()\"\n />\n}\n"],"mappings":";;;;;;;;AAEA,SAAgB,iBAAiB,OAA0C,QAAuC;CAChH,IAAI,SAAS;CACb,OAAO,OAAO,KAAK,UAAS;EAC1B,MAAM,QAAQ,MAAM,QAAQ,KAAK,QAAQ,WAAW;GAAE,WAAW,OAAO;GAAK,MAAM,MAAM,SAAS,UAAU;EAAI,EAAG;EACnH,UAAU,MAAM,QAAQ;EACxB,OAAO;GAAE,KAAK,MAAM;GAAK;EAAK;CAChC,CAAC;AACH;AAEA,SAAgB,aAAa,MAA+B,OAAe,KAAc,KAAY;CACnG,IAAI,MAAM;CACV,IAAI,OAAO;CACX,KAAK,MAAM,OAAO,MAChB,KAAK,MAAM,QAAQ,IAAI,OAAO;EAC5B,MAAM,QAAQ,MAAM;EACpB,IAAI,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,GAAG;GACvD,MAAM,KAAK,IAAI,KAAK,KAAK;GACzB,OAAO,KAAK,IAAI,MAAM,KAAK;EAC7B;CACF;CAEF,OAAO;EACL,KAAK,QAAQ,OAAO,SAAS,GAAG,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI;EACvD,KAAK,QAAQ,OAAO,SAAS,IAAI,IAAI,OAAO;EAC5C,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,CAAC;CACrC;AACH;AAEA,SAAgB,aAAa,OAAkC,OAAqB;CAClF,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,SAAS,MAAM,KACzE,OAAO;CAET,MAAM,OAAO,MAAM,MAAM,MAAM;CAC/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;GAAA,MAAA,CAAA,GAAA,iBAC/D,iBAAiB,GAAA;IAAI,MAAM;IAAkC,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-heatmap.mjs","names":[],"sources":["../../../../packages/charts/heatmap/src/heatmap-layout.ts","../../../../packages/charts/heatmap/src/heatmap-calendar.ts","../../../../packages/charts/heatmap/src/heatmap-templates.directive.ts","../../../../packages/charts/heatmap/src/heatmap.icons.ts","../../../../packages/charts/heatmap/src/heatmap.theme.ts","../../../../packages/charts/heatmap/src/heatmap-cell.component.ts","../../../../packages/charts/heatmap/src/heatmap-cell.component.html","../../../../packages/charts/heatmap/src/heatmap-legend.component.ts","../../../../packages/charts/heatmap/src/heatmap.component.ts","../../../../packages/charts/heatmap/src/heatmap.component.html"],"sourcesContent":["import { TxHeatmapCell, TxHeatmapColumnGroup, TxHeatmapRow, TxHeatmapRowGroup, TxHeatmapScale } from './heatmap.types';\n\nexport function heatmapRowGroups(cells: readonly (TxHeatmapCell | null)[], groups: readonly TxHeatmapColumnGroup[]): TxHeatmapRowGroup[] {\n let offset = 0;\n return groups.map((group) => {\n const slots = group.columns.map((column, index) => ({ columnKey: column.key, cell: cells[offset + index] ?? null }));\n offset += group.columns.length;\n return { key: group.key, slots };\n });\n}\n\nexport function heatmapScale(rows: readonly TxHeatmapRow[], steps: number, min?: number, max?: number): TxHeatmapScale {\n let low = Infinity;\n let high = -Infinity;\n for (const row of rows) {\n for (const cell of row.cells) {\n const value = cell?.value;\n if (typeof value === 'number' && Number.isFinite(value)) {\n low = Math.min(low, value);\n high = Math.max(high, value);\n }\n }\n }\n return {\n min: min ?? (Number.isFinite(low) ? Math.min(low, 0) : 0),\n max: max ?? (Number.isFinite(high) ? high : 0),\n steps: Math.max(1, Math.round(steps)),\n };\n}\n\nexport function heatmapLevel(value: number | null | undefined, scale: TxHeatmapScale): number {\n if (typeof value !== 'number' || !Number.isFinite(value) || value <= scale.min) {\n return 0;\n }\n const span = scale.max - scale.min;\n const ratio = span > 0 ? Math.min(1, (value - scale.min) / span) : 1;\n return Math.max(1, Math.ceil(ratio * scale.steps)) / scale.steps;\n}\n\nexport function heatmapCellLabel(cell: TxHeatmapCell): string | null {\n return cell.ariaLabel || cell.tooltip || null;\n}\n","import { TxHeatmapCalendar, TxHeatmapCalendarOptions, TxHeatmapCalendarValue, TxHeatmapCell, TxHeatmapColumnGroup, TxHeatmapRow } from './heatmap.types';\n\nconst DAY = 86_400_000;\n\nfunction toDay(value: string | Date): number {\n const date = typeof value === 'string' ? new Date(`${value.slice(0, 10)}T00:00:00Z`) : new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate()));\n return Math.floor(date.getTime() / DAY);\n}\n\nfunction dayKey(day: number): string {\n return new Date(day * DAY).toISOString().slice(0, 10);\n}\n\nexport function heatmapCalendar(values: readonly TxHeatmapCalendarValue[], options: TxHeatmapCalendarOptions): TxHeatmapCalendar {\n const intl = options.intl ?? 'en-US';\n const firstDay = ((options.firstDayOfWeek ?? 1) % 7 + 7) % 7;\n const from = toDay(options.from);\n const to = toDay(options.to);\n const byDay = new Map<number, TxHeatmapCalendarValue>();\n for (const item of values) {\n byDay.set(toDay(item.date), item);\n }\n const weekday = (day: number) => (new Date(day * DAY).getUTCDay() - firstDay + 7) % 7;\n const start = from - weekday(from);\n const weeks = to < from ? 0 : Math.floor((to - start) / 7) + 1;\n const monthFormat = new Intl.DateTimeFormat(intl, { month: 'short', timeZone: 'UTC' });\n const dayFormat = new Intl.DateTimeFormat(intl, { weekday: 'short', timeZone: 'UTC' });\n const dateFormat = new Intl.DateTimeFormat(intl, { dateStyle: 'medium', timeZone: 'UTC' });\n const numberFormat = options.format ?? new Intl.NumberFormat(intl).format;\n\n const groups: TxHeatmapColumnGroup[] = [];\n for (let week = 0; week < weeks; week++) {\n const first = Math.max(start + week * 7, from);\n const date = new Date(first * DAY);\n const key = `${date.getUTCFullYear()}-${date.getUTCMonth()}`;\n let group = groups[groups.length - 1];\n if (!group || group.key !== key) {\n group = { key, label: monthFormat.format(date), columns: [] };\n groups.push(group);\n }\n group.columns.push({ key: dayKey(start + week * 7), label: '' });\n }\n\n const rows: TxHeatmapRow[] = Array.from({ length: 7 }, (_, index) => {\n const cells: (TxHeatmapCell | null)[] = [];\n for (let week = 0; week < weeks; week++) {\n const day = start + week * 7 + index;\n if (day < from || day > to) {\n cells.push({ hidden: true });\n continue;\n }\n const item = byDay.get(day);\n const value = item?.value ?? 0;\n const label = `${dateFormat.format(new Date(day * DAY))}: ${numberFormat(value)}`;\n cells.push({ value, tooltip: item?.tooltip ?? label, ariaLabel: label, interactive: options.interactive, data: item?.data ?? dayKey(day) });\n }\n return { key: `day-${index}`, label: dayFormat.format(new Date((start + index) * DAY)), cells };\n });\n\n return { groups, rows };\n}\n","import { Directive } from '@angular/core';\nimport { TxHeatmapRowContext } from './heatmap.types';\n\n@Directive({ selector: 'ng-template[txHeatmapRowHeader]' })\nexport class TxHeatmapRowHeader {\n static ngTemplateContextGuard(_directive: TxHeatmapRowHeader, context: unknown): context is TxHeatmapRowContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txHeatmapRowValue]' })\nexport class TxHeatmapRowValue {\n static ngTemplateContextGuard(_directive: TxHeatmapRowValue, context: unknown): context is TxHeatmapRowContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconInfo } from '@tectra-ng/icons';\n\nexport const HEATMAP_ICON_DEFAULTS: TxIconSet = {\n info: txIconInfo,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const HEATMAP_THEME = {\n chart: chartTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from '@angular/core';\nimport { injectTokens, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { heatmapCellLabel } from './heatmap-layout';\nimport { TxHeatmapCell } from './heatmap.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { HEATMAP_ICON_DEFAULTS } from './heatmap.icons';\nimport { HEATMAP_THEME } from './heatmap.theme';\n\n@Component({\n selector: 'tx-heatmap-cell',\n imports: [TxTooltip],\n templateUrl: './heatmap-cell.component.html',\n styleUrl: './heatmap-cell.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-heatmap-cell',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],\n})\nexport class TxHeatmapCellView {\n private readonly heatmapTheme = injectTokens(HEATMAP_THEME);\n\n readonly cell = input<TxHeatmapCell | null>(null);\n readonly level = input<number | null>(null);\n readonly legend = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly boxClass = input<string | undefined>(undefined);\n readonly boxStyle = input<Record<string, string> | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly activate = output<void>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly label = computed(() => {\n const cell = this.cell();\n return cell ? heatmapCellLabel(cell) : null;\n });\n readonly kind = computed(() => {\n const cell = this.cell();\n if (!cell) {\n return 'empty';\n }\n if (cell.hidden) {\n return 'hidden';\n }\n if (typeof cell.value === 'number' && !cell.tone) {\n return (this.level() ?? 0) > 0 ? 'scale' : 'empty';\n }\n return cell.tone ?? 'empty';\n });\n readonly levelStyle = computed(() => {\n const level = this.level();\n return this.kind() === 'scale' && level ? `${Math.round(level * 100)}%` : null;\n });\n}\n","@let item = cell();\n@if (legend() || !item || item.hidden) {\n <span\n class=\"tx-heatmap-cell__box\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [class.tx-heatmap-cell__box--legend]=\"legend()\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n aria-hidden=\"true\"\n ></span>\n} @else if (item.interactive) {\n <button\n type=\"button\"\n class=\"tx-heatmap-cell__box tx-heatmap-cell__box--interactive\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n [tooltipDisabled]=\"!item.tooltip\"\n [attr.aria-label]=\"label()\"\n (click)=\"activate.emit()\"\n ></button>\n} @else {\n <span\n class=\"tx-heatmap-cell__box\"\n [class]=\"['tx-heatmap-cell__box--' + kind(), boxClass() ?? '']\"\n [style]=\"boxStyle()\"\n [style.--tx-heatmap-level]=\"levelStyle()\"\n [attr.role]=\"label() ? 'img' : null\"\n [attr.aria-label]=\"label()\"\n [attr.aria-hidden]=\"label() ? null : 'true'\"\n [txTooltip]=\"item.tooltip\"\n tooltipPlacement=\"top\"\n [tooltipDisabled]=\"!item.tooltip\"\n ></span>\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { injectTokens, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxHeatmapCellView } from './heatmap-cell.component';\nimport { TxHeatmapLegendItem, TxHeatmapScale } from './heatmap.types';\nimport { heatmapLevel } from './heatmap-layout';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { HEATMAP_ICON_DEFAULTS } from './heatmap.icons';\nimport { HEATMAP_THEME } from './heatmap.theme';\n\n@Component({\n selector: 'tx-heatmap-legend',\n imports: [TxHeatmapCellView],\n template: `\n <ul class=\"tx-heatmap-legend__list\">\n @for (item of items(); track $index) {\n <li class=\"tx-heatmap-legend__item\">\n <tx-heatmap-cell [cell]=\"{ tone: item.tone, value: item.value }\" [level]=\"levelOf(item.value)\" legend [unstyled]=\"isUnstyled()\" />\n {{ item.label }}\n </li>\n }\n @if (emptyLabel()) {\n <li class=\"tx-heatmap-legend__item\">\n <tx-heatmap-cell legend [unstyled]=\"isUnstyled()\" />\n {{ emptyLabel() }}\n </li>\n }\n </ul>\n `,\n styleUrl: './heatmap-legend.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-heatmap-legend',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],\n})\nexport class TxHeatmapLegend {\n private readonly heatmapTheme = injectTokens(HEATMAP_THEME);\n\n readonly items = input<readonly TxHeatmapLegendItem[]>([]);\n readonly emptyLabel = input('');\n readonly scale = input<TxHeatmapScale | null>(null);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n\n levelOf(value: number | undefined): number | null {\n const scale = this.scale();\n return scale && typeof value === 'number' ? heatmapLevel(value, scale) : null;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, input, output, TemplateRef } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxHeatmapCellView } from './heatmap-cell.component';\nimport { heatmapLevel, heatmapRowGroups, heatmapScale } from './heatmap-layout';\nimport { TxHeatmapLegend } from './heatmap-legend.component';\nimport { TxHeatmapRowHeader, TxHeatmapRowValue } from './heatmap-templates.directive';\nimport {\n TxHeatmapCell,\n TxHeatmapCellClick,\n TxHeatmapCellSlot,\n TxHeatmapColumnGroup,\n TxHeatmapLabels,\n TxHeatmapLegendItem,\n TxHeatmapPart,\n TxHeatmapRow,\n TxHeatmapRowContext,\n} from './heatmap.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { HEATMAP_ICON_DEFAULTS } from './heatmap.icons';\nimport { HEATMAP_THEME } from './heatmap.theme';\n\n@Component({\n selector: 'tx-heatmap',\n imports: [NgTemplateOutlet, TxHeatmapCellView, TxHeatmapLegend],\n templateUrl: './heatmap.component.html',\n styleUrl: './heatmap.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-heatmap',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n },\n viewProviders: [provideTxIconDefaults(HEATMAP_ICON_DEFAULTS)],\n})\nexport class TxHeatmap {\n private readonly heatmapTheme = injectTokens(HEATMAP_THEME);\n\n readonly translations = injectTranslations();\n\n readonly groups = input<readonly TxHeatmapColumnGroup[]>([]);\n readonly rows = input<readonly TxHeatmapRow[]>([]);\n readonly legend = input<readonly TxHeatmapLegendItem[]>([]);\n readonly labels = input<Partial<TxHeatmapLabels>>({});\n readonly maxHeight = input<string | undefined>(undefined);\n readonly scaleSteps = input(5);\n readonly scaleMin = input<number | undefined>(undefined);\n readonly scaleMax = input<number | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxHeatmapPart, TxHeatmap> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly cellClick = output<TxHeatmapCellClick>();\n\n readonly rowHeaderTemplate = contentChild(TxHeatmapRowHeader, { read: TemplateRef<TxHeatmapRowContext> });\n readonly rowValueTemplate = contentChild(TxHeatmapRowValue, { read: TemplateRef<TxHeatmapRowContext> });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('heatmap', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n readonly text = computed<TxHeatmapLabels>(() => {\n const t = this.translations();\n return { rowHeader: '', valueHeader: '', empty: t.chartNoData, region: t.chartHeatmap, ...this.labels() };\n });\n readonly scale = computed(() => heatmapScale(this.rows(), this.scaleSteps(), this.scaleMin(), this.scaleMax()));\n readonly layout = computed(() => {\n const groups = this.groups();\n const scale = this.scale();\n return this.rows().map((row) => ({\n row,\n context: { $implicit: row, row } satisfies TxHeatmapRowContext,\n groups: heatmapRowGroups(row.cells, groups).map((group) => ({\n ...group,\n slots: group.slots.map((slot) => ({ ...slot, level: heatmapLevel(slot.cell?.value, scale) })),\n })),\n }));\n });\n\n onCellActivate(row: TxHeatmapRow, slot: TxHeatmapCellSlot): void {\n const cell: TxHeatmapCell | null = slot.cell;\n if (cell?.interactive) {\n this.cellClick.emit({ row, cell, columnKey: slot.columnKey });\n }\n }\n}\n","@let label = text();\n@let parts = passThrough();\n@let valueTemplate = rowValueTemplate();\n@let headerTemplate = rowHeaderTemplate();\n<div\n class=\"tx-heatmap__scroll\"\n [class]=\"parts.scroll?.class\"\n [style]=\"parts.scroll?.style\"\n [style.max-height]=\"maxHeight()\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"label.region\"\n>\n <div class=\"tx-heatmap__grid\" [class]=\"parts.grid?.class\" [style]=\"parts.grid?.style\">\n <div class=\"tx-heatmap__row tx-heatmap__row--head\" [class]=\"parts.head?.class\" [style]=\"parts.head?.style\">\n <div class=\"tx-heatmap__lead tx-heatmap__lead--head\" [class]=\"parts.lead?.class\" [style]=\"parts.lead?.style\">{{ label.rowHeader }}</div>\n <div class=\"tx-heatmap__groups\" [class]=\"parts.groups?.class\" [style]=\"parts.groups?.style\">\n @for (group of groups(); track group.key) {\n <div class=\"tx-heatmap__group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <span class=\"tx-heatmap__group-label\" [class]=\"parts.groupLabel?.class\" [style]=\"parts.groupLabel?.style\" [attr.title]=\"group.label\">{{ group.label }}</span>\n <div class=\"tx-heatmap__columns\" [class]=\"parts.columns?.class\" [style]=\"parts.columns?.style\">\n @for (column of group.columns; track column.key) {\n <span class=\"tx-heatmap__column\" [class]=\"parts.column?.class\" [style]=\"parts.column?.style\">{{ column.label }}</span>\n }\n </div>\n </div>\n }\n </div>\n @if (valueTemplate) {\n <div class=\"tx-heatmap__value tx-heatmap__value--head\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">{{ label.valueHeader }}</div>\n }\n </div>\n\n @for (line of layout(); track line.row.key) {\n <div class=\"tx-heatmap__row\" [class]=\"parts.row?.class\" [style]=\"parts.row?.style\">\n <div class=\"tx-heatmap__lead\" [class]=\"parts.lead?.class\" [style]=\"parts.lead?.style\">\n @if (headerTemplate) {\n <ng-container [ngTemplateOutlet]=\"headerTemplate\" [ngTemplateOutletContext]=\"line.context\" />\n } @else {\n {{ line.row.label ?? line.row.key }}\n }\n </div>\n <div class=\"tx-heatmap__groups\" [class]=\"parts.groups?.class\" [style]=\"parts.groups?.style\">\n @for (group of line.groups; track group.key) {\n <div class=\"tx-heatmap__columns\" [class]=\"parts.columns?.class\" [style]=\"parts.columns?.style\">\n @for (slot of group.slots; track slot.columnKey) {\n <tx-heatmap-cell\n [cell]=\"slot.cell\"\n [level]=\"slot.level\"\n [boxClass]=\"parts.cell?.class\"\n [boxStyle]=\"parts.cell?.style\"\n [unstyled]=\"isUnstyled()\"\n (activate)=\"onCellActivate(line.row, slot)\"\n />\n }\n </div>\n }\n </div>\n @if (valueTemplate) {\n <div class=\"tx-heatmap__value\" [class]=\"parts.value?.class\" [style]=\"parts.value?.style\">\n <ng-container [ngTemplateOutlet]=\"valueTemplate\" [ngTemplateOutletContext]=\"line.context\" />\n </div>\n }\n </div>\n }\n </div>\n</div>\n\n@if (legend().length) {\n <tx-heatmap-legend\n [class]=\"parts.legend?.class\"\n [style]=\"parts.legend?.style\"\n [items]=\"legend()\"\n [emptyLabel]=\"label.empty\"\n [scale]=\"scale()\"\n [unstyled]=\"isUnstyled()\"\n />\n}\n"],"mappings":";;;;;;;;;AAEA,SAAgB,iBAAiB,OAA0C,QAAuC;CAChH,IAAI,SAAS;CACb,OAAO,OAAO,K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AA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC/D,iBAAiB,GAAA;IAAI,MAAM;IAAkC,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -2,10 +2,13 @@ import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, ElementRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, inject, input, linkedSignal, model, output, signal, viewChild } from "@angular/core";
3
3
  import { TxChartAnnotations, TxChartAxes, TxChartFrame, TxChartLegendTemplate, TxChartTooltipTemplate, areaPath, cartesianLayout, chartAnnotationShapes, chartCategoryIndex, chartMonthNames, chartNumberFormatter, chartSummary, chartTable, cycleIndex, decimateSeries, extent, hasChartData, initialChartSize, injectChartEntrance, linePath, normalizeSeries, prefersReducedMotion, readTokenNumber, seriesColor, stackValues, stepIndex, timeInterval, timeTooltipFormatter, toTime, toggleKey } from "@tectra-ng/charts/core";
4
4
  import { uniqueId } from "@tectra-ng/core/a11y";
5
- import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
6
6
  import { TxLocaleService, formatMessage, 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, txIconChartLine } from "@tectra-ng/icons";
10
+ const LINE_ICON_DEFAULTS = { "chart-line": txIconChartLine };
11
+ const LINE_THEME = { chart: chartTokens };
9
12
  const DECIMATE_RATIO = 1.5;
10
13
  const OVERVIEW = 44;
11
14
  const OVERVIEW_GAP = 18;
@@ -21,6 +24,7 @@ const KEY_PAN = .2;
21
24
  const SLIDE_SECONDS = .32;
22
25
  const SLIDE_EASING = "cubic-bezier(0.22, 1, 0.36, 1)";
23
26
  var TxLineChart = class TxLineChart {
27
+ lineTheme = injectTokens(LINE_THEME);
24
28
  locale = inject(TxLocaleService);
25
29
  translations = injectTranslations();
26
30
  series = input([], ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
@@ -1142,6 +1146,7 @@ var TxLineChart = class TxLineChart {
1142
1146
  ]
1143
1147
  }
1144
1148
  ],
1149
+ viewProviders: [provideTxIconDefaults(LINE_ICON_DEFAULTS)],
1145
1150
  changeDetection: i0.ChangeDetectionStrategy.OnPush
1146
1151
  });
1147
1152
  };
@@ -1173,6 +1178,7 @@ i0.ɵɵngDeclareClassMetadata({
1173
1178
  "[class.tx-line-chart--focused]": "focusedSeries() !== null",
1174
1179
  "[class.tx-line-chart--live]": "live()"
1175
1180
  },
1181
+ viewProviders: [provideTxIconDefaults(LINE_ICON_DEFAULTS)],
1176
1182
  template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendVariant]=\"legendVariant()\"\n [legendTemplate]=\"legendTemplate()?.template\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-line\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n [zoomable]=\"zoomable()\"\n [zoomedIn]=\"!!view()\"\n (zoomed)=\"zoomAt($event.x, $event.factor)\"\n (panned)=\"panBy($event.dx)\"\n (zoomReset)=\"resetZoom()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (legendToggled)=\"onLegendToggle($event)\"\n (legendHovered)=\"onLegendHover($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n @if (clipped()) {\n <svg:clipPath [attr.id]=\"uid + '-clip'\">\n <svg:rect [attr.x]=\"clip().x\" [attr.y]=\"clip().y\" [attr.width]=\"clip().width\" [attr.height]=\"clip().height\" />\n </svg:clipPath>\n }\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n <svg:g [tx-chart-annotations]=\"annotationShapes()\" layer=\"back\" [part]=\"passThrough().annotation\" />\n @if (crosshair(); as line) {\n <svg:line\n class=\"tx-line-chart__crosshair\"\n [class]=\"passThrough().crosshair?.class\"\n [style]=\"passThrough().crosshair?.style\"\n [attr.x1]=\"line.x\"\n [attr.x2]=\"line.x\"\n [attr.y1]=\"line.y1\"\n [attr.y2]=\"line.y2\"\n />\n }\n <svg:g #layer class=\"tx-line-chart__layer\" [attr.clip-path]=\"clipped() ? 'url(#' + uid + '-clip)' : null\">\n @for (path of paths(); track path.key) {\n <svg:g\n class=\"tx-line-chart__series\"\n [class.tx-line-chart__series--focused]=\"focusedSeries() === path.index\"\n [class]=\"passThrough().series?.class\"\n [style]=\"passThrough().series?.style\"\n [style.--tx-line-chart-color]=\"path.color\"\n [attr.data-series]=\"path.index\"\n >\n @if (path.area) {\n <svg:linearGradient [attr.id]=\"path.gradient\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop class=\"tx-line-chart__stop-from\" offset=\"0\" [style.stop-color]=\"path.color\" />\n <svg:stop class=\"tx-line-chart__stop-to\" offset=\"0.95\" [style.stop-color]=\"path.color\" />\n </svg:linearGradient>\n <svg:path\n class=\"tx-line-chart__area\"\n [class.tx-line-chart__area--stacked]=\"isStacked()\"\n [class]=\"passThrough().area?.class\"\n [style]=\"passThrough().area?.style\"\n [attr.d]=\"path.area\"\n [attr.fill]=\"'url(#' + path.gradient + ')'\"\n />\n }\n <svg:path\n class=\"tx-line-chart__line\"\n [class]=\"passThrough().line?.class\"\n [style]=\"passThrough().line?.style\"\n [attr.d]=\"path.line\"\n [style.stroke]=\"path.color\"\n />\n @for (marker of path.markers; track marker.index) {\n <svg:circle\n class=\"tx-line-chart__point\"\n [class]=\"passThrough().marker?.class\"\n [style]=\"passThrough().marker?.style\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [style.fill]=\"path.color\"\n />\n }\n </svg:g>\n }\n @for (point of activePoints(); track point.series) {\n <svg:circle class=\"tx-line-chart__halo\" [attr.cx]=\"point.x\" [attr.cy]=\"point.y\" [style.fill]=\"point.color\" />\n <svg:circle\n class=\"tx-line-chart__marker\"\n [class]=\"passThrough().marker?.class\"\n [attr.cx]=\"point.x\"\n [attr.cy]=\"point.y\"\n [style.fill]=\"point.color\"\n />\n }\n </svg:g>\n <svg:g [tx-chart-annotations]=\"annotationShapes()\" layer=\"front\" [part]=\"passThrough().annotation\" />\n @if (overview(); as strip) {\n <svg:g class=\"tx-line-chart__overview\" [class]=\"passThrough().brush?.class\" [style]=\"passThrough().brush?.style\" [style.--tx-line-chart-color]=\"strip.color\">\n <svg:rect class=\"tx-line-chart__overview-track\" [attr.x]=\"strip.left\" [attr.y]=\"strip.top\" [attr.width]=\"strip.width\" [attr.height]=\"strip.height\" />\n <svg:path class=\"tx-line-chart__overview-area\" [attr.d]=\"strip.area\" />\n <svg:path class=\"tx-line-chart__overview-line\" [attr.d]=\"strip.line\" />\n <svg:rect class=\"tx-line-chart__overview-mask\" [attr.x]=\"strip.left\" [attr.y]=\"strip.top\" [attr.width]=\"strip.x0 - strip.left\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-mask\" [attr.x]=\"strip.x1\" [attr.y]=\"strip.top\" [attr.width]=\"strip.left + strip.width - strip.x1\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-window\" [attr.x]=\"strip.x0\" [attr.y]=\"strip.top\" [attr.width]=\"strip.x1 - strip.x0\" [attr.height]=\"strip.height\" />\n <svg:rect class=\"tx-line-chart__overview-handle\" [attr.x]=\"strip.x0 - 3\" [attr.y]=\"strip.handleY\" width=\"6\" [attr.height]=\"strip.handleHeight\" />\n <svg:rect class=\"tx-line-chart__overview-handle\" [attr.x]=\"strip.x1 - 3\" [attr.y]=\"strip.handleY\" width=\"6\" [attr.height]=\"strip.handleHeight\" />\n </svg:g>\n }\n</tx-chart-frame>\n",
1177
1183
  styles: [":host{display:block;min-width:0}:host(.tx-line-chart--fill){height:100%}.tx-line-chart__line{fill:none;stroke-linecap:round;stroke-linejoin:round}.tx-line-chart__overview{cursor:pointer}.tx-line-chart__overview-track{fill:transparent}.tx-line-chart__overview-area{fill:var(--tx-line-chart-color);fill-opacity:.2}.tx-line-chart__overview-line{fill:none;stroke:var(--tx-line-chart-color)}.tx-line-chart__overview-mask{fill:currentColor;fill-opacity:.08}.tx-line-chart__overview-window{fill:none;stroke:currentColor;cursor:grab}.tx-line-chart__overview-handle{fill:currentColor;cursor:ew-resize}.tx-line-chart__crosshair{pointer-events:none;shape-rendering:crispEdges}.tx-line-chart__marker,.tx-line-chart__halo,.tx-line-chart__point{pointer-events:none}:host([data-styled]) .tx-line-chart__line{stroke-width:var(--tx-chart-line-stroke-width)}:host([data-styled]) .tx-line-chart__stop-from{stop-opacity:var(--tx-chart-line-area-opacity-from)}:host([data-styled]) .tx-line-chart__stop-to{stop-opacity:var(--tx-chart-line-area-opacity-to)}:host([data-styled]) .tx-line-chart__area--stacked{fill:var(--tx-line-chart-color);fill-opacity:var(--tx-chart-line-stacked-area-opacity)}:host([data-styled]) .tx-line-chart__point{r:var(--tx-chart-line-point-radius);stroke:var(--tx-chart-marker-stroke-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-line-chart__marker{r:var(--tx-chart-marker-radius);stroke:var(--tx-chart-marker-stroke-color);stroke-width:var(--tx-chart-marker-stroke-width)}:host([data-styled]) .tx-line-chart__halo{r:var(--tx-chart-marker-halo-radius);opacity:var(--tx-chart-marker-halo-opacity)}:host([data-styled]) .tx-line-chart__crosshair{stroke:var(--tx-chart-crosshair-color);stroke-width:var(--tx-chart-crosshair-width);stroke-dasharray:var(--tx-chart-crosshair-dash)}:host([data-styled]) .tx-line-chart__series{transition:opacity var(--tx-chart-motion-update-duration) ease}:host([data-styled].tx-line-chart--focused) .tx-line-chart__series:not(.tx-line-chart__series--focused){opacity:var(--tx-chart-line-dimmed-opacity)}:host([data-styled].tx-line-chart--morph) .tx-line-chart__line,:host([data-styled].tx-line-chart--morph) .tx-line-chart__area{transition:d var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-line-chart--morph) .tx-line-chart__point{transition:cx var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),cy var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-line-chart--entering) .tx-line-chart__series{animation:tx-line-chart-reveal var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both}@keyframes tx-line-chart-reveal{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}:host([data-styled]) .tx-line-chart__overview-track{fill:var(--tx-chart-brush-track-background);rx:var(--tx-chart-brush-radius)}:host([data-styled]) .tx-line-chart__overview-area{fill-opacity:var(--tx-chart-brush-area-opacity)}:host([data-styled]) .tx-line-chart__overview-line{stroke-width:var(--tx-chart-brush-line-width)}:host([data-styled]) .tx-line-chart__overview-mask{fill:var(--tx-chart-brush-mask-color);fill-opacity:1}:host([data-styled]) .tx-line-chart__overview-window{stroke:var(--tx-chart-brush-window-border-color);stroke-width:var(--tx-chart-brush-window-border-width);rx:var(--tx-chart-brush-radius)}:host([data-styled]) .tx-line-chart__overview-handle{fill:var(--tx-chart-brush-handle-color);stroke:var(--tx-chart-brush-handle-border-color);rx:var(--tx-chart-brush-handle-radius)}:host([data-styled].tx-line-chart--live) .tx-line-chart__line,:host([data-styled].tx-line-chart--live) .tx-line-chart__area,:host([data-styled].tx-line-chart--live) .tx-line-chart__point{transition:none}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-line-chart__series,:host([data-styled].tx-line-chart--morph) .tx-line-chart__line,:host([data-styled].tx-line-chart--morph) .tx-line-chart__area,:host([data-styled].tx-line-chart--morph) .tx-line-chart__point{transition:none;animation:none}}\n"]
1178
1184
  }]