@taiga-ui/addon-charts 4.52.0-canary.763e67d → 4.52.0-canary.7c53ccc
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.
- package/components/arc-chart/arc-chart.component.d.ts +2 -8
- package/components/axes/axes.component.d.ts +0 -4
- package/components/bar/bar.component.d.ts +4 -5
- package/components/bar-chart/bar-chart.component.d.ts +11 -14
- package/components/bar-set/bar-set.component.d.ts +7 -9
- package/components/chart-hint/chart-hint.directive.d.ts +8 -0
- package/components/chart-hint/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/legend-item/legend-item.component.d.ts +6 -7
- package/components/line-chart/line-chart-hint.directive.d.ts +3 -3
- package/components/line-chart/line-chart.component.d.ts +19 -25
- package/components/line-days-chart/line-days-chart-hint.directive.d.ts +2 -3
- package/components/line-days-chart/line-days-chart.component.d.ts +13 -14
- package/components/pie-chart/pie-chart.component.d.ts +7 -14
- package/components/pie-chart/pie-chart.directive.d.ts +2 -3
- package/components/ring-chart/ring-chart.component.d.ts +4 -9
- package/fesm2022/taiga-ui-addon-charts-components-arc-chart.mjs +12 -21
- package/fesm2022/taiga-ui-addon-charts-components-arc-chart.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-axes.mjs +5 -16
- package/fesm2022/taiga-ui-addon-charts-components-axes.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-bar-chart.mjs +23 -52
- package/fesm2022/taiga-ui-addon-charts-components-bar-chart.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-bar-set.mjs +13 -33
- package/fesm2022/taiga-ui-addon-charts-components-bar-set.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-bar.mjs +9 -20
- package/fesm2022/taiga-ui-addon-charts-components-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-chart-hint.mjs +24 -0
- package/fesm2022/taiga-ui-addon-charts-components-chart-hint.mjs.map +1 -0
- package/fesm2022/taiga-ui-addon-charts-components-legend-item.mjs +12 -25
- package/fesm2022/taiga-ui-addon-charts-components-legend-item.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-line-chart.mjs +61 -115
- package/fesm2022/taiga-ui-addon-charts-components-line-chart.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-line-days-chart.mjs +82 -112
- package/fesm2022/taiga-ui-addon-charts-components-line-days-chart.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-pie-chart.mjs +48 -81
- package/fesm2022/taiga-ui-addon-charts-components-pie-chart.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components-ring-chart.mjs +8 -27
- package/fesm2022/taiga-ui-addon-charts-components-ring-chart.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-charts-components.mjs +1 -0
- package/fesm2022/taiga-ui-addon-charts-components.mjs.map +1 -1
- package/package.json +9 -5
|
@@ -21,33 +21,22 @@ class TuiAxes {
|
|
|
21
21
|
this.horizontalLines = input(0);
|
|
22
22
|
this.horizontalLinesHandler = input(TUI_ALWAYS_SOLID);
|
|
23
23
|
this.verticalLines = input(0);
|
|
24
|
-
/**
|
|
25
|
-
* A function to handle vertical lines style.
|
|
26
|
-
* Initially set to always dashed.
|
|
27
|
-
*/
|
|
28
24
|
this.verticalLinesHandler = input(TUI_ALWAYS_DASHED);
|
|
29
25
|
this.fallbackLabel = CHAR_NO_BREAK_SPACE;
|
|
30
26
|
this.hasXLabels = computed(() => !!this.axisXLabels().length);
|
|
31
|
-
this.hasYLabels = computed(() =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return (this.axisYLabels().length && !this.axisYInset()) || !!yN;
|
|
35
|
-
});
|
|
36
|
-
this.hasYSecondaryLabels = computed(() => {
|
|
37
|
-
// keep this to prevent tracking loss on short circuits
|
|
38
|
-
const ySN = this.axisYSecondaryName();
|
|
39
|
-
return ((this.axisYSecondaryLabels().length && !this.axisYSecondaryInset()) || !!ySN);
|
|
40
|
-
});
|
|
27
|
+
this.hasYLabels = computed(() => (this.axisYLabels().length && !this.axisYInset()) || !!this.axisYName());
|
|
28
|
+
this.hasYSecondaryLabels = computed(() => (this.axisYSecondaryLabels().length && !this.axisYSecondaryInset()) ||
|
|
29
|
+
!!this.axisYSecondaryName());
|
|
41
30
|
}
|
|
42
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiAxes, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiAxes, isStandalone: true, selector: "tui-axes", inputs: { axisX: { classPropertyName: "axisX", publicName: "axisX", isSignal: true, isRequired: false, transformFunction: null }, axisXLabels: { classPropertyName: "axisXLabels", publicName: "axisXLabels", isSignal: true, isRequired: false, transformFunction: null }, axisY: { classPropertyName: "axisY", publicName: "axisY", isSignal: true, isRequired: false, transformFunction: null }, axisYInset: { classPropertyName: "axisYInset", publicName: "axisYInset", isSignal: true, isRequired: false, transformFunction: null }, axisYLabels: { classPropertyName: "axisYLabels", publicName: "axisYLabels", isSignal: true, isRequired: false, transformFunction: null }, axisYName: { classPropertyName: "axisYName", publicName: "axisYName", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryInset: { classPropertyName: "axisYSecondaryInset", publicName: "axisYSecondaryInset", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryLabels: { classPropertyName: "axisYSecondaryLabels", publicName: "axisYSecondaryLabels", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryName: { classPropertyName: "axisYSecondaryName", publicName: "axisYSecondaryName", isSignal: true, isRequired: false, transformFunction: null }, horizontalLines: { classPropertyName: "horizontalLines", publicName: "horizontalLines", isSignal: true, isRequired: false, transformFunction: null }, horizontalLinesHandler: { classPropertyName: "horizontalLinesHandler", publicName: "horizontalLinesHandler", isSignal: true, isRequired: false, transformFunction: null }, verticalLines: { classPropertyName: "verticalLines", publicName: "verticalLines", isSignal: true, isRequired: false, transformFunction: null }, verticalLinesHandler: { classPropertyName: "verticalLinesHandler", publicName: "verticalLinesHandler", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "dir": "ltr" }, properties: { "class._centered": "centeredXLabels()" } }, ngImport: i0, template: "@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\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 @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\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 {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\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-
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiAxes, isStandalone: true, selector: "tui-axes", inputs: { axisX: { classPropertyName: "axisX", publicName: "axisX", isSignal: true, isRequired: false, transformFunction: null }, axisXLabels: { classPropertyName: "axisXLabels", publicName: "axisXLabels", isSignal: true, isRequired: false, transformFunction: null }, axisY: { classPropertyName: "axisY", publicName: "axisY", isSignal: true, isRequired: false, transformFunction: null }, axisYInset: { classPropertyName: "axisYInset", publicName: "axisYInset", isSignal: true, isRequired: false, transformFunction: null }, axisYLabels: { classPropertyName: "axisYLabels", publicName: "axisYLabels", isSignal: true, isRequired: false, transformFunction: null }, axisYName: { classPropertyName: "axisYName", publicName: "axisYName", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryInset: { classPropertyName: "axisYSecondaryInset", publicName: "axisYSecondaryInset", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryLabels: { classPropertyName: "axisYSecondaryLabels", publicName: "axisYSecondaryLabels", isSignal: true, isRequired: false, transformFunction: null }, axisYSecondaryName: { classPropertyName: "axisYSecondaryName", publicName: "axisYSecondaryName", isSignal: true, isRequired: false, transformFunction: null }, horizontalLines: { classPropertyName: "horizontalLines", publicName: "horizontalLines", isSignal: true, isRequired: false, transformFunction: null }, horizontalLinesHandler: { classPropertyName: "horizontalLinesHandler", publicName: "horizontalLinesHandler", isSignal: true, isRequired: false, transformFunction: null }, verticalLines: { classPropertyName: "verticalLines", publicName: "verticalLines", isSignal: true, isRequired: false, transformFunction: null }, verticalLinesHandler: { classPropertyName: "verticalLinesHandler", publicName: "verticalLinesHandler", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "dir": "ltr" }, properties: { "class._centered": "centeredXLabels()" } }, ngImport: i0, template: "@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\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 @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\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 {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\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-body-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-body-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;inset:.5625rem auto -.75rem .25rem;pointer-events:none}.t-labels-y_inset_secondary{inset-inline:auto .25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-body-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;inset-inline-end: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;display:flex;inset:0 0 -1px -1px;align-items:flex-end}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
33
|
}
|
|
45
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiAxes, decorators: [{
|
|
46
35
|
type: Component,
|
|
47
36
|
args: [{ selector: 'tui-axes', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
48
37
|
dir: 'ltr',
|
|
49
38
|
'[class._centered]': 'centeredXLabels()',
|
|
50
|
-
}, template: "@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\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 @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\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 {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\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-
|
|
39
|
+
}, template: "@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\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 @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\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 {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\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-body-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-body-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;inset:.5625rem auto -.75rem .25rem;pointer-events:none}.t-labels-y_inset_secondary{inset-inline:auto .25rem;text-align:end}.t-labels-x{position:relative;display:flex;font:var(--tui-font-body-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;inset-inline-end: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;display:flex;inset:0 0 -1px -1px;align-items:flex-end}\n"] }]
|
|
51
40
|
}] });
|
|
52
41
|
|
|
53
42
|
/**
|
|
@@ -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, computed, 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 protected readonly centeredXLabels = computed(() => this.axisY() === 'none');\n\n public readonly axisX = input<TuiLineType>('solid');\n
|
|
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, computed, 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 protected readonly centeredXLabels = computed(() => this.axisY() === 'none');\n\n public readonly axisX = input<TuiLineType>('solid');\n public readonly axisXLabels = input<ReadonlyArray<string | null>>([]);\n public readonly axisY = input<TuiLineType>('solid');\n public readonly axisYInset = input(false);\n public readonly axisYLabels = input<readonly string[]>([]);\n public readonly axisYName = input('');\n public readonly axisYSecondaryInset = input(false);\n public readonly axisYSecondaryLabels = input<readonly string[]>([]);\n public readonly axisYSecondaryName = input('');\n public readonly horizontalLines = input(0);\n public readonly horizontalLinesHandler = input<TuiLineHandler>(TUI_ALWAYS_SOLID);\n public readonly verticalLines = input(0);\n public readonly verticalLinesHandler = input<TuiLineHandler>(TUI_ALWAYS_DASHED);\n\n public readonly fallbackLabel = CHAR_NO_BREAK_SPACE;\n\n public readonly hasXLabels = computed(() => !!this.axisXLabels().length);\n\n public readonly hasYLabels = computed(\n () => (this.axisYLabels().length && !this.axisYInset()) || !!this.axisYName(),\n );\n\n public readonly hasYSecondaryLabels = computed(\n () =>\n (this.axisYSecondaryLabels().length && !this.axisYSecondaryInset()) ||\n !!this.axisYSecondaryName(),\n );\n}\n","@let ySecLabels = axisYSecondaryLabels();\n@let ySecInset = axisYSecondaryInset();\n@let yLabels = axisYLabels();\n@let yInset = axisYInset();\n@let hasXs = hasXLabels();\n\n@if (hasYLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @let yName = axisYName();\n @if (yName) {\n <div\n automation-id=\"tui-axex__axis-y-name\"\n class=\"t-name t-name_primary\"\n >\n {{ yName }}\n </div>\n }\n @if (!yInset) {\n <div class=\"t-labels-y t-labels-y_primary\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\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 @let vLineFn = verticalLinesHandler();\n @let vLines = verticalLines();\n @for (_ of '-'.repeat(vLines); track $index) {\n <div\n automation-id=\"tui-axex__vertical-line\"\n class=\"t-line t-line_vertical\"\n [style.border-right-style]=\"vLineFn($index, vLines)\"\n ></div>\n }\n </div>\n <div class=\"t-horizontal\">\n @let hLineFn = horizontalLinesHandler();\n @let hLines = horizontalLines();\n @for (_ of '-'.repeat(hLines); track $index) {\n <div\n automation-id=\"tui-axex__horizontal-line\"\n class=\"t-line\"\n [style.border-top-style]=\"hLineFn($index, hLines)\"\n ></div>\n }\n </div>\n @if (yInset) {\n <div class=\"t-labels-y t-labels-y_inset\">\n @for (label of yLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @if (ySecInset) {\n <div class=\"t-labels-y t-labels-y_inset t-labels-y_inset_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n <div class=\"t-content\">\n <ng-content />\n </div>\n </div>\n @if (hasXs) {\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 {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n</div>\n@if (hasYSecondaryLabels()) {\n <div\n class=\"t-side\"\n [class.t-side_padding]=\"hasXs\"\n >\n @if (!ySecInset) {\n <div class=\"t-labels-y t-labels-y_secondary\">\n @for (label of ySecLabels; track label) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-label\"\n class=\"t-label-y\"\n >\n {{ label || fallbackLabel }}\n </div>\n }\n </div>\n }\n @let axisYSec = axisYSecondaryName();\n @if (axisYSec) {\n <div\n automation-id=\"tui-axex__axis-y-secondary-name\"\n class=\"t-name\"\n >\n {{ axisYSec }}\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;AAWuB,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,MAAM,CAAC;AAE5D,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAc,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA+B,EAAE,CAAC;AACrD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAc,OAAO,CAAC;AACnC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC;AACzB,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAoB,EAAE,CAAC;AAC1C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,EAAE,CAAC;AACrB,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAC,KAAK,CAAC;AAClC,QAAA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAoB,EAAE,CAAC;AACnD,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAC,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC;AAC1B,QAAA,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAiB,gBAAgB,CAAC;AAChE,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC;AACxB,QAAA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAiB,iBAAiB,CAAC;QAE/D,IAAa,CAAA,aAAA,GAAG,mBAAmB;AAEnC,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC;AAExD,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CACjC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAChF;AAEe,QAAA,IAAA,CAAA,mBAAmB,GAAG,QAAQ,CAC1C,MACI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;AAClE,YAAA,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAClC;AACJ;+GA9BY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,2hECnBpB,mwIAoIA,EAAA,MAAA,EAAA,CAAA,+pEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDjHa,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,mBAAmB;AAC3C,qBAAA,EAAA,QAAA,EAAA,mwIAAA,EAAA,MAAA,EAAA,CAAA,+pEAAA,CAAA,EAAA;;;AEjBL;;AAEG;;;;"}
|
|
@@ -1,78 +1,49 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
1
|
import { AsyncPipe } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject,
|
|
3
|
+
import { inject, computed, viewChildren, input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
4
|
import { TuiBarSet } from '@taiga-ui/addon-charts/components/bar-set';
|
|
6
|
-
import {
|
|
5
|
+
import { TuiChartHint } from '@taiga-ui/addon-charts/components/chart-hint';
|
|
7
6
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
8
7
|
import { tuiSum } from '@taiga-ui/cdk/utils/math';
|
|
9
|
-
import { tuiGenerateId
|
|
8
|
+
import { tuiGenerateId } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
10
9
|
import * as i1 from '@taiga-ui/core/portals/hint';
|
|
11
|
-
import {
|
|
10
|
+
import { TuiHintHover, tuiHintOptionsProvider, TuiHint } from '@taiga-ui/core/portals/hint';
|
|
12
11
|
|
|
13
12
|
class TuiBarChart {
|
|
14
13
|
constructor() {
|
|
15
|
-
this.hintOptions = inject(
|
|
14
|
+
this.hintOptions = inject(TuiChartHint, { optional: true });
|
|
16
15
|
this.autoId = tuiGenerateId();
|
|
17
|
-
this.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this.
|
|
16
|
+
this.getMax = computed(() => this.collapsed()
|
|
17
|
+
? Math.max(
|
|
18
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
19
|
+
...this.value().reduce((result, next) => result.map((value, index) => value + (next[index] || 0))))
|
|
20
|
+
: this.value().reduce((max, value) => Math.max(...value, max), 0));
|
|
21
|
+
this.transposed = computed(() => this.value().reduce((result, next) => next.map((_, index) => [...(result[index] || []), next[index] || 0]), []));
|
|
22
|
+
this.drivers = viewChildren(TuiHintHover);
|
|
23
|
+
this.value = input([]);
|
|
24
|
+
this.max = input(NaN);
|
|
25
|
+
this.size = input('m');
|
|
26
|
+
this.collapsed = input(false);
|
|
27
|
+
this.tapColumn = output();
|
|
28
|
+
this.computedMax = computed(() => this.max() || this.getMax());
|
|
23
29
|
this.percentMapper = (set, collapsed, max) => (100 * (collapsed ? tuiSum(...set) : Math.max(...set))) / max;
|
|
24
30
|
}
|
|
25
|
-
get transposed() {
|
|
26
|
-
return this.transpose(this.value);
|
|
27
|
-
}
|
|
28
|
-
get computedMax() {
|
|
29
|
-
return this.max || this.getMax(this.value, this.collapsed);
|
|
30
|
-
}
|
|
31
31
|
get hintContent() {
|
|
32
|
-
return this.hintOptions?.content || '';
|
|
32
|
+
return this.hintOptions?.content() || '';
|
|
33
33
|
}
|
|
34
34
|
get hintAppearance() {
|
|
35
|
-
return this.hintOptions?.appearance || '';
|
|
35
|
+
return this.hintOptions?.appearance() || '';
|
|
36
36
|
}
|
|
37
37
|
getHintId(index) {
|
|
38
38
|
return `${this.autoId}_${index}`;
|
|
39
39
|
}
|
|
40
|
-
transpose(value) {
|
|
41
|
-
return value.reduce((result, next) => next.map((_, index) => [...(result[index] || []), next[index] || 0]), []);
|
|
42
|
-
}
|
|
43
|
-
getMax(values, collapsed) {
|
|
44
|
-
return collapsed
|
|
45
|
-
? Math.max(
|
|
46
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
47
|
-
...values.reduce((result, next) => result.map((value, index) => value + (next[index] || 0))))
|
|
48
|
-
: values.reduce((max, value) => Math.max(...value, max), 0);
|
|
49
|
-
}
|
|
50
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBarChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
51
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBarChart, isStandalone: true, selector: "tui-bar-chart", inputs: { value: "value", max: "max", size: "size", collapsed: "collapsed" }, outputs: { tapColumn: "tapColumn" }, viewQueries: [{ propertyName: "drivers", predicate: TuiHintHover, descendants: true }], ngImport: i0, template: "@for (set of transposed; track
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBarChart, isStandalone: true, selector: "tui-bar-chart", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tapColumn: "tapColumn" }, viewQueries: [{ propertyName: "drivers", predicate: TuiHintHover, descendants: true, isSignal: true }], ngImport: i0, template: "@for (set of transposed(); track $index) {\n <div\n class=\"t-wrapper\"\n [class.t-wrapper_hoverable]=\"!!hintContent\"\n [class.t-wrapper_hovered]=\"drivers()[$index] | async\"\n [tuiHint]=\"hintContent\"\n [tuiHintAppearance]=\"hintAppearance\"\n [tuiHintContext]=\"{$implicit: $index}\"\n [tuiHintDescribe]=\"getHintId($index)\"\n [tuiHintHost]=\"hintHost\"\n (click)=\"tapColumn.emit($index)\"\n (keydown.enter)=\"tapColumn.emit($index)\"\n (mouseenter.once)=\"(0)\"\n >\n <div\n class=\"t-container\"\n [style.height.%]=\"set | tuiMapper: percentMapper : collapsed() : computedMax()\"\n >\n <div\n #hintHost\n class=\"t-host\"\n ></div>\n <tui-bar-set\n class=\"t-set\"\n [collapsed]=\"collapsed()\"\n [id]=\"getHintId($index)\"\n [size]=\"size()\"\n [tabIndex]=\"hintContent ? 0 : -1\"\n [value]=\"set\"\n />\n </div>\n </div>\n}\n", styles: [":host{display:flex;flex:1;block-size:100%}.t-wrapper{transition-property:background-color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1;align-items:flex-end;justify-content:center;block-size:100%}.t-wrapper_hoverable{cursor:pointer}.t-wrapper_hoverable:hover,.t-wrapper_hoverable.t-wrapper_hovered{background-color:#0000000d}.t-container{flex:1}.t-host{position:absolute;inset-inline:50%}.t-set{border-radius:var(--tui-radius-m);pointer-events:none;outline:none}.t-set:focus{box-shadow:0 0 0 2px var(--tui-border-focus)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: TuiBarSet, selector: "tui-bar-set", inputs: ["value", "size", "collapsed"] }, { kind: "directive", type: i1.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i1.TuiHintDescribe, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { kind: "directive", type: i1.TuiHintHost, selector: "[tuiHint][tuiHintHost]", inputs: ["tuiHintHost"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }], viewProviders: [tuiHintOptionsProvider({ direction: 'top' })], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
52
42
|
}
|
|
53
|
-
__decorate([
|
|
54
|
-
tuiPure
|
|
55
|
-
], TuiBarChart.prototype, "transpose", null);
|
|
56
|
-
__decorate([
|
|
57
|
-
tuiPure
|
|
58
|
-
], TuiBarChart.prototype, "getMax", null);
|
|
59
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBarChart, decorators: [{
|
|
60
44
|
type: Component,
|
|
61
|
-
args: [{ selector: 'tui-bar-chart', imports: [AsyncPipe, TuiBarSet, TuiHint, TuiMapperPipe], changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [tuiHintOptionsProvider({ direction: 'top' })], template: "@for (set of transposed; track
|
|
62
|
-
}]
|
|
63
|
-
type: ViewChildren,
|
|
64
|
-
args: [TuiHintHover]
|
|
65
|
-
}], value: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], max: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], size: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], collapsed: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}], tapColumn: [{
|
|
74
|
-
type: Output
|
|
75
|
-
}], transpose: [], getMax: [] } });
|
|
45
|
+
args: [{ selector: 'tui-bar-chart', imports: [AsyncPipe, TuiBarSet, TuiHint, TuiMapperPipe], changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [tuiHintOptionsProvider({ direction: 'top' })], template: "@for (set of transposed(); track $index) {\n <div\n class=\"t-wrapper\"\n [class.t-wrapper_hoverable]=\"!!hintContent\"\n [class.t-wrapper_hovered]=\"drivers()[$index] | async\"\n [tuiHint]=\"hintContent\"\n [tuiHintAppearance]=\"hintAppearance\"\n [tuiHintContext]=\"{$implicit: $index}\"\n [tuiHintDescribe]=\"getHintId($index)\"\n [tuiHintHost]=\"hintHost\"\n (click)=\"tapColumn.emit($index)\"\n (keydown.enter)=\"tapColumn.emit($index)\"\n (mouseenter.once)=\"(0)\"\n >\n <div\n class=\"t-container\"\n [style.height.%]=\"set | tuiMapper: percentMapper : collapsed() : computedMax()\"\n >\n <div\n #hintHost\n class=\"t-host\"\n ></div>\n <tui-bar-set\n class=\"t-set\"\n [collapsed]=\"collapsed()\"\n [id]=\"getHintId($index)\"\n [size]=\"size()\"\n [tabIndex]=\"hintContent ? 0 : -1\"\n [value]=\"set\"\n />\n </div>\n </div>\n}\n", styles: [":host{display:flex;flex:1;block-size:100%}.t-wrapper{transition-property:background-color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1;align-items:flex-end;justify-content:center;block-size:100%}.t-wrapper_hoverable{cursor:pointer}.t-wrapper_hoverable:hover,.t-wrapper_hoverable.t-wrapper_hovered{background-color:#0000000d}.t-container{flex:1}.t-host{position:absolute;inset-inline:50%}.t-set{border-radius:var(--tui-radius-m);pointer-events:none;outline:none}.t-set:focus{box-shadow:0 0 0 2px var(--tui-border-focus)}\n"] }]
|
|
46
|
+
}] });
|
|
76
47
|
|
|
77
48
|
/**
|
|
78
49
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-charts-components-bar-chart.mjs","sources":["../../../projects/addon-charts/components/bar-chart/bar-chart.component.ts","../../../projects/addon-charts/components/bar-chart/bar-chart.template.html","../../../projects/addon-charts/components/bar-chart/taiga-ui-addon-charts-components-bar-chart.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-charts-components-bar-chart.mjs","sources":["../../../projects/addon-charts/components/bar-chart/bar-chart.component.ts","../../../projects/addon-charts/components/bar-chart/bar-chart.template.html","../../../projects/addon-charts/components/bar-chart/taiga-ui-addon-charts-components-bar-chart.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n output,\n viewChildren,\n} from '@angular/core';\nimport {TuiBarSet} from '@taiga-ui/addon-charts/components/bar-set';\nimport {TuiChartHint} from '@taiga-ui/addon-charts/components/chart-hint';\nimport {TuiMapperPipe} from '@taiga-ui/cdk/pipes/mapper';\nimport {type TuiContext, type TuiMapper} from '@taiga-ui/cdk/types';\nimport {tuiSum} from '@taiga-ui/cdk/utils/math';\nimport {tuiGenerateId} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiHint, TuiHintHover, tuiHintOptionsProvider} from '@taiga-ui/core/portals/hint';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-bar-chart',\n imports: [AsyncPipe, TuiBarSet, TuiHint, TuiMapperPipe],\n templateUrl: './bar-chart.template.html',\n styleUrl: './bar-chart.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [tuiHintOptionsProvider({direction: 'top'})],\n})\nexport class TuiBarChart {\n private readonly hintOptions = inject(TuiChartHint, {optional: true});\n private readonly autoId = tuiGenerateId();\n private readonly getMax = computed(() =>\n this.collapsed()\n ? Math.max(\n // eslint-disable-next-line no-restricted-syntax\n ...this.value().reduce((result, next) =>\n result.map((value, index) => value + (next[index] || 0)),\n ),\n )\n : this.value().reduce((max, value) => Math.max(...value, max), 0),\n );\n\n protected readonly transposed = computed(() =>\n this.value().reduce<ReadonlyArray<readonly number[]>>(\n (result, next) =>\n next.map((_, index) => [...(result[index] || []), next[index] || 0]),\n [],\n ),\n );\n\n protected readonly drivers = viewChildren(TuiHintHover);\n\n public readonly value = input<ReadonlyArray<readonly number[]>>([]);\n public readonly max = input(NaN);\n public readonly size = input<TuiSizeL | TuiSizeS | null>('m');\n public readonly collapsed = input(false);\n public readonly tapColumn = output<number>();\n\n public readonly computedMax = computed(() => this.max() || this.getMax());\n public readonly percentMapper: TuiMapper<\n [readonly number[], boolean, number],\n number\n > = (set, collapsed, max) =>\n (100 * (collapsed ? tuiSum(...set) : Math.max(...set))) / max;\n\n protected get hintContent(): PolymorpheusContent<TuiContext<number>> {\n return this.hintOptions?.content() || '';\n }\n\n protected get hintAppearance(): string {\n return this.hintOptions?.appearance() || '';\n }\n\n protected getHintId(index: number): string {\n return `${this.autoId}_${index}`;\n }\n}\n","@for (set of transposed(); track $index) {\n <div\n class=\"t-wrapper\"\n [class.t-wrapper_hoverable]=\"!!hintContent\"\n [class.t-wrapper_hovered]=\"drivers()[$index] | async\"\n [tuiHint]=\"hintContent\"\n [tuiHintAppearance]=\"hintAppearance\"\n [tuiHintContext]=\"{$implicit: $index}\"\n [tuiHintDescribe]=\"getHintId($index)\"\n [tuiHintHost]=\"hintHost\"\n (click)=\"tapColumn.emit($index)\"\n (keydown.enter)=\"tapColumn.emit($index)\"\n (mouseenter.once)=\"(0)\"\n >\n <div\n class=\"t-container\"\n [style.height.%]=\"set | tuiMapper: percentMapper : collapsed() : computedMax()\"\n >\n <div\n #hintHost\n class=\"t-host\"\n ></div>\n <tui-bar-set\n class=\"t-set\"\n [collapsed]=\"collapsed()\"\n [id]=\"getHintId($index)\"\n [size]=\"size()\"\n [tabIndex]=\"hintContent ? 0 : -1\"\n [value]=\"set\"\n />\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,52 +1,32 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
3
|
+
import { computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
4
|
import { TuiBar } from '@taiga-ui/addon-charts/components/bar';
|
|
6
|
-
import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
7
5
|
|
|
8
6
|
const PERCENT = 100;
|
|
9
7
|
const EMPTY_ARRAY = [];
|
|
10
8
|
const FILLER_ARRAY = [1];
|
|
11
9
|
class TuiBarSet {
|
|
12
10
|
constructor() {
|
|
13
|
-
this.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return this.collapsed ? this.value : EMPTY_ARRAY;
|
|
22
|
-
}
|
|
23
|
-
get computedSize() {
|
|
24
|
-
return this.size || 'm';
|
|
11
|
+
this.largest = computed(() => this.computedValue().some((a) => a > 0)
|
|
12
|
+
? this.computedValue().reduce((a, b) => (a > b ? a : b), 0)
|
|
13
|
+
: Math.abs(this.computedValue().reduce((a, b) => (a < b ? a : b), 0)));
|
|
14
|
+
this.value = input([]);
|
|
15
|
+
this.size = input('m');
|
|
16
|
+
this.collapsed = input(false);
|
|
17
|
+
this.computedValue = computed(() => this.collapsed() ? FILLER_ARRAY : this.value());
|
|
18
|
+
this.computedSegments = computed(() => this.collapsed() ? this.value() : EMPTY_ARRAY);
|
|
25
19
|
}
|
|
26
20
|
getHeight(value) {
|
|
27
|
-
return Math.abs((PERCENT * value) / this.
|
|
28
|
-
}
|
|
29
|
-
getLargest(value) {
|
|
30
|
-
return value.some((a) => a > 0)
|
|
31
|
-
? value.reduce((a, b) => (a > b ? a : b), 0)
|
|
32
|
-
: Math.abs(value.reduce((a, b) => (a < b ? a : b), 0));
|
|
21
|
+
return Math.abs((PERCENT * value) / this.largest());
|
|
33
22
|
}
|
|
34
23
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBarSet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBarSet, isStandalone: true, selector: "tui-bar-set", inputs: { value: "value", size: "size", collapsed: "collapsed" }, ngImport: i0, template: "@if (size) {\n @for (item of computedValue; track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue; track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBarSet, isStandalone: true, selector: "tui-bar-set", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (size()) {\n @for (item of computedValue(); track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue(); track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"size() || 'm'\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments()\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n", styles: [":host{position:relative;display:flex;block-size:100%;align-items:flex-end;justify-content:center}.t-wrapper{display:flex;flex:1;block-size:100%;align-items:flex-end}.t-wrapper:first-of-type{margin-inline-start:25%}.t-wrapper:last-of-type{margin-inline-end:25%}.t-bar{transform-origin:bottom center}.t-bar_negative{transform:rotate(180deg);opacity:var(--tui-disabled-opacity)}.t-bar.t-bar_flexible{max-inline-size:none;inline-size:75%;margin:0 auto}.t-label{position:absolute;inset-block-start:-1.5rem;font:var(--tui-font-body-xs);color:var(--tui-text-secondary)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TuiBar, selector: "tui-bar", inputs: ["value", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36
25
|
}
|
|
37
|
-
__decorate([
|
|
38
|
-
tuiPure
|
|
39
|
-
], TuiBarSet.prototype, "getLargest", null);
|
|
40
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBarSet, decorators: [{
|
|
41
27
|
type: Component,
|
|
42
|
-
args: [{ selector: 'tui-bar-set', imports: [NgTemplateOutlet, TuiBar], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (size) {\n @for (item of computedValue; track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue; track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"
|
|
43
|
-
}]
|
|
44
|
-
type: Input
|
|
45
|
-
}], size: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}], collapsed: [{
|
|
48
|
-
type: Input
|
|
49
|
-
}], getLargest: [] } });
|
|
28
|
+
args: [{ selector: 'tui-bar-set', imports: [NgTemplateOutlet, TuiBar], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (size()) {\n @for (item of computedValue(); track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue(); track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"size() || 'm'\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments()\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n", styles: [":host{position:relative;display:flex;block-size:100%;align-items:flex-end;justify-content:center}.t-wrapper{display:flex;flex:1;block-size:100%;align-items:flex-end}.t-wrapper:first-of-type{margin-inline-start:25%}.t-wrapper:last-of-type{margin-inline-end:25%}.t-bar{transform-origin:bottom center}.t-bar_negative{transform:rotate(180deg);opacity:var(--tui-disabled-opacity)}.t-bar.t-bar_flexible{max-inline-size:none;inline-size:75%;margin:0 auto}.t-label{position:absolute;inset-block-start:-1.5rem;font:var(--tui-font-body-xs);color:var(--tui-text-secondary)}\n"] }]
|
|
29
|
+
}] });
|
|
50
30
|
|
|
51
31
|
/**
|
|
52
32
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-charts-components-bar-set.mjs","sources":["../../../projects/addon-charts/components/bar-set/bar-set.component.ts","../../../projects/addon-charts/components/bar-set/bar-set.template.html","../../../projects/addon-charts/components/bar-set/taiga-ui-addon-charts-components-bar-set.ts"],"sourcesContent":["import {NgTemplateOutlet} from '@angular/common';\nimport {ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-charts-components-bar-set.mjs","sources":["../../../projects/addon-charts/components/bar-set/bar-set.component.ts","../../../projects/addon-charts/components/bar-set/bar-set.template.html","../../../projects/addon-charts/components/bar-set/taiga-ui-addon-charts-components-bar-set.ts"],"sourcesContent":["import {NgTemplateOutlet} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, computed, input} from '@angular/core';\nimport {TuiBar} from '@taiga-ui/addon-charts/components/bar';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nconst PERCENT = 100;\nconst EMPTY_ARRAY: readonly number[] = [];\nconst FILLER_ARRAY: readonly number[] = [1];\n\n@Component({\n selector: 'tui-bar-set',\n imports: [NgTemplateOutlet, TuiBar],\n templateUrl: './bar-set.template.html',\n styleUrl: './bar-set.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiBarSet {\n private readonly largest = computed(() =>\n this.computedValue().some((a) => a > 0)\n ? this.computedValue().reduce((a, b) => (a > b ? a : b), 0)\n : Math.abs(this.computedValue().reduce((a, b) => (a < b ? a : b), 0)),\n );\n\n public readonly value = input<readonly number[]>([]);\n public readonly size = input<TuiSizeL | TuiSizeS | null>('m');\n public readonly collapsed = input(false);\n\n protected readonly computedValue = computed<readonly number[]>(() =>\n this.collapsed() ? FILLER_ARRAY : this.value(),\n );\n\n protected readonly computedSegments = computed<readonly number[]>(() =>\n this.collapsed() ? this.value() : EMPTY_ARRAY,\n );\n\n protected getHeight(value: number): number {\n return Math.abs((PERCENT * value) / this.largest());\n }\n}\n","@if (size()) {\n @for (item of computedValue(); track item) {\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: false}\"\n />\n }\n} @else {\n @for (item of computedValue(); track item) {\n <div class=\"t-wrapper\">\n <ng-container\n [ngTemplateOutlet]=\"bar\"\n [ngTemplateOutletContext]=\"{$implicit: item, index: $index, flexible: true}\"\n />\n </div>\n }\n}\n<ng-template\n #bar\n let-flexible=\"flexible\"\n let-index=\"index\"\n let-item\n>\n <tui-bar\n automation-id=\"tui-bar-set__bar\"\n class=\"t-bar\"\n [class.t-bar_flexible]=\"flexible\"\n [class.t-bar_negative]=\"item < 0\"\n [size]=\"size() || 'm'\"\n [style.background]=\"`var(--tui-chart-categorical-${index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n [value]=\"computedSegments()\"\n />\n</ng-template>\n<span class=\"t-label\">\n <ng-content />\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
2
|
+
import { computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
3
|
import { tuiSum } from '@taiga-ui/cdk/utils/math';
|
|
5
|
-
import { tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
4
|
|
|
7
5
|
class TuiBar {
|
|
8
6
|
constructor() {
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
7
|
+
this.sum = computed(() => tuiSum(...this.value()));
|
|
8
|
+
this.value = input([]);
|
|
9
|
+
this.size = input('m');
|
|
11
10
|
}
|
|
12
11
|
getHeight(value) {
|
|
13
|
-
return (100 * value) / this.
|
|
14
|
-
}
|
|
15
|
-
getSum(value) {
|
|
16
|
-
return tuiSum(...value);
|
|
12
|
+
return (100 * value) / this.sum();
|
|
17
13
|
}
|
|
18
14
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBar, isStandalone: true, selector: "tui-bar", inputs: { value: "value", size: "size" }, host: { properties: { "attr.data-size": "size" } }, ngImport: i0, template: "@for (item of value; track item) {\n <div\n automation-id=\"tui-bar__bar\"\n [style.background]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n ></div>\n}\n", styles: [":host{display:flex;min-inline-size:.125rem;flex-direction:column-reverse;border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:hidden}:host[data-size=l]{inline-size:1rem;max-inline-size:1rem;margin:0 .1875rem}:host[data-size=m]{inline-size:.5rem;max-inline-size:.5rem;margin:0 .1875rem}:host[data-size=s]{inline-size:.25rem;max-inline-size:.5rem;margin:0 .125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiBar, isStandalone: true, selector: "tui-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()" } }, ngImport: i0, template: "@for (item of value(); track item) {\n <div\n automation-id=\"tui-bar__bar\"\n [style.background]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n ></div>\n}\n", styles: [":host{display:flex;min-inline-size:.125rem;flex-direction:column-reverse;border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:hidden}:host[data-size=l]{inline-size:1rem;max-inline-size:1rem;margin:0 .1875rem}:host[data-size=m]{inline-size:.5rem;max-inline-size:.5rem;margin:0 .1875rem}:host[data-size=s]{inline-size:.25rem;max-inline-size:.5rem;margin:0 .125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20
16
|
}
|
|
21
|
-
__decorate([
|
|
22
|
-
tuiPure
|
|
23
|
-
], TuiBar.prototype, "getSum", null);
|
|
24
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiBar, decorators: [{
|
|
25
18
|
type: Component,
|
|
26
19
|
args: [{ selector: 'tui-bar', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
27
|
-
'[attr.data-size]': 'size',
|
|
28
|
-
}, template: "@for (item of value; track item) {\n <div\n automation-id=\"tui-bar__bar\"\n [style.background]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n ></div>\n}\n", styles: [":host{display:flex;min-inline-size:.125rem;flex-direction:column-reverse;border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:hidden}:host[data-size=l]{inline-size:1rem;max-inline-size:1rem;margin:0 .1875rem}:host[data-size=m]{inline-size:.5rem;max-inline-size:.5rem;margin:0 .1875rem}:host[data-size=s]{inline-size:.25rem;max-inline-size:.5rem;margin:0 .125rem}\n"] }]
|
|
29
|
-
}]
|
|
30
|
-
type: Input
|
|
31
|
-
}], size: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}], getSum: [] } });
|
|
20
|
+
'[attr.data-size]': 'size()',
|
|
21
|
+
}, template: "@for (item of value(); track item) {\n <div\n automation-id=\"tui-bar__bar\"\n [style.background]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n ></div>\n}\n", styles: [":host{display:flex;min-inline-size:.125rem;flex-direction:column-reverse;border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:hidden}:host[data-size=l]{inline-size:1rem;max-inline-size:1rem;margin:0 .1875rem}:host[data-size=m]{inline-size:.5rem;max-inline-size:.5rem;margin:0 .1875rem}:host[data-size=s]{inline-size:.25rem;max-inline-size:.5rem;margin:0 .125rem}\n"] }]
|
|
22
|
+
}] });
|
|
34
23
|
|
|
35
24
|
/**
|
|
36
25
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-charts-components-bar.mjs","sources":["../../../projects/addon-charts/components/bar/bar.component.ts","../../../projects/addon-charts/components/bar/bar.template.html","../../../projects/addon-charts/components/bar/taiga-ui-addon-charts-components-bar.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-charts-components-bar.mjs","sources":["../../../projects/addon-charts/components/bar/bar.component.ts","../../../projects/addon-charts/components/bar/bar.template.html","../../../projects/addon-charts/components/bar/taiga-ui-addon-charts-components-bar.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, input} from '@angular/core';\nimport {tuiSum} from '@taiga-ui/cdk/utils/math';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\n@Component({\n selector: 'tui-bar',\n templateUrl: './bar.template.html',\n styleUrl: './bar.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size()',\n },\n})\nexport class TuiBar {\n private readonly sum = computed(() => tuiSum(...this.value()));\n\n public readonly value = input<readonly number[]>([]);\n public readonly size = input<TuiSizeL | TuiSizeS>('m');\n\n protected getHeight(value: number): number {\n return (100 * value) / this.sum();\n }\n}\n","@for (item of value(); track item) {\n <div\n automation-id=\"tui-bar__bar\"\n [style.background]=\"`var(--tui-chart-categorical-${$index.toString().padStart(2, '0')})`\"\n [style.height.%]=\"getHeight(item)\"\n ></div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,MAAM,CAAA;AATnB,IAAA,WAAA,GAAA;AAUqB,QAAA,IAAA,CAAA,GAAG,GAAG,QAAQ,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;AAE9C,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoB,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAsB,GAAG,CAAC;AAKzD;AAHa,IAAA,SAAS,CAAC,KAAa,EAAA;QAC7B,OAAO,CAAC,GAAG,GAAG,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE;;+GAP5B,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,kXCbnB,6PAOA,EAAA,MAAA,EAAA,CAAA,yZAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDMa,MAAM,EAAA,UAAA,EAAA,CAAA;kBATlB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAGF,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,QAAQ;AAC/B,qBAAA,EAAA,QAAA,EAAA,6PAAA,EAAA,MAAA,EAAA,CAAA,yZAAA,CAAA,EAAA;;;AEXL;;AAEG;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Directive } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class TuiChartHint {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.content = input('', { alias: 'tuiHintContent' });
|
|
7
|
+
this.appearance = input('', { alias: 'tuiHintAppearance' });
|
|
8
|
+
}
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiChartHint, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiChartHint, isStandalone: true, selector: "[tuiHintContent]", inputs: { content: { classPropertyName: "content", publicName: "tuiHintContent", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "tuiHintAppearance", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiChartHint, decorators: [{
|
|
13
|
+
type: Directive,
|
|
14
|
+
args: [{
|
|
15
|
+
selector: '[tuiHintContent]',
|
|
16
|
+
}]
|
|
17
|
+
}] });
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generated bundle index. Do not edit.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
export { TuiChartHint };
|
|
24
|
+
//# sourceMappingURL=taiga-ui-addon-charts-components-chart-hint.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-charts-components-chart-hint.mjs","sources":["../../../projects/addon-charts/components/chart-hint/chart-hint.directive.ts","../../../projects/addon-charts/components/chart-hint/taiga-ui-addon-charts-components-chart-hint.ts"],"sourcesContent":["import {Directive, input} from '@angular/core';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\n@Directive({\n selector: '[tuiHintContent]',\n})\nexport class TuiChartHint {\n public readonly content = input<PolymorpheusContent>('', {alias: 'tuiHintContent'});\n public readonly appearance = input('', {alias: 'tuiHintAppearance'});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,YAAY,CAAA;AAHzB,IAAA,WAAA,GAAA;QAIoB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAsB,EAAE,EAAE,EAAC,KAAK,EAAE,gBAAgB,EAAC,CAAC;QACnE,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC,EAAE,EAAE,EAAC,KAAK,EAAE,mBAAmB,EAAC,CAAC;AACvE;+GAHY,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC/B,iBAAA;;;ACLD;;AAEG;;;;"}
|