@tectra-ng/charts 0.2.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +1 -0
  2. package/fesm2022/tectra-ng-charts-bar-list.mjs +8 -2
  3. package/fesm2022/tectra-ng-charts-bar-list.mjs.map +1 -1
  4. package/fesm2022/tectra-ng-charts-boxplot.mjs +11 -2
  5. package/fesm2022/tectra-ng-charts-boxplot.mjs.map +1 -1
  6. package/fesm2022/tectra-ng-charts-bullet.mjs +8 -2
  7. package/fesm2022/tectra-ng-charts-bullet.mjs.map +1 -1
  8. package/fesm2022/tectra-ng-charts-candlestick.mjs +8 -2
  9. package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -1
  10. package/fesm2022/tectra-ng-charts-column.mjs +11 -2
  11. package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
  12. package/fesm2022/tectra-ng-charts-combo.mjs +11 -2
  13. package/fesm2022/tectra-ng-charts-combo.mjs.map +1 -1
  14. package/fesm2022/tectra-ng-charts-core.mjs +38 -2
  15. package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-charts-funnel.mjs +8 -2
  17. package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -1
  18. package/fesm2022/tectra-ng-charts-gantt.mjs +12 -3
  19. package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-charts-gauge.mjs +12 -2
  21. package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-charts-heatmap.mjs +14 -2
  23. package/fesm2022/tectra-ng-charts-heatmap.mjs.map +1 -1
  24. package/fesm2022/tectra-ng-charts-line.mjs +8 -2
  25. package/fesm2022/tectra-ng-charts-line.mjs.map +1 -1
  26. package/fesm2022/tectra-ng-charts-org-chart.mjs +43 -4
  27. package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -1
  28. package/fesm2022/tectra-ng-charts-pie.mjs +11 -2
  29. package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
  30. package/fesm2022/tectra-ng-charts-radar.mjs +12 -2
  31. package/fesm2022/tectra-ng-charts-radar.mjs.map +1 -1
  32. package/fesm2022/tectra-ng-charts-radial-bar.mjs +11 -2
  33. package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -1
  34. package/fesm2022/tectra-ng-charts-range-area.mjs +8 -2
  35. package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -1
  36. package/fesm2022/tectra-ng-charts-rank-line.mjs +8 -2
  37. package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -1
  38. package/fesm2022/tectra-ng-charts-sankey.mjs +11 -2
  39. package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-charts-scatter.mjs +11 -2
  41. package/fesm2022/tectra-ng-charts-scatter.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-charts-segmented-bar.mjs +12 -2
  43. package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -1
  44. package/fesm2022/tectra-ng-charts-sunburst.mjs +8 -2
  45. package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -1
  46. package/fesm2022/tectra-ng-charts-treemap.mjs +8 -2
  47. package/fesm2022/tectra-ng-charts-treemap.mjs.map +1 -1
  48. package/fesm2022/tectra-ng-charts-waterfall.mjs +8 -2
  49. package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -1
  50. package/package.json +5 -5
  51. package/types/tectra-ng-charts-bar-list.d.ts +1 -0
  52. package/types/tectra-ng-charts-bar-list.d.ts.map +1 -1
  53. package/types/tectra-ng-charts-boxplot.d.ts +1 -0
  54. package/types/tectra-ng-charts-boxplot.d.ts.map +1 -1
  55. package/types/tectra-ng-charts-bullet.d.ts +1 -0
  56. package/types/tectra-ng-charts-bullet.d.ts.map +1 -1
  57. package/types/tectra-ng-charts-candlestick.d.ts +1 -0
  58. package/types/tectra-ng-charts-candlestick.d.ts.map +1 -1
  59. package/types/tectra-ng-charts-column.d.ts +1 -0
  60. package/types/tectra-ng-charts-column.d.ts.map +1 -1
  61. package/types/tectra-ng-charts-combo.d.ts +1 -0
  62. package/types/tectra-ng-charts-combo.d.ts.map +1 -1
  63. package/types/tectra-ng-charts-core.d.ts +6 -0
  64. package/types/tectra-ng-charts-core.d.ts.map +1 -1
  65. package/types/tectra-ng-charts-funnel.d.ts +1 -0
  66. package/types/tectra-ng-charts-funnel.d.ts.map +1 -1
  67. package/types/tectra-ng-charts-gantt.d.ts +1 -0
  68. package/types/tectra-ng-charts-gantt.d.ts.map +1 -1
  69. package/types/tectra-ng-charts-gauge.d.ts +1 -0
  70. package/types/tectra-ng-charts-gauge.d.ts.map +1 -1
  71. package/types/tectra-ng-charts-heatmap.d.ts +3 -0
  72. package/types/tectra-ng-charts-heatmap.d.ts.map +1 -1
  73. package/types/tectra-ng-charts-line.d.ts +1 -0
  74. package/types/tectra-ng-charts-line.d.ts.map +1 -1
  75. package/types/tectra-ng-charts-org-chart.d.ts +3 -0
  76. package/types/tectra-ng-charts-org-chart.d.ts.map +1 -1
  77. package/types/tectra-ng-charts-pie.d.ts +1 -0
  78. package/types/tectra-ng-charts-pie.d.ts.map +1 -1
  79. package/types/tectra-ng-charts-radar.d.ts +1 -0
  80. package/types/tectra-ng-charts-radar.d.ts.map +1 -1
  81. package/types/tectra-ng-charts-radial-bar.d.ts +1 -0
  82. package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -1
  83. package/types/tectra-ng-charts-range-area.d.ts +1 -0
  84. package/types/tectra-ng-charts-range-area.d.ts.map +1 -1
  85. package/types/tectra-ng-charts-rank-line.d.ts +1 -0
  86. package/types/tectra-ng-charts-rank-line.d.ts.map +1 -1
  87. package/types/tectra-ng-charts-sankey.d.ts +1 -0
  88. package/types/tectra-ng-charts-sankey.d.ts.map +1 -1
  89. package/types/tectra-ng-charts-scatter.d.ts +1 -0
  90. package/types/tectra-ng-charts-scatter.d.ts.map +1 -1
  91. package/types/tectra-ng-charts-segmented-bar.d.ts +1 -0
  92. package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -1
  93. package/types/tectra-ng-charts-sunburst.d.ts +1 -0
  94. package/types/tectra-ng-charts-sunburst.d.ts.map +1 -1
  95. package/types/tectra-ng-charts-treemap.d.ts +1 -0
  96. package/types/tectra-ng-charts-treemap.d.ts.map +1 -1
  97. package/types/tectra-ng-charts-waterfall.d.ts +1 -0
  98. 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, contentChild, inject, input, linkedSignal, output, signal, viewChild } from "@angular/core";
3
3
  import { TxChartFrame, TxChartTooltipTemplate, chartNumberFormatter, chartSummary, initialChartSize, injectChartEntrance, readTokenNumber, seriesColor, stepIndex, textWidth, truncateText } 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, 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, txIconChartBar } from "@tectra-ng/icons";
8
9
  const round = (value) => Math.round(value * 100) / 100;
9
10
  function funnelBoxes(input) {
10
11
  const count = input.values.length;
@@ -40,6 +41,8 @@ function funnelIndexAt(boxes, y) {
40
41
  const step = boxes.length > 1 ? boxes[1].y - first.y : first.height;
41
42
  return Math.max(0, Math.min(boxes.length - 1, Math.floor((y - first.y + (step - first.height) / 2) / step)));
42
43
  }
44
+ const FUNNEL_ICON_DEFAULTS = { "chart-bar": txIconChartBar };
45
+ const FUNNEL_THEME = { chart: chartTokens };
43
46
  const DEFAULTS = {
44
47
  gap: .32,
45
48
  labelWidth: .3,
@@ -51,6 +54,7 @@ const PADDING = 4;
51
54
  const LABEL_PAD = 12;
52
55
  const MIN_WIDTH = 4;
53
56
  var TxFunnelChart = class TxFunnelChart {
57
+ funnelTheme = injectTokens(FUNNEL_THEME);
54
58
  locale = inject(TxLocaleService);
55
59
  host = inject(ElementRef);
56
60
  translations = injectTranslations();
@@ -517,6 +521,7 @@ var TxFunnelChart = class TxFunnelChart {
517
521
  "zoomReset"
518
522
  ]
519
523
  }],
524
+ viewProviders: [provideTxIconDefaults(FUNNEL_ICON_DEFAULTS)],
520
525
  changeDetection: i0.ChangeDetectionStrategy.OnPush
521
526
  });
522
527
  };
