@area8975/ui 0.2.2-dev.49 → 0.2.2-dev.50
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/README.md +3 -2
- package/fesm2022/area8975-ui-alert.mjs +113 -0
- package/fesm2022/area8975-ui-alert.mjs.map +1 -0
- package/fesm2022/area8975-ui-avatar.mjs +157 -0
- package/fesm2022/area8975-ui-avatar.mjs.map +1 -0
- package/fesm2022/area8975-ui-badge.mjs +116 -0
- package/fesm2022/area8975-ui-badge.mjs.map +1 -0
- package/fesm2022/area8975-ui-button.mjs +314 -0
- package/fesm2022/area8975-ui-button.mjs.map +1 -0
- package/fesm2022/area8975-ui-calendar.mjs +549 -0
- package/fesm2022/area8975-ui-calendar.mjs.map +1 -0
- package/fesm2022/area8975-ui-card-header.mjs +96 -0
- package/fesm2022/area8975-ui-card-header.mjs.map +1 -0
- package/fesm2022/area8975-ui-card.mjs +73 -0
- package/fesm2022/area8975-ui-card.mjs.map +1 -0
- package/fesm2022/area8975-ui-chart-palette.mjs +225 -0
- package/fesm2022/area8975-ui-chart-palette.mjs.map +1 -0
- package/fesm2022/area8975-ui-charts.mjs +2813 -0
- package/fesm2022/area8975-ui-charts.mjs.map +1 -0
- package/fesm2022/area8975-ui-checkbox.mjs +202 -0
- package/fesm2022/area8975-ui-checkbox.mjs.map +1 -0
- package/fesm2022/area8975-ui-colour.mjs +200 -0
- package/fesm2022/area8975-ui-colour.mjs.map +1 -0
- package/fesm2022/area8975-ui-container.mjs +40 -0
- package/fesm2022/area8975-ui-container.mjs.map +1 -0
- package/fesm2022/area8975-ui-counter.mjs +246 -0
- package/fesm2022/area8975-ui-counter.mjs.map +1 -0
- package/fesm2022/area8975-ui-date-range-picker.mjs +554 -0
- package/fesm2022/area8975-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/area8975-ui-datepicker.mjs +547 -0
- package/fesm2022/area8975-ui-datepicker.mjs.map +1 -0
- package/fesm2022/area8975-ui-disclosure.mjs +279 -0
- package/fesm2022/area8975-ui-disclosure.mjs.map +1 -0
- package/fesm2022/area8975-ui-drawer.mjs +106 -0
- package/fesm2022/area8975-ui-drawer.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown-button.mjs +141 -0
- package/fesm2022/area8975-ui-dropdown-button.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown-menu.mjs +96 -0
- package/fesm2022/area8975-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown.mjs +208 -0
- package/fesm2022/area8975-ui-dropdown.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropzone.mjs +332 -0
- package/fesm2022/area8975-ui-dropzone.mjs.map +1 -0
- package/fesm2022/area8975-ui-field.mjs +191 -0
- package/fesm2022/area8975-ui-field.mjs.map +1 -0
- package/fesm2022/area8975-ui-file-input.mjs +340 -0
- package/fesm2022/area8975-ui-file-input.mjs.map +1 -0
- package/fesm2022/area8975-ui-file.mjs +47 -0
- package/fesm2022/area8975-ui-file.mjs.map +1 -0
- package/fesm2022/area8975-ui-format.mjs +70 -0
- package/fesm2022/area8975-ui-format.mjs.map +1 -0
- package/fesm2022/area8975-ui-input-addon.mjs +42 -0
- package/fesm2022/area8975-ui-input-addon.mjs.map +1 -0
- package/fesm2022/area8975-ui-input-group.mjs +86 -0
- package/fesm2022/area8975-ui-input-group.mjs.map +1 -0
- package/fesm2022/area8975-ui-input.mjs +682 -0
- package/fesm2022/area8975-ui-input.mjs.map +1 -0
- package/fesm2022/area8975-ui-kpi.mjs +167 -0
- package/fesm2022/area8975-ui-kpi.mjs.map +1 -0
- package/fesm2022/area8975-ui-layout.mjs +63 -0
- package/fesm2022/area8975-ui-layout.mjs.map +1 -0
- package/fesm2022/area8975-ui-loading.mjs +76 -0
- package/fesm2022/area8975-ui-loading.mjs.map +1 -0
- package/fesm2022/area8975-ui-modal-close-btn.mjs +89 -0
- package/fesm2022/area8975-ui-modal-close-btn.mjs.map +1 -0
- package/fesm2022/area8975-ui-modal.mjs +235 -0
- package/fesm2022/area8975-ui-modal.mjs.map +1 -0
- package/fesm2022/area8975-ui-money.mjs +230 -0
- package/fesm2022/area8975-ui-money.mjs.map +1 -0
- package/fesm2022/area8975-ui-overlay.mjs +317 -0
- package/fesm2022/area8975-ui-overlay.mjs.map +1 -0
- package/fesm2022/area8975-ui-pagination.mjs +152 -0
- package/fesm2022/area8975-ui-pagination.mjs.map +1 -0
- package/fesm2022/area8975-ui-private.mjs +63 -0
- package/fesm2022/area8975-ui-private.mjs.map +1 -0
- package/fesm2022/area8975-ui-progress.mjs +307 -0
- package/fesm2022/area8975-ui-progress.mjs.map +1 -0
- package/fesm2022/area8975-ui-radio.mjs +199 -0
- package/fesm2022/area8975-ui-radio.mjs.map +1 -0
- package/fesm2022/area8975-ui-rich-text-editor.mjs +778 -0
- package/fesm2022/area8975-ui-rich-text-editor.mjs.map +1 -0
- package/fesm2022/area8975-ui-search.mjs +266 -0
- package/fesm2022/area8975-ui-search.mjs.map +1 -0
- package/fesm2022/area8975-ui-segmented.mjs +118 -0
- package/fesm2022/area8975-ui-segmented.mjs.map +1 -0
- package/fesm2022/area8975-ui-select.mjs +926 -0
- package/fesm2022/area8975-ui-select.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar-group.mjs +60 -0
- package/fesm2022/area8975-ui-sidebar-group.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar-item.mjs +107 -0
- package/fesm2022/area8975-ui-sidebar-item.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar.mjs +109 -0
- package/fesm2022/area8975-ui-sidebar.mjs.map +1 -0
- package/fesm2022/area8975-ui-skeleton.mjs +116 -0
- package/fesm2022/area8975-ui-skeleton.mjs.map +1 -0
- package/fesm2022/area8975-ui-stat.mjs +55 -0
- package/fesm2022/area8975-ui-stat.mjs.map +1 -0
- package/fesm2022/area8975-ui-switch.mjs +132 -0
- package/fesm2022/area8975-ui-switch.mjs.map +1 -0
- package/fesm2022/area8975-ui-tab.mjs +217 -0
- package/fesm2022/area8975-ui-tab.mjs.map +1 -0
- package/fesm2022/area8975-ui-table-filters.mjs +499 -0
- package/fesm2022/area8975-ui-table-filters.mjs.map +1 -0
- package/fesm2022/area8975-ui-table.mjs +1237 -0
- package/fesm2022/area8975-ui-table.mjs.map +1 -0
- package/fesm2022/area8975-ui-textarea.mjs +375 -0
- package/fesm2022/area8975-ui-textarea.mjs.map +1 -0
- package/fesm2022/area8975-ui-theme.mjs +246 -0
- package/fesm2022/area8975-ui-theme.mjs.map +1 -0
- package/fesm2022/area8975-ui-time-select.mjs +170 -0
- package/fesm2022/area8975-ui-time-select.mjs.map +1 -0
- package/fesm2022/area8975-ui-toast.mjs +269 -0
- package/fesm2022/area8975-ui-toast.mjs.map +1 -0
- package/fesm2022/area8975-ui-toaster.mjs +117 -0
- package/fesm2022/area8975-ui-toaster.mjs.map +1 -0
- package/fesm2022/area8975-ui-tooltip.mjs +196 -0
- package/fesm2022/area8975-ui-tooltip.mjs.map +1 -0
- package/fesm2022/area8975-ui-user-menu.mjs +186 -0
- package/fesm2022/area8975-ui-user-menu.mjs.map +1 -0
- package/fesm2022/area8975-ui.mjs +0 -16520
- package/package.json +237 -1
- package/types/area8975-ui-alert.d.ts +25 -0
- package/types/area8975-ui-avatar.d.ts +40 -0
- package/types/area8975-ui-badge.d.ts +31 -0
- package/types/area8975-ui-button.d.ts +129 -0
- package/types/area8975-ui-calendar.d.ts +177 -0
- package/types/area8975-ui-card-header.d.ts +28 -0
- package/types/area8975-ui-card.d.ts +18 -0
- package/types/area8975-ui-chart-palette.d.ts +176 -0
- package/types/area8975-ui-charts.d.ts +747 -0
- package/types/area8975-ui-checkbox.d.ts +61 -0
- package/types/area8975-ui-colour.d.ts +31 -0
- package/types/area8975-ui-container.d.ts +5 -0
- package/types/area8975-ui-counter.d.ts +43 -0
- package/types/area8975-ui-date-range-picker.d.ts +132 -0
- package/types/area8975-ui-datepicker.d.ts +124 -0
- package/types/area8975-ui-disclosure.d.ts +79 -0
- package/types/area8975-ui-drawer.d.ts +25 -0
- package/types/area8975-ui-dropdown-button.d.ts +32 -0
- package/types/area8975-ui-dropdown-menu.d.ts +25 -0
- package/types/area8975-ui-dropdown.d.ts +56 -0
- package/types/area8975-ui-dropzone.d.ts +96 -0
- package/types/area8975-ui-field.d.ts +72 -0
- package/types/area8975-ui-file-input.d.ts +72 -0
- package/types/area8975-ui-file.d.ts +21 -0
- package/types/area8975-ui-format.d.ts +37 -0
- package/types/area8975-ui-input-addon.d.ts +10 -0
- package/types/area8975-ui-input-group.d.ts +18 -0
- package/types/area8975-ui-input.d.ts +224 -0
- package/types/area8975-ui-kpi.d.ts +36 -0
- package/types/area8975-ui-layout.d.ts +7 -0
- package/types/area8975-ui-loading.d.ts +16 -0
- package/types/area8975-ui-modal-close-btn.d.ts +14 -0
- package/types/area8975-ui-modal.d.ts +45 -0
- package/types/area8975-ui-money.d.ts +77 -0
- package/types/area8975-ui-overlay.d.ts +75 -0
- package/types/area8975-ui-pagination.d.ts +27 -0
- package/types/area8975-ui-private.d.ts +20 -0
- package/types/area8975-ui-progress.d.ts +127 -0
- package/types/area8975-ui-radio.d.ts +61 -0
- package/types/area8975-ui-rich-text-editor.d.ts +165 -0
- package/types/area8975-ui-search.d.ts +56 -0
- package/types/area8975-ui-segmented.d.ts +41 -0
- package/types/area8975-ui-select.d.ts +293 -0
- package/types/area8975-ui-sidebar-group.d.ts +15 -0
- package/types/area8975-ui-sidebar-item.d.ts +20 -0
- package/types/area8975-ui-sidebar.d.ts +16 -0
- package/types/area8975-ui-skeleton.d.ts +35 -0
- package/types/area8975-ui-stat.d.ts +13 -0
- package/types/area8975-ui-switch.d.ts +32 -0
- package/types/area8975-ui-tab.d.ts +45 -0
- package/types/area8975-ui-table-filters.d.ts +138 -0
- package/types/area8975-ui-table.d.ts +371 -0
- package/types/area8975-ui-textarea.d.ts +126 -0
- package/types/area8975-ui-theme.d.ts +61 -0
- package/types/area8975-ui-time-select.d.ts +35 -0
- package/types/area8975-ui-toast.d.ts +78 -0
- package/types/area8975-ui-toaster.d.ts +23 -0
- package/types/area8975-ui-tooltip.d.ts +47 -0
- package/types/area8975-ui-user-menu.d.ts +39 -0
- package/types/area8975-ui.d.ts +1 -4546
- package/fesm2022/area8975-ui.mjs.map +0 -1
|
@@ -0,0 +1,2813 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, DestroyRef, Directive, ElementRef, ViewEncapsulation, afterNextRender, booleanAttribute, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { chartColour, chartInk, chartLabelInk, chartSeriesStyle, mixChartColours } from "@area8975/ui/chart-palette";
|
|
4
|
+
import { UI_FORMAT, UI_PRIVACY, maskMoney, moneyFormatterParts } from "@area8975/ui/format";
|
|
5
|
+
import { UiDarkClass } from "@area8975/ui/theme";
|
|
6
|
+
import { UiSkeletonComponent } from "@area8975/ui/skeleton";
|
|
7
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
8
|
+
var UiChartBase = class UiChartBase {
|
|
9
|
+
uiFormat = inject(UI_FORMAT);
|
|
10
|
+
privacy = inject(UI_PRIVACY);
|
|
11
|
+
dark = inject(UiDarkClass).isDark;
|
|
12
|
+
ink = computed(() => chartInk(this.dark()), ...ngDevMode ? [{ debugName: "ink" }] : /* istanbul ignore next */ []);
|
|
13
|
+
ariaLabel = input.required(...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
14
|
+
height = input(300, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
15
|
+
valueFormatter = input(numberFormatter(this.uiFormat.locale), ...ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []);
|
|
16
|
+
sensitive = input(void 0, {
|
|
17
|
+
...ngDevMode ? { debugName: "sensitive" } : /* istanbul ignore next */ {},
|
|
18
|
+
transform: (value) => value === void 0 ? void 0 : booleanAttribute(value)
|
|
19
|
+
});
|
|
20
|
+
categoryLabel = input("Category", ...ngDevMode ? [{ debugName: "categoryLabel" }] : /* istanbul ignore next */ []);
|
|
21
|
+
loading = input(false, {
|
|
22
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
23
|
+
transform: booleanAttribute
|
|
24
|
+
});
|
|
25
|
+
emptyText = input("No data to show", ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
26
|
+
showTable = input(false, {
|
|
27
|
+
...ngDevMode ? { debugName: "showTable" } : /* istanbul ignore next */ {},
|
|
28
|
+
transform: booleanAttribute
|
|
29
|
+
});
|
|
30
|
+
options = input(null, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
31
|
+
legend = input("auto", ...ngDevMode ? [{ debugName: "legend" }] : /* istanbul ignore next */ []);
|
|
32
|
+
hiddenSeries = signal([], ...ngDevMode ? [{ debugName: "hiddenSeries" }] : /* istanbul ignore next */ []);
|
|
33
|
+
emphasis = signal(null, ...ngDevMode ? [{ debugName: "emphasis" }] : /* istanbul ignore next */ []);
|
|
34
|
+
money = computed(() => moneyFormatterParts(this.valueFormatter()), ...ngDevMode ? [{ debugName: "money" }] : /* istanbul ignore next */ []);
|
|
35
|
+
privacyMode = computed(() => this.sensitive() ?? !!this.money() ? this.privacy() : "visible", ...ngDevMode ? [{ debugName: "privacyMode" }] : /* istanbul ignore next */ []);
|
|
36
|
+
masked = computed(() => this.privacyMode() !== "visible", ...ngDevMode ? [{ debugName: "masked" }] : /* istanbul ignore next */ []);
|
|
37
|
+
concealed = computed(() => this.privacyMode() === "hidden", ...ngDevMode ? [{ debugName: "concealed" }] : /* istanbul ignore next */ []);
|
|
38
|
+
displayFormatter = computed(() => {
|
|
39
|
+
const money = this.money();
|
|
40
|
+
if (!this.masked()) return money?.format ?? this.valueFormatter();
|
|
41
|
+
const mask = money?.mask ?? maskMoney(this.uiFormat.currency, this.uiFormat.locale);
|
|
42
|
+
return () => mask;
|
|
43
|
+
}, ...ngDevMode ? [{ debugName: "displayFormatter" }] : /* istanbul ignore next */ []);
|
|
44
|
+
apexHeight = computed(() => {
|
|
45
|
+
const height = this.height();
|
|
46
|
+
return height === "fill" ? "100%" : height;
|
|
47
|
+
}, ...ngDevMode ? [{ debugName: "apexHeight" }] : /* istanbul ignore next */ []);
|
|
48
|
+
formatValue(value) {
|
|
49
|
+
return value === null || value === void 0 ? "-" : this.displayFormatter()(value);
|
|
50
|
+
}
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
52
|
+
minVersion: "12.0.0",
|
|
53
|
+
version: "22.2.1",
|
|
54
|
+
ngImport: i0,
|
|
55
|
+
type: UiChartBase,
|
|
56
|
+
deps: [],
|
|
57
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
58
|
+
});
|
|
59
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
60
|
+
minVersion: "17.1.0",
|
|
61
|
+
version: "22.2.1",
|
|
62
|
+
type: UiChartBase,
|
|
63
|
+
isStandalone: true,
|
|
64
|
+
inputs: {
|
|
65
|
+
ariaLabel: {
|
|
66
|
+
classPropertyName: "ariaLabel",
|
|
67
|
+
publicName: "ariaLabel",
|
|
68
|
+
isSignal: true,
|
|
69
|
+
isRequired: true,
|
|
70
|
+
transformFunction: null
|
|
71
|
+
},
|
|
72
|
+
height: {
|
|
73
|
+
classPropertyName: "height",
|
|
74
|
+
publicName: "height",
|
|
75
|
+
isSignal: true,
|
|
76
|
+
isRequired: false,
|
|
77
|
+
transformFunction: null
|
|
78
|
+
},
|
|
79
|
+
valueFormatter: {
|
|
80
|
+
classPropertyName: "valueFormatter",
|
|
81
|
+
publicName: "valueFormatter",
|
|
82
|
+
isSignal: true,
|
|
83
|
+
isRequired: false,
|
|
84
|
+
transformFunction: null
|
|
85
|
+
},
|
|
86
|
+
sensitive: {
|
|
87
|
+
classPropertyName: "sensitive",
|
|
88
|
+
publicName: "sensitive",
|
|
89
|
+
isSignal: true,
|
|
90
|
+
isRequired: false,
|
|
91
|
+
transformFunction: null
|
|
92
|
+
},
|
|
93
|
+
categoryLabel: {
|
|
94
|
+
classPropertyName: "categoryLabel",
|
|
95
|
+
publicName: "categoryLabel",
|
|
96
|
+
isSignal: true,
|
|
97
|
+
isRequired: false,
|
|
98
|
+
transformFunction: null
|
|
99
|
+
},
|
|
100
|
+
loading: {
|
|
101
|
+
classPropertyName: "loading",
|
|
102
|
+
publicName: "loading",
|
|
103
|
+
isSignal: true,
|
|
104
|
+
isRequired: false,
|
|
105
|
+
transformFunction: null
|
|
106
|
+
},
|
|
107
|
+
emptyText: {
|
|
108
|
+
classPropertyName: "emptyText",
|
|
109
|
+
publicName: "emptyText",
|
|
110
|
+
isSignal: true,
|
|
111
|
+
isRequired: false,
|
|
112
|
+
transformFunction: null
|
|
113
|
+
},
|
|
114
|
+
showTable: {
|
|
115
|
+
classPropertyName: "showTable",
|
|
116
|
+
publicName: "showTable",
|
|
117
|
+
isSignal: true,
|
|
118
|
+
isRequired: false,
|
|
119
|
+
transformFunction: null
|
|
120
|
+
},
|
|
121
|
+
options: {
|
|
122
|
+
classPropertyName: "options",
|
|
123
|
+
publicName: "options",
|
|
124
|
+
isSignal: true,
|
|
125
|
+
isRequired: false,
|
|
126
|
+
transformFunction: null
|
|
127
|
+
},
|
|
128
|
+
legend: {
|
|
129
|
+
classPropertyName: "legend",
|
|
130
|
+
publicName: "legend",
|
|
131
|
+
isSignal: true,
|
|
132
|
+
isRequired: false,
|
|
133
|
+
transformFunction: null
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
ngImport: i0
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
140
|
+
minVersion: "12.0.0",
|
|
141
|
+
version: "22.2.1",
|
|
142
|
+
ngImport: i0,
|
|
143
|
+
type: UiChartBase,
|
|
144
|
+
decorators: [{ type: Directive }],
|
|
145
|
+
propDecorators: {
|
|
146
|
+
ariaLabel: [{
|
|
147
|
+
type: i0.Input,
|
|
148
|
+
args: [{
|
|
149
|
+
isSignal: true,
|
|
150
|
+
alias: "ariaLabel",
|
|
151
|
+
required: true
|
|
152
|
+
}]
|
|
153
|
+
}],
|
|
154
|
+
height: [{
|
|
155
|
+
type: i0.Input,
|
|
156
|
+
args: [{
|
|
157
|
+
isSignal: true,
|
|
158
|
+
alias: "height",
|
|
159
|
+
required: false
|
|
160
|
+
}]
|
|
161
|
+
}],
|
|
162
|
+
valueFormatter: [{
|
|
163
|
+
type: i0.Input,
|
|
164
|
+
args: [{
|
|
165
|
+
isSignal: true,
|
|
166
|
+
alias: "valueFormatter",
|
|
167
|
+
required: false
|
|
168
|
+
}]
|
|
169
|
+
}],
|
|
170
|
+
sensitive: [{
|
|
171
|
+
type: i0.Input,
|
|
172
|
+
args: [{
|
|
173
|
+
isSignal: true,
|
|
174
|
+
alias: "sensitive",
|
|
175
|
+
required: false
|
|
176
|
+
}]
|
|
177
|
+
}],
|
|
178
|
+
categoryLabel: [{
|
|
179
|
+
type: i0.Input,
|
|
180
|
+
args: [{
|
|
181
|
+
isSignal: true,
|
|
182
|
+
alias: "categoryLabel",
|
|
183
|
+
required: false
|
|
184
|
+
}]
|
|
185
|
+
}],
|
|
186
|
+
loading: [{
|
|
187
|
+
type: i0.Input,
|
|
188
|
+
args: [{
|
|
189
|
+
isSignal: true,
|
|
190
|
+
alias: "loading",
|
|
191
|
+
required: false
|
|
192
|
+
}]
|
|
193
|
+
}],
|
|
194
|
+
emptyText: [{
|
|
195
|
+
type: i0.Input,
|
|
196
|
+
args: [{
|
|
197
|
+
isSignal: true,
|
|
198
|
+
alias: "emptyText",
|
|
199
|
+
required: false
|
|
200
|
+
}]
|
|
201
|
+
}],
|
|
202
|
+
showTable: [{
|
|
203
|
+
type: i0.Input,
|
|
204
|
+
args: [{
|
|
205
|
+
isSignal: true,
|
|
206
|
+
alias: "showTable",
|
|
207
|
+
required: false
|
|
208
|
+
}]
|
|
209
|
+
}],
|
|
210
|
+
options: [{
|
|
211
|
+
type: i0.Input,
|
|
212
|
+
args: [{
|
|
213
|
+
isSignal: true,
|
|
214
|
+
alias: "options",
|
|
215
|
+
required: false
|
|
216
|
+
}]
|
|
217
|
+
}],
|
|
218
|
+
legend: [{
|
|
219
|
+
type: i0.Input,
|
|
220
|
+
args: [{
|
|
221
|
+
isSignal: true,
|
|
222
|
+
alias: "legend",
|
|
223
|
+
required: false
|
|
224
|
+
}]
|
|
225
|
+
}]
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
function numberFormatter(locale) {
|
|
229
|
+
const formatter = new Intl.NumberFormat(locale);
|
|
230
|
+
return (value) => formatter.format(value);
|
|
231
|
+
}
|
|
232
|
+
var UiAxisChartBase = class UiAxisChartBase extends UiChartBase {
|
|
233
|
+
series = input.required(...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
|
|
234
|
+
categories = input.required(...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
|
|
235
|
+
highlight = input(null, ...ngDevMode ? [{ debugName: "highlight" }] : /* istanbul ignore next */ []);
|
|
236
|
+
highlightKeepsColours = input(false, {
|
|
237
|
+
...ngDevMode ? { debugName: "highlightKeepsColours" } : /* istanbul ignore next */ {},
|
|
238
|
+
transform: booleanAttribute
|
|
239
|
+
});
|
|
240
|
+
supportsDashes = false;
|
|
241
|
+
isEmpty = computed(() => !this.series().some((item) => item.data.some((value) => value !== null)), ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
|
|
242
|
+
isMuted = computed(() => {
|
|
243
|
+
const highlight = this.highlight();
|
|
244
|
+
return this.series().map((item) => !!highlight && !highlight.includes(item.name));
|
|
245
|
+
}, ...ngDevMode ? [{ debugName: "isMuted" }] : /* istanbul ignore next */ []);
|
|
246
|
+
colourOrder = computed(() => this.highlightKeepsColours() ? null : this.highlight(), ...ngDevMode ? [{ debugName: "colourOrder" }] : /* istanbul ignore next */ []);
|
|
247
|
+
styles = computed(() => {
|
|
248
|
+
const order = this.colourOrder();
|
|
249
|
+
const muted = this.isMuted();
|
|
250
|
+
return this.series().map((item, index) => {
|
|
251
|
+
const dashed = this.supportsDashes && !!item.dashed;
|
|
252
|
+
if (muted[index]) return {
|
|
253
|
+
colour: this.ink().context,
|
|
254
|
+
dashed
|
|
255
|
+
};
|
|
256
|
+
const style = chartSeriesStyle(order ? order.indexOf(item.name) : index, this.supportsDashes, this.dark());
|
|
257
|
+
return {
|
|
258
|
+
colour: item.colour ?? style.colour,
|
|
259
|
+
dashed: style.dashed || dashed
|
|
260
|
+
};
|
|
261
|
+
});
|
|
262
|
+
}, ...ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []);
|
|
263
|
+
colours = computed(() => this.styles().map((style) => style.colour), ...ngDevMode ? [{ debugName: "colours" }] : /* istanbul ignore next */ []);
|
|
264
|
+
dashed = computed(() => this.styles().map((style) => style.dashed), ...ngDevMode ? [{ debugName: "dashed" }] : /* istanbul ignore next */ []);
|
|
265
|
+
legendItems = computed(() => {
|
|
266
|
+
const order = this.colourOrder();
|
|
267
|
+
const items = this.series().map((item, index) => ({
|
|
268
|
+
name: item.name,
|
|
269
|
+
...this.styles()[index]
|
|
270
|
+
})).filter((_, index) => !this.isMuted()[index]);
|
|
271
|
+
return order ? items.sort((a, b) => order.indexOf(a.name) - order.indexOf(b.name)) : items;
|
|
272
|
+
}, ...ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []);
|
|
273
|
+
legendNote = computed(() => {
|
|
274
|
+
const count = this.isMuted().filter(Boolean).length;
|
|
275
|
+
return count ? `${count} more in grey` : "";
|
|
276
|
+
}, ...ngDevMode ? [{ debugName: "legendNote" }] : /* istanbul ignore next */ []);
|
|
277
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
278
|
+
minVersion: "12.0.0",
|
|
279
|
+
version: "22.2.1",
|
|
280
|
+
ngImport: i0,
|
|
281
|
+
type: UiAxisChartBase,
|
|
282
|
+
deps: null,
|
|
283
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
284
|
+
});
|
|
285
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
286
|
+
minVersion: "17.1.0",
|
|
287
|
+
version: "22.2.1",
|
|
288
|
+
type: UiAxisChartBase,
|
|
289
|
+
isStandalone: true,
|
|
290
|
+
inputs: {
|
|
291
|
+
series: {
|
|
292
|
+
classPropertyName: "series",
|
|
293
|
+
publicName: "series",
|
|
294
|
+
isSignal: true,
|
|
295
|
+
isRequired: true,
|
|
296
|
+
transformFunction: null
|
|
297
|
+
},
|
|
298
|
+
categories: {
|
|
299
|
+
classPropertyName: "categories",
|
|
300
|
+
publicName: "categories",
|
|
301
|
+
isSignal: true,
|
|
302
|
+
isRequired: true,
|
|
303
|
+
transformFunction: null
|
|
304
|
+
},
|
|
305
|
+
highlight: {
|
|
306
|
+
classPropertyName: "highlight",
|
|
307
|
+
publicName: "highlight",
|
|
308
|
+
isSignal: true,
|
|
309
|
+
isRequired: false,
|
|
310
|
+
transformFunction: null
|
|
311
|
+
},
|
|
312
|
+
highlightKeepsColours: {
|
|
313
|
+
classPropertyName: "highlightKeepsColours",
|
|
314
|
+
publicName: "highlightKeepsColours",
|
|
315
|
+
isSignal: true,
|
|
316
|
+
isRequired: false,
|
|
317
|
+
transformFunction: null
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
usesInheritance: true,
|
|
321
|
+
ngImport: i0
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
325
|
+
minVersion: "12.0.0",
|
|
326
|
+
version: "22.2.1",
|
|
327
|
+
ngImport: i0,
|
|
328
|
+
type: UiAxisChartBase,
|
|
329
|
+
decorators: [{ type: Directive }],
|
|
330
|
+
propDecorators: {
|
|
331
|
+
series: [{
|
|
332
|
+
type: i0.Input,
|
|
333
|
+
args: [{
|
|
334
|
+
isSignal: true,
|
|
335
|
+
alias: "series",
|
|
336
|
+
required: true
|
|
337
|
+
}]
|
|
338
|
+
}],
|
|
339
|
+
categories: [{
|
|
340
|
+
type: i0.Input,
|
|
341
|
+
args: [{
|
|
342
|
+
isSignal: true,
|
|
343
|
+
alias: "categories",
|
|
344
|
+
required: true
|
|
345
|
+
}]
|
|
346
|
+
}],
|
|
347
|
+
highlight: [{
|
|
348
|
+
type: i0.Input,
|
|
349
|
+
args: [{
|
|
350
|
+
isSignal: true,
|
|
351
|
+
alias: "highlight",
|
|
352
|
+
required: false
|
|
353
|
+
}]
|
|
354
|
+
}],
|
|
355
|
+
highlightKeepsColours: [{
|
|
356
|
+
type: i0.Input,
|
|
357
|
+
args: [{
|
|
358
|
+
isSignal: true,
|
|
359
|
+
alias: "highlightKeepsColours",
|
|
360
|
+
required: false
|
|
361
|
+
}]
|
|
362
|
+
}]
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
function chartAxisLabels(ink) {
|
|
366
|
+
return { style: {
|
|
367
|
+
colors: ink.muted,
|
|
368
|
+
fontSize: "12px"
|
|
369
|
+
} };
|
|
370
|
+
}
|
|
371
|
+
const LABEL_GAP = 16;
|
|
372
|
+
const AXIS_FONT_SIZE = 12;
|
|
373
|
+
function categoryLabelStep(count, width, labelWidth) {
|
|
374
|
+
if (count <= 1 || width <= 0) return 1;
|
|
375
|
+
return Math.max(1, Math.ceil((labelWidth + LABEL_GAP) / (width / count)));
|
|
376
|
+
}
|
|
377
|
+
function thinnedCategoryLabels(categories) {
|
|
378
|
+
const widest = Math.max(0, ...categories.map(measureLabel));
|
|
379
|
+
return (value, _, context) => {
|
|
380
|
+
const position = typeof value === "number" ? Math.floor(value) - 1 : null;
|
|
381
|
+
const index = position ?? context?.i;
|
|
382
|
+
const label = position === null ? String(value) : categories[position] ?? "";
|
|
383
|
+
const width = context?.w?.globals?.gridWidth ?? 0;
|
|
384
|
+
if (index === void 0) return label;
|
|
385
|
+
const step = categoryLabelStep(categories.length, width, widest);
|
|
386
|
+
return (categories.length - 1 - index) % step === 0 ? label : "";
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
let measuringContext;
|
|
390
|
+
function measureLabel(label) {
|
|
391
|
+
if (measuringContext === void 0) measuringContext = typeof document === "undefined" ? null : document.createElement("canvas").getContext("2d");
|
|
392
|
+
if (!measuringContext) return label.length * AXIS_FONT_SIZE * .6;
|
|
393
|
+
measuringContext.font = `${AXIS_FONT_SIZE}px ${getComputedStyle(document.body).fontFamily}`;
|
|
394
|
+
return measuringContext.measureText(label).width;
|
|
395
|
+
}
|
|
396
|
+
function baseChartOptions(ink) {
|
|
397
|
+
const labels = chartAxisLabels(ink);
|
|
398
|
+
return {
|
|
399
|
+
chart: {
|
|
400
|
+
fontFamily: "inherit",
|
|
401
|
+
foreColor: ink.muted,
|
|
402
|
+
parentHeightOffset: 0,
|
|
403
|
+
toolbar: { show: false },
|
|
404
|
+
zoom: { enabled: false },
|
|
405
|
+
animations: {
|
|
406
|
+
enabled: true,
|
|
407
|
+
speed: 300
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
dataLabels: { enabled: false },
|
|
411
|
+
fill: {
|
|
412
|
+
type: "solid",
|
|
413
|
+
opacity: 1
|
|
414
|
+
},
|
|
415
|
+
grid: {
|
|
416
|
+
borderColor: ink.grid,
|
|
417
|
+
strokeDashArray: 0,
|
|
418
|
+
padding: {
|
|
419
|
+
top: 0,
|
|
420
|
+
right: 8,
|
|
421
|
+
bottom: 0,
|
|
422
|
+
left: 8
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
legend: { show: false },
|
|
426
|
+
xaxis: {
|
|
427
|
+
axisBorder: {
|
|
428
|
+
show: true,
|
|
429
|
+
color: ink.grid
|
|
430
|
+
},
|
|
431
|
+
axisTicks: { show: false },
|
|
432
|
+
labels
|
|
433
|
+
},
|
|
434
|
+
yaxis: {
|
|
435
|
+
axisBorder: { show: false },
|
|
436
|
+
axisTicks: { show: false },
|
|
437
|
+
labels
|
|
438
|
+
},
|
|
439
|
+
states: {
|
|
440
|
+
hover: { filter: { type: "lighten" } },
|
|
441
|
+
active: { filter: { type: "none" } }
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function mergeChartOptions(base, overrides) {
|
|
446
|
+
return overrides ? deepMerge(base, overrides) : base;
|
|
447
|
+
}
|
|
448
|
+
function chartTooltipHtml(title, rows, footer = "", total) {
|
|
449
|
+
const items = rows.map((row) => `
|
|
450
|
+
<div class="ui-chart-tooltip-row ui-text-body-alt">
|
|
451
|
+
<span
|
|
452
|
+
class="ui-chart-tooltip-dot${row.dashed ? " ui-chart-tooltip-dot--dashed" : ""}"
|
|
453
|
+
style="--ui-chart-tooltip-colour: ${escapeHtml(row.colour)}"
|
|
454
|
+
></span>
|
|
455
|
+
<span class="ui-chart-tooltip-name">${escapeHtml(row.name)}</span>
|
|
456
|
+
${row.value === void 0 ? "" : `<span class="ui-chart-tooltip-value">${escapeHtml(row.value)}</span>`}
|
|
457
|
+
</div>
|
|
458
|
+
`).join("");
|
|
459
|
+
return `
|
|
460
|
+
<div class="ui-chart-tooltip">
|
|
461
|
+
${title ? `<div class="ui-chart-tooltip-title ui-text-caption">${escapeHtml(title)}</div>` : ""}
|
|
462
|
+
${items}
|
|
463
|
+
${total ? `
|
|
464
|
+
<div class="ui-chart-tooltip-row ui-chart-tooltip-total ui-text-body-alt">
|
|
465
|
+
<span class="ui-chart-tooltip-name">${escapeHtml(total.name)}</span>
|
|
466
|
+
<span class="ui-chart-tooltip-value">${escapeHtml(total.value)}</span>
|
|
467
|
+
</div>
|
|
468
|
+
` : ""}
|
|
469
|
+
${footer ? `<div class="ui-chart-tooltip-footer ui-text-caption">${escapeHtml(footer)}</div>` : ""}
|
|
470
|
+
</div>
|
|
471
|
+
`;
|
|
472
|
+
}
|
|
473
|
+
function escapeHtml(text) {
|
|
474
|
+
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
475
|
+
}
|
|
476
|
+
function deepMerge(base, overrides) {
|
|
477
|
+
if (!isPlainObject(base) || !isPlainObject(overrides)) return overrides === void 0 ? base : overrides;
|
|
478
|
+
const merged = { ...base };
|
|
479
|
+
for (const [key, value] of Object.entries(overrides)) merged[key] = deepMerge(base[key], value);
|
|
480
|
+
return merged;
|
|
481
|
+
}
|
|
482
|
+
function isPlainObject(value) {
|
|
483
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
484
|
+
}
|
|
485
|
+
var UiChartLegendComponent = class UiChartLegendComponent {
|
|
486
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
487
|
+
note = input("", ...ngDevMode ? [{ debugName: "note" }] : /* istanbul ignore next */ []);
|
|
488
|
+
for = input(null, ...ngDevMode ? [{ debugName: "for" }] : /* istanbul ignore next */ []);
|
|
489
|
+
itemsWith = input(null, ...ngDevMode ? [{ debugName: "itemsWith" }] : /* istanbul ignore next */ []);
|
|
490
|
+
hidden = model([], ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
|
|
491
|
+
toggleable = input(false, {
|
|
492
|
+
...ngDevMode ? { debugName: "toggleable" } : /* istanbul ignore next */ {},
|
|
493
|
+
transform: booleanAttribute
|
|
494
|
+
});
|
|
495
|
+
focusChange = output();
|
|
496
|
+
hovered = signal(null, ...ngDevMode ? [{ debugName: "hovered" }] : /* istanbul ignore next */ []);
|
|
497
|
+
focused = signal(null, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
498
|
+
pointedAt = computed(() => this.hovered() ?? this.focused(), ...ngDevMode ? [{ debugName: "pointedAt" }] : /* istanbul ignore next */ []);
|
|
499
|
+
shownItems = computed(() => {
|
|
500
|
+
const source = this.for();
|
|
501
|
+
if (!source) return this.items();
|
|
502
|
+
const adjust = this.itemsWith();
|
|
503
|
+
return adjust ? adjust(source.legendItems()) : source.legendItems();
|
|
504
|
+
}, ...ngDevMode ? [{ debugName: "shownItems" }] : /* istanbul ignore next */ []);
|
|
505
|
+
shownNote = computed(() => this.for()?.legendNote() ?? this.note(), ...ngDevMode ? [{ debugName: "shownNote" }] : /* istanbul ignore next */ []);
|
|
506
|
+
hiddenNames = computed(() => this.for()?.hiddenSeries() ?? this.hidden(), ...ngDevMode ? [{ debugName: "hiddenNames" }] : /* istanbul ignore next */ []);
|
|
507
|
+
visibleCount = computed(() => this.shownItems().filter((item) => !this.hiddenNames().includes(item.name)).length, ...ngDevMode ? [{ debugName: "visibleCount" }] : /* istanbul ignore next */ []);
|
|
508
|
+
constructor() {
|
|
509
|
+
effect(() => {
|
|
510
|
+
const name = this.pointedAt();
|
|
511
|
+
untracked(() => {
|
|
512
|
+
this.for()?.emphasis.set(name);
|
|
513
|
+
this.focusChange.emit(name);
|
|
514
|
+
});
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
hover(name) {
|
|
518
|
+
this.hovered.set(name);
|
|
519
|
+
}
|
|
520
|
+
focus(name, event) {
|
|
521
|
+
if (name && !event?.target?.matches(":focus-visible")) return;
|
|
522
|
+
this.focused.set(name);
|
|
523
|
+
}
|
|
524
|
+
isHidden(item) {
|
|
525
|
+
return this.hiddenNames().includes(item.name);
|
|
526
|
+
}
|
|
527
|
+
isLocked(item) {
|
|
528
|
+
return !this.isHidden(item) && this.visibleCount() === 1;
|
|
529
|
+
}
|
|
530
|
+
toggle(item) {
|
|
531
|
+
if (this.isLocked(item)) return;
|
|
532
|
+
const hidden = this.hiddenNames();
|
|
533
|
+
const next = hidden.includes(item.name) ? hidden.filter((name) => name !== item.name) : [...hidden, item.name];
|
|
534
|
+
const source = this.for();
|
|
535
|
+
if (source) source.hiddenSeries.set(next);
|
|
536
|
+
else this.hidden.set(next);
|
|
537
|
+
}
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
539
|
+
minVersion: "12.0.0",
|
|
540
|
+
version: "22.2.1",
|
|
541
|
+
ngImport: i0,
|
|
542
|
+
type: UiChartLegendComponent,
|
|
543
|
+
deps: [],
|
|
544
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
545
|
+
});
|
|
546
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
547
|
+
minVersion: "17.0.0",
|
|
548
|
+
version: "22.2.1",
|
|
549
|
+
type: UiChartLegendComponent,
|
|
550
|
+
isStandalone: true,
|
|
551
|
+
selector: "ui-chart-legend",
|
|
552
|
+
inputs: {
|
|
553
|
+
items: {
|
|
554
|
+
classPropertyName: "items",
|
|
555
|
+
publicName: "items",
|
|
556
|
+
isSignal: true,
|
|
557
|
+
isRequired: false,
|
|
558
|
+
transformFunction: null
|
|
559
|
+
},
|
|
560
|
+
note: {
|
|
561
|
+
classPropertyName: "note",
|
|
562
|
+
publicName: "note",
|
|
563
|
+
isSignal: true,
|
|
564
|
+
isRequired: false,
|
|
565
|
+
transformFunction: null
|
|
566
|
+
},
|
|
567
|
+
for: {
|
|
568
|
+
classPropertyName: "for",
|
|
569
|
+
publicName: "for",
|
|
570
|
+
isSignal: true,
|
|
571
|
+
isRequired: false,
|
|
572
|
+
transformFunction: null
|
|
573
|
+
},
|
|
574
|
+
itemsWith: {
|
|
575
|
+
classPropertyName: "itemsWith",
|
|
576
|
+
publicName: "itemsWith",
|
|
577
|
+
isSignal: true,
|
|
578
|
+
isRequired: false,
|
|
579
|
+
transformFunction: null
|
|
580
|
+
},
|
|
581
|
+
hidden: {
|
|
582
|
+
classPropertyName: "hidden",
|
|
583
|
+
publicName: "hidden",
|
|
584
|
+
isSignal: true,
|
|
585
|
+
isRequired: false,
|
|
586
|
+
transformFunction: null
|
|
587
|
+
},
|
|
588
|
+
toggleable: {
|
|
589
|
+
classPropertyName: "toggleable",
|
|
590
|
+
publicName: "toggleable",
|
|
591
|
+
isSignal: true,
|
|
592
|
+
isRequired: false,
|
|
593
|
+
transformFunction: null
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
outputs: {
|
|
597
|
+
hidden: "hiddenChange",
|
|
598
|
+
focusChange: "focusChange"
|
|
599
|
+
},
|
|
600
|
+
ngImport: i0,
|
|
601
|
+
template: "<ul class=\"ui-chart-legend\" role=\"list\">\n @for (item of shownItems(); track item.name) {\n <li\n (mouseenter)=\"hover(item.name)\"\n (mouseleave)=\"hover(null)\"\n (focusin)=\"focus(item.name, $event)\"\n (focusout)=\"focus(null)\"\n >\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"ui-chart-legend-item ui-chart-legend-item--button ui-text-body-alt\"\n [attr.aria-pressed]=\"!isHidden(item)\"\n [attr.aria-disabled]=\"isLocked(item) || null\"\n [attr.data-hidden]=\"isHidden(item) ? '' : null\"\n (click)=\"toggle(item)\"\n >\n <span\n class=\"ui-chart-legend-key\"\n [class.ui-chart-legend-key--dashed]=\"item.dashed\"\n [style.--ui-chart-legend-colour]=\"item.colour\"\n ></span>\n {{ item.label ?? item.name }}\n </button>\n } @else {\n <span class=\"ui-chart-legend-item ui-text-body-alt\">\n <span\n class=\"ui-chart-legend-key\"\n [class.ui-chart-legend-key--dashed]=\"item.dashed\"\n [style.--ui-chart-legend-colour]=\"item.colour\"\n ></span>\n {{ item.label ?? item.name }}\n </span>\n }\n </li>\n }\n</ul>\n\n@if (shownNote()) {\n <span class=\"text-muted-foreground-1 ui-text-caption\">{{ shownNote() }}</span>\n}\n",
|
|
602
|
+
styles: ["@layer properties;:host{display:flex;flex-wrap:wrap;align-items:center;column-gap:calc(var(--spacing, .25rem) * 4);row-gap:var(--spacing, .25rem)}.ui-chart-legend{display:flex;flex-wrap:wrap;column-gap:calc(var(--spacing, .25rem) * 4);row-gap:var(--spacing, .25rem)}.ui-chart-legend-item{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 1.5);color:var(--foreground)}.ui-chart-legend-item--button{margin-inline:calc(var(--spacing, .25rem) * -1.5);border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 1.5);padding-block:calc(var(--spacing, .25rem) * .5);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .15s;transition-duration:.15s}.ui-chart-legend-item--button:focus{--tw-outline-style: none;outline-style:none}.ui-chart-legend-item--button:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-chart-legend-item--button:focus-visible{--tw-ring-color: color-mix(in srgb, oklch(88.2% .059 254.128) 50%, transparent)}@supports (color: color-mix(in lab,red,red)){.ui-chart-legend-item--button:focus-visible{--tw-ring-color: color-mix(in oklab, var(--color-primary-200, var(--color-blue-200)) 50%, transparent)}}.ui-chart-legend-item--button:hover,.ui-chart-legend-item--button:focus-visible{background-color:var(--surface)}.ui-chart-legend-item--button[aria-disabled]{cursor:default}.ui-chart-legend-item--button[aria-disabled]:hover{background-color:transparent}.ui-chart-legend-key{width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);flex-shrink:0;border-radius:var(--radius-full, calc(infinity * 1px));border-style:var(--tw-border-style);border-width:2px;border-color:var(--ui-chart-legend-colour);background-color:var(--ui-chart-legend-colour)}.ui-chart-legend-key--dashed{height:0px;width:calc(var(--spacing, .25rem) * 4);border-radius:0;border-style:var(--tw-border-style);border-width:0px;border-top-style:var(--tw-border-style);border-top-width:2px;--tw-border-style: dashed;border-style:dashed;background-color:transparent}.ui-chart-legend-item[data-hidden]{color:var(--muted-foreground-1)}.ui-chart-legend-item[data-hidden] .ui-chart-legend-key{background-color:transparent}.ui-chart-legend-item[data-hidden] .ui-chart-legend-key--dashed{opacity:40%}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-border-style: solid}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
603
|
+
});
|
|
604
|
+
};
|
|
605
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
606
|
+
minVersion: "12.0.0",
|
|
607
|
+
version: "22.2.1",
|
|
608
|
+
ngImport: i0,
|
|
609
|
+
type: UiChartLegendComponent,
|
|
610
|
+
decorators: [{
|
|
611
|
+
type: Component,
|
|
612
|
+
args: [{
|
|
613
|
+
selector: "ui-chart-legend",
|
|
614
|
+
template: "<ul class=\"ui-chart-legend\" role=\"list\">\n @for (item of shownItems(); track item.name) {\n <li\n (mouseenter)=\"hover(item.name)\"\n (mouseleave)=\"hover(null)\"\n (focusin)=\"focus(item.name, $event)\"\n (focusout)=\"focus(null)\"\n >\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"ui-chart-legend-item ui-chart-legend-item--button ui-text-body-alt\"\n [attr.aria-pressed]=\"!isHidden(item)\"\n [attr.aria-disabled]=\"isLocked(item) || null\"\n [attr.data-hidden]=\"isHidden(item) ? '' : null\"\n (click)=\"toggle(item)\"\n >\n <span\n class=\"ui-chart-legend-key\"\n [class.ui-chart-legend-key--dashed]=\"item.dashed\"\n [style.--ui-chart-legend-colour]=\"item.colour\"\n ></span>\n {{ item.label ?? item.name }}\n </button>\n } @else {\n <span class=\"ui-chart-legend-item ui-text-body-alt\">\n <span\n class=\"ui-chart-legend-key\"\n [class.ui-chart-legend-key--dashed]=\"item.dashed\"\n [style.--ui-chart-legend-colour]=\"item.colour\"\n ></span>\n {{ item.label ?? item.name }}\n </span>\n }\n </li>\n }\n</ul>\n\n@if (shownNote()) {\n <span class=\"text-muted-foreground-1 ui-text-caption\">{{ shownNote() }}</span>\n}\n",
|
|
615
|
+
styles: ["@layer properties;:host{display:flex;flex-wrap:wrap;align-items:center;column-gap:calc(var(--spacing, .25rem) * 4);row-gap:var(--spacing, .25rem)}.ui-chart-legend{display:flex;flex-wrap:wrap;column-gap:calc(var(--spacing, .25rem) * 4);row-gap:var(--spacing, .25rem)}.ui-chart-legend-item{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 1.5);color:var(--foreground)}.ui-chart-legend-item--button{margin-inline:calc(var(--spacing, .25rem) * -1.5);border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 1.5);padding-block:calc(var(--spacing, .25rem) * .5);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .15s;transition-duration:.15s}.ui-chart-legend-item--button:focus{--tw-outline-style: none;outline-style:none}.ui-chart-legend-item--button:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-chart-legend-item--button:focus-visible{--tw-ring-color: color-mix(in srgb, oklch(88.2% .059 254.128) 50%, transparent)}@supports (color: color-mix(in lab,red,red)){.ui-chart-legend-item--button:focus-visible{--tw-ring-color: color-mix(in oklab, var(--color-primary-200, var(--color-blue-200)) 50%, transparent)}}.ui-chart-legend-item--button:hover,.ui-chart-legend-item--button:focus-visible{background-color:var(--surface)}.ui-chart-legend-item--button[aria-disabled]{cursor:default}.ui-chart-legend-item--button[aria-disabled]:hover{background-color:transparent}.ui-chart-legend-key{width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);flex-shrink:0;border-radius:var(--radius-full, calc(infinity * 1px));border-style:var(--tw-border-style);border-width:2px;border-color:var(--ui-chart-legend-colour);background-color:var(--ui-chart-legend-colour)}.ui-chart-legend-key--dashed{height:0px;width:calc(var(--spacing, .25rem) * 4);border-radius:0;border-style:var(--tw-border-style);border-width:0px;border-top-style:var(--tw-border-style);border-top-width:2px;--tw-border-style: dashed;border-style:dashed;background-color:transparent}.ui-chart-legend-item[data-hidden]{color:var(--muted-foreground-1)}.ui-chart-legend-item[data-hidden] .ui-chart-legend-key{background-color:transparent}.ui-chart-legend-item[data-hidden] .ui-chart-legend-key--dashed{opacity:40%}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-border-style: solid}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
616
|
+
}]
|
|
617
|
+
}],
|
|
618
|
+
ctorParameters: () => [],
|
|
619
|
+
propDecorators: {
|
|
620
|
+
items: [{
|
|
621
|
+
type: i0.Input,
|
|
622
|
+
args: [{
|
|
623
|
+
isSignal: true,
|
|
624
|
+
alias: "items",
|
|
625
|
+
required: false
|
|
626
|
+
}]
|
|
627
|
+
}],
|
|
628
|
+
note: [{
|
|
629
|
+
type: i0.Input,
|
|
630
|
+
args: [{
|
|
631
|
+
isSignal: true,
|
|
632
|
+
alias: "note",
|
|
633
|
+
required: false
|
|
634
|
+
}]
|
|
635
|
+
}],
|
|
636
|
+
for: [{
|
|
637
|
+
type: i0.Input,
|
|
638
|
+
args: [{
|
|
639
|
+
isSignal: true,
|
|
640
|
+
alias: "for",
|
|
641
|
+
required: false
|
|
642
|
+
}]
|
|
643
|
+
}],
|
|
644
|
+
itemsWith: [{
|
|
645
|
+
type: i0.Input,
|
|
646
|
+
args: [{
|
|
647
|
+
isSignal: true,
|
|
648
|
+
alias: "itemsWith",
|
|
649
|
+
required: false
|
|
650
|
+
}]
|
|
651
|
+
}],
|
|
652
|
+
hidden: [{
|
|
653
|
+
type: i0.Input,
|
|
654
|
+
args: [{
|
|
655
|
+
isSignal: true,
|
|
656
|
+
alias: "hidden",
|
|
657
|
+
required: false
|
|
658
|
+
}]
|
|
659
|
+
}, {
|
|
660
|
+
type: i0.Output,
|
|
661
|
+
args: ["hiddenChange"]
|
|
662
|
+
}],
|
|
663
|
+
toggleable: [{
|
|
664
|
+
type: i0.Input,
|
|
665
|
+
args: [{
|
|
666
|
+
isSignal: true,
|
|
667
|
+
alias: "toggleable",
|
|
668
|
+
required: false
|
|
669
|
+
}]
|
|
670
|
+
}],
|
|
671
|
+
focusChange: [{
|
|
672
|
+
type: i0.Output,
|
|
673
|
+
args: ["focusChange"]
|
|
674
|
+
}]
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
var UiChartComponent = class UiChartComponent {
|
|
678
|
+
options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
679
|
+
ariaLabel = input.required(...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
680
|
+
hiddenSeries = input([], ...ngDevMode ? [{ debugName: "hiddenSeries" }] : /* istanbul ignore next */ []);
|
|
681
|
+
emphasis = input(null, ...ngDevMode ? [{ debugName: "emphasis" }] : /* istanbul ignore next */ []);
|
|
682
|
+
canvas = viewChild.required("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
|
|
683
|
+
chart = signal(null, ...ngDevMode ? [{ debugName: "chart" }] : /* istanbul ignore next */ []);
|
|
684
|
+
destroyed = false;
|
|
685
|
+
drawnNames = [];
|
|
686
|
+
host = inject(ElementRef);
|
|
687
|
+
resizeObserver = null;
|
|
688
|
+
constructor() {
|
|
689
|
+
afterNextRender(async () => {
|
|
690
|
+
const { default: Apex } = await import("apexcharts");
|
|
691
|
+
if (this.destroyed) return;
|
|
692
|
+
const chart = new Apex(this.canvas().nativeElement, this.withOwnParentResizing(untracked(this.options)));
|
|
693
|
+
chart.addEventListener("updated", () => {
|
|
694
|
+
this.applyHidden(chart);
|
|
695
|
+
this.applyEmphasis();
|
|
696
|
+
});
|
|
697
|
+
this.drawnNames = this.seriesNames();
|
|
698
|
+
await chart.render();
|
|
699
|
+
this.chart.set(chart);
|
|
700
|
+
this.redrawWhenResized(chart);
|
|
701
|
+
this.applyHidden(chart);
|
|
702
|
+
this.applyEmphasis();
|
|
703
|
+
});
|
|
704
|
+
effect(() => {
|
|
705
|
+
const options = this.options();
|
|
706
|
+
const chart = this.chart();
|
|
707
|
+
if (!chart) return;
|
|
708
|
+
const names = this.seriesNames();
|
|
709
|
+
const reordered = names.length === this.drawnNames.length && names.some((name, index) => name !== this.drawnNames[index]) && names.every((name) => this.drawnNames.includes(name));
|
|
710
|
+
this.drawnNames = names;
|
|
711
|
+
chart.updateOptions(this.withOwnParentResizing(options), false, !reordered);
|
|
712
|
+
});
|
|
713
|
+
effect(() => {
|
|
714
|
+
this.emphasis();
|
|
715
|
+
if (this.chart()) this.applyEmphasis();
|
|
716
|
+
});
|
|
717
|
+
effect(() => {
|
|
718
|
+
const chart = this.chart();
|
|
719
|
+
if (chart) {
|
|
720
|
+
this.applyHidden(chart);
|
|
721
|
+
this.applyEmphasis();
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
inject(DestroyRef).onDestroy(() => {
|
|
725
|
+
this.destroyed = true;
|
|
726
|
+
this.resizeObserver?.disconnect();
|
|
727
|
+
this.chart()?.destroy();
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
withOwnParentResizing(options) {
|
|
731
|
+
return {
|
|
732
|
+
...options,
|
|
733
|
+
chart: {
|
|
734
|
+
...options.chart,
|
|
735
|
+
redrawOnParentResize: false
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
redrawWhenResized(chart) {
|
|
740
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
741
|
+
if (!this.isDrawnAtHostSize()) chart.updateSeries(untracked(this.options).series ?? [], false);
|
|
742
|
+
});
|
|
743
|
+
this.resizeObserver.observe(this.host.nativeElement);
|
|
744
|
+
}
|
|
745
|
+
isDrawnAtHostSize() {
|
|
746
|
+
const host = this.host.nativeElement;
|
|
747
|
+
const drawn = this.canvas().nativeElement.querySelector(".apexcharts-canvas");
|
|
748
|
+
return !!drawn && drawn.offsetWidth === host.offsetWidth && drawn.offsetHeight === host.offsetHeight;
|
|
749
|
+
}
|
|
750
|
+
applyHidden(chart) {
|
|
751
|
+
const hidden = this.hiddenSeries();
|
|
752
|
+
if (!this.canvas().nativeElement.querySelector(".apexcharts-inner .apexcharts-series")) return;
|
|
753
|
+
for (const name of this.seriesNames()) {
|
|
754
|
+
if (!name) continue;
|
|
755
|
+
if (hidden.includes(name)) chart.hideSeries(name);
|
|
756
|
+
else chart.showSeries(name);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
applyEmphasis() {
|
|
760
|
+
const names = this.seriesNames();
|
|
761
|
+
const emphasis = untracked(this.emphasis);
|
|
762
|
+
const active = emphasis && names.includes(emphasis) && !untracked(this.hiddenSeries).includes(emphasis) ? emphasis : null;
|
|
763
|
+
const groups = this.canvas().nativeElement.querySelectorAll(".apexcharts-series[data\\:realIndex]");
|
|
764
|
+
for (const group of groups) {
|
|
765
|
+
const name = names[Number(group.getAttribute("data:realIndex"))];
|
|
766
|
+
group.classList.toggle("ui-chart-series--faded", !!active && name !== active);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
seriesNames() {
|
|
770
|
+
const { series = [], labels = [] } = untracked(this.options);
|
|
771
|
+
return series.map((item, index) => typeof item === "object" && item !== null && "name" in item ? item.name ?? null : labels[index] ?? null);
|
|
772
|
+
}
|
|
773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
774
|
+
minVersion: "12.0.0",
|
|
775
|
+
version: "22.2.1",
|
|
776
|
+
ngImport: i0,
|
|
777
|
+
type: UiChartComponent,
|
|
778
|
+
deps: [],
|
|
779
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
780
|
+
});
|
|
781
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
782
|
+
minVersion: "17.2.0",
|
|
783
|
+
version: "22.2.1",
|
|
784
|
+
type: UiChartComponent,
|
|
785
|
+
isStandalone: true,
|
|
786
|
+
selector: "ui-chart",
|
|
787
|
+
inputs: {
|
|
788
|
+
options: {
|
|
789
|
+
classPropertyName: "options",
|
|
790
|
+
publicName: "options",
|
|
791
|
+
isSignal: true,
|
|
792
|
+
isRequired: true,
|
|
793
|
+
transformFunction: null
|
|
794
|
+
},
|
|
795
|
+
ariaLabel: {
|
|
796
|
+
classPropertyName: "ariaLabel",
|
|
797
|
+
publicName: "ariaLabel",
|
|
798
|
+
isSignal: true,
|
|
799
|
+
isRequired: true,
|
|
800
|
+
transformFunction: null
|
|
801
|
+
},
|
|
802
|
+
hiddenSeries: {
|
|
803
|
+
classPropertyName: "hiddenSeries",
|
|
804
|
+
publicName: "hiddenSeries",
|
|
805
|
+
isSignal: true,
|
|
806
|
+
isRequired: false,
|
|
807
|
+
transformFunction: null
|
|
808
|
+
},
|
|
809
|
+
emphasis: {
|
|
810
|
+
classPropertyName: "emphasis",
|
|
811
|
+
publicName: "emphasis",
|
|
812
|
+
isSignal: true,
|
|
813
|
+
isRequired: false,
|
|
814
|
+
transformFunction: null
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
host: { classAttribute: "ui-chart" },
|
|
818
|
+
viewQueries: [{
|
|
819
|
+
propertyName: "canvas",
|
|
820
|
+
first: true,
|
|
821
|
+
predicate: ["canvas"],
|
|
822
|
+
descendants: true,
|
|
823
|
+
isSignal: true
|
|
824
|
+
}],
|
|
825
|
+
ngImport: i0,
|
|
826
|
+
template: `
|
|
827
|
+
<div
|
|
828
|
+
#canvas
|
|
829
|
+
class="ui-chart-canvas"
|
|
830
|
+
role="img"
|
|
831
|
+
[attr.aria-label]="ariaLabel()"
|
|
832
|
+
></div>
|
|
833
|
+
`,
|
|
834
|
+
isInline: true,
|
|
835
|
+
styles: [".ui-chart{display:block;width:100%;min-width:0px;font-family:var(--font-body, \"Inter\", sans-serif)}.ui-chart .apexcharts-series{transition:opacity .15s ease}.ui-chart .ui-chart-series--faded{opacity:.15}.ui-chart .apexcharts-yaxis-label,.ui-chart .apexcharts-xaxis-label{font-variant-numeric:tabular-nums}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", "@layer properties;.ui-chart .apexcharts-tooltip.apexcharts-theme-light,.ui-chart-tooltip-panel{border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--border-line-2);background-color:var(--layer);--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-chart-tooltip{display:flex;min-width:calc(var(--spacing, .25rem) * 36);flex-direction:column;row-gap:var(--spacing, .25rem);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-title{padding-bottom:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-row{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 2);color:var(--foreground)}.ui-chart-tooltip-total{margin-top:var(--spacing, .25rem);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--border-line-2);padding-top:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-footer{padding-top:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-dot{width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);flex-shrink:0;border-radius:var(--radius-full, calc(infinity * 1px));background-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-dot--dashed{height:0px;width:calc(var(--spacing, .25rem) * 3);border-radius:0;border-top-style:var(--tw-border-style);border-top-width:2px;--tw-border-style: dashed;border-style:dashed;background-color:transparent;border-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-value{margin-inline-start:auto;padding-inline-start:calc(var(--spacing, .25rem) * 3);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
836
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
837
|
+
});
|
|
838
|
+
};
|
|
839
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
840
|
+
minVersion: "12.0.0",
|
|
841
|
+
version: "22.2.1",
|
|
842
|
+
ngImport: i0,
|
|
843
|
+
type: UiChartComponent,
|
|
844
|
+
decorators: [{
|
|
845
|
+
type: Component,
|
|
846
|
+
args: [{
|
|
847
|
+
selector: "ui-chart",
|
|
848
|
+
template: `
|
|
849
|
+
<div
|
|
850
|
+
#canvas
|
|
851
|
+
class="ui-chart-canvas"
|
|
852
|
+
role="img"
|
|
853
|
+
[attr.aria-label]="ariaLabel()"
|
|
854
|
+
></div>
|
|
855
|
+
`,
|
|
856
|
+
encapsulation: ViewEncapsulation.None,
|
|
857
|
+
host: { class: "ui-chart" },
|
|
858
|
+
styles: [".ui-chart{display:block;width:100%;min-width:0px;font-family:var(--font-body, \"Inter\", sans-serif)}.ui-chart .apexcharts-series{transition:opacity .15s ease}.ui-chart .ui-chart-series--faded{opacity:.15}.ui-chart .apexcharts-yaxis-label,.ui-chart .apexcharts-xaxis-label{font-variant-numeric:tabular-nums}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", "@layer properties;.ui-chart .apexcharts-tooltip.apexcharts-theme-light,.ui-chart-tooltip-panel{border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--border-line-2);background-color:var(--layer);--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-chart-tooltip{display:flex;min-width:calc(var(--spacing, .25rem) * 36);flex-direction:column;row-gap:var(--spacing, .25rem);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-title{padding-bottom:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-row{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 2);color:var(--foreground)}.ui-chart-tooltip-total{margin-top:var(--spacing, .25rem);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--border-line-2);padding-top:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-footer{padding-top:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-dot{width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);flex-shrink:0;border-radius:var(--radius-full, calc(infinity * 1px));background-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-dot--dashed{height:0px;width:calc(var(--spacing, .25rem) * 3);border-radius:0;border-top-style:var(--tw-border-style);border-top-width:2px;--tw-border-style: dashed;border-style:dashed;background-color:transparent;border-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-value{margin-inline-start:auto;padding-inline-start:calc(var(--spacing, .25rem) * 3);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
859
|
+
}]
|
|
860
|
+
}],
|
|
861
|
+
ctorParameters: () => [],
|
|
862
|
+
propDecorators: {
|
|
863
|
+
options: [{
|
|
864
|
+
type: i0.Input,
|
|
865
|
+
args: [{
|
|
866
|
+
isSignal: true,
|
|
867
|
+
alias: "options",
|
|
868
|
+
required: true
|
|
869
|
+
}]
|
|
870
|
+
}],
|
|
871
|
+
ariaLabel: [{
|
|
872
|
+
type: i0.Input,
|
|
873
|
+
args: [{
|
|
874
|
+
isSignal: true,
|
|
875
|
+
alias: "ariaLabel",
|
|
876
|
+
required: true
|
|
877
|
+
}]
|
|
878
|
+
}],
|
|
879
|
+
hiddenSeries: [{
|
|
880
|
+
type: i0.Input,
|
|
881
|
+
args: [{
|
|
882
|
+
isSignal: true,
|
|
883
|
+
alias: "hiddenSeries",
|
|
884
|
+
required: false
|
|
885
|
+
}]
|
|
886
|
+
}],
|
|
887
|
+
emphasis: [{
|
|
888
|
+
type: i0.Input,
|
|
889
|
+
args: [{
|
|
890
|
+
isSignal: true,
|
|
891
|
+
alias: "emphasis",
|
|
892
|
+
required: false
|
|
893
|
+
}]
|
|
894
|
+
}],
|
|
895
|
+
canvas: [{
|
|
896
|
+
type: i0.ViewChild,
|
|
897
|
+
args: ["canvas", { isSignal: true }]
|
|
898
|
+
}]
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
var UiChartTableComponent = class UiChartTableComponent {
|
|
902
|
+
caption = input.required(...ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []);
|
|
903
|
+
categories = input.required(...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
|
|
904
|
+
series = input.required(...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
|
|
905
|
+
valueFormatter = input.required(...ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []);
|
|
906
|
+
categoryLabel = input("Category", ...ngDevMode ? [{ debugName: "categoryLabel" }] : /* istanbul ignore next */ []);
|
|
907
|
+
visible = input(false, {
|
|
908
|
+
...ngDevMode ? { debugName: "visible" } : /* istanbul ignore next */ {},
|
|
909
|
+
transform: booleanAttribute
|
|
910
|
+
});
|
|
911
|
+
masked = input(false, {
|
|
912
|
+
...ngDevMode ? { debugName: "masked" } : /* istanbul ignore next */ {},
|
|
913
|
+
transform: booleanAttribute
|
|
914
|
+
});
|
|
915
|
+
isValue(value) {
|
|
916
|
+
return value !== null && value !== void 0;
|
|
917
|
+
}
|
|
918
|
+
format(value) {
|
|
919
|
+
return this.isValue(value) ? this.valueFormatter()(value) : "-";
|
|
920
|
+
}
|
|
921
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
922
|
+
minVersion: "12.0.0",
|
|
923
|
+
version: "22.2.1",
|
|
924
|
+
ngImport: i0,
|
|
925
|
+
type: UiChartTableComponent,
|
|
926
|
+
deps: [],
|
|
927
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
928
|
+
});
|
|
929
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
930
|
+
minVersion: "17.0.0",
|
|
931
|
+
version: "22.2.1",
|
|
932
|
+
type: UiChartTableComponent,
|
|
933
|
+
isStandalone: true,
|
|
934
|
+
selector: "ui-chart-table",
|
|
935
|
+
inputs: {
|
|
936
|
+
caption: {
|
|
937
|
+
classPropertyName: "caption",
|
|
938
|
+
publicName: "caption",
|
|
939
|
+
isSignal: true,
|
|
940
|
+
isRequired: true,
|
|
941
|
+
transformFunction: null
|
|
942
|
+
},
|
|
943
|
+
categories: {
|
|
944
|
+
classPropertyName: "categories",
|
|
945
|
+
publicName: "categories",
|
|
946
|
+
isSignal: true,
|
|
947
|
+
isRequired: true,
|
|
948
|
+
transformFunction: null
|
|
949
|
+
},
|
|
950
|
+
series: {
|
|
951
|
+
classPropertyName: "series",
|
|
952
|
+
publicName: "series",
|
|
953
|
+
isSignal: true,
|
|
954
|
+
isRequired: true,
|
|
955
|
+
transformFunction: null
|
|
956
|
+
},
|
|
957
|
+
valueFormatter: {
|
|
958
|
+
classPropertyName: "valueFormatter",
|
|
959
|
+
publicName: "valueFormatter",
|
|
960
|
+
isSignal: true,
|
|
961
|
+
isRequired: true,
|
|
962
|
+
transformFunction: null
|
|
963
|
+
},
|
|
964
|
+
categoryLabel: {
|
|
965
|
+
classPropertyName: "categoryLabel",
|
|
966
|
+
publicName: "categoryLabel",
|
|
967
|
+
isSignal: true,
|
|
968
|
+
isRequired: false,
|
|
969
|
+
transformFunction: null
|
|
970
|
+
},
|
|
971
|
+
visible: {
|
|
972
|
+
classPropertyName: "visible",
|
|
973
|
+
publicName: "visible",
|
|
974
|
+
isSignal: true,
|
|
975
|
+
isRequired: false,
|
|
976
|
+
transformFunction: null
|
|
977
|
+
},
|
|
978
|
+
masked: {
|
|
979
|
+
classPropertyName: "masked",
|
|
980
|
+
publicName: "masked",
|
|
981
|
+
isSignal: true,
|
|
982
|
+
isRequired: false,
|
|
983
|
+
transformFunction: null
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
ngImport: i0,
|
|
987
|
+
template: `
|
|
988
|
+
<!-- sr-only on a wrapper, the table's own width would otherwise override it -->
|
|
989
|
+
<div [class.sr-only]="!visible()">
|
|
990
|
+
<table class="ui-chart-table">
|
|
991
|
+
<caption class="sr-only">{{ caption() }}</caption>
|
|
992
|
+
<thead>
|
|
993
|
+
<tr>
|
|
994
|
+
<th scope="col" class="ui-text-caption">{{ categoryLabel() }}</th>
|
|
995
|
+
@for (item of series(); track item.name) {
|
|
996
|
+
<th scope="col" class="ui-text-caption">{{ item.name }}</th>
|
|
997
|
+
}
|
|
998
|
+
</tr>
|
|
999
|
+
</thead>
|
|
1000
|
+
<tbody>
|
|
1001
|
+
@for (category of categories(); track $index; let row = $index) {
|
|
1002
|
+
<tr>
|
|
1003
|
+
<th scope="row" class="ui-text-body-alt">{{ category }}</th>
|
|
1004
|
+
@for (item of series(); track item.name) {
|
|
1005
|
+
<td class="ui-text-body-alt">
|
|
1006
|
+
@if (masked() && isValue(item.data[row])) {
|
|
1007
|
+
<span aria-hidden="true">{{ format(item.data[row]) }}</span>
|
|
1008
|
+
<span class="sr-only">amount hidden</span>
|
|
1009
|
+
} @else {{{ format(item.data[row]) }}}
|
|
1010
|
+
</td>
|
|
1011
|
+
}
|
|
1012
|
+
</tr>
|
|
1013
|
+
}
|
|
1014
|
+
</tbody>
|
|
1015
|
+
</table>
|
|
1016
|
+
</div>
|
|
1017
|
+
`,
|
|
1018
|
+
isInline: true,
|
|
1019
|
+
styles: ["@layer properties;.ui-chart-table{margin-top:calc(var(--spacing, .25rem) * 4);width:100%}.ui-chart-table th,.ui-chart-table td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--border-line-2);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);text-align:left}.ui-chart-table thead th{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:var(--muted-foreground-1)}.ui-chart-table tbody th{--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:var(--foreground)}.ui-chart-table td{text-align:right;color:var(--foreground);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ui-chart-table thead th:not(:first-child){text-align:right}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
1020
|
+
});
|
|
1021
|
+
};
|
|
1022
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1023
|
+
minVersion: "12.0.0",
|
|
1024
|
+
version: "22.2.1",
|
|
1025
|
+
ngImport: i0,
|
|
1026
|
+
type: UiChartTableComponent,
|
|
1027
|
+
decorators: [{
|
|
1028
|
+
type: Component,
|
|
1029
|
+
args: [{
|
|
1030
|
+
selector: "ui-chart-table",
|
|
1031
|
+
template: `
|
|
1032
|
+
<!-- sr-only on a wrapper, the table's own width would otherwise override it -->
|
|
1033
|
+
<div [class.sr-only]="!visible()">
|
|
1034
|
+
<table class="ui-chart-table">
|
|
1035
|
+
<caption class="sr-only">{{ caption() }}</caption>
|
|
1036
|
+
<thead>
|
|
1037
|
+
<tr>
|
|
1038
|
+
<th scope="col" class="ui-text-caption">{{ categoryLabel() }}</th>
|
|
1039
|
+
@for (item of series(); track item.name) {
|
|
1040
|
+
<th scope="col" class="ui-text-caption">{{ item.name }}</th>
|
|
1041
|
+
}
|
|
1042
|
+
</tr>
|
|
1043
|
+
</thead>
|
|
1044
|
+
<tbody>
|
|
1045
|
+
@for (category of categories(); track $index; let row = $index) {
|
|
1046
|
+
<tr>
|
|
1047
|
+
<th scope="row" class="ui-text-body-alt">{{ category }}</th>
|
|
1048
|
+
@for (item of series(); track item.name) {
|
|
1049
|
+
<td class="ui-text-body-alt">
|
|
1050
|
+
@if (masked() && isValue(item.data[row])) {
|
|
1051
|
+
<span aria-hidden="true">{{ format(item.data[row]) }}</span>
|
|
1052
|
+
<span class="sr-only">amount hidden</span>
|
|
1053
|
+
} @else {{{ format(item.data[row]) }}}
|
|
1054
|
+
</td>
|
|
1055
|
+
}
|
|
1056
|
+
</tr>
|
|
1057
|
+
}
|
|
1058
|
+
</tbody>
|
|
1059
|
+
</table>
|
|
1060
|
+
</div>
|
|
1061
|
+
`,
|
|
1062
|
+
styles: ["@layer properties;.ui-chart-table{margin-top:calc(var(--spacing, .25rem) * 4);width:100%}.ui-chart-table th,.ui-chart-table td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--border-line-2);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);text-align:left}.ui-chart-table thead th{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:var(--muted-foreground-1)}.ui-chart-table tbody th{--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);color:var(--foreground)}.ui-chart-table td{text-align:right;color:var(--foreground);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ui-chart-table thead th:not(:first-child){text-align:right}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
1063
|
+
}]
|
|
1064
|
+
}],
|
|
1065
|
+
propDecorators: {
|
|
1066
|
+
caption: [{
|
|
1067
|
+
type: i0.Input,
|
|
1068
|
+
args: [{
|
|
1069
|
+
isSignal: true,
|
|
1070
|
+
alias: "caption",
|
|
1071
|
+
required: true
|
|
1072
|
+
}]
|
|
1073
|
+
}],
|
|
1074
|
+
categories: [{
|
|
1075
|
+
type: i0.Input,
|
|
1076
|
+
args: [{
|
|
1077
|
+
isSignal: true,
|
|
1078
|
+
alias: "categories",
|
|
1079
|
+
required: true
|
|
1080
|
+
}]
|
|
1081
|
+
}],
|
|
1082
|
+
series: [{
|
|
1083
|
+
type: i0.Input,
|
|
1084
|
+
args: [{
|
|
1085
|
+
isSignal: true,
|
|
1086
|
+
alias: "series",
|
|
1087
|
+
required: true
|
|
1088
|
+
}]
|
|
1089
|
+
}],
|
|
1090
|
+
valueFormatter: [{
|
|
1091
|
+
type: i0.Input,
|
|
1092
|
+
args: [{
|
|
1093
|
+
isSignal: true,
|
|
1094
|
+
alias: "valueFormatter",
|
|
1095
|
+
required: true
|
|
1096
|
+
}]
|
|
1097
|
+
}],
|
|
1098
|
+
categoryLabel: [{
|
|
1099
|
+
type: i0.Input,
|
|
1100
|
+
args: [{
|
|
1101
|
+
isSignal: true,
|
|
1102
|
+
alias: "categoryLabel",
|
|
1103
|
+
required: false
|
|
1104
|
+
}]
|
|
1105
|
+
}],
|
|
1106
|
+
visible: [{
|
|
1107
|
+
type: i0.Input,
|
|
1108
|
+
args: [{
|
|
1109
|
+
isSignal: true,
|
|
1110
|
+
alias: "visible",
|
|
1111
|
+
required: false
|
|
1112
|
+
}]
|
|
1113
|
+
}],
|
|
1114
|
+
masked: [{
|
|
1115
|
+
type: i0.Input,
|
|
1116
|
+
args: [{
|
|
1117
|
+
isSignal: true,
|
|
1118
|
+
alias: "masked",
|
|
1119
|
+
required: false
|
|
1120
|
+
}]
|
|
1121
|
+
}]
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
var UiChartFrameComponent = class UiChartFrameComponent {
|
|
1125
|
+
options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
1126
|
+
ariaLabel = input.required(...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
1127
|
+
categories = input.required(...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
|
|
1128
|
+
series = input.required(...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
|
|
1129
|
+
legendItems = input.required(...ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []);
|
|
1130
|
+
legendNote = input("", ...ngDevMode ? [{ debugName: "legendNote" }] : /* istanbul ignore next */ []);
|
|
1131
|
+
hiddenSeries = model([], ...ngDevMode ? [{ debugName: "hiddenSeries" }] : /* istanbul ignore next */ []);
|
|
1132
|
+
valueFormatter = input.required(...ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []);
|
|
1133
|
+
categoryLabel = input.required(...ngDevMode ? [{ debugName: "categoryLabel" }] : /* istanbul ignore next */ []);
|
|
1134
|
+
height = input.required(...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
1135
|
+
emptyText = input.required(...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
1136
|
+
loading = input(false, {
|
|
1137
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
1138
|
+
transform: booleanAttribute
|
|
1139
|
+
});
|
|
1140
|
+
empty = input(false, {
|
|
1141
|
+
...ngDevMode ? { debugName: "empty" } : /* istanbul ignore next */ {},
|
|
1142
|
+
transform: booleanAttribute
|
|
1143
|
+
});
|
|
1144
|
+
showTable = input(false, {
|
|
1145
|
+
...ngDevMode ? { debugName: "showTable" } : /* istanbul ignore next */ {},
|
|
1146
|
+
transform: booleanAttribute
|
|
1147
|
+
});
|
|
1148
|
+
masked = input(false, {
|
|
1149
|
+
...ngDevMode ? { debugName: "masked" } : /* istanbul ignore next */ {},
|
|
1150
|
+
transform: booleanAttribute
|
|
1151
|
+
});
|
|
1152
|
+
showLegend = input(true, {
|
|
1153
|
+
...ngDevMode ? { debugName: "showLegend" } : /* istanbul ignore next */ {},
|
|
1154
|
+
transform: booleanAttribute
|
|
1155
|
+
});
|
|
1156
|
+
emphasis = model(null, ...ngDevMode ? [{ debugName: "emphasis" }] : /* istanbul ignore next */ []);
|
|
1157
|
+
fill = computed(() => this.height() === "fill", ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
|
|
1158
|
+
fixedHeight = computed(() => {
|
|
1159
|
+
const height = this.height();
|
|
1160
|
+
return height === "fill" ? null : height;
|
|
1161
|
+
}, ...ngDevMode ? [{ debugName: "fixedHeight" }] : /* istanbul ignore next */ []);
|
|
1162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1163
|
+
minVersion: "12.0.0",
|
|
1164
|
+
version: "22.2.1",
|
|
1165
|
+
ngImport: i0,
|
|
1166
|
+
type: UiChartFrameComponent,
|
|
1167
|
+
deps: [],
|
|
1168
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1169
|
+
});
|
|
1170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1171
|
+
minVersion: "17.0.0",
|
|
1172
|
+
version: "22.2.1",
|
|
1173
|
+
type: UiChartFrameComponent,
|
|
1174
|
+
isStandalone: true,
|
|
1175
|
+
selector: "ui-chart-frame",
|
|
1176
|
+
inputs: {
|
|
1177
|
+
options: {
|
|
1178
|
+
classPropertyName: "options",
|
|
1179
|
+
publicName: "options",
|
|
1180
|
+
isSignal: true,
|
|
1181
|
+
isRequired: true,
|
|
1182
|
+
transformFunction: null
|
|
1183
|
+
},
|
|
1184
|
+
ariaLabel: {
|
|
1185
|
+
classPropertyName: "ariaLabel",
|
|
1186
|
+
publicName: "ariaLabel",
|
|
1187
|
+
isSignal: true,
|
|
1188
|
+
isRequired: true,
|
|
1189
|
+
transformFunction: null
|
|
1190
|
+
},
|
|
1191
|
+
categories: {
|
|
1192
|
+
classPropertyName: "categories",
|
|
1193
|
+
publicName: "categories",
|
|
1194
|
+
isSignal: true,
|
|
1195
|
+
isRequired: true,
|
|
1196
|
+
transformFunction: null
|
|
1197
|
+
},
|
|
1198
|
+
series: {
|
|
1199
|
+
classPropertyName: "series",
|
|
1200
|
+
publicName: "series",
|
|
1201
|
+
isSignal: true,
|
|
1202
|
+
isRequired: true,
|
|
1203
|
+
transformFunction: null
|
|
1204
|
+
},
|
|
1205
|
+
legendItems: {
|
|
1206
|
+
classPropertyName: "legendItems",
|
|
1207
|
+
publicName: "legendItems",
|
|
1208
|
+
isSignal: true,
|
|
1209
|
+
isRequired: true,
|
|
1210
|
+
transformFunction: null
|
|
1211
|
+
},
|
|
1212
|
+
legendNote: {
|
|
1213
|
+
classPropertyName: "legendNote",
|
|
1214
|
+
publicName: "legendNote",
|
|
1215
|
+
isSignal: true,
|
|
1216
|
+
isRequired: false,
|
|
1217
|
+
transformFunction: null
|
|
1218
|
+
},
|
|
1219
|
+
hiddenSeries: {
|
|
1220
|
+
classPropertyName: "hiddenSeries",
|
|
1221
|
+
publicName: "hiddenSeries",
|
|
1222
|
+
isSignal: true,
|
|
1223
|
+
isRequired: false,
|
|
1224
|
+
transformFunction: null
|
|
1225
|
+
},
|
|
1226
|
+
valueFormatter: {
|
|
1227
|
+
classPropertyName: "valueFormatter",
|
|
1228
|
+
publicName: "valueFormatter",
|
|
1229
|
+
isSignal: true,
|
|
1230
|
+
isRequired: true,
|
|
1231
|
+
transformFunction: null
|
|
1232
|
+
},
|
|
1233
|
+
categoryLabel: {
|
|
1234
|
+
classPropertyName: "categoryLabel",
|
|
1235
|
+
publicName: "categoryLabel",
|
|
1236
|
+
isSignal: true,
|
|
1237
|
+
isRequired: true,
|
|
1238
|
+
transformFunction: null
|
|
1239
|
+
},
|
|
1240
|
+
height: {
|
|
1241
|
+
classPropertyName: "height",
|
|
1242
|
+
publicName: "height",
|
|
1243
|
+
isSignal: true,
|
|
1244
|
+
isRequired: true,
|
|
1245
|
+
transformFunction: null
|
|
1246
|
+
},
|
|
1247
|
+
emptyText: {
|
|
1248
|
+
classPropertyName: "emptyText",
|
|
1249
|
+
publicName: "emptyText",
|
|
1250
|
+
isSignal: true,
|
|
1251
|
+
isRequired: true,
|
|
1252
|
+
transformFunction: null
|
|
1253
|
+
},
|
|
1254
|
+
loading: {
|
|
1255
|
+
classPropertyName: "loading",
|
|
1256
|
+
publicName: "loading",
|
|
1257
|
+
isSignal: true,
|
|
1258
|
+
isRequired: false,
|
|
1259
|
+
transformFunction: null
|
|
1260
|
+
},
|
|
1261
|
+
empty: {
|
|
1262
|
+
classPropertyName: "empty",
|
|
1263
|
+
publicName: "empty",
|
|
1264
|
+
isSignal: true,
|
|
1265
|
+
isRequired: false,
|
|
1266
|
+
transformFunction: null
|
|
1267
|
+
},
|
|
1268
|
+
showTable: {
|
|
1269
|
+
classPropertyName: "showTable",
|
|
1270
|
+
publicName: "showTable",
|
|
1271
|
+
isSignal: true,
|
|
1272
|
+
isRequired: false,
|
|
1273
|
+
transformFunction: null
|
|
1274
|
+
},
|
|
1275
|
+
masked: {
|
|
1276
|
+
classPropertyName: "masked",
|
|
1277
|
+
publicName: "masked",
|
|
1278
|
+
isSignal: true,
|
|
1279
|
+
isRequired: false,
|
|
1280
|
+
transformFunction: null
|
|
1281
|
+
},
|
|
1282
|
+
showLegend: {
|
|
1283
|
+
classPropertyName: "showLegend",
|
|
1284
|
+
publicName: "showLegend",
|
|
1285
|
+
isSignal: true,
|
|
1286
|
+
isRequired: false,
|
|
1287
|
+
transformFunction: null
|
|
1288
|
+
},
|
|
1289
|
+
emphasis: {
|
|
1290
|
+
classPropertyName: "emphasis",
|
|
1291
|
+
publicName: "emphasis",
|
|
1292
|
+
isSignal: true,
|
|
1293
|
+
isRequired: false,
|
|
1294
|
+
transformFunction: null
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
outputs: {
|
|
1298
|
+
hiddenSeries: "hiddenSeriesChange",
|
|
1299
|
+
emphasis: "emphasisChange"
|
|
1300
|
+
},
|
|
1301
|
+
host: {
|
|
1302
|
+
properties: {
|
|
1303
|
+
"class.block": "!fill()",
|
|
1304
|
+
"class.flex": "fill()",
|
|
1305
|
+
"class.flex-col": "fill()",
|
|
1306
|
+
"class.h-full": "fill()"
|
|
1307
|
+
},
|
|
1308
|
+
classAttribute: "relative w-full min-w-0"
|
|
1309
|
+
},
|
|
1310
|
+
ngImport: i0,
|
|
1311
|
+
template: `
|
|
1312
|
+
@if (loading()) {
|
|
1313
|
+
<div [style.height.px]="fixedHeight()" [class.grow]="fill()" aria-busy="true">
|
|
1314
|
+
<span class="sr-only">Loading chart</span>
|
|
1315
|
+
<ui-skeleton shape="rect" class="size-full" />
|
|
1316
|
+
</div>
|
|
1317
|
+
} @else if (empty()) {
|
|
1318
|
+
<div
|
|
1319
|
+
class="flex justify-center items-center border border-line-2 border-dashed rounded-lg text-muted-foreground-1 ui-text-body-alt"
|
|
1320
|
+
[class.grow]="fill()"
|
|
1321
|
+
[style.height.px]="fixedHeight()"
|
|
1322
|
+
>
|
|
1323
|
+
{{ emptyText() }}
|
|
1324
|
+
</div>
|
|
1325
|
+
} @else {
|
|
1326
|
+
<!-- one series needs no legend, the chart's title already names it -->
|
|
1327
|
+
@if (showLegend() && (legendItems().length > 1 || legendNote())) {
|
|
1328
|
+
<ui-chart-legend
|
|
1329
|
+
class="mb-3 shrink-0"
|
|
1330
|
+
[items]="legendItems()"
|
|
1331
|
+
[note]="legendNote()"
|
|
1332
|
+
[(hidden)]="hiddenSeries"
|
|
1333
|
+
(focusChange)="emphasis.set($event)"
|
|
1334
|
+
toggleable
|
|
1335
|
+
/>
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
@if (options(); as options) {
|
|
1339
|
+
<ui-chart
|
|
1340
|
+
[class.grow]="fill()"
|
|
1341
|
+
[class.min-h-0]="fill()"
|
|
1342
|
+
[options]="options"
|
|
1343
|
+
[ariaLabel]="ariaLabel()"
|
|
1344
|
+
[hiddenSeries]="hiddenSeries()"
|
|
1345
|
+
[emphasis]="emphasis()"
|
|
1346
|
+
/>
|
|
1347
|
+
} @else {
|
|
1348
|
+
<ng-content />
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
<ui-chart-table
|
|
1352
|
+
[caption]="ariaLabel()"
|
|
1353
|
+
[categories]="categories()"
|
|
1354
|
+
[series]="series()"
|
|
1355
|
+
[valueFormatter]="valueFormatter()"
|
|
1356
|
+
[masked]="masked()"
|
|
1357
|
+
[categoryLabel]="categoryLabel()"
|
|
1358
|
+
[visible]="showTable()"
|
|
1359
|
+
/>
|
|
1360
|
+
}
|
|
1361
|
+
`,
|
|
1362
|
+
isInline: true,
|
|
1363
|
+
dependencies: [
|
|
1364
|
+
{
|
|
1365
|
+
kind: "component",
|
|
1366
|
+
type: UiChartComponent,
|
|
1367
|
+
selector: "ui-chart",
|
|
1368
|
+
inputs: [
|
|
1369
|
+
"options",
|
|
1370
|
+
"ariaLabel",
|
|
1371
|
+
"hiddenSeries",
|
|
1372
|
+
"emphasis"
|
|
1373
|
+
]
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
kind: "component",
|
|
1377
|
+
type: UiChartTableComponent,
|
|
1378
|
+
selector: "ui-chart-table",
|
|
1379
|
+
inputs: [
|
|
1380
|
+
"caption",
|
|
1381
|
+
"categories",
|
|
1382
|
+
"series",
|
|
1383
|
+
"valueFormatter",
|
|
1384
|
+
"categoryLabel",
|
|
1385
|
+
"visible",
|
|
1386
|
+
"masked"
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
kind: "component",
|
|
1391
|
+
type: UiChartLegendComponent,
|
|
1392
|
+
selector: "ui-chart-legend",
|
|
1393
|
+
inputs: [
|
|
1394
|
+
"items",
|
|
1395
|
+
"note",
|
|
1396
|
+
"for",
|
|
1397
|
+
"itemsWith",
|
|
1398
|
+
"hidden",
|
|
1399
|
+
"toggleable"
|
|
1400
|
+
],
|
|
1401
|
+
outputs: ["hiddenChange", "focusChange"]
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
kind: "component",
|
|
1405
|
+
type: UiSkeletonComponent,
|
|
1406
|
+
selector: "ui-skeleton",
|
|
1407
|
+
inputs: [
|
|
1408
|
+
"shape",
|
|
1409
|
+
"animated",
|
|
1410
|
+
"lines"
|
|
1411
|
+
]
|
|
1412
|
+
}
|
|
1413
|
+
]
|
|
1414
|
+
});
|
|
1415
|
+
};
|
|
1416
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1417
|
+
minVersion: "12.0.0",
|
|
1418
|
+
version: "22.2.1",
|
|
1419
|
+
ngImport: i0,
|
|
1420
|
+
type: UiChartFrameComponent,
|
|
1421
|
+
decorators: [{
|
|
1422
|
+
type: Component,
|
|
1423
|
+
args: [{
|
|
1424
|
+
selector: "ui-chart-frame",
|
|
1425
|
+
template: `
|
|
1426
|
+
@if (loading()) {
|
|
1427
|
+
<div [style.height.px]="fixedHeight()" [class.grow]="fill()" aria-busy="true">
|
|
1428
|
+
<span class="sr-only">Loading chart</span>
|
|
1429
|
+
<ui-skeleton shape="rect" class="size-full" />
|
|
1430
|
+
</div>
|
|
1431
|
+
} @else if (empty()) {
|
|
1432
|
+
<div
|
|
1433
|
+
class="flex justify-center items-center border border-line-2 border-dashed rounded-lg text-muted-foreground-1 ui-text-body-alt"
|
|
1434
|
+
[class.grow]="fill()"
|
|
1435
|
+
[style.height.px]="fixedHeight()"
|
|
1436
|
+
>
|
|
1437
|
+
{{ emptyText() }}
|
|
1438
|
+
</div>
|
|
1439
|
+
} @else {
|
|
1440
|
+
<!-- one series needs no legend, the chart's title already names it -->
|
|
1441
|
+
@if (showLegend() && (legendItems().length > 1 || legendNote())) {
|
|
1442
|
+
<ui-chart-legend
|
|
1443
|
+
class="mb-3 shrink-0"
|
|
1444
|
+
[items]="legendItems()"
|
|
1445
|
+
[note]="legendNote()"
|
|
1446
|
+
[(hidden)]="hiddenSeries"
|
|
1447
|
+
(focusChange)="emphasis.set($event)"
|
|
1448
|
+
toggleable
|
|
1449
|
+
/>
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
@if (options(); as options) {
|
|
1453
|
+
<ui-chart
|
|
1454
|
+
[class.grow]="fill()"
|
|
1455
|
+
[class.min-h-0]="fill()"
|
|
1456
|
+
[options]="options"
|
|
1457
|
+
[ariaLabel]="ariaLabel()"
|
|
1458
|
+
[hiddenSeries]="hiddenSeries()"
|
|
1459
|
+
[emphasis]="emphasis()"
|
|
1460
|
+
/>
|
|
1461
|
+
} @else {
|
|
1462
|
+
<ng-content />
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
<ui-chart-table
|
|
1466
|
+
[caption]="ariaLabel()"
|
|
1467
|
+
[categories]="categories()"
|
|
1468
|
+
[series]="series()"
|
|
1469
|
+
[valueFormatter]="valueFormatter()"
|
|
1470
|
+
[masked]="masked()"
|
|
1471
|
+
[categoryLabel]="categoryLabel()"
|
|
1472
|
+
[visible]="showTable()"
|
|
1473
|
+
/>
|
|
1474
|
+
}
|
|
1475
|
+
`,
|
|
1476
|
+
imports: [
|
|
1477
|
+
UiChartComponent,
|
|
1478
|
+
UiChartTableComponent,
|
|
1479
|
+
UiChartLegendComponent,
|
|
1480
|
+
UiSkeletonComponent
|
|
1481
|
+
],
|
|
1482
|
+
host: {
|
|
1483
|
+
class: "relative w-full min-w-0",
|
|
1484
|
+
"[class.block]": "!fill()",
|
|
1485
|
+
"[class.flex]": "fill()",
|
|
1486
|
+
"[class.flex-col]": "fill()",
|
|
1487
|
+
"[class.h-full]": "fill()"
|
|
1488
|
+
}
|
|
1489
|
+
}]
|
|
1490
|
+
}],
|
|
1491
|
+
propDecorators: {
|
|
1492
|
+
options: [{
|
|
1493
|
+
type: i0.Input,
|
|
1494
|
+
args: [{
|
|
1495
|
+
isSignal: true,
|
|
1496
|
+
alias: "options",
|
|
1497
|
+
required: true
|
|
1498
|
+
}]
|
|
1499
|
+
}],
|
|
1500
|
+
ariaLabel: [{
|
|
1501
|
+
type: i0.Input,
|
|
1502
|
+
args: [{
|
|
1503
|
+
isSignal: true,
|
|
1504
|
+
alias: "ariaLabel",
|
|
1505
|
+
required: true
|
|
1506
|
+
}]
|
|
1507
|
+
}],
|
|
1508
|
+
categories: [{
|
|
1509
|
+
type: i0.Input,
|
|
1510
|
+
args: [{
|
|
1511
|
+
isSignal: true,
|
|
1512
|
+
alias: "categories",
|
|
1513
|
+
required: true
|
|
1514
|
+
}]
|
|
1515
|
+
}],
|
|
1516
|
+
series: [{
|
|
1517
|
+
type: i0.Input,
|
|
1518
|
+
args: [{
|
|
1519
|
+
isSignal: true,
|
|
1520
|
+
alias: "series",
|
|
1521
|
+
required: true
|
|
1522
|
+
}]
|
|
1523
|
+
}],
|
|
1524
|
+
legendItems: [{
|
|
1525
|
+
type: i0.Input,
|
|
1526
|
+
args: [{
|
|
1527
|
+
isSignal: true,
|
|
1528
|
+
alias: "legendItems",
|
|
1529
|
+
required: true
|
|
1530
|
+
}]
|
|
1531
|
+
}],
|
|
1532
|
+
legendNote: [{
|
|
1533
|
+
type: i0.Input,
|
|
1534
|
+
args: [{
|
|
1535
|
+
isSignal: true,
|
|
1536
|
+
alias: "legendNote",
|
|
1537
|
+
required: false
|
|
1538
|
+
}]
|
|
1539
|
+
}],
|
|
1540
|
+
hiddenSeries: [{
|
|
1541
|
+
type: i0.Input,
|
|
1542
|
+
args: [{
|
|
1543
|
+
isSignal: true,
|
|
1544
|
+
alias: "hiddenSeries",
|
|
1545
|
+
required: false
|
|
1546
|
+
}]
|
|
1547
|
+
}, {
|
|
1548
|
+
type: i0.Output,
|
|
1549
|
+
args: ["hiddenSeriesChange"]
|
|
1550
|
+
}],
|
|
1551
|
+
valueFormatter: [{
|
|
1552
|
+
type: i0.Input,
|
|
1553
|
+
args: [{
|
|
1554
|
+
isSignal: true,
|
|
1555
|
+
alias: "valueFormatter",
|
|
1556
|
+
required: true
|
|
1557
|
+
}]
|
|
1558
|
+
}],
|
|
1559
|
+
categoryLabel: [{
|
|
1560
|
+
type: i0.Input,
|
|
1561
|
+
args: [{
|
|
1562
|
+
isSignal: true,
|
|
1563
|
+
alias: "categoryLabel",
|
|
1564
|
+
required: true
|
|
1565
|
+
}]
|
|
1566
|
+
}],
|
|
1567
|
+
height: [{
|
|
1568
|
+
type: i0.Input,
|
|
1569
|
+
args: [{
|
|
1570
|
+
isSignal: true,
|
|
1571
|
+
alias: "height",
|
|
1572
|
+
required: true
|
|
1573
|
+
}]
|
|
1574
|
+
}],
|
|
1575
|
+
emptyText: [{
|
|
1576
|
+
type: i0.Input,
|
|
1577
|
+
args: [{
|
|
1578
|
+
isSignal: true,
|
|
1579
|
+
alias: "emptyText",
|
|
1580
|
+
required: true
|
|
1581
|
+
}]
|
|
1582
|
+
}],
|
|
1583
|
+
loading: [{
|
|
1584
|
+
type: i0.Input,
|
|
1585
|
+
args: [{
|
|
1586
|
+
isSignal: true,
|
|
1587
|
+
alias: "loading",
|
|
1588
|
+
required: false
|
|
1589
|
+
}]
|
|
1590
|
+
}],
|
|
1591
|
+
empty: [{
|
|
1592
|
+
type: i0.Input,
|
|
1593
|
+
args: [{
|
|
1594
|
+
isSignal: true,
|
|
1595
|
+
alias: "empty",
|
|
1596
|
+
required: false
|
|
1597
|
+
}]
|
|
1598
|
+
}],
|
|
1599
|
+
showTable: [{
|
|
1600
|
+
type: i0.Input,
|
|
1601
|
+
args: [{
|
|
1602
|
+
isSignal: true,
|
|
1603
|
+
alias: "showTable",
|
|
1604
|
+
required: false
|
|
1605
|
+
}]
|
|
1606
|
+
}],
|
|
1607
|
+
masked: [{
|
|
1608
|
+
type: i0.Input,
|
|
1609
|
+
args: [{
|
|
1610
|
+
isSignal: true,
|
|
1611
|
+
alias: "masked",
|
|
1612
|
+
required: false
|
|
1613
|
+
}]
|
|
1614
|
+
}],
|
|
1615
|
+
showLegend: [{
|
|
1616
|
+
type: i0.Input,
|
|
1617
|
+
args: [{
|
|
1618
|
+
isSignal: true,
|
|
1619
|
+
alias: "showLegend",
|
|
1620
|
+
required: false
|
|
1621
|
+
}]
|
|
1622
|
+
}],
|
|
1623
|
+
emphasis: [{
|
|
1624
|
+
type: i0.Input,
|
|
1625
|
+
args: [{
|
|
1626
|
+
isSignal: true,
|
|
1627
|
+
alias: "emphasis",
|
|
1628
|
+
required: false
|
|
1629
|
+
}]
|
|
1630
|
+
}, {
|
|
1631
|
+
type: i0.Output,
|
|
1632
|
+
args: ["emphasisChange"]
|
|
1633
|
+
}]
|
|
1634
|
+
}
|
|
1635
|
+
});
|
|
1636
|
+
const MAX_BAR_THICKNESS = 24;
|
|
1637
|
+
const FADED_STRENGTH = .3;
|
|
1638
|
+
function fade(colour, ink) {
|
|
1639
|
+
return mixChartColours(colour, ink.surface, FADED_STRENGTH) ?? ink.context;
|
|
1640
|
+
}
|
|
1641
|
+
var UiBarChartComponent = class UiBarChartComponent extends UiAxisChartBase {
|
|
1642
|
+
orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
1643
|
+
stacked = input(false, {
|
|
1644
|
+
...ngDevMode ? { debugName: "stacked" } : /* istanbul ignore next */ {},
|
|
1645
|
+
transform: booleanAttribute
|
|
1646
|
+
});
|
|
1647
|
+
highlightCategory = input(null, ...ngDevMode ? [{ debugName: "highlightCategory" }] : /* istanbul ignore next */ []);
|
|
1648
|
+
chartOptions = computed(() => {
|
|
1649
|
+
const ink = this.ink();
|
|
1650
|
+
const base = baseChartOptions(ink);
|
|
1651
|
+
const labels = chartAxisLabels(ink);
|
|
1652
|
+
const horizontal = this.orientation() === "horizontal";
|
|
1653
|
+
const format = this.displayFormatter();
|
|
1654
|
+
const masked = this.masked();
|
|
1655
|
+
const series = this.series();
|
|
1656
|
+
const categories = this.categories();
|
|
1657
|
+
const colours = this.colours();
|
|
1658
|
+
const picked = categories.indexOf(this.highlightCategory() ?? "");
|
|
1659
|
+
const thickness = `${MAX_BAR_THICKNESS}px`;
|
|
1660
|
+
const valueLabels = masked ? { show: false } : {
|
|
1661
|
+
...labels,
|
|
1662
|
+
formatter: (value) => format(Number(value))
|
|
1663
|
+
};
|
|
1664
|
+
return mergeChartOptions({
|
|
1665
|
+
...base,
|
|
1666
|
+
chart: {
|
|
1667
|
+
...base.chart,
|
|
1668
|
+
type: "bar",
|
|
1669
|
+
height: this.apexHeight(),
|
|
1670
|
+
stacked: this.stacked()
|
|
1671
|
+
},
|
|
1672
|
+
colors: picked < 0 ? colours : colours.map((colour) => ({ dataPointIndex }) => dataPointIndex === picked ? colour : fade(colour, ink)),
|
|
1673
|
+
series: series.map((item) => ({
|
|
1674
|
+
name: item.name,
|
|
1675
|
+
data: this.concealed() ? item.data.map(() => null) : item.data
|
|
1676
|
+
})),
|
|
1677
|
+
plotOptions: { bar: {
|
|
1678
|
+
horizontal,
|
|
1679
|
+
borderRadius: this.stacked() ? 0 : 4,
|
|
1680
|
+
borderRadiusApplication: "end",
|
|
1681
|
+
columnWidth: thickness,
|
|
1682
|
+
barHeight: thickness
|
|
1683
|
+
} },
|
|
1684
|
+
stroke: {
|
|
1685
|
+
show: true,
|
|
1686
|
+
width: 2,
|
|
1687
|
+
colors: [ink.surface]
|
|
1688
|
+
},
|
|
1689
|
+
xaxis: {
|
|
1690
|
+
...base.xaxis,
|
|
1691
|
+
categories,
|
|
1692
|
+
labels: horizontal ? valueLabels : {
|
|
1693
|
+
...labels,
|
|
1694
|
+
formatter: thinnedCategoryLabels(categories),
|
|
1695
|
+
rotate: 0
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
yaxis: {
|
|
1699
|
+
...base.yaxis,
|
|
1700
|
+
labels: horizontal ? labels : valueLabels
|
|
1701
|
+
},
|
|
1702
|
+
grid: {
|
|
1703
|
+
...base.grid,
|
|
1704
|
+
xaxis: { lines: { show: horizontal } },
|
|
1705
|
+
yaxis: { lines: { show: !horizontal } }
|
|
1706
|
+
},
|
|
1707
|
+
tooltip: this.concealed() ? { enabled: false } : this.stacked() ? {
|
|
1708
|
+
shared: true,
|
|
1709
|
+
intersect: false,
|
|
1710
|
+
custom: ({ dataPointIndex }) => {
|
|
1711
|
+
const rows = series.map((item, index) => ({
|
|
1712
|
+
colour: colours[index],
|
|
1713
|
+
name: item.name,
|
|
1714
|
+
raw: item.data[dataPointIndex] ?? null
|
|
1715
|
+
})).filter((row) => !this.hiddenSeries().includes(row.name));
|
|
1716
|
+
const values = rows.map((row) => row.raw).filter((value) => value !== null);
|
|
1717
|
+
return chartTooltipHtml(categories[dataPointIndex] ?? "", rows.map((row) => ({
|
|
1718
|
+
...row,
|
|
1719
|
+
value: masked ? void 0 : this.formatValue(row.raw)
|
|
1720
|
+
})), "", masked ? void 0 : {
|
|
1721
|
+
name: "Total",
|
|
1722
|
+
value: this.formatValue(values.length ? values.reduce((sum, value) => sum + value, 0) : null)
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
} : {
|
|
1726
|
+
shared: false,
|
|
1727
|
+
intersect: true,
|
|
1728
|
+
custom: ({ seriesIndex, dataPointIndex }) => chartTooltipHtml(categories[dataPointIndex] ?? "", [{
|
|
1729
|
+
colour: colours[seriesIndex],
|
|
1730
|
+
name: series[seriesIndex]?.name ?? "",
|
|
1731
|
+
value: masked ? void 0 : this.formatValue(series[seriesIndex]?.data[dataPointIndex])
|
|
1732
|
+
}])
|
|
1733
|
+
}
|
|
1734
|
+
}, this.options());
|
|
1735
|
+
}, ...ngDevMode ? [{ debugName: "chartOptions" }] : /* istanbul ignore next */ []);
|
|
1736
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1737
|
+
minVersion: "12.0.0",
|
|
1738
|
+
version: "22.2.1",
|
|
1739
|
+
ngImport: i0,
|
|
1740
|
+
type: UiBarChartComponent,
|
|
1741
|
+
deps: null,
|
|
1742
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1743
|
+
});
|
|
1744
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1745
|
+
minVersion: "17.1.0",
|
|
1746
|
+
version: "22.2.1",
|
|
1747
|
+
type: UiBarChartComponent,
|
|
1748
|
+
isStandalone: true,
|
|
1749
|
+
selector: "ui-bar-chart",
|
|
1750
|
+
inputs: {
|
|
1751
|
+
orientation: {
|
|
1752
|
+
classPropertyName: "orientation",
|
|
1753
|
+
publicName: "orientation",
|
|
1754
|
+
isSignal: true,
|
|
1755
|
+
isRequired: false,
|
|
1756
|
+
transformFunction: null
|
|
1757
|
+
},
|
|
1758
|
+
stacked: {
|
|
1759
|
+
classPropertyName: "stacked",
|
|
1760
|
+
publicName: "stacked",
|
|
1761
|
+
isSignal: true,
|
|
1762
|
+
isRequired: false,
|
|
1763
|
+
transformFunction: null
|
|
1764
|
+
},
|
|
1765
|
+
highlightCategory: {
|
|
1766
|
+
classPropertyName: "highlightCategory",
|
|
1767
|
+
publicName: "highlightCategory",
|
|
1768
|
+
isSignal: true,
|
|
1769
|
+
isRequired: false,
|
|
1770
|
+
transformFunction: null
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
host: { classAttribute: "block w-full min-w-0" },
|
|
1774
|
+
usesInheritance: true,
|
|
1775
|
+
ngImport: i0,
|
|
1776
|
+
template: "<ui-chart-frame\n [options]=\"chartOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n/>\n",
|
|
1777
|
+
dependencies: [{
|
|
1778
|
+
kind: "component",
|
|
1779
|
+
type: UiChartFrameComponent,
|
|
1780
|
+
selector: "ui-chart-frame",
|
|
1781
|
+
inputs: [
|
|
1782
|
+
"options",
|
|
1783
|
+
"ariaLabel",
|
|
1784
|
+
"categories",
|
|
1785
|
+
"series",
|
|
1786
|
+
"legendItems",
|
|
1787
|
+
"legendNote",
|
|
1788
|
+
"hiddenSeries",
|
|
1789
|
+
"valueFormatter",
|
|
1790
|
+
"categoryLabel",
|
|
1791
|
+
"height",
|
|
1792
|
+
"emptyText",
|
|
1793
|
+
"loading",
|
|
1794
|
+
"empty",
|
|
1795
|
+
"showTable",
|
|
1796
|
+
"masked",
|
|
1797
|
+
"showLegend",
|
|
1798
|
+
"emphasis"
|
|
1799
|
+
],
|
|
1800
|
+
outputs: ["hiddenSeriesChange", "emphasisChange"]
|
|
1801
|
+
}]
|
|
1802
|
+
});
|
|
1803
|
+
};
|
|
1804
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1805
|
+
minVersion: "12.0.0",
|
|
1806
|
+
version: "22.2.1",
|
|
1807
|
+
ngImport: i0,
|
|
1808
|
+
type: UiBarChartComponent,
|
|
1809
|
+
decorators: [{
|
|
1810
|
+
type: Component,
|
|
1811
|
+
args: [{
|
|
1812
|
+
selector: "ui-bar-chart",
|
|
1813
|
+
imports: [UiChartFrameComponent],
|
|
1814
|
+
host: { class: "block w-full min-w-0" },
|
|
1815
|
+
template: "<ui-chart-frame\n [options]=\"chartOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n/>\n"
|
|
1816
|
+
}]
|
|
1817
|
+
}],
|
|
1818
|
+
propDecorators: {
|
|
1819
|
+
orientation: [{
|
|
1820
|
+
type: i0.Input,
|
|
1821
|
+
args: [{
|
|
1822
|
+
isSignal: true,
|
|
1823
|
+
alias: "orientation",
|
|
1824
|
+
required: false
|
|
1825
|
+
}]
|
|
1826
|
+
}],
|
|
1827
|
+
stacked: [{
|
|
1828
|
+
type: i0.Input,
|
|
1829
|
+
args: [{
|
|
1830
|
+
isSignal: true,
|
|
1831
|
+
alias: "stacked",
|
|
1832
|
+
required: false
|
|
1833
|
+
}]
|
|
1834
|
+
}],
|
|
1835
|
+
highlightCategory: [{
|
|
1836
|
+
type: i0.Input,
|
|
1837
|
+
args: [{
|
|
1838
|
+
isSignal: true,
|
|
1839
|
+
alias: "highlightCategory",
|
|
1840
|
+
required: false
|
|
1841
|
+
}]
|
|
1842
|
+
}]
|
|
1843
|
+
}
|
|
1844
|
+
});
|
|
1845
|
+
const BarChartOrientations = ["vertical", "horizontal"];
|
|
1846
|
+
const MAX_CONTEXT_ROWS = 5;
|
|
1847
|
+
const SORT_ROWS_AFTER = 8;
|
|
1848
|
+
var UiLineChartComponent = class UiLineChartComponent extends UiAxisChartBase {
|
|
1849
|
+
supportsDashes = true;
|
|
1850
|
+
curve = input("straight", ...ngDevMode ? [{ debugName: "curve" }] : /* istanbul ignore next */ []);
|
|
1851
|
+
showPoints = input(false, {
|
|
1852
|
+
...ngDevMode ? { debugName: "showPoints" } : /* istanbul ignore next */ {},
|
|
1853
|
+
transform: booleanAttribute
|
|
1854
|
+
});
|
|
1855
|
+
projectedFrom = input(null, ...ngDevMode ? [{ debugName: "projectedFrom" }] : /* istanbul ignore next */ []);
|
|
1856
|
+
projectedLabel = input("Projected", ...ngDevMode ? [{ debugName: "projectedLabel" }] : /* istanbul ignore next */ []);
|
|
1857
|
+
projectedAnnotations = computed(() => {
|
|
1858
|
+
const from = this.projectedFrom();
|
|
1859
|
+
const categories = this.categories();
|
|
1860
|
+
const ink = this.ink();
|
|
1861
|
+
if (!from || !categories.includes(from)) return { xaxis: [] };
|
|
1862
|
+
return { xaxis: [{
|
|
1863
|
+
x: from,
|
|
1864
|
+
x2: categories[categories.length - 1],
|
|
1865
|
+
fillColor: ink.muted,
|
|
1866
|
+
opacity: .08,
|
|
1867
|
+
borderColor: "transparent",
|
|
1868
|
+
label: {
|
|
1869
|
+
text: this.projectedLabel(),
|
|
1870
|
+
position: "top",
|
|
1871
|
+
orientation: "horizontal",
|
|
1872
|
+
textAnchor: "start",
|
|
1873
|
+
borderWidth: 0,
|
|
1874
|
+
offsetX: 8,
|
|
1875
|
+
offsetY: 16,
|
|
1876
|
+
style: {
|
|
1877
|
+
background: "transparent",
|
|
1878
|
+
color: ink.muted,
|
|
1879
|
+
fontSize: "12px"
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
}] };
|
|
1883
|
+
}, ...ngDevMode ? [{ debugName: "projectedAnnotations" }] : /* istanbul ignore next */ []);
|
|
1884
|
+
chartOptions = computed(() => {
|
|
1885
|
+
const ink = this.ink();
|
|
1886
|
+
const base = baseChartOptions(ink);
|
|
1887
|
+
const labels = chartAxisLabels(ink);
|
|
1888
|
+
const series = this.series();
|
|
1889
|
+
const categories = this.categories();
|
|
1890
|
+
const colours = this.colours();
|
|
1891
|
+
const dashed = this.dashed();
|
|
1892
|
+
const muted = this.isMuted();
|
|
1893
|
+
const masked = this.masked();
|
|
1894
|
+
const order = series.map((_, index) => index).sort((a, b) => Number(muted[b]) - Number(muted[a]));
|
|
1895
|
+
return mergeChartOptions({
|
|
1896
|
+
...base,
|
|
1897
|
+
chart: {
|
|
1898
|
+
...base.chart,
|
|
1899
|
+
type: "line",
|
|
1900
|
+
height: this.apexHeight()
|
|
1901
|
+
},
|
|
1902
|
+
annotations: this.projectedAnnotations(),
|
|
1903
|
+
colors: order.map((index) => colours[index]),
|
|
1904
|
+
series: order.map((index) => ({
|
|
1905
|
+
name: series[index].name,
|
|
1906
|
+
data: this.concealed() ? series[index].data.map(() => null) : series[index].data
|
|
1907
|
+
})),
|
|
1908
|
+
stroke: {
|
|
1909
|
+
curve: this.curve(),
|
|
1910
|
+
width: order.map((index) => muted[index] ? 1.5 : 2),
|
|
1911
|
+
dashArray: order.map((index) => dashed[index] ? 6 : 0),
|
|
1912
|
+
lineCap: "round"
|
|
1913
|
+
},
|
|
1914
|
+
markers: {
|
|
1915
|
+
size: this.showPoints() ? 4 : 0,
|
|
1916
|
+
strokeColors: ink.surface,
|
|
1917
|
+
strokeWidth: 2,
|
|
1918
|
+
hover: { size: 5 }
|
|
1919
|
+
},
|
|
1920
|
+
xaxis: {
|
|
1921
|
+
...base.xaxis,
|
|
1922
|
+
labels: {
|
|
1923
|
+
...labels,
|
|
1924
|
+
formatter: thinnedCategoryLabels(categories),
|
|
1925
|
+
rotate: 0
|
|
1926
|
+
},
|
|
1927
|
+
crosshairs: {
|
|
1928
|
+
show: true,
|
|
1929
|
+
width: 1,
|
|
1930
|
+
stroke: {
|
|
1931
|
+
color: ink.grid,
|
|
1932
|
+
width: 1,
|
|
1933
|
+
dashArray: 0
|
|
1934
|
+
}
|
|
1935
|
+
},
|
|
1936
|
+
tooltip: { enabled: false }
|
|
1937
|
+
},
|
|
1938
|
+
yaxis: {
|
|
1939
|
+
...base.yaxis,
|
|
1940
|
+
labels: masked ? { show: false } : {
|
|
1941
|
+
...labels,
|
|
1942
|
+
formatter: this.displayFormatter()
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
grid: {
|
|
1946
|
+
...base.grid,
|
|
1947
|
+
xaxis: { lines: { show: false } },
|
|
1948
|
+
yaxis: { lines: { show: true } }
|
|
1949
|
+
},
|
|
1950
|
+
tooltip: this.concealed() ? { enabled: false } : {
|
|
1951
|
+
shared: true,
|
|
1952
|
+
intersect: false,
|
|
1953
|
+
custom: ({ dataPointIndex }) => {
|
|
1954
|
+
const rows = series.map((item, index) => ({
|
|
1955
|
+
colour: colours[index],
|
|
1956
|
+
dashed: dashed[index],
|
|
1957
|
+
name: item.name,
|
|
1958
|
+
raw: item.data[dataPointIndex] ?? null,
|
|
1959
|
+
muted: muted[index]
|
|
1960
|
+
})).filter((row) => !this.hiddenSeries().includes(row.name)).sort((a, b) => this.tooltipOrder(a, b)).map((row) => ({
|
|
1961
|
+
...row,
|
|
1962
|
+
value: masked ? void 0 : this.formatValue(row.raw)
|
|
1963
|
+
}));
|
|
1964
|
+
const shown = rows.filter((row) => !row.muted).length + MAX_CONTEXT_ROWS;
|
|
1965
|
+
const extra = rows.length - shown;
|
|
1966
|
+
return chartTooltipHtml(categories[dataPointIndex] ?? "", rows.slice(0, shown), extra > 0 ? `${extra} more` : "");
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
}, this.options());
|
|
1970
|
+
}, ...ngDevMode ? [{ debugName: "chartOptions" }] : /* istanbul ignore next */ []);
|
|
1971
|
+
tooltipOrder(a, b) {
|
|
1972
|
+
if (a.muted !== b.muted) return Number(a.muted) - Number(b.muted);
|
|
1973
|
+
const highlight = this.highlight();
|
|
1974
|
+
if (!a.muted && highlight) return highlight.indexOf(a.name) - highlight.indexOf(b.name);
|
|
1975
|
+
if (!a.muted && this.series().length <= SORT_ROWS_AFTER) return 0;
|
|
1976
|
+
return (b.raw ?? -Infinity) - (a.raw ?? -Infinity);
|
|
1977
|
+
}
|
|
1978
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1979
|
+
minVersion: "12.0.0",
|
|
1980
|
+
version: "22.2.1",
|
|
1981
|
+
ngImport: i0,
|
|
1982
|
+
type: UiLineChartComponent,
|
|
1983
|
+
deps: null,
|
|
1984
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1985
|
+
});
|
|
1986
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1987
|
+
minVersion: "17.1.0",
|
|
1988
|
+
version: "22.2.1",
|
|
1989
|
+
type: UiLineChartComponent,
|
|
1990
|
+
isStandalone: true,
|
|
1991
|
+
selector: "ui-line-chart",
|
|
1992
|
+
inputs: {
|
|
1993
|
+
curve: {
|
|
1994
|
+
classPropertyName: "curve",
|
|
1995
|
+
publicName: "curve",
|
|
1996
|
+
isSignal: true,
|
|
1997
|
+
isRequired: false,
|
|
1998
|
+
transformFunction: null
|
|
1999
|
+
},
|
|
2000
|
+
showPoints: {
|
|
2001
|
+
classPropertyName: "showPoints",
|
|
2002
|
+
publicName: "showPoints",
|
|
2003
|
+
isSignal: true,
|
|
2004
|
+
isRequired: false,
|
|
2005
|
+
transformFunction: null
|
|
2006
|
+
},
|
|
2007
|
+
projectedFrom: {
|
|
2008
|
+
classPropertyName: "projectedFrom",
|
|
2009
|
+
publicName: "projectedFrom",
|
|
2010
|
+
isSignal: true,
|
|
2011
|
+
isRequired: false,
|
|
2012
|
+
transformFunction: null
|
|
2013
|
+
},
|
|
2014
|
+
projectedLabel: {
|
|
2015
|
+
classPropertyName: "projectedLabel",
|
|
2016
|
+
publicName: "projectedLabel",
|
|
2017
|
+
isSignal: true,
|
|
2018
|
+
isRequired: false,
|
|
2019
|
+
transformFunction: null
|
|
2020
|
+
}
|
|
2021
|
+
},
|
|
2022
|
+
host: { classAttribute: "block w-full min-w-0" },
|
|
2023
|
+
usesInheritance: true,
|
|
2024
|
+
ngImport: i0,
|
|
2025
|
+
template: "<ui-chart-frame\n [options]=\"chartOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n/>\n",
|
|
2026
|
+
dependencies: [{
|
|
2027
|
+
kind: "component",
|
|
2028
|
+
type: UiChartFrameComponent,
|
|
2029
|
+
selector: "ui-chart-frame",
|
|
2030
|
+
inputs: [
|
|
2031
|
+
"options",
|
|
2032
|
+
"ariaLabel",
|
|
2033
|
+
"categories",
|
|
2034
|
+
"series",
|
|
2035
|
+
"legendItems",
|
|
2036
|
+
"legendNote",
|
|
2037
|
+
"hiddenSeries",
|
|
2038
|
+
"valueFormatter",
|
|
2039
|
+
"categoryLabel",
|
|
2040
|
+
"height",
|
|
2041
|
+
"emptyText",
|
|
2042
|
+
"loading",
|
|
2043
|
+
"empty",
|
|
2044
|
+
"showTable",
|
|
2045
|
+
"masked",
|
|
2046
|
+
"showLegend",
|
|
2047
|
+
"emphasis"
|
|
2048
|
+
],
|
|
2049
|
+
outputs: ["hiddenSeriesChange", "emphasisChange"]
|
|
2050
|
+
}]
|
|
2051
|
+
});
|
|
2052
|
+
};
|
|
2053
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2054
|
+
minVersion: "12.0.0",
|
|
2055
|
+
version: "22.2.1",
|
|
2056
|
+
ngImport: i0,
|
|
2057
|
+
type: UiLineChartComponent,
|
|
2058
|
+
decorators: [{
|
|
2059
|
+
type: Component,
|
|
2060
|
+
args: [{
|
|
2061
|
+
selector: "ui-line-chart",
|
|
2062
|
+
imports: [UiChartFrameComponent],
|
|
2063
|
+
host: { class: "block w-full min-w-0" },
|
|
2064
|
+
template: "<ui-chart-frame\n [options]=\"chartOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n/>\n"
|
|
2065
|
+
}]
|
|
2066
|
+
}],
|
|
2067
|
+
propDecorators: {
|
|
2068
|
+
curve: [{
|
|
2069
|
+
type: i0.Input,
|
|
2070
|
+
args: [{
|
|
2071
|
+
isSignal: true,
|
|
2072
|
+
alias: "curve",
|
|
2073
|
+
required: false
|
|
2074
|
+
}]
|
|
2075
|
+
}],
|
|
2076
|
+
showPoints: [{
|
|
2077
|
+
type: i0.Input,
|
|
2078
|
+
args: [{
|
|
2079
|
+
isSignal: true,
|
|
2080
|
+
alias: "showPoints",
|
|
2081
|
+
required: false
|
|
2082
|
+
}]
|
|
2083
|
+
}],
|
|
2084
|
+
projectedFrom: [{
|
|
2085
|
+
type: i0.Input,
|
|
2086
|
+
args: [{
|
|
2087
|
+
isSignal: true,
|
|
2088
|
+
alias: "projectedFrom",
|
|
2089
|
+
required: false
|
|
2090
|
+
}]
|
|
2091
|
+
}],
|
|
2092
|
+
projectedLabel: [{
|
|
2093
|
+
type: i0.Input,
|
|
2094
|
+
args: [{
|
|
2095
|
+
isSignal: true,
|
|
2096
|
+
alias: "projectedLabel",
|
|
2097
|
+
required: false
|
|
2098
|
+
}]
|
|
2099
|
+
}]
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
const LineChartCurves = [
|
|
2103
|
+
"straight",
|
|
2104
|
+
"smooth",
|
|
2105
|
+
"stepline"
|
|
2106
|
+
];
|
|
2107
|
+
var UiPieChartComponent = class UiPieChartComponent extends UiAxisChartBase {
|
|
2108
|
+
variant = input("pie", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
2109
|
+
percentFormatter = new Intl.NumberFormat(this.uiFormat.locale, {
|
|
2110
|
+
style: "percent",
|
|
2111
|
+
maximumFractionDigits: 1
|
|
2112
|
+
});
|
|
2113
|
+
totalLabel = input("Total", ...ngDevMode ? [{ debugName: "totalLabel" }] : /* istanbul ignore next */ []);
|
|
2114
|
+
sliceColours = input([], ...ngDevMode ? [{ debugName: "sliceColours" }] : /* istanbul ignore next */ []);
|
|
2115
|
+
values = computed(() => this.series()[0]?.data ?? [], ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
|
|
2116
|
+
isEmpty = computed(() => !this.values().some((value) => value !== null && value > 0), ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
|
|
2117
|
+
isMuted = computed(() => {
|
|
2118
|
+
const highlight = this.highlight();
|
|
2119
|
+
return this.categories().map((name) => !!highlight && !highlight.includes(name));
|
|
2120
|
+
}, ...ngDevMode ? [{ debugName: "isMuted" }] : /* istanbul ignore next */ []);
|
|
2121
|
+
styles = computed(() => {
|
|
2122
|
+
const highlight = this.highlight();
|
|
2123
|
+
const muted = this.isMuted();
|
|
2124
|
+
const given = this.sliceColours();
|
|
2125
|
+
return this.categories().map((name, index) => {
|
|
2126
|
+
if (muted[index]) return {
|
|
2127
|
+
colour: this.ink().context,
|
|
2128
|
+
dashed: false
|
|
2129
|
+
};
|
|
2130
|
+
const style = chartSeriesStyle(highlight ? highlight.indexOf(name) : index, false, this.dark());
|
|
2131
|
+
return {
|
|
2132
|
+
...style,
|
|
2133
|
+
colour: given[index] ?? style.colour
|
|
2134
|
+
};
|
|
2135
|
+
});
|
|
2136
|
+
}, ...ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []);
|
|
2137
|
+
legendItems = computed(() => {
|
|
2138
|
+
const highlight = this.highlight();
|
|
2139
|
+
const items = this.categories().map((name, index) => ({
|
|
2140
|
+
name,
|
|
2141
|
+
...this.styles()[index]
|
|
2142
|
+
})).filter((_, index) => !this.isMuted()[index]);
|
|
2143
|
+
return highlight ? items.sort((a, b) => highlight.indexOf(a.name) - highlight.indexOf(b.name)) : items;
|
|
2144
|
+
}, ...ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []);
|
|
2145
|
+
slices = computed(() => {
|
|
2146
|
+
const hidden = this.hiddenSeries();
|
|
2147
|
+
const values = this.values();
|
|
2148
|
+
const colours = this.colours();
|
|
2149
|
+
return this.categories().map((name, index) => ({
|
|
2150
|
+
name,
|
|
2151
|
+
value: values[index] ?? 0,
|
|
2152
|
+
colour: colours[index]
|
|
2153
|
+
})).filter((slice) => !hidden.includes(slice.name));
|
|
2154
|
+
}, ...ngDevMode ? [{ debugName: "slices" }] : /* istanbul ignore next */ []);
|
|
2155
|
+
chartOptions = computed(() => {
|
|
2156
|
+
const ink = this.ink();
|
|
2157
|
+
const base = baseChartOptions(ink);
|
|
2158
|
+
const slices = this.slices();
|
|
2159
|
+
const donut = this.variant() === "donut";
|
|
2160
|
+
const total = slices.reduce((sum, slice) => sum + slice.value, 0);
|
|
2161
|
+
const concealed = this.concealed();
|
|
2162
|
+
const drawn = concealed ? [{
|
|
2163
|
+
name: "",
|
|
2164
|
+
value: 1,
|
|
2165
|
+
colour: ink.grid
|
|
2166
|
+
}] : slices;
|
|
2167
|
+
const centreText = {
|
|
2168
|
+
fontSize: "12px",
|
|
2169
|
+
color: ink.muted,
|
|
2170
|
+
offsetY: -4
|
|
2171
|
+
};
|
|
2172
|
+
return mergeChartOptions({
|
|
2173
|
+
...base,
|
|
2174
|
+
chart: {
|
|
2175
|
+
...base.chart,
|
|
2176
|
+
type: donut ? "donut" : "pie",
|
|
2177
|
+
height: this.apexHeight()
|
|
2178
|
+
},
|
|
2179
|
+
colors: drawn.map((slice) => slice.colour),
|
|
2180
|
+
labels: drawn.map((slice) => slice.name),
|
|
2181
|
+
series: drawn.map((slice) => slice.value),
|
|
2182
|
+
stroke: {
|
|
2183
|
+
show: true,
|
|
2184
|
+
width: 2,
|
|
2185
|
+
colors: [ink.surface]
|
|
2186
|
+
},
|
|
2187
|
+
states: {
|
|
2188
|
+
...base.states,
|
|
2189
|
+
hover: { filter: { type: concealed ? "none" : "darken" } }
|
|
2190
|
+
},
|
|
2191
|
+
plotOptions: { pie: {
|
|
2192
|
+
expandOnClick: false,
|
|
2193
|
+
donut: {
|
|
2194
|
+
size: "65%",
|
|
2195
|
+
labels: {
|
|
2196
|
+
show: donut,
|
|
2197
|
+
name: centreText,
|
|
2198
|
+
value: {
|
|
2199
|
+
fontSize: "20px",
|
|
2200
|
+
fontWeight: 600,
|
|
2201
|
+
color: ink.text,
|
|
2202
|
+
offsetY: 4,
|
|
2203
|
+
formatter: (value) => this.formatValue(Number(value))
|
|
2204
|
+
},
|
|
2205
|
+
total: {
|
|
2206
|
+
show: true,
|
|
2207
|
+
showAlways: true,
|
|
2208
|
+
label: this.totalLabel(),
|
|
2209
|
+
...centreText,
|
|
2210
|
+
formatter: () => this.formatValue(total)
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
} },
|
|
2215
|
+
tooltip: concealed ? { enabled: false } : {
|
|
2216
|
+
theme: "light",
|
|
2217
|
+
fillSeriesColor: false,
|
|
2218
|
+
custom: ({ seriesIndex }) => {
|
|
2219
|
+
const slice = slices[seriesIndex];
|
|
2220
|
+
return slice ? chartTooltipHtml("", [{
|
|
2221
|
+
colour: slice.colour,
|
|
2222
|
+
name: slice.name,
|
|
2223
|
+
value: this.masked() ? void 0 : this.formatValue(slice.value)
|
|
2224
|
+
}], total ? `${this.percentFormatter.format(slice.value / total)} of total` : "") : "";
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
}, this.options());
|
|
2228
|
+
}, ...ngDevMode ? [{ debugName: "chartOptions" }] : /* istanbul ignore next */ []);
|
|
2229
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2230
|
+
minVersion: "12.0.0",
|
|
2231
|
+
version: "22.2.1",
|
|
2232
|
+
ngImport: i0,
|
|
2233
|
+
type: UiPieChartComponent,
|
|
2234
|
+
deps: null,
|
|
2235
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2236
|
+
});
|
|
2237
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2238
|
+
minVersion: "17.1.0",
|
|
2239
|
+
version: "22.2.1",
|
|
2240
|
+
type: UiPieChartComponent,
|
|
2241
|
+
isStandalone: true,
|
|
2242
|
+
selector: "ui-pie-chart",
|
|
2243
|
+
inputs: {
|
|
2244
|
+
variant: {
|
|
2245
|
+
classPropertyName: "variant",
|
|
2246
|
+
publicName: "variant",
|
|
2247
|
+
isSignal: true,
|
|
2248
|
+
isRequired: false,
|
|
2249
|
+
transformFunction: null
|
|
2250
|
+
},
|
|
2251
|
+
totalLabel: {
|
|
2252
|
+
classPropertyName: "totalLabel",
|
|
2253
|
+
publicName: "totalLabel",
|
|
2254
|
+
isSignal: true,
|
|
2255
|
+
isRequired: false,
|
|
2256
|
+
transformFunction: null
|
|
2257
|
+
},
|
|
2258
|
+
sliceColours: {
|
|
2259
|
+
classPropertyName: "sliceColours",
|
|
2260
|
+
publicName: "sliceColours",
|
|
2261
|
+
isSignal: true,
|
|
2262
|
+
isRequired: false,
|
|
2263
|
+
transformFunction: null
|
|
2264
|
+
}
|
|
2265
|
+
},
|
|
2266
|
+
host: { classAttribute: "block w-full min-w-0" },
|
|
2267
|
+
usesInheritance: true,
|
|
2268
|
+
ngImport: i0,
|
|
2269
|
+
template: "<ui-chart-frame\n [options]=\"chartOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n/>\n",
|
|
2270
|
+
dependencies: [{
|
|
2271
|
+
kind: "component",
|
|
2272
|
+
type: UiChartFrameComponent,
|
|
2273
|
+
selector: "ui-chart-frame",
|
|
2274
|
+
inputs: [
|
|
2275
|
+
"options",
|
|
2276
|
+
"ariaLabel",
|
|
2277
|
+
"categories",
|
|
2278
|
+
"series",
|
|
2279
|
+
"legendItems",
|
|
2280
|
+
"legendNote",
|
|
2281
|
+
"hiddenSeries",
|
|
2282
|
+
"valueFormatter",
|
|
2283
|
+
"categoryLabel",
|
|
2284
|
+
"height",
|
|
2285
|
+
"emptyText",
|
|
2286
|
+
"loading",
|
|
2287
|
+
"empty",
|
|
2288
|
+
"showTable",
|
|
2289
|
+
"masked",
|
|
2290
|
+
"showLegend",
|
|
2291
|
+
"emphasis"
|
|
2292
|
+
],
|
|
2293
|
+
outputs: ["hiddenSeriesChange", "emphasisChange"]
|
|
2294
|
+
}]
|
|
2295
|
+
});
|
|
2296
|
+
};
|
|
2297
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2298
|
+
minVersion: "12.0.0",
|
|
2299
|
+
version: "22.2.1",
|
|
2300
|
+
ngImport: i0,
|
|
2301
|
+
type: UiPieChartComponent,
|
|
2302
|
+
decorators: [{
|
|
2303
|
+
type: Component,
|
|
2304
|
+
args: [{
|
|
2305
|
+
selector: "ui-pie-chart",
|
|
2306
|
+
imports: [UiChartFrameComponent],
|
|
2307
|
+
host: { class: "block w-full min-w-0" },
|
|
2308
|
+
template: "<ui-chart-frame\n [options]=\"chartOptions()\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n/>\n"
|
|
2309
|
+
}]
|
|
2310
|
+
}],
|
|
2311
|
+
propDecorators: {
|
|
2312
|
+
variant: [{
|
|
2313
|
+
type: i0.Input,
|
|
2314
|
+
args: [{
|
|
2315
|
+
isSignal: true,
|
|
2316
|
+
alias: "variant",
|
|
2317
|
+
required: false
|
|
2318
|
+
}]
|
|
2319
|
+
}],
|
|
2320
|
+
totalLabel: [{
|
|
2321
|
+
type: i0.Input,
|
|
2322
|
+
args: [{
|
|
2323
|
+
isSignal: true,
|
|
2324
|
+
alias: "totalLabel",
|
|
2325
|
+
required: false
|
|
2326
|
+
}]
|
|
2327
|
+
}],
|
|
2328
|
+
sliceColours: [{
|
|
2329
|
+
type: i0.Input,
|
|
2330
|
+
args: [{
|
|
2331
|
+
isSignal: true,
|
|
2332
|
+
alias: "sliceColours",
|
|
2333
|
+
required: false
|
|
2334
|
+
}]
|
|
2335
|
+
}]
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
const PieChartVariants = ["pie", "donut"];
|
|
2339
|
+
const SHADE_STEP = .16;
|
|
2340
|
+
const PALEST_SHADE = .4;
|
|
2341
|
+
const HEADER_MIN_WIDTH = 56;
|
|
2342
|
+
const HEADER_MIN_HEIGHT = 56;
|
|
2343
|
+
const NAME_MIN_WIDTH = 48;
|
|
2344
|
+
const NAME_MIN_HEIGHT = 24;
|
|
2345
|
+
const VALUE_MIN_HEIGHT = 42;
|
|
2346
|
+
function treemapGroupColours(groups, dark) {
|
|
2347
|
+
return groups.map((group, index) => group.colour ?? chartColour(index, dark));
|
|
2348
|
+
}
|
|
2349
|
+
function drawnTreemapGroups(groups, colours, hidden, shades, ink) {
|
|
2350
|
+
return groups.map((group, index) => drawnGroup(group, colours[index], shades, ink)).filter((group) => group.blocks.length > 0 && !hidden.includes(group.name));
|
|
2351
|
+
}
|
|
2352
|
+
function drawnGroup(group, colour, shades, ink) {
|
|
2353
|
+
const items = group.items.filter((item) => item.value > 0);
|
|
2354
|
+
const ranks = rankByValue(items.map((item) => item.value));
|
|
2355
|
+
const blocks = items.map((item, index) => {
|
|
2356
|
+
const fill = shades ? shadeOf(colour, ranks[index], ink) : colour;
|
|
2357
|
+
return {
|
|
2358
|
+
group: group.name,
|
|
2359
|
+
item: item.name,
|
|
2360
|
+
value: item.value,
|
|
2361
|
+
fill,
|
|
2362
|
+
labelInk: chartLabelInk(fill)
|
|
2363
|
+
};
|
|
2364
|
+
});
|
|
2365
|
+
return {
|
|
2366
|
+
name: group.name,
|
|
2367
|
+
colour,
|
|
2368
|
+
total: blocks.reduce((sum, block) => sum + block.value, 0),
|
|
2369
|
+
blocks
|
|
2370
|
+
};
|
|
2371
|
+
}
|
|
2372
|
+
function rankByValue(values) {
|
|
2373
|
+
const biggestFirst = values.map((value, index) => ({
|
|
2374
|
+
value,
|
|
2375
|
+
index
|
|
2376
|
+
})).sort((a, b) => b.value - a.value);
|
|
2377
|
+
const ranks = [];
|
|
2378
|
+
biggestFirst.forEach((entry, rank) => {
|
|
2379
|
+
ranks[entry.index] = rank;
|
|
2380
|
+
});
|
|
2381
|
+
return ranks;
|
|
2382
|
+
}
|
|
2383
|
+
function shadeOf(colour, rank, ink) {
|
|
2384
|
+
const strength = Math.max(1 - rank * SHADE_STEP, PALEST_SHADE);
|
|
2385
|
+
return mixChartColours(colour, ink.surface, strength) ?? colour;
|
|
2386
|
+
}
|
|
2387
|
+
function treemapTableRows(groups) {
|
|
2388
|
+
const items = groups.flatMap((group) => group.items.filter((item) => item.value > 0).map((item) => ({
|
|
2389
|
+
name: `${group.name} – ${item.name}`,
|
|
2390
|
+
value: item.value
|
|
2391
|
+
})));
|
|
2392
|
+
return {
|
|
2393
|
+
categories: items.map((item) => item.name),
|
|
2394
|
+
values: items.map((item) => item.value)
|
|
2395
|
+
};
|
|
2396
|
+
}
|
|
2397
|
+
function placeTreemapGroups(groups, bounds) {
|
|
2398
|
+
const groupRects = squarify(groups.map((group) => group.total), bounds, 8);
|
|
2399
|
+
return groups.map((group, index) => placeGroup(group, groupRects[index]));
|
|
2400
|
+
}
|
|
2401
|
+
function placeGroup(group, rect) {
|
|
2402
|
+
const hasHeader = rect.width >= HEADER_MIN_WIDTH && rect.height >= HEADER_MIN_HEIGHT;
|
|
2403
|
+
const headerHeight = hasHeader ? 24 : 0;
|
|
2404
|
+
const blockArea = {
|
|
2405
|
+
x: 0,
|
|
2406
|
+
y: headerHeight,
|
|
2407
|
+
width: rect.width,
|
|
2408
|
+
height: rect.height - headerHeight
|
|
2409
|
+
};
|
|
2410
|
+
const blockRects = squarify(group.blocks.map((block) => block.value), blockArea, 3);
|
|
2411
|
+
return {
|
|
2412
|
+
...group,
|
|
2413
|
+
rect,
|
|
2414
|
+
hasHeader,
|
|
2415
|
+
placedBlocks: group.blocks.map((block, index) => ({
|
|
2416
|
+
...block,
|
|
2417
|
+
rect: blockRects[index],
|
|
2418
|
+
label: labelFor(blockRects[index])
|
|
2419
|
+
}))
|
|
2420
|
+
};
|
|
2421
|
+
}
|
|
2422
|
+
function labelFor(rect) {
|
|
2423
|
+
if (rect.width < NAME_MIN_WIDTH || rect.height < NAME_MIN_HEIGHT) return "none";
|
|
2424
|
+
return rect.height < VALUE_MIN_HEIGHT ? "name" : "full";
|
|
2425
|
+
}
|
|
2426
|
+
function squarify(values, bounds, gap = 0) {
|
|
2427
|
+
const total = values.reduce((sum, value) => sum + value, 0);
|
|
2428
|
+
const rects = values.map(() => ({
|
|
2429
|
+
x: bounds.x,
|
|
2430
|
+
y: bounds.y,
|
|
2431
|
+
width: 0,
|
|
2432
|
+
height: 0
|
|
2433
|
+
}));
|
|
2434
|
+
if (total <= 0 || bounds.width <= 0 || bounds.height <= 0) return rects;
|
|
2435
|
+
const outer = grow(bounds, gap / 2);
|
|
2436
|
+
const scale = outer.width * outer.height / total;
|
|
2437
|
+
const biggestFirst = values.map((value, index) => ({
|
|
2438
|
+
index,
|
|
2439
|
+
area: value * scale
|
|
2440
|
+
})).sort((a, b) => b.area - a.area);
|
|
2441
|
+
let remaining = outer;
|
|
2442
|
+
let row = [];
|
|
2443
|
+
for (const entry of biggestFirst) {
|
|
2444
|
+
const side = Math.min(remaining.width, remaining.height);
|
|
2445
|
+
const longer = [...row, entry];
|
|
2446
|
+
if (row.length === 0 || worstAspect(longer, side) <= worstAspect(row, side)) row = longer;
|
|
2447
|
+
else {
|
|
2448
|
+
remaining = placeRow(row, remaining, rects);
|
|
2449
|
+
row = [entry];
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
placeRow(row, remaining, rects);
|
|
2453
|
+
return rects.map((rect) => rect.width > 0 ? grow(rect, -gap / 2) : rect);
|
|
2454
|
+
}
|
|
2455
|
+
function worstAspect(row, side) {
|
|
2456
|
+
const sum = row.reduce((total, entry) => total + entry.area, 0);
|
|
2457
|
+
const largest = Math.max(...row.map((entry) => entry.area));
|
|
2458
|
+
const smallest = Math.min(...row.map((entry) => entry.area));
|
|
2459
|
+
return Math.max(side * side * largest / (sum * sum), sum * sum / (side * side * smallest));
|
|
2460
|
+
}
|
|
2461
|
+
function placeRow(row, area, rects) {
|
|
2462
|
+
const sum = row.reduce((total, entry) => total + entry.area, 0);
|
|
2463
|
+
if (area.width >= area.height) {
|
|
2464
|
+
const width = sum / area.height;
|
|
2465
|
+
let y = area.y;
|
|
2466
|
+
for (const entry of row) {
|
|
2467
|
+
const height = entry.area / width;
|
|
2468
|
+
rects[entry.index] = {
|
|
2469
|
+
x: area.x,
|
|
2470
|
+
y,
|
|
2471
|
+
width,
|
|
2472
|
+
height
|
|
2473
|
+
};
|
|
2474
|
+
y += height;
|
|
2475
|
+
}
|
|
2476
|
+
return {
|
|
2477
|
+
x: area.x + width,
|
|
2478
|
+
y: area.y,
|
|
2479
|
+
width: area.width - width,
|
|
2480
|
+
height: area.height
|
|
2481
|
+
};
|
|
2482
|
+
}
|
|
2483
|
+
const height = sum / area.width;
|
|
2484
|
+
let x = area.x;
|
|
2485
|
+
for (const entry of row) {
|
|
2486
|
+
const width = entry.area / height;
|
|
2487
|
+
rects[entry.index] = {
|
|
2488
|
+
x,
|
|
2489
|
+
y: area.y,
|
|
2490
|
+
width,
|
|
2491
|
+
height
|
|
2492
|
+
};
|
|
2493
|
+
x += width;
|
|
2494
|
+
}
|
|
2495
|
+
return {
|
|
2496
|
+
x: area.x,
|
|
2497
|
+
y: area.y + height,
|
|
2498
|
+
width: area.width,
|
|
2499
|
+
height: area.height - height
|
|
2500
|
+
};
|
|
2501
|
+
}
|
|
2502
|
+
function grow(rect, by) {
|
|
2503
|
+
return {
|
|
2504
|
+
x: rect.x - by,
|
|
2505
|
+
y: rect.y - by,
|
|
2506
|
+
width: Math.max(rect.width + by * 2, 0),
|
|
2507
|
+
height: Math.max(rect.height + by * 2, 0)
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2510
|
+
const TOOLTIP_OFFSET = 12;
|
|
2511
|
+
var UiTreemapChartComponent = class UiTreemapChartComponent extends UiChartBase {
|
|
2512
|
+
groups = input.required(...ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []);
|
|
2513
|
+
height = input(360, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
2514
|
+
shades = input(true, {
|
|
2515
|
+
...ngDevMode ? { debugName: "shades" } : /* istanbul ignore next */ {},
|
|
2516
|
+
transform: booleanAttribute
|
|
2517
|
+
});
|
|
2518
|
+
selectable = input(false, {
|
|
2519
|
+
...ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {},
|
|
2520
|
+
transform: booleanAttribute
|
|
2521
|
+
});
|
|
2522
|
+
valueLabel = input("Value", ...ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []);
|
|
2523
|
+
itemSelect = output();
|
|
2524
|
+
canvas = viewChild("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
|
|
2525
|
+
size = signal({
|
|
2526
|
+
width: 0,
|
|
2527
|
+
height: 0
|
|
2528
|
+
}, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
2529
|
+
pointed = signal(null, ...ngDevMode ? [{ debugName: "pointed" }] : /* istanbul ignore next */ []);
|
|
2530
|
+
settled = signal(false, ...ngDevMode ? [{ debugName: "settled" }] : /* istanbul ignore next */ []);
|
|
2531
|
+
percentFormatter = new Intl.NumberFormat(this.uiFormat.locale, {
|
|
2532
|
+
style: "percent",
|
|
2533
|
+
maximumFractionDigits: 1
|
|
2534
|
+
});
|
|
2535
|
+
fill = computed(() => this.height() === "fill", ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
|
|
2536
|
+
fixedHeight = computed(() => {
|
|
2537
|
+
const height = this.height();
|
|
2538
|
+
return height === "fill" ? null : height;
|
|
2539
|
+
}, ...ngDevMode ? [{ debugName: "fixedHeight" }] : /* istanbul ignore next */ []);
|
|
2540
|
+
colours = computed(() => treemapGroupColours(this.groups(), this.dark()), ...ngDevMode ? [{ debugName: "colours" }] : /* istanbul ignore next */ []);
|
|
2541
|
+
drawnGroups = computed(() => drawnTreemapGroups(this.groups(), this.colours(), this.hiddenSeries(), this.shades(), this.ink()), ...ngDevMode ? [{ debugName: "drawnGroups" }] : /* istanbul ignore next */ []);
|
|
2542
|
+
placedGroups = computed(() => {
|
|
2543
|
+
const { width, height } = this.size();
|
|
2544
|
+
return placeTreemapGroups(this.drawnGroups(), {
|
|
2545
|
+
x: 0,
|
|
2546
|
+
y: 0,
|
|
2547
|
+
width,
|
|
2548
|
+
height
|
|
2549
|
+
});
|
|
2550
|
+
}, ...ngDevMode ? [{ debugName: "placedGroups" }] : /* istanbul ignore next */ []);
|
|
2551
|
+
total = computed(() => this.drawnGroups().reduce((sum, group) => sum + group.total, 0), ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
2552
|
+
tableRows = computed(() => treemapTableRows(this.groups()), ...ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []);
|
|
2553
|
+
categories = computed(() => this.tableRows().categories, ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
|
|
2554
|
+
series = computed(() => [{
|
|
2555
|
+
name: this.valueLabel(),
|
|
2556
|
+
data: this.tableRows().values
|
|
2557
|
+
}], ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
|
|
2558
|
+
isEmpty = computed(() => this.categories().length === 0, ...ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []);
|
|
2559
|
+
legendItems = computed(() => this.groups().map((group, index) => ({
|
|
2560
|
+
group,
|
|
2561
|
+
colour: this.colours()[index]
|
|
2562
|
+
})).filter(({ group }) => group.items.some((item) => item.value > 0)).map(({ group, colour }) => ({
|
|
2563
|
+
name: group.name,
|
|
2564
|
+
colour
|
|
2565
|
+
})), ...ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []);
|
|
2566
|
+
legendNote = computed(() => "", ...ngDevMode ? [{ debugName: "legendNote" }] : /* istanbul ignore next */ []);
|
|
2567
|
+
emphasised = computed(() => {
|
|
2568
|
+
const emphasis = this.emphasis();
|
|
2569
|
+
return this.drawnGroups().some((group) => group.name === emphasis) ? emphasis : null;
|
|
2570
|
+
}, ...ngDevMode ? [{ debugName: "emphasised" }] : /* istanbul ignore next */ []);
|
|
2571
|
+
tooltipFooter = computed(() => {
|
|
2572
|
+
const pointed = this.pointed();
|
|
2573
|
+
if (!pointed) return "";
|
|
2574
|
+
const { group, block } = pointed;
|
|
2575
|
+
const shareOfTotal = `${this.percent(block.value / this.total())} of total`;
|
|
2576
|
+
return group.blocks.length > 1 ? `${this.percent(block.value / group.total)} of ${group.name} · ${shareOfTotal}` : shareOfTotal;
|
|
2577
|
+
}, ...ngDevMode ? [{ debugName: "tooltipFooter" }] : /* istanbul ignore next */ []);
|
|
2578
|
+
tooltipPosition = computed(() => {
|
|
2579
|
+
const pointed = this.pointed();
|
|
2580
|
+
const { width } = this.size();
|
|
2581
|
+
if (!pointed) return null;
|
|
2582
|
+
const flipped = pointed.x > width / 2;
|
|
2583
|
+
return {
|
|
2584
|
+
left: flipped ? null : pointed.x + TOOLTIP_OFFSET,
|
|
2585
|
+
right: flipped ? width - pointed.x + TOOLTIP_OFFSET : null,
|
|
2586
|
+
top: pointed.y + TOOLTIP_OFFSET
|
|
2587
|
+
};
|
|
2588
|
+
}, ...ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []);
|
|
2589
|
+
constructor() {
|
|
2590
|
+
super();
|
|
2591
|
+
effect((onCleanup) => {
|
|
2592
|
+
const canvas = this.canvas()?.nativeElement;
|
|
2593
|
+
if (!canvas) return;
|
|
2594
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
2595
|
+
const { width, height } = entry.contentRect;
|
|
2596
|
+
this.size.set({
|
|
2597
|
+
width,
|
|
2598
|
+
height
|
|
2599
|
+
});
|
|
2600
|
+
if (!this.settled()) requestAnimationFrame(() => this.settled.set(true));
|
|
2601
|
+
});
|
|
2602
|
+
observer.observe(canvas);
|
|
2603
|
+
onCleanup(() => observer.disconnect());
|
|
2604
|
+
});
|
|
2605
|
+
}
|
|
2606
|
+
isFaded(group) {
|
|
2607
|
+
const emphasised = this.emphasised();
|
|
2608
|
+
return !!emphasised && group.name !== emphasised;
|
|
2609
|
+
}
|
|
2610
|
+
point(event, group, block) {
|
|
2611
|
+
const canvas = this.canvas()?.nativeElement;
|
|
2612
|
+
if (!canvas || event.pointerType === "touch") return;
|
|
2613
|
+
const bounds = canvas.getBoundingClientRect();
|
|
2614
|
+
this.pointed.set({
|
|
2615
|
+
group,
|
|
2616
|
+
block,
|
|
2617
|
+
x: event.clientX - bounds.left,
|
|
2618
|
+
y: event.clientY - bounds.top
|
|
2619
|
+
});
|
|
2620
|
+
}
|
|
2621
|
+
focus(group, block) {
|
|
2622
|
+
this.pointed.set({
|
|
2623
|
+
group,
|
|
2624
|
+
block,
|
|
2625
|
+
x: group.rect.x + block.rect.x + block.rect.width / 2,
|
|
2626
|
+
y: group.rect.y + block.rect.y + block.rect.height / 2
|
|
2627
|
+
});
|
|
2628
|
+
}
|
|
2629
|
+
select(block) {
|
|
2630
|
+
this.itemSelect.emit({
|
|
2631
|
+
group: block.group,
|
|
2632
|
+
item: block.item
|
|
2633
|
+
});
|
|
2634
|
+
}
|
|
2635
|
+
accessibleName(block) {
|
|
2636
|
+
const name = `${block.item}, ${block.group}`;
|
|
2637
|
+
return this.masked() ? name : `${name}, ${this.formatValue(block.value)}`;
|
|
2638
|
+
}
|
|
2639
|
+
percent(share) {
|
|
2640
|
+
return this.percentFormatter.format(share);
|
|
2641
|
+
}
|
|
2642
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2643
|
+
minVersion: "12.0.0",
|
|
2644
|
+
version: "22.2.1",
|
|
2645
|
+
ngImport: i0,
|
|
2646
|
+
type: UiTreemapChartComponent,
|
|
2647
|
+
deps: [],
|
|
2648
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2649
|
+
});
|
|
2650
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2651
|
+
minVersion: "17.0.0",
|
|
2652
|
+
version: "22.2.1",
|
|
2653
|
+
type: UiTreemapChartComponent,
|
|
2654
|
+
isStandalone: true,
|
|
2655
|
+
selector: "ui-treemap-chart",
|
|
2656
|
+
inputs: {
|
|
2657
|
+
groups: {
|
|
2658
|
+
classPropertyName: "groups",
|
|
2659
|
+
publicName: "groups",
|
|
2660
|
+
isSignal: true,
|
|
2661
|
+
isRequired: true,
|
|
2662
|
+
transformFunction: null
|
|
2663
|
+
},
|
|
2664
|
+
height: {
|
|
2665
|
+
classPropertyName: "height",
|
|
2666
|
+
publicName: "height",
|
|
2667
|
+
isSignal: true,
|
|
2668
|
+
isRequired: false,
|
|
2669
|
+
transformFunction: null
|
|
2670
|
+
},
|
|
2671
|
+
shades: {
|
|
2672
|
+
classPropertyName: "shades",
|
|
2673
|
+
publicName: "shades",
|
|
2674
|
+
isSignal: true,
|
|
2675
|
+
isRequired: false,
|
|
2676
|
+
transformFunction: null
|
|
2677
|
+
},
|
|
2678
|
+
selectable: {
|
|
2679
|
+
classPropertyName: "selectable",
|
|
2680
|
+
publicName: "selectable",
|
|
2681
|
+
isSignal: true,
|
|
2682
|
+
isRequired: false,
|
|
2683
|
+
transformFunction: null
|
|
2684
|
+
},
|
|
2685
|
+
valueLabel: {
|
|
2686
|
+
classPropertyName: "valueLabel",
|
|
2687
|
+
publicName: "valueLabel",
|
|
2688
|
+
isSignal: true,
|
|
2689
|
+
isRequired: false,
|
|
2690
|
+
transformFunction: null
|
|
2691
|
+
}
|
|
2692
|
+
},
|
|
2693
|
+
outputs: { itemSelect: "itemSelect" },
|
|
2694
|
+
host: { classAttribute: "block w-full min-w-0" },
|
|
2695
|
+
viewQueries: [{
|
|
2696
|
+
propertyName: "canvas",
|
|
2697
|
+
first: true,
|
|
2698
|
+
predicate: ["canvas"],
|
|
2699
|
+
descendants: true,
|
|
2700
|
+
isSignal: true
|
|
2701
|
+
}],
|
|
2702
|
+
usesInheritance: true,
|
|
2703
|
+
ngImport: i0,
|
|
2704
|
+
template: "<ui-chart-frame\n [options]=\"null\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n>\n <div\n #canvas\n class=\"ui-treemap\"\n [class.ui-treemap--settled]=\"settled()\"\n [class.grow]=\"fill()\"\n [class.min-h-0]=\"fill()\"\n [style.height.px]=\"fixedHeight()\"\n [attr.role]=\"selectable() ? 'group' : 'img'\"\n [attr.aria-label]=\"ariaLabel()\"\n (pointerleave)=\"pointed.set(null)\"\n >\n @if (concealed()) {\n <!-- the proportions alone would give the amounts away, so one grey block stands in for them all -->\n <div class=\"ui-treemap-concealed\" [style.background-color]=\"ink().grid\"></div>\n } @else {\n @for (group of placedGroups(); track group.name) {\n <div\n class=\"ui-treemap-group\"\n [class.ui-treemap-group--faded]=\"isFaded(group)\"\n [style.left.px]=\"group.rect.x\"\n [style.top.px]=\"group.rect.y\"\n [style.width.px]=\"group.rect.width\"\n [style.height.px]=\"group.rect.height\"\n >\n @if (group.hasHeader) {\n <div class=\"ui-treemap-header ui-text-caption\" aria-hidden=\"true\">\n <span class=\"ui-treemap-header-name\">{{ group.name }}</span>\n <span class=\"ui-treemap-header-total\">{{ formatValue(group.total) }}</span>\n </div>\n }\n\n @for (block of group.placedBlocks; track block.item) {\n @if (selectable()) {\n <button\n type=\"button\"\n class=\"ui-treemap-block ui-treemap-block--selectable ui-text-caption\"\n [style.left.px]=\"block.rect.x\"\n [style.top.px]=\"block.rect.y\"\n [style.width.px]=\"block.rect.width\"\n [style.height.px]=\"block.rect.height\"\n [style.background-color]=\"block.fill\"\n [style.color]=\"block.labelInk\"\n [attr.aria-label]=\"accessibleName(block)\"\n (pointermove)=\"point($event, group, block)\"\n (focus)=\"focus(group, block)\"\n (blur)=\"pointed.set(null)\"\n (click)=\"select(block)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: block }\"\n />\n </button>\n } @else {\n <div\n class=\"ui-treemap-block ui-text-caption\"\n aria-hidden=\"true\"\n [style.left.px]=\"block.rect.x\"\n [style.top.px]=\"block.rect.y\"\n [style.width.px]=\"block.rect.width\"\n [style.height.px]=\"block.rect.height\"\n [style.background-color]=\"block.fill\"\n [style.color]=\"block.labelInk\"\n (pointermove)=\"point($event, group, block)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: block }\"\n />\n </div>\n }\n }\n </div>\n }\n\n @if (pointed(); as pointed) {\n <div\n class=\"ui-chart-tooltip-panel ui-treemap-tooltip\"\n aria-hidden=\"true\"\n [style.left.px]=\"tooltipPosition()?.left\"\n [style.right.px]=\"tooltipPosition()?.right\"\n [style.top.px]=\"tooltipPosition()?.top\"\n >\n <div class=\"ui-chart-tooltip\">\n <div class=\"ui-chart-tooltip-title ui-text-caption\">{{ pointed.group.name }}</div>\n <div class=\"ui-chart-tooltip-row ui-text-body-alt\">\n <span\n class=\"ui-chart-tooltip-dot\"\n [style.--ui-chart-tooltip-colour]=\"pointed.block.fill\"\n ></span>\n <span class=\"ui-chart-tooltip-name\">{{ pointed.block.item }}</span>\n @if (!masked()) {\n <span class=\"ui-chart-tooltip-value\">{{ formatValue(pointed.block.value) }}</span>\n }\n </div>\n <div class=\"ui-chart-tooltip-footer ui-text-caption\">{{ tooltipFooter() }}</div>\n </div>\n </div>\n }\n }\n </div>\n</ui-chart-frame>\n\n<ng-template #label let-block>\n @if (block.label !== 'none') {\n <span class=\"ui-treemap-block-name\">{{ block.item }}</span>\n }\n @if (block.label === 'full') {\n <span class=\"ui-treemap-block-value\">{{ formatValue(block.value) }}</span>\n }\n</ng-template>\n",
|
|
2705
|
+
styles: ["@layer properties;.ui-treemap{position:relative;display:block;width:100%}.ui-treemap-concealed{position:absolute;inset:0;border-radius:var(--radius-md, .375rem)}.ui-treemap-group,.ui-treemap-block{position:absolute}@media(prefers-reduced-motion:no-preference){.ui-treemap--settled .ui-treemap-group,.ui-treemap--settled .ui-treemap-block{transition-property:left,top,width,height,opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .3s;transition-duration:.3s;--tw-ease: var(--ease-out, cubic-bezier(0, 0, .2, 1));transition-timing-function:var(--ease-out, cubic-bezier(0, 0, .2, 1))}}.ui-treemap-group--faded{opacity:.15}.ui-treemap-header{display:flex;height:calc(var(--spacing, .25rem) * 6);align-items:baseline;column-gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * .5)}.ui-treemap-header-name{min-width:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:var(--foreground)}.ui-treemap-header-total{margin-inline-start:auto;flex-shrink:0;color:var(--muted-foreground-1);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ui-treemap-header-name,.ui-treemap-header-total{--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6)}.ui-treemap-block{display:flex;flex-direction:column;align-items:flex-start;overflow:hidden;border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 1.5);text-align:start}.ui-treemap-block--selectable{cursor:pointer}.ui-treemap-block--selectable:focus{--tw-outline-style: none;outline-style:none}.ui-treemap-block--selectable:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-treemap-block--selectable:focus-visible{--tw-ring-color: color-mix(in srgb, oklch(88.2% .059 254.128) 50%, transparent)}@supports (color: color-mix(in lab,red,red)){.ui-treemap-block--selectable:focus-visible{--tw-ring-color: color-mix(in oklab, var(--color-primary-200, var(--color-blue-200)) 50%, transparent)}}.ui-treemap-block--selectable:focus-visible{--tw-ring-offset-width: 1px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ui-treemap-block:hover{filter:brightness(1.06)}.ui-treemap-block-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.ui-treemap-block-value{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);opacity:85%}.ui-treemap-tooltip{pointer-events:none;position:absolute;z-index:10}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-ease{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial;--tw-leading: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", "@layer properties;.ui-chart .apexcharts-tooltip.apexcharts-theme-light,.ui-chart-tooltip-panel{border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--border-line-2);background-color:var(--layer);--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-chart-tooltip{display:flex;min-width:calc(var(--spacing, .25rem) * 36);flex-direction:column;row-gap:var(--spacing, .25rem);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-title{padding-bottom:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-row{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 2);color:var(--foreground)}.ui-chart-tooltip-total{margin-top:var(--spacing, .25rem);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--border-line-2);padding-top:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-footer{padding-top:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-dot{width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);flex-shrink:0;border-radius:var(--radius-full, calc(infinity * 1px));background-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-dot--dashed{height:0px;width:calc(var(--spacing, .25rem) * 3);border-radius:0;border-top-style:var(--tw-border-style);border-top-width:2px;--tw-border-style: dashed;border-style:dashed;background-color:transparent;border-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-value{margin-inline-start:auto;padding-inline-start:calc(var(--spacing, .25rem) * 3);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
2706
|
+
dependencies: [{
|
|
2707
|
+
kind: "directive",
|
|
2708
|
+
type: NgTemplateOutlet,
|
|
2709
|
+
selector: "[ngTemplateOutlet]",
|
|
2710
|
+
inputs: [
|
|
2711
|
+
"ngTemplateOutletContext",
|
|
2712
|
+
"ngTemplateOutlet",
|
|
2713
|
+
"ngTemplateOutletInjector"
|
|
2714
|
+
]
|
|
2715
|
+
}, {
|
|
2716
|
+
kind: "component",
|
|
2717
|
+
type: UiChartFrameComponent,
|
|
2718
|
+
selector: "ui-chart-frame",
|
|
2719
|
+
inputs: [
|
|
2720
|
+
"options",
|
|
2721
|
+
"ariaLabel",
|
|
2722
|
+
"categories",
|
|
2723
|
+
"series",
|
|
2724
|
+
"legendItems",
|
|
2725
|
+
"legendNote",
|
|
2726
|
+
"hiddenSeries",
|
|
2727
|
+
"valueFormatter",
|
|
2728
|
+
"categoryLabel",
|
|
2729
|
+
"height",
|
|
2730
|
+
"emptyText",
|
|
2731
|
+
"loading",
|
|
2732
|
+
"empty",
|
|
2733
|
+
"showTable",
|
|
2734
|
+
"masked",
|
|
2735
|
+
"showLegend",
|
|
2736
|
+
"emphasis"
|
|
2737
|
+
],
|
|
2738
|
+
outputs: ["hiddenSeriesChange", "emphasisChange"]
|
|
2739
|
+
}],
|
|
2740
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2741
|
+
});
|
|
2742
|
+
};
|
|
2743
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2744
|
+
minVersion: "12.0.0",
|
|
2745
|
+
version: "22.2.1",
|
|
2746
|
+
ngImport: i0,
|
|
2747
|
+
type: UiTreemapChartComponent,
|
|
2748
|
+
decorators: [{
|
|
2749
|
+
type: Component,
|
|
2750
|
+
args: [{
|
|
2751
|
+
selector: "ui-treemap-chart",
|
|
2752
|
+
encapsulation: ViewEncapsulation.None,
|
|
2753
|
+
imports: [NgTemplateOutlet, UiChartFrameComponent],
|
|
2754
|
+
host: { class: "block w-full min-w-0" },
|
|
2755
|
+
template: "<ui-chart-frame\n [options]=\"null\"\n [ariaLabel]=\"ariaLabel()\"\n [categories]=\"categories()\"\n [series]=\"series()\"\n [legendItems]=\"legendItems()\"\n [legendNote]=\"legendNote()\"\n [(hiddenSeries)]=\"hiddenSeries\"\n [(emphasis)]=\"emphasis\"\n [showLegend]=\"legend() === 'auto'\"\n [valueFormatter]=\"displayFormatter()\"\n [masked]=\"masked()\"\n [categoryLabel]=\"categoryLabel()\"\n [height]=\"height()\"\n [emptyText]=\"emptyText()\"\n [loading]=\"loading()\"\n [empty]=\"isEmpty()\"\n [showTable]=\"showTable()\"\n>\n <div\n #canvas\n class=\"ui-treemap\"\n [class.ui-treemap--settled]=\"settled()\"\n [class.grow]=\"fill()\"\n [class.min-h-0]=\"fill()\"\n [style.height.px]=\"fixedHeight()\"\n [attr.role]=\"selectable() ? 'group' : 'img'\"\n [attr.aria-label]=\"ariaLabel()\"\n (pointerleave)=\"pointed.set(null)\"\n >\n @if (concealed()) {\n <!-- the proportions alone would give the amounts away, so one grey block stands in for them all -->\n <div class=\"ui-treemap-concealed\" [style.background-color]=\"ink().grid\"></div>\n } @else {\n @for (group of placedGroups(); track group.name) {\n <div\n class=\"ui-treemap-group\"\n [class.ui-treemap-group--faded]=\"isFaded(group)\"\n [style.left.px]=\"group.rect.x\"\n [style.top.px]=\"group.rect.y\"\n [style.width.px]=\"group.rect.width\"\n [style.height.px]=\"group.rect.height\"\n >\n @if (group.hasHeader) {\n <div class=\"ui-treemap-header ui-text-caption\" aria-hidden=\"true\">\n <span class=\"ui-treemap-header-name\">{{ group.name }}</span>\n <span class=\"ui-treemap-header-total\">{{ formatValue(group.total) }}</span>\n </div>\n }\n\n @for (block of group.placedBlocks; track block.item) {\n @if (selectable()) {\n <button\n type=\"button\"\n class=\"ui-treemap-block ui-treemap-block--selectable ui-text-caption\"\n [style.left.px]=\"block.rect.x\"\n [style.top.px]=\"block.rect.y\"\n [style.width.px]=\"block.rect.width\"\n [style.height.px]=\"block.rect.height\"\n [style.background-color]=\"block.fill\"\n [style.color]=\"block.labelInk\"\n [attr.aria-label]=\"accessibleName(block)\"\n (pointermove)=\"point($event, group, block)\"\n (focus)=\"focus(group, block)\"\n (blur)=\"pointed.set(null)\"\n (click)=\"select(block)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: block }\"\n />\n </button>\n } @else {\n <div\n class=\"ui-treemap-block ui-text-caption\"\n aria-hidden=\"true\"\n [style.left.px]=\"block.rect.x\"\n [style.top.px]=\"block.rect.y\"\n [style.width.px]=\"block.rect.width\"\n [style.height.px]=\"block.rect.height\"\n [style.background-color]=\"block.fill\"\n [style.color]=\"block.labelInk\"\n (pointermove)=\"point($event, group, block)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"label\"\n [ngTemplateOutletContext]=\"{ $implicit: block }\"\n />\n </div>\n }\n }\n </div>\n }\n\n @if (pointed(); as pointed) {\n <div\n class=\"ui-chart-tooltip-panel ui-treemap-tooltip\"\n aria-hidden=\"true\"\n [style.left.px]=\"tooltipPosition()?.left\"\n [style.right.px]=\"tooltipPosition()?.right\"\n [style.top.px]=\"tooltipPosition()?.top\"\n >\n <div class=\"ui-chart-tooltip\">\n <div class=\"ui-chart-tooltip-title ui-text-caption\">{{ pointed.group.name }}</div>\n <div class=\"ui-chart-tooltip-row ui-text-body-alt\">\n <span\n class=\"ui-chart-tooltip-dot\"\n [style.--ui-chart-tooltip-colour]=\"pointed.block.fill\"\n ></span>\n <span class=\"ui-chart-tooltip-name\">{{ pointed.block.item }}</span>\n @if (!masked()) {\n <span class=\"ui-chart-tooltip-value\">{{ formatValue(pointed.block.value) }}</span>\n }\n </div>\n <div class=\"ui-chart-tooltip-footer ui-text-caption\">{{ tooltipFooter() }}</div>\n </div>\n </div>\n }\n }\n </div>\n</ui-chart-frame>\n\n<ng-template #label let-block>\n @if (block.label !== 'none') {\n <span class=\"ui-treemap-block-name\">{{ block.item }}</span>\n }\n @if (block.label === 'full') {\n <span class=\"ui-treemap-block-value\">{{ formatValue(block.value) }}</span>\n }\n</ng-template>\n",
|
|
2756
|
+
styles: ["@layer properties;.ui-treemap{position:relative;display:block;width:100%}.ui-treemap-concealed{position:absolute;inset:0;border-radius:var(--radius-md, .375rem)}.ui-treemap-group,.ui-treemap-block{position:absolute}@media(prefers-reduced-motion:no-preference){.ui-treemap--settled .ui-treemap-group,.ui-treemap--settled .ui-treemap-block{transition-property:left,top,width,height,opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .3s;transition-duration:.3s;--tw-ease: var(--ease-out, cubic-bezier(0, 0, .2, 1));transition-timing-function:var(--ease-out, cubic-bezier(0, 0, .2, 1))}}.ui-treemap-group--faded{opacity:.15}.ui-treemap-header{display:flex;height:calc(var(--spacing, .25rem) * 6);align-items:baseline;column-gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * .5)}.ui-treemap-header-name{min-width:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:var(--foreground)}.ui-treemap-header-total{margin-inline-start:auto;flex-shrink:0;color:var(--muted-foreground-1);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ui-treemap-header-name,.ui-treemap-header-total{--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6)}.ui-treemap-block{display:flex;flex-direction:column;align-items:flex-start;overflow:hidden;border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * 1.5);text-align:start}.ui-treemap-block--selectable{cursor:pointer}.ui-treemap-block--selectable:focus{--tw-outline-style: none;outline-style:none}.ui-treemap-block--selectable:focus-visible{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-treemap-block--selectable:focus-visible{--tw-ring-color: color-mix(in srgb, oklch(88.2% .059 254.128) 50%, transparent)}@supports (color: color-mix(in lab,red,red)){.ui-treemap-block--selectable:focus-visible{--tw-ring-color: color-mix(in oklab, var(--color-primary-200, var(--color-blue-200)) 50%, transparent)}}.ui-treemap-block--selectable:focus-visible{--tw-ring-offset-width: 1px;--tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ui-treemap-block:hover{filter:brightness(1.06)}.ui-treemap-block-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.ui-treemap-block-value{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);opacity:85%}.ui-treemap-tooltip{pointer-events:none;position:absolute;z-index:10}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-ease{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial;--tw-leading: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n", "@layer properties;.ui-chart .apexcharts-tooltip.apexcharts-theme-light,.ui-chart-tooltip-panel{border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--border-line-2);background-color:var(--layer);--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ui-chart-tooltip{display:flex;min-width:calc(var(--spacing, .25rem) * 36);flex-direction:column;row-gap:var(--spacing, .25rem);padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-title{padding-bottom:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-row{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 2);color:var(--foreground)}.ui-chart-tooltip-total{margin-top:var(--spacing, .25rem);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--border-line-2);padding-top:calc(var(--spacing, .25rem) * 2)}.ui-chart-tooltip-footer{padding-top:var(--spacing, .25rem);color:var(--muted-foreground-1)}.ui-chart-tooltip-dot{width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);flex-shrink:0;border-radius:var(--radius-full, calc(infinity * 1px));background-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-dot--dashed{height:0px;width:calc(var(--spacing, .25rem) * 3);border-radius:0;border-top-style:var(--tw-border-style);border-top-width:2px;--tw-border-style: dashed;border-style:dashed;background-color:transparent;border-color:var(--ui-chart-tooltip-colour)}.ui-chart-tooltip-value{margin-inline-start:auto;padding-inline-start:calc(var(--spacing, .25rem) * 3);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
2757
|
+
}]
|
|
2758
|
+
}],
|
|
2759
|
+
ctorParameters: () => [],
|
|
2760
|
+
propDecorators: {
|
|
2761
|
+
groups: [{
|
|
2762
|
+
type: i0.Input,
|
|
2763
|
+
args: [{
|
|
2764
|
+
isSignal: true,
|
|
2765
|
+
alias: "groups",
|
|
2766
|
+
required: true
|
|
2767
|
+
}]
|
|
2768
|
+
}],
|
|
2769
|
+
height: [{
|
|
2770
|
+
type: i0.Input,
|
|
2771
|
+
args: [{
|
|
2772
|
+
isSignal: true,
|
|
2773
|
+
alias: "height",
|
|
2774
|
+
required: false
|
|
2775
|
+
}]
|
|
2776
|
+
}],
|
|
2777
|
+
shades: [{
|
|
2778
|
+
type: i0.Input,
|
|
2779
|
+
args: [{
|
|
2780
|
+
isSignal: true,
|
|
2781
|
+
alias: "shades",
|
|
2782
|
+
required: false
|
|
2783
|
+
}]
|
|
2784
|
+
}],
|
|
2785
|
+
selectable: [{
|
|
2786
|
+
type: i0.Input,
|
|
2787
|
+
args: [{
|
|
2788
|
+
isSignal: true,
|
|
2789
|
+
alias: "selectable",
|
|
2790
|
+
required: false
|
|
2791
|
+
}]
|
|
2792
|
+
}],
|
|
2793
|
+
valueLabel: [{
|
|
2794
|
+
type: i0.Input,
|
|
2795
|
+
args: [{
|
|
2796
|
+
isSignal: true,
|
|
2797
|
+
alias: "valueLabel",
|
|
2798
|
+
required: false
|
|
2799
|
+
}]
|
|
2800
|
+
}],
|
|
2801
|
+
itemSelect: [{
|
|
2802
|
+
type: i0.Output,
|
|
2803
|
+
args: ["itemSelect"]
|
|
2804
|
+
}],
|
|
2805
|
+
canvas: [{
|
|
2806
|
+
type: i0.ViewChild,
|
|
2807
|
+
args: ["canvas", { isSignal: true }]
|
|
2808
|
+
}]
|
|
2809
|
+
}
|
|
2810
|
+
});
|
|
2811
|
+
export { BarChartOrientations, LineChartCurves, PieChartVariants, UiBarChartComponent, UiChartComponent, UiChartFrameComponent, UiChartLegendComponent, UiChartTableComponent, UiLineChartComponent, UiPieChartComponent, UiTreemapChartComponent };
|
|
2812
|
+
|
|
2813
|
+
//# sourceMappingURL=area8975-ui-charts.mjs.map
|