@tectra-ng/charts 0.1.9 → 0.2.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 (122) hide show
  1. package/README.md +21 -1
  2. package/bar-list/README.md +30 -0
  3. package/boxplot/README.md +62 -0
  4. package/bullet/README.md +53 -0
  5. package/candlestick/README.md +57 -0
  6. package/column/README.md +4 -2
  7. package/combo/README.md +83 -0
  8. package/core/README.md +3 -1
  9. package/fesm2022/tectra-ng-charts-bar-list.mjs +299 -0
  10. package/fesm2022/tectra-ng-charts-bar-list.mjs.map +1 -0
  11. package/fesm2022/tectra-ng-charts-boxplot.mjs +887 -0
  12. package/fesm2022/tectra-ng-charts-boxplot.mjs.map +1 -0
  13. package/fesm2022/tectra-ng-charts-bullet.mjs +666 -0
  14. package/fesm2022/tectra-ng-charts-bullet.mjs.map +1 -0
  15. package/fesm2022/tectra-ng-charts-candlestick.mjs +778 -0
  16. package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -0
  17. package/fesm2022/tectra-ng-charts-column.mjs +149 -66
  18. package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-charts-combo.mjs +1218 -0
  20. package/fesm2022/tectra-ng-charts-combo.mjs.map +1 -0
  21. package/fesm2022/tectra-ng-charts-core.mjs +1334 -49
  22. package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-charts-funnel.mjs +694 -0
  24. package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -0
  25. package/fesm2022/tectra-ng-charts-gantt.mjs +947 -0
  26. package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -0
  27. package/fesm2022/tectra-ng-charts-gauge.mjs +693 -0
  28. package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -0
  29. package/fesm2022/tectra-ng-charts-heatmap.mjs +935 -0
  30. package/fesm2022/tectra-ng-charts-heatmap.mjs.map +1 -0
  31. package/fesm2022/tectra-ng-charts-line.mjs +527 -67
  32. package/fesm2022/tectra-ng-charts-line.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-charts-org-chart.mjs +2341 -0
  34. package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -0
  35. package/fesm2022/tectra-ng-charts-pie.mjs +47 -86
  36. package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-charts-radar.mjs +924 -0
  38. package/fesm2022/tectra-ng-charts-radar.mjs.map +1 -0
  39. package/fesm2022/tectra-ng-charts-radial-bar.mjs +802 -0
  40. package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -0
  41. package/fesm2022/tectra-ng-charts-range-area.mjs +933 -0
  42. package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -0
  43. package/fesm2022/tectra-ng-charts-rank-line.mjs +660 -0
  44. package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -0
  45. package/fesm2022/tectra-ng-charts-sankey.mjs +837 -0
  46. package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -0
  47. package/fesm2022/tectra-ng-charts-scatter.mjs +1174 -0
  48. package/fesm2022/tectra-ng-charts-scatter.mjs.map +1 -0
  49. package/fesm2022/tectra-ng-charts-segmented-bar.mjs +328 -0
  50. package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -0
  51. package/fesm2022/tectra-ng-charts-sunburst.mjs +733 -0
  52. package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -0
  53. package/fesm2022/tectra-ng-charts-treemap.mjs +674 -0
  54. package/fesm2022/tectra-ng-charts-treemap.mjs.map +1 -0
  55. package/fesm2022/tectra-ng-charts-waterfall.mjs +809 -0
  56. package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -0
  57. package/funnel/README.md +53 -0
  58. package/gantt/README.md +53 -0
  59. package/gauge/README.md +41 -0
  60. package/heatmap/README.md +47 -0
  61. package/line/README.md +13 -2
  62. package/org-chart/README.md +57 -0
  63. package/package.json +114 -6
  64. package/pie/README.md +1 -0
  65. package/radar/README.md +64 -0
  66. package/radial-bar/README.md +62 -0
  67. package/range-area/README.md +66 -0
  68. package/rank-line/README.md +51 -0
  69. package/sankey/README.md +52 -0
  70. package/scatter/README.md +71 -0
  71. package/segmented-bar/README.md +35 -0
  72. package/sunburst/README.md +55 -0
  73. package/treemap/README.md +47 -0
  74. package/types/tectra-ng-charts-bar-list.d.ts +724 -0
  75. package/types/tectra-ng-charts-bar-list.d.ts.map +1 -0
  76. package/types/tectra-ng-charts-boxplot.d.ts +882 -0
  77. package/types/tectra-ng-charts-boxplot.d.ts.map +1 -0
  78. package/types/tectra-ng-charts-bullet.d.ts +833 -0
  79. package/types/tectra-ng-charts-bullet.d.ts.map +1 -0
  80. package/types/tectra-ng-charts-candlestick.d.ts +854 -0
  81. package/types/tectra-ng-charts-candlestick.d.ts.map +1 -0
  82. package/types/tectra-ng-charts-column.d.ts +486 -3
  83. package/types/tectra-ng-charts-column.d.ts.map +1 -1
  84. package/types/tectra-ng-charts-combo.d.ts +987 -0
  85. package/types/tectra-ng-charts-combo.d.ts.map +1 -0
  86. package/types/tectra-ng-charts-core.d.ts +266 -5
  87. package/types/tectra-ng-charts-core.d.ts.map +1 -1
  88. package/types/tectra-ng-charts-funnel.d.ts +857 -0
  89. package/types/tectra-ng-charts-funnel.d.ts.map +1 -0
  90. package/types/tectra-ng-charts-gantt.d.ts +884 -0
  91. package/types/tectra-ng-charts-gantt.d.ts.map +1 -0
  92. package/types/tectra-ng-charts-gauge.d.ts +859 -0
  93. package/types/tectra-ng-charts-gauge.d.ts.map +1 -0
  94. package/types/tectra-ng-charts-heatmap.d.ts +914 -0
  95. package/types/tectra-ng-charts-heatmap.d.ts.map +1 -0
  96. package/types/tectra-ng-charts-line.d.ts +556 -2
  97. package/types/tectra-ng-charts-line.d.ts.map +1 -1
  98. package/types/tectra-ng-charts-org-chart.d.ts +1017 -0
  99. package/types/tectra-ng-charts-org-chart.d.ts.map +1 -0
  100. package/types/tectra-ng-charts-pie.d.ts +477 -14
  101. package/types/tectra-ng-charts-pie.d.ts.map +1 -1
  102. package/types/tectra-ng-charts-radar.d.ts +903 -0
  103. package/types/tectra-ng-charts-radar.d.ts.map +1 -0
  104. package/types/tectra-ng-charts-radial-bar.d.ts +886 -0
  105. package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -0
  106. package/types/tectra-ng-charts-range-area.d.ts +897 -0
  107. package/types/tectra-ng-charts-range-area.d.ts.map +1 -0
  108. package/types/tectra-ng-charts-rank-line.d.ts +839 -0
  109. package/types/tectra-ng-charts-rank-line.d.ts.map +1 -0
  110. package/types/tectra-ng-charts-sankey.d.ts +866 -0
  111. package/types/tectra-ng-charts-sankey.d.ts.map +1 -0
  112. package/types/tectra-ng-charts-scatter.d.ts +987 -0
  113. package/types/tectra-ng-charts-scatter.d.ts.map +1 -0
  114. package/types/tectra-ng-charts-segmented-bar.d.ts +751 -0
  115. package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -0
  116. package/types/tectra-ng-charts-sunburst.d.ts +864 -0
  117. package/types/tectra-ng-charts-sunburst.d.ts.map +1 -0
  118. package/types/tectra-ng-charts-treemap.d.ts +847 -0
  119. package/types/tectra-ng-charts-treemap.d.ts.map +1 -0
  120. package/types/tectra-ng-charts-waterfall.d.ts +869 -0
  121. package/types/tectra-ng-charts-waterfall.d.ts.map +1 -0
  122. package/waterfall/README.md +60 -0