@@ -541,6 +546,7 @@ i0.ɵɵngDeclareClassMetadata({
541
546
  "[class.tx-funnel-chart--morph]": "morph()",
542
547
  "[class.tx-funnel-chart--active]": "active() !== null"
543
548
  },
549
+ viewProviders: [provideTxIconDefaults(FUNNEL_ICON_DEFAULTS)],
544
550
  template: "<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [showLegend]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n @if (connectors()) {\n @for (shape of connectorShapes(); track shape.key) {\n <svg:path\n class=\"tx-funnel-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.d]=\"shape.path\"\n [style.fill]=\"shape.color\"\n />\n }\n }\n @for (stage of stages(); track stage.key) {\n <svg:rect\n class=\"tx-funnel-chart__stage\"\n [class.tx-funnel-chart__stage--active]=\"active() === stage.index\"\n [class]=\"passThrough().stage?.class\"\n [style]=\"passThrough().stage?.style\"\n [attr.data-index]=\"stage.index\"\n [attr.x]=\"stage.x\"\n [attr.y]=\"stage.y\"\n [attr.width]=\"stage.width\"\n [attr.height]=\"stage.height\"\n [style.fill]=\"stage.color\"\n [style.--tx-funnel-chart-order]=\"stage.index\"\n />\n }\n @if (showConversion() && gapHeight() >= geometry().conversionFontSize + 2) {\n @for (shape of connectorShapes(); track shape.key) {\n <svg:text\n class=\"tx-funnel-chart__conversion\"\n [class]=\"passThrough().conversion?.class\"\n [style]=\"passThrough().conversion?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"shape.textX\"\n [attr.y]=\"shape.textY\"\n >\n {{ formatPercent()(shape.conversion) }}\n </svg:text>\n }\n }\n @for (text of labels(); track text.key) {\n @if (showLabels()) {\n <svg:text\n class=\"tx-funnel-chart__label\"\n [class.tx-funnel-chart__label--active]=\"active() === text.index\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n dominant-baseline=\"central\"\n [attr.x]=\"text.labelX\"\n [attr.y]=\"text.y\"\n >\n {{ text.label }}\n @if (text.label !== text.full) {\n <svg:title>{{ text.full }}</svg:title>\n }\n </svg:text>\n }\n @if (showValues()) {\n <svg:text\n class=\"tx-funnel-chart__value\"\n [class.tx-funnel-chart__value--outside]=\"!text.inside\"\n [class]=\"passThrough().value?.class\"\n [style]=\"passThrough().value?.style\"\n dominant-baseline=\"central\"\n [attr.text-anchor]=\"text.inside ? 'middle' : 'start'\"\n [attr.x]=\"text.valueX\"\n [attr.y]=\"text.y\"\n >\n {{ text.value }}\n </svg:text>\n }\n }\n</tx-chart-frame>\n",
545
551
  styles: [":host{display:block;min-width:0}:host(.tx-funnel-chart--fill){height:100%}.tx-funnel-chart__stage{transform-box:fill-box;transform-origin:50% 50%}.tx-funnel-chart__connector{fill-opacity:.16}.tx-funnel-chart__connector,.tx-funnel-chart__label,.tx-funnel-chart__value,.tx-funnel-chart__conversion{pointer-events:none}:host([data-styled]) .tx-funnel-chart__stage{clip-path:inset(0 round var(--tx-chart-funnel-radius));transition:opacity var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-funnel-chart__connector{fill-opacity:var(--tx-chart-funnel-connector-opacity)}:host([data-styled]) .tx-funnel-chart__label{fill:var(--tx-chart-funnel-label-color);font-size:var(--tx-chart-funnel-label-font-size);font-weight:var(--tx-chart-funnel-label-font-weight)}:host([data-styled]) .tx-funnel-chart__value{fill:var(--tx-chart-funnel-value-color);font-size:var(--tx-chart-funnel-value-font-size);font-weight:var(--tx-chart-funnel-value-font-weight);font-variant-numeric:tabular-nums}:host([data-styled]) .tx-funnel-chart__value--outside{fill:var(--tx-chart-funnel-outside-value-color)}:host([data-styled]) .tx-funnel-chart__conversion{fill:var(--tx-chart-funnel-conversion-color);font-size:var(--tx-chart-funnel-conversion-font-size);font-variant-numeric:tabular-nums}:host([data-styled].tx-funnel-chart--active) .tx-funnel-chart__stage:not(.tx-funnel-chart__stage--active){opacity:var(--tx-chart-funnel-dimmed-opacity)}:host([data-styled].tx-funnel-chart--morph) .tx-funnel-chart__stage{transition:opacity var(--tx-chart-motion-hover-duration) ease,x var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),y var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),height var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-funnel-chart--morph) .tx-funnel-chart__connector{transition:d var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled].tx-funnel-chart--entering) .tx-funnel-chart__stage{animation:tx-funnel-chart-grow var(--tx-chart-motion-enter-duration) var(--tx-chart-motion-easing) both;animation-delay:calc(var(--tx-funnel-chart-order, 0) * var(--tx-chart-motion-stagger) * 2)}:host([data-styled].tx-funnel-chart--entering) .tx-funnel-chart__connector,:host([data-styled].tx-funnel-chart--entering) .tx-funnel-chart__value,:host([data-styled].tx-funnel-chart--entering) .tx-funnel-chart__conversion{animation:tx-funnel-chart-fade var(--tx-chart-motion-enter-duration) ease both}@keyframes tx-funnel-chart-grow{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes tx-funnel-chart-fade{0%,60%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-funnel-chart__stage,:host([data-styled]) .tx-funnel-chart__connector,:host([data-styled]) .tx-funnel-chart__value,:host([data-styled]) .tx-funnel-chart__conversion{transition:none;animation:none}}\n"]
546
552
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-funnel.mjs","names":[],"sources":["../../../../packages/charts/funnel/src/funnel-layout.ts","../../../../packages/charts/funnel/src/funnel-chart.component.ts","../../../../packages/charts/funnel/src/funnel-chart.component.html"],"sourcesContent":["export interface TxFunnelBox {\n index: number;\n value: number;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface TxFunnelLayoutInput {\n values: readonly number[];\n left: number;\n width: number;\n top: number;\n height: number;\n gapRatio: number;\n minWidth: number;\n}\n\nconst round = (value: number) => Math.round(value * 100) / 100;\n\nexport function funnelBoxes(input: TxFunnelLayoutInput): TxFunnelBox[] {\n const count = input.values.length;\n if (!count) return [];\n const max = Math.max(0, ...input.values);\n const row = input.height / (count + Math.max(0, count - 1) * input.gapRatio);\n const step = row * (1 + input.gapRatio);\n const center = input.left + input.width / 2;\n return input.values.map((value, index) => {\n const width = max > 0 ? Math.max(input.minWidth, (Math.max(0, value) / max) * input.width) : input.minWidth;\n return { index, value, x: round(center - width / 2), y: round(input.top + index * step), width: round(width), height: round(row) };\n });\n}\n\nexport function funnelConnectorPath(upper: TxFunnelBox, lower: TxFunnelBox): string {\n const top = upper.y + upper.height;\n return `M${upper.x},${round(top)}L${round(upper.x + upper.width)},${round(top)}L${round(lower.x + lower.width)},${lower.y}L${lower.x},${lower.y}Z`;\n}\n\nexport function funnelRate(value: number, base: number): number {\n return base > 0 ? (Math.max(0, value) / base) * 100 : 0;\n}\n\nexport function funnelIndexAt(boxes: readonly TxFunnelBox[], y: number): number {\n if (!boxes.length) return -1;\n const first = boxes[0];\n const last = boxes[boxes.length - 1];\n if (y < first.y || y > last.y + last.height) return -1;\n const step = boxes.length > 1 ? boxes[1].y - first.y : first.height;\n return Math.max(0, Math.min(boxes.length - 1, Math.floor((y - first.y + (step - first.height) / 2) / step)));\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n chartNumberFormatter,\n chartSummary,\n initialChartSize,\n injectChartEntrance,\n readTokenNumber,\n seriesColor,\n stepIndex,\n textWidth,\n truncateText,\n} from '@tectra-ng/charts/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { funnelBoxes, funnelConnectorPath, funnelIndexAt, funnelRate } from './funnel-layout';\nimport { TxFunnelChartPart, TxFunnelConnector, TxFunnelItem, TxFunnelStage, TxFunnelStageEvent } from './funnel-chart.types';\n\nconst DEFAULTS = { gap: 0.32, labelWidth: 0.3, labelFontSize: 12.25, valueFontSize: 12, conversionFontSize: 11 };\nconst PADDING = 4;\nconst LABEL_PAD = 12;\nconst MIN_WIDTH = 4;\n\n@Component({\n selector: 'tx-funnel-chart',\n imports: [TxChartFrame],\n templateUrl: './funnel-chart.component.html',\n styleUrl: './funnel-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-funnel-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-funnel-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-funnel-chart--entering]': 'entrance.active()',\n '[class.tx-funnel-chart--morph]': 'morph()',\n '[class.tx-funnel-chart--active]': 'active() !== null',\n },\n})\nexport class TxFunnelChart {\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxFunnelItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(320);\n readonly colorful = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValues = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showConversion = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly connectors = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxFunnelChartPart, TxFunnelChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly stageClick = output<TxFunnelStageEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('funnelChart', 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 active = signal<number | null>(null);\n readonly geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.items() ?? []);\n readonly values = computed(() => this.list().map((item) => (item.value !== null && Number.isFinite(item.value) ? Math.max(0, item.value) : 0)));\n readonly isEmpty = computed(() => !this.values().some((value) => value > 0));\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => chartNumberFormatter(this.intl(), 'percent'));\n\n readonly labelColumn = computed(() => {\n if (!this.showLabels()) return 0;\n const { labelWidth, labelFontSize } = this.geometry();\n const widest = Math.max(0, ...this.list().map((item) => textWidth(item.label, labelFontSize)));\n return Math.min(this.size().width * labelWidth, widest + LABEL_PAD);\n });\n\n readonly stages = computed<TxFunnelStage[]>(() => {\n const { width, height } = this.size();\n const column = this.labelColumn();\n const values = this.values();\n const first = values[0] ?? 0;\n const boxes = funnelBoxes({ values, left: column, width: Math.max(1, width - column - PADDING), top: PADDING, height: Math.max(1, height - PADDING * 2), gapRatio: this.geometry().gap, minWidth: MIN_WIDTH });\n return boxes.map((box, index) => ({\n ...box,\n key: `${index}:${this.list()[index].label}`,\n label: this.list()[index].label,\n ofFirst: funnelRate(box.value, first),\n conversion: index ? funnelRate(box.value, values[index - 1]) : null,\n color: this.colorful() ? seriesColor(this.list()[index].color, index) : (this.list()[index].color ?? seriesColor(undefined, 0)),\n }));\n });\n\n readonly connectorShapes = computed<TxFunnelConnector[]>(() => {\n const stages = this.stages();\n return stages.slice(1).map((stage, index) => {\n const upper = stages[index];\n return {\n key: `${upper.key}>${stage.key}`,\n index: stage.index,\n path: funnelConnectorPath(upper, stage),\n color: upper.color,\n textX: upper.x + upper.width / 2,\n textY: (upper.y + upper.height + stage.y) / 2,\n conversion: stage.conversion ?? 0,\n };\n });\n });\n\n readonly gapHeight = computed(() => {\n const stages = this.stages();\n return stages.length > 1 ? stages[1].y - stages[0].y - stages[0].height : 0;\n });\n\n readonly labels = computed(() => {\n const column = this.labelColumn();\n const { labelFontSize, valueFontSize } = this.geometry();\n return this.stages().map((stage) => {\n const value = this.valueFormatter()(stage.value);\n const inside = stage.width >= textWidth(value, valueFontSize) + 12;\n return {\n key: stage.key,\n index: stage.index,\n label: truncateText(stage.label, Math.max(0, column - LABEL_PAD), labelFontSize),\n full: stage.label,\n labelX: 0,\n y: stage.y + stage.height / 2,\n value,\n valueX: inside ? stage.x + stage.width / 2 : stage.x + stage.width + 6,\n inside,\n };\n });\n });\n\n readonly formatPercent = computed(() => {\n const format = this.percentFormatter();\n return (value: number) => format(Number(value.toFixed(1)));\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.active();\n if (index === null || !this.showTooltip()) return null;\n const stage = this.stages()[index];\n if (!stage) return null;\n const t = this.translations();\n const percent = this.formatPercent();\n const rows = [\n { label: stage.label, value: this.valueFormatter()(stage.value), color: stage.color, raw: stage.value, seriesIndex: 0, active: true },\n ...(index ? [{ label: t.chartOfFirst, value: percent(stage.ofFirst), color: 'transparent', raw: stage.ofFirst, seriesIndex: 1 }] : []),\n ...(stage.conversion !== null ? [{ label: t.chartConversion, value: percent(stage.conversion), color: 'transparent', raw: stage.conversion, seriesIndex: 2 }] : []),\n ];\n return { title: '', rows, index, x: stage.x + stage.width / 2, y: stage.y, placement: 'top' };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const stages = this.stages();\n const last = stages[stages.length - 1];\n const text = chartSummary(t, this.intl(), t.chartFunnel, 1, stages.length, null);\n const rate = last && stages.length > 1 ? `, ${t.chartConversion.toLocaleLowerCase(this.intl())} ${this.formatPercent()(last.ofFirst)}` : '';\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}${rate}` : `${text}${rate}`;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n const percent = this.formatPercent();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'first', label: t.chartOfFirst },\n { key: 'conversion', label: t.chartConversion },\n ],\n rows: this.stages().map((stage) => ({\n label: stage.label,\n cells: [this.valueFormatter()(stage.value), percent(stage.ofFirst), stage.conversion === null ? '—' : percent(stage.conversion)],\n })),\n };\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const index = funnelIndexAt(this.stages(), event.y);\n this.active.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const stage = this.stages()[index];\n this.stageClick.emit({ index, label: stage.label, value: stage.value, ofFirst: stage.ofFirst, conversion: stage.conversion });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.active.set(null);\n return;\n }\n const key = event.key === 'ArrowDown' ? 'ArrowRight' : event.key === 'ArrowUp' ? 'ArrowLeft' : event.key;\n const index = stepIndex(key, this.active() ?? -1, this.stages().length);\n if (index < 0) return;\n this.active.set(index);\n const stage = this.stages()[index];\n const t = this.translations();\n const conversion = stage.conversion === null ? '' : `, ${t.chartConversion.toLocaleLowerCase(this.intl())} ${this.formatPercent()(stage.conversion)}`;\n this.frame()?.announce(`${stage.label}: ${this.valueFormatter()(stage.value)}${conversion}`);\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n gap: readTokenNumber(element, '--tx-chart-funnel-row-gap', DEFAULTS.gap),\n labelWidth: readTokenNumber(element, '--tx-chart-funnel-label-width', DEFAULTS.labelWidth),\n labelFontSize: readTokenNumber(element, '--tx-chart-funnel-label-font-size', DEFAULTS.labelFontSize),\n valueFontSize: readTokenNumber(element, '--tx-chart-funnel-value-font-size', DEFAULTS.valueFontSize),\n conversionFontSize: readTokenNumber(element, '--tx-chart-funnel-conversion-font-size', DEFAULTS.conversionFontSize),\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 [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n @if (connectors()) {\n @for (shape of connectorShapes(); track shape.key) {\n <svg:path\n class=\"tx-funnel-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.d]=\"shape.path\"\n [style.fill]=\"shape.color\"\n />\n }\n }\n @for (stage of stages(); track stage.key) {\n <svg:rect\n class=\"tx-funnel-chart__stage\"\n [class.tx-funnel-chart__stage--active]=\"active() === stage.index\"\n [class]=\"passThrough().stage?.class\"\n [style]=\"passThrough().stage?.style\"\n [attr.data-index]=\"stage.index\"\n [attr.x]=\"stage.x\"\n [attr.y]=\"stage.y\"\n [attr.width]=\"stage.width\"\n [attr.height]=\"stage.height\"\n [style.fill]=\"stage.color\"\n [style.--tx-funnel-chart-order]=\"stage.index\"\n />\n }\n @if (showConversion() && gapHeight() >= geometry().conversionFontSize + 2) {\n @for (shape of connectorShapes(); track shape.key) {\n <svg:text\n class=\"tx-funnel-chart__conversion\"\n [class]=\"passThrough().conversion?.class\"\n [style]=\"passThrough().conversion?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"shape.textX\"\n [attr.y]=\"shape.textY\"\n >\n {{ formatPercent()(shape.conversion) }}\n </svg:text>\n }\n }\n @for (text of labels(); track text.key) {\n @if (showLabels()) {\n <svg:text\n class=\"tx-funnel-chart__label\"\n [class.tx-funnel-chart__label--active]=\"active() === text.index\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n dominant-baseline=\"central\"\n [attr.x]=\"text.labelX\"\n [attr.y]=\"text.y\"\n >\n {{ text.label }}\n @if (text.label !== text.full) {\n <svg:title>{{ text.full }}</svg:title>\n }\n </svg:text>\n }\n @if (showValues()) {\n <svg:text\n class=\"tx-funnel-chart__value\"\n [class.tx-funnel-chart__value--outside]=\"!text.inside\"\n [class]=\"passThrough().value?.class\"\n [style]=\"passThrough().value?.style\"\n dominant-baseline=\"central\"\n [attr.text-anchor]=\"text.inside ? 'middle' : 'start'\"\n [attr.x]=\"text.valueX\"\n [attr.y]=\"text.y\"\n >\n {{ text.value }}\n </svg:text>\n }\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;AAmBA,MAAM,SAAS,UAAkB,KAAK,MAAM,QAAQ,GAAG,IAAI;AAE3D,SAAgB,YAAY,OAA0B;CACpD,MAAM,QAAQ,MAAM,OAAO;CAC3B,IAAI,CAAC,OAAO,OAAO,CAAA;CACnB,MAAM,MAAM,KAAK,IAAI,GAAG,GAAG,MAAM,MAAM;CACvC,MAAM,MAAM,MAAM,UAAU,QAAQ,KAAK,IAAI,GAAG,QAAQ,CAAC,IAAI,MAAM;CACnE,MAAM,OAAO,OAAO,IAAI,MAAM;CAC9B,MAAM,SAAS,MAAM,OAAO,MAAM,QAAQ;CAC1C,OAAO,MAAM,OAAO,KAAK,OAAO,UAAS;EACvC,MAAM,QAAQ,MAAM,IAAI,KAAK,IAAI,MAAM,UAAW,KAAK,IAAI,GAAG,KAAK,IAAI,MAAO,MAAM,KAAK,IAAI,MAAM;EACnG,OAAO;GAAE;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;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC3B,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-funnel.mjs","names":[],"sources":["../../../../packages/charts/funnel/src/funnel-layout.ts","../../../../packages/charts/funnel/src/funnel.icons.ts","../../../../packages/charts/funnel/src/funnel.theme.ts","../../../../packages/charts/funnel/src/funnel-chart.component.ts","../../../../packages/charts/funnel/src/funnel-chart.component.html"],"sourcesContent":["export interface TxFunnelBox {\n index: number;\n value: number;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface TxFunnelLayoutInput {\n values: readonly number[];\n left: number;\n width: number;\n top: number;\n height: number;\n gapRatio: number;\n minWidth: number;\n}\n\nconst round = (value: number) => Math.round(value * 100) / 100;\n\nexport function funnelBoxes(input: TxFunnelLayoutInput): TxFunnelBox[] {\n const count = input.values.length;\n if (!count) return [];\n const max = Math.max(0, ...input.values);\n const row = input.height / (count + Math.max(0, count - 1) * input.gapRatio);\n const step = row * (1 + input.gapRatio);\n const center = input.left + input.width / 2;\n return input.values.map((value, index) => {\n const width = max > 0 ? Math.max(input.minWidth, (Math.max(0, value) / max) * input.width) : input.minWidth;\n return { index, value, x: round(center - width / 2), y: round(input.top + index * step), width: round(width), height: round(row) };\n });\n}\n\nexport function funnelConnectorPath(upper: TxFunnelBox, lower: TxFunnelBox): string {\n const top = upper.y + upper.height;\n return `M${upper.x},${round(top)}L${round(upper.x + upper.width)},${round(top)}L${round(lower.x + lower.width)},${lower.y}L${lower.x},${lower.y}Z`;\n}\n\nexport function funnelRate(value: number, base: number): number {\n return base > 0 ? (Math.max(0, value) / base) * 100 : 0;\n}\n\nexport function funnelIndexAt(boxes: readonly TxFunnelBox[], y: number): number {\n if (!boxes.length) return -1;\n const first = boxes[0];\n const last = boxes[boxes.length - 1];\n if (y < first.y || y > last.y + last.height) return -1;\n const step = boxes.length > 1 ? boxes[1].y - first.y : first.height;\n return Math.max(0, Math.min(boxes.length - 1, Math.floor((y - first.y + (step - first.height) / 2) / step)));\n}\n","import { TxIconSet, txIconChartBar } from '@tectra-ng/icons';\n\nexport const FUNNEL_ICON_DEFAULTS: TxIconSet = {\n 'chart-bar': txIconChartBar,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const FUNNEL_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxChartFrame,\n TxChartHeight,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n chartNumberFormatter,\n chartSummary,\n initialChartSize,\n injectChartEntrance,\n readTokenNumber,\n seriesColor,\n stepIndex,\n textWidth,\n truncateText,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { funnelBoxes, funnelConnectorPath, funnelIndexAt, funnelRate } from './funnel-layout';\nimport { TxFunnelChartPart, TxFunnelConnector, TxFunnelItem, TxFunnelStage, TxFunnelStageEvent } from './funnel-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { FUNNEL_ICON_DEFAULTS } from './funnel.icons';\nimport { FUNNEL_THEME } from './funnel.theme';\n\nconst DEFAULTS = { gap: 0.32, labelWidth: 0.3, labelFontSize: 12.25, valueFontSize: 12, conversionFontSize: 11 };\nconst PADDING = 4;\nconst LABEL_PAD = 12;\nconst MIN_WIDTH = 4;\n\n@Component({\n selector: 'tx-funnel-chart',\n imports: [TxChartFrame],\n templateUrl: './funnel-chart.component.html',\n styleUrl: './funnel-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-funnel-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-funnel-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-funnel-chart--entering]': 'entrance.active()',\n '[class.tx-funnel-chart--morph]': 'morph()',\n '[class.tx-funnel-chart--active]': 'active() !== null',\n },\n viewProviders: [provideTxIconDefaults(FUNNEL_ICON_DEFAULTS)],\n})\nexport class TxFunnelChart {\n private readonly funnelTheme = injectTokens(FUNNEL_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxFunnelItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(320);\n readonly colorful = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showValues = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showConversion = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly connectors = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxFunnelChartPart, TxFunnelChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly stageClick = output<TxFunnelStageEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('funnelChart', 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 active = signal<number | null>(null);\n readonly geometry = signal(DEFAULTS);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.items() ?? []);\n readonly values = computed(() => this.list().map((item) => (item.value !== null && Number.isFinite(item.value) ? Math.max(0, item.value) : 0)));\n readonly isEmpty = computed(() => !this.values().some((value) => value > 0));\n readonly size = linkedSignal(() => initialChartSize(this.height(), null, undefined, this.toolbar()));\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly percentFormatter = computed(() => chartNumberFormatter(this.intl(), 'percent'));\n\n readonly labelColumn = computed(() => {\n if (!this.showLabels()) return 0;\n const { labelWidth, labelFontSize } = this.geometry();\n const widest = Math.max(0, ...this.list().map((item) => textWidth(item.label, labelFontSize)));\n return Math.min(this.size().width * labelWidth, widest + LABEL_PAD);\n });\n\n readonly stages = computed<TxFunnelStage[]>(() => {\n const { width, height } = this.size();\n const column = this.labelColumn();\n const values = this.values();\n const first = values[0] ?? 0;\n const boxes = funnelBoxes({ values, left: column, width: Math.max(1, width - column - PADDING), top: PADDING, height: Math.max(1, height - PADDING * 2), gapRatio: this.geometry().gap, minWidth: MIN_WIDTH });\n return boxes.map((box, index) => ({\n ...box,\n key: `${index}:${this.list()[index].label}`,\n label: this.list()[index].label,\n ofFirst: funnelRate(box.value, first),\n conversion: index ? funnelRate(box.value, values[index - 1]) : null,\n color: this.colorful() ? seriesColor(this.list()[index].color, index) : (this.list()[index].color ?? seriesColor(undefined, 0)),\n }));\n });\n\n readonly connectorShapes = computed<TxFunnelConnector[]>(() => {\n const stages = this.stages();\n return stages.slice(1).map((stage, index) => {\n const upper = stages[index];\n return {\n key: `${upper.key}>${stage.key}`,\n index: stage.index,\n path: funnelConnectorPath(upper, stage),\n color: upper.color,\n textX: upper.x + upper.width / 2,\n textY: (upper.y + upper.height + stage.y) / 2,\n conversion: stage.conversion ?? 0,\n };\n });\n });\n\n readonly gapHeight = computed(() => {\n const stages = this.stages();\n return stages.length > 1 ? stages[1].y - stages[0].y - stages[0].height : 0;\n });\n\n readonly labels = computed(() => {\n const column = this.labelColumn();\n const { labelFontSize, valueFontSize } = this.geometry();\n return this.stages().map((stage) => {\n const value = this.valueFormatter()(stage.value);\n const inside = stage.width >= textWidth(value, valueFontSize) + 12;\n return {\n key: stage.key,\n index: stage.index,\n label: truncateText(stage.label, Math.max(0, column - LABEL_PAD), labelFontSize),\n full: stage.label,\n labelX: 0,\n y: stage.y + stage.height / 2,\n value,\n valueX: inside ? stage.x + stage.width / 2 : stage.x + stage.width + 6,\n inside,\n };\n });\n });\n\n readonly formatPercent = computed(() => {\n const format = this.percentFormatter();\n return (value: number) => format(Number(value.toFixed(1)));\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.active();\n if (index === null || !this.showTooltip()) return null;\n const stage = this.stages()[index];\n if (!stage) return null;\n const t = this.translations();\n const percent = this.formatPercent();\n const rows = [\n { label: stage.label, value: this.valueFormatter()(stage.value), color: stage.color, raw: stage.value, seriesIndex: 0, active: true },\n ...(index ? [{ label: t.chartOfFirst, value: percent(stage.ofFirst), color: 'transparent', raw: stage.ofFirst, seriesIndex: 1 }] : []),\n ...(stage.conversion !== null ? [{ label: t.chartConversion, value: percent(stage.conversion), color: 'transparent', raw: stage.conversion, seriesIndex: 2 }] : []),\n ];\n return { title: '', rows, index, x: stage.x + stage.width / 2, y: stage.y, placement: 'top' };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const stages = this.stages();\n const last = stages[stages.length - 1];\n const text = chartSummary(t, this.intl(), t.chartFunnel, 1, stages.length, null);\n const rate = last && stages.length > 1 ? `, ${t.chartConversion.toLocaleLowerCase(this.intl())} ${this.formatPercent()(last.ofFirst)}` : '';\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}${rate}` : `${text}${rate}`;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n const percent = this.formatPercent();\n return {\n columns: [\n { key: 'value', label: t.chartValue },\n { key: 'first', label: t.chartOfFirst },\n { key: 'conversion', label: t.chartConversion },\n ],\n rows: this.stages().map((stage) => ({\n label: stage.label,\n cells: [this.valueFormatter()(stage.value), percent(stage.ofFirst), stage.conversion === null ? '—' : percent(stage.conversion)],\n })),\n };\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n this.readGeometry();\n });\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const index = funnelIndexAt(this.stages(), event.y);\n this.active.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const stage = this.stages()[index];\n this.stageClick.emit({ index, label: stage.label, value: stage.value, ofFirst: stage.ofFirst, conversion: stage.conversion });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.active.set(null);\n return;\n }\n const key = event.key === 'ArrowDown' ? 'ArrowRight' : event.key === 'ArrowUp' ? 'ArrowLeft' : event.key;\n const index = stepIndex(key, this.active() ?? -1, this.stages().length);\n if (index < 0) return;\n this.active.set(index);\n const stage = this.stages()[index];\n const t = this.translations();\n const conversion = stage.conversion === null ? '' : `, ${t.chartConversion.toLocaleLowerCase(this.intl())} ${this.formatPercent()(stage.conversion)}`;\n this.frame()?.announce(`${stage.label}: ${this.valueFormatter()(stage.value)}${conversion}`);\n }\n\n private readGeometry(): void {\n const element = this.host.nativeElement;\n const next = {\n gap: readTokenNumber(element, '--tx-chart-funnel-row-gap', DEFAULTS.gap),\n labelWidth: readTokenNumber(element, '--tx-chart-funnel-label-width', DEFAULTS.labelWidth),\n labelFontSize: readTokenNumber(element, '--tx-chart-funnel-label-font-size', DEFAULTS.labelFontSize),\n valueFontSize: readTokenNumber(element, '--tx-chart-funnel-value-font-size', DEFAULTS.valueFontSize),\n conversionFontSize: readTokenNumber(element, '--tx-chart-funnel-conversion-font-size', DEFAULTS.conversionFontSize),\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 [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n @if (connectors()) {\n @for (shape of connectorShapes(); track shape.key) {\n <svg:path\n class=\"tx-funnel-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.d]=\"shape.path\"\n [style.fill]=\"shape.color\"\n />\n }\n }\n @for (stage of stages(); track stage.key) {\n <svg:rect\n class=\"tx-funnel-chart__stage\"\n [class.tx-funnel-chart__stage--active]=\"active() === stage.index\"\n [class]=\"passThrough().stage?.class\"\n [style]=\"passThrough().stage?.style\"\n [attr.data-index]=\"stage.index\"\n [attr.x]=\"stage.x\"\n [attr.y]=\"stage.y\"\n [attr.width]=\"stage.width\"\n [attr.height]=\"stage.height\"\n [style.fill]=\"stage.color\"\n [style.--tx-funnel-chart-order]=\"stage.index\"\n />\n }\n @if (showConversion() && gapHeight() >= geometry().conversionFontSize + 2) {\n @for (shape of connectorShapes(); track shape.key) {\n <svg:text\n class=\"tx-funnel-chart__conversion\"\n [class]=\"passThrough().conversion?.class\"\n [style]=\"passThrough().conversion?.style\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"shape.textX\"\n [attr.y]=\"shape.textY\"\n >\n {{ formatPercent()(shape.conversion) }}\n </svg:text>\n }\n }\n @for (text of labels(); track text.key) {\n @if (showLabels()) {\n <svg:text\n class=\"tx-funnel-chart__label\"\n [class.tx-funnel-chart__label--active]=\"active() === text.index\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n dominant-baseline=\"central\"\n [attr.x]=\"text.labelX\"\n [attr.y]=\"text.y\"\n >\n {{ text.label }}\n @if (text.label !== text.full) {\n <svg:title>{{ text.full }}</svg:title>\n }\n </svg:text>\n }\n @if (showValues()) {\n <svg:text\n class=\"tx-funnel-chart__value\"\n [class.tx-funnel-chart__value--outside]=\"!text.inside\"\n [class]=\"passThrough().value?.class\"\n [style]=\"passThrough().value?.style\"\n dominant-baseline=\"central\"\n [attr.text-anchor]=\"text.inside ? 'middle' : 'start'\"\n [attr.x]=\"text.valueX\"\n [attr.y]=\"text.y\"\n >\n {{ text.value }}\n </svg:text>\n }\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAmBA,MAAM,SAAS,UAAkB,KAAK,MAAM,QAAQ,GAAG,IAAI;AAE3D,SAAgB,YAAY,OAA0B;CACpD,MAAM,QAAQ,MAAM,OAAO;CAC3B,IAAI,CAAC,OAAO,OAAO,CAAA;CACnB,MAAM,MAAM,KAAK,IAAI,GAAG,GAAG,MAAM,MAAM;CACvC,MAAM,MAAM,MAAM,UAAU,QAAQ,KAAK,IAAI,GAAG,QAAQ,CAAC,IAAI,MAAM;CACnE,MAAM,OAAO,OAAO,IAAI,MAAM;CAC9B,MAAM,SAAS,MAAM,OAAO,MAAM,QAAQ;CAC1C,OAAO,MAAM,OAAO,KAAK,OAAO,UAAS;EACvC,MAAM,QAAQ,MAAM,IAAI,KAAK,IAAI,MAAM,UAAW,KAAK,IAAI,GAAG,KAAK,IAAI,MAAO,MAAM,KAAK,IAAI,MAAM;EACnG,OAAO;GAAE;GAAO;GAAO,GAAG,MAAM,SAAS,QAAQ,CAAC;GAAG,GAAG,MAAM,MAAM,MAAM,QAAQ,IAAI;GAAG,OAAO,MAAM,KAAK;GAAG,QAAQ,MAAM,GAAG;EAAC;CAClI,CAAC;AACH;AAEA,SAAgB,oBAAoB,OAAoB,OAAkB;CACxE,MAAM,MAAM,MAAM,IAAI,MAAM;CAC5B,OAAO,IAAI,MAAM,EAAC,GAAI,MAAM,GAAG,EAAC,GAAI,MAAM,MAAM,IAAI,MAAM,KAAK,EAAC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GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC3B,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -2,11 +2,11 @@ import { dateFormat, seriesColor, toTime, toggleKey } from "@tectra-ng/charts/co
2
2
  import * as i0 from "@angular/core";
3
3
  import { ChangeDetectionStrategy, Component, Injector, afterNextRender, booleanAttribute, computed, inject, input, model, output, signal, viewChild } from "@angular/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 { TxIcon } from "@tectra-ng/icons";
9
- import { toStyleObject } from "@tectra-ng/themes";
8
+ import { TxIcon, provideTxIconDefaults, txIconCalendar, txIconChevronDown, txIconText } from "@tectra-ng/icons";
9
+ import { chartTokens, toStyleObject } from "@tectra-ng/themes";
10
10
  import { TxButton } from "@tectra-ng/ui/button";
11
11
  import { TxButtonGroup } from "@tectra-ng/ui/button-group";
12
12
  import { TxSkeleton } from "@tectra-ng/ui/skeleton";
@@ -253,6 +253,12 @@ function ganttFolds(rows) {
253
253
  function ganttDays(start, end) {
254
254
  return Math.max(0, Math.round(daysBetween(start, end)));
255
255
  }
256
+ const GANTT_ICON_DEFAULTS = {
257
+ calendar: txIconCalendar,
258
+ "chevron-down": txIconChevronDown,
259
+ text: txIconText
260
+ };
261
+ const GANTT_THEME = { chart: chartTokens };
256
262
  const ZOOMS = [
257
263
  "quarter",
258
264
  "month",
@@ -264,6 +270,7 @@ const SKELETON_ROWS = 5;
264
270
  const TODAY_AT = .3;
265
271
  const REVEAL_FROM = .8;
266
272
  var TxGanttChart = class TxGanttChart {
273
+ ganttTheme = injectTokens(GANTT_THEME);
267
274
  locale = inject(TxLocaleService);
268
275
  injector = inject(Injector);
269
276
  translations = injectTranslations();
@@ -754,6 +761,7 @@ var TxGanttChart = class TxGanttChart {
754
761
  ]
755
762
  }
756
763
  ],
764
+ viewProviders: [provideTxIconDefaults(GANTT_ICON_DEFAULTS)],
757
765
  changeDetection: i0.ChangeDetectionStrategy.OnPush
758
766
  });
759
767
  };
@@ -783,6 +791,7 @@ i0.ɵɵngDeclareClassMetadata({
783
791
  "[attr.data-layout]": "layout()",
784
792
  "[attr.aria-busy]": "loading() || null"
785
793
  },
794
+ viewProviders: [provideTxIconDefaults(GANTT_ICON_DEFAULTS)],
786
795
  template: "@let parts = passThrough();\n@let t = translations();\n@if (toolbar()) {\n <div class=\"tx-gantt-chart__toolbar\" [class]=\"parts.toolbar?.class\" [style]=\"parts.toolbar?.style\">\n <tx-button-group role=\"group\" [attr.aria-label]=\"t.zoomIn + ' / ' + t.zoomOut\">\n @for (level of zooms; track level) {\n <button\n txButton\n type=\"button\"\n size=\"small\"\n [variant]=\"zoom() === level ? undefined : 'outlined'\"\n [severity]=\"zoom() === level ? 'primary' : 'secondary'\"\n [label]=\"zoomLabels()[level]\"\n [attr.aria-pressed]=\"zoom() === level\"\n (click)=\"setZoom(level)\"\n ></button>\n }\n </tx-button-group>\n @if (todayX() !== null) {\n <button txButton type=\"button\" size=\"small\" variant=\"text\" severity=\"secondary\" icon=\"calendar\" [label]=\"t.today\" (click)=\"scrollToToday()\"></button>\n }\n </div>\n}\n<div\n #scroller\n class=\"tx-gantt-chart__scroll\"\n [class]=\"parts.scroll?.class\"\n [style]=\"parts.scroll?.style\"\n [style.max-height]=\"maxHeight() || null\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"summary()\"\n [attr.aria-describedby]=\"uid + '-hint'\"\n (wheel)=\"onWheel($event)\"\n>\n <div class=\"tx-gantt-chart__grid\" [style.--tx-gantt-chart-width.px]=\"width()\">\n <div class=\"tx-gantt-chart__head\" [class]=\"parts.head?.class\" [style]=\"parts.head?.style\">\n <div class=\"tx-gantt-chart__corner\" [class]=\"parts.corner?.class\" [style]=\"parts.corner?.style\">{{ labelHeader() || (layout() === 'timeline' ? t.chartTimeline : t.chartTask) }}</div>\n <div class=\"tx-gantt-chart__scale\" [class]=\"parts.scale?.class\" [style]=\"parts.scale?.style\" aria-hidden=\"true\">\n <div class=\"tx-gantt-chart__tier tx-gantt-chart__tier--top\">\n @for (tick of ticks().top; track tick.key) {\n <span class=\"tx-gantt-chart__tick\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\"><span class=\"tx-gantt-chart__tick-text\">{{ tick.label }}</span></span>\n }\n </div>\n <div class=\"tx-gantt-chart__tier\">\n @for (tick of ticks().bottom; track tick.key) {\n <span class=\"tx-gantt-chart__tick\" [class.tx-gantt-chart__tick--weekend]=\"tick.weekend\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\">{{ tick.label }}</span>\n }\n </div>\n </div>\n </div>\n\n @if (loading()) {\n @for (row of skeletonRows; track row) {\n <div class=\"tx-gantt-chart__row\">\n <div class=\"tx-gantt-chart__label\"><tx-skeleton width=\"70%\" height=\"0.75rem\" /></div>\n <div class=\"tx-gantt-chart__lane\"><tx-skeleton class=\"tx-gantt-chart__skeleton\" [style.margin-left.%]=\"row * 12\" width=\"30%\" height=\"0.9rem\" /></div>\n </div>\n }\n } @else if (isEmpty()) {\n <div class=\"tx-gantt-chart__empty\" role=\"status\" [class]=\"parts.empty?.class\" [style]=\"parts.empty?.style\">\n <tx-icon name=\"calendar\" aria-hidden=\"true\" />\n <span>{{ t.chartNoData }}</span>\n </div>\n } @else {\n <div class=\"tx-gantt-chart__body\">\n <div class=\"tx-gantt-chart__backdrop\" aria-hidden=\"true\">\n @for (tick of ticks().bottom; track tick.key) {\n <span class=\"tx-gantt-chart__column\" [class.tx-gantt-chart__column--weekend]=\"tick.weekend\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\"></span>\n }\n </div>\n @for (fold of folds(); track fold.key; let foldIndex = $index) {\n @if (fold.head; as head) {\n <div class=\"tx-gantt-chart__row tx-gantt-chart__row--group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <div class=\"tx-gantt-chart__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">\n <button\n type=\"button\"\n class=\"tx-gantt-chart__toggle\"\n [attr.aria-expanded]=\"!head.collapsed\"\n [attr.aria-controls]=\"uid + '-fold-' + foldIndex\"\n (click)=\"onToggle(head.group ?? head.label)\"\n >\n <tx-icon class=\"tx-gantt-chart__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n <span class=\"tx-gantt-chart__label-text\">{{ head.label }}</span>\n <span class=\"tx-gantt-chart__count\">{{ head.count }}</span>\n </button>\n </div>\n <div class=\"tx-gantt-chart__lane\" [class]=\"parts.lane?.class\" [style]=\"parts.lane?.style\">\n @if (head.summary; as summary) {\n <span class=\"tx-gantt-chart__summary\" aria-hidden=\"true\" [style.left.px]=\"summary.x\" [style.width.px]=\"summary.width\"></span>\n }\n </div>\n </div>\n }\n <div\n class=\"tx-gantt-chart__fold\"\n [class.tx-gantt-chart__fold--collapsed]=\"fold.collapsed\"\n [attr.id]=\"fold.head ? uid + '-fold-' + foldIndex : null\"\n [attr.inert]=\"fold.collapsed ? '' : null\"\n >\n <div class=\"tx-gantt-chart__fold-content\">\n @for (row of fold.rows; track row.key) {\n <div class=\"tx-gantt-chart__row\" [class]=\"parts.row?.class\" [style]=\"parts.row?.style\">\n <div class=\"tx-gantt-chart__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">\n <span class=\"tx-gantt-chart__label-text\" [attr.title]=\"row.label\">{{ row.label }}</span>\n </div>\n <div class=\"tx-gantt-chart__lane\" [class]=\"parts.lane?.class\" [style]=\"parts.lane?.style\">\n @for (span of row.spans; track span.task.id) {\n @if (span.task.milestone) {\n <button\n type=\"button\"\n class=\"tx-gantt-chart__milestone\"\n [class]=\"parts.milestone?.class\"\n [style]=\"parts.milestone?.style\"\n [attr.data-task]=\"span.task.id\"\n [style.left.px]=\"span.x\"\n [style.--tx-gantt-chart-color]=\"span.task.color ?? null\"\n [tabindex]=\"tabStop() === span.task.id ? 0 : -1\"\n [attr.aria-label]=\"ariaFor(span)\"\n [txTooltip]=\"tooltipFor(span)\"\n (click)=\"onBarClick(span)\"\n (focus)=\"onBarFocus(span, $any($event.target))\"\n (keydown)=\"onBarKeydown($event, span)\"\n >\n <span class=\"tx-gantt-chart__diamond\" aria-hidden=\"true\"></span>\n @if (labelsOutside()) {\n <span class=\"tx-gantt-chart__bar-label tx-gantt-chart__bar-label--outside\">{{ span.task.label }}</span>\n }\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"tx-gantt-chart__bar\"\n [class.tx-gantt-chart__bar--inside]=\"labelsInside()\"\n [class]=\"parts.bar?.class\"\n [style]=\"parts.bar?.style\"\n [attr.data-task]=\"span.task.id\"\n [style.left.px]=\"span.x\"\n [style.width.px]=\"span.width\"\n [style.--tx-gantt-chart-color]=\"span.color\"\n [style.--tx-gantt-chart-progress]=\"progressOf(span) === null ? null : progressOf(span) + '%'\"\n [tabindex]=\"tabStop() === span.task.id ? 0 : -1\"\n [attr.aria-label]=\"ariaFor(span)\"\n [txTooltip]=\"tooltipFor(span)\"\n (click)=\"onBarClick(span)\"\n (focus)=\"onBarFocus(span, $any($event.target))\"\n (keydown)=\"onBarKeydown($event, span)\"\n >\n @if (progressOf(span) !== null) {\n <span class=\"tx-gantt-chart__progress\" aria-hidden=\"true\"></span>\n }\n @if (labelsInside()) {\n <span class=\"tx-gantt-chart__bar-label\">{{ span.task.label }}</span>\n }\n </button>\n @if (labelsOutside()) {\n <span class=\"tx-gantt-chart__bar-label tx-gantt-chart__bar-label--outside\" aria-hidden=\"true\" [style.left.px]=\"span.x + span.width\">{{ span.task.label }}</span>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n @let todayAt = todayX();\n @if (todayAt !== null) {\n <span class=\"tx-gantt-chart__today\" [class]=\"parts.today?.class\" [style]=\"parts.today?.style\" aria-hidden=\"true\" [style.left]=\"'calc(var(--tx-gantt-chart-label-width) + ' + todayAt + 'px)'\"></span>\n }\n </div>\n }\n </div>\n</div>\n<span class=\"cdk-visually-hidden\" [id]=\"uid + '-hint'\">{{ t.chartGanttHint }}</span>\n",
787
796
  styles: [":host{--tx-gantt-chart-label-width: min(220px, 40cqi);--tx-gantt-chart-row-height: 36px;--tx-gantt-chart-head-height: 28px;display:flex;flex-direction:column;min-width:0;container-type:inline-size}.tx-gantt-chart__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.tx-gantt-chart__scroll{position:relative;overflow:auto;overscroll-behavior-x:contain}.tx-gantt-chart__grid{position:relative;width:calc(var(--tx-gantt-chart-label-width) + var(--tx-gantt-chart-width));min-width:100%}.tx-gantt-chart__head,.tx-gantt-chart__row{display:flex}.tx-gantt-chart__head{position:sticky;top:0;z-index:3}.tx-gantt-chart__corner,.tx-gantt-chart__label{position:sticky;left:0;z-index:2;display:flex;flex:0 0 var(--tx-gantt-chart-label-width);align-items:center;min-width:0;box-sizing:border-box}.tx-gantt-chart__corner{z-index:4}.tx-gantt-chart__scale,.tx-gantt-chart__lane{position:relative;flex:0 0 var(--tx-gantt-chart-width)}.tx-gantt-chart__tier{position:relative;height:var(--tx-gantt-chart-head-height)}.tx-gantt-chart__tick{position:absolute;top:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box;white-space:nowrap}.tx-gantt-chart__tier--top .tx-gantt-chart__tick{justify-content:flex-start;overflow:visible;clip-path:inset(0)}.tx-gantt-chart__tick-text{position:sticky;left:var(--tx-gantt-chart-label-width);padding-inline:8px}.tx-gantt-chart__row{height:var(--tx-gantt-chart-row-height)}.tx-gantt-chart__label-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-gantt-chart__toggle{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:pointer}.tx-gantt-chart__toggle[aria-expanded=false] .tx-gantt-chart__chevron{transform:rotate(-90deg)}.tx-gantt-chart__body{position:relative}.tx-gantt-chart__fold{display:grid;grid-template-rows:1fr;overflow:visible clip}.tx-gantt-chart__fold--collapsed{grid-template-rows:0fr}.tx-gantt-chart__fold-content{min-height:0}.tx-gantt-chart__fold--collapsed>.tx-gantt-chart__fold-content{visibility:hidden}.tx-gantt-chart__backdrop{position:absolute;inset:0 0 0 var(--tx-gantt-chart-label-width);pointer-events:none}.tx-gantt-chart__column{position:absolute;top:0;bottom:0;box-sizing:border-box}.tx-gantt-chart__bar,.tx-gantt-chart__milestone,.tx-gantt-chart__summary,.tx-gantt-chart__bar-label--outside{position:absolute;top:50%;transform:translateY(-50%)}.tx-gantt-chart__bar{display:flex;align-items:center;height:60%;min-width:6px;margin:0;padding:0;overflow:hidden;border:0;box-sizing:border-box;background:var(--tx-gantt-chart-color);color:inherit;font:inherit;cursor:pointer}.tx-gantt-chart__progress{position:absolute;inset:0 auto 0 0;width:var(--tx-gantt-chart-progress, 0%)}.tx-gantt-chart__bar-label{position:relative;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-gantt-chart__bar--inside .tx-gantt-chart__bar-label{padding-inline:6px}.tx-gantt-chart__bar-label.tx-gantt-chart__bar-label--outside{position:absolute;padding-inline-start:6px;pointer-events:none}.tx-gantt-chart__milestone{display:flex;align-items:center;height:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:pointer;translate:-7px 0}.tx-gantt-chart__milestone .tx-gantt-chart__bar-label.tx-gantt-chart__bar-label--outside{position:static;transform:none}.tx-gantt-chart__diamond{display:block;flex:0 0 auto;width:14px;height:14px;transform:rotate(45deg) scale(.8);background:var(--tx-gantt-chart-color, currentColor)}.tx-gantt-chart__summary{height:6px;background:currentColor;opacity:.4}.tx-gantt-chart__today{position:absolute;top:0;bottom:0;z-index:1;width:2px;margin-left:-1px;background:currentColor;pointer-events:none}.tx-gantt-chart__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:160px;position:sticky;left:0}:host([data-styled]){--tx-gantt-chart-label-width: min(var(--tx-chart-gantt-label-width), 40cqi);--tx-gantt-chart-row-height: calc(var(--tx-chart-gantt-row-height) * 1px);--tx-gantt-chart-head-height: var(--tx-chart-gantt-header-row-height);font-size:var(--tx-chart-gantt-font-size);color:var(--tx-chart-gantt-label-color)}:host([data-styled]) .tx-gantt-chart__toolbar{gap:var(--tx-chart-gantt-toolbar-gap);margin-bottom:var(--tx-chart-gantt-toolbar-gap)}:host([data-styled]) .tx-gantt-chart__scroll{max-height:var(--tx-chart-gantt-max-height);border:1px solid var(--tx-chart-gantt-border-color);border-radius:var(--tx-chart-gantt-radius);background:var(--tx-chart-gantt-background)}:host([data-styled]) .tx-gantt-chart__head{background:var(--tx-chart-gantt-header-background);box-shadow:inset 0 -1px 0 var(--tx-chart-gantt-border-color)}:host([data-styled]) .tx-gantt-chart__corner,:host([data-styled]) .tx-gantt-chart__label{padding-inline:var(--tx-chart-gantt-label-padding-x);background:var(--tx-chart-gantt-background);box-shadow:inset -1px 0 0 var(--tx-chart-gantt-border-color)}:host([data-styled]) .tx-gantt-chart__label{box-shadow:inset -1px 0 0 var(--tx-chart-gantt-border-color),inset 0 0 0 var(--tx-gantt-chart-row-height) var(--tx-gantt-chart-tint);transition:box-shadow var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-gantt-chart__corner{color:var(--tx-chart-gantt-header-color);font-size:var(--tx-chart-gantt-header-font-size);background:var(--tx-chart-gantt-header-background)}:host([data-styled]) .tx-gantt-chart__tick{color:var(--tx-chart-gantt-header-color);font-size:var(--tx-chart-gantt-header-font-size);box-shadow:inset 1px 0 0 var(--tx-chart-grid-color)}:host([data-styled]) .tx-gantt-chart__tier--top .tx-gantt-chart__tick{color:var(--tx-chart-gantt-header-top-color);font-weight:var(--tx-chart-gantt-header-top-font-weight)}:host([data-styled]) .tx-gantt-chart__tick--weekend,:host([data-styled]) .tx-gantt-chart__column--weekend{background:var(--tx-chart-gantt-weekend-background)}:host([data-styled]) .tx-gantt-chart__column{box-shadow:inset 1px 0 0 var(--tx-chart-grid-color)}:host([data-styled]) .tx-gantt-chart__row{--tx-gantt-chart-tint: transparent;box-shadow:inset 0 0 0 var(--tx-gantt-chart-row-height) var(--tx-gantt-chart-tint);transition:box-shadow var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-gantt-chart__row:hover{--tx-gantt-chart-tint: var(--tx-chart-gantt-row-hover-background)}:host([data-styled]) .tx-gantt-chart__fold{transition:grid-template-rows var(--tx-chart-gantt-fold-duration) var(--tx-chart-gantt-fold-easing)}:host([data-styled]) .tx-gantt-chart__fold--collapsed>.tx-gantt-chart__fold-content{transition:visibility 0s linear var(--tx-chart-gantt-fold-duration)}:host([data-styled]) .tx-gantt-chart__row--group{background:var(--tx-chart-gantt-group-background);color:var(--tx-chart-gantt-group-color);font-weight:var(--tx-chart-gantt-group-font-weight)}:host([data-styled]) .tx-gantt-chart__row--group .tx-gantt-chart__label{background:var(--tx-chart-gantt-group-background)}:host([data-styled]) .tx-gantt-chart__toggle{border-radius:var(--tx-radius-sm)}:host([data-styled]) .tx-gantt-chart__toggle:focus-visible{outline:var(--tx-chart-focus-ring-width) solid var(--tx-chart-focus-ring-color);outline-offset:var(--tx-chart-focus-ring-offset)}:host([data-styled]) .tx-gantt-chart__chevron{transition:transform var(--tx-chart-gantt-fold-duration) var(--tx-chart-gantt-fold-easing)}:host([data-styled]) .tx-gantt-chart__count{color:var(--tx-chart-gantt-header-color);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-gantt-chart__bar{height:calc(var(--tx-gantt-chart-row-height) * var(--tx-chart-gantt-bar-height));border-radius:var(--tx-chart-gantt-bar-radius);background:color-mix(in srgb,var(--tx-gantt-chart-color) var(--tx-chart-gantt-track-strength),var(--tx-chart-gantt-track-base));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tx-gantt-chart-color) var(--tx-chart-gantt-bar-border-strength),transparent);transition:left var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),filter var(--tx-chart-motion-hover-duration) ease}:host([data-styled]) .tx-gantt-chart__bar:not(:has(.tx-gantt-chart__progress)){background:var(--tx-gantt-chart-color)}:host([data-styled]) .tx-gantt-chart__bar:hover{filter:brightness(1.06)}:host([data-styled]) .tx-gantt-chart__progress{background:var(--tx-gantt-chart-color)}:host([data-styled]) .tx-gantt-chart__bar.tx-gantt-chart__bar--inside{background:color-mix(in srgb,var(--tx-gantt-chart-color) var(--tx-chart-gantt-inside-strength),var(--tx-chart-gantt-track-base));box-shadow:inset var(--tx-chart-gantt-inside-accent-width) 0 0 var(--tx-gantt-chart-color),inset 0 0 0 1px color-mix(in srgb,var(--tx-gantt-chart-color) var(--tx-chart-gantt-bar-border-strength),transparent)}:host([data-styled]) .tx-gantt-chart__bar--inside .tx-gantt-chart__bar-label{padding-inline-start:calc(var(--tx-chart-gantt-inside-accent-width) + 6px);color:var(--tx-chart-gantt-inside-label-color);font-weight:var(--tx-font-weight-medium)}:host([data-styled]) .tx-gantt-chart__scroll:focus-visible{outline:var(--tx-chart-focus-ring-width) solid var(--tx-chart-focus-ring-color);outline-offset:var(--tx-chart-focus-ring-offset)}:host([data-styled]) .tx-gantt-chart__bar-label--outside{padding-inline-start:var(--tx-chart-gantt-bar-label-gap);color:var(--tx-chart-gantt-bar-label-color);transition:left var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled]) .tx-gantt-chart__bar:focus-visible,:host([data-styled]) .tx-gantt-chart__milestone:focus-visible{outline:var(--tx-chart-focus-ring-width) solid var(--tx-chart-focus-ring-color);outline-offset:var(--tx-chart-focus-ring-offset)}:host([data-styled]) .tx-gantt-chart__milestone{translate:calc(var(--tx-chart-gantt-milestone-size) / -2) 0;transition:left var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled]) .tx-gantt-chart__diamond{width:var(--tx-chart-gantt-milestone-size);height:var(--tx-chart-gantt-milestone-size);border-radius:var(--tx-chart-gantt-milestone-radius);background:var(--tx-gantt-chart-color, var(--tx-chart-gantt-milestone-color))}:host([data-styled]) .tx-gantt-chart__summary{height:var(--tx-chart-gantt-summary-height);border-radius:var(--tx-radius-full);background:var(--tx-chart-gantt-summary-color);opacity:1;transition:left var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing),width var(--tx-chart-motion-update-duration) var(--tx-chart-motion-easing)}:host([data-styled]) .tx-gantt-chart__today{width:var(--tx-chart-gantt-today-width);margin-left:calc(var(--tx-chart-gantt-today-width) / -2);background:var(--tx-chart-gantt-today-color)}:host([data-styled]) .tx-gantt-chart__empty{color:var(--tx-chart-gantt-header-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-gantt-chart__bar,:host([data-styled]) .tx-gantt-chart__milestone,:host([data-styled]) .tx-gantt-chart__summary,:host([data-styled]) .tx-gantt-chart__bar-label--outside,:host([data-styled]) .tx-gantt-chart__chevron,:host([data-styled]) .tx-gantt-chart__row,:host([data-styled]) .tx-gantt-chart__label,:host([data-styled]) .tx-gantt-chart__fold,:host([data-styled]) .tx-gantt-chart__fold--collapsed>.tx-gantt-chart__fold-content{transition:none}}\n"]
788
797
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-charts-gantt.mjs","names":[],"sources":["../../../../packages/charts/gantt/src/gantt-layout.ts","../../../../packages/charts/gantt/src/gantt-chart.component.ts","../../../../packages/charts/gantt/src/gantt-chart.component.html"],"sourcesContent":["import { dateFormat, seriesColor, toTime } from '@tectra-ng/charts/core';\nimport { TxGanttDate, TxGanttFold, TxGanttLayout, TxGanttRow, TxGanttSpan, TxGanttTask, TxGanttTick, TxGanttZoom } from './gantt-chart.types';\n\nexport const TX_GANTT_DAY = 86_400_000;\n\nexport const TX_GANTT_DAY_WIDTH: Record<TxGanttZoom, number> = { day: 40, week: 16, month: 5, quarter: 2 };\n\nconst DATE_ONLY = /^\\d{4}-\\d{2}-\\d{2}$/;\n\nexport function startOfDay(time: number): number {\n const date = new Date(time);\n return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();\n}\n\nfunction addDays(time: number, days: number): number {\n const date = new Date(time);\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days).getTime();\n}\n\nfunction daysBetween(from: number, to: number): number {\n return Math.round((startOfDay(to) - startOfDay(from)) / TX_GANTT_DAY) + ((to - startOfDay(to)) - (from - startOfDay(from))) / TX_GANTT_DAY;\n}\n\nexport function ganttTime(value: TxGanttDate | null | undefined, inclusiveEnd = false): number | null {\n const time = toTime(value ?? null);\n if (time === null) return null;\n return inclusiveEnd && typeof value === 'string' && DATE_ONLY.test(value) ? addDays(time, 1) : time;\n}\n\nexport function ganttTaskRange(task: TxGanttTask): [number, number] | null {\n const start = ganttTime(task.start);\n if (start === null) return null;\n if (task.milestone) return [start, start];\n const end = ganttTime(task.end ?? null, true) ?? addDays(startOfDay(start), 1);\n return [start, Math.max(start, end)];\n}\n\nexport function ganttRange(tasks: readonly TxGanttTask[], padding: number, from?: TxGanttDate | null, to?: TxGanttDate | null): [number, number] {\n const ranges = tasks.map(ganttTaskRange).filter((range): range is [number, number] => range !== null);\n const min = ganttTime(from ?? null) ?? (ranges.length ? Math.min(...ranges.map((range) => range[0])) : startOfDay(Date.now()));\n const max = ganttTime(to ?? null, true) ?? (ranges.length ? Math.max(...ranges.map((range) => range[1])) : addDays(min, 30));\n const lastDay = startOfDay(max) === max ? max : addDays(startOfDay(max), 1);\n return [addDays(startOfDay(min), -padding), addDays(lastDay, padding)];\n}\n\nexport function ganttX(time: number, rangeStart: number, dayWidth: number): number {\n return daysBetween(rangeStart, time) * dayWidth;\n}\n\nexport function ganttTicks(range: [number, number], zoom: TxGanttZoom, intl: string): { top: TxGanttTick[]; bottom: TxGanttTick[] } {\n const width = TX_GANTT_DAY_WIDTH[zoom];\n const [start, end] = range;\n const cell = (from: number, to: number, label: string, key: string, weekend?: boolean): TxGanttTick => ({\n key,\n label,\n x: ganttX(from, start, width),\n width: ganttX(Math.min(to, end), start, width) - ganttX(from, start, width),\n ...(weekend === undefined ? {} : { weekend }),\n });\n const months = (format: Intl.DateTimeFormat) => {\n const cells: TxGanttTick[] = [];\n let cursor = new Date(new Date(start).getFullYear(), new Date(start).getMonth(), 1).getTime();\n while (cursor < end) {\n const date = new Date(cursor);\n const next = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime();\n cells.push(cell(Math.max(cursor, start), next, format.format(date), `m${cursor}`));\n cursor = next;\n }\n return cells;\n };\n const years = () => {\n const cells: TxGanttTick[] = [];\n let cursor = new Date(new Date(start).getFullYear(), 0, 1).getTime();\n while (cursor < end) {\n const next = new Date(new Date(cursor).getFullYear() + 1, 0, 1).getTime();\n cells.push(cell(Math.max(cursor, start), next, String(new Date(cursor).getFullYear()), `y${cursor}`));\n cursor = next;\n }\n return cells;\n };\n if (zoom === 'day') {\n const day = dateFormat(intl, { day: 'numeric' });\n const bottom: TxGanttTick[] = [];\n for (let cursor = start; cursor < end; cursor = addDays(cursor, 1)) {\n const weekday = new Date(cursor).getDay();\n bottom.push(cell(cursor, addDays(cursor, 1), day.format(cursor), `d${cursor}`, weekday === 0 || weekday === 6));\n }\n return { top: months(dateFormat(intl, { month: 'long', year: 'numeric' })), bottom };\n }\n if (zoom === 'week') {\n const day = dateFormat(intl, { day: 'numeric', month: 'short' });\n const bottom: TxGanttTick[] = [];\n let cursor = start;\n const first = new Date(start).getDay();\n const toMonday = (8 - (first || 7)) % 7;\n if (toMonday) {\n bottom.push(cell(cursor, addDays(cursor, toMonday), '', `w${cursor}`));\n cursor = addDays(cursor, toMonday);\n }\n for (; cursor < end; cursor = addDays(cursor, 7)) bottom.push(cell(cursor, addDays(cursor, 7), day.format(cursor), `w${cursor}`));\n return { top: months(dateFormat(intl, { month: 'long', year: 'numeric' })), bottom };\n }\n if (zoom === 'month') {\n return { top: years(), bottom: months(dateFormat(intl, { month: 'short' })) };\n }\n const bottom: TxGanttTick[] = [];\n let cursor = new Date(new Date(start).getFullYear(), Math.floor(new Date(start).getMonth() / 3) * 3, 1).getTime();\n while (cursor < end) {\n const date = new Date(cursor);\n const next = new Date(date.getFullYear(), date.getMonth() + 3, 1).getTime();\n bottom.push(cell(Math.max(cursor, start), next, `Q${Math.floor(date.getMonth() / 3) + 1}`, `q${cursor}`));\n cursor = next;\n }\n return { top: years(), bottom };\n}\n\nexport function ganttRows(\n tasks: readonly TxGanttTask[],\n layout: TxGanttLayout,\n collapsed: ReadonlySet<string>,\n rangeStart: number,\n dayWidth: number,\n minWidth: number,\n): TxGanttRow[] {\n const groups: string[] = [];\n tasks.forEach((task) => {\n if (task.group && !groups.includes(task.group)) groups.push(task.group);\n });\n const spanOf = (task: TxGanttTask, index: number): TxGanttSpan | null => {\n const range = ganttTaskRange(task);\n if (!range) return null;\n const x = ganttX(range[0], rangeStart, dayWidth);\n const width = task.milestone ? 0 : Math.max(minWidth, ganttX(range[1], rangeStart, dayWidth) - x);\n const groupIndex = task.group ? groups.indexOf(task.group) : 0;\n return { task, index, start: range[0], end: range[1], x, width, color: seriesColor(task.color, Math.max(0, groupIndex)) };\n };\n const spans = tasks.map(spanOf);\n const summary = (items: TxGanttSpan[]) => {\n if (!items.length) return null;\n const x = Math.min(...items.map((item) => item.x));\n return { x, width: Math.max(...items.map((item) => item.x + item.width)) - x };\n };\n const rows: TxGanttRow[] = [];\n const ungrouped = tasks.flatMap((task, index) => (!task.group && spans[index] ? [spans[index] as TxGanttSpan] : []));\n if (layout === 'timeline') {\n for (const group of groups) {\n const items = tasks.flatMap((task, index) => (task.group === group && spans[index] ? [spans[index] as TxGanttSpan] : []));\n rows.push({ key: `lane:${group}`, kind: 'task', label: group, group, spans: items, summary: null, collapsed: false, count: items.length });\n }\n ungrouped.forEach((span) => rows.push({ key: `task:${span.task.id}`, kind: 'task', label: span.task.label, group: null, spans: [span], summary: null, collapsed: false, count: 1 }));\n return rows;\n }\n ungrouped.forEach((span) => rows.push({ key: `task:${span.task.id}`, kind: 'task', label: span.task.label, group: null, spans: [span], summary: null, collapsed: false, count: 1 }));\n for (const group of groups) {\n const items = tasks.flatMap((task, index) => (task.group === group && spans[index] ? [spans[index] as TxGanttSpan] : []));\n const closed = collapsed.has(group);\n rows.push({ key: `group:${group}`, kind: 'group', label: group, group, spans: [], summary: summary(items), collapsed: closed, count: items.length });\n items.forEach((span) => rows.push({ key: `task:${span.task.id}`, kind: 'task', label: span.task.label, group, spans: [span], summary: null, collapsed: closed, count: 1 }));\n }\n return rows;\n}\n\nexport function ganttFolds(rows: readonly TxGanttRow[]): TxGanttFold[] {\n const folds: TxGanttFold[] = [];\n for (const row of rows) {\n const last = folds[folds.length - 1];\n if (row.kind === 'group') folds.push({ key: row.key, head: row, rows: [], collapsed: row.collapsed });\n else if (last && (last.head ? last.head.group === row.group : true)) last.rows.push(row);\n else folds.push({ key: `rows:${row.key}`, head: null, rows: [row], collapsed: false });\n }\n return folds;\n}\n\nexport function ganttDays(start: number, end: number): number {\n return Math.max(0, Math.round(daysBetween(start, end)));\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { dateFormat, toggleKey } from '@tectra-ng/charts/core';\nimport { uniqueId } from '@tectra-ng/core/a11y';\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 { TxIcon } from '@tectra-ng/icons';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxButton } from '@tectra-ng/ui/button';\nimport { TxButtonGroup } from '@tectra-ng/ui/button-group';\nimport { TxSkeleton } from '@tectra-ng/ui/skeleton';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TX_GANTT_DAY, TX_GANTT_DAY_WIDTH, ganttDays, ganttFolds, ganttRange, ganttRows, ganttTicks, ganttTime, ganttX } from './gantt-layout';\nimport { TxGanttDate, TxGanttGroupToggle, TxGanttLayout, TxGanttPart, TxGanttSpan, TxGanttTask, TxGanttTaskEvent, TxGanttZoom } from './gantt-chart.types';\n\nconst ZOOMS: readonly TxGanttZoom[] = ['quarter', 'month', 'week', 'day'];\nconst MIN_BAR = 6;\nconst SKELETON_ROWS = 5;\nconst TODAY_AT = 0.3;\nconst REVEAL_FROM = 0.8;\n\nexport type TxGanttBarLabels = 'auto' | 'outside' | 'inside' | 'none';\n\n@Component({\n selector: 'tx-gantt-chart',\n imports: [TxButton, TxButtonGroup, TxTooltip, TxIcon, TxSkeleton],\n templateUrl: './gantt-chart.component.html',\n styleUrl: './gantt-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-gantt-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-zoom]': 'zoom()',\n '[attr.data-layout]': 'layout()',\n '[attr.aria-busy]': 'loading() || null',\n },\n})\nexport class TxGanttChart {\n private locale = inject(TxLocaleService);\n private injector = inject(Injector);\n readonly translations = injectTranslations();\n\n readonly tasks = input<readonly TxGanttTask[] | null | undefined>([]);\n readonly layout = input<TxGanttLayout>('tasks');\n readonly zoom = model<TxGanttZoom>('week');\n readonly start = input<TxGanttDate | null | undefined>(undefined);\n readonly end = input<TxGanttDate | null | undefined>(undefined);\n readonly padding = input(3);\n readonly today = input<TxGanttDate | null | undefined>(undefined);\n readonly barLabels = input<TxGanttBarLabels>('auto');\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly maxHeight = input('');\n readonly labelHeader = input('');\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<TxGanttPart, TxGanttChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly taskClick = output<TxGanttTaskEvent>();\n readonly groupToggle = output<TxGanttGroupToggle>();\n\n private readonly scroller = viewChild<ElementRef<HTMLElement>>('scroller');\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('ganttChart', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n readonly uid = uniqueId('tx-gantt');\n readonly zooms = ZOOMS;\n readonly collapsed = signal<ReadonlySet<string>>(new Set());\n readonly focused = signal<string | null>(null);\n private readonly now = Date.now();\n readonly skeletonRows = Array.from({ length: SKELETON_ROWS }, (_, index) => index);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.tasks() ?? []);\n readonly isEmpty = computed(() => !this.list().some((task) => ganttTime(task.start) !== null));\n readonly dayWidth = computed(() => TX_GANTT_DAY_WIDTH[this.zoom()]);\n readonly range = computed(() => ganttRange(this.list(), Math.max(0, this.padding()), this.start(), this.end()));\n readonly width = computed(() => Math.ceil(ganttX(this.range()[1], this.range()[0], this.dayWidth())));\n readonly ticks = computed(() => ganttTicks(this.range(), this.zoom(), this.intl()));\n readonly rows = computed(() => ganttRows(this.list(), this.layout(), this.collapsed(), this.range()[0], this.dayWidth(), MIN_BAR));\n readonly folds = computed(() => ganttFolds(this.rows()));\n readonly spans = computed(() => this.rows().flatMap((row) => row.spans));\n private readonly openRows = computed(() => this.rows().filter((row) => row.spans.length && !row.collapsed));\n private readonly openSpans = computed(() => this.openRows().flatMap((row) => row.spans));\n readonly labelsInside = computed(() => this.barLabels() === 'inside' || (this.barLabels() === 'auto' && this.layout() === 'timeline'));\n readonly labelsOutside = computed(() => this.barLabels() === 'outside' || (this.barLabels() === 'auto' && this.layout() === 'tasks'));\n readonly tabStop = computed(() => {\n const spans = this.openSpans();\n const focused = this.focused();\n return spans.some((span) => span.task.id === focused) ? focused : (spans[0]?.task.id ?? null);\n });\n\n readonly todayTime = computed(() => {\n const today = this.today();\n return today === null ? null : today === undefined ? this.now : ganttTime(today);\n });\n readonly todayX = computed(() => {\n const time = this.todayTime();\n const [from, to] = this.range();\n return time === null || time < from || time > to ? null : ganttX(time, from, this.dayWidth());\n });\n\n readonly zoomLabels = computed(() => {\n const t = this.translations();\n return { day: t.chartZoomDay, week: t.chartZoomWeek, month: t.chartZoomMonth, quarter: t.chartZoomQuarter } as Record<TxGanttZoom, string>;\n });\n\n readonly dayFormat = computed(() => dateFormat(this.intl(), { day: 'numeric', month: 'short', year: 'numeric' }));\n\n readonly text = computed(() => {\n const t = this.translations();\n const format = this.dayFormat();\n return new Map(\n this.spans().map((span) => {\n const lines = span.task.milestone\n ? [span.task.label, `${t.chartMilestone}: ${format.format(span.start)}`]\n : [\n span.task.label,\n `${format.format(span.start)} – ${format.format(span.end - 1)} · ${formatMessage(t.chartDays, { count: ganttDays(span.start, span.end) }, this.intl())}`,\n ...(span.task.progress !== null && span.task.progress !== undefined ? [`${t.chartProgress}: ${Math.round(span.task.progress)}%`] : []),\n ];\n return [span.task.id, lines] as const;\n }),\n );\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const [from, to] = this.range();\n const format = this.dayFormat();\n const text = `${t.chartGantt}, ${formatMessage(t.chartSummaryTasks, { count: this.spans().length }, this.intl())}, ${format.format(from)} – ${format.format(to - TX_GANTT_DAY)}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n constructor() {\n afterNextRender(() => this.revealToday());\n }\n\n tooltipFor(span: TxGanttSpan): string {\n return (this.text().get(span.task.id) ?? [span.task.label]).join('\\n');\n }\n\n ariaFor(span: TxGanttSpan): string {\n return (this.text().get(span.task.id) ?? [span.task.label]).join(', ');\n }\n\n progressOf(span: TxGanttSpan): number | null {\n const progress = span.task.progress;\n return progress === null || progress === undefined || !Number.isFinite(progress) ? null : Math.max(0, Math.min(100, progress));\n }\n\n setZoom(zoom: TxGanttZoom, anchor?: { time: number; offset: number }): void {\n if (zoom === this.zoom()) return;\n const element = this.scroller()?.nativeElement;\n const keep = anchor ?? (element ? this.centerAnchor(element) : undefined);\n this.zoom.set(zoom);\n if (!keep || !element) return;\n afterNextRender(\n () => {\n element.scrollLeft = Math.max(0, this.labelWidth(element) + ganttX(keep.time, this.range()[0], this.dayWidth()) - keep.offset);\n },\n { injector: this.injector },\n );\n }\n\n stepZoom(step: number, anchor?: { time: number; offset: number }): void {\n const index = Math.max(0, Math.min(ZOOMS.length - 1, ZOOMS.indexOf(this.zoom()) + step));\n this.setZoom(ZOOMS[index], anchor);\n }\n\n onWheel(event: WheelEvent): void {\n if (!(event.ctrlKey || event.metaKey) || !event.deltaY) return;\n event.preventDefault();\n const element = this.scroller()?.nativeElement;\n if (!element) return;\n const offset = event.clientX - element.getBoundingClientRect().left;\n const x = element.scrollLeft + offset - this.labelWidth(element);\n this.stepZoom(event.deltaY < 0 ? 1 : -1, { time: this.range()[0] + (x / this.dayWidth()) * TX_GANTT_DAY, offset });\n }\n\n scrollToToday(): void {\n const element = this.scroller()?.nativeElement;\n const x = this.todayX();\n if (!element || x === null) return;\n const view = element.clientWidth - this.labelWidth(element);\n element.scrollTo({ left: Math.max(0, x - view * TODAY_AT), behavior: this.reducedMotion() ? 'auto' : 'smooth' });\n }\n\n onToggle(group: string): void {\n this.collapsed.update((groups) => toggleKey(groups, group));\n this.groupToggle.emit({ group, collapsed: this.collapsed().has(group) });\n }\n\n onBarClick(span: TxGanttSpan): void {\n this.focused.set(span.task.id);\n this.taskClick.emit({ task: span.task, start: new Date(span.start), end: new Date(span.end) });\n }\n\n onBarFocus(span: TxGanttSpan, element: HTMLElement): void {\n this.focused.set(span.task.id);\n this.reveal(element);\n }\n\n onBarKeydown(event: KeyboardEvent, span: TxGanttSpan): void {\n if (event.key === '+' || event.key === '=') {\n event.preventDefault();\n this.stepZoom(1);\n return;\n }\n if (event.key === '-' || event.key === '_') {\n event.preventDefault();\n this.stepZoom(-1);\n return;\n }\n const spans = this.openSpans();\n const index = spans.indexOf(span);\n const rows = this.openRows();\n const row = rows.find((item) => item.spans.includes(span));\n let next = -1;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n const at = rows.indexOf(row as (typeof rows)[number]) + (event.key === 'ArrowDown' ? 1 : -1);\n const target = rows[Math.max(0, Math.min(rows.length - 1, at))];\n next = target ? spans.indexOf(target.spans.reduce((best, item) => (Math.abs(item.x - span.x) < Math.abs(best.x - span.x) ? item : best))) : -1;\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n next = Math.max(0, Math.min(spans.length - 1, index + (event.key === 'ArrowRight' ? 1 : -1)));\n } else if (event.key === 'Home') {\n next = 0;\n } else if (event.key === 'End') {\n next = spans.length - 1;\n } else {\n return;\n }\n event.preventDefault();\n const target = spans[next];\n if (!target) return;\n this.focused.set(target.task.id);\n afterNextRender(() => this.scroller()?.nativeElement.querySelector<HTMLElement>(`[data-task=\"${CSS.escape(target.task.id)}\"]`)?.focus(), { injector: this.injector });\n }\n\n private reveal(element: HTMLElement): void {\n const scroller = this.scroller()?.nativeElement;\n if (!scroller) return;\n const box = scroller.getBoundingClientRect();\n const rect = element.getBoundingClientRect();\n const left = box.left + this.labelWidth(scroller);\n const behavior: ScrollBehavior = this.reducedMotion() ? 'auto' : 'smooth';\n if (rect.left < left) scroller.scrollBy({ left: rect.left - left - 16, behavior });\n else if (rect.right > box.right) scroller.scrollBy({ left: Math.min(rect.right - box.right + 16, rect.left - left - 16), behavior });\n }\n\n private revealToday(): void {\n const element = this.scroller()?.nativeElement;\n const x = this.todayX();\n if (!element || x === null) return;\n const view = element.clientWidth - this.labelWidth(element);\n if (x > view * REVEAL_FROM) element.scrollLeft = Math.max(0, x - view * TODAY_AT);\n }\n\n private centerAnchor(element: HTMLElement): { time: number; offset: number } {\n const label = this.labelWidth(element);\n const offset = label + (element.clientWidth - label) / 2;\n return { time: this.range()[0] + ((element.scrollLeft + offset - label) / this.dayWidth()) * TX_GANTT_DAY, offset };\n }\n\n private labelWidth(element: HTMLElement): number {\n return element.querySelector<HTMLElement>('.tx-gantt-chart__corner')?.offsetWidth ?? 0;\n }\n\n private reducedMotion(): boolean {\n return this.scroller()?.nativeElement.ownerDocument.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;\n }\n\n}\n","@let parts = passThrough();\n@let t = translations();\n@if (toolbar()) {\n <div class=\"tx-gantt-chart__toolbar\" [class]=\"parts.toolbar?.class\" [style]=\"parts.toolbar?.style\">\n <tx-button-group role=\"group\" [attr.aria-label]=\"t.zoomIn + ' / ' + t.zoomOut\">\n @for (level of zooms; track level) {\n <button\n txButton\n type=\"button\"\n size=\"small\"\n [variant]=\"zoom() === level ? undefined : 'outlined'\"\n [severity]=\"zoom() === level ? 'primary' : 'secondary'\"\n [label]=\"zoomLabels()[level]\"\n [attr.aria-pressed]=\"zoom() === level\"\n (click)=\"setZoom(level)\"\n ></button>\n }\n </tx-button-group>\n @if (todayX() !== null) {\n <button txButton type=\"button\" size=\"small\" variant=\"text\" severity=\"secondary\" icon=\"calendar\" [label]=\"t.today\" (click)=\"scrollToToday()\"></button>\n }\n </div>\n}\n<div\n #scroller\n class=\"tx-gantt-chart__scroll\"\n [class]=\"parts.scroll?.class\"\n [style]=\"parts.scroll?.style\"\n [style.max-height]=\"maxHeight() || null\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"summary()\"\n [attr.aria-describedby]=\"uid + '-hint'\"\n (wheel)=\"onWheel($event)\"\n>\n <div class=\"tx-gantt-chart__grid\" [style.--tx-gantt-chart-width.px]=\"width()\">\n <div class=\"tx-gantt-chart__head\" [class]=\"parts.head?.class\" [style]=\"parts.head?.style\">\n <div class=\"tx-gantt-chart__corner\" [class]=\"parts.corner?.class\" [style]=\"parts.corner?.style\">{{ labelHeader() || (layout() === 'timeline' ? t.chartTimeline : t.chartTask) }}</div>\n <div class=\"tx-gantt-chart__scale\" [class]=\"parts.scale?.class\" [style]=\"parts.scale?.style\" aria-hidden=\"true\">\n <div class=\"tx-gantt-chart__tier tx-gantt-chart__tier--top\">\n @for (tick of ticks().top; track tick.key) {\n <span class=\"tx-gantt-chart__tick\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\"><span class=\"tx-gantt-chart__tick-text\">{{ tick.label }}</span></span>\n }\n </div>\n <div class=\"tx-gantt-chart__tier\">\n @for (tick of ticks().bottom; track tick.key) {\n <span class=\"tx-gantt-chart__tick\" [class.tx-gantt-chart__tick--weekend]=\"tick.weekend\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\">{{ tick.label }}</span>\n }\n </div>\n </div>\n </div>\n\n @if (loading()) {\n @for (row of skeletonRows; track row) {\n <div class=\"tx-gantt-chart__row\">\n <div class=\"tx-gantt-chart__label\"><tx-skeleton width=\"70%\" height=\"0.75rem\" /></div>\n <div class=\"tx-gantt-chart__lane\"><tx-skeleton class=\"tx-gantt-chart__skeleton\" [style.margin-left.%]=\"row * 12\" width=\"30%\" height=\"0.9rem\" /></div>\n </div>\n }\n } @else if (isEmpty()) {\n <div class=\"tx-gantt-chart__empty\" role=\"status\" [class]=\"parts.empty?.class\" [style]=\"parts.empty?.style\">\n <tx-icon name=\"calendar\" aria-hidden=\"true\" />\n <span>{{ t.chartNoData }}</span>\n </div>\n } @else {\n <div class=\"tx-gantt-chart__body\">\n <div class=\"tx-gantt-chart__backdrop\" aria-hidden=\"true\">\n @for (tick of ticks().bottom; track tick.key) {\n <span class=\"tx-gantt-chart__column\" [class.tx-gantt-chart__column--weekend]=\"tick.weekend\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\"></span>\n }\n </div>\n @for (fold of folds(); track fold.key; let foldIndex = $index) {\n @if (fold.head; as head) {\n <div class=\"tx-gantt-chart__row tx-gantt-chart__row--group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <div class=\"tx-gantt-chart__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">\n <button\n type=\"button\"\n class=\"tx-gantt-chart__toggle\"\n [attr.aria-expanded]=\"!head.collapsed\"\n [attr.aria-controls]=\"uid + '-fold-' + foldIndex\"\n (click)=\"onToggle(head.group ?? head.label)\"\n >\n <tx-icon class=\"tx-gantt-chart__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n <span class=\"tx-gantt-chart__label-text\">{{ head.label }}</span>\n <span class=\"tx-gantt-chart__count\">{{ head.count }}</span>\n </button>\n </div>\n <div class=\"tx-gantt-chart__lane\" [class]=\"parts.lane?.class\" [style]=\"parts.lane?.style\">\n @if (head.summary; as summary) {\n <span class=\"tx-gantt-chart__summary\" aria-hidden=\"true\" [style.left.px]=\"summary.x\" [style.width.px]=\"summary.width\"></span>\n }\n </div>\n </div>\n }\n <div\n class=\"tx-gantt-chart__fold\"\n [class.tx-gantt-chart__fold--collapsed]=\"fold.collapsed\"\n [attr.id]=\"fold.head ? uid + '-fold-' + foldIndex : null\"\n [attr.inert]=\"fold.collapsed ? '' : null\"\n >\n <div class=\"tx-gantt-chart__fold-content\">\n @for (row of fold.rows; track row.key) {\n <div class=\"tx-gantt-chart__row\" [class]=\"parts.row?.class\" [style]=\"parts.row?.style\">\n <div class=\"tx-gantt-chart__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">\n <span class=\"tx-gantt-chart__label-text\" [attr.title]=\"row.label\">{{ row.label }}</span>\n </div>\n <div class=\"tx-gantt-chart__lane\" [class]=\"parts.lane?.class\" [style]=\"parts.lane?.style\">\n @for (span of row.spans; track span.task.id) {\n @if (span.task.milestone) {\n <button\n type=\"button\"\n class=\"tx-gantt-chart__milestone\"\n [class]=\"parts.milestone?.class\"\n [style]=\"parts.milestone?.style\"\n [attr.data-task]=\"span.task.id\"\n [style.left.px]=\"span.x\"\n [style.--tx-gantt-chart-color]=\"span.task.color ?? null\"\n [tabindex]=\"tabStop() === span.task.id ? 0 : -1\"\n [attr.aria-label]=\"ariaFor(span)\"\n [txTooltip]=\"tooltipFor(span)\"\n (click)=\"onBarClick(span)\"\n (focus)=\"onBarFocus(span, $any($event.target))\"\n (keydown)=\"onBarKeydown($event, span)\"\n >\n <span class=\"tx-gantt-chart__diamond\" aria-hidden=\"true\"></span>\n @if (labelsOutside()) {\n <span class=\"tx-gantt-chart__bar-label tx-gantt-chart__bar-label--outside\">{{ span.task.label }}</span>\n }\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"tx-gantt-chart__bar\"\n [class.tx-gantt-chart__bar--inside]=\"labelsInside()\"\n [class]=\"parts.bar?.class\"\n [style]=\"parts.bar?.style\"\n [attr.data-task]=\"span.task.id\"\n [style.left.px]=\"span.x\"\n [style.width.px]=\"span.width\"\n [style.--tx-gantt-chart-color]=\"span.color\"\n [style.--tx-gantt-chart-progress]=\"progressOf(span) === null ? null : progressOf(span) + '%'\"\n [tabindex]=\"tabStop() === span.task.id ? 0 : -1\"\n [attr.aria-label]=\"ariaFor(span)\"\n [txTooltip]=\"tooltipFor(span)\"\n (click)=\"onBarClick(span)\"\n (focus)=\"onBarFocus(span, $any($event.target))\"\n (keydown)=\"onBarKeydown($event, span)\"\n >\n @if (progressOf(span) !== null) {\n <span class=\"tx-gantt-chart__progress\" aria-hidden=\"true\"></span>\n }\n @if (labelsInside()) {\n <span class=\"tx-gantt-chart__bar-label\">{{ span.task.label }}</span>\n }\n </button>\n @if (labelsOutside()) {\n <span class=\"tx-gantt-chart__bar-label tx-gantt-chart__bar-label--outside\" aria-hidden=\"true\" [style.left.px]=\"span.x + span.width\">{{ span.task.label }}</span>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n @let todayAt = todayX();\n @if (todayAt !== null) {\n <span class=\"tx-gantt-chart__today\" [class]=\"parts.today?.class\" [style]=\"parts.today?.style\" aria-hidden=\"true\" [style.left]=\"'calc(var(--tx-gantt-chart-label-width) + ' + todayAt + 'px)'\"></span>\n }\n </div>\n }\n </div>\n</div>\n<span class=\"cdk-visually-hidden\" [id]=\"uid + '-hint'\">{{ t.chartGanttHint }}</span>\n"],"mappings":";;;;;;;;;;;;;AAGA,MAAa,eAAe;AAE5B,MAAa,qBAAkD;CAAE,KAAK;CAAI,MAAM;CAAI,OAAO;CAAG,SAAS;AAAC;AAExG,MAAM,YAAY;AAElB,SAAgB,WAAW,MAAY;CACrC,MAAM,OAAO,IAAI,KAAK,IAAI;CAC1B,OAAO,IAAI,KAAK,KAAK,YAAW,GAAI,KAAK,SAAQ,GAAI,KAAK,QAAO,CAAE,CAAC,CAAC,QAAO;AAC9E;AAEA,SAAS,QAAQ,MAAc,MAAY;CACzC,MAAM,OAAO,IAAI,KAAK,IAAI;CAC1B,OAAO,IAAI,KAAK,KAAK,YAAW,GAAI,KA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AAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAU,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-charts-gantt.mjs","names":[],"sources":["../../../../packages/charts/gantt/src/gantt-layout.ts","../../../../packages/charts/gantt/src/gantt.icons.ts","../../../../packages/charts/gantt/src/gantt.theme.ts","../../../../packages/charts/gantt/src/gantt-chart.component.ts","../../../../packages/charts/gantt/src/gantt-chart.component.html"],"sourcesContent":["import { dateFormat, seriesColor, toTime } from '@tectra-ng/charts/core';\nimport { TxGanttDate, TxGanttFold, TxGanttLayout, TxGanttRow, TxGanttSpan, TxGanttTask, TxGanttTick, TxGanttZoom } from './gantt-chart.types';\n\nexport const TX_GANTT_DAY = 86_400_000;\n\nexport const TX_GANTT_DAY_WIDTH: Record<TxGanttZoom, number> = { day: 40, week: 16, month: 5, quarter: 2 };\n\nconst DATE_ONLY = /^\\d{4}-\\d{2}-\\d{2}$/;\n\nexport function startOfDay(time: number): number {\n const date = new Date(time);\n return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();\n}\n\nfunction addDays(time: number, days: number): number {\n const date = new Date(time);\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days).getTime();\n}\n\nfunction daysBetween(from: number, to: number): number {\n return Math.round((startOfDay(to) - startOfDay(from)) / TX_GANTT_DAY) + ((to - startOfDay(to)) - (from - startOfDay(from))) / TX_GANTT_DAY;\n}\n\nexport function ganttTime(value: TxGanttDate | null | undefined, inclusiveEnd = false): number | null {\n const time = toTime(value ?? null);\n if (time === null) return null;\n return inclusiveEnd && typeof value === 'string' && DATE_ONLY.test(value) ? addDays(time, 1) : time;\n}\n\nexport function ganttTaskRange(task: TxGanttTask): [number, number] | null {\n const start = ganttTime(task.start);\n if (start === null) return null;\n if (task.milestone) return [start, start];\n const end = ganttTime(task.end ?? null, true) ?? addDays(startOfDay(start), 1);\n return [start, Math.max(start, end)];\n}\n\nexport function ganttRange(tasks: readonly TxGanttTask[], padding: number, from?: TxGanttDate | null, to?: TxGanttDate | null): [number, number] {\n const ranges = tasks.map(ganttTaskRange).filter((range): range is [number, number] => range !== null);\n const min = ganttTime(from ?? null) ?? (ranges.length ? Math.min(...ranges.map((range) => range[0])) : startOfDay(Date.now()));\n const max = ganttTime(to ?? null, true) ?? (ranges.length ? Math.max(...ranges.map((range) => range[1])) : addDays(min, 30));\n const lastDay = startOfDay(max) === max ? max : addDays(startOfDay(max), 1);\n return [addDays(startOfDay(min), -padding), addDays(lastDay, padding)];\n}\n\nexport function ganttX(time: number, rangeStart: number, dayWidth: number): number {\n return daysBetween(rangeStart, time) * dayWidth;\n}\n\nexport function ganttTicks(range: [number, number], zoom: TxGanttZoom, intl: string): { top: TxGanttTick[]; bottom: TxGanttTick[] } {\n const width = TX_GANTT_DAY_WIDTH[zoom];\n const [start, end] = range;\n const cell = (from: number, to: number, label: string, key: string, weekend?: boolean): TxGanttTick => ({\n key,\n label,\n x: ganttX(from, start, width),\n width: ganttX(Math.min(to, end), start, width) - ganttX(from, start, width),\n ...(weekend === undefined ? {} : { weekend }),\n });\n const months = (format: Intl.DateTimeFormat) => {\n const cells: TxGanttTick[] = [];\n let cursor = new Date(new Date(start).getFullYear(), new Date(start).getMonth(), 1).getTime();\n while (cursor < end) {\n const date = new Date(cursor);\n const next = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime();\n cells.push(cell(Math.max(cursor, start), next, format.format(date), `m${cursor}`));\n cursor = next;\n }\n return cells;\n };\n const years = () => {\n const cells: TxGanttTick[] = [];\n let cursor = new Date(new Date(start).getFullYear(), 0, 1).getTime();\n while (cursor < end) {\n const next = new Date(new Date(cursor).getFullYear() + 1, 0, 1).getTime();\n cells.push(cell(Math.max(cursor, start), next, String(new Date(cursor).getFullYear()), `y${cursor}`));\n cursor = next;\n }\n return cells;\n };\n if (zoom === 'day') {\n const day = dateFormat(intl, { day: 'numeric' });\n const bottom: TxGanttTick[] = [];\n for (let cursor = start; cursor < end; cursor = addDays(cursor, 1)) {\n const weekday = new Date(cursor).getDay();\n bottom.push(cell(cursor, addDays(cursor, 1), day.format(cursor), `d${cursor}`, weekday === 0 || weekday === 6));\n }\n return { top: months(dateFormat(intl, { month: 'long', year: 'numeric' })), bottom };\n }\n if (zoom === 'week') {\n const day = dateFormat(intl, { day: 'numeric', month: 'short' });\n const bottom: TxGanttTick[] = [];\n let cursor = start;\n const first = new Date(start).getDay();\n const toMonday = (8 - (first || 7)) % 7;\n if (toMonday) {\n bottom.push(cell(cursor, addDays(cursor, toMonday), '', `w${cursor}`));\n cursor = addDays(cursor, toMonday);\n }\n for (; cursor < end; cursor = addDays(cursor, 7)) bottom.push(cell(cursor, addDays(cursor, 7), day.format(cursor), `w${cursor}`));\n return { top: months(dateFormat(intl, { month: 'long', year: 'numeric' })), bottom };\n }\n if (zoom === 'month') {\n return { top: years(), bottom: months(dateFormat(intl, { month: 'short' })) };\n }\n const bottom: TxGanttTick[] = [];\n let cursor = new Date(new Date(start).getFullYear(), Math.floor(new Date(start).getMonth() / 3) * 3, 1).getTime();\n while (cursor < end) {\n const date = new Date(cursor);\n const next = new Date(date.getFullYear(), date.getMonth() + 3, 1).getTime();\n bottom.push(cell(Math.max(cursor, start), next, `Q${Math.floor(date.getMonth() / 3) + 1}`, `q${cursor}`));\n cursor = next;\n }\n return { top: years(), bottom };\n}\n\nexport function ganttRows(\n tasks: readonly TxGanttTask[],\n layout: TxGanttLayout,\n collapsed: ReadonlySet<string>,\n rangeStart: number,\n dayWidth: number,\n minWidth: number,\n): TxGanttRow[] {\n const groups: string[] = [];\n tasks.forEach((task) => {\n if (task.group && !groups.includes(task.group)) groups.push(task.group);\n });\n const spanOf = (task: TxGanttTask, index: number): TxGanttSpan | null => {\n const range = ganttTaskRange(task);\n if (!range) return null;\n const x = ganttX(range[0], rangeStart, dayWidth);\n const width = task.milestone ? 0 : Math.max(minWidth, ganttX(range[1], rangeStart, dayWidth) - x);\n const groupIndex = task.group ? groups.indexOf(task.group) : 0;\n return { task, index, start: range[0], end: range[1], x, width, color: seriesColor(task.color, Math.max(0, groupIndex)) };\n };\n const spans = tasks.map(spanOf);\n const summary = (items: TxGanttSpan[]) => {\n if (!items.length) return null;\n const x = Math.min(...items.map((item) => item.x));\n return { x, width: Math.max(...items.map((item) => item.x + item.width)) - x };\n };\n const rows: TxGanttRow[] = [];\n const ungrouped = tasks.flatMap((task, index) => (!task.group && spans[index] ? [spans[index] as TxGanttSpan] : []));\n if (layout === 'timeline') {\n for (const group of groups) {\n const items = tasks.flatMap((task, index) => (task.group === group && spans[index] ? [spans[index] as TxGanttSpan] : []));\n rows.push({ key: `lane:${group}`, kind: 'task', label: group, group, spans: items, summary: null, collapsed: false, count: items.length });\n }\n ungrouped.forEach((span) => rows.push({ key: `task:${span.task.id}`, kind: 'task', label: span.task.label, group: null, spans: [span], summary: null, collapsed: false, count: 1 }));\n return rows;\n }\n ungrouped.forEach((span) => rows.push({ key: `task:${span.task.id}`, kind: 'task', label: span.task.label, group: null, spans: [span], summary: null, collapsed: false, count: 1 }));\n for (const group of groups) {\n const items = tasks.flatMap((task, index) => (task.group === group && spans[index] ? [spans[index] as TxGanttSpan] : []));\n const closed = collapsed.has(group);\n rows.push({ key: `group:${group}`, kind: 'group', label: group, group, spans: [], summary: summary(items), collapsed: closed, count: items.length });\n items.forEach((span) => rows.push({ key: `task:${span.task.id}`, kind: 'task', label: span.task.label, group, spans: [span], summary: null, collapsed: closed, count: 1 }));\n }\n return rows;\n}\n\nexport function ganttFolds(rows: readonly TxGanttRow[]): TxGanttFold[] {\n const folds: TxGanttFold[] = [];\n for (const row of rows) {\n const last = folds[folds.length - 1];\n if (row.kind === 'group') folds.push({ key: row.key, head: row, rows: [], collapsed: row.collapsed });\n else if (last && (last.head ? last.head.group === row.group : true)) last.rows.push(row);\n else folds.push({ key: `rows:${row.key}`, head: null, rows: [row], collapsed: false });\n }\n return folds;\n}\n\nexport function ganttDays(start: number, end: number): number {\n return Math.max(0, Math.round(daysBetween(start, end)));\n}\n","import { TxIconSet, txIconCalendar, txIconChevronDown, txIconText } from '@tectra-ng/icons';\n\nexport const GANTT_ICON_DEFAULTS: TxIconSet = {\n calendar: txIconCalendar,\n 'chevron-down': txIconChevronDown,\n text: txIconText,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const GANTT_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { dateFormat, toggleKey } from '@tectra-ng/charts/core';\nimport { uniqueId } from '@tectra-ng/core/a11y';\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 { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxButton } from '@tectra-ng/ui/button';\nimport { TxButtonGroup } from '@tectra-ng/ui/button-group';\nimport { TxSkeleton } from '@tectra-ng/ui/skeleton';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TX_GANTT_DAY, TX_GANTT_DAY_WIDTH, ganttDays, ganttFolds, ganttRange, ganttRows, ganttTicks, ganttTime, ganttX } from './gantt-layout';\nimport { TxGanttDate, TxGanttGroupToggle, TxGanttLayout, TxGanttPart, TxGanttSpan, TxGanttTask, TxGanttTaskEvent, TxGanttZoom } from './gantt-chart.types';\nimport { GANTT_ICON_DEFAULTS } from './gantt.icons';\nimport { GANTT_THEME } from './gantt.theme';\n\nconst ZOOMS: readonly TxGanttZoom[] = ['quarter', 'month', 'week', 'day'];\nconst MIN_BAR = 6;\nconst SKELETON_ROWS = 5;\nconst TODAY_AT = 0.3;\nconst REVEAL_FROM = 0.8;\n\nexport type TxGanttBarLabels = 'auto' | 'outside' | 'inside' | 'none';\n\n@Component({\n selector: 'tx-gantt-chart',\n imports: [TxButton, TxButtonGroup, TxTooltip, TxIcon, TxSkeleton],\n templateUrl: './gantt-chart.component.html',\n styleUrl: './gantt-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-gantt-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-zoom]': 'zoom()',\n '[attr.data-layout]': 'layout()',\n '[attr.aria-busy]': 'loading() || null',\n },\n viewProviders: [provideTxIconDefaults(GANTT_ICON_DEFAULTS)],\n})\nexport class TxGanttChart {\n private readonly ganttTheme = injectTokens(GANTT_THEME);\n\n private locale = inject(TxLocaleService);\n private injector = inject(Injector);\n readonly translations = injectTranslations();\n\n readonly tasks = input<readonly TxGanttTask[] | null | undefined>([]);\n readonly layout = input<TxGanttLayout>('tasks');\n readonly zoom = model<TxGanttZoom>('week');\n readonly start = input<TxGanttDate | null | undefined>(undefined);\n readonly end = input<TxGanttDate | null | undefined>(undefined);\n readonly padding = input(3);\n readonly today = input<TxGanttDate | null | undefined>(undefined);\n readonly barLabels = input<TxGanttBarLabels>('auto');\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly maxHeight = input('');\n readonly labelHeader = input('');\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<TxGanttPart, TxGanttChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly taskClick = output<TxGanttTaskEvent>();\n readonly groupToggle = output<TxGanttGroupToggle>();\n\n private readonly scroller = viewChild<ElementRef<HTMLElement>>('scroller');\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('ganttChart', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-chart'), ...this.passThrough().root?.style }));\n\n readonly uid = uniqueId('tx-gantt');\n readonly zooms = ZOOMS;\n readonly collapsed = signal<ReadonlySet<string>>(new Set());\n readonly focused = signal<string | null>(null);\n private readonly now = Date.now();\n readonly skeletonRows = Array.from({ length: SKELETON_ROWS }, (_, index) => index);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.tasks() ?? []);\n readonly isEmpty = computed(() => !this.list().some((task) => ganttTime(task.start) !== null));\n readonly dayWidth = computed(() => TX_GANTT_DAY_WIDTH[this.zoom()]);\n readonly range = computed(() => ganttRange(this.list(), Math.max(0, this.padding()), this.start(), this.end()));\n readonly width = computed(() => Math.ceil(ganttX(this.range()[1], this.range()[0], this.dayWidth())));\n readonly ticks = computed(() => ganttTicks(this.range(), this.zoom(), this.intl()));\n readonly rows = computed(() => ganttRows(this.list(), this.layout(), this.collapsed(), this.range()[0], this.dayWidth(), MIN_BAR));\n readonly folds = computed(() => ganttFolds(this.rows()));\n readonly spans = computed(() => this.rows().flatMap((row) => row.spans));\n private readonly openRows = computed(() => this.rows().filter((row) => row.spans.length && !row.collapsed));\n private readonly openSpans = computed(() => this.openRows().flatMap((row) => row.spans));\n readonly labelsInside = computed(() => this.barLabels() === 'inside' || (this.barLabels() === 'auto' && this.layout() === 'timeline'));\n readonly labelsOutside = computed(() => this.barLabels() === 'outside' || (this.barLabels() === 'auto' && this.layout() === 'tasks'));\n readonly tabStop = computed(() => {\n const spans = this.openSpans();\n const focused = this.focused();\n return spans.some((span) => span.task.id === focused) ? focused : (spans[0]?.task.id ?? null);\n });\n\n readonly todayTime = computed(() => {\n const today = this.today();\n return today === null ? null : today === undefined ? this.now : ganttTime(today);\n });\n readonly todayX = computed(() => {\n const time = this.todayTime();\n const [from, to] = this.range();\n return time === null || time < from || time > to ? null : ganttX(time, from, this.dayWidth());\n });\n\n readonly zoomLabels = computed(() => {\n const t = this.translations();\n return { day: t.chartZoomDay, week: t.chartZoomWeek, month: t.chartZoomMonth, quarter: t.chartZoomQuarter } as Record<TxGanttZoom, string>;\n });\n\n readonly dayFormat = computed(() => dateFormat(this.intl(), { day: 'numeric', month: 'short', year: 'numeric' }));\n\n readonly text = computed(() => {\n const t = this.translations();\n const format = this.dayFormat();\n return new Map(\n this.spans().map((span) => {\n const lines = span.task.milestone\n ? [span.task.label, `${t.chartMilestone}: ${format.format(span.start)}`]\n : [\n span.task.label,\n `${format.format(span.start)} – ${format.format(span.end - 1)} · ${formatMessage(t.chartDays, { count: ganttDays(span.start, span.end) }, this.intl())}`,\n ...(span.task.progress !== null && span.task.progress !== undefined ? [`${t.chartProgress}: ${Math.round(span.task.progress)}%`] : []),\n ];\n return [span.task.id, lines] as const;\n }),\n );\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const [from, to] = this.range();\n const format = this.dayFormat();\n const text = `${t.chartGantt}, ${formatMessage(t.chartSummaryTasks, { count: this.spans().length }, this.intl())}, ${format.format(from)} – ${format.format(to - TX_GANTT_DAY)}`;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${text}` : text;\n });\n\n constructor() {\n afterNextRender(() => this.revealToday());\n }\n\n tooltipFor(span: TxGanttSpan): string {\n return (this.text().get(span.task.id) ?? [span.task.label]).join('\\n');\n }\n\n ariaFor(span: TxGanttSpan): string {\n return (this.text().get(span.task.id) ?? [span.task.label]).join(', ');\n }\n\n progressOf(span: TxGanttSpan): number | null {\n const progress = span.task.progress;\n return progress === null || progress === undefined || !Number.isFinite(progress) ? null : Math.max(0, Math.min(100, progress));\n }\n\n setZoom(zoom: TxGanttZoom, anchor?: { time: number; offset: number }): void {\n if (zoom === this.zoom()) return;\n const element = this.scroller()?.nativeElement;\n const keep = anchor ?? (element ? this.centerAnchor(element) : undefined);\n this.zoom.set(zoom);\n if (!keep || !element) return;\n afterNextRender(\n () => {\n element.scrollLeft = Math.max(0, this.labelWidth(element) + ganttX(keep.time, this.range()[0], this.dayWidth()) - keep.offset);\n },\n { injector: this.injector },\n );\n }\n\n stepZoom(step: number, anchor?: { time: number; offset: number }): void {\n const index = Math.max(0, Math.min(ZOOMS.length - 1, ZOOMS.indexOf(this.zoom()) + step));\n this.setZoom(ZOOMS[index], anchor);\n }\n\n onWheel(event: WheelEvent): void {\n if (!(event.ctrlKey || event.metaKey) || !event.deltaY) return;\n event.preventDefault();\n const element = this.scroller()?.nativeElement;\n if (!element) return;\n const offset = event.clientX - element.getBoundingClientRect().left;\n const x = element.scrollLeft + offset - this.labelWidth(element);\n this.stepZoom(event.deltaY < 0 ? 1 : -1, { time: this.range()[0] + (x / this.dayWidth()) * TX_GANTT_DAY, offset });\n }\n\n scrollToToday(): void {\n const element = this.scroller()?.nativeElement;\n const x = this.todayX();\n if (!element || x === null) return;\n const view = element.clientWidth - this.labelWidth(element);\n element.scrollTo({ left: Math.max(0, x - view * TODAY_AT), behavior: this.reducedMotion() ? 'auto' : 'smooth' });\n }\n\n onToggle(group: string): void {\n this.collapsed.update((groups) => toggleKey(groups, group));\n this.groupToggle.emit({ group, collapsed: this.collapsed().has(group) });\n }\n\n onBarClick(span: TxGanttSpan): void {\n this.focused.set(span.task.id);\n this.taskClick.emit({ task: span.task, start: new Date(span.start), end: new Date(span.end) });\n }\n\n onBarFocus(span: TxGanttSpan, element: HTMLElement): void {\n this.focused.set(span.task.id);\n this.reveal(element);\n }\n\n onBarKeydown(event: KeyboardEvent, span: TxGanttSpan): void {\n if (event.key === '+' || event.key === '=') {\n event.preventDefault();\n this.stepZoom(1);\n return;\n }\n if (event.key === '-' || event.key === '_') {\n event.preventDefault();\n this.stepZoom(-1);\n return;\n }\n const spans = this.openSpans();\n const index = spans.indexOf(span);\n const rows = this.openRows();\n const row = rows.find((item) => item.spans.includes(span));\n let next = -1;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n const at = rows.indexOf(row as (typeof rows)[number]) + (event.key === 'ArrowDown' ? 1 : -1);\n const target = rows[Math.max(0, Math.min(rows.length - 1, at))];\n next = target ? spans.indexOf(target.spans.reduce((best, item) => (Math.abs(item.x - span.x) < Math.abs(best.x - span.x) ? item : best))) : -1;\n } else if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n next = Math.max(0, Math.min(spans.length - 1, index + (event.key === 'ArrowRight' ? 1 : -1)));\n } else if (event.key === 'Home') {\n next = 0;\n } else if (event.key === 'End') {\n next = spans.length - 1;\n } else {\n return;\n }\n event.preventDefault();\n const target = spans[next];\n if (!target) return;\n this.focused.set(target.task.id);\n afterNextRender(() => this.scroller()?.nativeElement.querySelector<HTMLElement>(`[data-task=\"${CSS.escape(target.task.id)}\"]`)?.focus(), { injector: this.injector });\n }\n\n private reveal(element: HTMLElement): void {\n const scroller = this.scroller()?.nativeElement;\n if (!scroller) return;\n const box = scroller.getBoundingClientRect();\n const rect = element.getBoundingClientRect();\n const left = box.left + this.labelWidth(scroller);\n const behavior: ScrollBehavior = this.reducedMotion() ? 'auto' : 'smooth';\n if (rect.left < left) scroller.scrollBy({ left: rect.left - left - 16, behavior });\n else if (rect.right > box.right) scroller.scrollBy({ left: Math.min(rect.right - box.right + 16, rect.left - left - 16), behavior });\n }\n\n private revealToday(): void {\n const element = this.scroller()?.nativeElement;\n const x = this.todayX();\n if (!element || x === null) return;\n const view = element.clientWidth - this.labelWidth(element);\n if (x > view * REVEAL_FROM) element.scrollLeft = Math.max(0, x - view * TODAY_AT);\n }\n\n private centerAnchor(element: HTMLElement): { time: number; offset: number } {\n const label = this.labelWidth(element);\n const offset = label + (element.clientWidth - label) / 2;\n return { time: this.range()[0] + ((element.scrollLeft + offset - label) / this.dayWidth()) * TX_GANTT_DAY, offset };\n }\n\n private labelWidth(element: HTMLElement): number {\n return element.querySelector<HTMLElement>('.tx-gantt-chart__corner')?.offsetWidth ?? 0;\n }\n\n private reducedMotion(): boolean {\n return this.scroller()?.nativeElement.ownerDocument.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;\n }\n\n}\n","@let parts = passThrough();\n@let t = translations();\n@if (toolbar()) {\n <div class=\"tx-gantt-chart__toolbar\" [class]=\"parts.toolbar?.class\" [style]=\"parts.toolbar?.style\">\n <tx-button-group role=\"group\" [attr.aria-label]=\"t.zoomIn + ' / ' + t.zoomOut\">\n @for (level of zooms; track level) {\n <button\n txButton\n type=\"button\"\n size=\"small\"\n [variant]=\"zoom() === level ? undefined : 'outlined'\"\n [severity]=\"zoom() === level ? 'primary' : 'secondary'\"\n [label]=\"zoomLabels()[level]\"\n [attr.aria-pressed]=\"zoom() === level\"\n (click)=\"setZoom(level)\"\n ></button>\n }\n </tx-button-group>\n @if (todayX() !== null) {\n <button txButton type=\"button\" size=\"small\" variant=\"text\" severity=\"secondary\" icon=\"calendar\" [label]=\"t.today\" (click)=\"scrollToToday()\"></button>\n }\n </div>\n}\n<div\n #scroller\n class=\"tx-gantt-chart__scroll\"\n [class]=\"parts.scroll?.class\"\n [style]=\"parts.scroll?.style\"\n [style.max-height]=\"maxHeight() || null\"\n tabindex=\"0\"\n role=\"region\"\n [attr.aria-label]=\"summary()\"\n [attr.aria-describedby]=\"uid + '-hint'\"\n (wheel)=\"onWheel($event)\"\n>\n <div class=\"tx-gantt-chart__grid\" [style.--tx-gantt-chart-width.px]=\"width()\">\n <div class=\"tx-gantt-chart__head\" [class]=\"parts.head?.class\" [style]=\"parts.head?.style\">\n <div class=\"tx-gantt-chart__corner\" [class]=\"parts.corner?.class\" [style]=\"parts.corner?.style\">{{ labelHeader() || (layout() === 'timeline' ? t.chartTimeline : t.chartTask) }}</div>\n <div class=\"tx-gantt-chart__scale\" [class]=\"parts.scale?.class\" [style]=\"parts.scale?.style\" aria-hidden=\"true\">\n <div class=\"tx-gantt-chart__tier tx-gantt-chart__tier--top\">\n @for (tick of ticks().top; track tick.key) {\n <span class=\"tx-gantt-chart__tick\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\"><span class=\"tx-gantt-chart__tick-text\">{{ tick.label }}</span></span>\n }\n </div>\n <div class=\"tx-gantt-chart__tier\">\n @for (tick of ticks().bottom; track tick.key) {\n <span class=\"tx-gantt-chart__tick\" [class.tx-gantt-chart__tick--weekend]=\"tick.weekend\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\">{{ tick.label }}</span>\n }\n </div>\n </div>\n </div>\n\n @if (loading()) {\n @for (row of skeletonRows; track row) {\n <div class=\"tx-gantt-chart__row\">\n <div class=\"tx-gantt-chart__label\"><tx-skeleton width=\"70%\" height=\"0.75rem\" /></div>\n <div class=\"tx-gantt-chart__lane\"><tx-skeleton class=\"tx-gantt-chart__skeleton\" [style.margin-left.%]=\"row * 12\" width=\"30%\" height=\"0.9rem\" /></div>\n </div>\n }\n } @else if (isEmpty()) {\n <div class=\"tx-gantt-chart__empty\" role=\"status\" [class]=\"parts.empty?.class\" [style]=\"parts.empty?.style\">\n <tx-icon name=\"calendar\" aria-hidden=\"true\" />\n <span>{{ t.chartNoData }}</span>\n </div>\n } @else {\n <div class=\"tx-gantt-chart__body\">\n <div class=\"tx-gantt-chart__backdrop\" aria-hidden=\"true\">\n @for (tick of ticks().bottom; track tick.key) {\n <span class=\"tx-gantt-chart__column\" [class.tx-gantt-chart__column--weekend]=\"tick.weekend\" [style.left.px]=\"tick.x\" [style.width.px]=\"tick.width\"></span>\n }\n </div>\n @for (fold of folds(); track fold.key; let foldIndex = $index) {\n @if (fold.head; as head) {\n <div class=\"tx-gantt-chart__row tx-gantt-chart__row--group\" [class]=\"parts.group?.class\" [style]=\"parts.group?.style\">\n <div class=\"tx-gantt-chart__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">\n <button\n type=\"button\"\n class=\"tx-gantt-chart__toggle\"\n [attr.aria-expanded]=\"!head.collapsed\"\n [attr.aria-controls]=\"uid + '-fold-' + foldIndex\"\n (click)=\"onToggle(head.group ?? head.label)\"\n >\n <tx-icon class=\"tx-gantt-chart__chevron\" name=\"chevron-down\" aria-hidden=\"true\" />\n <span class=\"tx-gantt-chart__label-text\">{{ head.label }}</span>\n <span class=\"tx-gantt-chart__count\">{{ head.count }}</span>\n </button>\n </div>\n <div class=\"tx-gantt-chart__lane\" [class]=\"parts.lane?.class\" [style]=\"parts.lane?.style\">\n @if (head.summary; as summary) {\n <span class=\"tx-gantt-chart__summary\" aria-hidden=\"true\" [style.left.px]=\"summary.x\" [style.width.px]=\"summary.width\"></span>\n }\n </div>\n </div>\n }\n <div\n class=\"tx-gantt-chart__fold\"\n [class.tx-gantt-chart__fold--collapsed]=\"fold.collapsed\"\n [attr.id]=\"fold.head ? uid + '-fold-' + foldIndex : null\"\n [attr.inert]=\"fold.collapsed ? '' : null\"\n >\n <div class=\"tx-gantt-chart__fold-content\">\n @for (row of fold.rows; track row.key) {\n <div class=\"tx-gantt-chart__row\" [class]=\"parts.row?.class\" [style]=\"parts.row?.style\">\n <div class=\"tx-gantt-chart__label\" [class]=\"parts.label?.class\" [style]=\"parts.label?.style\">\n <span class=\"tx-gantt-chart__label-text\" [attr.title]=\"row.label\">{{ row.label }}</span>\n </div>\n <div class=\"tx-gantt-chart__lane\" [class]=\"parts.lane?.class\" [style]=\"parts.lane?.style\">\n @for (span of row.spans; track span.task.id) {\n @if (span.task.milestone) {\n <button\n type=\"button\"\n class=\"tx-gantt-chart__milestone\"\n [class]=\"parts.milestone?.class\"\n [style]=\"parts.milestone?.style\"\n [attr.data-task]=\"span.task.id\"\n [style.left.px]=\"span.x\"\n [style.--tx-gantt-chart-color]=\"span.task.color ?? null\"\n [tabindex]=\"tabStop() === span.task.id ? 0 : -1\"\n [attr.aria-label]=\"ariaFor(span)\"\n [txTooltip]=\"tooltipFor(span)\"\n (click)=\"onBarClick(span)\"\n (focus)=\"onBarFocus(span, $any($event.target))\"\n (keydown)=\"onBarKeydown($event, span)\"\n >\n <span class=\"tx-gantt-chart__diamond\" aria-hidden=\"true\"></span>\n @if (labelsOutside()) {\n <span class=\"tx-gantt-chart__bar-label tx-gantt-chart__bar-label--outside\">{{ span.task.label }}</span>\n }\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"tx-gantt-chart__bar\"\n [class.tx-gantt-chart__bar--inside]=\"labelsInside()\"\n [class]=\"parts.bar?.class\"\n [style]=\"parts.bar?.style\"\n [attr.data-task]=\"span.task.id\"\n [style.left.px]=\"span.x\"\n [style.width.px]=\"span.width\"\n [style.--tx-gantt-chart-color]=\"span.color\"\n [style.--tx-gantt-chart-progress]=\"progressOf(span) === null ? null : progressOf(span) + '%'\"\n [tabindex]=\"tabStop() === span.task.id ? 0 : -1\"\n [attr.aria-label]=\"ariaFor(span)\"\n [txTooltip]=\"tooltipFor(span)\"\n (click)=\"onBarClick(span)\"\n (focus)=\"onBarFocus(span, $any($event.target))\"\n (keydown)=\"onBarKeydown($event, span)\"\n >\n @if (progressOf(span) !== null) {\n <span class=\"tx-gantt-chart__progress\" aria-hidden=\"true\"></span>\n }\n @if (labelsInside()) {\n <span class=\"tx-gantt-chart__bar-label\">{{ span.task.label }}</span>\n }\n </button>\n @if (labelsOutside()) {\n <span class=\"tx-gantt-chart__bar-label tx-gantt-chart__bar-label--outside\" aria-hidden=\"true\" [style.left.px]=\"span.x + span.width\">{{ span.task.label }}</span>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n @let todayAt = todayX();\n @if (todayAt !== null) {\n <span class=\"tx-gantt-chart__today\" [class]=\"parts.today?.class\" [style]=\"parts.today?.style\" aria-hidden=\"true\" [style.left]=\"'calc(var(--tx-gantt-chart-label-width) + ' + todayAt + 'px)'\"></span>\n }\n </div>\n }\n </div>\n</div>\n<span class=\"cdk-visually-hidden\" [id]=\"uid + '-hint'\">{{ t.chartGanttHint }}</span>\n"],"mappings":";;;;;;;;;;;;;AAGA,MAAa,eAAe;AAE5B,MAAa,qBAAkD;CAAE,KAAK;CAAI,MAAM;CAAI,OAAO;CAAG,SAAS;AAAC;AAExG,MAAM,YAAY;AAElB,SAAgB,WAAW,MAAY;CACrC,MAAM,OAAO,IAAI,KAAK,IAAI;CAC1B,OAAO,IAAI,KAAK,KAAK,YAAW,GAAI,KAAK,SAAQ,GAAI,KAAK,QAAO,CAAE,CAAC,CAAC,QAAO;AAC9E;AAEA,SAAS,QAAQ,MAAc,MAAY;CACzC,MAAM,OAAO,IAAI,KAAK,IAAI;CAC1B,OAAO,IAAI,KAAK,KAAK,YAAW,GAAI,KAAK,SAAQ,GAAI,KAAK,QAAO,IAAK,IAAI,CAAC,CAAC,QAAO;AACrF;AAEA,SAAS,YAAY,MAAc,IAAU;CAC3C,OAAO,KAAK,OAAO,WAAW,EAAE,IAAI,WAAW,IAAI,KAAK,YA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