@forgeroute/ui 0.3.5 → 0.3.6
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/fesm2022/forgeroute-ui-charts.mjs +323 -0
- package/fesm2022/forgeroute-ui-charts.mjs.map +1 -0
- package/fesm2022/forgeroute-ui.mjs +2 -320
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/types/forgeroute-ui-charts.d.ts +95 -0
- package/types/forgeroute-ui.d.ts +3 -97
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, NgZone, computed, effect, inject, input, viewChild } from "@angular/core";
|
|
3
|
+
import { BarController, BarElement, CategoryScale, Chart, LinearScale, Tooltip } from "chart.js";
|
|
4
|
+
let registered = false;
|
|
5
|
+
function registerChartParts() {
|
|
6
|
+
if (registered) return;
|
|
7
|
+
Chart.register(BarController, BarElement, CategoryScale, LinearScale, Tooltip);
|
|
8
|
+
registered = true;
|
|
9
|
+
}
|
|
10
|
+
const VALUE_LABELS = {
|
|
11
|
+
id: "uiBarChartValueLabels",
|
|
12
|
+
afterDatasetsDraw(chart) {
|
|
13
|
+
if (chart.options.plugins["uiBarChartValueLabels"]?.enabled === false) return;
|
|
14
|
+
const ctx = chart.ctx;
|
|
15
|
+
ctx.save();
|
|
16
|
+
ctx.fillStyle = "#475569";
|
|
17
|
+
ctx.font = "600 11px sans-serif";
|
|
18
|
+
ctx.textAlign = "center";
|
|
19
|
+
ctx.textBaseline = "bottom";
|
|
20
|
+
chart.getDatasetMeta(0).data.forEach((bar, i) => {
|
|
21
|
+
const value = chart.data.datasets[0]?.data[i];
|
|
22
|
+
if (typeof value === "number" && value !== 0) ctx.fillText(String(value), bar.x, bar.y - 2);
|
|
23
|
+
});
|
|
24
|
+
ctx.restore();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var BarChartComponent = class BarChartComponent {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.labels = input([], ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.values = input([], ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.color = input("#3b82f6", ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.hoverColor = input("#2563eb", ...ngDevMode ? [{ debugName: "hoverColor" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.height = input(240, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.showValues = input(true, ...ngDevMode ? [{ debugName: "showValues" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.unitSingular = input("", ...ngDevMode ? [{ debugName: "unitSingular" }] : /* istanbul ignore next */ []);
|
|
37
|
+
this.unitPlural = input("", ...ngDevMode ? [{ debugName: "unitPlural" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.canvas = viewChild.required("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
|
|
39
|
+
this.zone = inject(NgZone);
|
|
40
|
+
this.chart = null;
|
|
41
|
+
this.tooltipText = (value) => {
|
|
42
|
+
const unit = value === 1 ? this.unitSingular() : this.unitPlural();
|
|
43
|
+
return unit ? `${value} ${unit}` : String(value);
|
|
44
|
+
};
|
|
45
|
+
this.series = computed(() => ({
|
|
46
|
+
labels: this.labels(),
|
|
47
|
+
data: this.values(),
|
|
48
|
+
color: this.color(),
|
|
49
|
+
hoverColor: this.hoverColor(),
|
|
50
|
+
showValues: this.showValues()
|
|
51
|
+
}), ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
|
|
52
|
+
effect(() => {
|
|
53
|
+
const s = this.series();
|
|
54
|
+
const canvas = this.canvas().nativeElement;
|
|
55
|
+
if (!this.chart) {
|
|
56
|
+
registerChartParts();
|
|
57
|
+
this.zone.runOutsideAngular(() => {
|
|
58
|
+
this.chart = new Chart(canvas, {
|
|
59
|
+
type: "bar",
|
|
60
|
+
data: {
|
|
61
|
+
labels: s.labels,
|
|
62
|
+
datasets: [{
|
|
63
|
+
data: s.data,
|
|
64
|
+
backgroundColor: s.color,
|
|
65
|
+
hoverBackgroundColor: s.hoverColor,
|
|
66
|
+
borderRadius: 3,
|
|
67
|
+
borderSkipped: false
|
|
68
|
+
}]
|
|
69
|
+
},
|
|
70
|
+
options: {
|
|
71
|
+
responsive: true,
|
|
72
|
+
maintainAspectRatio: false,
|
|
73
|
+
animation: false,
|
|
74
|
+
layout: { padding: { top: 20 } },
|
|
75
|
+
plugins: {
|
|
76
|
+
legend: { display: false },
|
|
77
|
+
tooltip: { callbacks: { label: (item) => this.tooltipText(Number(item.raw)) } }
|
|
78
|
+
},
|
|
79
|
+
scales: {
|
|
80
|
+
y: {
|
|
81
|
+
beginAtZero: true,
|
|
82
|
+
ticks: {
|
|
83
|
+
precision: 0,
|
|
84
|
+
color: "#94a3b8",
|
|
85
|
+
font: { size: 11 }
|
|
86
|
+
},
|
|
87
|
+
grid: { color: "#e2e8f0" },
|
|
88
|
+
border: { display: false }
|
|
89
|
+
},
|
|
90
|
+
x: {
|
|
91
|
+
grid: { display: false },
|
|
92
|
+
ticks: {
|
|
93
|
+
maxRotation: 0,
|
|
94
|
+
color: "#94a3b8",
|
|
95
|
+
font: { size: 10 }
|
|
96
|
+
},
|
|
97
|
+
border: { display: false }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
plugins: [VALUE_LABELS]
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const chart = this.chart;
|
|
106
|
+
chart.data.labels = s.labels;
|
|
107
|
+
const ds = chart.data.datasets[0];
|
|
108
|
+
ds.data = s.data;
|
|
109
|
+
ds.backgroundColor = s.color;
|
|
110
|
+
ds.hoverBackgroundColor = s.hoverColor;
|
|
111
|
+
chart.options.plugins["uiBarChartValueLabels"] = { enabled: s.showValues };
|
|
112
|
+
chart.update("none");
|
|
113
|
+
});
|
|
114
|
+
inject(DestroyRef).onDestroy(() => {
|
|
115
|
+
this.chart?.destroy();
|
|
116
|
+
this.chart = null;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
static {
|
|
120
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
121
|
+
minVersion: "12.0.0",
|
|
122
|
+
version: "22.2.2",
|
|
123
|
+
ngImport: i0,
|
|
124
|
+
type: BarChartComponent,
|
|
125
|
+
deps: [],
|
|
126
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
static {
|
|
130
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
131
|
+
minVersion: "17.2.0",
|
|
132
|
+
version: "22.2.2",
|
|
133
|
+
type: BarChartComponent,
|
|
134
|
+
isStandalone: true,
|
|
135
|
+
selector: "ui-bar-chart",
|
|
136
|
+
inputs: {
|
|
137
|
+
labels: {
|
|
138
|
+
classPropertyName: "labels",
|
|
139
|
+
publicName: "labels",
|
|
140
|
+
isSignal: true,
|
|
141
|
+
isRequired: false,
|
|
142
|
+
transformFunction: null
|
|
143
|
+
},
|
|
144
|
+
values: {
|
|
145
|
+
classPropertyName: "values",
|
|
146
|
+
publicName: "values",
|
|
147
|
+
isSignal: true,
|
|
148
|
+
isRequired: false,
|
|
149
|
+
transformFunction: null
|
|
150
|
+
},
|
|
151
|
+
color: {
|
|
152
|
+
classPropertyName: "color",
|
|
153
|
+
publicName: "color",
|
|
154
|
+
isSignal: true,
|
|
155
|
+
isRequired: false,
|
|
156
|
+
transformFunction: null
|
|
157
|
+
},
|
|
158
|
+
hoverColor: {
|
|
159
|
+
classPropertyName: "hoverColor",
|
|
160
|
+
publicName: "hoverColor",
|
|
161
|
+
isSignal: true,
|
|
162
|
+
isRequired: false,
|
|
163
|
+
transformFunction: null
|
|
164
|
+
},
|
|
165
|
+
height: {
|
|
166
|
+
classPropertyName: "height",
|
|
167
|
+
publicName: "height",
|
|
168
|
+
isSignal: true,
|
|
169
|
+
isRequired: false,
|
|
170
|
+
transformFunction: null
|
|
171
|
+
},
|
|
172
|
+
ariaLabel: {
|
|
173
|
+
classPropertyName: "ariaLabel",
|
|
174
|
+
publicName: "ariaLabel",
|
|
175
|
+
isSignal: true,
|
|
176
|
+
isRequired: false,
|
|
177
|
+
transformFunction: null
|
|
178
|
+
},
|
|
179
|
+
showValues: {
|
|
180
|
+
classPropertyName: "showValues",
|
|
181
|
+
publicName: "showValues",
|
|
182
|
+
isSignal: true,
|
|
183
|
+
isRequired: false,
|
|
184
|
+
transformFunction: null
|
|
185
|
+
},
|
|
186
|
+
unitSingular: {
|
|
187
|
+
classPropertyName: "unitSingular",
|
|
188
|
+
publicName: "unitSingular",
|
|
189
|
+
isSignal: true,
|
|
190
|
+
isRequired: false,
|
|
191
|
+
transformFunction: null
|
|
192
|
+
},
|
|
193
|
+
unitPlural: {
|
|
194
|
+
classPropertyName: "unitPlural",
|
|
195
|
+
publicName: "unitPlural",
|
|
196
|
+
isSignal: true,
|
|
197
|
+
isRequired: false,
|
|
198
|
+
transformFunction: null
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
viewQueries: [{
|
|
202
|
+
propertyName: "canvas",
|
|
203
|
+
first: true,
|
|
204
|
+
predicate: ["canvas"],
|
|
205
|
+
descendants: true,
|
|
206
|
+
isSignal: true
|
|
207
|
+
}],
|
|
208
|
+
ngImport: i0,
|
|
209
|
+
template: `
|
|
210
|
+
<div class="bc-wrap" [class.bc-default-height]="height() === 240" [style.height.px]="height()"
|
|
211
|
+
[attr.role]="ariaLabel() ? 'img' : null" [attr.aria-label]="ariaLabel() || null">
|
|
212
|
+
<canvas #canvas></canvas>
|
|
213
|
+
</div>
|
|
214
|
+
`,
|
|
215
|
+
isInline: true,
|
|
216
|
+
styles: [":host{display:block}.bc-wrap{position:relative}@media(max-width:768px){.bc-wrap.bc-default-height{height:200px!important}}@media(max-width:480px){.bc-wrap.bc-default-height{height:160px!important}}\n"],
|
|
217
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
222
|
+
minVersion: "12.0.0",
|
|
223
|
+
version: "22.2.2",
|
|
224
|
+
ngImport: i0,
|
|
225
|
+
type: BarChartComponent,
|
|
226
|
+
decorators: [{
|
|
227
|
+
type: Component,
|
|
228
|
+
args: [{
|
|
229
|
+
selector: "ui-bar-chart",
|
|
230
|
+
standalone: true,
|
|
231
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
232
|
+
template: `
|
|
233
|
+
<div class="bc-wrap" [class.bc-default-height]="height() === 240" [style.height.px]="height()"
|
|
234
|
+
[attr.role]="ariaLabel() ? 'img' : null" [attr.aria-label]="ariaLabel() || null">
|
|
235
|
+
<canvas #canvas></canvas>
|
|
236
|
+
</div>
|
|
237
|
+
`,
|
|
238
|
+
styles: [":host{display:block}.bc-wrap{position:relative}@media(max-width:768px){.bc-wrap.bc-default-height{height:200px!important}}@media(max-width:480px){.bc-wrap.bc-default-height{height:160px!important}}\n"]
|
|
239
|
+
}]
|
|
240
|
+
}],
|
|
241
|
+
ctorParameters: () => [],
|
|
242
|
+
propDecorators: {
|
|
243
|
+
labels: [{
|
|
244
|
+
type: i0.Input,
|
|
245
|
+
args: [{
|
|
246
|
+
isSignal: true,
|
|
247
|
+
alias: "labels",
|
|
248
|
+
required: false
|
|
249
|
+
}]
|
|
250
|
+
}],
|
|
251
|
+
values: [{
|
|
252
|
+
type: i0.Input,
|
|
253
|
+
args: [{
|
|
254
|
+
isSignal: true,
|
|
255
|
+
alias: "values",
|
|
256
|
+
required: false
|
|
257
|
+
}]
|
|
258
|
+
}],
|
|
259
|
+
color: [{
|
|
260
|
+
type: i0.Input,
|
|
261
|
+
args: [{
|
|
262
|
+
isSignal: true,
|
|
263
|
+
alias: "color",
|
|
264
|
+
required: false
|
|
265
|
+
}]
|
|
266
|
+
}],
|
|
267
|
+
hoverColor: [{
|
|
268
|
+
type: i0.Input,
|
|
269
|
+
args: [{
|
|
270
|
+
isSignal: true,
|
|
271
|
+
alias: "hoverColor",
|
|
272
|
+
required: false
|
|
273
|
+
}]
|
|
274
|
+
}],
|
|
275
|
+
height: [{
|
|
276
|
+
type: i0.Input,
|
|
277
|
+
args: [{
|
|
278
|
+
isSignal: true,
|
|
279
|
+
alias: "height",
|
|
280
|
+
required: false
|
|
281
|
+
}]
|
|
282
|
+
}],
|
|
283
|
+
ariaLabel: [{
|
|
284
|
+
type: i0.Input,
|
|
285
|
+
args: [{
|
|
286
|
+
isSignal: true,
|
|
287
|
+
alias: "ariaLabel",
|
|
288
|
+
required: false
|
|
289
|
+
}]
|
|
290
|
+
}],
|
|
291
|
+
showValues: [{
|
|
292
|
+
type: i0.Input,
|
|
293
|
+
args: [{
|
|
294
|
+
isSignal: true,
|
|
295
|
+
alias: "showValues",
|
|
296
|
+
required: false
|
|
297
|
+
}]
|
|
298
|
+
}],
|
|
299
|
+
unitSingular: [{
|
|
300
|
+
type: i0.Input,
|
|
301
|
+
args: [{
|
|
302
|
+
isSignal: true,
|
|
303
|
+
alias: "unitSingular",
|
|
304
|
+
required: false
|
|
305
|
+
}]
|
|
306
|
+
}],
|
|
307
|
+
unitPlural: [{
|
|
308
|
+
type: i0.Input,
|
|
309
|
+
args: [{
|
|
310
|
+
isSignal: true,
|
|
311
|
+
alias: "unitPlural",
|
|
312
|
+
required: false
|
|
313
|
+
}]
|
|
314
|
+
}],
|
|
315
|
+
canvas: [{
|
|
316
|
+
type: i0.ViewChild,
|
|
317
|
+
args: ["canvas", { isSignal: true }]
|
|
318
|
+
}]
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
export { BarChartComponent };
|
|
322
|
+
|
|
323
|
+
//# sourceMappingURL=forgeroute-ui-charts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-charts.mjs","names":[],"sources":["../../../projects/forgeroute-ui/charts/src/bar-chart/bar-chart.component.ts"],"sourcesContent":["import {\n Component, ChangeDetectionStrategy, DestroyRef, ElementRef, NgZone, computed, effect, inject, input, viewChild,\n} from '@angular/core';\nimport { BarController, BarElement, CategoryScale, Chart, LinearScale, Tooltip } from 'chart.js';\nimport type { Plugin } from 'chart.js';\n\n// Registered when a chart is first created (not at import time) so apps that never use ui-bar-chart can drop chart.js from their bundle.\nlet registered = false;\nfunction registerChartParts(): void {\n if (registered) return;\n Chart.register(BarController, BarElement, CategoryScale, LinearScale, Tooltip);\n registered = true;\n}\n\n/** Draws each bar's value above it (nothing for a 0 bar). Local to ui-bar-chart so no chart.js plugin package is needed. */\nconst VALUE_LABELS: Plugin<'bar'> = {\n id: 'uiBarChartValueLabels',\n afterDatasetsDraw(chart) {\n const opts = (chart.options.plugins as Record<string, { enabled?: boolean } | undefined>)['uiBarChartValueLabels'];\n if (opts?.enabled === false) return;\n const ctx = chart.ctx;\n ctx.save();\n ctx.fillStyle = '#475569';\n ctx.font = '600 11px sans-serif';\n ctx.textAlign = 'center';\n ctx.textBaseline = 'bottom';\n chart.getDatasetMeta(0).data.forEach((bar, i) => {\n const value = chart.data.datasets[0]?.data[i];\n if (typeof value === 'number' && value !== 0) ctx.fillText(String(value), bar.x, bar.y - 2);\n });\n ctx.restore();\n },\n};\n\n/**\n * Bar chart of one series (e.g. calls per day). Pass the category `labels` and the matching `values`.\n *\n * <ui-bar-chart [labels]=\"['8/1', '8/2']\" [values]=\"[3, 0]\" ariaLabel=\"Daily call volume\"\n * unitSingular=\"call\" unitPlural=\"calls\" />\n *\n * - Bars show their value above them (`showValues`, a 0 bar shows nothing), the y axis starts at 0 and counts whole numbers.\n * - The tooltip reads \"<value> <unit>\" (`unitSingular` for 1, `unitPlural` otherwise; no unit = just the number).\n * - With an `ariaLabel` the chart is an image for assistive tech (`role=\"img\"` + that label; without a label no role is set, as an\n * unnamed image is an accessibility error); render the same figures as text next to it\n * (e.g. a visually hidden list) when the exact values matter.\n * - Height is `height` px (shorter on phones: 200px up to 768px wide, 160px up to 480px wide, when the default 240 is used);\n * the width follows the container. Needs the optional peer dependency `chart.js` (>= 4).\n */\n@Component({\n selector: 'ui-bar-chart',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"bc-wrap\" [class.bc-default-height]=\"height() === 240\" [style.height.px]=\"height()\"\n [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() || null\">\n <canvas #canvas></canvas>\n </div>\n `,\n styles: [`\n :host { display: block; }\n .bc-wrap { position: relative; }\n @media (max-width: 768px) { .bc-wrap.bc-default-height { height: 200px !important; } }\n @media (max-width: 480px) { .bc-wrap.bc-default-height { height: 160px !important; } }\n `],\n})\nexport class BarChartComponent {\n /** Category labels, left to right (one per bar). */\n readonly labels = input<string[]>([]);\n /** The bar values, in the order of `labels`. */\n readonly values = input<number[]>([]);\n /** Bar colour (any CSS colour). */\n readonly color = input('#3b82f6');\n /** Bar colour while hovered. */\n readonly hoverColor = input('#2563eb');\n /** Chart height in px. */\n readonly height = input(240);\n /** Spoken description of the chart. */\n readonly ariaLabel = input('');\n /** Show each bar's value above it. */\n readonly showValues = input(true);\n /** Tooltip unit for exactly 1 (e.g. \"call\"). */\n readonly unitSingular = input('');\n /** Tooltip unit for any other value (e.g. \"calls\"). */\n readonly unitPlural = input('');\n\n private readonly canvas = viewChild.required<ElementRef<HTMLCanvasElement>>('canvas');\n private readonly zone = inject(NgZone);\n private chart: Chart<'bar'> | null = null;\n\n private readonly tooltipText = (value: number): string => {\n const unit = value === 1 ? this.unitSingular() : this.unitPlural();\n return unit ? `${value} ${unit}` : String(value);\n };\n\n protected readonly series = computed(() => ({\n labels: this.labels(),\n data: this.values(),\n color: this.color(),\n hoverColor: this.hoverColor(),\n showValues: this.showValues(),\n }));\n\n constructor() {\n effect(() => {\n const s = this.series();\n const canvas = this.canvas().nativeElement;\n if (!this.chart) {\n registerChartParts();\n this.zone.runOutsideAngular(() => {\n this.chart = new Chart(canvas, {\n type: 'bar',\n data: { labels: s.labels, datasets: [{ data: s.data, backgroundColor: s.color, hoverBackgroundColor: s.hoverColor, borderRadius: 3, borderSkipped: false }] },\n options: {\n responsive: true,\n maintainAspectRatio: false,\n animation: false,\n layout: { padding: { top: 20 } },\n plugins: {\n legend: { display: false },\n tooltip: { callbacks: { label: (item) => this.tooltipText(Number(item.raw)) } },\n },\n scales: {\n y: { beginAtZero: true, ticks: { precision: 0, color: '#94a3b8', font: { size: 11 } }, grid: { color: '#e2e8f0' }, border: { display: false } },\n x: { grid: { display: false }, ticks: { maxRotation: 0, color: '#94a3b8', font: { size: 10 } }, border: { display: false } },\n },\n },\n plugins: [VALUE_LABELS],\n });\n });\n }\n const chart = this.chart!;\n chart.data.labels = s.labels;\n const ds = chart.data.datasets[0];\n ds.data = s.data;\n ds.backgroundColor = s.color;\n ds.hoverBackgroundColor = s.hoverColor;\n // the value labels plugin reads this flag at draw time\n (chart.options.plugins as Record<string, unknown>)['uiBarChartValueLabels'] = { enabled: s.showValues };\n chart.update('none');\n });\n inject(DestroyRef).onDestroy(() => { this.chart?.destroy(); this.chart = null; });\n }\n}\n"],"mappings":";;;AAOA,IAAI,aAAa;AACjB,SAAS,qBAAkB;CACzB,IAAI,YAAY;CAChB,MAAM,SAAS,eAAe,YAAY,eAAe,aAAa,OAAO;CAC7E,aAAa;AACf;AAGA,MAAM,eAA8B;CAClC,IAAI;CACJ,kBAAkB,OAAK;EAErB,IADc,MAAM,QAAQ,QAA8D,wBACtF,EAAM,YAAY,OAAO;EAC7B,MAAM,MAAM,MAAM;EAClB,IAAI,KAAI;EACR,IAAI,YAAY;EAChB,IAAI,OAAO;EACX,IAAI,YAAY;EAChB,IAAI,eAAe;EACnB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AAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, ElementRef, HostBinding, HostListener, Injectable, InjectionToken, Injector, Input,
|
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, ElementRef, HostBinding, HostListener, Injectable, InjectionToken, Injector, Input, Renderer2, afterNextRender, computed, effect, forwardRef, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
3
|
import { HttpClient, HttpErrorResponse, HttpParams } from "@angular/common/http";
|
|
4
4
|
import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
|
|
5
5
|
import { catchError, debounceTime, distinctUntilChanged, skip, switchMap } from "rxjs/operators";
|
|
@@ -8,7 +8,6 @@ import { DOCUMENT, DatePipe, DecimalPipe, NgTemplateOutlet } from "@angular/comm
|
|
|
8
8
|
import * as i1 from "@angular/forms";
|
|
9
9
|
import { FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
10
10
|
import { NavigationEnd, Router, RouterLink, RouterLinkActive } from "@angular/router";
|
|
11
|
-
import { BarController, BarElement, CategoryScale, Chart, LinearScale, Tooltip } from "chart.js";
|
|
12
11
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
13
12
|
const FORGEROUTE_CONFIG = new InjectionToken("FORGEROUTE_CONFIG");
|
|
14
13
|
const DROPDOWN_GROUP = new InjectionToken("DROPDOWN_GROUP");
|
|
@@ -10685,323 +10684,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10685
10684
|
}]
|
|
10686
10685
|
}
|
|
10687
10686
|
});
|
|
10688
|
-
let registered = false;
|
|
10689
|
-
function registerChartParts() {
|
|
10690
|
-
if (registered) return;
|
|
10691
|
-
Chart.register(BarController, BarElement, CategoryScale, LinearScale, Tooltip);
|
|
10692
|
-
registered = true;
|
|
10693
|
-
}
|
|
10694
|
-
const VALUE_LABELS = {
|
|
10695
|
-
id: "uiBarChartValueLabels",
|
|
10696
|
-
afterDatasetsDraw(chart) {
|
|
10697
|
-
if (chart.options.plugins["uiBarChartValueLabels"]?.enabled === false) return;
|
|
10698
|
-
const ctx = chart.ctx;
|
|
10699
|
-
ctx.save();
|
|
10700
|
-
ctx.fillStyle = "#475569";
|
|
10701
|
-
ctx.font = "600 11px sans-serif";
|
|
10702
|
-
ctx.textAlign = "center";
|
|
10703
|
-
ctx.textBaseline = "bottom";
|
|
10704
|
-
chart.getDatasetMeta(0).data.forEach((bar, i) => {
|
|
10705
|
-
const value = chart.data.datasets[0]?.data[i];
|
|
10706
|
-
if (typeof value === "number" && value !== 0) ctx.fillText(String(value), bar.x, bar.y - 2);
|
|
10707
|
-
});
|
|
10708
|
-
ctx.restore();
|
|
10709
|
-
}
|
|
10710
|
-
};
|
|
10711
|
-
var BarChartComponent = class BarChartComponent {
|
|
10712
|
-
constructor() {
|
|
10713
|
-
this.labels = input([], ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
10714
|
-
this.values = input([], ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
|
|
10715
|
-
this.color = input("#3b82f6", ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
|
|
10716
|
-
this.hoverColor = input("#2563eb", ...ngDevMode ? [{ debugName: "hoverColor" }] : /* istanbul ignore next */ []);
|
|
10717
|
-
this.height = input(240, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
10718
|
-
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
10719
|
-
this.showValues = input(true, ...ngDevMode ? [{ debugName: "showValues" }] : /* istanbul ignore next */ []);
|
|
10720
|
-
this.unitSingular = input("", ...ngDevMode ? [{ debugName: "unitSingular" }] : /* istanbul ignore next */ []);
|
|
10721
|
-
this.unitPlural = input("", ...ngDevMode ? [{ debugName: "unitPlural" }] : /* istanbul ignore next */ []);
|
|
10722
|
-
this.canvas = viewChild.required("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
|
|
10723
|
-
this.zone = inject(NgZone);
|
|
10724
|
-
this.chart = null;
|
|
10725
|
-
this.tooltipText = (value) => {
|
|
10726
|
-
const unit = value === 1 ? this.unitSingular() : this.unitPlural();
|
|
10727
|
-
return unit ? `${value} ${unit}` : String(value);
|
|
10728
|
-
};
|
|
10729
|
-
this.series = computed(() => ({
|
|
10730
|
-
labels: this.labels(),
|
|
10731
|
-
data: this.values(),
|
|
10732
|
-
color: this.color(),
|
|
10733
|
-
hoverColor: this.hoverColor(),
|
|
10734
|
-
showValues: this.showValues()
|
|
10735
|
-
}), ...ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []);
|
|
10736
|
-
effect(() => {
|
|
10737
|
-
const s = this.series();
|
|
10738
|
-
const canvas = this.canvas().nativeElement;
|
|
10739
|
-
if (!this.chart) {
|
|
10740
|
-
registerChartParts();
|
|
10741
|
-
this.zone.runOutsideAngular(() => {
|
|
10742
|
-
this.chart = new Chart(canvas, {
|
|
10743
|
-
type: "bar",
|
|
10744
|
-
data: {
|
|
10745
|
-
labels: s.labels,
|
|
10746
|
-
datasets: [{
|
|
10747
|
-
data: s.data,
|
|
10748
|
-
backgroundColor: s.color,
|
|
10749
|
-
hoverBackgroundColor: s.hoverColor,
|
|
10750
|
-
borderRadius: 3,
|
|
10751
|
-
borderSkipped: false
|
|
10752
|
-
}]
|
|
10753
|
-
},
|
|
10754
|
-
options: {
|
|
10755
|
-
responsive: true,
|
|
10756
|
-
maintainAspectRatio: false,
|
|
10757
|
-
animation: false,
|
|
10758
|
-
layout: { padding: { top: 20 } },
|
|
10759
|
-
plugins: {
|
|
10760
|
-
legend: { display: false },
|
|
10761
|
-
tooltip: { callbacks: { label: (item) => this.tooltipText(Number(item.raw)) } }
|
|
10762
|
-
},
|
|
10763
|
-
scales: {
|
|
10764
|
-
y: {
|
|
10765
|
-
beginAtZero: true,
|
|
10766
|
-
ticks: {
|
|
10767
|
-
precision: 0,
|
|
10768
|
-
color: "#94a3b8",
|
|
10769
|
-
font: { size: 11 }
|
|
10770
|
-
},
|
|
10771
|
-
grid: { color: "#e2e8f0" },
|
|
10772
|
-
border: { display: false }
|
|
10773
|
-
},
|
|
10774
|
-
x: {
|
|
10775
|
-
grid: { display: false },
|
|
10776
|
-
ticks: {
|
|
10777
|
-
maxRotation: 0,
|
|
10778
|
-
color: "#94a3b8",
|
|
10779
|
-
font: { size: 10 }
|
|
10780
|
-
},
|
|
10781
|
-
border: { display: false }
|
|
10782
|
-
}
|
|
10783
|
-
}
|
|
10784
|
-
},
|
|
10785
|
-
plugins: [VALUE_LABELS]
|
|
10786
|
-
});
|
|
10787
|
-
});
|
|
10788
|
-
}
|
|
10789
|
-
const chart = this.chart;
|
|
10790
|
-
chart.data.labels = s.labels;
|
|
10791
|
-
const ds = chart.data.datasets[0];
|
|
10792
|
-
ds.data = s.data;
|
|
10793
|
-
ds.backgroundColor = s.color;
|
|
10794
|
-
ds.hoverBackgroundColor = s.hoverColor;
|
|
10795
|
-
chart.options.plugins["uiBarChartValueLabels"] = { enabled: s.showValues };
|
|
10796
|
-
chart.update("none");
|
|
10797
|
-
});
|
|
10798
|
-
inject(DestroyRef).onDestroy(() => {
|
|
10799
|
-
this.chart?.destroy();
|
|
10800
|
-
this.chart = null;
|
|
10801
|
-
});
|
|
10802
|
-
}
|
|
10803
|
-
static {
|
|
10804
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
10805
|
-
minVersion: "12.0.0",
|
|
10806
|
-
version: "22.2.2",
|
|
10807
|
-
ngImport: i0,
|
|
10808
|
-
type: BarChartComponent,
|
|
10809
|
-
deps: [],
|
|
10810
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
10811
|
-
});
|
|
10812
|
-
}
|
|
10813
|
-
static {
|
|
10814
|
-
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
10815
|
-
minVersion: "17.2.0",
|
|
10816
|
-
version: "22.2.2",
|
|
10817
|
-
type: BarChartComponent,
|
|
10818
|
-
isStandalone: true,
|
|
10819
|
-
selector: "ui-bar-chart",
|
|
10820
|
-
inputs: {
|
|
10821
|
-
labels: {
|
|
10822
|
-
classPropertyName: "labels",
|
|
10823
|
-
publicName: "labels",
|
|
10824
|
-
isSignal: true,
|
|
10825
|
-
isRequired: false,
|
|
10826
|
-
transformFunction: null
|
|
10827
|
-
},
|
|
10828
|
-
values: {
|
|
10829
|
-
classPropertyName: "values",
|
|
10830
|
-
publicName: "values",
|
|
10831
|
-
isSignal: true,
|
|
10832
|
-
isRequired: false,
|
|
10833
|
-
transformFunction: null
|
|
10834
|
-
},
|
|
10835
|
-
color: {
|
|
10836
|
-
classPropertyName: "color",
|
|
10837
|
-
publicName: "color",
|
|
10838
|
-
isSignal: true,
|
|
10839
|
-
isRequired: false,
|
|
10840
|
-
transformFunction: null
|
|
10841
|
-
},
|
|
10842
|
-
hoverColor: {
|
|
10843
|
-
classPropertyName: "hoverColor",
|
|
10844
|
-
publicName: "hoverColor",
|
|
10845
|
-
isSignal: true,
|
|
10846
|
-
isRequired: false,
|
|
10847
|
-
transformFunction: null
|
|
10848
|
-
},
|
|
10849
|
-
height: {
|
|
10850
|
-
classPropertyName: "height",
|
|
10851
|
-
publicName: "height",
|
|
10852
|
-
isSignal: true,
|
|
10853
|
-
isRequired: false,
|
|
10854
|
-
transformFunction: null
|
|
10855
|
-
},
|
|
10856
|
-
ariaLabel: {
|
|
10857
|
-
classPropertyName: "ariaLabel",
|
|
10858
|
-
publicName: "ariaLabel",
|
|
10859
|
-
isSignal: true,
|
|
10860
|
-
isRequired: false,
|
|
10861
|
-
transformFunction: null
|
|
10862
|
-
},
|
|
10863
|
-
showValues: {
|
|
10864
|
-
classPropertyName: "showValues",
|
|
10865
|
-
publicName: "showValues",
|
|
10866
|
-
isSignal: true,
|
|
10867
|
-
isRequired: false,
|
|
10868
|
-
transformFunction: null
|
|
10869
|
-
},
|
|
10870
|
-
unitSingular: {
|
|
10871
|
-
classPropertyName: "unitSingular",
|
|
10872
|
-
publicName: "unitSingular",
|
|
10873
|
-
isSignal: true,
|
|
10874
|
-
isRequired: false,
|
|
10875
|
-
transformFunction: null
|
|
10876
|
-
},
|
|
10877
|
-
unitPlural: {
|
|
10878
|
-
classPropertyName: "unitPlural",
|
|
10879
|
-
publicName: "unitPlural",
|
|
10880
|
-
isSignal: true,
|
|
10881
|
-
isRequired: false,
|
|
10882
|
-
transformFunction: null
|
|
10883
|
-
}
|
|
10884
|
-
},
|
|
10885
|
-
viewQueries: [{
|
|
10886
|
-
propertyName: "canvas",
|
|
10887
|
-
first: true,
|
|
10888
|
-
predicate: ["canvas"],
|
|
10889
|
-
descendants: true,
|
|
10890
|
-
isSignal: true
|
|
10891
|
-
}],
|
|
10892
|
-
ngImport: i0,
|
|
10893
|
-
template: `
|
|
10894
|
-
<div class="bc-wrap" [class.bc-default-height]="height() === 240" [style.height.px]="height()"
|
|
10895
|
-
[attr.role]="ariaLabel() ? 'img' : null" [attr.aria-label]="ariaLabel() || null">
|
|
10896
|
-
<canvas #canvas></canvas>
|
|
10897
|
-
</div>
|
|
10898
|
-
`,
|
|
10899
|
-
isInline: true,
|
|
10900
|
-
styles: [":host{display:block}.bc-wrap{position:relative}@media(max-width:768px){.bc-wrap.bc-default-height{height:200px!important}}@media(max-width:480px){.bc-wrap.bc-default-height{height:160px!important}}\n"],
|
|
10901
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
10902
|
-
});
|
|
10903
|
-
}
|
|
10904
|
-
};
|
|
10905
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
10906
|
-
minVersion: "12.0.0",
|
|
10907
|
-
version: "22.2.2",
|
|
10908
|
-
ngImport: i0,
|
|
10909
|
-
type: BarChartComponent,
|
|
10910
|
-
decorators: [{
|
|
10911
|
-
type: Component,
|
|
10912
|
-
args: [{
|
|
10913
|
-
selector: "ui-bar-chart",
|
|
10914
|
-
standalone: true,
|
|
10915
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10916
|
-
template: `
|
|
10917
|
-
<div class="bc-wrap" [class.bc-default-height]="height() === 240" [style.height.px]="height()"
|
|
10918
|
-
[attr.role]="ariaLabel() ? 'img' : null" [attr.aria-label]="ariaLabel() || null">
|
|
10919
|
-
<canvas #canvas></canvas>
|
|
10920
|
-
</div>
|
|
10921
|
-
`,
|
|
10922
|
-
styles: [":host{display:block}.bc-wrap{position:relative}@media(max-width:768px){.bc-wrap.bc-default-height{height:200px!important}}@media(max-width:480px){.bc-wrap.bc-default-height{height:160px!important}}\n"]
|
|
10923
|
-
}]
|
|
10924
|
-
}],
|
|
10925
|
-
ctorParameters: () => [],
|
|
10926
|
-
propDecorators: {
|
|
10927
|
-
labels: [{
|
|
10928
|
-
type: i0.Input,
|
|
10929
|
-
args: [{
|
|
10930
|
-
isSignal: true,
|
|
10931
|
-
alias: "labels",
|
|
10932
|
-
required: false
|
|
10933
|
-
}]
|
|
10934
|
-
}],
|
|
10935
|
-
values: [{
|
|
10936
|
-
type: i0.Input,
|
|
10937
|
-
args: [{
|
|
10938
|
-
isSignal: true,
|
|
10939
|
-
alias: "values",
|
|
10940
|
-
required: false
|
|
10941
|
-
}]
|
|
10942
|
-
}],
|
|
10943
|
-
color: [{
|
|
10944
|
-
type: i0.Input,
|
|
10945
|
-
args: [{
|
|
10946
|
-
isSignal: true,
|
|
10947
|
-
alias: "color",
|
|
10948
|
-
required: false
|
|
10949
|
-
}]
|
|
10950
|
-
}],
|
|
10951
|
-
hoverColor: [{
|
|
10952
|
-
type: i0.Input,
|
|
10953
|
-
args: [{
|
|
10954
|
-
isSignal: true,
|
|
10955
|
-
alias: "hoverColor",
|
|
10956
|
-
required: false
|
|
10957
|
-
}]
|
|
10958
|
-
}],
|
|
10959
|
-
height: [{
|
|
10960
|
-
type: i0.Input,
|
|
10961
|
-
args: [{
|
|
10962
|
-
isSignal: true,
|
|
10963
|
-
alias: "height",
|
|
10964
|
-
required: false
|
|
10965
|
-
}]
|
|
10966
|
-
}],
|
|
10967
|
-
ariaLabel: [{
|
|
10968
|
-
type: i0.Input,
|
|
10969
|
-
args: [{
|
|
10970
|
-
isSignal: true,
|
|
10971
|
-
alias: "ariaLabel",
|
|
10972
|
-
required: false
|
|
10973
|
-
}]
|
|
10974
|
-
}],
|
|
10975
|
-
showValues: [{
|
|
10976
|
-
type: i0.Input,
|
|
10977
|
-
args: [{
|
|
10978
|
-
isSignal: true,
|
|
10979
|
-
alias: "showValues",
|
|
10980
|
-
required: false
|
|
10981
|
-
}]
|
|
10982
|
-
}],
|
|
10983
|
-
unitSingular: [{
|
|
10984
|
-
type: i0.Input,
|
|
10985
|
-
args: [{
|
|
10986
|
-
isSignal: true,
|
|
10987
|
-
alias: "unitSingular",
|
|
10988
|
-
required: false
|
|
10989
|
-
}]
|
|
10990
|
-
}],
|
|
10991
|
-
unitPlural: [{
|
|
10992
|
-
type: i0.Input,
|
|
10993
|
-
args: [{
|
|
10994
|
-
isSignal: true,
|
|
10995
|
-
alias: "unitPlural",
|
|
10996
|
-
required: false
|
|
10997
|
-
}]
|
|
10998
|
-
}],
|
|
10999
|
-
canvas: [{
|
|
11000
|
-
type: i0.ViewChild,
|
|
11001
|
-
args: ["canvas", { isSignal: true }]
|
|
11002
|
-
}]
|
|
11003
|
-
}
|
|
11004
|
-
});
|
|
11005
10687
|
const KEY_STEP = 2;
|
|
11006
10688
|
const KEY_STEP_BIG = 10;
|
|
11007
10689
|
const clamp = (n) => Math.min(100, Math.max(0, Math.round(n)));
|
|
@@ -28356,6 +28038,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
28356
28038
|
}]
|
|
28357
28039
|
}
|
|
28358
28040
|
});
|
|
28359
|
-
export { AlertComponent, AppShellComponent, AvatarComponent, BADGE_VARIANT_STYLES, BadgeComponent,
|
|
28041
|
+
export { AlertComponent, AppShellComponent, AvatarComponent, BADGE_VARIANT_STYLES, BadgeComponent, BulkMessagePanelComponent, ButtonComponent, CheckboxComponent, ChipComponent, ChipGroupComponent, ColumnFilterComponent, ComboboxComponent, ConfirmOutletComponent, ConfirmService, ContactPickerComponent, DEFAULT_DOCUMENT_SUBJECT, DOCUMENT_PURPOSE_OPTIONS, DROPDOWN_GROUP, DataTableComponent, DateInputComponent, DateRangePickerComponent, DatetimeInputComponent, DetailCardComponent, DiscountSelectorComponent, DividerComponent, DocumentSendOptionsComponent, DropdownComponent, EmptyStateComponent, ErrorComponent, ErrorStateComponent, FORGEROUTE_CONFIG, FileInputComponent, FormRowComponent, FormSectionComponent, HintComponent, ImagePreviewComponent, ImageRepositionComponent, ImportExportComponent, KpiCardComponent, ListItemComponent, MAX_CC, ModalComponent, MoreMenuComponent, MultiSelectComponent, PaginationComponent, PanelInfoListComponent, PillTabsComponent, ProgressBarComponent, QrCodeComponent, QuickFilterTabsComponent, RICH_TEXT_OPTIONS, RadioComponent, RadioGroupComponent, RadioMatrixComponent, RichTextEditorComponent, SEMANTIC_BADGE_MAP, SearchInputComponent, SelectComponent, SendMessagePanelComponent, SidePanelComponent, SkeletonComponent, TableToolbarComponent, TemplatePickerComponent, TextInputComponent, TextareaInputComponent, TimeInputComponent, ToastComponent, ToastService, ToggleBadgeComponent, TooltipDirective, US_STATES, UiFieldValidity, VideoPickerComponent, appShellGroupsStorageKey, autoVariant, builtInActionIcon, createFieldReveal, decodeFilterValues, encodeFilterValue, encodeFilterValues, errorContextInterceptor, formatIsoDate, formatIsoDateTime, formatTime, getEligibleIds, getEligibleOptions, getErrorMessage, humanReadableMessage, isoKey, issueToErrors, maxLengthIssue, messagePreviewHtml, parseCcList, parseIso, parseTime, pluralize, requiredIssue, resolvePreset, suggestDocumentSubject };
|
|
28360
28042
|
|
|
28361
28043
|
//# sourceMappingURL=forgeroute-ui.mjs.map
|