@arcgis/charts-components 5.1.0-next.5 → 5.1.0-next.7
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/dist/cdn/AND6TXZC.js +2 -0
- package/dist/cdn/{NFGXU34G.js → KGYOF4HQ.js} +1 -1
- package/dist/cdn/ZD2OFLRT.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/bar-chart-model.js +1 -0
- package/dist/chunks/box-plot-model.js +5 -0
- package/dist/chunks/chart-ui-utils.js +4 -3
- package/dist/chunks/combo-bar-line-chart-model.js +3 -0
- package/dist/chunks/gauge-model.js +1 -0
- package/dist/chunks/heat-chart-model.js +1 -0
- package/dist/chunks/histogram-model.js +1 -0
- package/dist/chunks/line-chart-model.js +2 -0
- package/dist/chunks/model-setter.js +3 -0
- package/dist/chunks/pie-chart-model.js +1 -0
- package/dist/chunks/radar-chart-model.js +2 -0
- package/dist/chunks/scatterplot-model.js +1 -0
- package/dist/chunks/serial-chart-model.js +5 -0
- package/dist/components/arcgis-charts-config-create-flow/customElement.js +106 -106
- package/dist/components/arcgis-charts-config-format/customElement.js +20 -20
- package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +55 -55
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/model/bar-chart-model/bar-chart-model.d.ts +1 -10
- package/dist/model/box-plot-model/box-plot-model.d.ts +1 -34
- package/dist/model/chart-model/chart-model-base.d.ts +0 -46
- package/dist/model/combo-bar-line-chart-model/combo-bar-line-chart-model.d.ts +1 -14
- package/dist/model/gauge-model/gauge-model.d.ts +2 -11
- package/dist/model/heat-chart-model/heat-chart-model.d.ts +2 -10
- package/dist/model/histogram-model/histogram-model.d.ts +2 -11
- package/dist/model/line-chart-model/line-chart-model.d.ts +1 -14
- package/dist/model/mixins/model-with-line-marker-styling.d.ts +0 -4
- package/dist/model/mixins/model-with-multi-axes.d.ts +0 -3
- package/dist/model/pie-chart-model/pie-chart-model.d.ts +2 -17
- package/dist/model/radar-chart-model/radar-chart-model.d.ts +1 -14
- package/dist/model/scatterplot-model/scatterplot-model.d.ts +2 -11
- package/dist/model/serial-chart-model/serial-chart-model.d.ts +0 -42
- package/dist/utils/ui/chart-ui-utils.d.ts +3 -2
- package/package.json +3 -3
- package/dist/cdn/EXVJCW7V.js +0 -2
- package/dist/cdn/RUYVKHFW.js +0 -2
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ModelTypes, SerialChartDataSortingKinds, HeatChartDataSortingKinds } from "../interfaces/common.js";
|
|
3
3
|
import type { SerialChartModel } from "../serial-chart-model/serial-chart-model.js";
|
|
4
|
-
import type { WebChartCalendarDatePartsBinning, WebChartHeatChartEmptyCell, WebChartHeatChartGradient, WebChartNullCategory
|
|
4
|
+
import type { WebChartCalendarDatePartsBinning, WebChartHeatChartEmptyCell, WebChartHeatChartGradient, WebChartNullCategory } from "../../spec/web-chart.js";
|
|
5
5
|
import type { WebChartStatisticType, WebChartClassBreakTypes, WebChartHeatChartHeatRulesTypes, WebChartHeatChartViewTypes, WebChartLegendPositions, WebChartNullPolicyTypes, WebChartStackedKinds } from "../../spec/chart-object-literals.js";
|
|
6
6
|
import type { ISimpleFillSymbol } from "../../spec/rest-js-types.js";
|
|
7
7
|
import type { ChartConfig } from "../../utils/types/index.js";
|
|
8
8
|
|
|
9
9
|
export class HeatChartModel extends SerialChartModel {
|
|
10
|
-
/** Current chart type. */
|
|
11
|
-
protected _chartType: "heatSeries";
|
|
12
|
-
/** Current configuration used for the Heat chart. */
|
|
13
|
-
protected _config: ChartConfig<typeof ModelTypes.HeatChart, WebHeatChart>;
|
|
14
10
|
/** The aggregation type for the heat chart. Must be one of the values allowed by WebChartStatisticType. */
|
|
15
11
|
accessor aggregationType: WebChartStatisticType;
|
|
16
12
|
/** Bin temporal data for heat chart (not supported) */
|
|
@@ -66,8 +62,6 @@ export class HeatChartModel extends SerialChartModel {
|
|
|
66
62
|
accessor hideEmptyRowsAndColumns: boolean | undefined;
|
|
67
63
|
/** The heat charts include leap day flag that is only honored when day of month is used */
|
|
68
64
|
accessor includeLeapDay: boolean | undefined;
|
|
69
|
-
/** Grouping of layer-related properties to be passed to external function more compactly. */
|
|
70
|
-
protected layerInfo: LayerInfo;
|
|
71
65
|
/** The heat charts legend's position */
|
|
72
66
|
accessor legendPosition: WebChartLegendPositions;
|
|
73
67
|
/**
|
|
@@ -108,8 +102,6 @@ export class HeatChartModel extends SerialChartModel {
|
|
|
108
102
|
accessor yTemporalBinning: WebChartCalendarDatePartsBinning | undefined;
|
|
109
103
|
/** Generate the proper chart title given the current config. */
|
|
110
104
|
generateChartTitle(): string;
|
|
111
|
-
/** Generates the default config for the heat chart */
|
|
112
|
-
protected generateDefaultConfig(): Omit<ChartConfig<"heatChart", WebHeatChart>, "iLayer">;
|
|
113
105
|
/** Generate the proper y-axis title given the current config. */
|
|
114
106
|
generateYAxisTitle(): string;
|
|
115
107
|
/** Gets the sort order for the bar chart. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ModelTypes } from "../interfaces/common.js";
|
|
2
2
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
3
3
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
4
4
|
import type { WithColorMatch } from "../properties/color-match.js";
|
|
@@ -13,28 +13,21 @@ import type { WithGenerateXAxisTitle } from "../properties/axes/x-axis/generate-
|
|
|
13
13
|
import type { WithAxisLabelsSymbol } from "../properties/axes/axis-labels-symbol.js";
|
|
14
14
|
import type { WithAxisLinesSymbol } from "../properties/axes/axis-lines-symbol.js";
|
|
15
15
|
import type { ChartConfig } from "../../utils/types/index.js";
|
|
16
|
-
import type { HistogramOverlays
|
|
16
|
+
import type { HistogramOverlays } from "../../spec/web-chart.js";
|
|
17
17
|
import type { WebChartDataTransformations } from "../../spec/chart-object-literals.js";
|
|
18
18
|
import type { ISimpleFillSymbol, ISimpleLineSymbol } from "../../spec/rest-js-types.js";
|
|
19
|
-
import type { XYChartTypes } from "../../utils/misc/index.js";
|
|
20
19
|
import type { ModelWithMultiAxes } from "../mixins/model-with-multi-axes.js";
|
|
21
20
|
import type { ModelWithLegend } from "../mixins/model-with-legend.js";
|
|
22
21
|
import type { ModelWithTooltips } from "../mixins/model-with-tooltips.js";
|
|
23
22
|
import type { ModelWithYGuides } from "../mixins/model-with-y-guides.js";
|
|
24
23
|
|
|
25
24
|
export class HistogramModel extends HistogramModelSuperclass {
|
|
26
|
-
/** Chart type. */
|
|
27
|
-
protected _chartType: XYChartTypes;
|
|
28
|
-
/** Current configuration used for the histogram. */
|
|
29
|
-
protected _config: ChartConfig<typeof ModelTypes.Histogram, WebChart>;
|
|
30
25
|
/** Number of bins used to create the histogram. */
|
|
31
26
|
accessor binCount: number;
|
|
32
27
|
/** Fill symbol used for the bins in the histogram. */
|
|
33
28
|
accessor binSymbol: ISimpleFillSymbol;
|
|
34
29
|
/** Data transformation type used in the histogram. */
|
|
35
30
|
accessor dataTransformationType: WebChartDataTransformations;
|
|
36
|
-
/** Grouping of layer-related properties to be passed to external function more compactly. */
|
|
37
|
-
protected layerInfo: LayerInfo;
|
|
38
31
|
/** Line symbol used for the mean overlay in the histogram. */
|
|
39
32
|
accessor meanSymbol: ISimpleLineSymbol;
|
|
40
33
|
/** Line symbol used for the median overlay in the histogram. */
|
|
@@ -57,8 +50,6 @@ export class HistogramModel extends HistogramModelSuperclass {
|
|
|
57
50
|
accessor standardDevSymbol: ISimpleLineSymbol;
|
|
58
51
|
/** Generate the proper chart title given the current config. */
|
|
59
52
|
generateChartTitle(): string;
|
|
60
|
-
/** A function that generates the default config object when creating a new chart. */
|
|
61
|
-
protected generateDefaultConfig(): Omit<ChartConfig<"histogram", WebChart>, "iLayer">;
|
|
62
53
|
/**
|
|
63
54
|
* Completes the async setup process for the chart model. Must be called before using the model.
|
|
64
55
|
*
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ModelTypes } from "../interfaces/common.js";
|
|
3
3
|
import type { SerialChartModel } from "../serial-chart-model/serial-chart-model.js";
|
|
4
4
|
import type { WithNegativeValuesStackedToBaseline } from "../properties/series/negative-values-stacked-to-baseline.js";
|
|
5
5
|
import type { ChartConfig } from "../../utils/types/index.js";
|
|
6
|
-
import type { WebChart, WebChartLineChartSeries } from "../../spec/web-chart.js";
|
|
7
6
|
import type { ModelWithLineMarkerStyling } from "../mixins/model-with-line-marker-styling.js";
|
|
8
7
|
|
|
9
8
|
export class LineChartModel extends LineChartModelSuperclass {
|
|
10
|
-
/** Chart type. */
|
|
11
|
-
protected _chartType: "lineSeries";
|
|
12
|
-
/** Current configuration used for the line chart. */
|
|
13
|
-
protected _config: ChartConfig<typeof ModelTypes.LineChart, WebChart>;
|
|
14
|
-
/** Default series for the line chart. Used in resetting the series styling. */
|
|
15
|
-
protected defaultSeries?: WebChartLineChartSeries;
|
|
16
|
-
/** Grouping of layer-related properties to be passed to external function more compactly. */
|
|
17
|
-
protected layerInfo: LayerInfo;
|
|
18
|
-
/** A function that generates the default config object when creating a new chart. */
|
|
19
|
-
protected generateDefaultConfig(): Omit<ChartConfig<"lineChart", WebChart>, "iLayer">;
|
|
20
|
-
/** Initializes the default series for the line chart. Used in resetting the series styling. */
|
|
21
|
-
protected initDefaultSeries(): void;
|
|
22
9
|
/** Returns whether the series styling is able to be reset. */
|
|
23
10
|
resetAvailable(): boolean;
|
|
24
11
|
/** Resets the series styling to the default styling. */
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
2
|
-
import type { ModelTypes } from "../interfaces/common.js";
|
|
3
|
-
import type { ChartConfig } from "../../utils/types/index.js";
|
|
4
2
|
import type { RESTSimpleLineSymbolStyle, RESTSimpleMarkerSymbolStyle } from "../../spec/rest-js-object-literals.js";
|
|
5
3
|
import type { Color } from "../../spec/rest-js-types.js";
|
|
6
4
|
|
|
7
5
|
export abstract class ModelWithLineMarkerStyling extends ChartModel {
|
|
8
|
-
/** Current configuration used for the chart. */
|
|
9
|
-
protected _config: ChartConfig<typeof ModelTypes.LineChart> | ChartConfig<typeof ModelTypes.RadarChart>;
|
|
10
6
|
/**
|
|
11
7
|
* Specify the color of the filled area for line chart.
|
|
12
8
|
* **Note:** `areaColor` will be applied only if `showArea` is true, and is defaulted to the line color if not provided.
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
2
|
-
import type { XYChartTypes } from "../../utils/misc/index.js";
|
|
3
2
|
import type { CategoryFormatOptions, DateTimeFormatOptions, NumberFormatOptions, WebChartAxisScrollBar, WebChartCursorCrosshair, WebChartTextSymbol } from "../../spec/web-chart.js";
|
|
4
3
|
import type { WebChartLabelBehavior } from "../../spec/chart-object-literals.js";
|
|
5
4
|
import type { ISimpleLineSymbol } from "../../spec/rest-js-types.js";
|
|
6
5
|
|
|
7
6
|
export abstract class ModelWithMultiAxes extends ChartModel {
|
|
8
|
-
/** Chart type. */
|
|
9
|
-
protected _chartType: XYChartTypes;
|
|
10
7
|
/**
|
|
11
8
|
* Cursor crosshair from the chart config.
|
|
12
9
|
*
|
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
2
2
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ModelTypes, PieChartDataSortingKinds, PieChartSlicesDisplay, PieChartDataModes } from "../interfaces/common.js";
|
|
4
4
|
import type { WithColorMatch } from "../properties/color-match.js";
|
|
5
5
|
import type { WithDataLabelsVisibility } from "../properties/data-labels/data-labels-visibility.js";
|
|
6
6
|
import type { WithDataLabelsSymbol } from "../properties/data-labels/data-labels-symbol.js";
|
|
7
7
|
import type { PieChartLegendModel } from "./pie-chart-legend-model.js";
|
|
8
8
|
import type { ChartConfig } from "../../utils/types/index.js";
|
|
9
|
-
import type {
|
|
9
|
+
import type { WebChartPieChartGroupSlice, WebChartPieChartSlice } from "../../spec/web-chart.js";
|
|
10
10
|
import type { WebChartStatisticType } from "../../spec/chart-object-literals.js";
|
|
11
|
-
import type { ChartTypes } from "../../utils/misc/index.js";
|
|
12
11
|
import type { Color, ISimpleLineSymbol } from "../../spec/rest-js-types.js";
|
|
13
12
|
import type { ModelWithTooltips } from "../mixins/model-with-tooltips.js";
|
|
14
13
|
|
|
15
14
|
export class PieChartModel extends PieChartModelSuperclass {
|
|
16
|
-
/** Chart type. */
|
|
17
|
-
protected _chartType: ChartTypes;
|
|
18
|
-
/** Current configuration used for the pie chart */
|
|
19
|
-
protected _config: ChartConfig<typeof ModelTypes.PieChart, WebChart>;
|
|
20
|
-
/**
|
|
21
|
-
* Protected property to hold the pie chart data mode
|
|
22
|
-
* - `category`: the chart will use values from the category field to determine each slice.
|
|
23
|
-
* - `fields`: the chart will use aggregated values from the numeric fields to determine each slice.
|
|
24
|
-
*/
|
|
25
|
-
protected _mode: PieChartDataModes;
|
|
26
15
|
/** Aggregation type for the pie chart. */
|
|
27
16
|
accessor aggregationType: WebChartStatisticType;
|
|
28
17
|
/** Align data labels setting for the pie chart. */
|
|
@@ -80,8 +69,6 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
80
69
|
accessor innerRadiusSize: number;
|
|
81
70
|
/** Character limit for the slice labels. */
|
|
82
71
|
accessor labelCharacterLimit: number | null;
|
|
83
|
-
/** Grouping of layer-related properties to be passed to external function more compactly. */
|
|
84
|
-
protected layerInfo: LayerInfo;
|
|
85
72
|
/**
|
|
86
73
|
* The pie chart data mode (Category or Fields).
|
|
87
74
|
* `category` - The chart is using values from the category field to determine each slice.
|
|
@@ -117,8 +104,6 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
117
104
|
accessor valueSuffix: string | undefined;
|
|
118
105
|
/** Generate the proper chart title given the current config. */
|
|
119
106
|
generateChartTitle(): string;
|
|
120
|
-
/** A function that generates the default config object when creating a new chart. */
|
|
121
|
-
protected generateDefaultConfig(): Omit<ChartConfig<"pieChart", WebChart>, "iLayer">;
|
|
122
107
|
/** Gets the list of the category values for the chart. */
|
|
123
108
|
getCustomSortValues(): Promise<string[]>;
|
|
124
109
|
/**
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import type { ChartConfig } from "../../utils/types/index.js";
|
|
2
2
|
import type { SerialChartModel } from "../serial-chart-model/serial-chart-model.js";
|
|
3
3
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { ModelTypes } from "../interfaces/common.js";
|
|
5
5
|
import type { WithNegativeValuesStackedToBaseline } from "../properties/series/negative-values-stacked-to-baseline.js";
|
|
6
|
-
import type { WebChart, WebChartRadarChartSeries } from "../../spec/web-chart.js";
|
|
7
6
|
import type { ModelWithLineMarkerStyling } from "../mixins/model-with-line-marker-styling.js";
|
|
8
7
|
|
|
9
8
|
export class RadarChartModel extends RadarChartModelSuperclass {
|
|
10
|
-
/** Chart type. */
|
|
11
|
-
protected _chartType: "radarSeries";
|
|
12
|
-
/** Current configuration used for the Radar chart. */
|
|
13
|
-
protected _config: ChartConfig<typeof ModelTypes.RadarChart, WebChart>;
|
|
14
|
-
/** Default series for the radar chart. Used in resetting the series styling. */
|
|
15
|
-
protected defaultSeries?: WebChartRadarChartSeries;
|
|
16
|
-
/** Grouping of layer-related properties to be passed to external function more compactly. */
|
|
17
|
-
protected layerInfo: LayerInfo;
|
|
18
|
-
/** A function that generates the default config object when creating a new chart. */
|
|
19
|
-
protected generateDefaultConfig(): Omit<ChartConfig<"radarChart", WebChart>, "iLayer">;
|
|
20
|
-
/** Initializes the default series for the radar chart. Used in resetting the series styling. */
|
|
21
|
-
protected initDefaultSeries(): void;
|
|
22
9
|
/** Returns whether the series styling is able to be reset. */
|
|
23
10
|
resetAvailable(): boolean;
|
|
24
11
|
/** Resets the series styling to the default styling. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ModelTypes } from "../interfaces/common.js";
|
|
3
3
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
4
4
|
import type { WithColorMatch } from "../properties/color-match.js";
|
|
5
5
|
import type { WithDataLabelsVisibility } from "../properties/data-labels/data-labels-visibility.js";
|
|
@@ -13,8 +13,7 @@ import type { WithXAxisTitleText } from "../properties/axes/x-axis/x-axis-title-
|
|
|
13
13
|
import type { WithXAxisTitleVisibility } from "../properties/axes/x-axis/x-axis-title-visibility.js";
|
|
14
14
|
import type { WithGenerateXAxisTitle } from "../properties/axes/x-axis/generate-x-axis-title.js";
|
|
15
15
|
import type { ChartConfig } from "../../utils/types/index.js";
|
|
16
|
-
import type { ScatterplotOverlays, SizePolicy
|
|
17
|
-
import type { XYChartTypes } from "../../utils/misc/index.js";
|
|
16
|
+
import type { ScatterplotOverlays, SizePolicy } from "../../spec/web-chart.js";
|
|
18
17
|
import type { ISimpleLineSymbol, ISimpleMarkerSymbol } from "../../spec/rest-js-types.js";
|
|
19
18
|
import type { ModelWithMultiAxes } from "../mixins/model-with-multi-axes.js";
|
|
20
19
|
import type { ModelWithLegend } from "../mixins/model-with-legend.js";
|
|
@@ -23,10 +22,6 @@ import type { ModelWithXGuides } from "../mixins/model-with-x-guides.js";
|
|
|
23
22
|
import type { ModelWithYGuides } from "../mixins/model-with-y-guides.js";
|
|
24
23
|
|
|
25
24
|
export class ScatterplotModel extends ScatterplotModelSuperclass {
|
|
26
|
-
/** Chart type. */
|
|
27
|
-
protected _chartType: XYChartTypes;
|
|
28
|
-
/** Current configuration used for the scatterplot. */
|
|
29
|
-
protected _config: ChartConfig<typeof ModelTypes.Scatterplot, WebChart>;
|
|
30
25
|
/**
|
|
31
26
|
* Additional tooltip display fields.
|
|
32
27
|
*
|
|
@@ -36,8 +31,6 @@ export class ScatterplotModel extends ScatterplotModelSuperclass {
|
|
|
36
31
|
set additionalTooltipField(value: string[] | string | undefined);
|
|
37
32
|
/** Marker symbol used for the scatterplot points when using a fixed symbol (i.e. no size policy is set). */
|
|
38
33
|
accessor fixedMarkerSymbol: ISimpleMarkerSymbol;
|
|
39
|
-
/** Grouping of layer-related properties to be passed to external function more compactly. */
|
|
40
|
-
protected layerInfo: LayerInfo;
|
|
41
34
|
/** Line symbol for the linear trend line. */
|
|
42
35
|
accessor linearTrendSymbol: ISimpleLineSymbol;
|
|
43
36
|
/** Chart overlays. The scatterplot implements only 1 overlay, **trendLine**. */
|
|
@@ -52,8 +45,6 @@ export class ScatterplotModel extends ScatterplotModelSuperclass {
|
|
|
52
45
|
accessor yAxisField: string;
|
|
53
46
|
/** Generate the proper chart title given the current config. */
|
|
54
47
|
generateChartTitle(): string;
|
|
55
|
-
/** A function that generates the default config object when creating a new chart. */
|
|
56
|
-
protected generateDefaultConfig(): Omit<ChartConfig<"scatterplot", WebChart>, "iLayer">;
|
|
57
48
|
/** Generate the proper y-axis title given the current config. */
|
|
58
49
|
generateYAxisTitle(): string;
|
|
59
50
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
2
|
-
import type { SerialChartConfig } from "../interfaces/chart-interfaces.js";
|
|
3
2
|
import type { HeatChartDataSortingKinds, SerialChartDataSortingKinds } from "../interfaces/common.js";
|
|
4
3
|
import type { WithColorMatch } from "../properties/color-match.js";
|
|
5
4
|
import type { WithRotatedState } from "../properties/rotated-state.js";
|
|
@@ -13,7 +12,6 @@ import type { WithXAxisTitleSymbol } from "../properties/axes/x-axis/x-axis-titl
|
|
|
13
12
|
import type { WithXAxisTitleText } from "../properties/axes/x-axis/x-axis-title-text.js";
|
|
14
13
|
import type { WithXAxisTitleVisibility } from "../properties/axes/x-axis/x-axis-title-visibility.js";
|
|
15
14
|
import type { WithGenerateXAxisTitle } from "../properties/axes/x-axis/generate-x-axis-title.js";
|
|
16
|
-
import type { SerialChartTypes } from "../../utils/misc/index.js";
|
|
17
15
|
import type { WebChartStatisticType, WebChartStackedKinds } from "../../spec/chart-object-literals.js";
|
|
18
16
|
import type { WebChartDataFilters, WebChartNullCategory } from "../../spec/web-chart.js";
|
|
19
17
|
import type { Color } from "../../spec/rest-js-types.js";
|
|
@@ -25,26 +23,6 @@ import type { ModelWithYGuides } from "../mixins/model-with-y-guides.js";
|
|
|
25
23
|
import type { ModelWithTemporalBinning } from "../mixins/model-with-temporal-binning.js";
|
|
26
24
|
|
|
27
25
|
export abstract class SerialChartModel extends SerialChartModelSuperclass {
|
|
28
|
-
/** Internal storage of the aggregation type for the chart. */
|
|
29
|
-
protected _aggregationType: WebChartStatisticType;
|
|
30
|
-
/** Current chart type. */
|
|
31
|
-
protected _chartType: SerialChartTypes;
|
|
32
|
-
/** Current configuration used for the series chart. */
|
|
33
|
-
protected _config: SerialChartConfig;
|
|
34
|
-
/** Internal storage of the numeric fields for the chart. */
|
|
35
|
-
protected _numericFields: string[];
|
|
36
|
-
/**
|
|
37
|
-
* Internal storage of the split-by field for the chart.
|
|
38
|
-
*
|
|
39
|
-
* @default ""
|
|
40
|
-
*/
|
|
41
|
-
protected _splitByField: string;
|
|
42
|
-
/**
|
|
43
|
-
* Internal storage of the x-axis field for the chart.
|
|
44
|
-
*
|
|
45
|
-
* @default ""
|
|
46
|
-
*/
|
|
47
|
-
protected _xAxisField: string;
|
|
48
26
|
/** The aggregation type for the bar chart. Must be one of the values allowed by `WebChartStatisticType`. */
|
|
49
27
|
accessor aggregationType: WebChartStatisticType;
|
|
50
28
|
/**
|
|
@@ -77,17 +55,8 @@ export abstract class SerialChartModel extends SerialChartModelSuperclass {
|
|
|
77
55
|
accessor stackedType: WebChartStackedKinds | undefined;
|
|
78
56
|
/** The x-axis field for the chart. */
|
|
79
57
|
accessor xAxisField: string;
|
|
80
|
-
/**
|
|
81
|
-
* Determines if we can rebuild the series synchronously.
|
|
82
|
-
* We can call the build new series function synchronously when either is true:
|
|
83
|
-
* - there is no split-by field
|
|
84
|
-
* - there are multiple numeric fields
|
|
85
|
-
*/
|
|
86
|
-
protected canUseSynchronousSeriesRebuild(): boolean;
|
|
87
58
|
/** Generate the proper chart title given the current config. */
|
|
88
59
|
generateChartTitle(): string;
|
|
89
|
-
/** A function that generates the default config object when creating a new chart. */
|
|
90
|
-
protected abstract generateDefaultConfig(): Omit<SerialChartConfig, "iLayer">;
|
|
91
60
|
/** Generate the proper y-axis title given the current config. */
|
|
92
61
|
generateYAxisTitle(): string;
|
|
93
62
|
/**
|
|
@@ -130,15 +99,6 @@ export abstract class SerialChartModel extends SerialChartModelSuperclass {
|
|
|
130
99
|
* @param toIndex - Index to move the series to.
|
|
131
100
|
*/
|
|
132
101
|
moveSeries(fromIndex: number, toIndex: number): void;
|
|
133
|
-
/**
|
|
134
|
-
* Processes the series rebuild.
|
|
135
|
-
* If multiple async setters are called in succession, this function will only rebuild the series once after all setters have been called.
|
|
136
|
-
*
|
|
137
|
-
* @async
|
|
138
|
-
*/
|
|
139
|
-
protected processSeriesRebuild(): Promise<void>;
|
|
140
|
-
/** Resets the config to the default config. */
|
|
141
|
-
protected resetConfig(): void;
|
|
142
102
|
/**
|
|
143
103
|
* Sets whether the series should be assigned to the second value axis.
|
|
144
104
|
*
|
|
@@ -179,8 +139,6 @@ export abstract class SerialChartModel extends SerialChartModelSuperclass {
|
|
|
179
139
|
* @param orderByList - The list of category's values to order by.
|
|
180
140
|
*/
|
|
181
141
|
setSortOrder(newSortOrder: HeatChartDataSortingKinds | SerialChartDataSortingKinds, orderByList?: string[]): void;
|
|
182
|
-
/** Sets up the local props based on the current config. */
|
|
183
|
-
protected setupLocalProps(): void;
|
|
184
142
|
/**
|
|
185
143
|
* Updates the series based on the layer filter.
|
|
186
144
|
*
|
|
@@ -12,10 +12,11 @@ export function getChartIcon(chart: WebChart): Icon["icon"];
|
|
|
12
12
|
/**
|
|
13
13
|
* Fetches the chart type text based on the provided chart type.
|
|
14
14
|
*
|
|
15
|
-
* @param chartType
|
|
15
|
+
* @param chartType - The type of chart
|
|
16
|
+
* @param config - chart config to further determine chart type text (optional)
|
|
16
17
|
* @internal
|
|
17
18
|
*/
|
|
18
|
-
export function fetchChartText(chartType: WebChartTypes): Promise<string>;
|
|
19
|
+
export function fetchChartText(chartType: WebChartTypes, config?: WebChart): Promise<string>;
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Gets the chart type text based on the provided chart type.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/charts-components",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.7",
|
|
4
4
|
"description": "Reusable ArcGIS charting Web Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"simple-statistics": "^7.8.8",
|
|
42
42
|
"tslib": "^2.8.1",
|
|
43
43
|
"uuid": "^11.1.0",
|
|
44
|
-
"@arcgis/lumina": "5.1.0-next.
|
|
45
|
-
"@arcgis/toolkit": "5.1.0-next.
|
|
44
|
+
"@arcgis/lumina": "5.1.0-next.7",
|
|
45
|
+
"@arcgis/toolkit": "5.1.0-next.7"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@arcgis/core": "^5.0.0-next",
|
package/dist/cdn/EXVJCW7V.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import s from"./L4E7PSXN.js";import{a as W}from"./3TPTF5I7.js";import{a as $,b as Y,e as Q}from"./RUUYSZO3.js";import{a as ee}from"./SBHIJW76.js";import{a as D}from"./VFP7AKUR.js";import{a as J}from"./HAJ2VWEU.js";import r from"./IUWWS4XW.js";import{a as f}from"./S5OM65RV.js";import q from"./2JUKPBNE.js";import{d as l}from"./FPDW4F45.js";import{a as P}from"./6WQPKBUS.js";import p from"./LY46M2NC.js";import m from"./RJN6DNHI.js";import k from"./SJ74QWGI.js";import j from"./YC2QAZQ5.js";import i from"./3V3NUR6Q.js";import g from"./ZWABUONN.js";import e from"./HYEINZ2W.js";import d from"./76YPTUIV.js";import c from"./JLFJWDPQ.js";import b from"./SD2G2LCW.js";import"./KZ7WEJMS.js";import a from"./BVFVLX3U.js";import{n as S}from"./DGTF5KBL.js";import"./SPAXIJWK.js";import{a as K}from"./F3M5Q4I6.js";import{e as I,f as B,j as X,m as L,q as w}from"./2OGUU3CF.js";import"./EZM4ZDQI.js";import{a as o,k as z}from"./ETLJKITO.js";import{A as h,B as U,D as x,F as _,g as F,h as n,m as C,x as N,y as A,z as V}from"./XQ26L3RE.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,,,,,{substitute:ie},,,,,,,{Eb:b,Jd:O,Ma:H,Nb:v,Nd:T,Ub:R},,,,,,{a:Z},,,,,{r:G},{a:j,d:y,e:q},{b:k}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function te(m,e){let a=new Set,t=e;return m?.forEach((i,s)=>{let r=i.chartId;(a.has(r)||r===void 0||r==="")&&(i.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=i.chartId)),a.add(r)}),t}function se(m,e,a){return m?.filter(t=>b(a,t.config)&&t.layer?.id===e)??[]}function re(m){let{modelList:e,layerList:a,activeLayerId:t,disableEditing:i}=m,s=new Map;return e?.forEach(r=>{let c=r.layer;c&&s.set(c.id,c)}),i||a.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function oe(m,e){m.forEach(a=>{e.forEach(t=>{a?.id===t.layer?.id&&ae(a,t)})})}function ae(m,e){let a=m;if(a){let t=[...a?.charts??[]],i=t?.findIndex(r=>r.id===e.chartId),s=!1;i!==void 0&&i>-1?(s=!S(t[i],e.config),t[i]=e.config):a&&!T(e.config)&&(s=!0,t.push(e.config)),s&&(a.charts=t)}}function ce(m,e){let a=m;if(a){let t=[...a.charts??[]],i=t.findIndex(s=>s.id===e);i>-1&&(t.splice(i,1),a.charts=t)}}function le(m,e){let a=m;if(a){let t=[...a.charts??[]];t=v({arrayA:t,arrayB:e.map(i=>i.config),getKey:i=>i.id??i.title?.content.text??""}),a.charts=t}}var ne=F`:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,E=class extends V{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=N(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let a=e,{chartData:t,model:i}=a.detail,s=this.getModel(this.selectedChartId);if(i?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:this.chartData=t,i&&(i.dataStore.chartData=t);break;case o.PieSeries:{this.chartData=t,i&&(i.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:c,r2:u,aggregated:g}=r,p=u;Number.isFinite(u)||(p=void 0),this.r2=p,X(i)&&(i.dataStore.r2=p,i.dataStore.aggregated=g,g&&(i.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(c),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:c}=t;if((B(s)||I(s)&&s.binTemporalData)&&(c?.size!==void 0&&s.temporalBinningSize!==c?.size&&(s.temporalBinningSize=c?.size),c?.unit!==void 0&&s.temporalBinningUnit!==c?.unit&&c?.unit!==z.Quarter&&(s.temporalBinningUnit=c?.unit),c?.size!==void 0&&c?.unit!==void 0&&Q($,{size:c.size,unit:c.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),i&&(i.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),I(s)){let u=s.xAxisField,g=r.some(M=>M[u]===null),p=s.nullCategory;g&&p===void 0&&(s.nullCategory=H.nullCategory)}break}case o.HeatSeries:{this.chartData=t;break}}},this.chartAxesMinMaxChange=e=>{let a=e,{bounds:t,model:i}=a.detail,s=this.getModel(this.selectedChartId),r=i?.isSameChartAs(s),c=s?.chartType;if(r)switch(c){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,i&&(i.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let a=e,{data:t,model:i}=a.detail,s=this.getModel(this.selectedChartId);if(i?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,i&&(i.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,i&&(i.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let a=e,{propName:t,value:i,model:s}=a.detail,r=this.modelList.find(c=>s?.isSameChartAs(c));if(r)switch(t){case"rotation":typeof i=="boolean"&&Z(r)&&(r.rotatedState=i);break;case"legendPosition":typeof i=="string"&&w(r)&&(r.legendPosition=i);break;case"legendVisibility":typeof i=="boolean"&&w(r)&&(r.legendVisibility=i);break}},this.chartLegendItemVisibilityChange=e=>{let a=e,{legendItemVisibility:t,model:i}=a.detail,s=this.modelList.find(r=>i?.isSameChartAs(r));s?.setSeriesVisibility(t),L(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),B(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:a,layerId:t}=e.target;a!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:a,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let a=e.target;ae(a?.layer,a)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.panelNumber=0,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,open:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,panelNumber:9,filterBySelection:5}}static{this.styles=ne}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}modelListReorderChangeListener(e){let{modelList:a}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:a,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=a.find(i=>i.layer?.id!==void 0)?.layer?.id;if(t){let i=this.layerList.find(s=>s.id.toString()===t);i&&le(i,a)}}}async layerListChange(){let e=[],a=this.layerList.map(i=>i.id.toString()),t=[...this.modelList.filter(i=>a.includes(i.layer?.id??""))];for(let i of this.layerList??[]){if(i.type==="sublayer"){let r=await i.createFeatureLayer();if(!r)continue;i=r}let s=i.charts;for(let r of s??[]){let c=await K({layer:i,config:r});c!==void 0&&e.push(c)}}te(e),e.forEach(i=>{t.find(s=>s.isSameChartAs(i))===void 0&&t.push(i)}),t=t.filter(i=>!R(i.config)),this.modelList=t}modelListChange(e,a){this.selectedChartId=te(e,this.selectedChartId),a?.forEach(i=>{i.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(i=>{i.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?k({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&oe(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=l.Data;let a=this.getModel(e);this.setEventBasedPropsFromModelData(a),this.currentChartTypeText=a?.chartType!==void 0?k({chartType:a.chartType,commonStrings:this.commonStrings,config:a.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:a})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let a=this.getModel(this.selectedChartId)?.config,t=[];if(a!==void 0&&e!==void 0){let i=O({chartConfig:a,chartData:e}),{minY:s,maxY:r,minX:c,maxX:u}=i;t=[{isXAxis:!0,minimum:c,maximum:u},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(a=>{let{isXAxis:t,maximum:i,minimum:s}=a,r=this.getModel(this.selectedChartId);if(r!==void 0&&L(r)&&this.selectedChartId!==void 0){let c=new W(r,t),u=Y({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:c.getLogarithmic()}),g=$.chartAxesBoundDataMap;g[this.selectedChartId]===void 0&&(g[this.selectedChartId]={});let p=g[this.selectedChartId]?.[u],M={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?i:p?.defaultMaxBound,currMaxBound:i};!S(p,M)&&this.selectedChartId!==void 0&&g?.[this.selectedChartId]!==void 0&&(g[this.selectedChartId][u]=M)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(a=>b(j,a.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}onAddChartClick(e){let{referenceElement:a,layerId:t}=e.detail;this.setupSelectChartTypePopover(a,t)}setupSelectChartTypePopover(e,a){let t=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=x(n`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${a} .popoverPlacement=${t} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(a=>a.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=J(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!T(e.config))}onViewChartDelete(e){let{chartId:a}=e.detail;if(a!==void 0){let t=this.modelList.find(s=>s.chartId===a),i=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==a)],i&&this.syncChartsToLayers&&this.allowChartSyncing&&ce(i,a)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.open=!1,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let a=e.target,t="";switch(a.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=x(n`<calcite-tooltip style=${U({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${a} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){G(this.tooltip)}renderViewCharts(){let e=re({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ee(e,a=>a.id,a=>n`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${se(this.modelList,a.id.toString(),this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${a} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.open!==!1?n`<calcite-flow>${D("charts-list",n`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${A(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.renderTabs()}</calcite-flow>`:null}renderTabs(){let e=this.getModel(this.selectedChartId);return D("chart-edit",n`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??l.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?ie(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?n`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===l.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=l.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?n`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===l.Series} @click=${()=>{this.selectedPanel=l.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?n`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===l.Series} @click=${()=>{this.selectedPanel=l.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?n`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===l.Series} @click=${()=>{this.selectedPanel=l.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?n`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===l.Slices} @click=${()=>{this.selectedPanel=l.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===l.Axes} @click=${()=>{this.selectedPanel=l.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?n`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===l.Guides} @click=${()=>{this.selectedPanel=l.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===l.Format} @click=${()=>{this.selectedPanel=l.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===l.General} @click=${()=>{this.selectedPanel=l.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),a=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=n`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel??l.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=n`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel??l.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=n`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .chartData=${this.chartData} .page=${this.selectedPanel??l.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=n`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel??l.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=n`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel??l.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=n`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .layer=${a} .page=${this.selectedPanel??l.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=n`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo} .chartData=${this.chartData} .layer=${a} .page=${this.selectedPanel??l.Data}></arcgis-charts-config-heat-chart>`;break}return t}};_("arcgis-charts-config-create-flow",E);return E},"geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/StatisticDefinition","time/TimeExtent","Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","core/promiseUtils",a,b,c,d,e,g,i,j,k,m,p,q,r,s)
|
package/dist/cdn/RUYVKHFW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import g from"./4XC2ZKSZ.js";import{a as De}from"./HAJ2VWEU.js";import f from"./2JUKPBNE.js";import{l as h,m as X}from"./FPDW4F45.js";import{a as U}from"./6WQPKBUS.js";import e from"./ZWABUONN.js";import c from"./SD2G2LCW.js";import"./KZ7WEJMS.js";import a from"./BVFVLX3U.js";import{B as v,F as de,f as ie,g as P,n as q,s as oe,v as S,w as B,y as $}from"./DGTF5KBL.js";import{e as re,g as ne,h as ce}from"./SPAXIJWK.js";import{c as $e}from"./EZM4ZDQI.js";import{a as p,b as R,l as F,m as K,n as D,w as me,x as E}from"./ETLJKITO.js";import{A as d,B as W,D as se,F as le,g as ee,h as m,m as ae,x as y,y as b,z as te}from"./XQ26L3RE.js";import"./QPIMTXPL.js";export default $arcgis.t(([{createClassBreaksRenderer:Pe},{getSchemes:Oe},Ae,,,,,,,,,,,,{Bb:z,Da:pe,Dc:ye,F:O,G:x,Gc:Ce,Kb:fe,Ma:ge,Nd:be,a:he,bb:ue},{s:ke},{h:Fe},{g:ve,s:Z},{a:Se,b:Be,c:xe,f:G,g:Re}])=>{function Me(s){let a;switch(s.length){case 4:{let e=s.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);e&&(a=[Number.parseInt(`${e[1]}${e[1]}`,16),Number.parseInt(`${e[2]}${e[2]}`,16),Number.parseInt(`${e[3]}${e[3]}`,16),255]);break}case 5:{let e=s.match(/^#?([\da-f]{1})([\da-f]{1})([\da-f]{1})([\da-f]{1})$/iu);e&&(a=[Number.parseInt(`${e[1]}${e[1]}`,16),Number.parseInt(`${e[2]}${e[2]}`,16),Number.parseInt(`${e[3]}${e[3]}`,16),Number.parseInt(`${e[4]}${e[4]}`,16)]);break}case 7:{let e=s.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);e&&(a=[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16),255]);break}case 9:{let e=s.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})$/iu);e&&(a=[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16),Number.parseInt(e[4],16)]);break}}return a}function Y(s){let a;if(typeof s=="string"&&s.startsWith("#")){let e=Me(s);e&&(a=e)}else Array.isArray(s)&&s.every(e=>typeof e=="number")&&(s.length===4?a=s:s.length===3&&(a=[...s,255]));return a}function Ie(s){return s===$.BackwardDiagonal||s===$.Cross||s===$.DiagonalCross||s===$.ForwardDiagonal||s===$.Horizontal||s===$.Null||s===$.Solid||s===$.Vertical}function N(s){return s===B.Dash||s===B.DashDot||s===B.DashDotDot||s===B.Dot||s===B.Null||s===B.Solid}function Te(s){let{categoryField:a,numericFields:e,configFields:t,inlineData:l}=s,r={};return t&&Object.keys(t).length>0&&"dataItems"in l&&(r={type:"uniqueValue",field1:a,uniqueValueInfos:[]},l.dataItems.forEach(i=>{let c=i[a];if(c!=null){let o={value:c};e.forEach(n=>{let u=Y(i[`${t.fillColor}_${n}`]),C=i[`${t.fillOpacity}_${n}`],I=i[`${t.fillStyle}_${n}`],k=i[`${t.markerSize}_${n}`],A=Y(i[`${t.outlineColor}_${n}`]),L=i[`${t.outlineOpacity}_${n}`],M=i[`${t.outlineWidth}_${n}`],V=i[`${t.outlineStyle}_${n}`],T=Y(i[`${t.lineColor}_${n}`]),H=i[`${t.lineOpacity}_${n}`],w=i[`${t.lineWidth}_${n}`],j=i[`${t.lineStyle}_${n}`],Q=i[`${t.displayLabel}_${n}`];if(typeof Q=="string"&&(o={...o,label:Q}),k!=null){let f={type:v.SMS};k&&typeof k=="number"&&(f.size=k),o.symbol=f}if(u||Ie(I)){let f=o.symbol&&o.symbol.type===v.SMS?o.symbol:{type:v.SFS};if(u&&(C&&typeof C=="number"&&(u[3]=C),f.color=u),Ie(I)&&(f.style=I),o.symbol=f,A||M!=null||N(V)){let _={type:v.SLS};A&&(L&&typeof L=="number"&&(A[3]=L),_.color=A),N(V)&&(_.style=V),M&&typeof M=="number"&&(_.width=M),o.symbol.outline=_}}else if(T||w!=null||N(j)){let f={type:v.SLS};T&&(H&&typeof H=="number"&&(T[3]=H),f.color=T),N(j)&&(f.style=j),w!=null&&typeof w=="number"&&(f.width=w),o.symbol=f}}),(o.label||o.symbol)&&r.uniqueValueInfos.push(o)}})),r}function we(s){let{numericFields:a,configFields:e,inlineData:t}=s,l=t;return"dataItems"in t&&Object.entries(e).forEach(([r,i])=>{a.forEach(c=>{let o=`${i}_${c}`;t.dataItems.forEach(n=>{o in n&&delete n[o]})})}),l}function _e(s){let{categoryField:a,categoryType:e,numericFields:t,inlineData:l}=s,r;if("dataItems"in l){let{dataItems:i}=l,c=[],o="OBJECTID",n=i.map((C,I)=>{let k={...C};return"FID"in C?o="FID":"ObjectId"in C&&(o="ObjectId"),k[o]||(k[o]=I),{attributes:k}});c.push({type:"esriFieldTypeOID",name:o});let u;switch(e){case"dateOnly":u=S.DateOnly;break;case"timeStampOffset":u=S.TimestampOffset;break;case"date":u=S.Date;break;case"number":u=S.Double;break;case"string":default:u=S.String;break}c.push({type:u,name:a}),t.forEach(C=>{c.push({type:S.Double,name:C})}),r={id:"",layerType:"ArcGISFeatureLayer",featureCollection:{layers:[{layerDefinition:{fields:c},featureSet:{features:n}}]}}}return r}async function Ee(s){let{categoryField:a,categoryType:e,numericFields:t,configFields:l,inlineData:r}=s,i,c,o=P(r);l&&(i=Te({categoryField:a,numericFields:t,configFields:l,inlineData:o}),o=we({numericFields:t,configFields:l,inlineData:o}));let n=_e({categoryField:a,categoryType:e,numericFields:t,inlineData:o});return n&&(c=await ye(n)),{chartRenderer:i,iLayer:n,layer:c}}var Ne=ee`.hide{display:none}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;width:var(--arcgis-charts-config-calcite-block-default-width);margin:var(--arcgis-charts-config-calcite-block-default-margin);margin-top:var(--arcgis-charts-top-section-margin)}.label{display:flex;margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-minor);justify-content:space-between}.color-ramp{width:100%;height:20px;overflow:hidden;border-radius:0}.color-ramp-segment{height:100%;display:inline-block}.list{margin-left:var(--arcgis-charts-config-margin-minor);margin-right:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}.accordion{margin-top:var(--arcgis-charts-config-margin-minor);margin-bottom:var(--arcgis-charts-config-margin-major)}`,g={label:"label",colorRamp:"color-ramp",colorRampSegment:"color-ramp-segment",list:"list",accordion:"accordion"},J=class extends te{constructor(){super(...arguments),this._messages=U(),this.commonStrings=U({name:"common",blocking:!0}),this.heatChartPopover=null,this.xAxisFieldElement=y(),this.aggregationElement=y(),this.numericFieldsElement=y(),this.calendarTypeElement=y(),this.calendarViewTypeElement=y(),this.classBreakMethodElement=y(),this.nullElement=y(),this.breaksCountElement=y(),this.colorSchemeElement=y(),this.onHeatChartDataPopoverChange=async a=>{try{if(a.detail?.value!==void 0){let{contentKind:e}=a.detail,t=a.detail.value;switch(e){case h.aggregation:this.model.aggregationType=t;break;case h.xAxisField:this.model.xAxisField=t,this.setDefaultPropertiesForCalendarHeatChart();break;case h.numericFields:this.model.numericFields=[t.trim()||""],(this.model.numericFields??[]).length>0&&this.model.aggregationType===R.Count&&this.model.numericFields[0]!==Ce(this.model.layer).idField&&(this.model.aggregationType=R.Sum);break;case h.calendarType:{switch(t){case X.YearByMonthAndDayOfMonth:{let l={type:p.CalendarDateParts,unit:F.DayOfMonth},r={type:p.CalendarDateParts,unit:F.MonthOfYear};this.model.xTemporalBinning=l,this.model.setAxisValueFormat(0,{type:p.DateAxisFormat,intlOptions:{day:"2-digit"}}),this.model.yTemporalBinning=r,this.model.setAxisValueFormat(1,{type:p.DateAxisFormat,intlOptions:{month:"short"}});break}case X.WeekByDayOfWeekAndHourOfDay:{let l={type:p.CalendarDateParts,unit:F.HourOfDay},r={type:p.CalendarDateParts,unit:F.DayOfWeek},{lang:i}=ne(this.el??document.documentElement),c=ce(i),o=he.local().setLocale(i).startOf("week",{useLocaleWeeks:c!==re}).weekday;this.model.firstDayOfWeek=o,this.model.xTemporalBinning=l,this.model.setAxisValueFormat(0,{type:p.DateAxisFormat,intlOptions:{hour:"numeric",hour12:!0}}),this.model.yTemporalBinning=r,this.model.setAxisValueFormat(1,{type:p.DateAxisFormat,intlOptions:{weekday:"short"}});break}default:break}break}case h.calendarViewType:{this.model.viewType=t;break}case h.classBreakMethod:{this.model.classificationMethod=t,this.updateChartRenderer=!0;break}default:break}}}catch(e){throw this.arcgisChartsConfigDataChangeError.emit({error:e,model:this.model}),e}this.removeHeatChartDataPopover(),this.requestUpdate()},this.popoverClose=a=>{this.heatChartPopover===a?.target&&this.removeHeatChartDataPopover()},this.onModelConfigChange=()=>{be(this.model?.config)&&(this.selectedColorRamp=this.availableColorRamps.find(a=>a.name==="Blue 3")??this.availableColorRamps[0]),this.requestUpdate()},this.allColorRamps=[],this.onColorRampSelection=a=>{let{ramp:e,isFlipped:t}=a.detail;this.isFlipped=t,q(this.selectedColorRamp,e)||(this.selectedColorRamp=e,this.updateChartRenderer=!0,this.updateClassBreaksColor=!0,this.generateAndUpdateClassBreaks())},this.updateClassBreaksColor=!1,this.onEmptyCellNameChange=a=>{let{name:e}=a.detail;if(e!==void 0){let t={...this.model.emptyCell,name:e};this.model.emptyCell=t}},this.onEmptyCellColorChange=a=>{let{color:e}=a.detail;if(e!==void 0){let t=this.model.emptyCell,l={...t,symbol:{...t?.symbol,type:v.SFS,color:e,outline:t?.symbol?.outline&&{...t.symbol.outline,color:e}}};this.model.emptyCell=l}},this.isFlipped=!1,this.availableColorRamps=[],this.updateChartRenderer=!1,this.layerFieldsInfo=[],this.arcgisChartsConfigDataChangeError=ae()}static{this.properties={availableColorRamps:16,aggregationLabel:16,selectedColorRamp:16,updateChartRenderer:16,messageOverrides:0,model:0,layerFieldsInfo:0,open:5,chartData:0}}static{this.styles=Ne}connectedCallback(){super.connectedCallback(),this.loadColorRampFromArcGIS()}load(){this.modelChange(this.model),this.onModelConfigChange()}willUpdate(a){a.has("model")&&this.modelChange(this.model,a.get("model")),this.aggregationLabel=pe(this.model.aggregationType,this.commonStrings),a.has("chartData")&&(this.updateChartRenderer=this.model.chartRenderer===void 0||ue(this.model.chartRenderer)===de.ClassBreaks)}updated(a){a.has("updateChartRenderer")&&this.updateChartRenderer&&this.generateAndUpdateClassBreaks()}disconnectedCallback(){super.disconnectedCallback(),this.model.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}loadColorRampFromArcGIS(){let a=Ae.all();this.allColorRamps=a,this.availableColorRamps=this.allColorRamps}generateColorsForExistingBreaks(a){let e=this.model.breaksCount;return Se({numberOfClassBreaks:e,selectedColorRamp:a,colorRamp:this.model.chartRenderer?.classBreakInfos?.map(t=>t.symbol?.color),isFlipped:this.isFlipped})}normalizeClassBreakInfosForCompare(a,e){return(a??[]).map(({classMinValue:t,classMaxValue:l,label:r,symbol:i})=>({classMinValue:t,classMaxValue:l,label:r,symbol:e?void 0:i}))}async generateAndUpdateClassBreaks(){let a=[];if(this.model.classificationMethod===E.manual&&this.model.chartRenderer?.classBreakInfos.length>0&&this.selectedColorRamp){a=P(this.model.chartRenderer?.classBreakInfos)??[];let l=this.generateColorsForExistingBreaks(this.selectedColorRamp);for(let r=0;r<a.length&&r<l.length;r++)a[r].symbol&&(a[r].symbol.color=l[r])}else if(this.model.classificationMethod!==E.manual&&this.chartData){let l=await Ee({categoryField:this.model?.xAxisField?.[0]??"",categoryType:p.DateAxisFormat,numericFields:[O.valueField],inlineData:this.chartData});if(l.layer&&this.model.layer){let r=Oe({geometryType:"point",theme:"high-to-low"})?.primaryScheme,i=await Pe({layer:l.layer,field:O.valueField,classificationMethod:this.model.classificationMethod,numClasses:this.model.breaksCount,colorScheme:r});a=Be({classBreaksRendererResult:i,numberOfClassBreaks:this.model.breaksCount,selectedColorRamp:this.selectedColorRamp??G(this.model.chartRenderer?.classBreakInfos,this.availableColorRamps),colorRamp:this.updateClassBreaksColor?void 0:this.model.chartRenderer?.classBreakInfos?.map(c=>c.symbol?.color),isFlipped:this.isFlipped})}}let e=!this.updateClassBreaksColor,t=!q(this.normalizeClassBreakInfosForCompare(this.model.chartRenderer?.classBreakInfos,e),this.normalizeClassBreakInfosForCompare(a,e));this.updateChartRenderer&&t&&(this.model.chartRenderer={type:"classBreaks",field:O.valueField,classBreakInfos:a}),this.updateChartRenderer=!1,this.updateClassBreaksColor=!1}modelChange(a,e){e?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),a?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}getCorrectedXAxisFieldValue(){return Fe({fieldName:this.model.xAxisField,fieldList:this.layerFieldsInfo})?"":z(this.layerFieldsInfo,this.model.xAxisField)}onXAxisFieldSelect(a){this.contentKind=h.xAxisField,this.setupPopover(a)}onNumericFieldSelect(a){this.contentKind=h.numericFields,this.setupPopover(a)}onCalendarTypeSelect(a){this.contentKind=h.calendarType,this.setupPopover(a)}onClassBreakMethodSelect(a){this.contentKind=h.classBreakMethod,this.setupPopover(a)}onColorSchemeSelect(a){this.contentKind=h.colorScheme,this.setupPopover(a)}onBreaksCountChange(a){let e=oe(a.target.value);e<x.min?e=x.min:e>x.max&&(e=x.max),fe(e)&&(this.breaksCountElement.value&&(this.breaksCountElement.value.value=e.toString()),this.model.breaksCount=e,this.updateChartRenderer=!0)}onAggregationSelect(a){this.contentKind=h.aggregation,this.setupPopover(a)}onNullSelect(a){this.contentKind=h.null,this.setupPopover(a)}onIncludeLeapDayChange(a){let e=a.target.checked;this.model.includeLeapDay=e}onNullPolicyChange(a){this.model.nullPolicy=a.target.selectedItem.value}setupPopover(a){a.stopImmediatePropagation(),this.removeHeatChartDataPopover();let e,t,l,r=this.isFlipped;switch(this.contentKind){case h.aggregation:e=this.aggregationElement.value,t=this._messages.aggregationHeader,l=this.model.aggregationType;break;case h.xAxisField:e=this.xAxisFieldElement.value,t=this._messages.xAxisField,l=this.model.xAxisField;break;case h.numericFields:e=this.numericFieldsElement.value,t=this._messages.numericField,l=this.model.numericFields?.[0];break;case h.calendarType:e=this.calendarTypeElement.value,t=this._messages.calendarType,l=Z(this.model);break;case h.calendarViewType:e=this.calendarViewTypeElement.value,t=this._messages.viewType,l=this.model.viewType;break;case h.classBreakMethod:e=this.classBreakMethodElement.value,t=this._messages.method,l=this.model.classificationMethod;break;case h.colorScheme:e=this.colorSchemeElement.value,t=this._messages.colorScheme;let i=G(this.model.chartRenderer?.classBreakInfos,this.availableColorRamps);l=this.selectedColorRamp?.name??i?.name;let c=i?i.colorsForClassBreaks.find(o=>o.numClasses===this.model.breaksCount)?.colors:void 0;r=c?Re(c,this.model.chartRenderer?.classBreakInfos):r;break;case h.null:e=a.target,t=this._messages.null;break}this.heatChartPopover=se(m`<arcgis-charts-config-heat-chart-popover .headingTitle=${t} .referenceElement=${e} open .contentKind=${this.contentKind} .model=${this.model} .layerFieldsInfo=${this.layerFieldsInfo} .selectedContent=${l} @arcgisChartsConfigHeatChartDataPopoverChange=${this.onHeatChartDataPopoverChange} @arcgisChartsConfigPopoverClose=${this.popoverClose} .colorRamps=${this.availableColorRamps} @arcgisChartsConfigHeatChartColorRampChange=${this.onColorRampSelection} @arcgisChartsConfigPopoverEmptyCellColorChange=${this.onEmptyCellColorChange} @arcgisChartsConfigPopoverEmptyCellNameChange=${this.onEmptyCellNameChange} .isFlipped=${r}></arcgis-charts-config-heat-chart-popover>`),!document.body.contains(this.heatChartPopover)&&this.heatChartPopover!==null&&document.body.appendChild(this.heatChartPopover)}removeHeatChartDataPopover(){this.heatChartPopover!==null&&(this.heatChartPopover.open=!1,this.heatChartPopover=De(this.heatChartPopover))}setDefaultPropertiesForCalendarHeatChart(){if(!ke(this.model?.config)){if(this.model.yAxisField=this.model.xAxisField,this.model.setYAxisSortOrder($e.Desc),this.model.xTemporalBinning===void 0){let a={type:p.CalendarDateParts,unit:F.DayOfMonth};this.model.xTemporalBinning=a}if(this.model.yTemporalBinning===void 0){let a={type:p.CalendarDateParts,unit:F.MonthOfYear};this.model.yTemporalBinning=a,this.model.setAxisValueFormat(1,{type:p.DateAxisFormat,intlOptions:{month:"short"}})}this.model.classificationMethod===void 0&&(this.model.classificationMethod=E.naturalBreaks),this.model.heatRulesType!==K.Renderer&&(this.model.heatRulesType=K.Renderer),this.model.viewType===void 0&&(this.model.viewType=me.singleCalendarView),(this.model.aggregationType===R.Count||this.model.aggregationType===R.Sum)&&this.model.nullPolicy!==D.Zero&&(this.model.nullPolicy=D.Zero)}}renderXAxisFieldSelect(){let a=this.getCorrectedXAxisFieldValue();return m`<arcgis-charts-config-field-select .label=${a} @click=${this.onXAxisFieldSelect} ${b(this.xAxisFieldElement)}></arcgis-charts-config-field-select>`}renderAggregation(){return m`<arcgis-charts-config-field-select .label=${this.model.aggregationType===R.NoAggregation?this._messages.noAggregation:this.aggregationLabel} @click=${this.onAggregationSelect} ${b(this.aggregationElement)}></arcgis-charts-config-field-select>`}renderNumericFieldsSelect(){let a=this.model.numericFields?.[0]===this.model.layer?.objectIdField?"":z(this.layerFieldsInfo,this.model.numericFields?.[0]);return m`<arcgis-charts-config-field-select .label=${a} @click=${this.onNumericFieldSelect} ${b(this.numericFieldsElement)}></arcgis-charts-config-field-select>`}renderCalendarTypeSelect(){let a=Z(this.model)??"",e={weekByDayOfWeekAndHourOfDay:this._messages.weekByDayOfWeekAndHourOfDay,yearByMonthAndDayOfMonth:this._messages.yearByMonthAndDayOfMonth},t=a?e[a]??"":"";return m`<arcgis-charts-config-field-select .label=${t} @click=${this.onCalendarTypeSelect} ${b(this.calendarTypeElement)}></arcgis-charts-config-field-select>`}renderClassBreakMethodSelect(){let a={equalInterval:this._messages.classBreaksMethod?.equalInterval,manual:this._messages.classBreaksMethod?.manual,naturalBreaks:this._messages.classBreaksMethod?.naturalBreaks,quantile:this._messages.classBreaksMethod?.quantile},e=this.model.classificationMethod?a[ie(this.model.classificationMethod)]??"":"";return m`<arcgis-charts-config-field-select .label=${e} @click=${this.onClassBreakMethodSelect} ${b(this.classBreakMethodElement)}></arcgis-charts-config-field-select>`}renderColorRampSelect(){let a=this.model.chartRenderer?.classBreakInfos?.map(e=>{let t=e!==void 0?xe(e.symbol.color):"#FFFFFF";return m`<div class=${d(g.colorRampSegment)} style=${W({backgroundColor:t,width:`${100/this.model.breaksCount}%`})}></div>`});return m`<arcgis-charts-config-field-select label @click=${this.onColorSchemeSelect} ${b(this.colorSchemeElement)}><div slot=fieldSelectSlot class=${d(g.colorRamp)}>${a}</div></arcgis-charts-config-field-select>`}renderClassBreaksTable(){let a=this.model.chartRenderer?.classBreakInfos??[];return m`<calcite-table caption="Simple table"><calcite-table-row slot=table-header><calcite-table-header .heading=${this._messages.symbol}></calcite-table-header><calcite-table-header .heading=${this._messages.upperValue}></calcite-table-header></calcite-table-row>${a.map(e=>m`<calcite-table-row><calcite-table-cell><calcite-swatch label scale=m .color=${`rgba(${e.symbol.color?.[0]}, ${e.symbol.color?.[1]}, ${e.symbol.color?.[2]}, ${e.symbol.color?.[3]/255})`}></calcite-swatch></calcite-table-cell><calcite-table-cell>${e.label}</calcite-table-cell></calcite-table-row>`)}</calcite-table>`}renderNullUI(){let a=this.model.emptyCell,e=this._messages.null,t=a?.symbol?.color??ge.grayColor,[l,r,i,c]=[...t],o=`rgba(${l},${r},${i},${c/255})`;return m`<calcite-list label class=${d(g.list)} selection-mode=none ${b(this.nullElement)}><calcite-list-item .label=${e} .value=${e} @calciteListItemSelect=${this.onNullSelect}><calcite-icon icon=square-f style=${W({color:o})} slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}renderEmptyBins(){return m`<calcite-radio-button-group name=empty-bins layout=vertical @calciteRadioButtonGroupChange=${this.onNullPolicyChange}><calcite-label layout=inline><calcite-radio-button .value=${D.Zero} .checked=${this.model.nullPolicy===D.Zero}></calcite-radio-button>${this._messages.treatAsZero}</calcite-label><calcite-label layout=inline><calcite-radio-button .value=${D.Null} .checked=${this.model.nullPolicy===D.Null}></calcite-radio-button>${this._messages.treatAsNull}</calcite-label></calcite-radio-button-group>`}render(){let a=this.renderXAxisFieldSelect(),e=this.renderAggregation(),t=this.renderNumericFieldsSelect(),l=this.renderCalendarTypeSelect(),r=this.renderClassBreakMethodSelect(),i=this.renderColorRampSelect(),c=this.renderClassBreaksTable(),o=this.renderNullUI(),n=this.renderEmptyBins();return m`<calcite-label class=${d(g.label)}>${this._messages.dateRequired}${a}</calcite-label><calcite-label class=${d(g.label)}>${this._messages.calendarType}${l}</calcite-label><calcite-label class=${d(g.label)}>${this._messages.aggregation}${e}</calcite-label><calcite-label class=${d(g.label)}>${this._messages.numericField}${t}</calcite-label><calcite-label class=${d(g.label)}>${this._messages.method}${r}</calcite-label><calcite-label class=${d(g.label)}>${this._messages.numberOfClasses}<calcite-input type=number .min=${x.min} .max=${x.max} .disabled=${this.model.classificationMethod===void 0||this.model.classificationMethod===E.manual} step=1 .value=${ve(this.model.breaksCount,5)} @calciteInputInput=${this.onBreaksCountChange} ${b(this.breaksCountElement)}></calcite-input></calcite-label><calcite-label class=${d(g.label)}>${this._messages.colorScheme}${i}</calcite-label>${o}<calcite-accordion class=${d(g.accordion)} appearance=transparent selection-mode=single><calcite-accordion-item .heading=${this._messages.classBreaks}>${c}</calcite-accordion-item></calcite-accordion><calcite-label class=${d(g.label)}>${this._messages.emptyBins}${n}</calcite-label><calcite-label class=${d(g.label)} layout=inline-space-between>${this._messages.includeLeapDay}<calcite-switch .checked=${this.model.includeLeapDay} @calciteSwitchChange=${this.onIncludeLeapDayChange}></calcite-switch></calcite-label>`}};le("arcgis-charts-config-heat-chart-data",J);return J},"smartMapping/renderers/color","smartMapping/symbology/color","smartMapping/symbology/support/colorRamps","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",a,c,e,f,g)
|