@luzmo/dashboard-contents-types 1.0.42 → 1.0.43
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/CHANGELOG.md +6 -0
- package/area-chart/area-chart-options.config.cjs +1 -1
- package/area-chart/area-chart-options.config.cjs.map +1 -1
- package/area-chart/area-chart-options.config.js +12 -7
- package/area-chart/area-chart-options.config.js.map +1 -1
- package/bar-chart/bar-chart-options.config.cjs +1 -1
- package/bar-chart/bar-chart-options.config.cjs.map +1 -1
- package/bar-chart/bar-chart-options.config.js +12 -10
- package/bar-chart/bar-chart-options.config.js.map +1 -1
- package/box-plot/box-plot-options.config.cjs +1 -1
- package/box-plot/box-plot-options.config.cjs.map +1 -1
- package/box-plot/box-plot-options.config.js +24 -19
- package/box-plot/box-plot-options.config.js.map +1 -1
- package/bubble-chart/bubble-chart-options.config.cjs +1 -1
- package/bubble-chart/bubble-chart-options.config.cjs.map +1 -1
- package/bubble-chart/bubble-chart-options.config.js +9 -7
- package/bubble-chart/bubble-chart-options.config.js.map +1 -1
- package/choropleth-map/choropleth-map-options.config.cjs +1 -1
- package/choropleth-map/choropleth-map-options.config.cjs.map +1 -1
- package/choropleth-map/choropleth-map-options.config.js +32 -30
- package/choropleth-map/choropleth-map-options.config.js.map +1 -1
- package/circle-pack-chart/circle-pack-chart-options.config.cjs +1 -1
- package/circle-pack-chart/circle-pack-chart-options.config.cjs.map +1 -1
- package/circle-pack-chart/circle-pack-chart-options.config.js +36 -31
- package/circle-pack-chart/circle-pack-chart-options.config.js.map +1 -1
- package/column-chart/column-chart-options.config.cjs +1 -1
- package/column-chart/column-chart-options.config.cjs.map +1 -1
- package/column-chart/column-chart-options.config.js +12 -10
- package/column-chart/column-chart-options.config.js.map +1 -1
- package/combination-chart/combination-chart-options.config.cjs +1 -1
- package/combination-chart/combination-chart-options.config.cjs.map +1 -1
- package/combination-chart/combination-chart-options.config.js +8 -3
- package/combination-chart/combination-chart-options.config.js.map +1 -1
- package/donut-chart/donut-chart-options.config.cjs +1 -1
- package/donut-chart/donut-chart-options.config.cjs.map +1 -1
- package/donut-chart/donut-chart-options.config.js +8 -4
- package/donut-chart/donut-chart-options.config.js.map +1 -1
- package/funnel-chart/funnel-chart-options.config.cjs +1 -1
- package/funnel-chart/funnel-chart-options.config.cjs.map +1 -1
- package/funnel-chart/funnel-chart-options.config.js +5 -3
- package/funnel-chart/funnel-chart-options.config.js.map +1 -1
- package/heat-table/heat-table-options.config.cjs +1 -1
- package/heat-table/heat-table-options.config.cjs.map +1 -1
- package/heat-table/heat-table-options.config.js +21 -19
- package/heat-table/heat-table-options.config.js.map +1 -1
- package/index.cjs +1 -1
- package/index.js +192 -191
- package/line-chart/line-chart-options.config.cjs +1 -1
- package/line-chart/line-chart-options.config.cjs.map +1 -1
- package/line-chart/line-chart-options.config.js +10 -5
- package/line-chart/line-chart-options.config.js.map +1 -1
- package/ohlc-chart/ohlc-chart-options.config.cjs +1 -1
- package/ohlc-chart/ohlc-chart-options.config.cjs.map +1 -1
- package/ohlc-chart/ohlc-chart-options.config.js +8 -3
- package/ohlc-chart/ohlc-chart-options.config.js.map +1 -1
- package/package.json +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.de.cjs +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.de.cjs.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.de.js +2 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.de.js.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.en.cjs +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.en.cjs.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.en.js +2 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.en.js.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.es.cjs +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.es.cjs.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.es.js +2 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.es.js.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.fr.cjs +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.fr.cjs.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.fr.js +2 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.fr.js.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.nl.cjs +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.nl.cjs.map +1 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.nl.js +2 -1
- package/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.nl.js.map +1 -1
- package/parallel-coordinates-plot/parallel-coordinates-plot-options.config.cjs +1 -1
- package/parallel-coordinates-plot/parallel-coordinates-plot-options.config.cjs.map +1 -1
- package/parallel-coordinates-plot/parallel-coordinates-plot-options.config.js +25 -20
- package/parallel-coordinates-plot/parallel-coordinates-plot-options.config.js.map +1 -1
- package/pivot-table/pivot-table-options.config.cjs +1 -1
- package/pivot-table/pivot-table-options.config.cjs.map +1 -1
- package/pivot-table/pivot-table-options.config.js +5 -3
- package/pivot-table/pivot-table-options.config.js.map +1 -1
- package/pyramid-chart/pyramid-chart-options.config.cjs +1 -1
- package/pyramid-chart/pyramid-chart-options.config.cjs.map +1 -1
- package/pyramid-chart/pyramid-chart-options.config.js +5 -3
- package/pyramid-chart/pyramid-chart-options.config.js.map +1 -1
- package/sankey-diagram/sankey-diagram-options.config.cjs +1 -1
- package/sankey-diagram/sankey-diagram-options.config.cjs.map +1 -1
- package/sankey-diagram/sankey-diagram-options.config.js +5 -3
- package/sankey-diagram/sankey-diagram-options.config.js.map +1 -1
- package/scatter-plot/scatter-plot-options.config.cjs +1 -1
- package/scatter-plot/scatter-plot-options.config.cjs.map +1 -1
- package/scatter-plot/scatter-plot-options.config.js +10 -5
- package/scatter-plot/scatter-plot-options.config.js.map +1 -1
- package/shared/utils/interactivity-options.config.cjs +2 -0
- package/shared/utils/interactivity-options.config.cjs.map +1 -0
- package/shared/utils/interactivity-options.config.js +56 -0
- package/shared/utils/interactivity-options.config.js.map +1 -0
- package/shared/utils/interactivity-options.i18n.cjs +2 -0
- package/shared/utils/interactivity-options.i18n.cjs.map +1 -0
- package/shared/utils/interactivity-options.i18n.js +42 -0
- package/shared/utils/interactivity-options.i18n.js.map +1 -0
- package/shared/utils/options-loader.cjs +1 -1
- package/shared/utils/options-loader.cjs.map +1 -1
- package/shared/utils/options-loader.js +11 -11
- package/shared/utils/options-loader.js.map +1 -1
- package/src/lib/area-chart/area-chart-options.config.d.ts.map +1 -1
- package/src/lib/bar-chart/bar-chart-options.config.d.ts.map +1 -1
- package/src/lib/box-plot/box-plot-options.config.d.ts.map +1 -1
- package/src/lib/bubble-chart/bubble-chart-options.config.d.ts.map +1 -1
- package/src/lib/choropleth-map/choropleth-map-options.config.d.ts.map +1 -1
- package/src/lib/circle-pack-chart/circle-pack-chart-options.config.d.ts.map +1 -1
- package/src/lib/column-chart/column-chart-options.config.d.ts.map +1 -1
- package/src/lib/combination-chart/combination-chart-options.config.d.ts.map +1 -1
- package/src/lib/donut-chart/donut-chart-options.config.d.ts.map +1 -1
- package/src/lib/funnel-chart/funnel-chart-options.config.d.ts.map +1 -1
- package/src/lib/heat-table/heat-table-options.config.d.ts.map +1 -1
- package/src/lib/line-chart/line-chart-options.config.d.ts.map +1 -1
- package/src/lib/ohlc-chart/ohlc-chart-options.config.d.ts.map +1 -1
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.de.d.ts +3 -0
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.de.d.ts.map +1 -1
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.en.d.ts +3 -0
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.en.d.ts.map +1 -1
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.es.d.ts +3 -0
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.es.d.ts.map +1 -1
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.fr.d.ts +3 -0
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.fr.d.ts.map +1 -1
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.nl.d.ts +3 -0
- package/src/lib/parallel-coordinates-plot/i18n/parallel-coordinates-plot-options.nl.d.ts.map +1 -1
- package/src/lib/parallel-coordinates-plot/parallel-coordinates-plot-options.config.d.ts.map +1 -1
- package/src/lib/pivot-table/pivot-table-options.config.d.ts.map +1 -1
- package/src/lib/pyramid-chart/pyramid-chart-options.config.d.ts.map +1 -1
- package/src/lib/sankey-diagram/sankey-diagram-options.config.d.ts.map +1 -1
- package/src/lib/scatter-plot/scatter-plot-options.config.d.ts.map +1 -1
- package/src/lib/shared/utils/index.d.ts +1 -0
- package/src/lib/shared/utils/index.d.ts.map +1 -1
- package/src/lib/shared/utils/interactivity-options.config.d.ts +15 -0
- package/src/lib/shared/utils/interactivity-options.config.d.ts.map +1 -0
- package/src/lib/shared/utils/interactivity-options.i18n.d.ts +3 -0
- package/src/lib/shared/utils/interactivity-options.i18n.d.ts.map +1 -0
- package/src/lib/sunburst-chart/sunburst-chart-options.config.d.ts.map +1 -1
- package/src/lib/treemap-chart/treemap-chart-options.config.d.ts.map +1 -1
- package/src/lib/wordcloud-chart/wordcloud-chart-options.config.d.ts.map +1 -1
- package/sunburst-chart/sunburst-chart-options.config.cjs +1 -1
- package/sunburst-chart/sunburst-chart-options.config.cjs.map +1 -1
- package/sunburst-chart/sunburst-chart-options.config.js +5 -3
- package/sunburst-chart/sunburst-chart-options.config.js.map +1 -1
- package/treemap-chart/treemap-chart-options.config.cjs +1 -1
- package/treemap-chart/treemap-chart-options.config.cjs.map +1 -1
- package/treemap-chart/treemap-chart-options.config.js +10 -8
- package/treemap-chart/treemap-chart-options.config.js.map +1 -1
- package/wordcloud-chart/wordcloud-chart-options.config.cjs +1 -1
- package/wordcloud-chart/wordcloud-chart-options.config.cjs.map +1 -1
- package/wordcloud-chart/wordcloud-chart-options.config.js +5 -3
- package/wordcloud-chart/wordcloud-chart-options.config.js.map +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createInfoTooltipOptionsGroup as e } from "../shared/utils/info-tooltip-options.config.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { createInteractivityOptionsGroup as t } from "../shared/utils/interactivity-options.config.js";
|
|
3
|
+
import { getColorMapKeys as n, getColorMaps as r } from "../shared/utils/color/color-palettes.js";
|
|
4
|
+
import { mapVectorTileProviders as i } from "../shared/utils/map-tile-providers.js";
|
|
5
|
+
import { calculateManualRanges as a, toRangesWithVal as o, toRangesWithValue as s } from "../shared/utils/color-range-utils.js";
|
|
5
6
|
//#region src/lib/choropleth-map/choropleth-map-options.config.ts
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
return
|
|
9
|
-
},
|
|
7
|
+
var c = (e, t) => {
|
|
8
|
+
let n = `colors${t}`;
|
|
9
|
+
return r()[e]?.[n];
|
|
10
|
+
}, l = [
|
|
10
11
|
{
|
|
11
12
|
key: "general",
|
|
12
13
|
type: "group",
|
|
@@ -80,7 +81,7 @@ var s = (e, t) => {
|
|
|
80
81
|
"3D buildings"
|
|
81
82
|
],
|
|
82
83
|
parseValue: (e) => e?.name || "Basic",
|
|
83
|
-
toValue: (e) =>
|
|
84
|
+
toValue: (e) => i[e] ?? {}
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
]
|
|
@@ -112,19 +113,19 @@ var s = (e, t) => {
|
|
|
112
113
|
"divergent",
|
|
113
114
|
"manual"
|
|
114
115
|
],
|
|
115
|
-
calculateValue: ({ options: e }) => e?.colorsClass === "manual" ? "manual" :
|
|
116
|
-
toOptions: ({ options: e, value:
|
|
117
|
-
let
|
|
118
|
-
|
|
116
|
+
calculateValue: ({ options: e }) => e?.colorsClass === "manual" ? "manual" : r()?.[e?.colorsClass]?.type ?? "sequential",
|
|
117
|
+
toOptions: ({ options: e, value: t }) => {
|
|
118
|
+
let i = e?.colorsClass ?? "PuBu", c = e?.numberClasses ?? 5, l = s(e?.manualValues?.ranges), u = i === "manual" ? "manual" : i, d;
|
|
119
|
+
t === "manual" ? d = "manual" : t !== r()?.[e?.colorsClass]?.type && (d = n(t ?? "sequential")[0]);
|
|
119
120
|
let f = {
|
|
120
121
|
...e,
|
|
121
122
|
colorsClass: d
|
|
122
123
|
};
|
|
123
|
-
if (
|
|
124
|
-
let e =
|
|
124
|
+
if (t === "manual" || e?.classification === "manual") {
|
|
125
|
+
let e = a(c, t === "manual" ? u : d, l);
|
|
125
126
|
f.manualValues = {
|
|
126
127
|
...f.manualValues,
|
|
127
|
-
ranges:
|
|
128
|
+
ranges: o(e)
|
|
128
129
|
};
|
|
129
130
|
} else delete f?.manualValues?.ranges;
|
|
130
131
|
return f;
|
|
@@ -138,12 +139,12 @@ var s = (e, t) => {
|
|
|
138
139
|
label: "Color palette",
|
|
139
140
|
hideLabel: !0,
|
|
140
141
|
default: ({ options: e }) => {
|
|
141
|
-
let
|
|
142
|
-
return t
|
|
142
|
+
let t = r()?.[e?.colorsClass]?.type;
|
|
143
|
+
return n(t ?? "sequential")[0];
|
|
143
144
|
},
|
|
144
145
|
enum: ({ options: e }) => {
|
|
145
|
-
let
|
|
146
|
-
return t
|
|
146
|
+
let t = r()?.[e?.colorsClass]?.type;
|
|
147
|
+
return n(t ?? "sequential");
|
|
147
148
|
},
|
|
148
149
|
toOptions: ({ options: e, value: t }) => {
|
|
149
150
|
let n = {
|
|
@@ -151,7 +152,7 @@ var s = (e, t) => {
|
|
|
151
152
|
colorsClass: t
|
|
152
153
|
};
|
|
153
154
|
if (e?.classification === "manual") {
|
|
154
|
-
let r =
|
|
155
|
+
let r = c(t, e?.numberClasses ?? 5);
|
|
155
156
|
n.manualValues = {
|
|
156
157
|
...n.manualValues,
|
|
157
158
|
ranges: e?.manualValues?.ranges?.map((e) => ({
|
|
@@ -176,12 +177,12 @@ var s = (e, t) => {
|
|
|
176
177
|
label: "Manual range colors",
|
|
177
178
|
hideLabel: !0
|
|
178
179
|
},
|
|
179
|
-
calculateValue: ({ options: e }) =>
|
|
180
|
+
calculateValue: ({ options: e }) => a(e?.numberClasses, e?.colorsClass, s(e?.manualValues?.ranges)),
|
|
180
181
|
toOptions: ({ options: e, value: t }) => ({
|
|
181
182
|
...e,
|
|
182
183
|
manualValues: {
|
|
183
184
|
...e.manualValues,
|
|
184
|
-
ranges:
|
|
185
|
+
ranges: o(t)
|
|
185
186
|
}
|
|
186
187
|
}),
|
|
187
188
|
visibleIf: ({ options: e }) => e?.colorsClass === "manual"
|
|
@@ -215,10 +216,10 @@ var s = (e, t) => {
|
|
|
215
216
|
numberClasses: n
|
|
216
217
|
};
|
|
217
218
|
if (e?.classification === "manual" || e?.colorsClass === "manual") {
|
|
218
|
-
let n =
|
|
219
|
+
let n = a(t, e?.colorsClass, s(e?.manualValues?.ranges));
|
|
219
220
|
r.manualValues = {
|
|
220
221
|
...r.manualValues,
|
|
221
|
-
ranges:
|
|
222
|
+
ranges: o(n)
|
|
222
223
|
};
|
|
223
224
|
}
|
|
224
225
|
return r;
|
|
@@ -243,10 +244,10 @@ var s = (e, t) => {
|
|
|
243
244
|
classification: t
|
|
244
245
|
};
|
|
245
246
|
if (t === "manual" || e?.colorsClass === "manual") {
|
|
246
|
-
let t =
|
|
247
|
+
let t = a(e?.numberClasses, e?.colorsClass, s(e?.manualValues?.ranges));
|
|
247
248
|
n.manualValues = {
|
|
248
249
|
...n.manualValues,
|
|
249
|
-
ranges:
|
|
250
|
+
ranges: o(t)
|
|
250
251
|
};
|
|
251
252
|
} else delete n?.manualValues?.ranges;
|
|
252
253
|
return n;
|
|
@@ -263,12 +264,12 @@ var s = (e, t) => {
|
|
|
263
264
|
readOnlyColorPicker: !0,
|
|
264
265
|
label: "Manual range values",
|
|
265
266
|
hideLabel: !0,
|
|
266
|
-
calculateValue: ({ options: e }) =>
|
|
267
|
+
calculateValue: ({ options: e }) => a(e?.numberClasses, e?.colorsClass, s(e?.manualValues?.ranges)),
|
|
267
268
|
toOptions: ({ options: e, value: t }) => ({
|
|
268
269
|
...e,
|
|
269
270
|
manualValues: {
|
|
270
271
|
...e.manualValues,
|
|
271
|
-
ranges:
|
|
272
|
+
ranges: o(t)
|
|
272
273
|
}
|
|
273
274
|
})
|
|
274
275
|
},
|
|
@@ -324,9 +325,10 @@ var s = (e, t) => {
|
|
|
324
325
|
],
|
|
325
326
|
visibleIf: ({ options: e }) => e?.display?.legend === !0
|
|
326
327
|
},
|
|
327
|
-
e()
|
|
328
|
+
e(),
|
|
329
|
+
t({ select: { default: !0 } })
|
|
328
330
|
];
|
|
329
331
|
//#endregion
|
|
330
|
-
export {
|
|
332
|
+
export { l as default };
|
|
331
333
|
|
|
332
334
|
//# sourceMappingURL=choropleth-map-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choropleth-map-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/choropleth-map/choropleth-map-options.config.ts"],"sourcesContent":["import { type ColorValue, type ColorsClassKey, type ColorsType, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport { mapVectorTileProviders } from '../shared/utils/map-tile-providers';\nimport { calculateManualRanges, toRangesWithVal, toRangesWithValue } from '../shared/utils/color-range-utils';\nimport type { ManualValuesRange } from '../shared/types/ranges';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { ChoroplethMapViewOptions } from './choropleth-map-options';\n\ntype ChoroplethMapConfigContext = OptionsConfigContext<ChoroplethMapViewOptions>;\ntype ChoroplethMapConfigContextWithValue<T> = ChoroplethMapConfigContext & { value: T };\ntype ColorCountKey = Exclude<keyof ColorValue, 'type'>;\n\nconst getColorClassColors = (colorClass: ColorsClassKey, numberClasses: number): string[] | undefined => {\n const key = `colors${numberClasses}` as ColorCountKey;\n\n return getColorMaps()[colorClass]?.[key];\n};\n\nconst choroplethMapOptionsConfig: OptionsConfig<ChoroplethMapConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n label: 'Title',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n label: 'Legend',\n default: true\n }\n }\n ]\n },\n {\n key: 'map',\n type: 'group',\n open: true,\n children: [\n {\n key: 'enabled.zoom',\n control: {\n type: 'switch',\n label: 'Zoom',\n default: true\n }\n },\n /* {\n key: 'zoomRange',\n control: {\n type: 'range',\n label: 'Zoom range',\n default: [5, 18],\n min: 1,\n max: 22,\n step: 1\n },\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.enabled?.zoom === true\n }, */\n {\n key: 'enabled.pan',\n control: {\n type: 'switch',\n label: 'Pan',\n default: true\n }\n },\n {\n key: 'enabled.pitchBearing',\n control: {\n type: 'switch',\n label: 'Pitch & Rotate',\n tooltip: 'Use ctrl + drag',\n default: false\n }\n },\n {\n type: 'divider'\n },\n {\n key: 'vectorTileProvider',\n control: {\n type: 'picker',\n label: 'Map style',\n default: 'Basic',\n enum: [\n 'No Tiles',\n 'Basic',\n 'Bright',\n 'Dark',\n 'Fiord',\n 'Liberty',\n 'Pastel',\n 'Positron',\n 'Streets',\n 'Toner',\n 'Topographique',\n 'Voyager',\n '3D buildings'\n ],\n parseValue: (value: { name?: string } | null | undefined) => value?.name || 'Basic',\n toValue: (value: string) => mapVectorTileProviders[value as keyof typeof mapVectorTileProviders] ?? {}\n }\n }\n ]\n },\n {\n key: 'colors',\n type: 'group',\n open: true,\n children: [\n {\n key: 'opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.85,\n min: 0.2,\n max: 1,\n step: 0.01\n }\n },\n {\n key: 'colorsClassType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'sequential',\n enum: ['sequential', 'divergent', 'manual'],\n calculateValue: ({ options }: ChoroplethMapConfigContext) => {\n if (options?.colorsClass === 'manual') {\n return 'manual';\n }\n\n const colorMaps = getColorMaps();\n const type = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return type ?? 'sequential';\n },\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ColorsType>) => {\n const previousColorsClassValue = options?.colorsClass ?? 'PuBu';\n const numberClassesValue = options?.numberClasses ?? 5;\n const previousRanges = toRangesWithValue(options?.manualValues?.ranges);\n const useColorsClassToGenerate = previousColorsClassValue === 'manual' ? 'manual' : previousColorsClassValue;\n\n let newColorsClass;\n\n if (value === 'manual') {\n newColorsClass = 'manual';\n }\n else {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n if (value !== colorClassType) {\n newColorsClass = getColorMapKeys(value ?? 'sequential')[0];\n }\n }\n\n const newOptions = { ...options, colorsClass: newColorsClass };\n\n if (value === 'manual' || options?.classification === 'manual') {\n const manualRanges = calculateManualRanges(\n numberClassesValue,\n value === 'manual' ? useColorsClassToGenerate : newColorsClass,\n previousRanges\n );\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n delete newOptions?.manualValues?.ranges;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: ChoroplethMapConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'sequential')[0];\n },\n enum: ({ options }: ChoroplethMapConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'sequential');\n },\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ColorsClassKey>) => {\n const newOptions = { ...options, colorsClass: value };\n\n if (options?.classification === 'manual') {\n const newColors = getColorClassColors(value, options?.numberClasses ?? 5);\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: options?.manualValues?.ranges?.map((range: ManualValuesRange) => ({\n ...range,\n color: typeof range.val === 'number' ? newColors?.[range.val] : undefined\n }))\n };\n }\n\n return newOptions;\n }\n },\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.colorsClass !== 'manual'\n },\n {\n key: 'manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n noValues: true,\n noAlphaChannel: true,\n label: 'Manual range colors',\n hideLabel: true\n },\n calculateValue: ({ options }: ChoroplethMapConfigContext) =>\n calculateManualRanges(options?.numberClasses, options?.colorsClass, toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ManualValuesRange[]>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n }),\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.colorsClass === 'manual'\n }\n ]\n },\n {\n key: 'classification',\n type: 'group',\n open: true,\n children: [\n {\n key: 'numberClasses',\n control: {\n type: 'picker',\n label: 'Number of classes',\n default: '5',\n enum: ['3', '4', '5', '6', '7', '8', '9'],\n parseValue: (value: string | number | null | undefined) => value?.toString() ?? '5',\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<string>) => {\n const numValue = Number.parseInt(value, 10) || 5;\n\n const newOptions = { ...options, numberClasses: numValue };\n\n if (options?.classification === 'manual' || options?.colorsClass === 'manual') {\n const manualRanges = calculateManualRanges(value, options?.colorsClass, toRangesWithValue(options?.manualValues?.ranges));\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'classification',\n control: {\n type: 'picker',\n label: 'Method',\n default: 'interval',\n // TODO: add manual when being able to retrieve values from the choropleth map\n enum: ['interval', 'manual', 'quantile', 'continuous'],\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<'interval' | 'manual' | 'quantile' | 'continuous'>) => {\n const newOptions = { ...options, classification: value };\n\n if (value === 'manual' || options?.colorsClass === 'manual') {\n const manualRanges = calculateManualRanges(\n options?.numberClasses,\n options?.colorsClass,\n toRangesWithValue(options?.manualValues?.ranges)\n );\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n delete newOptions?.manualValues?.ranges;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'manualValues.rangesValues',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n noValues: false,\n readOnlyColorPicker: true,\n label: 'Manual range values',\n hideLabel: true,\n calculateValue: ({ options }: ChoroplethMapConfigContext) =>\n calculateManualRanges(options?.numberClasses, options?.colorsClass, toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ManualValuesRange[]>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n })\n },\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.classification === 'manual'\n }\n ]\n },\n {\n key: 'legend',\n type: 'group',\n open: false,\n children: [\n {\n key: 'legend.type',\n control: {\n type: 'picker',\n label: 'Type',\n default: 'bar',\n enum: ['bar', 'list']\n }\n },\n {\n key: 'legend.size',\n control: {\n type: 'radio-button-group',\n label: 'Size',\n default: 'M',\n enum: ['S', 'M', 'L']\n }\n },\n {\n key: 'legend.position',\n control: {\n type: 'position-picker',\n label: 'Position',\n default: 'bottomLeft',\n enum: ['topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left']\n }\n }\n ],\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.display?.legend === true\n },\n createInfoTooltipOptionsGroup<ChoroplethMapConfigContext>()\n];\n\nexport default choroplethMapOptionsConfig;\n"],"mappings":";;;;;AAYA,IAAM,KAAuB,GAA4B,MAAgD;CACvG,IAAM,IAAM,SAAS;CAErB,OAAO,EAAa,CAAC,CAAC,EAAW,GAAG;AACtC,GAEM,IAAwE;CAC5E;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU,CACR;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF,GACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF,CACF;CACF;CACA;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GAaA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,SAAS;IACX;GACF;GACA,EACE,MAAM,UACR;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MACJ;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;KACF;KACA,aAAa,MAAgD,GAAO,QAAQ;KAC5E,UAAU,MAAkB,EAAuB,MAAiD,CAAC;IACvG;GACF;EACF;CACF;CACA;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;IACR;GACF;GACA;IACE,KAAK;IACL,SAAS;KAC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AU;MAAY;KAAY;KACrD,YAAY,EAAE,YAAS,eAAoG;MACzH,IAAM,IAAa;OAAE,GAAG;OAAS,gBAAgB;MAAM;MAEvD,IAAI,MAAU,YAAY,GAAS,gBAAgB,UAAU;OAC3D,IAAM,IAAe,EACnB,GAAS,eACT,GAAS,aACT,EAAkB,GAAS,cAAc,MAAM,CACjD;OAEA,EAAW,eAAe;QACxB,GAAG,EAAW;QACd,QAAQ,EAAgB,CAAY;OACtC;MACF,OAEE,OAAO,GAAY,cAAc;MAGnC,OAAO;KACT;IACF;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,eAAe;KACf,UAAU;KACV,UAAU;KACV,qBAAqB;KACrB,OAAO;KACP,WAAW;KACX,iBAAiB,EAAE,iBACjB,EAAsB,GAAS,eAAe,GAAS,aAAa,EAAkB,GAAS,cAAc,MAAM,CAAC;KACtH,YAAY,EAAE,YAAS,gBAAuE;MAC5F,GAAG;MACH,cAAc;OACZ,GAAG,EAAQ;OACX,QAAQ,EAAgB,CAAK;MAC/B;KACF;IACF;IACA,YAAY,EAAE,iBAA0C,GAAS,mBAAmB;GACtF;EACF;CACF;CACA;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM,CAAC,OAAO,MAAM;IACtB;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MAAC;MAAK;MAAK;KAAG;IACtB;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MAAC;MAAW;MAAO;MAAY;MAAS;MAAe;MAAU;MAAc;KAAM;IAC7F;GACF;EACF;EACA,YAAY,EAAE,iBAA0C,GAAS,SAAS,WAAW;CACvF;CACA,EAA0D;AAC5D"}
|
|
1
|
+
{"version":3,"file":"choropleth-map-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/choropleth-map/choropleth-map-options.config.ts"],"sourcesContent":["import { type ColorValue, type ColorsClassKey, type ColorsType, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport { mapVectorTileProviders } from '../shared/utils/map-tile-providers';\nimport { calculateManualRanges, toRangesWithVal, toRangesWithValue } from '../shared/utils/color-range-utils';\nimport type { ManualValuesRange } from '../shared/types/ranges';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport { createInteractivityOptionsGroup } from '../shared/utils/interactivity-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { ChoroplethMapViewOptions } from './choropleth-map-options';\n\ntype ChoroplethMapConfigContext = OptionsConfigContext<ChoroplethMapViewOptions>;\ntype ChoroplethMapConfigContextWithValue<T> = ChoroplethMapConfigContext & { value: T };\ntype ColorCountKey = Exclude<keyof ColorValue, 'type'>;\n\nconst getColorClassColors = (colorClass: ColorsClassKey, numberClasses: number): string[] | undefined => {\n const key = `colors${numberClasses}` as ColorCountKey;\n\n return getColorMaps()[colorClass]?.[key];\n};\n\nconst choroplethMapOptionsConfig: OptionsConfig<ChoroplethMapConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n label: 'Title',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n label: 'Legend',\n default: true\n }\n }\n ]\n },\n {\n key: 'map',\n type: 'group',\n open: true,\n children: [\n {\n key: 'enabled.zoom',\n control: {\n type: 'switch',\n label: 'Zoom',\n default: true\n }\n },\n /* {\n key: 'zoomRange',\n control: {\n type: 'range',\n label: 'Zoom range',\n default: [5, 18],\n min: 1,\n max: 22,\n step: 1\n },\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.enabled?.zoom === true\n }, */\n {\n key: 'enabled.pan',\n control: {\n type: 'switch',\n label: 'Pan',\n default: true\n }\n },\n {\n key: 'enabled.pitchBearing',\n control: {\n type: 'switch',\n label: 'Pitch & Rotate',\n tooltip: 'Use ctrl + drag',\n default: false\n }\n },\n {\n type: 'divider'\n },\n {\n key: 'vectorTileProvider',\n control: {\n type: 'picker',\n label: 'Map style',\n default: 'Basic',\n enum: [\n 'No Tiles',\n 'Basic',\n 'Bright',\n 'Dark',\n 'Fiord',\n 'Liberty',\n 'Pastel',\n 'Positron',\n 'Streets',\n 'Toner',\n 'Topographique',\n 'Voyager',\n '3D buildings'\n ],\n parseValue: (value: { name?: string } | null | undefined) => value?.name || 'Basic',\n toValue: (value: string) => mapVectorTileProviders[value as keyof typeof mapVectorTileProviders] ?? {}\n }\n }\n ]\n },\n {\n key: 'colors',\n type: 'group',\n open: true,\n children: [\n {\n key: 'opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.85,\n min: 0.2,\n max: 1,\n step: 0.01\n }\n },\n {\n key: 'colorsClassType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'sequential',\n enum: ['sequential', 'divergent', 'manual'],\n calculateValue: ({ options }: ChoroplethMapConfigContext) => {\n if (options?.colorsClass === 'manual') {\n return 'manual';\n }\n\n const colorMaps = getColorMaps();\n const type = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return type ?? 'sequential';\n },\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ColorsType>) => {\n const previousColorsClassValue = options?.colorsClass ?? 'PuBu';\n const numberClassesValue = options?.numberClasses ?? 5;\n const previousRanges = toRangesWithValue(options?.manualValues?.ranges);\n const useColorsClassToGenerate = previousColorsClassValue === 'manual' ? 'manual' : previousColorsClassValue;\n\n let newColorsClass;\n\n if (value === 'manual') {\n newColorsClass = 'manual';\n }\n else {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n if (value !== colorClassType) {\n newColorsClass = getColorMapKeys(value ?? 'sequential')[0];\n }\n }\n\n const newOptions = { ...options, colorsClass: newColorsClass };\n\n if (value === 'manual' || options?.classification === 'manual') {\n const manualRanges = calculateManualRanges(\n numberClassesValue,\n value === 'manual' ? useColorsClassToGenerate : newColorsClass,\n previousRanges\n );\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n delete newOptions?.manualValues?.ranges;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: ChoroplethMapConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'sequential')[0];\n },\n enum: ({ options }: ChoroplethMapConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'sequential');\n },\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ColorsClassKey>) => {\n const newOptions = { ...options, colorsClass: value };\n\n if (options?.classification === 'manual') {\n const newColors = getColorClassColors(value, options?.numberClasses ?? 5);\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: options?.manualValues?.ranges?.map((range: ManualValuesRange) => ({\n ...range,\n color: typeof range.val === 'number' ? newColors?.[range.val] : undefined\n }))\n };\n }\n\n return newOptions;\n }\n },\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.colorsClass !== 'manual'\n },\n {\n key: 'manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n noValues: true,\n noAlphaChannel: true,\n label: 'Manual range colors',\n hideLabel: true\n },\n calculateValue: ({ options }: ChoroplethMapConfigContext) =>\n calculateManualRanges(options?.numberClasses, options?.colorsClass, toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ManualValuesRange[]>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n }),\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.colorsClass === 'manual'\n }\n ]\n },\n {\n key: 'classification',\n type: 'group',\n open: true,\n children: [\n {\n key: 'numberClasses',\n control: {\n type: 'picker',\n label: 'Number of classes',\n default: '5',\n enum: ['3', '4', '5', '6', '7', '8', '9'],\n parseValue: (value: string | number | null | undefined) => value?.toString() ?? '5',\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<string>) => {\n const numValue = Number.parseInt(value, 10) || 5;\n\n const newOptions = { ...options, numberClasses: numValue };\n\n if (options?.classification === 'manual' || options?.colorsClass === 'manual') {\n const manualRanges = calculateManualRanges(value, options?.colorsClass, toRangesWithValue(options?.manualValues?.ranges));\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'classification',\n control: {\n type: 'picker',\n label: 'Method',\n default: 'interval',\n // TODO: add manual when being able to retrieve values from the choropleth map\n enum: ['interval', 'manual', 'quantile', 'continuous'],\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<'interval' | 'manual' | 'quantile' | 'continuous'>) => {\n const newOptions = { ...options, classification: value };\n\n if (value === 'manual' || options?.colorsClass === 'manual') {\n const manualRanges = calculateManualRanges(\n options?.numberClasses,\n options?.colorsClass,\n toRangesWithValue(options?.manualValues?.ranges)\n );\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n delete newOptions?.manualValues?.ranges;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'manualValues.rangesValues',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n noValues: false,\n readOnlyColorPicker: true,\n label: 'Manual range values',\n hideLabel: true,\n calculateValue: ({ options }: ChoroplethMapConfigContext) =>\n calculateManualRanges(options?.numberClasses, options?.colorsClass, toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: ChoroplethMapConfigContextWithValue<ManualValuesRange[]>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n })\n },\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.classification === 'manual'\n }\n ]\n },\n {\n key: 'legend',\n type: 'group',\n open: false,\n children: [\n {\n key: 'legend.type',\n control: {\n type: 'picker',\n label: 'Type',\n default: 'bar',\n enum: ['bar', 'list']\n }\n },\n {\n key: 'legend.size',\n control: {\n type: 'radio-button-group',\n label: 'Size',\n default: 'M',\n enum: ['S', 'M', 'L']\n }\n },\n {\n key: 'legend.position',\n control: {\n type: 'position-picker',\n label: 'Position',\n default: 'bottomLeft',\n enum: ['topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left']\n }\n }\n ],\n visibleIf: ({ options }: ChoroplethMapConfigContext) => options?.display?.legend === true\n },\n createInfoTooltipOptionsGroup<ChoroplethMapConfigContext>(),\n createInteractivityOptionsGroup<ChoroplethMapConfigContext>({ select: { default: true } })\n];\n\nexport default choroplethMapOptionsConfig;\n"],"mappings":";;;;;;AAaA,IAAM,KAAuB,GAA4B,MAAgD;CACvG,IAAM,IAAM,SAAS;CAErB,OAAO,EAAa,CAAC,CAAC,EAAW,GAAG;AACtC,GAEM,IAAwE;CAC5E;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU,CACR;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF,GACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF,CACF;CACF;CACA;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GAaA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SA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AAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM,CAAC,OAAO,MAAM;IACtB;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MAAC;MAAK;MAAK;KAAG;IACtB;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MAAC;MAAW;MAAO;MAAY;MAAS;MAAe;MAAU;MAAc;KAAM;IAC7F;GACF;EACF;EACA,YAAY,EAAE,iBAA0C,GAAS,SAAS,WAAW;CACvF;CACA,EAA0D;CAC1D,EAA4D,EAAE,QAAQ,EAAE,SAAS,GAAK,EAAE,CAAC;AAC3F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require("../shared/utils/info-tooltip-options.config.cjs"),t=require("../shared/utils/interactivity-options.config.cjs");var n=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.labels`,control:{type:`switch`,label:`Show labels`,default:!0}},{key:`circles.colorByDepth`,control:{type:`switch`,label:`Color by level depth`,default:!0}}]},e.createInfoTooltipOptionsGroup(),t.createInteractivityOptionsGroup({select:{default:!0}})];exports.default=n;
|
|
2
2
|
//# sourceMappingURL=circle-pack-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circle-pack-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/circle-pack-chart/circle-pack-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig } from '../shared/utils/options-config.types';\n\nconst circlePackChartOptionsConfig: OptionsConfig = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n label: 'Title',\n default: true\n }\n },\n {\n key: 'display.labels',\n control: {\n type: 'switch',\n label: 'Show labels',\n default: true\n }\n },\n {\n key: 'circles.colorByDepth',\n control: {\n type: 'switch',\n label: 'Color by level depth',\n default: true\n }\n }\n ]\n },\n createInfoTooltipOptionsGroup()\n];\n\nexport default circlePackChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"circle-pack-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/circle-pack-chart/circle-pack-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport { createInteractivityOptionsGroup } from '../shared/utils/interactivity-options.config';\nimport type { OptionsConfig } from '../shared/utils/options-config.types';\n\nconst circlePackChartOptionsConfig: OptionsConfig = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n label: 'Title',\n default: true\n }\n },\n {\n key: 'display.labels',\n control: {\n type: 'switch',\n label: 'Show labels',\n default: true\n }\n },\n {\n key: 'circles.colorByDepth',\n control: {\n type: 'switch',\n label: 'Color by level depth',\n default: true\n }\n }\n ]\n },\n createInfoTooltipOptionsGroup(),\n createInteractivityOptionsGroup({ select: { default: true } })\n];\n\nexport default circlePackChartOptionsConfig;\n"],"mappings":"iIAIA,IAAM,EAA8C,CAClD,CACE,IAAK,UACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,gBACL,QAAS,CACP,KAAM,SACN,MAAO,QACP,QAAS,EACX,CACF,EACA,CACE,IAAK,iBACL,QAAS,CACP,KAAM,SACN,MAAO,cACP,QAAS,EACX,CACF,EACA,CACE,IAAK,uBACL,QAAS,CACP,KAAM,SACN,MAAO,uBACP,QAAS,EACX,CACF,CACF,CACF,EACA,EAAA,8BAA8B,EAC9B,EAAA,gCAAgC,CAAE,OAAQ,CAAE,QAAS,EAAK,CAAE,CAAC,CAC/D"}
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
import { createInfoTooltipOptionsGroup as e } from "../shared/utils/info-tooltip-options.config.js";
|
|
2
|
+
import { createInteractivityOptionsGroup as t } from "../shared/utils/interactivity-options.config.js";
|
|
2
3
|
//#region src/lib/circle-pack-chart/circle-pack-chart-options.config.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
var n = [
|
|
5
|
+
{
|
|
6
|
+
key: "general",
|
|
7
|
+
type: "group",
|
|
8
|
+
open: !0,
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
key: "display.title",
|
|
12
|
+
control: {
|
|
13
|
+
type: "switch",
|
|
14
|
+
label: "Title",
|
|
15
|
+
default: !0
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
key: "display.labels",
|
|
20
|
+
control: {
|
|
21
|
+
type: "switch",
|
|
22
|
+
label: "Show labels",
|
|
23
|
+
default: !0
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: "circles.colorByDepth",
|
|
28
|
+
control: {
|
|
29
|
+
type: "switch",
|
|
30
|
+
label: "Color by level depth",
|
|
31
|
+
default: !0
|
|
32
|
+
}
|
|
14
33
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
label: "Show labels",
|
|
21
|
-
default: !0
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: "circles.colorByDepth",
|
|
26
|
-
control: {
|
|
27
|
-
type: "switch",
|
|
28
|
-
label: "Color by level depth",
|
|
29
|
-
default: !0
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}, e()];
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
e(),
|
|
37
|
+
t({ select: { default: !0 } })
|
|
38
|
+
];
|
|
34
39
|
//#endregion
|
|
35
|
-
export {
|
|
40
|
+
export { n as default };
|
|
36
41
|
|
|
37
42
|
//# sourceMappingURL=circle-pack-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circle-pack-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/circle-pack-chart/circle-pack-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig } from '../shared/utils/options-config.types';\n\nconst circlePackChartOptionsConfig: OptionsConfig = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n label: 'Title',\n default: true\n }\n },\n {\n key: 'display.labels',\n control: {\n type: 'switch',\n label: 'Show labels',\n default: true\n }\n },\n {\n key: 'circles.colorByDepth',\n control: {\n type: 'switch',\n label: 'Color by level depth',\n default: true\n }\n }\n ]\n },\n createInfoTooltipOptionsGroup()\n];\n\nexport default circlePackChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"circle-pack-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/circle-pack-chart/circle-pack-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport { createInteractivityOptionsGroup } from '../shared/utils/interactivity-options.config';\nimport type { OptionsConfig } from '../shared/utils/options-config.types';\n\nconst circlePackChartOptionsConfig: OptionsConfig = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n label: 'Title',\n default: true\n }\n },\n {\n key: 'display.labels',\n control: {\n type: 'switch',\n label: 'Show labels',\n default: true\n }\n },\n {\n key: 'circles.colorByDepth',\n control: {\n type: 'switch',\n label: 'Color by level depth',\n default: true\n }\n }\n ]\n },\n createInfoTooltipOptionsGroup(),\n createInteractivityOptionsGroup({ select: { default: true } })\n];\n\nexport default circlePackChartOptionsConfig;\n"],"mappings":";;;AAIA,IAAM,IAA8C;CAClD;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;EACF;CACF;CACA,EAA8B;CAC9B,EAAgC,EAAE,QAAQ,EAAE,SAAS,GAAK,EAAE,CAAC;AAC/D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../helpers.cjs"),t=require("../shared/utils/axis-options.config.cjs"),n=require("../shared/utils/guidelines-options.config.cjs"),r=require("../shared/utils/info-tooltip-options.config.cjs");var
|
|
1
|
+
const e=require("../helpers.cjs"),t=require("../shared/utils/axis-options.config.cjs"),n=require("../shared/utils/guidelines-options.config.cjs"),r=require("../shared/utils/info-tooltip-options.config.cjs"),i=require("../shared/utils/interactivity-options.config.cjs");var a=({slots:e})=>Array.isArray(e)&&e?.length>0?(e?.find(e=>e?.name===`legend`)?.content?.length??0)>0||(e?.find(e=>e?.name===`measure`)?.content?.length??0)>1:!1,o=({slots:e})=>Array.isArray(e)&&e?.length>0?e?.find(e=>e?.name===`legend`)?.content?.length===0&&(e?.find(e=>e?.name===`measure`)?.content?.length??0)<=1:!1,s=[{key:`general`,type:`group`,open:!0,children:[{key:`mode`,control:{type:`picker`,default:`grouped`,enum:[`grouped`,`stacked`,`100`]},visibleIf:a},{type:`divider`,visibleIf:a},{key:`display.title`,control:{type:`switch`,default:!0}},{key:`display.legend`,control:{type:`switch`,default:!0},visibleIf:a},{key:`display.modeOption`,control:{type:`switch`,default:!1},visibleIf:a},{key:`bars.label`,control:{type:`picker`,default:`none`,enum:[`none`,`absolute`,`percentage`,`percentageLegend`,`percentageCategory`,`percentageMax`]}},{key:`categories.colored`,control:{type:`switch`,default:!1},visibleIf:o},{key:`bars.roundedCorners`,control:{type:`slider`,default:({theme:e})=>e?.itemSpecific?.rounding,min:0,max:20,step:1,extraLabel:({options:e,theme:t})=>typeof t?.itemSpecific?.rounding==`number`?typeof e?.bars?.roundedCorners==`number`?`reset`:`auto`:null,extraLabelHasClickAction:({options:e,theme:t})=>typeof t?.itemSpecific?.rounding==`number`&&typeof e?.bars?.roundedCorners==`number`,extraLabelClickAction:({options:e})=>{let t={...e};return delete t?.bars?.roundedCorners,{value:null,options:t}}}},{key:`color`,control:{type:`color-picker`,default:({theme:t})=>e.getThemeMainColor(t),extraLabel:({options:t,theme:n})=>e.getThemeMainColorResetLabel(t,n,`color`),extraLabelHasClickAction:({options:t,theme:n})=>e.getThemeMainColorExtraLabelHasClickAction(t,n,`color`),extraLabelClickAction:({options:t,theme:n})=>e.getThemeMainColorExtraLabelClickAction(t,n,`color`)},visibleIf:e=>o(e)&&e.options?.categories?.colored!==!0}]},{key:`order`,type:`group`,label:`Order & Limit`,open:!0,children:[{key:`ranking.active`,control:{type:`switch`,label:`Limit to`,default:!1}},{key:`ranking.direction`,control:{type:`picker`,label:`Direction`,default:`top`,enum:[`top`,`bottom`]},visibleIf:({options:e})=>e?.ranking?.active===!0},{key:`ranking.number`,control:{type:`number-field`,label:`Number`,default:10,min:1,max:999999},visibleIf:({options:e})=>e?.ranking?.active===!0},{key:`sort.by`,control:{type:`picker`,label:`Order by`,default:`measure`,enum:[`measure`,`category`]}},{key:`sort.direction`,control:{type:`picker`,label:`Direction`,default:`desc`,enum:[`asc`,`desc`]}},{key:`limit.number`,control:{type:`number-field`,label:`Limit`,default:1e5,min:1,max:1e5}}]},t.createAxesOptionsGroup([{axis:`x`,role:`category`,color:!0,label:!0,tickMode:!0,gridlines:!0},{axis:`y`,role:`measure`,scale:!0,manualRange:{key:`manualAxesRange`},color:!0,label:!0,tickDensity:!0,tickMode:!0,gridlines:!0}]),{key:`legend`,type:`group`,open:!1,children:[{key:`legend.position`,control:{label:`Position`,type:`position-picker`,default:`topRight`,enum:[`topLeft`,`top`,`topRight`,`right`,`bottomRight`,`bottom`,`bottomLeft`,`left`]}},{key:`legend.customOrder`,control:{label:`Custom order`,description:`Drag items in the chart legend to set the order.`,type:`switch`,default:!1}},{key:`interactivity.legendReorder`,control:{label:`Allow viewers to reorder`,type:`switch`,default:!1},visibleIf:({options:e})=>e?.legend?.customOrder===!0}],visibleIf:a},n.createGuidelinesOptionsGroup(n.cartesianGuidelineLineTypes),r.createInfoTooltipOptionsGroup(),i.createInteractivityOptionsGroup({select:{default:!0}})];exports.default=s;
|
|
2
2
|
//# sourceMappingURL=column-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createAxesOptionsGroup } from '../shared/utils/axis-options.config';\nimport {\n cartesianGuidelineLineTypes,\n createGuidelinesOptionsGroup\n} from '../shared/utils/guidelines-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { ColumnChartViewOptions } from './column-chart-options';\n\ntype ColumnChartConfigContext = OptionsConfigContext<ColumnChartViewOptions>;\n\nconst hasLegendOrMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n (slots?.find((s) => s?.name === 'legend')?.content?.length ?? 0) > 0\n || (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) > 1\n );\n }\n\n return false;\n};\n\nconst hasNoLegendAndNoMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n slots?.find((s) => s?.name === 'legend')?.content?.length === 0\n && (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) <= 1\n );\n }\n\n return false;\n};\n\nconst columnChartOptionsConfig: OptionsConfig<ColumnChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'grouped',\n enum: ['grouped', 'stacked', '100']\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n type: 'divider',\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.title',\n control: {\n type: 'switch',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n default: true\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.modeOption',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'bars.label',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage', 'percentageLegend', 'percentageCategory', 'percentageMax']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasNoLegendAndNoMultipleMeasure\n },\n {\n key: 'bars.roundedCorners',\n control: {\n type: 'slider',\n default: ({ theme }: ColumnChartConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: ColumnChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.bars?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) => {\n if (\n typeof theme?.itemSpecific?.rounding !== 'number'\n || typeof options?.bars?.roundedCorners !== 'number'\n ) {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: ColumnChartConfigContext) => {\n const newOptions = { ...options };\n\n delete newOptions?.bars?.roundedCorners;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n default: ({ theme }: ColumnChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: (context: ColumnChartConfigContext) =>\n hasNoLegendAndNoMultipleMeasure(context) && context.options?.categories?.colored !== true\n }\n ]\n },\n {\n key: 'order',\n type: 'group',\n label: 'Order & Limit',\n open: true,\n children: [\n {\n key: 'ranking.active',\n control: {\n type: 'switch',\n label: 'Limit to',\n default: false\n }\n },\n {\n key: 'ranking.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'top',\n enum: ['top', 'bottom']\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'ranking.number',\n control: {\n type: 'number-field',\n label: 'Number',\n default: 10,\n min: 1,\n max: 999999\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order by',\n default: 'measure',\n enum: ['measure', 'category']\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'desc',\n enum: ['asc', 'desc']\n }\n },\n {\n key: 'limit.number',\n control: {\n type: 'number-field',\n label: 'Limit',\n default: 100000,\n min: 1,\n max: 100000\n }\n }\n ]\n },\n createAxesOptionsGroup<ColumnChartConfigContext>([\n { axis: 'x', role: 'category', color: true, label: true, tickMode: true, gridlines: true },\n { axis: 'y', role: 'measure', scale: true, manualRange: { key: 'manualAxesRange' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ]),\n {\n key: 'legend',\n type: 'group',\n open: false,\n children: [\n {\n key: 'legend.position',\n control: {\n label: 'Position',\n type: 'position-picker',\n default: 'topRight',\n enum: ['topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left']\n }\n },\n {\n key: 'legend.customOrder',\n control: {\n label: 'Custom order',\n description: 'Drag items in the chart legend to set the order.',\n type: 'switch',\n default: false\n }\n },\n {\n key: 'interactivity.legendReorder',\n control: {\n label: 'Allow viewers to reorder',\n type: 'switch',\n default: false\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegendOrMultipleMeasure\n },\n createGuidelinesOptionsGroup(cartesianGuidelineLineTypes),\n createInfoTooltipOptionsGroup<ColumnChartConfigContext>()\n];\n\nexport default columnChartOptionsConfig;\n"],"mappings":"+MAiBA,IAAM,GAA8B,CAAE,WAChC,MAAM,QAAQ,CAAK,GAAK,GAAO,OAAS,GAEvC,GAAO,KAAM,GAAM,GAAG,OAAS,QAAQ,CAAC,EAAE,SAAS,QAAU,GAAK,IAC/D,GAAO,KAAM,GAAM,GAAG,OAAS,SAAS,CAAC,EAAE,SAAS,QAAU,GAAK,EAIpE,GAGH,GAAmC,CAAE,WACrC,MAAM,QAAQ,CAAK,GAAK,GAAO,OAAS,EAExC,GAAO,KAAM,GAAM,GAAG,OAAS,QAAQ,CAAC,EAAE,SAAS,SAAW,IAC1D,GAAO,KAAM,GAAM,GAAG,OAAS,SAAS,CAAC,EAAE,SAAS,QAAU,IAAM,EAIrE,GAGH,EAAoE,CACxE,CACE,IAAK,UACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,OACL,QAAS,CACP,KAAM,SACN,QAAS,UACT,KAAM,CAAC,UAAW,UAAW,KAAK,CACpC,EACA,UAAW,CACb,EACA,CACE,KAAM,UACN,UAAW,CACb,EACA,CACE,IAAK,gBACL,QAAS,CACP,KAAM,SACN,QAAS,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AwC,GAAS,QAAQ,cAAgB,EACzF,CACF,EACA,UAAW,CACb,EACA,EAAA,6BAA6B,EAAA,2BAA2B,EACxD,EAAA,8BAAwD,CAC1D"}
|
|
1
|
+
{"version":3,"file":"column-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createAxesOptionsGroup } from '../shared/utils/axis-options.config';\nimport {\n cartesianGuidelineLineTypes,\n createGuidelinesOptionsGroup\n} from '../shared/utils/guidelines-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport { createInteractivityOptionsGroup } from '../shared/utils/interactivity-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { ColumnChartViewOptions } from './column-chart-options';\n\ntype ColumnChartConfigContext = OptionsConfigContext<ColumnChartViewOptions>;\n\nconst hasLegendOrMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n (slots?.find((s) => s?.name === 'legend')?.content?.length ?? 0) > 0\n || (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) > 1\n );\n }\n\n return false;\n};\n\nconst hasNoLegendAndNoMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n slots?.find((s) => s?.name === 'legend')?.content?.length === 0\n && (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) <= 1\n );\n }\n\n return false;\n};\n\nconst columnChartOptionsConfig: OptionsConfig<ColumnChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'grouped',\n enum: ['grouped', 'stacked', '100']\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n type: 'divider',\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.title',\n control: {\n type: 'switch',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n default: true\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.modeOption',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'bars.label',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage', 'percentageLegend', 'percentageCategory', 'percentageMax']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasNoLegendAndNoMultipleMeasure\n },\n {\n key: 'bars.roundedCorners',\n control: {\n type: 'slider',\n default: ({ theme }: ColumnChartConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: ColumnChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.bars?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) => {\n if (\n typeof theme?.itemSpecific?.rounding !== 'number'\n || typeof options?.bars?.roundedCorners !== 'number'\n ) {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: ColumnChartConfigContext) => {\n const newOptions = { ...options };\n\n delete newOptions?.bars?.roundedCorners;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n default: ({ theme }: ColumnChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: (context: ColumnChartConfigContext) =>\n hasNoLegendAndNoMultipleMeasure(context) && context.options?.categories?.colored !== true\n }\n ]\n },\n {\n key: 'order',\n type: 'group',\n label: 'Order & Limit',\n open: true,\n children: [\n {\n key: 'ranking.active',\n control: {\n type: 'switch',\n label: 'Limit to',\n default: false\n }\n },\n {\n key: 'ranking.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'top',\n enum: ['top', 'bottom']\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'ranking.number',\n control: {\n type: 'number-field',\n label: 'Number',\n default: 10,\n min: 1,\n max: 999999\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order by',\n default: 'measure',\n enum: ['measure', 'category']\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'desc',\n enum: ['asc', 'desc']\n }\n },\n {\n key: 'limit.number',\n control: {\n type: 'number-field',\n label: 'Limit',\n default: 100000,\n min: 1,\n max: 100000\n }\n }\n ]\n },\n createAxesOptionsGroup<ColumnChartConfigContext>([\n { axis: 'x', role: 'category', color: true, label: true, tickMode: true, gridlines: true },\n { axis: 'y', role: 'measure', scale: true, manualRange: { key: 'manualAxesRange' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ]),\n {\n key: 'legend',\n type: 'group',\n open: false,\n children: [\n {\n key: 'legend.position',\n control: {\n label: 'Position',\n type: 'position-picker',\n default: 'topRight',\n enum: ['topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left']\n }\n },\n {\n key: 'legend.customOrder',\n control: {\n label: 'Custom order',\n description: 'Drag items in the chart legend to set the order.',\n type: 'switch',\n default: false\n }\n },\n {\n key: 'interactivity.legendReorder',\n control: {\n label: 'Allow viewers to reorder',\n type: 'switch',\n default: false\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegendOrMultipleMeasure\n },\n createGuidelinesOptionsGroup(cartesianGuidelineLineTypes),\n createInfoTooltipOptionsGroup<ColumnChartConfigContext>(),\n createInteractivityOptionsGroup<ColumnChartConfigContext>({ select: { default: true } })\n];\n\nexport default columnChartOptionsConfig;\n"],"mappings":"6QAkBA,IAAM,GAA8B,CAAE,WAChC,MAAM,QAAQ,CAAK,GAAK,GAAO,OAAS,GAEvC,GAAO,KAAM,GAAM,GAAG,OAAS,QAAQ,CAAC,EAAE,SAAS,QAAU,GAAK,IAC/D,GAAO,KAAM,GAAM,GAAG,OAAS,SAAS,CAAC,EAAE,SAAS,QAAU,GAAK,EAIpE,GAGH,GAAmC,CAAE,WACrC,MAAM,QAAQ,CAAK,GAAK,GAAO,OAAS,EAExC,GAAO,KAAM,GAAM,GAAG,OAAS,QAAQ,CAAC,EAAE,SAAS,SAAW,IAC1D,GAAO,KAAM,GAAM,GAAG,OAAS,SAAS,CAAC,EAAE,SAAS,QAAU,IAAM,EAIrE,GAGH,EAAoE,CACxE,CACE,IAAK,UACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,OACL,QAAS,CACP,KAAM,SACN,QAAS,UACT,KAAM,CAAC,UAAW,UAAW,KAAK,CACpC,EACA,UAAW,CACb,EACA,CACE,KAAM,UACN,UAAW,CACb,EACA,CACE,IAAK,gBACL,QAAS,CACP,KAAM,SACN,QAAS,EACX,CACF,EACA,CACE,IAAK,iBACL,QAAS,CACP,KAAM,SACN,QAAS,EACX,EACA,UAAW,CACb,EACA,CACE,IAAK,qBACL,QAAS,CACP,KAAM,SACN,QAAS,EACX,EACA,UAAW,CACb,EACA,CACE,IAAK,aACL,QAAS,CACP,KAAM,SACN,QAAS,OACT,KAAM,CAAC,OAAQ,WAAY,aAAc,mBAAoB,qBAAsB,eAAe,CACpG,CACF,E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MACP,EACA,WAAY,CAAE,aAAwC,GAAS,SAAS,SAAW,EACrF,EACA,CACE,IAAK,UACL,QAAS,CACP,KAAM,SACN,MAAO,WACP,QAAS,UACT,KAAM,CAAC,UAAW,UAAU,CAC9B,CACF,EACA,CACE,IAAK,iBACL,QAAS,CACP,KAAM,SACN,MAAO,YACP,QAAS,OACT,KAAM,CAAC,MAAO,MAAM,CACtB,CACF,EACA,CACE,IAAK,eACL,QAAS,CACP,KAAM,eACN,MAAO,QACP,QAAS,IACT,IAAK,EACL,IAAK,GACP,CACF,CACF,CACF,EACA,EAAA,uBAAiD,CAC/C,CAAE,KAAM,IAAK,KAAM,WAAY,MAAO,GAAM,MAAO,GAAM,SAAU,GAAM,UAAW,EAAK,EACzF,CAAE,KAAM,IAAK,KAAM,UAAW,MAAO,GAAM,YAAa,CAAE,IAAK,iBAAkB,EAAG,MAAO,GAAM,MAAO,GAAM,YAAa,GAAM,SAAU,GAAM,UAAW,EAAK,CACnK,CAAC,EACD,CACE,IAAK,SACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,kBACL,QAAS,CACP,MAAO,WACP,KAAM,kBACN,QAAS,WACT,KAAM,CAAC,UAAW,MAAO,WAAY,QAAS,cAAe,SAAU,aAAc,MAAM,CAC7F,CACF,EACA,CACE,IAAK,qBACL,QAAS,CACP,MAAO,eACP,YAAa,mDACb,KAAM,SACN,QAAS,EACX,CACF,EACA,CACE,IAAK,8BACL,QAAS,CACP,MAAO,2BACP,KAAM,SACN,QAAS,EACX,EACA,WAAY,CAAE,aAAwC,GAAS,QAAQ,cAAgB,EACzF,CACF,EACA,UAAW,CACb,EACA,EAAA,6BAA6B,EAAA,2BAA2B,EACxD,EAAA,8BAAwD,EACxD,EAAA,gCAA0D,CAAE,OAAQ,CAAE,QAAS,EAAK,CAAE,CAAC,CACzF"}
|
|
@@ -2,8 +2,9 @@ import { getThemeMainColor as e, getThemeMainColorExtraLabelClickAction as t, ge
|
|
|
2
2
|
import { createAxesOptionsGroup as i } from "../shared/utils/axis-options.config.js";
|
|
3
3
|
import { cartesianGuidelineLineTypes as a, createGuidelinesOptionsGroup as o } from "../shared/utils/guidelines-options.config.js";
|
|
4
4
|
import { createInfoTooltipOptionsGroup as s } from "../shared/utils/info-tooltip-options.config.js";
|
|
5
|
+
import { createInteractivityOptionsGroup as c } from "../shared/utils/interactivity-options.config.js";
|
|
5
6
|
//#region src/lib/column-chart/column-chart-options.config.ts
|
|
6
|
-
var
|
|
7
|
+
var l = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?.name === "legend")?.content?.length ?? 0) > 0 || (e?.find((e) => e?.name === "measure")?.content?.length ?? 0) > 1 : !1, u = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? e?.find((e) => e?.name === "legend")?.content?.length === 0 && (e?.find((e) => e?.name === "measure")?.content?.length ?? 0) <= 1 : !1, d = [
|
|
7
8
|
{
|
|
8
9
|
key: "general",
|
|
9
10
|
type: "group",
|
|
@@ -20,11 +21,11 @@ var c = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?
|
|
|
20
21
|
"100"
|
|
21
22
|
]
|
|
22
23
|
},
|
|
23
|
-
visibleIf:
|
|
24
|
+
visibleIf: l
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
type: "divider",
|
|
27
|
-
visibleIf:
|
|
28
|
+
visibleIf: l
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
31
|
key: "display.title",
|
|
@@ -39,7 +40,7 @@ var c = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?
|
|
|
39
40
|
type: "switch",
|
|
40
41
|
default: !0
|
|
41
42
|
},
|
|
42
|
-
visibleIf:
|
|
43
|
+
visibleIf: l
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
key: "display.modeOption",
|
|
@@ -47,7 +48,7 @@ var c = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?
|
|
|
47
48
|
type: "switch",
|
|
48
49
|
default: !1
|
|
49
50
|
},
|
|
50
|
-
visibleIf:
|
|
51
|
+
visibleIf: l
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
key: "bars.label",
|
|
@@ -70,7 +71,7 @@ var c = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?
|
|
|
70
71
|
type: "switch",
|
|
71
72
|
default: !1
|
|
72
73
|
},
|
|
73
|
-
visibleIf:
|
|
74
|
+
visibleIf: u
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
77
|
key: "bars.roundedCorners",
|
|
@@ -100,7 +101,7 @@ var c = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?
|
|
|
100
101
|
extraLabelHasClickAction: ({ options: e, theme: t }) => n(e, t, "color"),
|
|
101
102
|
extraLabelClickAction: ({ options: e, theme: n }) => t(e, n, "color")
|
|
102
103
|
},
|
|
103
|
-
visibleIf: (e) =>
|
|
104
|
+
visibleIf: (e) => u(e) && e.options?.categories?.colored !== !0
|
|
104
105
|
}
|
|
105
106
|
]
|
|
106
107
|
},
|
|
@@ -229,12 +230,13 @@ var c = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?
|
|
|
229
230
|
visibleIf: ({ options: e }) => e?.legend?.customOrder === !0
|
|
230
231
|
}
|
|
231
232
|
],
|
|
232
|
-
visibleIf:
|
|
233
|
+
visibleIf: l
|
|
233
234
|
},
|
|
234
235
|
o(a),
|
|
235
|
-
s()
|
|
236
|
+
s(),
|
|
237
|
+
c({ select: { default: !0 } })
|
|
236
238
|
];
|
|
237
239
|
//#endregion
|
|
238
|
-
export {
|
|
240
|
+
export { d as default };
|
|
239
241
|
|
|
240
242
|
//# sourceMappingURL=column-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createAxesOptionsGroup } from '../shared/utils/axis-options.config';\nimport {\n cartesianGuidelineLineTypes,\n createGuidelinesOptionsGroup\n} from '../shared/utils/guidelines-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { ColumnChartViewOptions } from './column-chart-options';\n\ntype ColumnChartConfigContext = OptionsConfigContext<ColumnChartViewOptions>;\n\nconst hasLegendOrMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n (slots?.find((s) => s?.name === 'legend')?.content?.length ?? 0) > 0\n || (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) > 1\n );\n }\n\n return false;\n};\n\nconst hasNoLegendAndNoMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n slots?.find((s) => s?.name === 'legend')?.content?.length === 0\n && (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) <= 1\n );\n }\n\n return false;\n};\n\nconst columnChartOptionsConfig: OptionsConfig<ColumnChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'grouped',\n enum: ['grouped', 'stacked', '100']\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n type: 'divider',\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.title',\n control: {\n type: 'switch',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n default: true\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.modeOption',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'bars.label',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage', 'percentageLegend', 'percentageCategory', 'percentageMax']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasNoLegendAndNoMultipleMeasure\n },\n {\n key: 'bars.roundedCorners',\n control: {\n type: 'slider',\n default: ({ theme }: ColumnChartConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: ColumnChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.bars?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) => {\n if (\n typeof theme?.itemSpecific?.rounding !== 'number'\n || typeof options?.bars?.roundedCorners !== 'number'\n ) {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: ColumnChartConfigContext) => {\n const newOptions = { ...options };\n\n delete newOptions?.bars?.roundedCorners;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n default: ({ theme }: ColumnChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: (context: ColumnChartConfigContext) =>\n hasNoLegendAndNoMultipleMeasure(context) && context.options?.categories?.colored !== true\n }\n ]\n },\n {\n key: 'order',\n type: 'group',\n label: 'Order & Limit',\n open: true,\n children: [\n {\n key: 'ranking.active',\n control: {\n type: 'switch',\n label: 'Limit to',\n default: false\n }\n },\n {\n key: 'ranking.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'top',\n enum: ['top', 'bottom']\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'ranking.number',\n control: {\n type: 'number-field',\n label: 'Number',\n default: 10,\n min: 1,\n max: 999999\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order by',\n default: 'measure',\n enum: ['measure', 'category']\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'desc',\n enum: ['asc', 'desc']\n }\n },\n {\n key: 'limit.number',\n control: {\n type: 'number-field',\n label: 'Limit',\n default: 100000,\n min: 1,\n max: 100000\n }\n }\n ]\n },\n createAxesOptionsGroup<ColumnChartConfigContext>([\n { axis: 'x', role: 'category', color: true, label: true, tickMode: true, gridlines: true },\n { axis: 'y', role: 'measure', scale: true, manualRange: { key: 'manualAxesRange' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ]),\n {\n key: 'legend',\n type: 'group',\n open: false,\n children: [\n {\n key: 'legend.position',\n control: {\n label: 'Position',\n type: 'position-picker',\n default: 'topRight',\n enum: ['topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left']\n }\n },\n {\n key: 'legend.customOrder',\n control: {\n label: 'Custom order',\n description: 'Drag items in the chart legend to set the order.',\n type: 'switch',\n default: false\n }\n },\n {\n key: 'interactivity.legendReorder',\n control: {\n label: 'Allow viewers to reorder',\n type: 'switch',\n default: false\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegendOrMultipleMeasure\n },\n createGuidelinesOptionsGroup(cartesianGuidelineLineTypes),\n createInfoTooltipOptionsGroup<ColumnChartConfigContext>()\n];\n\nexport default columnChartOptionsConfig;\n"],"mappings":";;;;;AAiBA,IAAM,KA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ACP;GACF;EACF;CACF;CACA,EAAiD,CAC/C;EAAE,MAAM;EAAK,MAAM;EAAY,OAAO;EAAM,OAAO;EAAM,UAAU;EAAM,WAAW;CAAK,GACzF;EAAE,MAAM;EAAK,MAAM;EAAW,OAAO;EAAM,aAAa,EAAE,KAAK,kBAAkB;EAAG,OAAO;EAAM,OAAO;EAAM,aAAa;EAAM,UAAU;EAAM,WAAW;CAAK,CACnK,CAAC;CACD;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,OAAO;KACP,MAAM;KACN,SAAS;KACT,MAAM;MAAC;MAAW;MAAO;MAAY;MAAS;MAAe;MAAU;MAAc;KAAM;IAC7F;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,OAAO;KACP,aAAa;KACb,MAAM;KACN,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,OAAO;KACP,MAAM;KACN,SAAS;IACX;IACA,YAAY,EAAE,iBAAwC,GAAS,QAAQ,gBAAgB;GACzF;EACF;EACA,WAAW;CACb;CACA,EAA6B,CAA2B;CACxD,EAAwD;AAC1D"}
|
|
1
|
+
{"version":3,"file":"column-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/column-chart/column-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createAxesOptionsGroup } from '../shared/utils/axis-options.config';\nimport {\n cartesianGuidelineLineTypes,\n createGuidelinesOptionsGroup\n} from '../shared/utils/guidelines-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport { createInteractivityOptionsGroup } from '../shared/utils/interactivity-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { ColumnChartViewOptions } from './column-chart-options';\n\ntype ColumnChartConfigContext = OptionsConfigContext<ColumnChartViewOptions>;\n\nconst hasLegendOrMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n (slots?.find((s) => s?.name === 'legend')?.content?.length ?? 0) > 0\n || (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) > 1\n );\n }\n\n return false;\n};\n\nconst hasNoLegendAndNoMultipleMeasure = ({ slots }: Pick<ColumnChartConfigContext, 'slots'>): boolean => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (\n slots?.find((s) => s?.name === 'legend')?.content?.length === 0\n && (slots?.find((s) => s?.name === 'measure')?.content?.length ?? 0) <= 1\n );\n }\n\n return false;\n};\n\nconst columnChartOptionsConfig: OptionsConfig<ColumnChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'grouped',\n enum: ['grouped', 'stacked', '100']\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n type: 'divider',\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.title',\n control: {\n type: 'switch',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n default: true\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'display.modeOption',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasLegendOrMultipleMeasure\n },\n {\n key: 'bars.label',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage', 'percentageLegend', 'percentageCategory', 'percentageMax']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n default: false\n },\n visibleIf: hasNoLegendAndNoMultipleMeasure\n },\n {\n key: 'bars.roundedCorners',\n control: {\n type: 'slider',\n default: ({ theme }: ColumnChartConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: ColumnChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.bars?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) => {\n if (\n typeof theme?.itemSpecific?.rounding !== 'number'\n || typeof options?.bars?.roundedCorners !== 'number'\n ) {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: ColumnChartConfigContext) => {\n const newOptions = { ...options };\n\n delete newOptions?.bars?.roundedCorners;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n default: ({ theme }: ColumnChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: ColumnChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: (context: ColumnChartConfigContext) =>\n hasNoLegendAndNoMultipleMeasure(context) && context.options?.categories?.colored !== true\n }\n ]\n },\n {\n key: 'order',\n type: 'group',\n label: 'Order & Limit',\n open: true,\n children: [\n {\n key: 'ranking.active',\n control: {\n type: 'switch',\n label: 'Limit to',\n default: false\n }\n },\n {\n key: 'ranking.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'top',\n enum: ['top', 'bottom']\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'ranking.number',\n control: {\n type: 'number-field',\n label: 'Number',\n default: 10,\n min: 1,\n max: 999999\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order by',\n default: 'measure',\n enum: ['measure', 'category']\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'desc',\n enum: ['asc', 'desc']\n }\n },\n {\n key: 'limit.number',\n control: {\n type: 'number-field',\n label: 'Limit',\n default: 100000,\n min: 1,\n max: 100000\n }\n }\n ]\n },\n createAxesOptionsGroup<ColumnChartConfigContext>([\n { axis: 'x', role: 'category', color: true, label: true, tickMode: true, gridlines: true },\n { axis: 'y', role: 'measure', scale: true, manualRange: { key: 'manualAxesRange' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ]),\n {\n key: 'legend',\n type: 'group',\n open: false,\n children: [\n {\n key: 'legend.position',\n control: {\n label: 'Position',\n type: 'position-picker',\n default: 'topRight',\n enum: ['topLeft', 'top', 'topRight', 'right', 'bottomRight', 'bottom', 'bottomLeft', 'left']\n }\n },\n {\n key: 'legend.customOrder',\n control: {\n label: 'Custom order',\n description: 'Drag items in the chart legend to set the order.',\n type: 'switch',\n default: false\n }\n },\n {\n key: 'interactivity.legendReorder',\n control: {\n label: 'Allow viewers to reorder',\n type: 'switch',\n default: false\n },\n visibleIf: ({ options }: ColumnChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegendOrMultipleMeasure\n },\n createGuidelinesOptionsGroup(cartesianGuidelineLineTypes),\n createInfoTooltipOptionsGroup<ColumnChartConfigContext>(),\n createInteractivityOptionsGroup<ColumnChartConfigContext>({ select: { default: true } })\n];\n\nexport default columnChartOptionsConfig;\n"],"mappings":";;;;;;AAkBA,IAAM,KAA8B,EAAE,eAChC,MAAM,QAAQ,CAAK,KAAK,GAAO,SAAS,KAEvC,GAAO,MAAM,MAAM,GAAG,SAAS,QAAQ,CAAC,EAAE,SAAS,UAAU,KAAK,MAC/D,GAAO,MAAM,MAAM,GAAG,SAAS,SAAS,CAAC,EAAE,SAAS,UAAU,KAAK,IAIpE,IAGH,KAAmC,EAAE,eACrC,MAAM,QAAQ,CAAK,KAAK,GAAO,SAAS,IAExC,GAAO,MAAM,MAAM,GAAG,SAAS,QAAQ,CAAC,EAAE,SAAS,WAAW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AAS;KACP,OAAO;KACP,MAAM;KACN,SAAS;KACT,MAAM;MAAC;MAAW;MAAO;MAAY;MAAS;MAAe;MAAU;MAAc;KAAM;IAC7F;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,OAAO;KACP,aAAa;KACb,MAAM;KACN,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,OAAO;KACP,MAAM;KACN,SAAS;IACX;IACA,YAAY,EAAE,iBAAwC,GAAS,QAAQ,gBAAgB;GACzF;EACF;EACA,WAAW;CACb;CACA,EAA6B,CAA2B;CACxD,EAAwD;CACxD,EAA0D,EAAE,QAAQ,EAAE,SAAS,GAAK,EAAE,CAAC;AACzF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../shared/utils/axis-options.config.cjs"),t=require("../shared/utils/guidelines-options.config.cjs"),n=require("../shared/utils/info-tooltip-options.config.cjs");var
|
|
1
|
+
const e=require("../shared/utils/axis-options.config.cjs"),t=require("../shared/utils/guidelines-options.config.cjs"),n=require("../shared/utils/info-tooltip-options.config.cjs"),r=require("../shared/utils/interactivity-options.config.cjs");var i=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,default:!0}},{key:`display.legend`,control:{type:`switch`,default:!0}}]},{key:`order`,type:`group`,label:`Order & Limit`,open:!0,children:[{key:`ranking.active`,control:{type:`switch`,label:`Limit to`,default:!1}},{key:`ranking.direction`,control:{type:`picker`,label:`Direction`,default:`top`,enum:[`top`,`bottom`]},visibleIf:({options:e})=>e?.ranking?.active===!0},{key:`ranking.number`,control:{type:`number-field`,label:`Number`,default:10,min:1,max:999999},visibleIf:({options:e})=>e?.ranking?.active===!0},{key:`limit.number`,control:{type:`number-field`,label:`Limit`,default:1e5,min:1,max:1e5}}]},e.createAxesOptionsGroup([{axis:`x`,role:`category`,color:!0,label:!0,tickMode:!0,gridlines:!0,datetimeTickStyle:!0},{axis:`y`,role:`measure`,scale:!0,manualRange:{key:`axis.y.manualAxesRange`,discriminatorKey:`axis.y.type`},color:!0,label:!0,tickDensity:!0,tickMode:!0,gridlines:!0},{axis:`y2`,role:`measure`,scale:!0,manualRange:{key:`axis.y2.manualAxesRange`,discriminatorKey:`axis.y2.type`},color:!0,label:!0,tickDensity:!0,tickMode:!0,gridlines:!0}]),t.createGuidelinesOptionsGroup(t.cartesianGuidelineLineTypes),n.createInfoTooltipOptionsGroup(),r.createInteractivityOptionsGroup({brush:{default:!0,excludesClickActions:!0}})];exports.default=i;
|
|
2
2
|
//# sourceMappingURL=combination-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combination-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/combination-chart/combination-chart-options.config.ts"],"sourcesContent":["import { createAxesOptionsGroup } from '../shared/utils/axis-options.config';\nimport {\n cartesianGuidelineLineTypes,\n createGuidelinesOptionsGroup\n} from '../shared/utils/guidelines-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { CombinationChartViewOptions } from './combination-chart-options';\n\ntype CombinationChartConfigContext = OptionsConfigContext<CombinationChartViewOptions>;\n\nconst combinationChartOptionsConfig: OptionsConfig<CombinationChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n default: true\n }\n }\n ]\n },\n {\n key: 'order',\n type: 'group',\n label: 'Order & Limit',\n open: true,\n children: [\n {\n key: 'ranking.active',\n control: {\n type: 'switch',\n label: 'Limit to',\n default: false\n }\n },\n {\n key: 'ranking.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'top',\n enum: ['top', 'bottom']\n },\n visibleIf: ({ options }: CombinationChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'ranking.number',\n control: {\n type: 'number-field',\n label: 'Number',\n default: 10,\n min: 1,\n max: 999999\n },\n visibleIf: ({ options }: CombinationChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'limit.number',\n control: {\n type: 'number-field',\n label: 'Limit',\n default: 100000,\n min: 1,\n max: 100000\n }\n }\n ]\n },\n createAxesOptionsGroup<CombinationChartConfigContext>([\n { axis: 'x', role: 'category', color: true, label: true, tickMode: true, gridlines: true, datetimeTickStyle: true },\n { axis: 'y', role: 'measure', scale: true, manualRange: { key: 'axis.y.manualAxesRange', discriminatorKey: 'axis.y.type' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true },\n { axis: 'y2', role: 'measure', scale: true, manualRange: { key: 'axis.y2.manualAxesRange', discriminatorKey: 'axis.y2.type' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ]),\n createGuidelinesOptionsGroup(cartesianGuidelineLineTypes),\n createInfoTooltipOptionsGroup<CombinationChartConfigContext>()\n];\n\nexport default combinationChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"combination-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/combination-chart/combination-chart-options.config.ts"],"sourcesContent":["import { createAxesOptionsGroup } from '../shared/utils/axis-options.config';\nimport {\n cartesianGuidelineLineTypes,\n createGuidelinesOptionsGroup\n} from '../shared/utils/guidelines-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport { createInteractivityOptionsGroup } from '../shared/utils/interactivity-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { CombinationChartViewOptions } from './combination-chart-options';\n\ntype CombinationChartConfigContext = OptionsConfigContext<CombinationChartViewOptions>;\n\nconst combinationChartOptionsConfig: OptionsConfig<CombinationChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'display.title',\n control: {\n type: 'switch',\n default: true\n }\n },\n {\n key: 'display.legend',\n control: {\n type: 'switch',\n default: true\n }\n }\n ]\n },\n {\n key: 'order',\n type: 'group',\n label: 'Order & Limit',\n open: true,\n children: [\n {\n key: 'ranking.active',\n control: {\n type: 'switch',\n label: 'Limit to',\n default: false\n }\n },\n {\n key: 'ranking.direction',\n control: {\n type: 'picker',\n label: 'Direction',\n default: 'top',\n enum: ['top', 'bottom']\n },\n visibleIf: ({ options }: CombinationChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'ranking.number',\n control: {\n type: 'number-field',\n label: 'Number',\n default: 10,\n min: 1,\n max: 999999\n },\n visibleIf: ({ options }: CombinationChartConfigContext) => options?.ranking?.active === true\n },\n {\n key: 'limit.number',\n control: {\n type: 'number-field',\n label: 'Limit',\n default: 100000,\n min: 1,\n max: 100000\n }\n }\n ]\n },\n createAxesOptionsGroup<CombinationChartConfigContext>([\n { axis: 'x', role: 'category', color: true, label: true, tickMode: true, gridlines: true, datetimeTickStyle: true },\n { axis: 'y', role: 'measure', scale: true, manualRange: { key: 'axis.y.manualAxesRange', discriminatorKey: 'axis.y.type' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true },\n { axis: 'y2', role: 'measure', scale: true, manualRange: { key: 'axis.y2.manualAxesRange', discriminatorKey: 'axis.y2.type' }, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ]),\n createGuidelinesOptionsGroup(cartesianGuidelineLineTypes),\n createInfoTooltipOptionsGroup<CombinationChartConfigContext>(),\n createInteractivityOptionsGroup<CombinationChartConfigContext>({ brush: { default: true, excludesClickActions: true } })\n];\n\nexport default combinationChartOptionsConfig;\n"],"mappings":"iPAYA,IAAM,EAA8E,CAClF,CACE,IAAK,UACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,gBACL,QAAS,CACP,KAAM,SACN,QAAS,EACX,CACF,EACA,CACE,IAAK,iBACL,QAAS,CACP,KAAM,SACN,QAAS,EACX,CACF,CACF,CACF,EACA,CACE,IAAK,QACL,KAAM,QACN,MAAO,gBACP,KAAM,G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