@agorapulse/ui-charts-map 20.1.7 → 20.2.0

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.
@@ -2,120 +2,24 @@ import * as i0 from '@angular/core';
2
2
  import { viewChild, input, signal, effect, untracked, Component } from '@angular/core';
3
3
  import { setOptions, mapChart } from 'highcharts/highmaps';
4
4
  import geojson from '@highcharts/map-collection/custom/world-highres2.geo.json';
5
- import { dateFormat, numberFormat } from 'highcharts';
5
+ import { merge, numberFormat } from 'highcharts';
6
6
 
7
- var ChartColor;
8
- (function (ChartColor) {
9
- ChartColor[ChartColor["Grey"] = 0] = "Grey";
10
- ChartColor[ChartColor["Orange"] = 1] = "Orange";
11
- ChartColor[ChartColor["SoftBlue"] = 2] = "SoftBlue";
12
- ChartColor[ChartColor["ElectricBlue"] = 3] = "ElectricBlue";
13
- ChartColor[ChartColor["Purple"] = 4] = "Purple";
14
- ChartColor[ChartColor["Green"] = 5] = "Green";
15
- })(ChartColor || (ChartColor = {}));
16
7
  class ChartColors {
17
- static SOFT_BLUE_COLORS = {
18
- '10': '#EFF5FC',
19
- '20': '#DFEDFA',
20
- '40': '#C0DBF4',
21
- '60': '#A0C8EF',
22
- '85': '#78B1E8',
23
- '100': '#61A4E4',
24
- };
25
- static ELECTRIC_BLUE_COLORS = {
26
- '10': '#e8f4ff',
27
- '20': '#d1e8ff',
28
- '40': '#a2d1ff',
29
- '60': '#74bbfe',
30
- '85': '#3a9efe',
31
- '100': '#178dfe',
32
- };
33
- static ORANGE_COLORS = {
34
- '10': '#FFEFE9',
35
- '20': '#FFE1D4',
36
- '40': '#FFC2A8',
37
- '60': '#FFA47D',
38
- '85': '#FF7E46',
39
- '100': '#FF6726',
40
- };
41
- static GREEN_COLORS = {
42
- '10': '#ECF7ED',
43
- '20': '#DAF1DD',
44
- '40': '#B5E3BB',
45
- '60': '#8FD498',
46
- '85': '#61C26D',
47
- '100': '#45B854',
48
- };
49
- static PURPLE_COLORS = {
50
- '10': '#EFEDF8',
51
- '20': '#E0DDF2',
52
- '40': '#C1BBE6',
53
- '60': '#A398D9',
54
- '85': '#7C6DC9',
55
- '100': '#6554C0',
56
- };
57
8
  static GREY_COLORS = {
58
9
  '10': '#EAECEF',
59
- '20': '#D6DAE0',
60
10
  '40': '#AEB5C1',
61
11
  '60': '#858FA1',
62
- '85': '#5D6A82',
63
12
  '100': '#344563',
64
13
  };
14
+ static HEATMAP_MIN_COLOR = 'rgba(74, 106, 204, 0.2)';
15
+ static HEATMAP_MAX_COLOR = 'rgba(74, 106, 204, 1)';
65
16
  static BLACK_COLOR = '#000000';
66
- static LIMIT_COLOR = '#E81313';
67
17
  static WHITE_COLOR = '#FFFFFF';
68
- static getChartColors(color) {
69
- switch (color) {
70
- case ChartColor.Orange:
71
- return this.ORANGE_COLORS;
72
- case ChartColor.SoftBlue:
73
- return this.SOFT_BLUE_COLORS;
74
- case ChartColor.ElectricBlue:
75
- return this.ELECTRIC_BLUE_COLORS;
76
- case ChartColor.Purple:
77
- return this.PURPLE_COLORS;
78
- case ChartColor.Green:
79
- return this.GREEN_COLORS;
80
- default:
81
- return this.GREY_COLORS;
82
- }
83
- }
84
- static getColors(seriesCount, color) {
85
- const colors = this.getChartColors(color);
86
- switch (seriesCount) {
87
- case 1:
88
- return [colors[100]];
89
- case 2:
90
- return [colors[40], colors[100]];
91
- case 3:
92
- return [colors[20], colors[60], colors[100]];
93
- case 4:
94
- return [colors[20], colors[40], colors[60], colors[100]];
95
- case 5:
96
- return [colors[10], colors[20], colors[40], colors[60], colors[100]];
97
- default:
98
- return [colors[20], colors[40], colors[60], colors[100]];
99
- }
100
- }
101
18
  }
102
19
 
