@maliardic/ma-ui 0.1.1 → 0.1.2

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 CHANGED
@@ -4,7 +4,8 @@ Standalone Angular UI components, directives and CSS variable themes.
4
4
 
5
5
  ## Install
6
6
 
7
- Requires Angular 22.2 and Angular CDK 22.1 or later within major version 22.
7
+ Requires Angular 22.1.0+ and Angular CDK 22.1.1+ within major version 22.
8
+ The library is compiled with Angular 22.1.0.
8
9
 
9
10
  ```sh
10
11
  npm install @maliardic/ma-ui
@@ -21,6 +22,13 @@ missing peer dependencies such as Angular CDK are installed automatically too.
21
22
  Existing incompatible Angular/CDK versions must be updated in the application;
22
23
  installing this package does not upgrade them automatically.
23
24
 
25
+ Angular 22.1 applications do not need to upgrade Core or CLI. If the application
26
+ still uses CDK 21, update CDK explicitly when installing:
27
+
28
+ ```sh
29
+ npm install @angular/cdk@^22.1.1 @maliardic/ma-ui
30
+ ```
31
+
24
32
  The theme includes Font Awesome icons/fonts and the structural Angular CDK overlay
25
33
  styles. Tailwind and a separate Font Awesome CSS import are not required.
26
34
  For applications without Sass, add `@maliardic/ma-ui/styles/ma-ui.css` to the
@@ -1,187 +1,143 @@
1
- import * as i0 from "@angular/core";
2
- import { Component, ElementRef, afterNextRender, effect, inject, input, signal, viewChild } from "@angular/core";
1
+ import * as i0 from '@angular/core';
2
+ import { input, signal, inject, ElementRef, viewChild, afterNextRender, effect, Component } from '@angular/core';
3
+
4
+ // Copy plain configuration objects only: callbacks, gradients and other instances retain identity.
3
5
  function copy(value) {
4
- if (Array.isArray(value)) return value.map(copy);
5
- if (value && Object.getPrototypeOf(value) === Object.prototype) return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, copy(item)]));
6
- return value;
6
+ if (Array.isArray(value))
7
+ return value.map(copy);
8
+ if (value && Object.getPrototypeOf(value) === Object.prototype) {
9
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, copy(item)]));
10
+ }
11
+ return value;
7
12
  }
8
13
  function merge(base, overrides) {
9
- const result = copy(base);
10
- for (const [key, value] of Object.entries(overrides)) {
11
- if (value === void 0) continue;
12
- result[key] = value && Object.getPrototypeOf(value) === Object.prototype ? merge(result[key] && typeof result[key] === "object" ? result[key] : {}, value) : copy(value);
13
- }
14
- return result;
14
+ const result = copy(base);
15
+ for (const [key, value] of Object.entries(overrides)) {
16
+ if (value === undefined)
17
+ continue;
18
+ result[key] =
19
+ value && Object.getPrototypeOf(value) === Object.prototype
20
+ ? merge(result[key] && typeof result[key] === "object" ? result[key] : {}, value)
21
+ : copy(value);
22
+ }
23
+ return result;
15
24
  }
16
- var MChart = class MChart {
17
- type = input("bar", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
18
- data = input.required(...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
19
- options = input({}, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
20
- ariaLabel = input("Chart", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
21
- failed = signal(false, ...ngDevMode ? [{ debugName: "failed" }] : /* istanbul ignore next */ []);
22
- host = inject(ElementRef);
23
- canvas = viewChild.required("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
24
- constructorRef = signal(null, ...ngDevMode ? [{ debugName: "constructorRef" }] : /* istanbul ignore next */ []);
25
- chart;
26
- chartType;
27
- observer;
28
- destroyed = false;
29
- constructor() {
30
- afterNextRender(() => {
31
- import("chart.js/auto").then(({ default: ChartConstructor }) => {
32
- if (this.destroyed) return;
33
- this.constructorRef.set(ChartConstructor);
34
- this.observer = new MutationObserver(() => this.refreshTheme());
35
- for (let node = this.host.nativeElement; node; node = node.parentElement) this.observer.observe(node, {
36
- attributes: true,
37
- attributeFilter: ["class", "style"]
38
- });
39
- }).catch(() => {
40
- if (!this.destroyed) this.failed.set(true);
41
- });
42
- });
43
- effect(() => {
44
- const ChartConstructor = this.constructorRef();
45
- if (!ChartConstructor) return;
46
- const type = this.type();
47
- const data = copy(this.data());
48
- const options = this.themedOptions();
49
- if (this.chart && this.chartType === type) {
50
- this.chart.data = data;
51
- this.chart.options = options;
52
- this.chart.update();
53
- } else {
54
- this.chart?.destroy();
55
- this.chartType = type;
56
- this.chart = new ChartConstructor(this.canvas().nativeElement, {
57
- type,
58
- data,
59
- options
60
- });
61
- }
62
- });
63
- }
64
- themedOptions() {
65
- const style = getComputedStyle(this.host.nativeElement);
66
- const color = style.getPropertyValue("--m-color-text").trim() || style.color;
67
- const gridColor = style.getPropertyValue("--m-color-border").trim();
68
- const font = {
69
- family: style.fontFamily,
70
- size: parseFloat(style.fontSize)
71
- };
72
- const axis = {
73
- ticks: {
74
- color,
75
- font
76
- },
77
- grid: { color: gridColor },
78
- border: { color: gridColor },
79
- title: {
80
- color,
81
- font
82
- }
83
- };
84
- const type = this.type();
85
- const scales = {};
86
- if (type === "radar" || type === "polarArea") scales["r"] = {
87
- ...axis,
88
- angleLines: { color: gridColor },
89
- pointLabels: {
90
- color,
91
- font
92
- }
93
- };
94
- else if (type !== "pie" && type !== "doughnut") {
95
- scales["x"] = axis;
96
- scales["y"] = axis;
97
- }
98
- for (const key of Object.keys(this.options().scales ?? {})) scales[key] ??= axis;
99
- return merge({
100
- responsive: true,
101
- maintainAspectRatio: false,
102
- color,
103
- font,
104
- scales,
105
- plugins: {
106
- legend: { labels: {
107
- color,
108
- font
109
- } },
110
- title: {
111
- color,
112
- font
113
- },
114
- subtitle: {
115
- color,
116
- font
117
- }
118
- }
119
- }, this.options());
120
- }
121
- refreshTheme() {
122
- if (!this.chart || this.destroyed) return;
123
- this.chart.options = this.themedOptions();
124
- this.chart.update("none");
125
- }
126
- ngOnDestroy() {
127
- this.destroyed = true;
128
- this.observer?.disconnect();
129
- this.chart?.destroy();
130
- }
131
- static ɵfac = i0.ɵɵngDeclareFactory({
132
- minVersion: "12.0.0",
133
- version: "22.2.0",
134
- ngImport: i0,
135
- type: MChart,
136
- deps: [],
137
- target: i0.ɵɵFactoryTarget.Component
138
- });
139
- static ɵcmp = i0.ɵɵngDeclareComponent({
140
- minVersion: "17.0.0",
141
- version: "22.2.0",
142
- type: MChart,
143
- isStandalone: true,
144
- selector: "m-chart",
145
- inputs: {
146
- type: {
147
- classPropertyName: "type",
148
- publicName: "type",
149
- isSignal: true,
150
- isRequired: false,
151
- transformFunction: null
152
- },
153
- data: {
154
- classPropertyName: "data",
155
- publicName: "data",
156
- isSignal: true,
157
- isRequired: true,
158
- transformFunction: null
159
- },
160
- options: {
161
- classPropertyName: "options",
162
- publicName: "options",
163
- isSignal: true,
164
- isRequired: false,
165
- transformFunction: null
166
- },
167
- ariaLabel: {
168
- classPropertyName: "ariaLabel",
169
- publicName: "ariaLabel",
170
- isSignal: true,
171
- isRequired: false,
172
- transformFunction: null
173
- }
174
- },
175
- host: { classAttribute: "m-chart" },
176
- viewQueries: [{
177
- propertyName: "canvas",
178
- first: true,
179
- predicate: ["canvas"],
180
- descendants: true,
181
- isSignal: true
182
- }],
183
- ngImport: i0,
184
- template: `
25
+ class MChart {
26
+ type = input("bar", /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
28
+ data = input.required(/* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
30
+ options = input({}, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
32
+ ariaLabel = input("Chart", /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
34
+ failed = signal(false, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "failed" }] : /* istanbul ignore next */ []));
36
+ host = inject(ElementRef);
37
+ canvas = viewChild.required("canvas", /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []));
39
+ constructorRef = signal(null, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "constructorRef" }] : /* istanbul ignore next */ []));
41
+ chart;
42
+ chartType;
43
+ observer;
44
+ destroyed = false;
45
+ constructor() {
46
+ afterNextRender(() => {
47
+ void import('chart.js/auto')
48
+ .then(({ default: ChartConstructor }) => {
49
+ if (this.destroyed)
50
+ return;
51
+ this.constructorRef.set(ChartConstructor);
52
+ this.observer = new MutationObserver(() => this.refreshTheme());
53
+ for (let node = this.host.nativeElement; node; node = node.parentElement) {
54
+ this.observer.observe(node, {
55
+ attributes: true,
56
+ attributeFilter: ["class", "style"],
57
+ });
58
+ }
59
+ })
60
+ .catch(() => {
61
+ if (!this.destroyed)
62
+ this.failed.set(true);
63
+ });
64
+ });
65
+ effect(() => {
66
+ const ChartConstructor = this.constructorRef();
67
+ if (!ChartConstructor)
68
+ return;
69
+ const type = this.type();
70
+ const data = copy(this.data());
71
+ const options = this.themedOptions();
72
+ if (this.chart && this.chartType === type) {
73
+ this.chart.data = data;
74
+ this.chart.options = options;
75
+ this.chart.update();
76
+ }
77
+ else {
78
+ this.chart?.destroy();
79
+ this.chartType = type;
80
+ this.chart = new ChartConstructor(this.canvas().nativeElement, {
81
+ type,
82
+ data,
83
+ options,
84
+ });
85
+ }
86
+ });
87
+ }
88
+ themedOptions() {
89
+ const style = getComputedStyle(this.host.nativeElement);
90
+ const color = style.getPropertyValue("--m-color-text").trim() || style.color;
91
+ const gridColor = style.getPropertyValue("--m-color-border").trim();
92
+ const font = { family: style.fontFamily, size: parseFloat(style.fontSize) };
93
+ const axis = {
94
+ ticks: { color, font },
95
+ grid: { color: gridColor },
96
+ border: { color: gridColor },
97
+ title: { color, font },
98
+ };
99
+ const type = this.type();
100
+ const scales = {};
101
+ if (type === "radar" || type === "polarArea") {
102
+ scales["r"] = {
103
+ ...axis,
104
+ angleLines: { color: gridColor },
105
+ pointLabels: { color, font },
106
+ };
107
+ }
108
+ else if (type !== "pie" && type !== "doughnut") {
109
+ scales["x"] = axis;
110
+ scales["y"] = axis;
111
+ }
112
+ for (const key of Object.keys(this.options().scales ?? {})) {
113
+ scales[key] ??= axis;
114
+ }
115
+ return merge({
116
+ responsive: true,
117
+ maintainAspectRatio: false,
118
+ color,
119
+ font,
120
+ scales,
121
+ plugins: {
122
+ legend: { labels: { color, font } },
123
+ title: { color, font },
124
+ subtitle: { color, font },
125
+ },
126
+ }, this.options());
127
+ }
128
+ refreshTheme() {
129
+ if (!this.chart || this.destroyed)
130
+ return;
131
+ this.chart.options = this.themedOptions();
132
+ this.chart.update("none");
133
+ }
134
+ ngOnDestroy() {
135
+ this.destroyed = true;
136
+ this.observer?.disconnect();
137
+ this.chart?.destroy();
138
+ }
139
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: MChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
140
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: MChart, isStandalone: true, selector: "m-chart", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "m-chart" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: `
185
141
  <div class="m-chart__container">
186
142
  <canvas #canvas role="img" [attr.aria-label]="ariaLabel()">{{
187
143
  ariaLabel()
@@ -190,20 +146,13 @@ var MChart = class MChart {
190
146
  @if (failed()) {
191
147
  <span role="status">Chart could not be loaded.</span>
192
148
  }
193
- `,
194
- isInline: true
195
- });
196
- };
197
- i0.ɵɵngDeclareClassMetadata({
198
- minVersion: "12.0.0",
199
- version: "22.2.0",
200
- ngImport: i0,
201
- type: MChart,
202
- decorators: [{
203
- type: Component,
204
- args: [{
205
- selector: "m-chart",
206
- template: `
149
+ `, isInline: true });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: MChart, decorators: [{
152
+ type: Component,
153
+ args: [{
154
+ selector: "m-chart",
155
+ template: `
207
156
  <div class="m-chart__container">
208
157
  <canvas #canvas role="img" [attr.aria-label]="ariaLabel()">{{
209
158
  ariaLabel()
@@ -213,49 +162,13 @@ i0.ɵɵngDeclareClassMetadata({
213
162
  <span role="status">Chart could not be loaded.</span>
214
163
  }
215
164
  `,
216
- host: { class: "m-chart" }
217
- }]
218
- }],
219
- ctorParameters: () => [],
220
- propDecorators: {
221
- type: [{
222
- type: i0.Input,
223
- args: [{
224
- isSignal: true,
225
- alias: "type",
226
- required: false
227
- }]
228
- }],
229
- data: [{
230
- type: i0.Input,
231
- args: [{
232
- isSignal: true,
233
- alias: "data",
234
- required: true
235
- }]
236
- }],
237
- options: [{
238
- type: i0.Input,
239
- args: [{
240
- isSignal: true,
241
- alias: "options",
242
- required: false
243
- }]
244
- }],
245
- ariaLabel: [{
246
- type: i0.Input,
247
- args: [{
248
- isSignal: true,
249
- alias: "ariaLabel",
250
- required: false
251
- }]
252
- }],
253
- canvas: [{
254
- type: i0.ViewChild,
255
- args: ["canvas", { isSignal: true }]
256
- }]
257
- }
258
- });
259
- export { MChart };
165
+ host: { class: "m-chart" },
166
+ }]
167
+ }], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], canvas: [{ type: i0.ViewChild, args: ["canvas", { isSignal: true }] }] } });
168
+
169
+ /**
170
+ * Generated bundle index. Do not edit.
171
+ */
260
172
 
