@thalassic/ui 0.7.0 → 0.8.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/fesm2022/thalassic-ui-charts.mjs +340 -0
- package/fesm2022/thalassic-ui-charts.mjs.map +1 -0
- package/fesm2022/thalassic-ui.mjs +1070 -515
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +6 -1
- package/types/thalassic-ui-charts.d.ts +102 -0
- package/types/thalassic-ui.d.ts +273 -102
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, input, Directive, inject, ElementRef, Injectable, DestroyRef, viewChild, contentChildren, computed, afterNextRender, Component, forwardRef, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { ThemeService, deepMerge } from '@thalassic/core';
|
|
5
|
+
import { Chart as Chart$1, BarController, BarElement, CategoryScale, LinearScale, BubbleController, PointElement, DoughnutController, ArcElement, LineController, LineElement, PieController, PolarAreaController, RadialLinearScale, RadarController, ScatterController } from 'chart.js';
|
|
6
|
+
|
|
7
|
+
const CHART_ELEMENT = new InjectionToken('CHART_ELEMENT');
|
|
8
|
+
class ChartElement {
|
|
9
|
+
dataset = input.required({ ...(ngDevMode ? { debugName: "dataset" } : {}), transform: value => ({
|
|
10
|
+
type: this.type,
|
|
11
|
+
...value,
|
|
12
|
+
}) });
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ChartElement, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.1", type: ChartElement, isStandalone: true, inputs: { dataset: { classPropertyName: "dataset", publicName: "dataset", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ChartElement, decorators: [{
|
|
17
|
+
type: Directive
|
|
18
|
+
}], propDecorators: { dataset: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataset", required: true }] }] } });
|
|
19
|
+
|
|
20
|
+
const CARTESIAN_CHARTS = [
|
|
21
|
+
'bar',
|
|
22
|
+
'line',
|
|
23
|
+
'scatter',
|
|
24
|
+
'bubble',
|
|
25
|
+
];
|
|
26
|
+
const RADIAL_CHARTS = ['polarArea', 'radar'];
|
|
27
|
+
|
|
28
|
+
class ChartService {
|
|
29
|
+
_elementRef = inject(ElementRef);
|
|
30
|
+
getColorOptions(chartElements) {
|
|
31
|
+
const scaleTypes = this._getScaleTypes(chartElements);
|
|
32
|
+
const computedStyle = getComputedStyle(this._elementRef.nativeElement);
|
|
33
|
+
return {
|
|
34
|
+
backgroundColor: computedStyle.getPropertyValue('--tls-chart-background-color'),
|
|
35
|
+
borderColor: computedStyle.getPropertyValue('--tls-chart-border-color'),
|
|
36
|
+
color: computedStyle.getPropertyValue('--tls-chart-color'),
|
|
37
|
+
scales: this._getScales(scaleTypes),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Private methods
|
|
41
|
+
_getScales(scaleTypes) {
|
|
42
|
+
const scales = {};
|
|
43
|
+
if (scaleTypes.includes('cartesian')) {
|
|
44
|
+
scales['x'] = this._getCartesianScales('x');
|
|
45
|
+
scales['y'] = this._getCartesianScales('y');
|
|
46
|
+
}
|
|
47
|
+
if (scaleTypes.includes('radial')) {
|
|
48
|
+
scales['r'] = this._getRadialScales();
|
|
49
|
+
}
|
|
50
|
+
return scales;
|
|
51
|
+
}
|
|
52
|
+
_getCartesianScales(axis) {
|
|
53
|
+
const computedStyle = getComputedStyle(this._elementRef.nativeElement);
|
|
54
|
+
return {
|
|
55
|
+
ticks: {
|
|
56
|
+
color: computedStyle.getPropertyValue(`--tls-chart-${axis}-ticks-color`),
|
|
57
|
+
},
|
|
58
|
+
grid: {
|
|
59
|
+
color: computedStyle.getPropertyValue(`--tls-chart-${axis}-grid-color`),
|
|
60
|
+
},
|
|
61
|
+
border: {
|
|
62
|
+
color: computedStyle.getPropertyValue(`--tls-chart-${axis}-axis-color`),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
_getRadialScales() {
|
|
67
|
+
const computedStyle = getComputedStyle(this._elementRef.nativeElement);
|
|
68
|
+
return {
|
|
69
|
+
angleLines: {
|
|
70
|
+
color: computedStyle.getPropertyValue('--tls-chart-r-angle-lines-color'),
|
|
71
|
+
},
|
|
72
|
+
grid: {
|
|
73
|
+
color: computedStyle.getPropertyValue('--tls-chart-r-grid-color'),
|
|
74
|
+
},
|
|
75
|
+
pointLabels: {
|
|
76
|
+
color: computedStyle.getPropertyValue('--tls-chart-r-labels-color'),
|
|
77
|
+
},
|
|
78
|
+
ticks: {
|
|
79
|
+
color: computedStyle.getPropertyValue('--tls-chart-r-ticks-color'),
|
|
80
|
+
backdropColor: computedStyle.getPropertyValue('--tls-chart-r-ticks-backdrop-color'),
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
_getScaleTypes(chartElements) {
|
|
85
|
+
const types = [];
|
|
86
|
+
if (chartElements.some(element => CARTESIAN_CHARTS.includes(element.type)))
|
|
87
|
+
types.push('cartesian');
|
|
88
|
+
if (chartElements.some(element => RADIAL_CHARTS.includes(element.type)))
|
|
89
|
+
types.push('radial');
|
|
90
|
+
return types;
|
|
91
|
+
}
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ChartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ChartService });
|
|
94
|
+
}
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ChartService, decorators: [{
|
|
96
|
+
type: Injectable
|
|
97
|
+
}] });
|
|
98
|
+
|
|
99
|
+
const DEFAULT_CHART_CONFIG = {
|
|
100
|
+
options: {
|
|
101
|
+
maintainAspectRatio: false,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const CHART_CONFIG = new InjectionToken('CHART_CONFIG', {
|
|
106
|
+
factory: () => DEFAULT_CHART_CONFIG,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
class Chart {
|
|
110
|
+
_config = inject(CHART_CONFIG);
|
|
111
|
+
_chartService = inject(ChartService);
|
|
112
|
+
_destroyRef = inject(DestroyRef);
|
|
113
|
+
_themeService = inject(ThemeService, { optional: true });
|
|
114
|
+
canvasRef = viewChild('canvas', ...(ngDevMode ? [{ debugName: "canvasRef" }] : []));
|
|
115
|
+
chartElements = contentChildren(CHART_ELEMENT, ...(ngDevMode ? [{ debugName: "chartElements" }] : []));
|
|
116
|
+
_chart = null;
|
|
117
|
+
labels = input([], ...(ngDevMode ? [{ debugName: "labels" }] : []));
|
|
118
|
+
options = input(undefined, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
119
|
+
// Computed
|
|
120
|
+
_options = computed(() => {
|
|
121
|
+
const options = this.options();
|
|
122
|
+
const colorOptions = this._chartService.getColorOptions(this.chartElements());
|
|
123
|
+
if (options)
|
|
124
|
+
return { ...colorOptions, ...this._config.options, ...options };
|
|
125
|
+
else
|
|
126
|
+
return { ...colorOptions, ...this._config.options };
|
|
127
|
+
}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
|
|
128
|
+
_datasets = computed(() => this.chartElements().map(element => element.dataset()), ...(ngDevMode ? [{ debugName: "_datasets" }] : []));
|
|
129
|
+
hostClasses = computed(() => {
|
|
130
|
+
const className = 'tls-chart';
|
|
131
|
+
const array = [className];
|
|
132
|
+
return array;
|
|
133
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
134
|
+
constructor() {
|
|
135
|
+
afterNextRender(() => {
|
|
136
|
+
if (this.canvasElement) {
|
|
137
|
+
const config = {
|
|
138
|
+
options: this._options(),
|
|
139
|
+
data: {
|
|
140
|
+
labels: this.labels(),
|
|
141
|
+
datasets: this._datasets(),
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
this._chart = new Chart$1(this.canvasElement, config);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Accessors
|
|
149
|
+
get canvasElement() {
|
|
150
|
+
return this.canvasRef()?.nativeElement;
|
|
151
|
+
}
|
|
152
|
+
// Private methods
|
|
153
|
+
_tryInitThemeListener() {
|
|
154
|
+
if (this._themeService) {
|
|
155
|
+
this._themeService.onThemeChange.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
156
|
+
if (this._chart) {
|
|
157
|
+
const colorOptions = this._chartService.getColorOptions(this.chartElements());
|
|
158
|
+
this._chart.options = { ...this._options(), ...colorOptions };
|
|
159
|
+
this._chart.update('none');
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Lifecycle
|
|
165
|
+
ngOnInit() {
|
|
166
|
+
this._tryInitThemeListener();
|
|
167
|
+
}
|
|
168
|
+
ngOnDestroy() {
|
|
169
|
+
if (this._chart)
|
|
170
|
+
this._chart.destroy();
|
|
171
|
+
}
|
|
172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Chart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.1", type: Chart, isStandalone: true, selector: "tls-chart", inputs: { labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, providers: [ChartService], queries: [{ propertyName: "chartElements", predicate: CHART_ELEMENT, isSignal: true }], viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<canvas #canvas></canvas>\n", styles: [":host{position:relative;display:block}\n"] });
|
|
174
|
+
}
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: Chart, decorators: [{
|
|
176
|
+
type: Component,
|
|
177
|
+
args: [{ selector: 'tls-chart', imports: [], host: {
|
|
178
|
+
'[class]': 'hostClasses()',
|
|
179
|
+
}, providers: [ChartService], template: "<canvas #canvas></canvas>\n", styles: [":host{position:relative;display:block}\n"] }]
|
|
180
|
+
}], ctorParameters: () => [], propDecorators: { canvasRef: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }], chartElements: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CHART_ELEMENT), { isSignal: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
181
|
+
|
|
182
|
+
class BarChart extends ChartElement {
|
|
183
|
+
type = 'bar';
|
|
184
|
+
constructor() {
|
|
185
|
+
super();
|
|
186
|
+
Chart$1.register(BarController, BarElement, CategoryScale, LinearScale);
|
|
187
|
+
}
|
|
188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BarChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: BarChart, isStandalone: true, selector: "tls-bar-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => BarChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
190
|
+
}
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BarChart, decorators: [{
|
|
192
|
+
type: Component,
|
|
193
|
+
args: [{
|
|
194
|
+
selector: 'tls-bar-chart',
|
|
195
|
+
template: '',
|
|
196
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => BarChart) }],
|
|
197
|
+
}]
|
|
198
|
+
}], ctorParameters: () => [] });
|
|
199
|
+
|
|
200
|
+
class BubbleChart extends ChartElement {
|
|
201
|
+
type = 'bubble';
|
|
202
|
+
constructor() {
|
|
203
|
+
super();
|
|
204
|
+
Chart$1.register(BubbleController, PointElement, LinearScale);
|
|
205
|
+
}
|
|
206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BubbleChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: BubbleChart, isStandalone: true, selector: "tls-bubble-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => BubbleChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
208
|
+
}
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: BubbleChart, decorators: [{
|
|
210
|
+
type: Component,
|
|
211
|
+
args: [{
|
|
212
|
+
selector: 'tls-bubble-chart',
|
|
213
|
+
template: '',
|
|
214
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => BubbleChart) }],
|
|
215
|
+
}]
|
|
216
|
+
}], ctorParameters: () => [] });
|
|
217
|
+
|
|
218
|
+
class DoughnutChart extends ChartElement {
|
|
219
|
+
type = 'doughnut';
|
|
220
|
+
constructor() {
|
|
221
|
+
super();
|
|
222
|
+
Chart$1.register(DoughnutController, ArcElement);
|
|
223
|
+
}
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DoughnutChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: DoughnutChart, isStandalone: true, selector: "tls-doughnut-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => DoughnutChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
226
|
+
}
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DoughnutChart, decorators: [{
|
|
228
|
+
type: Component,
|
|
229
|
+
args: [{
|
|
230
|
+
selector: 'tls-doughnut-chart',
|
|
231
|
+
template: '',
|
|
232
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => DoughnutChart) }],
|
|
233
|
+
}]
|
|
234
|
+
}], ctorParameters: () => [] });
|
|
235
|
+
|
|
236
|
+
class LineChart extends ChartElement {
|
|
237
|
+
type = 'line';
|
|
238
|
+
constructor() {
|
|
239
|
+
super();
|
|
240
|
+
Chart$1.register(LineController, LineElement, PointElement, CategoryScale, LinearScale);
|
|
241
|
+
}
|
|
242
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LineChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
243
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: LineChart, isStandalone: true, selector: "tls-line-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => LineChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
244
|
+
}
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: LineChart, decorators: [{
|
|
246
|
+
type: Component,
|
|
247
|
+
args: [{
|
|
248
|
+
selector: 'tls-line-chart',
|
|
249
|
+
template: '',
|
|
250
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => LineChart) }],
|
|
251
|
+
}]
|
|
252
|
+
}], ctorParameters: () => [] });
|
|
253
|
+
|
|
254
|
+
class PieChart extends ChartElement {
|
|
255
|
+
type = 'pie';
|
|
256
|
+
constructor() {
|
|
257
|
+
super();
|
|
258
|
+
Chart$1.register(PieController, ArcElement);
|
|
259
|
+
}
|
|
260
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PieChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
261
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: PieChart, isStandalone: true, selector: "tls-pie-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => PieChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
262
|
+
}
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PieChart, decorators: [{
|
|
264
|
+
type: Component,
|
|
265
|
+
args: [{
|
|
266
|
+
selector: 'tls-pie-chart',
|
|
267
|
+
template: '',
|
|
268
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => PieChart) }],
|
|
269
|
+
}]
|
|
270
|
+
}], ctorParameters: () => [] });
|
|
271
|
+
|
|
272
|
+
class PolarAreaChart extends ChartElement {
|
|
273
|
+
type = 'polarArea';
|
|
274
|
+
constructor() {
|
|
275
|
+
super();
|
|
276
|
+
Chart$1.register(PolarAreaController, ArcElement, RadialLinearScale);
|
|
277
|
+
}
|
|
278
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PolarAreaChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
279
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: PolarAreaChart, isStandalone: true, selector: "tls-polar-area-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => PolarAreaChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
280
|
+
}
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: PolarAreaChart, decorators: [{
|
|
282
|
+
type: Component,
|
|
283
|
+
args: [{
|
|
284
|
+
selector: 'tls-polar-area-chart',
|
|
285
|
+
template: '',
|
|
286
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => PolarAreaChart) }],
|
|
287
|
+
}]
|
|
288
|
+
}], ctorParameters: () => [] });
|
|
289
|
+
|
|
290
|
+
class RadarChart extends ChartElement {
|
|
291
|
+
type = 'radar';
|
|
292
|
+
constructor() {
|
|
293
|
+
super();
|
|
294
|
+
Chart$1.register(RadarController, LineElement, PointElement, RadialLinearScale);
|
|
295
|
+
}
|
|
296
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RadarChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
297
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: RadarChart, isStandalone: true, selector: "tls-radar-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => RadarChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
298
|
+
}
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: RadarChart, decorators: [{
|
|
300
|
+
type: Component,
|
|
301
|
+
args: [{
|
|
302
|
+
selector: 'tls-radar-chart',
|
|
303
|
+
template: '',
|
|
304
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => RadarChart) }],
|
|
305
|
+
}]
|
|
306
|
+
}], ctorParameters: () => [] });
|
|
307
|
+
|
|
308
|
+
class ScatterChart extends ChartElement {
|
|
309
|
+
type = 'scatter';
|
|
310
|
+
constructor() {
|
|
311
|
+
super();
|
|
312
|
+
Chart$1.register(ScatterController, PointElement, LinearScale);
|
|
313
|
+
}
|
|
314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ScatterChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
315
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: ScatterChart, isStandalone: true, selector: "tls-scatter-chart", providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => ScatterChart) }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
316
|
+
}
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ScatterChart, decorators: [{
|
|
318
|
+
type: Component,
|
|
319
|
+
args: [{
|
|
320
|
+
selector: 'tls-scatter-chart',
|
|
321
|
+
template: '',
|
|
322
|
+
providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => ScatterChart) }],
|
|
323
|
+
}]
|
|
324
|
+
}], ctorParameters: () => [] });
|
|
325
|
+
|
|
326
|
+
const provideThalassicChartConfig = (config) => {
|
|
327
|
+
return makeEnvironmentProviders([
|
|
328
|
+
{
|
|
329
|
+
provide: CHART_CONFIG,
|
|
330
|
+
useValue: deepMerge(DEFAULT_CHART_CONFIG, config),
|
|
331
|
+
},
|
|
332
|
+
]);
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Generated bundle index. Do not edit.
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
export { BarChart, BubbleChart, CHART_CONFIG, Chart, DEFAULT_CHART_CONFIG, DoughnutChart, LineChart, PieChart, PolarAreaChart, RadarChart, ScatterChart, provideThalassicChartConfig };
|
|
340
|
+
//# sourceMappingURL=thalassic-ui-charts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thalassic-ui-charts.mjs","sources":["../../../../libs/ui/charts/src/abstract/chart/chart-element.ts","../../../../libs/ui/charts/src/features/chart/chart.constants.ts","../../../../libs/ui/charts/src/features/chart/chart.service.ts","../../../../libs/ui/charts/src/features/chart/chart.config.ts","../../../../libs/ui/charts/src/features/chart/chart.token.ts","../../../../libs/ui/charts/src/features/chart/chart.ts","../../../../libs/ui/charts/src/features/chart/chart.html","../../../../libs/ui/charts/src/features/chart/charts/bar-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/bubble-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/doughnut-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/line-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/pie-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/polar-area-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/radar-chart.ts","../../../../libs/ui/charts/src/features/chart/charts/scatter-chart.ts","../../../../libs/ui/charts/src/providers/chart.provider.ts","../../../../libs/ui/charts/src/thalassic-ui-charts.ts"],"sourcesContent":["import { Directive, InjectionToken, input, InputSignalWithTransform } from '@angular/core';\nimport { ChartDataset, ChartDatasetCustomTypesPerDataset, ChartType } from 'chart.js';\n\nexport const CHART_ELEMENT = new InjectionToken<ChartElement>('CHART_ELEMENT');\n\n@Directive()\nexport abstract class ChartElement<T extends ChartType = ChartType> {\n public abstract readonly type: T;\n\n public dataset: InputSignalWithTransform<ChartDatasetCustomTypesPerDataset<T>, ChartDataset> =\n input.required<ChartDatasetCustomTypesPerDataset<T>, ChartDataset>({\n transform: value =>\n ({\n type: this.type,\n ...value,\n }) as ChartDatasetCustomTypesPerDataset<T>,\n });\n}\n","import { ChartTypeRegistry } from 'chart.js';\n\nexport const CARTESIAN_CHARTS: (keyof ChartTypeRegistry)[] = [\n 'bar',\n 'line',\n 'scatter',\n 'bubble',\n] as const;\nexport const RADIAL_CHARTS: (keyof ChartTypeRegistry)[] = ['polarArea', 'radar'];\n","import { ElementRef, inject, Injectable } from '@angular/core';\nimport { ChartOptions, ChartTypeRegistry, ScaleOptionsByType } from 'chart.js';\nimport { DeepPartial } from 'utility-types';\nimport { ChartElement } from '../../abstract/chart';\nimport { CARTESIAN_CHARTS, RADIAL_CHARTS } from './chart.constants';\nimport { chartScaleType } from './chart.types';\n\n@Injectable()\nexport class ChartService {\n private _elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n public getColorOptions(\n chartElements: readonly ChartElement<keyof ChartTypeRegistry>[],\n ): ChartOptions {\n const scaleTypes = this._getScaleTypes(chartElements);\n const computedStyle = getComputedStyle(this._elementRef.nativeElement);\n return {\n backgroundColor: computedStyle.getPropertyValue('--tls-chart-background-color'),\n borderColor: computedStyle.getPropertyValue('--tls-chart-border-color'),\n color: computedStyle.getPropertyValue('--tls-chart-color'),\n scales: this._getScales(scaleTypes),\n };\n }\n\n // Private methods\n private _getScales(scaleTypes: chartScaleType[]): {\n [key: string]: DeepPartial<ScaleOptionsByType>;\n } {\n const scales: { [key: string]: DeepPartial<ScaleOptionsByType> } = {};\n\n if (scaleTypes.includes('cartesian')) {\n scales['x'] = this._getCartesianScales('x');\n scales['y'] = this._getCartesianScales('y');\n }\n if (scaleTypes.includes('radial')) {\n scales['r'] = this._getRadialScales();\n }\n\n return scales;\n }\n\n private _getCartesianScales(\n axis: 'x' | 'y',\n ): DeepPartial<\n ScaleOptionsByType<'linear' | 'logarithmic' | 'category' | 'time' | 'timeseries'>\n > {\n const computedStyle = getComputedStyle(this._elementRef.nativeElement);\n return {\n ticks: {\n color: computedStyle.getPropertyValue(`--tls-chart-${axis}-ticks-color`),\n },\n grid: {\n color: computedStyle.getPropertyValue(`--tls-chart-${axis}-grid-color`),\n },\n border: {\n color: computedStyle.getPropertyValue(`--tls-chart-${axis}-axis-color`),\n },\n };\n }\n\n private _getRadialScales(): DeepPartial<ScaleOptionsByType<'radialLinear'>> {\n const computedStyle = getComputedStyle(this._elementRef.nativeElement);\n return {\n angleLines: {\n color: computedStyle.getPropertyValue('--tls-chart-r-angle-lines-color'),\n },\n grid: {\n color: computedStyle.getPropertyValue('--tls-chart-r-grid-color'),\n },\n pointLabels: {\n color: computedStyle.getPropertyValue('--tls-chart-r-labels-color'),\n },\n ticks: {\n color: computedStyle.getPropertyValue('--tls-chart-r-ticks-color'),\n backdropColor: computedStyle.getPropertyValue('--tls-chart-r-ticks-backdrop-color'),\n },\n };\n }\n\n private _getScaleTypes(\n chartElements: readonly ChartElement<keyof ChartTypeRegistry>[],\n ): chartScaleType[] {\n const types: chartScaleType[] = [];\n if (chartElements.some(element => CARTESIAN_CHARTS.includes(element.type)))\n types.push('cartesian');\n if (chartElements.some(element => RADIAL_CHARTS.includes(element.type))) types.push('radial');\n return types;\n }\n}\n","import { ChartOptions } from 'chart.js';\n\nexport interface ChartConfig {\n options: ChartOptions;\n}\n\nexport const DEFAULT_CHART_CONFIG: ChartConfig = {\n options: {\n maintainAspectRatio: false,\n },\n};\n","import { InjectionToken } from '@angular/core';\nimport { ChartConfig, DEFAULT_CHART_CONFIG } from './chart.config';\n\nexport const CHART_CONFIG = new InjectionToken<ChartConfig>('CHART_CONFIG', {\n factory: () => DEFAULT_CHART_CONFIG,\n});\n","import {\n afterNextRender,\n Component,\n computed,\n contentChildren,\n DestroyRef,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n Signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThemeService } from '@thalassic/core';\nimport {\n Chart as ChartJS,\n ChartConfigurationCustomTypesPerDataset,\n ChartDatasetCustomTypesPerDataset,\n ChartOptions,\n} from 'chart.js';\nimport { CHART_ELEMENT } from '../../abstract/chart';\nimport { ChartConfig } from './chart.config';\nimport { ChartService } from './chart.service';\nimport { CHART_CONFIG } from './chart.token';\n\n@Component({\n selector: 'tls-chart',\n imports: [],\n templateUrl: './chart.html',\n styleUrl: './chart.scss',\n host: {\n '[class]': 'hostClasses()',\n },\n providers: [ChartService],\n})\nexport class Chart implements OnInit, OnDestroy {\n private _config: ChartConfig = inject<ChartConfig>(CHART_CONFIG);\n private _chartService = inject(ChartService);\n private _destroyRef = inject(DestroyRef);\n\n private _themeService = inject(ThemeService, { optional: true });\n\n protected canvasRef: Signal<ElementRef<HTMLCanvasElement> | undefined> =\n viewChild<ElementRef<HTMLCanvasElement>>('canvas');\n\n protected chartElements = contentChildren(CHART_ELEMENT);\n\n private _chart: ChartJS | null = null;\n\n public labels = input<unknown[]>([]);\n public options = input<ChartOptions | undefined>(undefined);\n\n // Computed\n private _options = computed(() => {\n const options = this.options();\n\n const colorOptions = this._chartService.getColorOptions(this.chartElements());\n if (options) return { ...colorOptions, ...this._config.options, ...options };\n else return { ...colorOptions, ...this._config.options };\n });\n\n private _datasets: Signal<ChartDatasetCustomTypesPerDataset[]> = computed(() =>\n this.chartElements().map(element => element.dataset()),\n );\n\n protected hostClasses = computed(() => {\n const className = 'tls-chart';\n\n const array: string[] = [className];\n\n return array;\n });\n\n constructor() {\n afterNextRender(() => {\n if (this.canvasElement) {\n const config: ChartConfigurationCustomTypesPerDataset = {\n options: this._options(),\n data: {\n labels: this.labels(),\n datasets: this._datasets(),\n },\n };\n\n this._chart = new ChartJS(this.canvasElement, config);\n }\n });\n }\n\n // Accessors\n protected get canvasElement() {\n return this.canvasRef()?.nativeElement;\n }\n\n // Private methods\n private _tryInitThemeListener() {\n if (this._themeService) {\n this._themeService.onThemeChange.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {\n if (this._chart) {\n const colorOptions = this._chartService.getColorOptions(this.chartElements());\n this._chart.options = { ...this._options(), ...colorOptions };\n this._chart.update('none');\n }\n });\n }\n }\n\n // Lifecycle\n ngOnInit(): void {\n this._tryInitThemeListener();\n }\n\n ngOnDestroy(): void {\n if (this._chart) this._chart.destroy();\n }\n}\n","<canvas #canvas></canvas>\n","import { Component, forwardRef } from '@angular/core';\nimport { BarController, BarElement, CategoryScale, Chart as ChartJS, LinearScale } from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-bar-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => BarChart) }],\n})\nexport class BarChart extends ChartElement<'bar'> {\n public readonly type = 'bar';\n\n constructor() {\n super();\n\n ChartJS.register(BarController, BarElement, CategoryScale, LinearScale);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport { BubbleController, Chart as ChartJS, LinearScale, PointElement } from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-bubble-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => BubbleChart) }],\n})\nexport class BubbleChart extends ChartElement<'bubble'> {\n public readonly type = 'bubble';\n\n constructor() {\n super();\n\n ChartJS.register(BubbleController, PointElement, LinearScale);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport { ArcElement, Chart as ChartJS, DoughnutController } from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-doughnut-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => DoughnutChart) }],\n})\nexport class DoughnutChart extends ChartElement<'doughnut'> {\n public readonly type = 'doughnut';\n\n constructor() {\n super();\n\n ChartJS.register(DoughnutController, ArcElement);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport {\n CategoryScale,\n Chart as ChartJS,\n LinearScale,\n LineController,\n LineElement,\n PointElement,\n} from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-line-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => LineChart) }],\n})\nexport class LineChart extends ChartElement<'line'> {\n public readonly type = 'line';\n\n constructor() {\n super();\n\n ChartJS.register(LineController, LineElement, PointElement, CategoryScale, LinearScale);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport { ArcElement, Chart as ChartJS, PieController } from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-pie-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => PieChart) }],\n})\nexport class PieChart extends ChartElement<'pie'> {\n public readonly type = 'pie';\n\n constructor() {\n super();\n\n ChartJS.register(PieController, ArcElement);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport { ArcElement, Chart as ChartJS, PolarAreaController, RadialLinearScale } from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-polar-area-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => PolarAreaChart) }],\n})\nexport class PolarAreaChart extends ChartElement<'polarArea'> {\n public readonly type = 'polarArea';\n\n constructor() {\n super();\n\n ChartJS.register(PolarAreaController, ArcElement, RadialLinearScale);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport {\n Chart as ChartJS,\n LineElement,\n PointElement,\n RadarController,\n RadialLinearScale,\n} from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-radar-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => RadarChart) }],\n})\nexport class RadarChart extends ChartElement<'radar'> {\n public readonly type = 'radar';\n\n constructor() {\n super();\n\n ChartJS.register(RadarController, LineElement, PointElement, RadialLinearScale);\n }\n}\n","import { Component, forwardRef } from '@angular/core';\nimport { Chart as ChartJS, LinearScale, PointElement, ScatterController } from 'chart.js';\nimport { CHART_ELEMENT, ChartElement } from '../../../abstract/chart';\n\n@Component({\n selector: 'tls-scatter-chart',\n template: '',\n providers: [{ provide: CHART_ELEMENT, useExisting: forwardRef(() => ScatterChart) }],\n})\nexport class ScatterChart extends ChartElement<'scatter'> {\n public readonly type = 'scatter';\n\n constructor() {\n super();\n\n ChartJS.register(ScatterController, PointElement, LinearScale);\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { deepMerge } from '@thalassic/core';\nimport { CHART_CONFIG, ChartConfig, DEFAULT_CHART_CONFIG } from '../features/chart';\n\nexport const provideThalassicChartConfig = (config: ChartConfig): EnvironmentProviders => {\n return makeEnvironmentProviders([\n {\n provide: CHART_CONFIG,\n useValue: deepMerge(DEFAULT_CHART_CONFIG, config),\n },\n ]);\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ChartJS"],"mappings":";;;;;;AAGO,MAAM,aAAa,GAAG,IAAI,cAAc,CAAe,eAAe,CAAC;MAGxD,YAAY,CAAA;IAGzB,OAAO,GACZ,KAAK,CAAC,QAAQ,CAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,SAAA,EAAA,GAAA,EAAA,CAAA,EACZ,SAAS,EAAE,KAAK,KACb;YACC,IAAI,EAAE,IAAI,CAAC,IAAI;AACf,YAAA,GAAG,KAAK;AACT,SAAA,CAAyC,GAC5C;uGAVgB,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADjC;;;ACHM,MAAM,gBAAgB,GAAgC;IAC3D,KAAK;IACL,MAAM;IACN,SAAS;IACT,QAAQ;CACA;AACH,MAAM,aAAa,GAAgC,CAAC,WAAW,EAAE,OAAO,CAAC;;MCAnE,YAAY,CAAA;AACf,IAAA,WAAW,GAA4B,MAAM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