103
20
  class ChartOptions {
104
21
  static DEFAULT_DATE_FORMAT = '%A, %b %e, %Y';
105
22
  static DEFAULT_OPTIONS = {
106
- /*lang: {
107
- decimalPoint: (manager && manager.locale !== 'en') ? ',' : '.',
108
- resetZoom: resetZoomLabel,
109
- resetZoomTitle: resetZoomHtmlTitle,
110
- shortMonths: [
111
- shortJanuary, shortFebruary, shortMarch, shortApril, shortMay, shortJune,
112
- shortJuly, shortAugust, shortSeptember, shortOctober, shortNovember, shortDecember
113
- ],
114
- thousandsSep: (manager && manager.locale !== 'en') ? ' ' : ',',
115
- weekdays: this.weekDays,
116
- zoomIn: zoomInHtmlTitle,
117
- zoomOut: zoomOutHtmlTitle
118
- },*/
119
23
  chart: {
120
24
  spacingRight: 20,
121
25
  zooming: {
@@ -206,7 +110,7 @@ class ChartOptions {
206
110
  headerFormat: `<div style="border-bottom: 1px solid ${ChartColors.GREY_COLORS[10]}; padding: 0 8px 7px">` +
207
111
  `<span style="font-size: 12px; color: ${ChartColors.GREY_COLORS[60]}">{point.key}</span></div>`,
208
112
  pointFormat: `<div style="font-size: 14px; color: ${ChartColors.GREY_COLORS[100]}; margin: 6px 8px 0 8px;">` +
209
- '<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b></div>',
113
+ '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b></div>',
210
114
  },
211
115
  xAxis: {
212
116
  gridLineColor: ChartColors.GREY_COLORS[10],
@@ -239,58 +143,12 @@ class ChartOptions {
239
143
  },
240
144
  },
241
145
  };
242
- static configure(series, options, color, labelDateFormat) {
243
- // Configure axis
244
- options.xAxis = mergeDeep({
245
- labels: {
246
- formatter: function () {
247
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
248
- // @ts-ignore
249
- return dateFormat(labelDateFormat ? labelDateFormat : '%m/%d', this.value);
250
- },
251
- },
252
- //minTickInterval: 24 * 60 * 60 * 1000 // One day
253
- }, options.xAxis);
254
- // Configure series
255
- if (series && series.length) {
146
+ static configure(series, options, labelDateFormat) {
147
+ options.xAxis = merge({ labels: { format: `{value:${labelDateFormat ?? '%m/%d'}}` } }, options.xAxis);
148
+ if (series?.length) {
256
149
  options.series = series;
257
- options.colors = ChartColors.getColors(series.length, color);
258
- }
259
- }
260
- }
261
- function isObject(item) {
262
- return item && typeof item === 'object' && !Array.isArray(item);
263
- }
264
- function mergeDeep(target, source) {
265
- const output = deepCopy(target);
266
- if (isObject(target) && isObject(source)) {
267
- Object.keys(source).forEach(key => {
268
- if (isObject(source[key])) {
269
- if (!(key in target))
270
- Object.assign(output, { [key]: source[key] });
271
- else
272
- output[key] = mergeDeep(target[key], source[key]);
273
- }
274
- else {
275
- Object.assign(output, { [key]: source[key] });
276
- }
277
- });
278
- }
279
- return output;
280
- }
281
- function deepCopy(source) {
282
- if (typeof source !== 'object' || source === null) {
283
- return source; // Return the value if source is not an object
284
- }
285
- // Create an array or object to hold the values
286
- const newObject = Array.isArray(source) ? [] : {};
287
- for (const key in source) {
288
- if (source.hasOwnProperty(key)) {
289
- // Recursively (deep) copy for nested objects, including arrays
290
- newObject[key] = deepCopy(source[key]);
291
150
  }
292
151
  }
293
- return newObject;
294
152
  }
295
153
 
296
154
  class ChartMapOptions extends ChartOptions {
@@ -303,15 +161,14 @@ class ChartMapOptions extends ChartOptions {
303
161
  allowDecimals: false,
304
162
  gridLineWidth: 2,
305
163
  gridLineColor: ChartColors.WHITE_COLOR,
306
- min: 0,
307
164
  tickAmount: 6,
308
165
  labels: {
309
166
  style: {
310
167
  fontSize: '12px',
311
168
  },
312
169
  },
313
- minColor: ChartColors.SOFT_BLUE_COLORS[20],
314
- maxColor: ChartColors.SOFT_BLUE_COLORS[100],
170
+ minColor: ChartColors.HEATMAP_MIN_COLOR,
171
+ maxColor: ChartColors.HEATMAP_MAX_COLOR,
315
172
  },
316
173
  legend: {
317
174
  enabled: true,
@@ -365,20 +222,17 @@ class ChartMapOptions extends ChartOptions {
365
222
  const decimalPoint = parts.find(p => p.type === 'decimal')?.value ?? '.';
366
223
  const thousandsSep = parts.find(p => p.type === 'group')?.value ?? ',';
367
224
  setOptions({ lang: { decimalPoint, thousandsSep } });
368
- return mergeDeep(ChartOptions.DEFAULT_OPTIONS, mergeDeep(defaultMapOptions, options));
225
+ return merge(ChartOptions.DEFAULT_OPTIONS, defaultMapOptions, options);
369
226
  }
370
- static configureMap(series, options, color, labelDateFormat) {
371
- super.configure(series, options, color, labelDateFormat);
372
- const colors = ChartColors.getChartColors(color);
373
- options.colorAxis.minColor = colors[20];
374
- options.colorAxis.maxColor = colors[100];
227
+ static configureMap(series, options, labelDateFormat) {
228
+ options.colors = options.colors ?? [ChartColors.HEATMAP_MIN_COLOR, ChartColors.HEATMAP_MAX_COLOR];
229
+ super.configure(series, options, labelDateFormat);
375
230
  }
376
231
  }
377
232
 
378
233
  class ChartMapComponent {
379
234
  chartRef = viewChild.required('chart');
380
235
  chartOptions = input({}, ...(ngDevMode ? [{ debugName: "chartOptions" }] : []));
381
- color = input(ChartColor.ElectricBlue, ...(ngDevMode ? [{ debugName: "color" }] : []));
382
236
  labelDateFormat = input('%m/%d', ...(ngDevMode ? [{ debugName: "labelDateFormat" }] : []));
383
237
  locale = input('en', ...(ngDevMode ? [{ debugName: "locale" }] : []));
384
238
  series = input.required(...(ngDevMode ? [{ debugName: "series" }] : []));
@@ -387,7 +241,6 @@ class ChartMapComponent {
387
241
  constructor() {
388
242
  effect(() => {
389
243
  const seriesValue = this.series();
390
- this.color();
391
244
  this.chartOptions();
392
245
  this.labelDateFormat();
393
246
  this.locale();
@@ -427,7 +280,7 @@ class ChartMapComponent {
427
280
  }
428
281
  try {
429
282
  const builtOptions = ChartMapOptions.build(this.chartOptions(), this.locale());
430
- ChartMapOptions.configureMap(seriesValue, builtOptions, this.color(), this.labelDateFormat());
283
+ ChartMapOptions.configureMap(seriesValue, builtOptions, this.labelDateFormat());
431
284
  const newChart = mapChart(chartElement, builtOptions);
432
285
  this.chartInstance.set(newChart);
433
286
  }
@@ -436,12 +289,12 @@ class ChartMapComponent {
436
289
  }
437
290
  }
438
291
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ChartMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
439
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.18", type: ChartMapComponent, isStandalone: true, selector: "ap-chart-map", inputs: { chartOptions: { classPropertyName: "chartOptions", publicName: "chartOptions", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, labelDateFormat: { classPropertyName: "labelDateFormat", publicName: "labelDateFormat", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "chartRef", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #chart></div>\n" });
292
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.18", type: ChartMapComponent, isStandalone: true, selector: "ap-chart-map", inputs: { chartOptions: { classPropertyName: "chartOptions", publicName: "chartOptions", isSignal: true, isRequired: false, transformFunction: null }, labelDateFormat: { classPropertyName: "labelDateFormat", publicName: "labelDateFormat", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "chartRef", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #chart></div>\n" });
440
293
  }
441
294
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ChartMapComponent, decorators: [{
442
295
  type: Component,
443
296
  args: [{ selector: 'ap-chart-map', standalone: true, template: "<div #chart></div>\n" }]
444
- }], ctorParameters: () => [], propDecorators: { chartRef: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], chartOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartOptions", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], labelDateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelDateFormat", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }] } });
297
+ }], ctorParameters: () => [], propDecorators: { chartRef: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], chartOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartOptions", required: false }] }], labelDateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelDateFormat", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }] } });
445
298
 