261
- //# sourceMappingURL=maliardic-ma-ui-chart.mjs.map
173
+ export { MChart };
174
+ //# sourceMappingURL=maliardic-ma-ui-chart.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"maliardic-ma-ui-chart.mjs","names":[],"sources":["../../../projects/ma-ui/chart/src/lib/chart.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n afterNextRender,\n effect,\n inject,\n input,\n type InputSignal,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport type { Chart, ChartData, ChartOptions, ChartType } from \"chart.js\";\n\n// Copy plain configuration objects only: callbacks, gradients and other instances retain identity.\nfunction copy<T>(value: T): T {\n if (Array.isArray(value)) return value.map(copy) as T;\n if (value && Object.getPrototypeOf(value) === Object.prototype) {\n return Object.fromEntries(\n Object.entries(value).map(([key, item]) => [key, copy(item)]),\n ) as T;\n }\n return value;\n}\n\nfunction merge(\n base: Record<string, any>,\n overrides: Record<string, any>,\n): Record<string, any> {\n const result = copy(base);\n for (const [key, value] of Object.entries(overrides)) {\n if (value === undefined) continue;\n result[key] =\n value && Object.getPrototypeOf(value) === Object.prototype\n ? merge(\n result[key] && typeof result[key] === \"object\" ? result[key] : {},\n value,\n )\n : copy(value);\n }\n return result;\n}\n\n@Component({\n selector: \"m-chart\",\n template: `\n <div class=\"m-chart__container\">\n <canvas #canvas role=\"img\" [attr.aria-label]=\"ariaLabel()\">{{\n ariaLabel()\n }}</canvas>\n </div>\n @if (failed()) {\n <span role=\"status\">Chart could not be loaded.</span>\n }\n `,\n host: { class: \"m-chart\" },\n})\nexport class MChart implements OnDestroy {\n readonly type = input<ChartType>(\"bar\");\n readonly data = input.required<ChartData>();\n readonly options: InputSignal<ChartOptions> = input<ChartOptions>({});\n readonly ariaLabel = input(\"Chart\");\n protected readonly failed = signal(false);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly canvas =\n viewChild.required<ElementRef<HTMLCanvasElement>>(\"canvas\");\n private readonly constructorRef = signal<typeof Chart | null>(null);\n private chart?: Chart;\n private chartType?: ChartType;\n private observer?: MutationObserver;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n void import(\"chart.js/auto\")\n .then(({ default: ChartConstructor }) => {\n if (this.destroyed) return;\n this.constructorRef.set(ChartConstructor);\n this.observer = new MutationObserver(() => this.refreshTheme());\n for (\n let node: HTMLElement | null = this.host.nativeElement;\n node;\n node = node.parentElement\n ) {\n this.observer.observe(node, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n })\n .catch(() => {\n if (!this.destroyed) this.failed.set(true);\n });\n });\n effect(() => {\n const ChartConstructor = this.constructorRef();\n if (!ChartConstructor) return;\n const type = this.type();\n const data = copy(this.data());\n const options = this.themedOptions();\n if (this.chart && this.chartType === type) {\n this.chart.data = data;\n this.chart.options = options;\n this.chart.update();\n } else {\n this.chart?.destroy();\n this.chartType = type;\n this.chart = new ChartConstructor(this.canvas().nativeElement, {\n type,\n data,\n options,\n });\n }\n });\n }\n\n private themedOptions(): ChartOptions {\n const style = getComputedStyle(this.host.nativeElement);\n const color =\n style.getPropertyValue(\"--m-color-text\").trim() || style.color;\n const gridColor = style.getPropertyValue(\"--m-color-border\").trim();\n const font = { family: style.fontFamily, size: parseFloat(style.fontSize) };\n const axis = {\n ticks: { color, font },\n grid: { color: gridColor },\n border: { color: gridColor },\n title: { color, font },\n };\n const type = this.type();\n const scales: Record<string, unknown> = {};\n if (type === \"radar\" || type === \"polarArea\") {\n scales[\"r\"] = {\n ...axis,\n angleLines: { color: gridColor },\n pointLabels: { color, font },\n };\n } else if (type !== \"pie\" && type !== \"doughnut\") {\n scales[\"x\"] = axis;\n scales[\"y\"] = axis;\n }\n for (const key of Object.keys(this.options().scales ?? {})) {\n scales[key] ??= axis;\n }\n return merge(\n {\n responsive: true,\n maintainAspectRatio: false,\n color,\n font,\n scales,\n plugins: {\n legend: { labels: { color, font } },\n title: { color, font },\n subtitle: { color, font },\n },\n },\n this.options(),\n ) as ChartOptions;\n }\n\n private refreshTheme(): void {\n if (!this.chart || this.destroyed) return;\n this.chart.options = this.themedOptions();\n this.chart.update(\"none\");\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.observer?.disconnect();\n this.chart?.destroy();\n }\n}\n"],"mappings":";;AAeA,SAAS,KAAQ,OAAQ;CACvB,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,IAAI;CAC/C,IAAI,SAAS,OAAO,eAAe,KAAK,MAAM,OAAO,WACnD,OAAO,OAAO,YACZ,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;CAGjE,OAAO;AACT;AAEA,SAAS,MACP,MACA,WAA8B;CAE9B,MAAM,SAAS,KAAK,IAAI;CACxB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,SAAS,GAAG;EACpD,IAAI,UAAU,QAAW;EACzB,OAAO,OACL,SAAS,OAAO,eAAe,KAAK,MAAM,OAAO,YAC7C,MACE,OAAO,QAAQ,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO,CAAA,GAC/D,KAAK,IAEP,KAAK,KAAK;CAClB;CACA,OAAO;AACT;AAgBA,IAAa,SAAb,MAAa,OAAM;CACR,OAAO,MAAiB,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC9B,OAAO,MAAM,SAAqB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,UAAqC,MAAoB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC5D,YAAY,MAAM,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAChB,SAAS,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;C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AAA,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
+ {"version":3,"file":"maliardic-ma-ui-chart.mjs","sources":["../../../projects/ma-ui/chart/src/lib/chart.ts","../../../projects/ma-ui/chart/maliardic-ma-ui-chart.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n afterNextRender,\n effect,\n inject,\n input,\n type InputSignal,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport type { Chart, ChartData, ChartOptions, ChartType } from \"chart.js\";\n\n// Copy plain configuration objects only: callbacks, gradients and other instances retain identity.\nfunction copy<T>(value: T): T {\n if (Array.isArray(value)) return value.map(copy) as T;\n if (value && Object.getPrototypeOf(value) === Object.prototype) {\n return Object.fromEntries(\n Object.entries(value).map(([key, item]) => [key, copy(item)]),\n ) as T;\n }\n return value;\n}\n\nfunction merge(\n base: Record<string, any>,\n overrides: Record<string, any>,\n): Record<string, any> {\n const result = copy(base);\n for (const [key, value] of Object.entries(overrides)) {\n if (value === undefined) continue;\n result[key] =\n value && Object.getPrototypeOf(value) === Object.prototype\n ? merge(\n result[key] && typeof result[key] === \"object\" ? result[key] : {},\n value,\n )\n : copy(value);\n }\n return result;\n}\n\n@Component({\n selector: \"m-chart\",\n template: `\n <div class=\"m-chart__container\">\n <canvas #canvas role=\"img\" [attr.aria-label]=\"ariaLabel()\">{{\n ariaLabel()\n }}</canvas>\n </div>\n @if (failed()) {\n <span role=\"status\">Chart could not be loaded.</span>\n }\n `,\n host: { class: \"m-chart\" },\n})\nexport class MChart implements OnDestroy {\n readonly type = input<ChartType>(\"bar\");\n readonly data = input.required<ChartData>();\n readonly options: InputSignal<ChartOptions> = input<ChartOptions>({});\n readonly ariaLabel = input(\"Chart\");\n protected readonly failed = signal(false);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly canvas =\n viewChild.required<ElementRef<HTMLCanvasElement>>(\"canvas\");\n private readonly constructorRef = signal<typeof Chart | null>(null);\n private chart?: Chart;\n private chartType?: ChartType;\n private observer?: MutationObserver;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n void import(\"chart.js/auto\")\n .then(({ default: ChartConstructor }) => {\n if (this.destroyed) return;\n this.constructorRef.set(ChartConstructor);\n this.observer = new MutationObserver(() => this.refreshTheme());\n for (\n let node: HTMLElement | null = this.host.nativeElement;\n node;\n node = node.parentElement\n ) {\n this.observer.observe(node, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n })\n .catch(() => {\n if (!this.destroyed) this.failed.set(true);\n });\n });\n effect(() => {\n const ChartConstructor = this.constructorRef();\n if (!ChartConstructor) return;\n const type = this.type();\n const data = copy(this.data());\n const options = this.themedOptions();\n if (this.chart && this.chartType === type) {\n this.chart.data = data;\n this.chart.options = options;\n this.chart.update();\n } else {\n this.chart?.destroy();\n this.chartType = type;\n this.chart = new ChartConstructor(this.canvas().nativeElement, {\n type,\n data,\n options,\n });\n }\n });\n }\n\n private themedOptions(): ChartOptions {\n const style = getComputedStyle(this.host.nativeElement);\n const color =\n style.getPropertyValue(\"--m-color-text\").trim() || style.color;\n const gridColor = style.getPropertyValue(\"--m-color-border\").trim();\n const font = { family: style.fontFamily, size: parseFloat(style.fontSize) };\n const axis = {\n ticks: { color, font },\n grid: { color: gridColor },\n border: { color: gridColor },\n title: { color, font },\n };\n const type = this.type();\n const scales: Record<string, unknown> = {};\n if (type === \"radar\" || type === \"polarArea\") {\n scales[\"r\"] = {\n ...axis,\n angleLines: { color: gridColor },\n pointLabels: { color, font },\n };\n } else if (type !== \"pie\" && type !== \"doughnut\") {\n scales[\"x\"] = axis;\n scales[\"y\"] = axis;\n }\n for (const key of Object.keys(this.options().scales ?? {})) {\n scales[key] ??= axis;\n }\n return merge(\n {\n responsive: true,\n maintainAspectRatio: false,\n color,\n font,\n scales,\n plugins: {\n legend: { labels: { color, font } },\n title: { color, font },\n subtitle: { color, font },\n },\n },\n this.options(),\n ) as ChartOptions;\n }\n\n private refreshTheme(): void {\n if (!this.chart || this.destroyed) return;\n this.chart.options = this.themedOptions();\n this.chart.update(\"none\");\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.observer?.disconnect();\n this.chart?.destroy();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAcA;AACA,SAAS,IAAI,CAAI,KAAQ,EAAA;AACvB,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAM;AACrD,IAAA,IAAI,KAAK,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS,EAAE;AAC9D,QAAA,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACzD;IACR;AACA,IAAA,OAAO,KAAK;AACd;AAEA,SAAS,KAAK,CACZ,IAAyB,EACzB,SAA8B,EAAA;AAE9B,IAAA,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;AACzB,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACpD,IAAI,KAAK,KAAK,SAAS;YAAE;QACzB,MAAM,CAAC,GAAG,CAAC;YACT,KAAK,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;AAC/C,kBAAE,KAAK,CACH,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO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