@@ -0,0 +1,935 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, input, output } from "@angular/core";
3
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
4
+ import { optionalBoolean } from "@tectra-ng/core/utils";
5
+ import { TxTooltip } from "@tectra-ng/ui/tooltip";
6
+ import { NgTemplateOutlet } from "@angular/common";
7
+ import { injectTranslations } from "@tectra-ng/core/i18n";
8
+ import { toStyleObject } from "@tectra-ng/themes";
9
+ function heatmapRowGroups(cells, groups) {
10
+ let offset = 0;
11
+ return groups.map((group) => {
12
+ const slots = group.columns.map((column, index) => ({
13
+ columnKey: column.key,
14
+ cell: cells[offset + index] ?? null
15
+ }));
16
+ offset += group.columns.length;
17
+ return {
18
+ key: group.key,
19
+ slots
20
+ };
21
+ });
22
+ }
23
+ function heatmapScale(rows, steps, min, max) {
24
+ let low = Infinity;
25
+ let high = -Infinity;
26
+ for (const row of rows) for (const cell of row.cells) {
27
+ const value = cell?.value;
28
+ if (typeof value === "number" && Number.isFinite(value)) {
29
+ low = Math.min(low, value);
30
+ high = Math.max(high, value);
31
+ }
32
+ }
33
+ return {
34
+ min: min ?? (Number.isFinite(low) ? Math.min(low, 0) : 0),
35
+ max: max ?? (Number.isFinite(high) ? high : 0),
36
+ steps: Math.max(1, Math.round(steps))
37
+ };
38
+ }
39
+ function heatmapLevel(value, scale) {
40
+ if (typeof value !== "number" || !Number.isFinite(value) || value <= scale.min) return 0;
41
+ const span = scale.max - scale.min;
42
+ const ratio = span > 0 ? Math.min(1, (value - scale.min) / span) : 1;
43
+ return Math.max(1, Math.ceil(ratio * scale.steps)) / scale.steps;
44
+ }
45
+ function heatmapCellLabel(cell) {
46
+ return cell.ariaLabel || cell.tooltip || null;
47
+ }
48
+ const DAY = 864e5;
49
+ function toDay(value) {
50
+ const date = typeof value === "string" ? /* @__PURE__ */ new Date(`${value.slice(0, 10)}T00:00:00Z`) : new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate()));
51
+ return Math.floor(date.getTime() / DAY);
52
+ }
53
+ function dayKey(day) {
54
+ return (/* @__PURE__ */ new Date(day * DAY)).toISOString().slice(0, 10);
55
+ }
56
+ function heatmapCalendar(values, options) {
57
+ const intl = options.intl ?? "en-US";
58
+ const firstDay = ((options.firstDayOfWeek ?? 1) % 7 + 7) % 7;
59
+ const from = toDay(options.from);
60
+ const to = toDay(options.to);
61
+ const byDay = /* @__PURE__ */ new Map();
62
+ for (const item of values) byDay.set(toDay(item.date), item);
63
+ const weekday = (day) => ((/* @__PURE__ */ new Date(day * DAY)).getUTCDay() - firstDay + 7) % 7;
64
+ const start = from - weekday(from);
65
+ const weeks = to < from ? 0 : Math.floor((to - start) / 7) + 1;
66
+ const monthFormat = new Intl.DateTimeFormat(intl, {
67
+ month: "short",
68
+ timeZone: "UTC"
69
+ });
70
+ const dayFormat = new Intl.DateTimeFormat(intl, {
71
+ weekday: "short",
72
+ timeZone: "UTC"
73
+ });
74
+ const dateFormat = new Intl.DateTimeFormat(intl, {
75
+ dateStyle: "medium",
76
+ timeZone: "UTC"
77
+ });
78
+ const numberFormat = options.format ?? new Intl.NumberFormat(intl).format;
79
+ const groups = [];
80
+ for (let week = 0; week < weeks; week++) {
81
+ const first = Math.max(start + week * 7, from);
82
+ const date = /* @__PURE__ */ new Date(first * DAY);
83
+ const key = `${date.getUTCFullYear()}-${date.getUTCMonth()}`;
84
+ let group = groups[groups.length - 1];
85
+ if (!group || group.key !== key) {
86
+ group = {
87
+ key,
88
+ label: monthFormat.format(date),
89
+ columns: []
90
+ };
91
+ groups.push(group);
92
+ }
93
+ group.columns.push({
94
+ key: dayKey(start + week * 7),
95
+ label: ""
96
+ });
97
+ }
98
+ return {
99
+ groups,
100
+ rows: Array.from({ length: 7 }, (_, index) => {
101
+ const cells = [];
102
+ for (let week = 0; week < weeks; week++) {
103
+ const day = start + week * 7 + index;
104
+ if (day < from || day > to) {
105
+ cells.push({ hidden: true });
106
+ continue;
107
+ }
108
+ const item = byDay.get(day);
109
+ const value = item?.value ?? 0;
110
+ const label = `${dateFormat.format(/* @__PURE__ */ new Date(day * DAY))}: ${numberFormat(value)}`;
111
+ cells.push({
112
+ value,
113
+ tooltip: item?.tooltip ?? label,
114
+ ariaLabel: label,
115
+ interactive: options.interactive,
116
+ data: item?.data ?? dayKey(day)
117
+ });
118
+ }
119
+ return {
120
+ key: `day-${index}`,
121
+ label: dayFormat.format(/* @__PURE__ */ new Date((start + index) * DAY)),
122
+ cells
123
+ };
124
+ })
125
+ };
126
+ }
127
+ var TxHeatmapRowHeader = class TxHeatmapRowHeader {
128
+ static ngTemplateContextGuard(_directive, context) {
129
+ return !!context;
130
+ }
131
+ static ɵfac = i0.ɵɵngDeclareFactory({
132
+ minVersion: "12.0.0",
133
+ version: "22.2.3",
134
+ ngImport: i0,
135
+ type: TxHeatmapRowHeader,
136
+ deps: [],
137
+ target: i0.ɵɵFactoryTarget.Directive
138
+ });
139
+ static ɵdir = i0.ɵɵngDeclareDirective({
140
+ minVersion: "14.0.0",
141
+ version: "22.2.3",
142
+ type: TxHeatmapRowHeader,
143
+ isStandalone: true,
144
+ selector: "ng-template[txHeatmapRowHeader]",
145
+ ngImport: i0
146
+ });
147
+ };
148
+ i0.ɵɵngDeclareClassMetadata({
149
+ minVersion: "12.0.0",
150
+ version: "22.2.3",
151
+ ngImport: i0,
152
+ type: TxHeatmapRowHeader,
153
+ decorators: [{
154
+ type: Directive,
155
+ args: [{ selector: "ng-template[txHeatmapRowHeader]" }]
156
+ }]
157
+ });
158
+ var TxHeatmapRowValue = class TxHeatmapRowValue {
159
+ static ngTemplateContextGuard(_directive, context) {
160
+ return !!context;
161
+ }
162
+ static ɵfac = i0.ɵɵngDeclareFactory({
163
+ minVersion: "12.0.0",
164
+ version: "22.2.3",
165
+ ngImport: i0,
166
+ type: TxHeatmapRowValue,
167
+ deps: [],
168
+ target: i0.ɵɵFactoryTarget.Directive
169
+ });
170
+ static ɵdir = i0.ɵɵngDeclareDirective({
171
+ minVersion: "14.0.0",
172
+ version: "22.2.3",
173
+ type: TxHeatmapRowValue,
174
+ isStandalone: true,
175
+ selector: "ng-template[txHeatmapRowValue]",
176
+ ngImport: i0
177
+ });
178
+ };
179
+ i0.ɵɵngDeclareClassMetadata({
180
+ minVersion: "12.0.0",
181
+ version: "22.2.3",
182
+ ngImport: i0,
183
+ type: TxHeatmapRowValue,
184
+ decorators: [{
185
+ type: Directive,
186
+ args: [{ selector: "ng-template[txHeatmapRowValue]" }]
187
+ }]
188
+ });
189
+ var TxHeatmapCellView = class TxHeatmapCellView {
190
+ cell = input(null, ...ngDevMode ? [{ debugName: "cell" }] : /* istanbul ignore next */ []);
191
+ level = input(null, ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
192
+ legend = input(false, {
193
+ ...ngDevMode ? { debugName: "legend" } : /* istanbul ignore next */ {},
194
+ transform: booleanAttribute
195
+ });
196
+ boxClass = input(void 0, ...ngDevMode ? [{ debugName: "boxClass" }] : /* istanbul ignore next */ []);
197
+ boxStyle = input(void 0, ...ngDevMode ? [{ debugName: "boxStyle" }] : /* istanbul ignore next */ []);
198
+ unstyled = input(void 0, {
199
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
200
+ transform: optionalBoolean
201
+ });
202
+ activate = output();
203
+ isUnstyled = injectUnstyled(this.unstyled);
204
+ label = computed(() => {
205
+ const cell = this.cell();
206
+ return cell ? heatmapCellLabel(cell) : null;
207
+ }, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
208
+ kind = computed(() => {
209
+ const cell = this.cell();
210
+ if (!cell) return "empty";
211
+ if (cell.hidden) return "hidden";
212
+ if (typeof cell.value === "number" && !cell.tone) return (this.level() ?? 0) > 0 ? "scale" : "empty";
213
+ return cell.tone ?? "empty";
214
+ }, ...ngDevMode ? [{ debugName: "kind" }] : /* istanbul ignore next */ []);
215
+ levelStyle = computed(() => {
216
+ const level = this.level();
217
+ return this.kind() === "scale" && level ? `${Math.round(level * 100)}%` : null;
218
+ }, ...ngDevMode ? [{ debugName: "levelStyle" }] : /* istanbul ignore next */ []);
219
+ static ɵfac = i0.ɵɵngDeclareFactory({
220
+ minVersion: "12.0.0",
221
+ version: "22.2.3",
222
+ ngImport: i0,
223
+ type: TxHeatmapCellView,
224
+ deps: [],
225
+ target: i0.ɵɵFactoryTarget.Component
226
+ });
227
+ static ɵcmp = i0.ɵɵngDeclareComponent({
228
+ minVersion: "17.0.0",
229
+ version: "22.2.3",
230
+ type: TxHeatmapCellView,
231
+ isStandalone: true,
232
+ selector: "tx-heatmap-cell",
233
+ inputs: {
234
+ cell: {
235
+ classPropertyName: "cell",
236
+ publicName: "cell",
237
+ isSignal: true,
238
+ isRequired: false,
239
+ transformFunction: null
240
+ },
241
+ level: {
242
+ classPropertyName: "level",
243
+ publicName: "level",
244
+ isSignal: true,
245
+ isRequired: false,
246
+ transformFunction: null
247
+ },
248
+ legend: {
249
+ classPropertyName: "legend",
250
+ publicName: "legend",
251
+ isSignal: true,
252
+ isRequired: false,
253
+ transformFunction: null
254
+ },
255
+ boxClass: {
256
+ classPropertyName: "boxClass",
257
+ publicName: "boxClass",
258
+ isSignal: true,
259
+ isRequired: false,
260
+ transformFunction: null
261
+ },
262
+ boxStyle: {
263
+ classPropertyName: "boxStyle",
264
+ publicName: "boxStyle",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
268
+ },
269
+ unstyled: {
270
+ classPropertyName: "unstyled",
271
+ publicName: "unstyled",
272
+ isSignal: true,
273
+ isRequired: false,
274
+ transformFunction: null
275
+ }
276
+ },
277
+ outputs: { activate: "activate" },
278
+ host: {
279
+ properties: { "attr.data-styled": "!isUnstyled() || null" },
280
+ classAttribute: "tx-heatmap-cell"
281
+ },
282
+ ngImport: i0,
283
+ 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",
284
+ 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"],
285
+ dependencies: [{
286
+ kind: "directive",
287
+ type: TxTooltip,
288
+ selector: "[txTooltip]",
289
+ inputs: [
290
+ "txTooltip",
291
+ "tooltipPlacement",
292
+ "tooltipEvent",
293
+ "tooltipShowDelay",
294
+ "tooltipHideDelay",
295
+ "tooltipLife",
296
+ "tooltipOffset",
297
+ "tooltipArrow",
298
+ "tooltipInteractive",
299
+ "tooltipDisabled",
300
+ "tooltipOverflowOnly",
301
+ "tooltipMultiline",
302
+ "tooltipContext",
303
+ "tooltipClass",
304
+ "tooltipDt",
305
+ "tooltipPt",
306
+ "tooltipPtOptions",
307
+ "tooltipUnstyled"
308
+ ],
309
+ outputs: ["tooltipShown", "tooltipHidden"],
310
+ exportAs: ["txTooltip"]
311
+ }],
312
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
313
+ });
314
+ };
315
+ i0.ɵɵngDeclareClassMetadata({
316
+ minVersion: "12.0.0",
317
+ version: "22.2.3",
318
+ ngImport: i0,
319
+ type: TxHeatmapCellView,
320
+ decorators: [{
321
+ type: Component,
322
+ args: [{
323
+ selector: "tx-heatmap-cell",
324
+ imports: [TxTooltip],
325
+ changeDetection: ChangeDetectionStrategy.OnPush,
326
+ host: {
327
+ class: "tx-heatmap-cell",
328
+ "[attr.data-styled]": "!isUnstyled() || null"
329
+ },
330
+ 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
+ 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
+ }]
333
+ }],
334
+ propDecorators: {
335
+ cell: [{
336
+ type: i0.Input,
337
+ args: [{
338
+ isSignal: true,
339
+ alias: "cell",
340
+ required: false
341
+ }]
342
+ }],
343
+ level: [{
344
+ type: i0.Input,
345
+ args: [{
346
+ isSignal: true,
347
+ alias: "level",
348
+ required: false
349
+ }]
350
+ }],
351
+ legend: [{
352
+ type: i0.Input,
353
+ args: [{
354
+ isSignal: true,
355
+ alias: "legend",
356
+ required: false
357
+ }]
358
+ }],
359
+ boxClass: [{
360
+ type: i0.Input,
361
+ args: [{
362
+ isSignal: true,
363
+ alias: "boxClass",
364
+ required: false
365
+ }]
366
+ }],
367
+ boxStyle: [{
368
+ type: i0.Input,
369
+ args: [{
370
+ isSignal: true,
371
+ alias: "boxStyle",
372
+ required: false
373
+ }]
374
+ }],
375
+ unstyled: [{
376
+ type: i0.Input,
377
+ args: [{
378
+ isSignal: true,
379
+ alias: "unstyled",
380
+ required: false
381
+ }]
382
+ }],
383
+ activate: [{
384
+ type: i0.Output,
385
+ args: ["activate"]
386
+ }]
387
+ }
388
+ });
389
+ var TxHeatmapLegend = class TxHeatmapLegend {
390
+ items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
391
+ emptyLabel = input("", ...ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []);
392
+ scale = input(null, ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
393
+ unstyled = input(void 0, {
394
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
395
+ transform: optionalBoolean
396
+ });
397
+ isUnstyled = injectUnstyled(this.unstyled);
398
+ levelOf(value) {
399
+ const scale = this.scale();
400
+ return scale && typeof value === "number" ? heatmapLevel(value, scale) : null;
401
+ }
402
+ static ɵfac = i0.ɵɵngDeclareFactory({
403
+ minVersion: "12.0.0",
404
+ version: "22.2.3",
405
+ ngImport: i0,
406
+ type: TxHeatmapLegend,
407
+ deps: [],
408
+ target: i0.ɵɵFactoryTarget.Component
409
+ });
410
+ static ɵcmp = i0.ɵɵngDeclareComponent({
411
+ minVersion: "17.0.0",
412
+ version: "22.2.3",
413
+ type: TxHeatmapLegend,
414
+ isStandalone: true,
415
+ selector: "tx-heatmap-legend",
416
+ inputs: {
417
+ items: {
418
+ classPropertyName: "items",
419
+ publicName: "items",
420
+ isSignal: true,
421
+ isRequired: false,
422
+ transformFunction: null
423
+ },
424
+ emptyLabel: {
425
+ classPropertyName: "emptyLabel",
426
+ publicName: "emptyLabel",
427
+ isSignal: true,
428
+ isRequired: false,
429
+ transformFunction: null
430
+ },
431
+ scale: {
432
+ classPropertyName: "scale",
433
+ publicName: "scale",
434
+ isSignal: true,
435
+ isRequired: false,
436
+ transformFunction: null
437
+ },
438
+ unstyled: {
439
+ classPropertyName: "unstyled",
440
+ publicName: "unstyled",
441
+ isSignal: true,
442
+ isRequired: false,
443
+ transformFunction: null
444
+ }
445
+ },
446
+ host: {
447
+ properties: { "attr.data-styled": "!isUnstyled() || null" },
448
+ classAttribute: "tx-heatmap-legend"
449
+ },
450
+ ngImport: i0,
451
+ template: `
452
+ <ul class="tx-heatmap-legend__list">
453
+ @for (item of items(); track $index) {
454
+ <li class="tx-heatmap-legend__item">
455
+ <tx-heatmap-cell [cell]="{ tone: item.tone, value: item.value }" [level]="levelOf(item.value)" legend [unstyled]="isUnstyled()" />
456
+ {{ item.label }}
457
+ </li>
458
+ }
459
+ @if (emptyLabel()) {
460
+ <li class="tx-heatmap-legend__item">
461
+ <tx-heatmap-cell legend [unstyled]="isUnstyled()" />
462
+ {{ emptyLabel() }}
463
+ </li>
464
+ }
465
+ </ul>
466
+ `,
467
+ isInline: true,
468
+ 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"],
469
+ dependencies: [{
470
+ kind: "component",
471
+ type: TxHeatmapCellView,
472
+ selector: "tx-heatmap-cell",
473
+ inputs: [
474
+ "cell",
475
+ "level",
476
+ "legend",
477
+ "boxClass",
478
+ "boxStyle",
479
+ "unstyled"
480
+ ],
481
+ outputs: ["activate"]
482
+ }],
483
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
484
+ });
485
+ };
486
+ i0.ɵɵngDeclareClassMetadata({
487
+ minVersion: "12.0.0",
488
+ version: "22.2.3",
489
+ ngImport: i0,
490
+ type: TxHeatmapLegend,
491
+ decorators: [{
492
+ type: Component,
493
+ args: [{
494
+ selector: "tx-heatmap-legend",
495
+ imports: [TxHeatmapCellView],
496
+ template: `
497
+ <ul class="tx-heatmap-legend__list">
498
+ @for (item of items(); track $index) {
499
+ <li class="tx-heatmap-legend__item">
500
+ <tx-heatmap-cell [cell]="{ tone: item.tone, value: item.value }" [level]="levelOf(item.value)" legend [unstyled]="isUnstyled()" />
501
+ {{ item.label }}
502
+ </li>
503
+ }
504
+ @if (emptyLabel()) {
505
+ <li class="tx-heatmap-legend__item">
506
+ <tx-heatmap-cell legend [unstyled]="isUnstyled()" />
507
+ {{ emptyLabel() }}
508
+ </li>
509
+ }
510
+ </ul>
511
+ `,
512
+ changeDetection: ChangeDetectionStrategy.OnPush,
513
+ host: {
514
+ class: "tx-heatmap-legend",
515
+ "[attr.data-styled]": "!isUnstyled() || null"
516
+ },
517
+ 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
+ }]
519
+ }],
520
+ propDecorators: {
521
+ items: [{
522
+ type: i0.Input,
523
+ args: [{
524
+ isSignal: true,
525
+ alias: "items",
526
+ required: false
527
+ }]
528
+ }],
529
+ emptyLabel: [{
530
+ type: i0.Input,
531
+ args: [{
532
+ isSignal: true,
533
+ alias: "emptyLabel",
534
+ required: false
535
+ }]
536
+ }],
537
+ scale: [{
538
+ type: i0.Input,
539
+ args: [{
540
+ isSignal: true,
541
+ alias: "scale",
542
+ required: false
543
+ }]
544
+ }],
545
+ unstyled: [{
546
+ type: i0.Input,
547
+ args: [{
548
+ isSignal: true,
549
+ alias: "unstyled",
550
+ required: false
551
+ }]
552
+ }]
553
+ }
554
+ });
555
+ var TxHeatmap = class TxHeatmap {
556
+ translations = injectTranslations();
557
+ groups = input([], ...ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []);
558
+ rows = input([], ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
559
+ legend = input([], ...ngDevMode ? [{ debugName: "legend" }] : /* istanbul ignore next */ []);
560
+ labels = input({}, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
561
+ maxHeight = input(void 0, ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
562
+ scaleSteps = input(5, ...ngDevMode ? [{ debugName: "scaleSteps" }] : /* istanbul ignore next */ []);
563
+ scaleMin = input(void 0, ...ngDevMode ? [{ debugName: "scaleMin" }] : /* istanbul ignore next */ []);
564
+ scaleMax = input(void 0, ...ngDevMode ? [{ debugName: "scaleMax" }] : /* istanbul ignore next */ []);
565
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
566
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
567
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
568
+ unstyled = input(void 0, {
569
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
570
+ transform: optionalBoolean
571
+ });
572
+ cellClick = output();
573
+ rowHeaderTemplate = contentChild(TxHeatmapRowHeader, {
574
+ ...ngDevMode ? { debugName: "rowHeaderTemplate" } : /* istanbul ignore next */ {},
575
+ read: TemplateRef
576
+ });
577
+ rowValueTemplate = contentChild(TxHeatmapRowValue, {
578
+ ...ngDevMode ? { debugName: "rowValueTemplate" } : /* istanbul ignore next */ {},
579
+ read: TemplateRef
580
+ });
581
+ isUnstyled = injectUnstyled(this.unstyled);
582
+ passThrough = injectPassThrough("heatmap", this, this.pt, this.ptOptions);
583
+ hostStyle = computed(() => ({
584
+ ...toStyleObject(this.dt(), "--tx-chart"),
585
+ ...this.passThrough().root?.style
586
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
587
+ text = computed(() => {
588
+ const t = this.translations();
589
+ return {
590
+ rowHeader: "",
591
+ valueHeader: "",
592
+ empty: t.chartNoData,
593
+ region: t.chartHeatmap,
594
+ ...this.labels()
595
+ };
596
+ }, ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
597
+ scale = computed(() => heatmapScale(this.rows(), this.scaleSteps(), this.scaleMin(), this.scaleMax()), ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
598
+ layout = computed(() => {
599
+ const groups = this.groups();
600
+ const scale = this.scale();
601
+ return this.rows().map((row) => ({
602
+ row,
603
+ context: {
604
+ $implicit: row,
605
+ row
606
+ },
607
+ groups: heatmapRowGroups(row.cells, groups).map((group) => ({
608
+ ...group,
609
+ slots: group.slots.map((slot) => ({
610
+ ...slot,
611
+ level: heatmapLevel(slot.cell?.value, scale)
612
+ }))
613
+ }))
614
+ }));
615
+ }, ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
616
+ onCellActivate(row, slot) {
617
+ const cell = slot.cell;
618
+ if (cell?.interactive) this.cellClick.emit({
619
+ row,
620
+ cell,
621
+ columnKey: slot.columnKey
622
+ });
623
+ }
624
+ static ɵfac = i0.ɵɵngDeclareFactory({
625
+ minVersion: "12.0.0",
626
+ version: "22.2.3",
627
+ ngImport: i0,
628
+ type: TxHeatmap,
629
+ deps: [],
630
+ target: i0.ɵɵFactoryTarget.Component
631
+ });
632
+ static ɵcmp = i0.ɵɵngDeclareComponent({
633
+ minVersion: "17.0.0",
634
+ version: "22.2.3",
635
+ type: TxHeatmap,
636
+ isStandalone: true,
637
+ selector: "tx-heatmap",
638
+ inputs: {
639
+ groups: {
640
+ classPropertyName: "groups",
641
+ publicName: "groups",
642
+ isSignal: true,
643
+ isRequired: false,
644
+ transformFunction: null
645
+ },
646
+ rows: {
647
+ classPropertyName: "rows",
648
+ publicName: "rows",
649
+ isSignal: true,
650
+ isRequired: false,
651
+ transformFunction: null
652
+ },
653
+ legend: {
654
+ classPropertyName: "legend",
655
+ publicName: "legend",
656
+ isSignal: true,
657
+ isRequired: false,
658
+ transformFunction: null
659
+ },
660
+ labels: {
661
+ classPropertyName: "labels",
662
+ publicName: "labels",
663
+ isSignal: true,
664
+ isRequired: false,
665
+ transformFunction: null
666
+ },
667
+ maxHeight: {
668
+ classPropertyName: "maxHeight",
669
+ publicName: "maxHeight",
670
+ isSignal: true,
671
+ isRequired: false,
672
+ transformFunction: null
673
+ },
674
+ scaleSteps: {
675
+ classPropertyName: "scaleSteps",
676
+ publicName: "scaleSteps",
677
+ isSignal: true,
678
+ isRequired: false,
679
+ transformFunction: null
680
+ },
681
+ scaleMin: {
682
+ classPropertyName: "scaleMin",
683
+ publicName: "scaleMin",
684
+ isSignal: true,
685
+ isRequired: false,
686
+ transformFunction: null
687
+ },
688
+ scaleMax: {
689
+ classPropertyName: "scaleMax",
690
+ publicName: "scaleMax",
691
+ isSignal: true,
692
+ isRequired: false,
693
+ transformFunction: null
694
+ },
695
+ dt: {
696
+ classPropertyName: "dt",
697
+ publicName: "dt",
698
+ isSignal: true,
699
+ isRequired: false,
700
+ transformFunction: null
701
+ },
702
+ pt: {
703
+ classPropertyName: "pt",
704
+ publicName: "pt",
705
+ isSignal: true,
706
+ isRequired: false,
707
+ transformFunction: null
708
+ },
709
+ ptOptions: {
710
+ classPropertyName: "ptOptions",
711
+ publicName: "ptOptions",
712
+ isSignal: true,
713
+ isRequired: false,
714
+ transformFunction: null
715
+ },
716
+ unstyled: {
717
+ classPropertyName: "unstyled",
718
+ publicName: "unstyled",
719
+ isSignal: true,
720
+ isRequired: false,
721
+ transformFunction: null
722
+ }
723
+ },
724
+ outputs: { cellClick: "cellClick" },
725
+ host: {
726
+ properties: {
727
+ "class": "passThrough().root?.class",
728
+ "style": "hostStyle()",
729
+ "attr.data-styled": "!isUnstyled() || null"
730
+ },
731
+ classAttribute: "tx-heatmap"
732
+ },
733
+ queries: [{
734
+ propertyName: "rowHeaderTemplate",
735
+ first: true,
736
+ predicate: TxHeatmapRowHeader,
737
+ descendants: true,
738
+ read: TemplateRef,
739
+ isSignal: true
740
+ }, {
741
+ propertyName: "rowValueTemplate",
742
+ first: true,
743
+ predicate: TxHeatmapRowValue,
744
+ descendants: true,
745
+ read: TemplateRef,
746
+ isSignal: true
747
+ }],
748
+ ngImport: i0,
749
+ 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",
750
+ 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"],
751
+ dependencies: [
752
+ {
753
+ kind: "directive",
754
+ type: NgTemplateOutlet,
755
+ selector: "[ngTemplateOutlet]",
756
+ inputs: [
757
+ "ngTemplateOutletContext",
758
+ "ngTemplateOutlet",
759
+ "ngTemplateOutletInjector"
760
+ ]
761
+ },
762
+ {
763
+ kind: "component",
764
+ type: TxHeatmapCellView,
765
+ selector: "tx-heatmap-cell",
766
+ inputs: [
767
+ "cell",
768
+ "level",
769
+ "legend",
770
+ "boxClass",
771
+ "boxStyle",
772
+ "unstyled"
773
+ ],
774
+ outputs: ["activate"]
775
+ },
776
+ {
777
+ kind: "component",
778
+ type: TxHeatmapLegend,
779
+ selector: "tx-heatmap-legend",
780
+ inputs: [
781
+ "items",
782
+ "emptyLabel",
783
+ "scale",
784
+ "unstyled"
785
+ ]
786
+ }
787
+ ],
788
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
789
+ });
790
+ };
791
+ i0.ɵɵngDeclareClassMetadata({
792
+ minVersion: "12.0.0",
793
+ version: "22.2.3",
794
+ ngImport: i0,
795
+ type: TxHeatmap,
796
+ decorators: [{
797
+ type: Component,
798
+ args: [{
799
+ selector: "tx-heatmap",
800
+ imports: [
801
+ NgTemplateOutlet,
802
+ TxHeatmapCellView,
803
+ TxHeatmapLegend
804
+ ],
805
+ changeDetection: ChangeDetectionStrategy.OnPush,
806
+ host: {
807
+ class: "tx-heatmap",
808
+ "[class]": "passThrough().root?.class",
809
+ "[style]": "hostStyle()",
810
+ "[attr.data-styled]": "!isUnstyled() || null"
811
+ },
812
+ 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
+ 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
+ }]
815
+ }],
816
+ propDecorators: {
817
+ groups: [{
818
+ type: i0.Input,
819
+ args: [{
820
+ isSignal: true,
821
+ alias: "groups",
822
+ required: false
823
+ }]
824
+ }],
825
+ rows: [{
826
+ type: i0.Input,
827
+ args: [{
828
+ isSignal: true,
829
+ alias: "rows",
830
+ required: false
831
+ }]
832
+ }],
833
+ legend: [{
834
+ type: i0.Input,
835
+ args: [{
836
+ isSignal: true,
837
+ alias: "legend",
838
+ required: false
839
+ }]
840
+ }],
841
+ labels: [{
842
+ type: i0.Input,
843
+ args: [{
844
+ isSignal: true,
845
+ alias: "labels",
846
+ required: false
847
+ }]
848
+ }],
849
+ maxHeight: [{
850
+ type: i0.Input,
851
+ args: [{
852
+ isSignal: true,
853
+ alias: "maxHeight",
854
+ required: false
855
+ }]
856
+ }],
857
+ scaleSteps: [{
858
+ type: i0.Input,
859
+ args: [{
860
+ isSignal: true,
861
+ alias: "scaleSteps",
862
+ required: false
863
+ }]
864
+ }],
865
+ scaleMin: [{
866
+ type: i0.Input,
867
+ args: [{
868
+ isSignal: true,
869
+ alias: "scaleMin",
870
+ required: false
871
+ }]
872
+ }],
873
+ scaleMax: [{
874
+ type: i0.Input,
875
+ args: [{
876
+ isSignal: true,
877
+ alias: "scaleMax",
878
+ required: false
879
+ }]
880
+ }],
881
+ dt: [{
882
+ type: i0.Input,
883
+ args: [{
884
+ isSignal: true,
885
+ alias: "dt",
886
+ required: false
887
+ }]
888
+ }],
889
+ pt: [{
890
+ type: i0.Input,
891
+ args: [{
892
+ isSignal: true,
893
+ alias: "pt",
894
+ required: false
895
+ }]
896
+ }],
897
+ ptOptions: [{
898
+ type: i0.Input,
899
+ args: [{
900
+ isSignal: true,
901
+ alias: "ptOptions",
902
+ required: false
903
+ }]
904
+ }],
905
+ unstyled: [{
906
+ type: i0.Input,
907
+ args: [{
908
+ isSignal: true,
909
+ alias: "unstyled",
910
+ required: false
911
+ }]
912
+ }],
913
+ cellClick: [{
914
+ type: i0.Output,
915
+ args: ["cellClick"]
916
+ }],
917
+ rowHeaderTemplate: [{
918
+ type: i0.ContentChild,
919
+ args: [i0.forwardRef(() => TxHeatmapRowHeader), {
920
+ read: TemplateRef,
921
+ isSignal: true
922
+ }]
923
+ }],
924
+ rowValueTemplate: [{
925
+ type: i0.ContentChild,
926
+ args: [i0.forwardRef(() => TxHeatmapRowValue), {
927
+ read: TemplateRef,
928
+ isSignal: true
929
+ }]
930
+ }]
931
+ }
932
+ });
933
+ export { TxHeatmap, TxHeatmapCellView, TxHeatmapLegend, TxHeatmapRowHeader, TxHeatmapRowValue, heatmapCalendar, heatmapCellLabel, heatmapLevel, heatmapRowGroups, heatmapScale };
934
+
935
+ //# sourceMappingURL=tectra-ng-charts-heatmap.mjs.map