446
299
  /*
447
300
  * Public API Surface of ui-charts-map
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-charts-map.mjs","sources":["../../../libs/ui-charts-map/src/lib/chart-colors.ts","../../../libs/ui-charts-map/src/lib/chart-options.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map-options.model.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map.component.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map.component.html","../../../libs/ui-charts-map/index.ts","../../../libs/ui-charts-map/agorapulse-ui-charts-map.ts"],"sourcesContent":["export enum ChartColor {\n Grey,\n Orange,\n SoftBlue,\n ElectricBlue,\n Purple,\n Green,\n}\n\nexport class ChartColors {\n static readonly SOFT_BLUE_COLORS = {\n '10': '#EFF5FC',\n '20': '#DFEDFA',\n '40': '#C0DBF4',\n '60': '#A0C8EF',\n '85': '#78B1E8',\n '100': '#61A4E4',\n };\n static readonly ELECTRIC_BLUE_COLORS = {\n '10': '#e8f4ff',\n '20': '#d1e8ff',\n '40': '#a2d1ff',\n '60': '#74bbfe',\n '85': '#3a9efe',\n '100': '#178dfe',\n };\n static readonly ORANGE_COLORS = {\n '10': '#FFEFE9',\n '20': '#FFE1D4',\n '40': '#FFC2A8',\n '60': '#FFA47D',\n '85': '#FF7E46',\n '100': '#FF6726',\n };\n static readonly GREEN_COLORS = {\n '10': '#ECF7ED',\n '20': '#DAF1DD',\n '40': '#B5E3BB',\n '60': '#8FD498',\n '85': '#61C26D',\n '100': '#45B854',\n };\n static readonly PURPLE_COLORS = {\n '10': '#EFEDF8',\n '20': '#E0DDF2',\n '40': '#C1BBE6',\n '60': '#A398D9',\n '85': '#7C6DC9',\n '100': '#6554C0',\n };\n static readonly GREY_COLORS = {\n '10': '#EAECEF',\n '20': '#D6DAE0',\n '40': '#AEB5C1',\n '60': '#858FA1',\n '85': '#5D6A82',\n '100': '#344563',\n };\n\n static readonly BLACK_COLOR: string = '#000000';\n static readonly LIMIT_COLOR: string = '#E81313';\n static readonly WHITE_COLOR: string = '#FFFFFF';\n\n static getChartColors(color: ChartColor): { [shade: string]: string } {\n switch (color) {\n case ChartColor.Orange:\n return this.ORANGE_COLORS;\n case ChartColor.SoftBlue:\n return this.SOFT_BLUE_COLORS;\n case ChartColor.ElectricBlue:\n return this.ELECTRIC_BLUE_COLORS;\n case ChartColor.Purple:\n return this.PURPLE_COLORS;\n case ChartColor.Green:\n return this.GREEN_COLORS;\n default:\n return this.GREY_COLORS;\n }\n }\n\n static getColors(seriesCount: number, color: ChartColor): string[] {\n const colors = this.getChartColors(color);\n switch (seriesCount) {\n case 1:\n return [colors[100]];\n case 2:\n return [colors[40], colors[100]];\n case 3:\n return [colors[20], colors[60], colors[100]];\n case 4:\n return [colors[20], colors[40], colors[60], colors[100]];\n case 5:\n return [colors[10], colors[20], colors[40], colors[60], colors[100]];\n default:\n return [colors[20], colors[40], colors[60], colors[100]];\n }\n }\n}\n","import { dateFormat, Options, SeriesOptionsType } from 'highcharts';\nimport { ChartColor, ChartColors } from './chart-colors';\n\nexport class ChartOptions {\n static readonly DEFAULT_DATE_FORMAT: string = '%A, %b %e, %Y';\n static readonly DEFAULT_OPTIONS: Options = {\n /*lang: {\n decimalPoint: (manager && manager.locale !== 'en') ? ',' : '.',\n resetZoom: resetZoomLabel,\n resetZoomTitle: resetZoomHtmlTitle,\n shortMonths: [\n shortJanuary, shortFebruary, shortMarch, shortApril, shortMay, shortJune,\n shortJuly, shortAugust, shortSeptember, shortOctober, shortNovember, shortDecember\n ],\n thousandsSep: (manager && manager.locale !== 'en') ? ' ' : ',',\n weekdays: this.weekDays,\n zoomIn: zoomInHtmlTitle,\n zoomOut: zoomOutHtmlTitle\n },*/\n chart: {\n spacingRight: 20,\n zooming: {\n type: 'xy',\n resetButton: {\n theme: {\n fill: ChartColors.WHITE_COLOR,\n r: 4,\n style: {\n color: ChartColors.GREY_COLORS[100],\n fontSize: '12px',\n },\n states: {\n hover: {\n fill: ChartColors.GREY_COLORS[10],\n },\n },\n },\n },\n },\n panning: {\n enabled: true,\n },\n panKey: 'shift',\n style: {\n fontFamily: \"Averta, 'Open Sans', Helvetica, sans-serif\",\n },\n },\n colorAxis: {\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[60],\n },\n },\n },\n credits: {\n enabled: false,\n },\n legend: {\n borderWidth: 0,\n itemStyle: {\n color: ChartColors.GREY_COLORS[60],\n fontSize: '14px',\n fontWeight: 'normal',\n },\n itemHoverStyle: {\n color: ChartColors.GREY_COLORS[100],\n fontWeight: 'bold',\n },\n },\n plotOptions: {\n series: {\n states: {\n hover: {\n brightness: 0,\n },\n },\n connectNulls: true,\n lineWidth: 4,\n },\n },\n navigation: {\n buttonOptions: {\n y: 0,\n },\n },\n title: {\n text: undefined,\n },\n tooltip: {\n backgroundColor: ChartColors.WHITE_COLOR,\n borderRadius: 4,\n borderWidth: 0,\n dateTimeLabelFormats: {\n day: ChartOptions.DEFAULT_DATE_FORMAT,\n week: ChartOptions.DEFAULT_DATE_FORMAT,\n },\n shadow: {\n color: ChartColors.BLACK_COLOR,\n offsetX: 0,\n offsetY: 2,\n opacity: 0.02,\n width: 6,\n },\n split: false,\n shared: true,\n useHTML: true,\n headerFormat:\n `<div style=\"border-bottom: 1px solid ${ChartColors.GREY_COLORS[10]}; padding: 0 8px 7px\">` +\n `<span style=\"font-size: 12px; color: ${ChartColors.GREY_COLORS[60]}\">{point.key}</span></div>`,\n pointFormat:\n `<div style=\"font-size: 14px; color: ${ChartColors.GREY_COLORS[100]}; margin: 6px 8px 0 8px;\">` +\n '<span style=\"color:{point.color}\">\\u25CF</span> {series.name}: <b>{point.y}</b></div>',\n },\n xAxis: {\n gridLineColor: ChartColors.GREY_COLORS[10],\n lineColor: ChartColors.GREY_COLORS[10],\n tickColor: ChartColors.GREY_COLORS[10],\n gridLineWidth: 1,\n title: {\n text: undefined,\n },\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[40],\n fontSize: '12px',\n },\n },\n },\n yAxis: {\n allowDecimals: false,\n gridLineColor: ChartColors.GREY_COLORS[10],\n lineColor: ChartColors.GREY_COLORS[10],\n gridLineWidth: 1,\n title: {\n text: undefined,\n },\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[40],\n fontSize: '12px',\n },\n },\n },\n };\n\n static configure(series: SeriesOptionsType[], options: Options, color: ChartColor, labelDateFormat?: string) {\n // Configure axis\n options.xAxis = mergeDeep(\n {\n labels: {\n formatter: function (): string {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return dateFormat(labelDateFormat ? labelDateFormat : '%m/%d', this.value);\n },\n },\n //minTickInterval: 24 * 60 * 60 * 1000 // One day\n },\n options.xAxis\n );\n // Configure series\n if (series && series.length) {\n options.series = series;\n options.colors = ChartColors.getColors(series.length, color);\n }\n }\n}\n\nexport function isObject(item: any) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n\nexport function mergeDeep(target: any, source: any) {\n const output = deepCopy(target);\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach(key => {\n if (isObject(source[key])) {\n if (!(key in target)) Object.assign(output, { [key]: source[key] });\n else output[key] = mergeDeep(target[key], source[key]);\n } else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n}\n\nfunction deepCopy(source: any) {\n if (typeof source !== 'object' || source === null) {\n return source; // Return the value if source is not an object\n }\n // Create an array or object to hold the values\n const newObject = Array.isArray(source) ? [] : {};\n for (const key in source) {\n if (source.hasOwnProperty(key)) {\n // Recursively (deep) copy for nested objects, including arrays\n (newObject as any)[key] = deepCopy(source[key]);\n }\n }\n return newObject;\n}\n","import geojson from '@highcharts/map-collection/custom/world-highres2.geo.json';\nimport { ColorAxisOptions, numberFormat, Options, SeriesOptionsType } from 'highcharts';\nimport { setOptions as setMapOptions } from 'highcharts/highmaps';\n\nimport { ChartColor, ChartColors } from '../chart-colors';\nimport { ChartOptions, mergeDeep } from '../chart-options';\n\nexport class ChartMapOptions extends ChartOptions {\n static build(options: Highcharts.Options, locale: string): Highcharts.Options {\n const defaultMapOptions: Highcharts.Options = {\n chart: {\n map: geojson,\n },\n colorAxis: {\n allowDecimals: false,\n gridLineWidth: 2,\n gridLineColor: ChartColors.WHITE_COLOR,\n min: 0,\n tickAmount: 6,\n labels: {\n style: {\n fontSize: '12px',\n },\n },\n minColor: ChartColors.SOFT_BLUE_COLORS[20],\n maxColor: ChartColors.SOFT_BLUE_COLORS[100],\n },\n legend: {\n enabled: true,\n align: 'left',\n floating: true,\n },\n mapNavigation: {\n enabled: true,\n enableMouseWheelZoom: false,\n buttonOptions: {\n verticalAlign: 'middle',\n style: {\n color: ChartColors.GREY_COLORS[100],\n fontSize: '16px',\n fontWeight: 'normal',\n },\n theme: {\n fill: ChartColors.WHITE_COLOR,\n r: 4,\n states: {\n hover: {\n fill: ChartColors.GREY_COLORS[10],\n },\n },\n },\n },\n },\n plotOptions: {\n map: {\n borderColor: ChartColors.WHITE_COLOR,\n borderWidth: 0.5,\n nullColor: '#e2e2ea',\n },\n },\n tooltip: {\n headerFormat: '',\n pointFormatter: function () {\n const value = numberFormat(this.value ?? 0, -1);\n return (\n '<div style=\"border-bottom: 1px solid #eaecef; padding: 0 8px 7px\">' +\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n `<span style=\"font-size: 12px; color: #858fa1\">${(this as any).translatedName}</span></div>` +\n '<div style=\"font-size: 14px; color: #344563; margin: 6px 8px 0 8px;\">' +\n `<span style=\"color:${this.color}\">\\u25CF</span> ${this.series.name}: <b>${value}</b></div>`\n );\n },\n },\n xAxis: {\n crosshair: true,\n },\n };\n const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\n const decimalPoint = parts.find(p => p.type === 'decimal')?.value ?? '.';\n const thousandsSep = parts.find(p => p.type === 'group')?.value ?? ',';\n setMapOptions({ lang: { decimalPoint, thousandsSep } });\n return mergeDeep(ChartOptions.DEFAULT_OPTIONS, mergeDeep(defaultMapOptions, options));\n }\n\n static configureMap(series: SeriesOptionsType[], options: Options, color: ChartColor, labelDateFormat?: string) {\n super.configure(series, options, color, labelDateFormat);\n const colors = ChartColors.getChartColors(color);\n (options.colorAxis as ColorAxisOptions).minColor = colors[20];\n (options.colorAxis as ColorAxisOptions).maxColor = colors[100];\n }\n}\n","import { Component, ElementRef, effect, input, signal, untracked, viewChild } from '@angular/core';\nimport { Options, SeriesMapOptions, mapChart } from 'highcharts/highmaps';\nimport { ChartColor } from '../chart-colors';\nimport { ChartMapOptions } from './chart-map-options.model';\n\n@Component({\n selector: 'ap-chart-map',\n templateUrl: './chart-map.component.html',\n standalone: true,\n})\nexport class ChartMapComponent {\n protected readonly chartRef = viewChild.required<ElementRef<HTMLDivElement>>('chart');\n\n readonly chartOptions = input<Options>({});\n readonly color = input<ChartColor>(ChartColor.ElectricBlue);\n readonly labelDateFormat = input<string>('%m/%d');\n readonly locale = input<string>('en');\n readonly series = input.required<SeriesMapOptions[]>();\n\n private readonly lastWidth = signal<number>(0);\n private readonly chartInstance = signal<Highcharts.Chart | null>(null);\n\n constructor() {\n effect(() => {\n const seriesValue = this.series();\n this.color();\n this.chartOptions();\n this.labelDateFormat();\n this.locale();\n\n if (seriesValue.length > 0) {\n untracked(() => {\n this.initChart();\n });\n }\n });\n\n effect(() => {\n const chartElement = this.chartRef()?.nativeElement;\n if (!chartElement) return;\n\n const currentWidth = chartElement.clientWidth;\n if (currentWidth > 0 && currentWidth !== this.lastWidth()) {\n untracked(() => {\n this.lastWidth.set(currentWidth);\n });\n const seriesValue = this.series();\n if (seriesValue.length > 0) {\n untracked(() => {\n this.initChart();\n });\n }\n }\n });\n }\n\n private initChart(): void {\n const seriesValue = this.series();\n const chartElement = this.chartRef()?.nativeElement;\n\n if (!seriesValue.length || !chartElement) {\n return;\n }\n\n const currentChart = this.chartInstance();\n if (currentChart) {\n currentChart.destroy();\n }\n\n try {\n const builtOptions = ChartMapOptions.build(this.chartOptions(), this.locale());\n ChartMapOptions.configureMap(seriesValue, builtOptions, this.color(), this.labelDateFormat());\n\n const newChart = mapChart(chartElement, builtOptions);\n this.chartInstance.set(newChart);\n } catch (error) {\n console.error('Failed to initialize chart:', error);\n }\n }\n}\n","<div #chart></div>\n","/*\n * Public API Surface of ui-charts-map\n */\n\nexport { ChartMapComponent } from './src/lib/chart-map/chart-map.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["setMapOptions"],"mappings":";;;;;;AAAA,IAAY,UAOX;AAPD,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,UAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACJ,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,UAAA,CAAA,UAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACR,IAAA,UAAA,CAAA,UAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY;AACZ,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,UAAA,CAAA,UAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK;AACT,CAAC,EAPW,UAAU,KAAV,UA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AAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEXxF;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-charts-map.mjs","sources":["../../../libs/ui-charts-map/src/lib/chart-colors.ts","../../../libs/ui-charts-map/src/lib/chart-options.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map-options.model.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map.component.ts","../../../libs/ui-charts-map/src/lib/chart-map/chart-map.component.html","../../../libs/ui-charts-map/index.ts","../../../libs/ui-charts-map/agorapulse-ui-charts-map.ts"],"sourcesContent":["export class ChartColors {\n static readonly GREY_COLORS = {\n '10': '#EAECEF',\n '40': '#AEB5C1',\n '60': '#858FA1',\n '100': '#344563',\n };\n\n static readonly HEATMAP_MIN_COLOR: string = 'rgba(74, 106, 204, 0.2)';\n static readonly HEATMAP_MAX_COLOR: string = 'rgba(74, 106, 204, 1)';\n\n static readonly BLACK_COLOR: string = '#000000';\n static readonly WHITE_COLOR: string = '#FFFFFF';\n}\n","import { merge, Options, SeriesOptionsType } from 'highcharts';\nimport { ChartColors } from './chart-colors';\n\nexport class ChartOptions {\n static readonly DEFAULT_DATE_FORMAT: string = '%A, %b %e, %Y';\n static readonly DEFAULT_OPTIONS: Options = {\n chart: {\n spacingRight: 20,\n zooming: {\n type: 'xy',\n resetButton: {\n theme: {\n fill: ChartColors.WHITE_COLOR,\n r: 4,\n style: {\n color: ChartColors.GREY_COLORS[100],\n fontSize: '12px',\n },\n states: {\n hover: {\n fill: ChartColors.GREY_COLORS[10],\n },\n },\n },\n },\n },\n panning: {\n enabled: true,\n },\n panKey: 'shift',\n style: {\n fontFamily: \"Averta, 'Open Sans', Helvetica, sans-serif\",\n },\n },\n colorAxis: {\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[60],\n },\n },\n },\n credits: {\n enabled: false,\n },\n legend: {\n borderWidth: 0,\n itemStyle: {\n color: ChartColors.GREY_COLORS[60],\n fontSize: '14px',\n fontWeight: 'normal',\n },\n itemHoverStyle: {\n color: ChartColors.GREY_COLORS[100],\n fontWeight: 'bold',\n },\n },\n plotOptions: {\n series: {\n states: {\n hover: {\n brightness: 0,\n },\n },\n connectNulls: true,\n lineWidth: 4,\n },\n },\n navigation: {\n buttonOptions: {\n y: 0,\n },\n },\n title: {\n text: undefined,\n },\n tooltip: {\n backgroundColor: ChartColors.WHITE_COLOR,\n borderRadius: 4,\n borderWidth: 0,\n dateTimeLabelFormats: {\n day: ChartOptions.DEFAULT_DATE_FORMAT,\n week: ChartOptions.DEFAULT_DATE_FORMAT,\n },\n shadow: {\n color: ChartColors.BLACK_COLOR,\n offsetX: 0,\n offsetY: 2,\n opacity: 0.02,\n width: 6,\n },\n split: false,\n shared: true,\n useHTML: true,\n headerFormat:\n `<div style=\"border-bottom: 1px solid ${ChartColors.GREY_COLORS[10]}; padding: 0 8px 7px\">` +\n `<span style=\"font-size: 12px; color: ${ChartColors.GREY_COLORS[60]}\">{point.key}</span></div>`,\n pointFormat:\n `<div style=\"font-size: 14px; color: ${ChartColors.GREY_COLORS[100]}; margin: 6px 8px 0 8px;\">` +\n '<span style=\"color:{point.color}\">●</span> {series.name}: <b>{point.y}</b></div>',\n },\n xAxis: {\n gridLineColor: ChartColors.GREY_COLORS[10],\n lineColor: ChartColors.GREY_COLORS[10],\n tickColor: ChartColors.GREY_COLORS[10],\n gridLineWidth: 1,\n title: {\n text: undefined,\n },\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[40],\n fontSize: '12px',\n },\n },\n },\n yAxis: {\n allowDecimals: false,\n gridLineColor: ChartColors.GREY_COLORS[10],\n lineColor: ChartColors.GREY_COLORS[10],\n gridLineWidth: 1,\n title: {\n text: undefined,\n },\n labels: {\n style: {\n color: ChartColors.GREY_COLORS[40],\n fontSize: '12px',\n },\n },\n },\n };\n\n static configure(series: SeriesOptionsType[], options: Options, labelDateFormat?: string) {\n options.xAxis = merge({ labels: { format: `{value:${labelDateFormat ?? '%m/%d'}}` } }, options.xAxis);\n if (series?.length) {\n options.series = series;\n }\n }\n}\n","import geojson from '@highcharts/map-collection/custom/world-highres2.geo.json';\nimport { merge, numberFormat, Options, SeriesOptionsType } from 'highcharts';\nimport { setOptions as setMapOptions } from 'highcharts/highmaps';\n\nimport { ChartColors } from '../chart-colors';\nimport { ChartOptions } from '../chart-options';\n\nexport class ChartMapOptions extends ChartOptions {\n static build(options: Highcharts.Options, locale: string): Highcharts.Options {\n const defaultMapOptions: Highcharts.Options = {\n chart: {\n map: geojson,\n },\n colorAxis: {\n allowDecimals: false,\n gridLineWidth: 2,\n gridLineColor: ChartColors.WHITE_COLOR,\n tickAmount: 6,\n labels: {\n style: {\n fontSize: '12px',\n },\n },\n minColor: ChartColors.HEATMAP_MIN_COLOR,\n maxColor: ChartColors.HEATMAP_MAX_COLOR,\n },\n legend: {\n enabled: true,\n align: 'left',\n floating: true,\n },\n mapNavigation: {\n enabled: true,\n enableMouseWheelZoom: false,\n buttonOptions: {\n verticalAlign: 'middle',\n style: {\n color: ChartColors.GREY_COLORS[100],\n fontSize: '16px',\n fontWeight: 'normal',\n },\n theme: {\n fill: ChartColors.WHITE_COLOR,\n r: 4,\n states: {\n hover: {\n fill: ChartColors.GREY_COLORS[10],\n },\n },\n },\n },\n },\n plotOptions: {\n map: {\n borderColor: ChartColors.WHITE_COLOR,\n borderWidth: 0.5,\n nullColor: '#e2e2ea',\n },\n },\n tooltip: {\n headerFormat: '',\n pointFormatter: function () {\n const value = numberFormat(this.value ?? 0, -1);\n return (\n '<div style=\"border-bottom: 1px solid #eaecef; padding: 0 8px 7px\">' +\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n `<span style=\"font-size: 12px; color: #858fa1\">${(this as any).translatedName}</span></div>` +\n '<div style=\"font-size: 14px; color: #344563; margin: 6px 8px 0 8px;\">' +\n `<span style=\"color:${this.color}\">\\u25CF</span> ${this.series.name}: <b>${value}</b></div>`\n );\n },\n },\n xAxis: {\n crosshair: true,\n },\n };\n const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);\n const decimalPoint = parts.find(p => p.type === 'decimal')?.value ?? '.';\n const thousandsSep = parts.find(p => p.type === 'group')?.value ?? ',';\n setMapOptions({ lang: { decimalPoint, thousandsSep } });\n return merge(ChartOptions.DEFAULT_OPTIONS, defaultMapOptions, options);\n }\n\n static configureMap(series: SeriesOptionsType[], options: Options, labelDateFormat?: string) {\n options.colors = options.colors ?? [ChartColors.HEATMAP_MIN_COLOR, ChartColors.HEATMAP_MAX_COLOR];\n super.configure(series, options, labelDateFormat);\n }\n}\n","import { Component, ElementRef, effect, input, signal, untracked, viewChild } from '@angular/core';\nimport { Options, SeriesMapOptions, mapChart } from 'highcharts/highmaps';\nimport { ChartMapOptions } from './chart-map-options.model';\n\n@Component({\n selector: 'ap-chart-map',\n templateUrl: './chart-map.component.html',\n standalone: true,\n})\nexport class ChartMapComponent {\n protected readonly chartRef = viewChild.required<ElementRef<HTMLDivElement>>('chart');\n\n readonly chartOptions = input<Options>({});\n readonly labelDateFormat = input<string>('%m/%d');\n readonly locale = input<string>('en');\n readonly series = input.required<SeriesMapOptions[]>();\n\n private readonly lastWidth = signal<number>(0);\n private readonly chartInstance = signal<Highcharts.Chart | null>(null);\n\n constructor() {\n effect(() => {\n const seriesValue = this.series();\n this.chartOptions();\n this.labelDateFormat();\n this.locale();\n\n if (seriesValue.length > 0) {\n untracked(() => {\n this.initChart();\n });\n }\n });\n\n effect(() => {\n const chartElement = this.chartRef()?.nativeElement;\n if (!chartElement) return;\n\n const currentWidth = chartElement.clientWidth;\n if (currentWidth > 0 && currentWidth !== this.lastWidth()) {\n untracked(() => {\n this.lastWidth.set(currentWidth);\n });\n const seriesValue = this.series();\n if (seriesValue.length > 0) {\n untracked(() => {\n this.initChart();\n });\n }\n }\n });\n }\n\n private initChart(): void {\n const seriesValue = this.series();\n const chartElement = this.chartRef()?.nativeElement;\n\n if (!seriesValue.length || !chartElement) {\n return;\n }\n\n const currentChart = this.chartInstance();\n if (currentChart) {\n currentChart.destroy();\n }\n\n try {\n const builtOptions = ChartMapOptions.build(this.chartOptions(), this.locale());\n ChartMapOptions.configureMap(seriesValue, builtOptions, this.labelDateFormat());\n\n const newChart = mapChart(chartElement, builtOptions);\n this.chartInstance.set(newChart);\n } catch (error) {\n console.error('Failed to initialize chart:', error);\n }\n }\n}\n","<div #chart></div>\n","/*\n * Public API Surface of ui-charts-map\n */\n\nexport { ChartMapComponent } from './src/lib/chart-map/chart-map.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["setMapOptions"],"mappings":";;;;;;MAAa,WAAW,CAAA;IACpB,OAAgB,WAAW,GAAG;AAC1B,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,KAAK,EAAE,SAAS;KACnB;AAED,IAAA,OAAgB,iBAAiB,GAAW,yBAAyB;AACrE,IAAA,OAAgB,iBAAiB,GAAW,uBAAuB;AAEnE,IAAA,OAAgB,WAAW,GAAW,SAAS;AAC/C,IAAA,OAAgB,WAAW,GAAW,SAAS;;;MCTtC,YAAY,CAAA;AACrB,IAAA,OAAgB,mBAAmB,GAAW,eAAe;IAC7D,OAAgB,eAAe,GAAY;AACvC,QAAA,KAAK,EAAE;AACH,YAAA,YAAY,EAAE,EAAE;AAChB,YAAA,OAAO,EAAE;AACL,gBAAA,IAAI,EAAE,IAAI;AACV,gBAAA,WAAW,EAAE;AACT,oBAAA,KAAK,EAAE;wBACH,IAAI,EAAE,WAAW,CAAC,WAAW;AAC7B,wBAAA,CAAC,EAAE,CAAC;AACJ,wBAAA,KAAK,EAAE;AACH,4BAAA,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC;AACnC,4BAAA,QAAQ,EAAE,MAAM;AACnB,yBAAA;AACD,wBAAA,MAAM,EAAE;AACJ,4BAAA,KAAK,EAAE;AACH,gCAAA,IAAI,EAAE,WAAW,CAAC,WAAW,CAA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A,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEVxF;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -2,19 +2,9 @@ import * as _angular_core from '@angular/core';
2
2
  import { ElementRef } from '@angular/core';
3
3
  import { Options, SeriesMapOptions } from 'highcharts/highmaps';
4
4
 
5
- declare enum ChartColor {
6
- Grey = 0,
7
- Orange = 1,
8
- SoftBlue = 2,
9
- ElectricBlue = 3,
10
- Purple = 4,
11
- Green = 5
12
- }
13
-
14
5
  declare class ChartMapComponent {
15
6
  protected readonly chartRef: _angular_core.Signal<ElementRef<HTMLDivElement>>;
16
7
  readonly chartOptions: _angular_core.InputSignal<Options>;
17
- readonly color: _angular_core.InputSignal<ChartColor>;
18
8
  readonly labelDateFormat: _angular_core.InputSignal<string>;
19
9
  readonly locale: _angular_core.InputSignal<string>;
20
10
  readonly series: _angular_core.InputSignal<SeriesMapOptions[]>;
@@ -23,7 +13,7 @@ declare class ChartMapComponent {
23
13
  constructor();
24
14
  private initChart;
25
15
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartMapComponent, never>;
26
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartMapComponent, "ap-chart-map", never, { "chartOptions": { "alias": "chartOptions"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "labelDateFormat": { "alias": "labelDateFormat"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartMapComponent, "ap-chart-map", never, { "chartOptions": { "alias": "chartOptions"; "required": false; "isSignal": true; }; "labelDateFormat": { "alias": "labelDateFormat"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
27
17
  }
28
18
 
29
19
  export { ChartMapComponent };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-charts-map",
3
3
  "description": "Agorapulse UI Charts Map Components Library",
4
- "version": "20.1.7",
4
+ "version": "20.2.0",
5
5
  "author": "Benoit Hediard",
6
6
  "repository": {
7
7
  "type": "git",
Binary file