@taiga-ui/addon-charts 4.52.0-canary.6ee9658 → 4.52.0-canary.811ffeb

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.
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { signal, ViewChildren, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
5
4
  import { tuiTypedFromEvent, tuiZonefree } from '@taiga-ui/cdk/observables';
6
5
  import { merge, map, ReplaySubject, timer, switchMap, startWith, tap } from 'rxjs';
7
6
 
@@ -54,16 +53,16 @@ class TuiArcChart {
54
53
  return (this.getLength(index) * (1 - Math.min((this.value[index] || 0) / this.max, 1)));
55
54
  }
56
55
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiArcChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
57
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiArcChart, isStandalone: true, selector: "tui-arc-chart", inputs: { value: "value", size: "size", max: "max", minLabel: "minLabel", maxLabel: "maxLabel", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size", "style.width.rem": "width", "style.height.rem": "width", "style.strokeWidth.rem": "strokeWidth" } }, viewQueries: [{ propertyName: "arcs", predicate: ["arc"], descendants: true }], ngImport: i0, template: "<svg\n *tuiRepeatTimes=\"let index of value.length\"\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter(index)\"\n [style.inset-block-start.rem]=\"getInset(index)\"\n [style.inset-inline-end.rem]=\"getInset(index)\"\n [style.inset-inline-start.rem]=\"getInset(index)\"\n>\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive(index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength(index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset(index) : getLength(index)\"\n />\n</svg>\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-text-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-text-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-text-m)}\n"], dependencies: [{ kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
56
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiArcChart, isStandalone: true, selector: "tui-arc-chart", inputs: { value: "value", size: "size", max: "max", minLabel: "minLabel", maxLabel: "maxLabel", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size", "style.width.rem": "width", "style.height.rem": "width", "style.strokeWidth.rem": "strokeWidth" } }, viewQueries: [{ propertyName: "arcs", predicate: ["arc"], descendants: true }], ngImport: i0, template: "@for (_ of '-'.repeat(value.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-text-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-text-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-text-m)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
58
57
  }
59
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiArcChart, decorators: [{
60
59
  type: Component,
61
- args: [{ selector: 'tui-arc-chart', imports: [TuiRepeatTimes], changeDetection: ChangeDetectionStrategy.OnPush, host: {
60
+ args: [{ selector: 'tui-arc-chart', changeDetection: ChangeDetectionStrategy.OnPush, host: {
62
61
  '[attr.data-size]': 'size',
63
62
  '[style.width.rem]': 'width',
64
63
  '[style.height.rem]': 'width',
65
64
  '[style.strokeWidth.rem]': 'strokeWidth',
66
- }, template: "<svg\n *tuiRepeatTimes=\"let index of value.length\"\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter(index)\"\n [style.inset-block-start.rem]=\"getInset(index)\"\n [style.inset-inline-end.rem]=\"getInset(index)\"\n [style.inset-inline-start.rem]=\"getInset(index)\"\n>\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive(index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength(index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset(index) : getLength(index)\"\n />\n</svg>\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-text-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-text-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-text-m)}\n"] }]
65
+ }, template: "@for (_ of '-'.repeat(value.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n", styles: [":host{position:relative;display:block;flex-shrink:0}.t-svg{position:absolute;inset:0;overflow:visible;fill:none;stroke:currentColor;stroke-linecap:round;color:var(--tui-background-neutral-1);font-size:1rem;pointer-events:none}.t-value{pointer-events:auto;transition:stroke-dashoffset var(--tui-duration) ease-in-out,opacity var(--tui-duration) ease-in-out .1s}.t-value_inactive{transition-property:stroke-dashoffset,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:.16}.t-content{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;text-align:center;color:var(--tui-text-secondary);font:var(--tui-font-text-xs);pointer-events:none}:host[data-size=xl] .t-content{font:var(--tui-font-text-m)}.t-wrapper{pointer-events:auto}.t-wrapper:first-line{color:var(--tui-text-primary)}:host[data-size=m] .t-wrapper:first-line{font:var(--tui-font-text-s);font-weight:700}:host[data-size=l] .t-wrapper:first-line{font:var(--tui-font-text-m);font-weight:700}:host[data-size=xl] .t-wrapper:first-line{font:var(--tui-font-heading-5)}.t-percent{position:absolute;left:25%;bottom:11%;display:flex;inline-size:50%;justify-content:space-between;font:var(--tui-font-text-xs);color:var(--tui-text-secondary)}:host[data-size=xl] .t-percent{font:var(--tui-font-text-m)}\n"] }]
67
66
  }], propDecorators: { value: [{
68
67
  type: Input
69
68
  }], size: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-charts-components-arc-chart.mjs","sources":["../../../projects/addon-charts/components/arc-chart/arc-chart.component.ts","../../../projects/addon-charts/components/arc-chart/arc-chart.template.html","../../../projects/addon-charts/components/arc-chart/taiga-ui-addon-charts-components-arc-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n Input,\n Output,\n type QueryList,\n signal,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {tuiTypedFromEvent, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {type TuiSizeXL} from '@taiga-ui/core/types';\nimport {\n map,\n merge,\n type Observable,\n ReplaySubject,\n startWith,\n switchMap,\n tap,\n timer,\n} from 'rxjs';\n\nconst ARC = 0.76; // 3/4 with 1% safety offset\nconst SIZE = {m: 9, l: 11, xl: 16} as const;\nconst WIDTH = {m: 0.25, l: 0.375, xl: 0.5625} as const;\nconst GAP = {m: 0.125, l: 0.1875, xl: 0.25} as const;\n\nfunction arcsToIndex(arcs: QueryList<ElementRef<SVGElement>>): Array<Observable<number>> {\n return arcs.map(({nativeElement}, index) =>\n merge(\n tuiTypedFromEvent(nativeElement, 'mouseenter').pipe(map(() => index)),\n tuiTypedFromEvent(nativeElement, 'mouseleave').pipe(map(() => NaN)),\n ),\n );\n}\n\n@Component({\n selector: 'tui-arc-chart',\n imports: [TuiRepeatTimes],\n templateUrl: './arc-chart.template.html',\n styleUrl: './arc-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '[style.width.rem]': 'width',\n '[style.height.rem]': 'width',\n '[style.strokeWidth.rem]': 'strokeWidth',\n },\n})\nexport class TuiArcChart {\n private readonly arcs$ = new ReplaySubject<QueryList<ElementRef<SVGElement>>>(1);\n\n protected initialized = signal(false);\n\n protected readonly $ = timer(0)\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => this.initialized.set(true));\n\n @Input()\n public value: readonly number[] = [];\n\n @Input()\n public size: TuiSizeXL = 'm';\n\n @Input()\n public max = 100;\n\n @Input()\n public minLabel = '0%';\n\n @Input()\n public maxLabel = '100%';\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = this.arcs$.pipe(\n switchMap((arcs) =>\n arcs.changes.pipe(\n startWith(null),\n switchMap(() => merge(...arcsToIndex(arcs))),\n ),\n ),\n tap((index) => {\n this.activeItemIndex = index;\n }),\n );\n\n @ViewChildren('arc')\n protected set arcs(arcs: QueryList<ElementRef<SVGElement>>) {\n this.arcs$.next(arcs);\n }\n\n protected get width(): number {\n return SIZE[this.size];\n }\n\n protected get strokeWidth(): number {\n return WIDTH[this.size];\n }\n\n protected isInactive(index: number): boolean {\n return !Number.isNaN(this.activeItemIndex) && index !== this.activeItemIndex;\n }\n\n protected getInset(index: number): number {\n return this.strokeWidth / 2 + index * (this.strokeWidth + GAP[this.size]);\n }\n\n protected getDiameter(index: number): number {\n return SIZE[this.size] - 2 * this.getInset(index);\n }\n\n protected getLength(index: number): number {\n return Math.PI * this.getDiameter(index) * ARC;\n }\n\n protected getOffset(index: number): number {\n return (\n this.getLength(index) * (1 - Math.min((this.value[index] || 0) / this.max, 1))\n );\n }\n}\n","<svg\n *tuiRepeatTimes=\"let index of value.length\"\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter(index)\"\n [style.inset-block-start.rem]=\"getInset(index)\"\n [style.inset-inline-end.rem]=\"getInset(index)\"\n [style.inset-inline-start.rem]=\"getInset(index)\"\n>\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive(index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength(index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset(index) : getLength(index)\"\n />\n</svg>\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAyBA,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,IAAI,GAAG,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAU;AAC3C,MAAM,KAAK,GAAG,EAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAU;AACtD,MAAM,GAAG,GAAG,EAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAU;AAEpD,SAAS,WAAW,CAAC,IAAuC,EAAA;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,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BAIM,GAAG,EAAA,CAAA;sBADT;gBAIM,QAAQ,EAAA,CAAA;sBADd;gBAIM,QAAQ,EAAA,CAAA;sBADd;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIe,qBAAqB,EAAA,CAAA;sBADpC;gBAca,IAAI,EAAA,CAAA;sBADjB,YAAY;uBAAC,KAAK;;;AE5FvB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-charts-components-arc-chart.mjs","sources":["../../../projects/addon-charts/components/arc-chart/arc-chart.component.ts","../../../projects/addon-charts/components/arc-chart/arc-chart.template.html","../../../projects/addon-charts/components/arc-chart/taiga-ui-addon-charts-components-arc-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n Input,\n Output,\n type QueryList,\n signal,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiTypedFromEvent, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {type TuiSizeXL} from '@taiga-ui/core/types';\nimport {\n map,\n merge,\n type Observable,\n ReplaySubject,\n startWith,\n switchMap,\n tap,\n timer,\n} from 'rxjs';\n\nconst ARC = 0.76; // 3/4 with 1% safety offset\nconst SIZE = {m: 9, l: 11, xl: 16} as const;\nconst WIDTH = {m: 0.25, l: 0.375, xl: 0.5625} as const;\nconst GAP = {m: 0.125, l: 0.1875, xl: 0.25} as const;\n\nfunction arcsToIndex(arcs: QueryList<ElementRef<SVGElement>>): Array<Observable<number>> {\n return arcs.map(({nativeElement}, index) =>\n merge(\n tuiTypedFromEvent(nativeElement, 'mouseenter').pipe(map(() => index)),\n tuiTypedFromEvent(nativeElement, 'mouseleave').pipe(map(() => NaN)),\n ),\n );\n}\n\n@Component({\n selector: 'tui-arc-chart',\n templateUrl: './arc-chart.template.html',\n styleUrl: './arc-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '[style.width.rem]': 'width',\n '[style.height.rem]': 'width',\n '[style.strokeWidth.rem]': 'strokeWidth',\n },\n})\nexport class TuiArcChart {\n private readonly arcs$ = new ReplaySubject<QueryList<ElementRef<SVGElement>>>(1);\n\n protected initialized = signal(false);\n\n protected readonly $ = timer(0)\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => this.initialized.set(true));\n\n @Input()\n public value: readonly number[] = [];\n\n @Input()\n public size: TuiSizeXL = 'm';\n\n @Input()\n public max = 100;\n\n @Input()\n public minLabel = '0%';\n\n @Input()\n public maxLabel = '100%';\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = this.arcs$.pipe(\n switchMap((arcs) =>\n arcs.changes.pipe(\n startWith(null),\n switchMap(() => merge(...arcsToIndex(arcs))),\n ),\n ),\n tap((index) => {\n this.activeItemIndex = index;\n }),\n );\n\n @ViewChildren('arc')\n protected set arcs(arcs: QueryList<ElementRef<SVGElement>>) {\n this.arcs$.next(arcs);\n }\n\n protected get width(): number {\n return SIZE[this.size];\n }\n\n protected get strokeWidth(): number {\n return WIDTH[this.size];\n }\n\n protected isInactive(index: number): boolean {\n return !Number.isNaN(this.activeItemIndex) && index !== this.activeItemIndex;\n }\n\n protected getInset(index: number): number {\n return this.strokeWidth / 2 + index * (this.strokeWidth + GAP[this.size]);\n }\n\n protected getDiameter(index: number): number {\n return SIZE[this.size] - 2 * this.getInset(index);\n }\n\n protected getLength(index: number): number {\n return Math.PI * this.getDiameter(index) * ARC;\n }\n\n protected getOffset(index: number): number {\n return (\n this.getLength(index) * (1 - Math.min((this.value[index] || 0) / this.max, 1))\n );\n }\n}\n","@for (_ of '-'.repeat(value.length); track $index) {\n <svg\n focusable=\"false\"\n viewBox=\"-100 -100 200 200\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n [style.height.rem]=\"getDiameter($index)\"\n [style.inset-block-start.rem]=\"getInset($index)\"\n [style.inset-inline-end.rem]=\"getInset($index)\"\n [style.inset-inline-start.rem]=\"getInset($index)\"\n >\n <path\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n />\n <path\n #arc\n d=\"M -70 70 A 100 100 0 1 1 70 70\"\n vector-effect=\"non-scaling-stroke\"\n class=\"t-value\"\n [class.t-value_inactive]=\"isInactive($index)\"\n [style.stroke]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.strokeDasharray.em]=\"getLength($index)\"\n [style.strokeDashoffset.em]=\"initialized() ? getOffset($index) : getLength($index)\"\n />\n </svg>\n}\n<div class=\"t-content\">\n <div class=\"t-wrapper\">\n <ng-content />\n </div>\n</div>\n<div class=\"t-percent\">\n <span>{{ minLabel }}</span>\n <span>{{ maxLabel }}</span>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAwBA,MAAM,GAAG,GAAG,IAAI,CAAC;AACjB,MAAM,IAAI,GAAG,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAU;AAC3C,MAAM,KAAK,GAAG,EAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAU;AACtD,MAAM,GAAG,GAAG,EAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAU;AAEpD,SAAS,WAAW,CAAC,IAAuC,EAAA;IACxD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,aAAa,EAAC,EAAE,KAAK,KACnC,KAAK,CACD,iBAAiB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,EACrE,iBAAiB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CACtE,CACJ;AACL;MAca,WAAW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A,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAGR,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,MAAM;AAC1B,wBAAA,mBAAmB,EAAE,OAAO;AAC5B,wBAAA,oBAAoB,EAAE,OAAO;AAC7B,wBAAA,yBAAyB,EAAE,aAAa;AAC3C,qBAAA,EAAA,QAAA,EAAA,wwCAAA,EAAA,MAAA,EAAA,CAAA,s1CAAA,CAAA,EAAA;8BAYM,KAAK,EAAA,CAAA;sBADX;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIM,GAAG,EAAA,CAAA;sBADT;gBAIM,QAAQ,EAAA,CAAA;sBADd;gBAIM,QAAQ,EAAA,CAAA;sBADd;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIe,qBAAqB,EAAA,CAAA;sBADpC;gBAca,IAAI,EAAA,CAAA;sBADjB,YAAY;uBAAC,KAAK;;;AE1FvB;;AAEG;;;;"}
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk/constants';
4
- import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
5
4
 
6
5
  const TUI_ALWAYS_DASHED = () => 'dashed';
7
6
  const TUI_ALWAYS_DOTTED = () => 'dotted';
@@ -40,14 +39,14 @@ class TuiAxes {
40
39
  return this.axisY === 'none';
41
40
  }
42
41
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAxes, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAxes, isStandalone: true, selector: "tui-axes", inputs: { axisX: "axisX", axisXLabels: "axisXLabels", axisY: "axisY", axisYInset: "axisYInset", axisYLabels: "axisYLabels", axisYName: "axisYName", axisYSecondaryInset: "axisYSecondaryInset", axisYSecondaryLabels: "axisYSecondaryLabels", axisYSecondaryName: "axisYSecondaryName", horizontalLines: "horizontalLines", horizontalLinesHandler: "horizontalLinesHandler", verticalLines: "verticalLines", verticalLinesHandler: "verticalLinesHandler" }, host: { attributes: { "dir": "ltr" }, properties: { "class._centered": "centeredXLabels" } }, ngImport: i0, template: "@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n <div\n *tuiRepeatTimes=\"let index of verticalLines\"\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.borderRightStyle]=\"verticalLinesHandler(index, verticalLines)\"\n ></div>\n </div>\n <div class=\"t-horizontal\">\n <div\n *tuiRepeatTimes=\"let index of horizontalLines\"\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.borderTopStyle]=\"horizontalLinesHandler(index, horizontalLines)\"\n ></div>\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-text-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-text-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-text-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"], dependencies: [{ kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
42
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAxes, isStandalone: true, selector: "tui-axes", inputs: { axisX: "axisX", axisXLabels: "axisXLabels", axisY: "axisY", axisYInset: "axisYInset", axisYLabels: "axisYLabels", axisYName: "axisYName", axisYSecondaryInset: "axisYSecondaryInset", axisYSecondaryLabels: "axisYSecondaryLabels", axisYSecondaryName: "axisYSecondaryName", horizontalLines: "horizontalLines", horizontalLinesHandler: "horizontalLinesHandler", verticalLines: "verticalLines", verticalLinesHandler: "verticalLinesHandler" }, host: { attributes: { "dir": "ltr" }, properties: { "class._centered": "centeredXLabels" } }, ngImport: i0, template: "@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n @for (_ of '-'.repeat(verticalLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"verticalLinesHandler($index, verticalLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @for (_ of '-'.repeat(horizontalLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"horizontalLinesHandler($index, horizontalLines)\"\n ></div>\n }\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-text-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-text-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-text-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
44
43
  }
45
44
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAxes, decorators: [{
46
45
  type: Component,
47
- args: [{ selector: 'tui-axes', imports: [TuiRepeatTimes], changeDetection: ChangeDetectionStrategy.OnPush, host: {
46
+ args: [{ selector: 'tui-axes', changeDetection: ChangeDetectionStrategy.OnPush, host: {
48
47
  dir: 'ltr',
49
48
  '[class._centered]': 'centeredXLabels',
50
- }, template: "@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n <div\n *tuiRepeatTimes=\"let index of verticalLines\"\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.borderRightStyle]=\"verticalLinesHandler(index, verticalLines)\"\n ></div>\n </div>\n <div class=\"t-horizontal\">\n <div\n *tuiRepeatTimes=\"let index of horizontalLines\"\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.borderTopStyle]=\"horizontalLinesHandler(index, horizontalLines)\"\n ></div>\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-text-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-text-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-text-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"] }]
49
+ }, template: "@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n @for (_ of '-'.repeat(verticalLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"verticalLinesHandler($index, verticalLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @for (_ of '-'.repeat(horizontalLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"horizontalLinesHandler($index, horizontalLines)\"\n ></div>\n }\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex}.t-wrapper{display:flex;flex:1;block-size:100%;flex-direction:column}.t-grid{position:relative;display:flex;flex:1;justify-content:space-around;align-items:flex-end;border-width:1px;border-color:var(--tui-border-normal);isolation:isolate}.t-horizontal{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex;flex-direction:column}.t-vertical{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host._centered .t-vertical:after{content:\"\";display:block;flex:1 0 1px}.t-line{flex:2 0 1px;box-sizing:border-box;border-width:1px;border-color:var(--tui-border-normal)}:host._centered .t-line_vertical:first-child{flex:1 0 1px;pointer-events:none}.t-side{display:flex;align-items:stretch}.t-side_padding{padding-block-end:2rem}.t-name{font:var(--tui-font-text-xs);writing-mode:tb;text-align:center;padding-block-end:.75rem;color:var(--tui-text-secondary)}.t-name_primary{transform:rotate(180deg)}.t-labels-y{display:flex;font:var(--tui-font-text-xs);flex-direction:column-reverse;justify-content:space-between;color:var(--tui-text-secondary)}.t-labels-y_primary{text-align:end;padding-inline-end:.75rem}.t-labels-y_secondary{padding-inline-start:.75rem}.t-labels-y_transparent{border-color:transparent}.t-labels-y_inset{position:absolute;top:.5625rem;left:.25rem;bottom:-.75rem;pointer-events:none}.t-labels-y_inset_secondary{left:auto;right:.25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-text-xs);border-inline-end:1px solid transparent;color:var(--tui-text-secondary)}.t-label-x{block-size:.4375rem;border-inline-start:1px solid var(--tui-border-normal);flex:1;margin-block-end:1.5625rem}.t-label-x:before{content:\"\";display:block;block-size:.5625rem}.t-label-x_transparent{border-color:transparent}:host._centered .t-label-x{block-size:2rem;text-align:center;border:none;margin:0}:host:not(._centered) .t-label-x:last-child:not(:first-child){position:absolute;right:0;text-align:end;border-inline-start:none}.t-label-y:first-child{margin-block-end:-.375rem}.t-label-y:last-child{margin-block-start:-.375rem}.t-content{position:absolute;inset:0 0 -1px -1px;display:flex;align-items:flex-end}\n"] }]
51
50
  }], propDecorators: { axisX: [{
52
51
  type: Input
53
52
  }], axisXLabels: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-charts-components-axes.mjs","sources":["../../../projects/addon-charts/components/axes/axes.component.ts","../../../projects/addon-charts/components/axes/axes.template.html","../../../projects/addon-charts/components/axes/taiga-ui-addon-charts-components-axes.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {type TuiLineHandler, type TuiLineType} from '@taiga-ui/addon-charts/types';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\n\nexport const TUI_ALWAYS_DASHED: TuiLineHandler = () => 'dashed';\nexport const TUI_ALWAYS_DOTTED: TuiLineHandler = () => 'dotted';\nexport const TUI_ALWAYS_SOLID: TuiLineHandler = () => 'solid';\nexport const TUI_ALWAYS_NONE: TuiLineHandler = () => 'none';\n\n@Component({\n selector: 'tui-axes',\n imports: [TuiRepeatTimes],\n templateUrl: './axes.template.html',\n styleUrl: './axes.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n dir: 'ltr',\n '[class._centered]': 'centeredXLabels',\n },\n})\nexport class TuiAxes {\n @Input()\n public axisX: TuiLineType = 'solid';\n\n @Input()\n public axisXLabels: ReadonlyArray<string | null> = [];\n\n @Input()\n public axisY: TuiLineType = 'solid';\n\n @Input()\n public axisYInset = false;\n\n @Input()\n public axisYLabels: readonly string[] = [];\n\n @Input()\n public axisYName = '';\n\n @Input()\n public axisYSecondaryInset = false;\n\n @Input()\n public axisYSecondaryLabels: readonly string[] = [];\n\n @Input()\n public axisYSecondaryName = '';\n\n @Input()\n public horizontalLines = 0;\n\n @Input()\n public horizontalLinesHandler: TuiLineHandler = TUI_ALWAYS_SOLID;\n\n @Input()\n public verticalLines = 0;\n\n @Input()\n public verticalLinesHandler: TuiLineHandler = TUI_ALWAYS_DASHED;\n\n public get hasXLabels(): boolean {\n return !!this.axisXLabels.length;\n }\n\n public get hasYLabels(): boolean {\n return (!!this.axisYLabels.length && !this.axisYInset) || !!this.axisYName;\n }\n\n public get hasYSecondaryLabels(): boolean {\n return (\n (!!this.axisYSecondaryLabels.length && !this.axisYSecondaryInset) ||\n !!this.axisYSecondaryName\n );\n }\n\n public fallback(label: string | null): string {\n return label || CHAR_NO_BREAK_SPACE;\n }\n\n protected get centeredXLabels(): boolean {\n return this.axisY === 'none';\n }\n}\n","@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n <div\n *tuiRepeatTimes=\"let index of verticalLines\"\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.borderRightStyle]=\"verticalLinesHandler(index, verticalLines)\"\n ></div>\n </div>\n <div class=\"t-horizontal\">\n <div\n *tuiRepeatTimes=\"let index of horizontalLines\"\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.borderTopStyle]=\"horizontalLinesHandler(index, horizontalLines)\"\n ></div>\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAKa,iBAAiB,GAAmB,MAAM;MAC1C,iBAAiB,GAAmB,MAAM;MAC1C,gBAAgB,GAAmB,MAAM;MACzC,eAAe,GAAmB,MAAM;MAaxC,OAAO,CAAA;AAXpB,IAAA,WAAA,GAAA;QAaW,IAAK,CAAA,KA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AAA,CAAA;sBADjB;gBAIM,SAAS,EAAA,CAAA;sBADf;gBAIM,mBAAmB,EAAA,CAAA;sBADzB;gBAIM,oBAAoB,EAAA,CAAA;sBAD1B;gBAIM,kBAAkB,EAAA,CAAA;sBADxB;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIM,sBAAsB,EAAA,CAAA;sBAD5B;gBAIM,aAAa,EAAA,CAAA;sBADnB;gBAIM,oBAAoB,EAAA,CAAA;sBAD1B;;;AE1DL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-charts-components-axes.mjs","sources":["../../../projects/addon-charts/components/axes/axes.component.ts","../../../projects/addon-charts/components/axes/axes.template.html","../../../projects/addon-charts/components/axes/taiga-ui-addon-charts-components-axes.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {type TuiLineHandler, type TuiLineType} from '@taiga-ui/addon-charts/types';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\n\nexport const TUI_ALWAYS_DASHED: TuiLineHandler = () => 'dashed';\nexport const TUI_ALWAYS_DOTTED: TuiLineHandler = () => 'dotted';\nexport const TUI_ALWAYS_SOLID: TuiLineHandler = () => 'solid';\nexport const TUI_ALWAYS_NONE: TuiLineHandler = () => 'none';\n\n@Component({\n selector: 'tui-axes',\n templateUrl: './axes.template.html',\n styleUrl: './axes.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n dir: 'ltr',\n '[class._centered]': 'centeredXLabels',\n },\n})\nexport class TuiAxes {\n @Input()\n public axisX: TuiLineType = 'solid';\n\n @Input()\n public axisXLabels: ReadonlyArray<string | null> = [];\n\n @Input()\n public axisY: TuiLineType = 'solid';\n\n @Input()\n public axisYInset = false;\n\n @Input()\n public axisYLabels: readonly string[] = [];\n\n @Input()\n public axisYName = '';\n\n @Input()\n public axisYSecondaryInset = false;\n\n @Input()\n public axisYSecondaryLabels: readonly string[] = [];\n\n @Input()\n public axisYSecondaryName = '';\n\n @Input()\n public horizontalLines = 0;\n\n @Input()\n public horizontalLinesHandler: TuiLineHandler = TUI_ALWAYS_SOLID;\n\n @Input()\n public verticalLines = 0;\n\n @Input()\n public verticalLinesHandler: TuiLineHandler = TUI_ALWAYS_DASHED;\n\n public get hasXLabels(): boolean {\n return !!this.axisXLabels.length;\n }\n\n public get hasYLabels(): boolean {\n return (!!this.axisYLabels.length && !this.axisYInset) || !!this.axisYName;\n }\n\n public get hasYSecondaryLabels(): boolean {\n return (\n (!!this.axisYSecondaryLabels.length && !this.axisYSecondaryInset) ||\n !!this.axisYSecondaryName\n );\n }\n\n public fallback(label: string | null): string {\n return label || CHAR_NO_BREAK_SPACE;\n }\n\n protected get centeredXLabels(): boolean {\n return this.axisY === 'none';\n }\n}\n","@if (hasYLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (axisYName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ axisYName }}\n </div>\n }\n @if (!axisYInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n </div>\n}\n<div class=\"t-wrapper\">\n <div\n class=\"t-grid\"\n [style.borderBottomStyle]=\"axisX\"\n [style.borderLeftStyle]=\"axisY\"\n >\n <div class=\"t-vertical\">\n @for (_ of '-'.repeat(verticalLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"verticalLinesHandler($index, verticalLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @for (_ of '-'.repeat(horizontalLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"horizontalLinesHandler($index, horizontalLines)\"\n ></div>\n }\n </div>\n @if (axisYInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of axisYLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXLabels) {\n <div class=\"t-labels-x\">\n @for (label of axisXLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-x-label\"\n class=\"t-label-x\"\n [class.t-label-x_transparent]=\"label === null\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXLabels\"\n >\n @if (!axisYSecondaryInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of axisYSecondaryLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ fallback(label) }}\n </div>\n }\n </div>\n }\n @if (axisYSecondaryName) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSecondaryName }}\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIa,iBAAiB,GAAmB,MAAM;MAC1C,iBAAiB,GAAmB,MAAM;MAC1C,gBAAgB,GAAmB,MAAM;MACzC,eAAe,GAAmB,MAAM;MAYxC,OAAO,CAAA;AAVpB,IAAA,WAAA,GAAA;QAYW,IAAK,CAAA,KAAA,GAAgB,OAAO;QAG5B,IAAW,CAAA,WAAA,GAAiC,EAAE;QAG9C,IAAK,CAAA,KAAA,GAAgB,OAAO;QAG5B,IAA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,i7HAwHA,EAAA,MAAA,EAAA,CAAA,upEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDrGa,OAAO,EAAA,UAAA,EAAA,CAAA;kBAVnB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAGH,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,GAAG,EAAE,KAAK;AACV,wBAAA,mBAAmB,EAAE,iBAAiB;AACzC,qBAAA,EAAA,QAAA,EAAA,i7HAAA,EAAA,MAAA,EAAA,CAAA,upEAAA,CAAA,EAAA;8BAIM,KAAK,EAAA,CAAA;sBADX;gBAIM,WAAW,EAAA,CAAA;sBADjB;gBAIM,KAAK,EAAA,CAAA;sBADX;gBAIM,UAAU,EAAA,CAAA;sBADhB;gBAIM,WAAW,EAAA,CAAA;sBADjB;gBAIM,SAAS,EAAA,CAAA;sBADf;gBAIM,mBAAmB,EAAA,CAAA;sBADzB;gBAIM,oBAAoB,EAAA,CAAA;sBAD1B;gBAIM,kBAAkB,EAAA,CAAA;sBADxB;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIM,sBAAsB,EAAA,CAAA;sBAD5B;gBAIM,aAAa,EAAA,CAAA;sBADnB;gBAIM,oBAAoB,EAAA,CAAA;sBAD1B;;;AExDL;;AAEG;;;;"}
@@ -2,7 +2,6 @@ import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, Input, Directive, EventEmitter, Output, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { TuiHovered } from '@taiga-ui/cdk/directives/hovered';
5
- import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
6
5
  import { tuiInjectId } from '@taiga-ui/cdk/services';
7
6
  import { tuiClamp, tuiSum } from '@taiga-ui/cdk/utils/math';
8
7
  import { tuiEaseInOutQuad, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
@@ -128,7 +127,7 @@ class TuiPieChart {
128
127
  this.activeItemIndexChange.next(index);
129
128
  }
130
129
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPieChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiPieChart, isStandalone: true, selector: "tui-pie-chart", inputs: { value: "value", size: "size", masked: "masked", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size", "class._empty": "empty" } }, ngImport: i0, template: "<svg\n focusable=\"false\"\n height=\"100%\"\n viewBox=\"-100 -100 200 200\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n>\n <defs>\n <mask [attr.id]=\"maskId\">\n <rect\n fill=\"white\"\n height=\"400\"\n width=\"400\"\n x=\"-200\"\n y=\"-200\"\n />\n <circle\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"radius\"\n />\n </mask>\n </defs>\n <g [style.mask]=\"mask\">\n <circle\n cx=\"0\"\n cy=\"0\"\n r=\"100\"\n class=\"t-placeholder\"\n />\n <path\n *tuiRepeatTimes=\"let index of segments.length\"\n automation-id=\"tui-pie-chart__segment\"\n d=\"\"\n fill=\"currentColor\"\n tuiHintPointer\n class=\"t-segment\"\n [attr.transform]=\"getTransform(index)\"\n [style.color]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [tuiHint]=\"hintContent\"\n [tuiHintContext]=\"{$implicit: index}\"\n [tuiPieChart]=\"segments[index] || [0, 0]\"\n (tuiHoveredChange)=\"onHovered($event, index)\"\n />\n </g>\n</svg>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);border-radius:100%}:host[data-size=xs]{--t-size: 2rem;pointer-events:none}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-svg{position:relative;overflow:visible;transform:rotate(-90deg)}.t-segment{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host._empty .t-segment{display:none}.t-placeholder{fill:var(--tui-background-neutral-1)}\n"], dependencies: [{ kind: "directive", type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1.TuiHintPointer, selector: "[tuiHint][tuiHintPointer]" }, { kind: "directive", type: TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "directive", type: TuiPieChartDirective, selector: "path[tuiPieChart]", inputs: ["tuiPieChart"] }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], viewProviders: [
130
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiPieChart, isStandalone: true, selector: "tui-pie-chart", inputs: { value: "value", size: "size", masked: "masked", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size", "class._empty": "empty" } }, ngImport: i0, template: "<svg\n focusable=\"false\"\n height=\"100%\"\n viewBox=\"-100 -100 200 200\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n>\n <defs>\n <mask [attr.id]=\"maskId\">\n <rect\n fill=\"white\"\n height=\"400\"\n width=\"400\"\n x=\"-200\"\n y=\"-200\"\n />\n <circle\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"radius\"\n />\n </mask>\n </defs>\n <g [style.mask]=\"mask\">\n <circle\n cx=\"0\"\n cy=\"0\"\n r=\"100\"\n class=\"t-placeholder\"\n />\n @for (_ of '-'.repeat(segments.length); track $index) {\n <path\n automation-id=\"tui-pie-chart__segment\"\n d=\"\"\n fill=\"currentColor\"\n tuiHintPointer\n class=\"t-segment\"\n [attr.transform]=\"getTransform($index)\"\n [style.color]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [tuiHint]=\"hintContent\"\n [tuiHintContext]=\"{$implicit: $index}\"\n [tuiPieChart]=\"segments[$index] || [0, 0]\"\n (tuiHoveredChange)=\"onHovered($event, $index)\"\n />\n }\n </g>\n</svg>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);border-radius:100%}:host[data-size=xs]{--t-size: 2rem;pointer-events:none}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-svg{position:relative;overflow:visible;transform:rotate(-90deg)}.t-segment{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host._empty .t-segment{display:none}.t-placeholder{fill:var(--tui-background-neutral-1)}\n"], dependencies: [{ kind: "directive", type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1.TuiHintPointer, selector: "[tuiHint][tuiHintPointer]" }, { kind: "directive", type: TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "directive", type: TuiPieChartDirective, selector: "path[tuiPieChart]", inputs: ["tuiPieChart"] }], viewProviders: [
132
131
  tuiHintOptionsProvider({ direction: 'top-right', appearance: 'floating' }),
133
132
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
134
133
  }
@@ -140,12 +139,12 @@ __decorate([
140
139
  ], TuiPieChart.prototype, "getSegments", null);
141
140
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPieChart, decorators: [{
142
141
  type: Component,
143
- args: [{ selector: 'tui-pie-chart', imports: [TuiHint, TuiHovered, TuiPieChartDirective, TuiRepeatTimes], changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
142
+ args: [{ selector: 'tui-pie-chart', imports: [TuiHint, TuiHovered, TuiPieChartDirective], changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
144
143
  tuiHintOptionsProvider({ direction: 'top-right', appearance: 'floating' }),
145
144
  ], host: {
146
145
  '[attr.data-size]': 'size',
147
146
  '[class._empty]': 'empty',
148
- }, template: "<svg\n focusable=\"false\"\n height=\"100%\"\n viewBox=\"-100 -100 200 200\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n>\n <defs>\n <mask [attr.id]=\"maskId\">\n <rect\n fill=\"white\"\n height=\"400\"\n width=\"400\"\n x=\"-200\"\n y=\"-200\"\n />\n <circle\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"radius\"\n />\n </mask>\n </defs>\n <g [style.mask]=\"mask\">\n <circle\n cx=\"0\"\n cy=\"0\"\n r=\"100\"\n class=\"t-placeholder\"\n />\n <path\n *tuiRepeatTimes=\"let index of segments.length\"\n automation-id=\"tui-pie-chart__segment\"\n d=\"\"\n fill=\"currentColor\"\n tuiHintPointer\n class=\"t-segment\"\n [attr.transform]=\"getTransform(index)\"\n [style.color]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [tuiHint]=\"hintContent\"\n [tuiHintContext]=\"{$implicit: index}\"\n [tuiPieChart]=\"segments[index] || [0, 0]\"\n (tuiHoveredChange)=\"onHovered($event, index)\"\n />\n </g>\n</svg>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);border-radius:100%}:host[data-size=xs]{--t-size: 2rem;pointer-events:none}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-svg{position:relative;overflow:visible;transform:rotate(-90deg)}.t-segment{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host._empty .t-segment{display:none}.t-placeholder{fill:var(--tui-background-neutral-1)}\n"] }]
147
+ }, template: "<svg\n focusable=\"false\"\n height=\"100%\"\n viewBox=\"-100 -100 200 200\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n>\n <defs>\n <mask [attr.id]=\"maskId\">\n <rect\n fill=\"white\"\n height=\"400\"\n width=\"400\"\n x=\"-200\"\n y=\"-200\"\n />\n <circle\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"radius\"\n />\n </mask>\n </defs>\n <g [style.mask]=\"mask\">\n <circle\n cx=\"0\"\n cy=\"0\"\n r=\"100\"\n class=\"t-placeholder\"\n />\n @for (_ of '-'.repeat(segments.length); track $index) {\n <path\n automation-id=\"tui-pie-chart__segment\"\n d=\"\"\n fill=\"currentColor\"\n tuiHintPointer\n class=\"t-segment\"\n [attr.transform]=\"getTransform($index)\"\n [style.color]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [tuiHint]=\"hintContent\"\n [tuiHintContext]=\"{$implicit: $index}\"\n [tuiPieChart]=\"segments[$index] || [0, 0]\"\n (tuiHoveredChange)=\"onHovered($event, $index)\"\n />\n }\n </g>\n</svg>\n", styles: [":host{position:relative;display:block;inline-size:var(--t-size);block-size:var(--t-size);border-radius:100%}:host[data-size=xs]{--t-size: 2rem;pointer-events:none}:host[data-size=s]{--t-size: 4rem}:host[data-size=m]{--t-size: 9rem}:host[data-size=l]{--t-size: 11rem}:host[data-size=xl]{--t-size: 16rem}.t-svg{position:relative;overflow:visible;transform:rotate(-90deg)}.t-segment{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}:host._empty .t-segment{display:none}.t-placeholder{fill:var(--tui-background-neutral-1)}\n"] }]
149
148
  }], ctorParameters: () => [], propDecorators: { value: [{
150
149
  type: Input
151
150
  }], size: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-charts-components-pie-chart.mjs","sources":["../../../projects/addon-charts/components/pie-chart/pie-chart.directive.ts","../../../projects/addon-charts/components/pie-chart/pie-chart.component.ts","../../../projects/addon-charts/components/pie-chart/pie-chart.template.html","../../../projects/addon-charts/components/pie-chart/taiga-ui-addon-charts-components-pie-chart.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_ANIMATION_FRAME, WA_PERFORMANCE} from '@ng-web-apis/common';\nimport {tuiDescribeSector} from '@taiga-ui/addon-charts/utils';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiEaseInOutQuad} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {BehaviorSubject, map, pairwise, switchMap, takeWhile} from 'rxjs';\n\n@Directive({\n selector: 'path[tuiPieChart]',\n})\nexport class TuiPieChartDirective {\n private readonly sector$ = new BehaviorSubject<readonly [number, number]>([0, 0]);\n private readonly el = tuiInjectElement<SVGPathElement>();\n private readonly performance = inject(WA_PERFORMANCE);\n private readonly animationFrame$ = inject(WA_ANIMATION_FRAME);\n private readonly speed = inject(TUI_ANIMATIONS_SPEED);\n protected readonly $ = this.sector$\n .pipe(\n pairwise(),\n switchMap(([prev, cur]) => {\n const now = this.performance.now();\n const startDelta = cur[0] - prev[0];\n const endDelta = cur[1] - prev[1];\n\n return this.animationFrame$.pipe(\n map((timestamp) =>\n tuiEaseInOutQuad(\n tuiClamp(\n (timestamp - now) / tuiGetDuration(this.speed),\n 0,\n 1,\n ),\n ),\n ),\n takeWhile((progress) => progress < 1, true),\n map((progress) => [\n prev[0] + startDelta * progress,\n cur[1] > 359 ? cur[1] : prev[1] + endDelta * progress,\n ]),\n );\n }),\n tuiZonefree(),\n takeUntilDestroyed(),\n )\n .subscribe(([start, end]) =>\n this.el.setAttribute('d', tuiDescribeSector(start, end)),\n );\n\n @Input()\n public set tuiPieChart(sector: readonly [number, number]) {\n this.sector$.next(sector);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n Output,\n} from '@angular/core';\nimport {TuiHovered} from '@taiga-ui/cdk/directives/hovered';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {tuiInjectId} from '@taiga-ui/cdk/services';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiSum} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TuiHint,\n TuiHintOptionsDirective,\n tuiHintOptionsProvider,\n} from '@taiga-ui/core/directives/hint';\nimport {type TuiSizeXL, type TuiSizeXS} from '@taiga-ui/core/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiPieChartDirective} from './pie-chart.directive';\n\nconst RADII = {\n xs: '50',\n s: '50',\n m: '77.8',\n l: '81.9',\n xl: '81.3',\n};\nconst TRANSFORM = {\n xs: 1.15,\n s: 1.25,\n m: 1.11,\n l: 1.09,\n xl: 1.08,\n};\n\n@Component({\n selector: 'tui-pie-chart',\n imports: [TuiHint, TuiHovered, TuiPieChartDirective, TuiRepeatTimes],\n templateUrl: './pie-chart.template.html',\n styleUrl: './pie-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n tuiHintOptionsProvider({direction: 'top-right', appearance: 'floating'}),\n ],\n host: {\n '[attr.data-size]': 'size',\n '[class._empty]': 'empty',\n },\n})\nexport class TuiPieChart {\n private readonly hintOptions = inject(TuiHintOptionsDirective, {optional: true});\n private readonly autoId = tuiInjectId();\n\n @Input()\n public value: readonly number[] = [];\n\n @Input()\n public size: TuiSizeXL | TuiSizeXS = 'm';\n\n @Input()\n public masked = false;\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n constructor() {\n if (this.hintOptions) {\n this.hintOptions.showDelay = 0;\n this.hintOptions.hideDelay = 0;\n }\n }\n\n protected get empty(): boolean {\n return !this.getSum(this.value);\n }\n\n protected get hintContent(): PolymorpheusContent<TuiContext<number>> {\n return this.hintOptions?.content || '';\n }\n\n protected get maskId(): string {\n return `tui-ring-chart-${this.autoId}`;\n }\n\n protected get mask(): string | null {\n return this.masked ? `url(#${this.maskId})` : null;\n }\n\n protected get radius(): string {\n return RADII[this.size];\n }\n\n protected get segments(): ReadonlyArray<[number, number]> {\n return this.getSegments(this.value);\n }\n\n protected getTransform(index: number): string | null {\n const transform = this.masked\n ? `scale(${TRANSFORM[this.size]})`\n : `scale(${TRANSFORM.xs})`;\n\n return index === this.activeItemIndex ? transform : null;\n }\n\n protected onHovered(hovered: boolean, index: number): void {\n this.updateActiveItemIndex(hovered ? index : NaN);\n }\n\n @tuiPure\n private getSum(value: readonly number[]): number {\n return tuiSum(...value);\n }\n\n @tuiPure\n private getSegments(value: readonly number[]): ReadonlyArray<[number, number]> {\n return value\n .map((initial, i, array) =>\n array.reduce(\n (sum, current, j) => (j < i ? this.getDeg(current) + sum : sum),\n this.getDeg(initial),\n ),\n )\n .map((angle, index, array) => [\n array[index - 1] || 0,\n Math.min(angle, 359.9999),\n ]);\n }\n\n private getDeg(value: number): number {\n return 360 * (value / this.getSum(this.value)) || 0;\n }\n\n private updateActiveItemIndex(index: number): void {\n if (index === this.activeItemIndex) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.next(index);\n }\n}\n","<svg\n focusable=\"false\"\n height=\"100%\"\n viewBox=\"-100 -100 200 200\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n>\n <defs>\n <mask [attr.id]=\"maskId\">\n <rect\n fill=\"white\"\n height=\"400\"\n width=\"400\"\n x=\"-200\"\n y=\"-200\"\n />\n <circle\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"radius\"\n />\n </mask>\n </defs>\n <g [style.mask]=\"mask\">\n <circle\n cx=\"0\"\n cy=\"0\"\n r=\"100\"\n class=\"t-placeholder\"\n />\n <path\n *tuiRepeatTimes=\"let index of segments.length\"\n automation-id=\"tui-pie-chart__segment\"\n d=\"\"\n fill=\"currentColor\"\n tuiHintPointer\n class=\"t-segment\"\n [attr.transform]=\"getTransform(index)\"\n [style.color]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [tuiHint]=\"hintContent\"\n [tuiHintContext]=\"{$implicit: index}\"\n [tuiPieChart]=\"segments[index] || [0, 0]\"\n (tuiHoveredChange)=\"onHovered($event, index)\"\n />\n </g>\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAea,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;QAIqB,IAAO,CAAA,OAAA,GAAG,IAAI,eAAe,CAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChE,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAkB;AACvC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AACpC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,oBAAoB,CAAC;QAClC,IAAC,CAAA,CAAA,GAAG,IAAI,CAAC;AACvB,aAAA,IAAI,CACD,QAAQ,EAAE,EACV,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,KAAI;YACtB,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE;YAClC,MAAM,UAAU,GAAG,GAA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AC5B,qBAAA,EAAA,QAAA,EAAA,01CAAA,EAAA,MAAA,EAAA,CAAA,2kBAAA,CAAA,EAAA;wDAOM,KAAK,EAAA,CAAA;sBADX;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIM,MAAM,EAAA,CAAA;sBADZ;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIe,qBAAqB,EAAA,CAAA;sBADpC;AA+CO,aAAA,CAAA,EAAA,MAAM,MAKN,WAAW,EAAA,EAAA,EAAA,EAAA,CAAA;;AEzHvB;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-charts-components-pie-chart.mjs","sources":["../../../projects/addon-charts/components/pie-chart/pie-chart.directive.ts","../../../projects/addon-charts/components/pie-chart/pie-chart.component.ts","../../../projects/addon-charts/components/pie-chart/pie-chart.template.html","../../../projects/addon-charts/components/pie-chart/taiga-ui-addon-charts-components-pie-chart.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_ANIMATION_FRAME, WA_PERFORMANCE} from '@ng-web-apis/common';\nimport {tuiDescribeSector} from '@taiga-ui/addon-charts/utils';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiEaseInOutQuad} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {BehaviorSubject, map, pairwise, switchMap, takeWhile} from 'rxjs';\n\n@Directive({\n selector: 'path[tuiPieChart]',\n})\nexport class TuiPieChartDirective {\n private readonly sector$ = new BehaviorSubject<readonly [number, number]>([0, 0]);\n private readonly el = tuiInjectElement<SVGPathElement>();\n private readonly performance = inject(WA_PERFORMANCE);\n private readonly animationFrame$ = inject(WA_ANIMATION_FRAME);\n private readonly speed = inject(TUI_ANIMATIONS_SPEED);\n protected readonly $ = this.sector$\n .pipe(\n pairwise(),\n switchMap(([prev, cur]) => {\n const now = this.performance.now();\n const startDelta = cur[0] - prev[0];\n const endDelta = cur[1] - prev[1];\n\n return this.animationFrame$.pipe(\n map((timestamp) =>\n tuiEaseInOutQuad(\n tuiClamp(\n (timestamp - now) / tuiGetDuration(this.speed),\n 0,\n 1,\n ),\n ),\n ),\n takeWhile((progress) => progress < 1, true),\n map((progress) => [\n prev[0] + startDelta * progress,\n cur[1] > 359 ? cur[1] : prev[1] + endDelta * progress,\n ]),\n );\n }),\n tuiZonefree(),\n takeUntilDestroyed(),\n )\n .subscribe(([start, end]) =>\n this.el.setAttribute('d', tuiDescribeSector(start, end)),\n );\n\n @Input()\n public set tuiPieChart(sector: readonly [number, number]) {\n this.sector$.next(sector);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n Output,\n} from '@angular/core';\nimport {TuiHovered} from '@taiga-ui/cdk/directives/hovered';\nimport {tuiInjectId} from '@taiga-ui/cdk/services';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiSum} from '@taiga-ui/cdk/utils/math';\nimport {tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TuiHint,\n TuiHintOptionsDirective,\n tuiHintOptionsProvider,\n} from '@taiga-ui/core/directives/hint';\nimport {type TuiSizeXL, type TuiSizeXS} from '@taiga-ui/core/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiPieChartDirective} from './pie-chart.directive';\n\nconst RADII = {\n xs: '50',\n s: '50',\n m: '77.8',\n l: '81.9',\n xl: '81.3',\n};\nconst TRANSFORM = {\n xs: 1.15,\n s: 1.25,\n m: 1.11,\n l: 1.09,\n xl: 1.08,\n};\n\n@Component({\n selector: 'tui-pie-chart',\n imports: [TuiHint, TuiHovered, TuiPieChartDirective],\n templateUrl: './pie-chart.template.html',\n styleUrl: './pie-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n tuiHintOptionsProvider({direction: 'top-right', appearance: 'floating'}),\n ],\n host: {\n '[attr.data-size]': 'size',\n '[class._empty]': 'empty',\n },\n})\nexport class TuiPieChart {\n private readonly hintOptions = inject(TuiHintOptionsDirective, {optional: true});\n private readonly autoId = tuiInjectId();\n\n @Input()\n public value: readonly number[] = [];\n\n @Input()\n public size: TuiSizeXL | TuiSizeXS = 'm';\n\n @Input()\n public masked = false;\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n constructor() {\n if (this.hintOptions) {\n this.hintOptions.showDelay = 0;\n this.hintOptions.hideDelay = 0;\n }\n }\n\n protected get empty(): boolean {\n return !this.getSum(this.value);\n }\n\n protected get hintContent(): PolymorpheusContent<TuiContext<number>> {\n return this.hintOptions?.content || '';\n }\n\n protected get maskId(): string {\n return `tui-ring-chart-${this.autoId}`;\n }\n\n protected get mask(): string | null {\n return this.masked ? `url(#${this.maskId})` : null;\n }\n\n protected get radius(): string {\n return RADII[this.size];\n }\n\n protected get segments(): ReadonlyArray<[number, number]> {\n return this.getSegments(this.value);\n }\n\n protected getTransform(index: number): string | null {\n const transform = this.masked\n ? `scale(${TRANSFORM[this.size]})`\n : `scale(${TRANSFORM.xs})`;\n\n return index === this.activeItemIndex ? transform : null;\n }\n\n protected onHovered(hovered: boolean, index: number): void {\n this.updateActiveItemIndex(hovered ? index : NaN);\n }\n\n @tuiPure\n private getSum(value: readonly number[]): number {\n return tuiSum(...value);\n }\n\n @tuiPure\n private getSegments(value: readonly number[]): ReadonlyArray<[number, number]> {\n return value\n .map((initial, i, array) =>\n array.reduce(\n (sum, current, j) => (j < i ? this.getDeg(current) + sum : sum),\n this.getDeg(initial),\n ),\n )\n .map((angle, index, array) => [\n array[index - 1] || 0,\n Math.min(angle, 359.9999),\n ]);\n }\n\n private getDeg(value: number): number {\n return 360 * (value / this.getSum(this.value)) || 0;\n }\n\n private updateActiveItemIndex(index: number): void {\n if (index === this.activeItemIndex) {\n return;\n }\n\n this.activeItemIndex = index;\n this.activeItemIndexChange.next(index);\n }\n}\n","<svg\n focusable=\"false\"\n height=\"100%\"\n viewBox=\"-100 -100 200 200\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-svg\"\n>\n <defs>\n <mask [attr.id]=\"maskId\">\n <rect\n fill=\"white\"\n height=\"400\"\n width=\"400\"\n x=\"-200\"\n y=\"-200\"\n />\n <circle\n cx=\"0\"\n cy=\"0\"\n [attr.r]=\"radius\"\n />\n </mask>\n </defs>\n <g [style.mask]=\"mask\">\n <circle\n cx=\"0\"\n cy=\"0\"\n r=\"100\"\n class=\"t-placeholder\"\n />\n @for (_ of '-'.repeat(segments.length); track $index) {\n <path\n automation-id=\"tui-pie-chart__segment\"\n d=\"\"\n fill=\"currentColor\"\n tuiHintPointer\n class=\"t-segment\"\n [attr.transform]=\"getTransform($index)\"\n [style.color]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [tuiHint]=\"hintContent\"\n [tuiHintContext]=\"{$implicit: $index}\"\n [tuiPieChart]=\"segments[$index] || [0, 0]\"\n (tuiHoveredChange)=\"onHovered($event, $index)\"\n />\n }\n </g>\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAea,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;QAIqB,IAAO,CAAA,OAAA,GAAG,IAAI,eAAe,CAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChE,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAkB;AACvC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AACpC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,KAAK,GAAG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;AAC5B,qBAAA,EAAA,QAAA,EAAA,i6CAAA,EAAA,MAAA,EAAA,CAAA,2kBAAA,CAAA,EAAA;wDAOM,KAAK,EAAA,CAAA;sBADX;gBAIM,IAAI,EAAA,CAAA;sBADV;gBAIM,MAAM,EAAA,CAAA;sBADZ;gBAIM,eAAe,EAAA,CAAA;sBADrB;gBAIe,qBAAqB,EAAA,CAAA;sBADpC;AA+CO,aAAA,CAAA,EAAA,MAAM,MAKN,WAAW,EAAA,EAAA,EAAA,EAAA,CAAA;;AExHvB;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-charts",
3
- "version": "4.52.0-canary.6ee9658",
3
+ "version": "4.52.0-canary.811ffeb",
4
4
  "description": "Extension package for Taiga UI that adds various charts, graphs and related components.",
5
5
  "keywords": [
6
6
  "angular",