@luzmo/dashboard-contents-types 1.0.41 → 1.0.42
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 +9 -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 +21 -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 +112 -107
- package/bubble-chart/bubble-chart-options.config.js.map +1 -1
- package/bullet-chart/bullet-chart-options.config.cjs +1 -1
- package/bullet-chart/bullet-chart-options.config.cjs.map +1 -1
- package/bullet-chart/bullet-chart-options.config.js +4 -3
- package/bullet-chart/bullet-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 +39 -37
- 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 +4 -3
- package/circle-pack-chart/circle-pack-chart-options.config.js.map +1 -1
- package/circular-gauge/circular-gauge-options.config.cjs +1 -1
- package/circular-gauge/circular-gauge-options.config.cjs.map +1 -1
- package/circular-gauge/circular-gauge-options.config.js +148 -143
- package/circular-gauge/circular-gauge-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 +5 -3
- package/combination-chart/combination-chart-options.config.js.map +1 -1
- package/conditional-number/conditional-number-options.config.cjs +1 -1
- package/conditional-number/conditional-number-options.config.cjs.map +1 -1
- package/conditional-number/conditional-number-options.config.js +156 -151
- package/conditional-number/conditional-number-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 +184 -179
- package/donut-chart/donut-chart-options.config.js.map +1 -1
- package/evolution-number/evolution-number-options.config.cjs +1 -1
- package/evolution-number/evolution-number-options.config.cjs.map +1 -1
- package/evolution-number/evolution-number-options.config.js +5 -3
- package/evolution-number/evolution-number-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-map/heat-map-options.config.cjs +1 -1
- package/heat-map/heat-map-options.config.cjs.map +1 -1
- package/heat-map/heat-map-options.config.js +32 -30
- package/heat-map/heat-map-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 +28 -26
- package/heat-table/heat-table-options.config.js.map +1 -1
- package/hexbin-map/hexbin-map-options.config.cjs +1 -1
- package/hexbin-map/hexbin-map-options.config.cjs.map +1 -1
- package/hexbin-map/hexbin-map-options.config.js +20 -18
- package/hexbin-map/hexbin-map-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 +7 -5
- package/line-chart/line-chart-options.config.js.map +1 -1
- package/marker-map/marker-map-options.config.cjs +1 -1
- package/marker-map/marker-map-options.config.cjs.map +1 -1
- package/marker-map/marker-map-options.config.js +97 -92
- package/marker-map/marker-map-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 +5 -3
- package/ohlc-chart/ohlc-chart-options.config.js.map +1 -1
- package/package.json +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 +4 -3
- 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/radar-chart/radar-chart-options.config.cjs +1 -1
- package/radar-chart/radar-chart-options.config.cjs.map +1 -1
- package/radar-chart/radar-chart-options.config.js +7 -5
- package/radar-chart/radar-chart-options.config.js.map +1 -1
- package/regular-table/regular-table-options.config.cjs +1 -1
- package/regular-table/regular-table-options.config.cjs.map +1 -1
- package/regular-table/regular-table-options.config.js +126 -121
- package/regular-table/regular-table-options.config.js.map +1 -1
- package/route-map/route-map-options.config.cjs +1 -1
- package/route-map/route-map-options.config.cjs.map +1 -1
- package/route-map/route-map-options.config.js +38 -36
- package/route-map/route-map-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 +7 -5
- package/scatter-plot/scatter-plot-options.config.js.map +1 -1
- package/shared/utils/info-tooltip-options.config.cjs +2 -0
- package/shared/utils/info-tooltip-options.config.cjs.map +1 -0
- package/shared/utils/info-tooltip-options.config.js +42 -0
- package/shared/utils/info-tooltip-options.config.js.map +1 -0
- package/shared/utils/info-tooltip-options.i18n.cjs +2 -0
- package/shared/utils/info-tooltip-options.i18n.cjs.map +1 -0
- package/shared/utils/info-tooltip-options.i18n.js +57 -0
- package/shared/utils/info-tooltip-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 +5 -3
- package/shared/utils/options-loader.js.map +1 -1
- package/speedometer-chart/speedometer-chart-options.config.cjs +1 -1
- package/speedometer-chart/speedometer-chart-options.config.cjs.map +1 -1
- package/speedometer-chart/speedometer-chart-options.config.js +201 -196
- package/speedometer-chart/speedometer-chart-options.config.js.map +1 -1
- package/spike-map/spike-map-options.config.cjs +1 -1
- package/spike-map/spike-map-options.config.cjs.map +1 -1
- package/spike-map/spike-map-options.config.js +41 -39
- package/spike-map/spike-map-options.config.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/bullet-chart/bullet-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/circular-gauge/circular-gauge-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/conditional-number/conditional-number-options.config.d.ts.map +1 -1
- package/src/lib/donut-chart/donut-chart-options.config.d.ts.map +1 -1
- package/src/lib/evolution-number/evolution-number-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-map/heat-map-options.config.d.ts.map +1 -1
- package/src/lib/heat-table/heat-table-options.config.d.ts.map +1 -1
- package/src/lib/hexbin-map/hexbin-map-options.config.d.ts.map +1 -1
- package/src/lib/line-chart/line-chart-options.config.d.ts.map +1 -1
- package/src/lib/marker-map/marker-map-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/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/radar-chart/radar-chart-options.config.d.ts.map +1 -1
- package/src/lib/regular-table/regular-table-options.config.d.ts.map +1 -1
- package/src/lib/route-map/route-map-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/schemas/dashboard-state.schema.d.ts +2 -2
- package/src/lib/shared/schemas/screen-mode.schema.d.ts +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/info-tooltip-options.config.d.ts +6 -0
- package/src/lib/shared/utils/info-tooltip-options.config.d.ts.map +1 -0
- package/src/lib/shared/utils/info-tooltip-options.i18n.d.ts +3 -0
- package/src/lib/shared/utils/info-tooltip-options.i18n.d.ts.map +1 -0
- package/src/lib/shared/utils/options-loader.d.ts.map +1 -1
- package/src/lib/speedometer-chart/speedometer-chart-options.config.d.ts.map +1 -1
- package/src/lib/spike-map/spike-map-options.config.d.ts.map +1 -1
- package/src/lib/strip-plot/strip-plot-options.config.d.ts.map +1 -1
- package/src/lib/sunburst-chart/sunburst-chart-options.config.d.ts.map +1 -1
- package/src/lib/symbol-map/symbol-map-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/strip-plot/strip-plot-options.config.cjs +1 -1
- package/strip-plot/strip-plot-options.config.cjs.map +1 -1
- package/strip-plot/strip-plot-options.config.js +4 -3
- package/strip-plot/strip-plot-options.config.js.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/symbol-map/symbol-map-options.config.cjs +1 -1
- package/symbol-map/symbol-map-options.config.cjs.map +1 -1
- package/symbol-map/symbol-map-options.config.js +7 -5
- package/symbol-map/symbol-map-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 +180 -175
- 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 +67 -62
- package/wordcloud-chart/wordcloud-chart-options.config.js.map +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getThemeMainColor as e, getThemeMainColorExtraLabelClickAction as t, getThemeMainColorExtraLabelHasClickAction as n, getThemeMainColorResetLabel as r } from "../helpers.js";
|
|
2
2
|
import { createAxesOptionsGroup as i, createManualRangeControls as a } from "../shared/utils/axis-options.config.js";
|
|
3
|
-
import {
|
|
3
|
+
import { createInfoTooltipOptionsGroup as o } from "../shared/utils/info-tooltip-options.config.js";
|
|
4
|
+
import { getColorMapKeys as s, getColorMaps as c } from "../shared/utils/color/color-palettes.js";
|
|
4
5
|
//#region src/lib/box-plot/box-plot-options.config.ts
|
|
5
|
-
var
|
|
6
|
+
var l = ({ options: e }) => e?.observations?.display === !0, u = [
|
|
6
7
|
{
|
|
7
8
|
key: "general",
|
|
8
9
|
type: "group",
|
|
@@ -147,7 +148,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
147
148
|
label: "Only outliers",
|
|
148
149
|
default: !1
|
|
149
150
|
},
|
|
150
|
-
visibleIf:
|
|
151
|
+
visibleIf: l
|
|
151
152
|
},
|
|
152
153
|
{
|
|
153
154
|
key: "observations.type",
|
|
@@ -157,7 +158,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
157
158
|
default: "dot",
|
|
158
159
|
enum: ["dot", "ticks"]
|
|
159
160
|
},
|
|
160
|
-
visibleIf:
|
|
161
|
+
visibleIf: l
|
|
161
162
|
},
|
|
162
163
|
{
|
|
163
164
|
key: "observations.size",
|
|
@@ -169,7 +170,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
169
170
|
max: 10,
|
|
170
171
|
step: 1
|
|
171
172
|
},
|
|
172
|
-
visibleIf:
|
|
173
|
+
visibleIf: l
|
|
173
174
|
},
|
|
174
175
|
{
|
|
175
176
|
key: "observations.opacity",
|
|
@@ -181,7 +182,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
181
182
|
max: 1,
|
|
182
183
|
step: .1
|
|
183
184
|
},
|
|
184
|
-
visibleIf:
|
|
185
|
+
visibleIf: l
|
|
185
186
|
},
|
|
186
187
|
{
|
|
187
188
|
key: "observations.jitter",
|
|
@@ -193,7 +194,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
193
194
|
max: 100,
|
|
194
195
|
step: 1
|
|
195
196
|
},
|
|
196
|
-
visibleIf:
|
|
197
|
+
visibleIf: l
|
|
197
198
|
},
|
|
198
199
|
{
|
|
199
200
|
key: "observations.colorType",
|
|
@@ -203,7 +204,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
203
204
|
default: "single",
|
|
204
205
|
enum: ["single", "range"]
|
|
205
206
|
},
|
|
206
|
-
visibleIf:
|
|
207
|
+
visibleIf: l
|
|
207
208
|
},
|
|
208
209
|
{
|
|
209
210
|
key: "observations.color",
|
|
@@ -221,7 +222,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
221
222
|
};
|
|
222
223
|
}
|
|
223
224
|
},
|
|
224
|
-
visibleIf: ({ options: e }) =>
|
|
225
|
+
visibleIf: ({ options: e }) => l({ options: e }) && e?.observations?.colorType === "single"
|
|
225
226
|
},
|
|
226
227
|
{
|
|
227
228
|
key: "observations.colorsType",
|
|
@@ -230,7 +231,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
230
231
|
label: "Colors type",
|
|
231
232
|
default: "divergent",
|
|
232
233
|
enum: ["sequential", "divergent"],
|
|
233
|
-
calculateValue: ({ options: e }) => e?.observations?.colorsClass === "manual" ? "manual" :
|
|
234
|
+
calculateValue: ({ options: e }) => e?.observations?.colorsClass === "manual" ? "manual" : c()?.[e?.observations?.colorsClass]?.type ?? "divergent",
|
|
234
235
|
toOptions: ({ options: e, value: t }) => {
|
|
235
236
|
if (t === "manual") return {
|
|
236
237
|
...e,
|
|
@@ -241,7 +242,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
241
242
|
}
|
|
242
243
|
};
|
|
243
244
|
let n = e.observations?.colorsClass;
|
|
244
|
-
return t !==
|
|
245
|
+
return t !== c()?.[e?.observations?.colorsClass]?.type && (n = s(t ?? "divergent")[0]), {
|
|
245
246
|
...e,
|
|
246
247
|
observations: {
|
|
247
248
|
...e.observations,
|
|
@@ -251,7 +252,7 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
251
252
|
};
|
|
252
253
|
}
|
|
253
254
|
},
|
|
254
|
-
visibleIf: ({ options: e }) =>
|
|
255
|
+
visibleIf: ({ options: e }) => l({ options: e }) && e?.observations?.colorType === "range"
|
|
255
256
|
},
|
|
256
257
|
{
|
|
257
258
|
key: "observations.colorsClass",
|
|
@@ -260,15 +261,15 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
260
261
|
label: "Color palette",
|
|
261
262
|
hideLabel: !0,
|
|
262
263
|
default: ({ options: e }) => {
|
|
263
|
-
let t =
|
|
264
|
-
return
|
|
264
|
+
let t = c()?.[e?.observations?.colorsClass]?.type;
|
|
265
|
+
return s(t ?? "divergent")[0];
|
|
265
266
|
},
|
|
266
267
|
enum: ({ options: e }) => {
|
|
267
|
-
let t =
|
|
268
|
-
return
|
|
268
|
+
let t = c()?.[e?.observations?.colorsClass]?.type;
|
|
269
|
+
return s(t ?? "divergent");
|
|
269
270
|
}
|
|
270
271
|
},
|
|
271
|
-
visibleIf: ({ options: e }) =>
|
|
272
|
+
visibleIf: ({ options: e }) => l({ options: e }) && e?.observations?.colorType === "range" && e?.observations?.colorsClass !== "manual"
|
|
272
273
|
}
|
|
273
274
|
]
|
|
274
275
|
},
|
|
@@ -301,9 +302,10 @@ var c = ({ options: e }) => e?.observations?.display === !0, l = [
|
|
|
301
302
|
key: "measureAxisType",
|
|
302
303
|
default: "variable"
|
|
303
304
|
}
|
|
304
|
-
}))
|
|
305
|
+
})),
|
|
306
|
+
o()
|
|
305
307
|
];
|
|
306
308
|
//#endregion
|
|
307
|
-
export {
|
|
309
|
+
export { u as default };
|
|
308
310
|
|
|
309
311
|
//# sourceMappingURL=box-plot-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box-plot-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/box-plot/box-plot-options.config.ts"],"sourcesContent":["import { type ColorsClassKey, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createAxesOptionsGroup, createManualRangeControls } from '../shared/utils/axis-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BoxPlotViewOptions } from './box-plot-options';\n\ntype BoxPlotConfigContext = OptionsConfigContext<BoxPlotViewOptions>;\ntype BoxPlotConfigContextWithValue<T> = BoxPlotConfigContext & { value: T };\n\nconst observationsEnabled = ({ options }: BoxPlotConfigContext) => options?.observations?.display === true;\n\nconst boxPlotOptionsConfig: OptionsConfig<BoxPlotConfigContext> = [\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: 'horizontal',\n control: {\n type: 'picker',\n label: 'Display',\n default: 'vertical',\n enum: ['vertical', 'horizontal'],\n parseValue: (value: boolean | null | undefined) => (value ? 'horizontal' : 'vertical'),\n toValue: (value: 'horizontal' | 'vertical') => value === 'horizontal'\n }\n },\n {\n key: 'extentTicks',\n control: {\n type: 'switch',\n label: 'Extent ticks',\n default: true\n }\n }\n ]\n },\n {\n key: 'box',\n type: 'group',\n open: true,\n children: [\n {\n key: 'boxWidth',\n control: {\n type: 'slider',\n label: 'Box width',\n default: 0.9,\n min: 0.1,\n max: 1,\n step: 0.1\n }\n },\n {\n key: 'boxFill',\n control: {\n type: 'color-picker',\n label: 'Box fill',\n default: ({ theme }: BoxPlotConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'boxFill'),\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'boxFill'),\n extraLabelClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'boxFill')\n }\n },\n {\n key: 'roundedCorners',\n control: {\n type: 'slider',\n label: 'Rounded corners',\n default: ({ theme }: BoxPlotConfigContext) => theme?.itemSpecific?.rounding ?? 8,\n min: 0,\n max: 24,\n step: 1,\n extraLabel: ({ options, theme }: BoxPlotConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.roundedCorners !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: BoxPlotConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.roundedCorners !== undefined) {\n delete newOptions.roundedCorners;\n }\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'boxStrokeWidth',\n control: {\n type: 'slider',\n label: 'Box stroke width',\n default: 1,\n min: 0,\n max: 5,\n step: 0.5\n }\n },\n {\n key: 'boxStrokeColor',\n control: {\n type: 'color-picker',\n label: 'Box stroke color',\n default: ({ theme }: BoxPlotConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'boxStrokeColor'),\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'boxStrokeColor'),\n extraLabelClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'boxStrokeColor')\n }\n },\n {\n key: 'medianStrokeWidth',\n control: {\n type: 'slider',\n label: 'Median stroke width',\n default: 2,\n min: 0,\n max: 5,\n step: 0.5\n }\n },\n {\n key: 'medianStrokeColor',\n control: {\n type: 'color-picker',\n label: 'Median stroke color',\n default: '#000000'\n }\n }\n ]\n },\n {\n key: 'observations',\n type: 'group',\n open: true,\n children: [\n {\n key: 'observations.display',\n control: {\n type: 'switch',\n label: 'Show',\n default: false\n }\n },\n {\n key: 'observations.onlyOutliers',\n control: {\n type: 'switch',\n label: 'Only outliers',\n default: false\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.type',\n control: {\n type: 'picker',\n label: 'Type',\n default: 'dot',\n enum: ['dot', 'ticks']\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.size',\n control: {\n type: 'slider',\n label: 'Size',\n default: 3,\n min: 1,\n max: 10,\n step: 1\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.4,\n min: 0.1,\n max: 1,\n step: 0.1\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.jitter',\n control: {\n type: 'slider',\n label: 'Jitter',\n default: 30,\n min: 1,\n max: 100,\n step: 1\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.colorType',\n control: {\n type: 'picker',\n label: 'Color mode',\n default: 'single',\n enum: ['single', 'range']\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.color',\n control: {\n type: 'color-picker',\n label: 'Color',\n default: ({ theme }: BoxPlotConfigContext) => theme?.colors?.[1],\n extraLabel: ({ options, theme }: BoxPlotConfigContext) => {\n if (\n theme?.colors?.[1]\n && options.observations?.color\n && options.observations?.color !== theme?.colors?.[1]\n ) {\n return 'reset';\n }\n\n return null;\n },\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) => {\n if (theme?.colors?.[1] && options.observations?.color !== theme?.colors?.[1]) {\n return true;\n }\n\n return false;\n },\n extraLabelClickAction: ({ options, theme }: BoxPlotConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions.observations) {\n newOptions.observations.color = theme?.colors?.[1];\n }\n\n return {\n value: newOptions.observations?.color,\n options: newOptions\n };\n }\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n observationsEnabled({ options }) && options?.observations?.colorType === 'single'\n },\n {\n key: 'observations.colorsType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'divergent',\n // TODO: add manual when being able to retrieve values from the boxplot\n enum: ['sequential', 'divergent' /* , 'manual' */],\n calculateValue: ({ options }: BoxPlotConfigContext) => {\n if (options?.observations?.colorsClass === 'manual') {\n return 'manual';\n }\n\n const colorMaps = getColorMaps();\n const type = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n return type ?? 'divergent';\n },\n toOptions: ({ options, value }: BoxPlotConfigContextWithValue<'manual' | 'sequential' | 'divergent'>) => {\n if (value === 'manual') {\n return {\n ...options,\n observations: {\n ...options.observations,\n // TODO needed to save the type?\n colorsType: 'manual',\n colorsClass: 'manual'\n }\n };\n }\n\n let colorsClass = options.observations?.colorsClass;\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n if (value !== colorClassType) {\n colorsClass = getColorMapKeys(value ?? 'divergent')[0];\n }\n\n return {\n ...options,\n observations: {\n ...options.observations,\n colorsClass,\n colorsType: value\n }\n };\n }\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n observationsEnabled({ options }) && options?.observations?.colorType === 'range'\n },\n /* TODO: need to be able to retrieve values from the boxplot\n {\n key: 'observations.manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n noValues: true,\n noAlphaChannel: true,\n label: 'Color ranges',\n hideLabel: true,\n default: () => structuredClone(defaultRangeValues)\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n options?.observations?.colorType === 'range' &&\n options?.observations?.colorsClass === 'manual'\n },\n */\n {\n key: 'observations.colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: BoxPlotConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'divergent')[0];\n },\n enum: ({ options }: BoxPlotConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'divergent');\n }\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n observationsEnabled({ options })\n && options?.observations?.colorType === 'range'\n && options?.observations?.colorsClass !== 'manual'\n }\n ]\n },\n createAxesOptionsGroup<BoxPlotConfigContext>([\n { axis: 'x', role: 'axis', scale: true, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true },\n { axis: 'y', role: 'axis', scale: true, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ], createManualRangeControls<BoxPlotConfigContext>({\n rangeKey: 'manualAxisRange',\n labels: {\n range: 'Measure axis range',\n minimum: 'Measure axis minimum',\n maximum: 'Measure axis maximum'\n },\n discriminator: { key: 'measureAxisType', default: 'variable' }\n }))\n];\n\nexport default boxPlotOptionsConfig;\n"],"mappings":";;;;AAcA,IAAM,KAAuB,EAAE,iBAAoC,GAAS,cAAc,YAAY,IAEhG,IAA4D;CAChE;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;KACT,MAAM,CAAC,YAAY,YAAY;KAC/B,aAAa,MAAuC,IAAQ,eAAe;KAC3E,UAAU,MAAqC,MAAU;IAC3D;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,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BAAgB;KAC5E,wBAAwB,EAAE,YAAS,eACjC,EAAuC,GAAS,GAAO,gBAAgB;IAC3E;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;IACR;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;EACF;CACF;CACA;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;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM,CAAC,OAAO,OAAO;IACvB;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;IACR;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;IACR;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;IACR;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM,CAAC,UAAU,OAAO;IAC1B;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,UAAU,EAAE,eAAkC,GAAO,SAAS;KAC9D,aAAa,EAAE,YAAS,eAEpB,GAAO,SAAS,MACb,EAAQ,cAAc,SACtB,EAAQ,cAAc,UAAU,GAAO,SAAS,KAE5C,UAGF;KAET,2BAA2B,EAAE,YAA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cAAc,YAA8B,EAAE;MAE1F,OAAO,EAAgB,KAAkB,WAAW;KACtD;IACF;IACA,YAAY,EAAE,iBACZ,EAAoB,EAAE,WAAQ,CAAC,KAC5B,GAAS,cAAc,cAAc,WACrC,GAAS,cAAc,gBAAgB;GAC9C;EACF;CACF;CACA,EAA6C,CAC3C;EAAE,MAAM;EAAK,MAAM;EAAQ,OAAO;EAAM,OAAO;EAAM,OAAO;EAAM,aAAa;EAAM,UAAU;EAAM,WAAW;CAAK,GACrH;EAAE,MAAM;EAAK,MAAM;EAAQ,OAAO;EAAM,OAAO;EAAM,OAAO;EAAM,aAAa;EAAM,UAAU;EAAM,WAAW;CAAK,CACvH,GAAG,EAAgD;EACjD,UAAU;EACV,QAAQ;GACN,OAAO;GACP,SAAS;GACT,SAAS;EACX;EACA,eAAe;GAAE,KAAK;GAAmB,SAAS;EAAW;CAC/D,CAAC,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"box-plot-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/box-plot/box-plot-options.config.ts"],"sourcesContent":["import { type ColorsClassKey, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createAxesOptionsGroup, createManualRangeControls } from '../shared/utils/axis-options.config';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BoxPlotViewOptions } from './box-plot-options';\n\ntype BoxPlotConfigContext = OptionsConfigContext<BoxPlotViewOptions>;\ntype BoxPlotConfigContextWithValue<T> = BoxPlotConfigContext & { value: T };\n\nconst observationsEnabled = ({ options }: BoxPlotConfigContext) => options?.observations?.display === true;\n\nconst boxPlotOptionsConfig: OptionsConfig<BoxPlotConfigContext> = [\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: 'horizontal',\n control: {\n type: 'picker',\n label: 'Display',\n default: 'vertical',\n enum: ['vertical', 'horizontal'],\n parseValue: (value: boolean | null | undefined) => (value ? 'horizontal' : 'vertical'),\n toValue: (value: 'horizontal' | 'vertical') => value === 'horizontal'\n }\n },\n {\n key: 'extentTicks',\n control: {\n type: 'switch',\n label: 'Extent ticks',\n default: true\n }\n }\n ]\n },\n {\n key: 'box',\n type: 'group',\n open: true,\n children: [\n {\n key: 'boxWidth',\n control: {\n type: 'slider',\n label: 'Box width',\n default: 0.9,\n min: 0.1,\n max: 1,\n step: 0.1\n }\n },\n {\n key: 'boxFill',\n control: {\n type: 'color-picker',\n label: 'Box fill',\n default: ({ theme }: BoxPlotConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'boxFill'),\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'boxFill'),\n extraLabelClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'boxFill')\n }\n },\n {\n key: 'roundedCorners',\n control: {\n type: 'slider',\n label: 'Rounded corners',\n default: ({ theme }: BoxPlotConfigContext) => theme?.itemSpecific?.rounding ?? 8,\n min: 0,\n max: 24,\n step: 1,\n extraLabel: ({ options, theme }: BoxPlotConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.roundedCorners !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: BoxPlotConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.roundedCorners !== undefined) {\n delete newOptions.roundedCorners;\n }\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'boxStrokeWidth',\n control: {\n type: 'slider',\n label: 'Box stroke width',\n default: 1,\n min: 0,\n max: 5,\n step: 0.5\n }\n },\n {\n key: 'boxStrokeColor',\n control: {\n type: 'color-picker',\n label: 'Box stroke color',\n default: ({ theme }: BoxPlotConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorResetLabel(options, theme, 'boxStrokeColor'),\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'boxStrokeColor'),\n extraLabelClickAction: ({ options, theme }: BoxPlotConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'boxStrokeColor')\n }\n },\n {\n key: 'medianStrokeWidth',\n control: {\n type: 'slider',\n label: 'Median stroke width',\n default: 2,\n min: 0,\n max: 5,\n step: 0.5\n }\n },\n {\n key: 'medianStrokeColor',\n control: {\n type: 'color-picker',\n label: 'Median stroke color',\n default: '#000000'\n }\n }\n ]\n },\n {\n key: 'observations',\n type: 'group',\n open: true,\n children: [\n {\n key: 'observations.display',\n control: {\n type: 'switch',\n label: 'Show',\n default: false\n }\n },\n {\n key: 'observations.onlyOutliers',\n control: {\n type: 'switch',\n label: 'Only outliers',\n default: false\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.type',\n control: {\n type: 'picker',\n label: 'Type',\n default: 'dot',\n enum: ['dot', 'ticks']\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.size',\n control: {\n type: 'slider',\n label: 'Size',\n default: 3,\n min: 1,\n max: 10,\n step: 1\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.4,\n min: 0.1,\n max: 1,\n step: 0.1\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.jitter',\n control: {\n type: 'slider',\n label: 'Jitter',\n default: 30,\n min: 1,\n max: 100,\n step: 1\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.colorType',\n control: {\n type: 'picker',\n label: 'Color mode',\n default: 'single',\n enum: ['single', 'range']\n },\n visibleIf: observationsEnabled\n },\n {\n key: 'observations.color',\n control: {\n type: 'color-picker',\n label: 'Color',\n default: ({ theme }: BoxPlotConfigContext) => theme?.colors?.[1],\n extraLabel: ({ options, theme }: BoxPlotConfigContext) => {\n if (\n theme?.colors?.[1]\n && options.observations?.color\n && options.observations?.color !== theme?.colors?.[1]\n ) {\n return 'reset';\n }\n\n return null;\n },\n extraLabelHasClickAction: ({ options, theme }: BoxPlotConfigContext) => {\n if (theme?.colors?.[1] && options.observations?.color !== theme?.colors?.[1]) {\n return true;\n }\n\n return false;\n },\n extraLabelClickAction: ({ options, theme }: BoxPlotConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions.observations) {\n newOptions.observations.color = theme?.colors?.[1];\n }\n\n return {\n value: newOptions.observations?.color,\n options: newOptions\n };\n }\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n observationsEnabled({ options }) && options?.observations?.colorType === 'single'\n },\n {\n key: 'observations.colorsType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'divergent',\n // TODO: add manual when being able to retrieve values from the boxplot\n enum: ['sequential', 'divergent' /* , 'manual' */],\n calculateValue: ({ options }: BoxPlotConfigContext) => {\n if (options?.observations?.colorsClass === 'manual') {\n return 'manual';\n }\n\n const colorMaps = getColorMaps();\n const type = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n return type ?? 'divergent';\n },\n toOptions: ({ options, value }: BoxPlotConfigContextWithValue<'manual' | 'sequential' | 'divergent'>) => {\n if (value === 'manual') {\n return {\n ...options,\n observations: {\n ...options.observations,\n // TODO needed to save the type?\n colorsType: 'manual',\n colorsClass: 'manual'\n }\n };\n }\n\n let colorsClass = options.observations?.colorsClass;\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n if (value !== colorClassType) {\n colorsClass = getColorMapKeys(value ?? 'divergent')[0];\n }\n\n return {\n ...options,\n observations: {\n ...options.observations,\n colorsClass,\n colorsType: value\n }\n };\n }\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n observationsEnabled({ options }) && options?.observations?.colorType === 'range'\n },\n /* TODO: need to be able to retrieve values from the boxplot\n {\n key: 'observations.manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n noValues: true,\n noAlphaChannel: true,\n label: 'Color ranges',\n hideLabel: true,\n default: () => structuredClone(defaultRangeValues)\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n options?.observations?.colorType === 'range' &&\n options?.observations?.colorsClass === 'manual'\n },\n */\n {\n key: 'observations.colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: BoxPlotConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'divergent')[0];\n },\n enum: ({ options }: BoxPlotConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.observations?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(colorClassType ?? 'divergent');\n }\n },\n visibleIf: ({ options }: BoxPlotConfigContext) =>\n observationsEnabled({ options })\n && options?.observations?.colorType === 'range'\n && options?.observations?.colorsClass !== 'manual'\n }\n ]\n },\n createAxesOptionsGroup<BoxPlotConfigContext>([\n { axis: 'x', role: 'axis', scale: true, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true },\n { axis: 'y', role: 'axis', scale: true, color: true, label: true, tickDensity: true, tickMode: true, gridlines: true }\n ], createManualRangeControls<BoxPlotConfigContext>({\n rangeKey: 'manualAxisRange',\n labels: {\n range: 'Measure axis range',\n minimum: 'Measure axis minimum',\n maximum: 'Measure axis maximum'\n },\n discriminator: { key: 'measureAxisType', default: 'variable' }\n })),\n createInfoTooltipOptionsGroup<BoxPlotConfigContext>()\n];\n\nexport default boxPlotOptionsConfig;\n"],"mappings":";;;;;AAeA,IAAM,KAAuB,EAAE,iBAAoC,GAAS,cAAc,YAAY,IAEhG,IAA4D;CAChE;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;KACT,MAAM,CAAC,YAAY,YAAY;KAC/B,aAAa,MAAuC,IAAQ,eAAe;KAC3E,UAAU,MAAqC,MAAU;IAC3D;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;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;KACP,MAAM;KACN,OAAO;KACP,UAAU,EAAE,eAAkC,EAAkB,CAAK;KACrE,aAAa,EAAE,YAAS,eACtB,EAA4B,GAAS,GAAO,SAAS;KACvD,2BAA2B,EAAE,YAAS,eACpC,EAA0C,GAAS,GAAO,SAAS;KACrE,wBAAwB,EAAE,YAAS,eACjC,EAAuC,GAAS,GAAO,SAAS;IACpE;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,UAAU,EAAE,eAAkC,GAAO,cAAc,YAAY;KAC/E,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,YAAa,WAIzC,OAAO,GAAS,kBAAmB,WAIhC,UAHE,SAJA;KASX,2BA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-options.config.cjs");var n=({slots:e})=>Array.isArray(e)&&e?.length>0?(e?.find(e=>e?.name===`color`)?.content?.length??0)>0:!1,r=({slots:e})=>Array.isArray(e)&&e?.length>0?!((e?.find(e=>e?.name===`color`)?.content?.length??0)>0):!0,i=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.legend`,control:{type:`switch`,label:`Legend`,default:!0},visibleIf:n},{key:`display.bubbleLabels`,control:{type:`switch`,label:`Show labels`,tooltip:`If enough room available`,default:!0}},{key:`display.bubbleValues`,control:{type:`picker`,label:`Show values`,tooltip:`If enough room available`,default:`none`,enum:[`none`,`percentage`,`absolute`]}},{key:`categories.colored`,control:{type:`switch`,label:`Bubble color by category`,default:!0},visibleIf:r},{key:`color`,control:{type:`color-picker`,label:`Bubble color`,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:({options:e,slots:t})=>e?.categories?.colored===!1&&r({slots:t})}]},{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:n},t.createInfoTooltipOptionsGroup()];exports.default=i;
|
|
2
2
|
//# sourceMappingURL=bubble-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bubble-chart/bubble-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BubbleChartViewOptions } from './bubble-chart-options';\n\ntype BubbleChartConfigContext = OptionsConfigContext<BubbleChartViewOptions>;\n\nconst hasLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0;\n }\n\n return false;\n};\n\nconst hasNoLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return !((slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0);\n }\n\n return true;\n};\n\nconst bubbleChartOptionsConfig: OptionsConfig<BubbleChartConfigContext> = [\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 visibleIf: hasLegend\n },\n {\n key: 'display.bubbleLabels',\n control: {\n type: 'switch',\n label: 'Show labels',\n tooltip: 'If enough room available',\n default: true\n }\n },\n {\n key: 'display.bubbleValues',\n control: {\n type: 'picker',\n label: 'Show values',\n tooltip: 'If enough room available',\n default: 'none',\n enum: ['none', 'percentage', 'absolute']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n label: 'Bubble color by category',\n default: true\n },\n visibleIf: hasNoLegend\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bubble color',\n default: ({ theme }: BubbleChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BubbleChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: ({ options, slots }: BubbleChartConfigContext) => options?.categories?.colored === false && hasNoLegend({ slots })\n }\n ]\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 }: BubbleChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegend\n }\n];\n\nexport default bubbleChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bubble-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bubble-chart/bubble-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BubbleChartViewOptions } from './bubble-chart-options';\n\ntype BubbleChartConfigContext = OptionsConfigContext<BubbleChartViewOptions>;\n\nconst hasLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0;\n }\n\n return false;\n};\n\nconst hasNoLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return !((slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0);\n }\n\n return true;\n};\n\nconst bubbleChartOptionsConfig: OptionsConfig<BubbleChartConfigContext> = [\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 visibleIf: hasLegend\n },\n {\n key: 'display.bubbleLabels',\n control: {\n type: 'switch',\n label: 'Show labels',\n tooltip: 'If enough room available',\n default: true\n }\n },\n {\n key: 'display.bubbleValues',\n control: {\n type: 'picker',\n label: 'Show values',\n tooltip: 'If enough room available',\n default: 'none',\n enum: ['none', 'percentage', 'absolute']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n label: 'Bubble color by category',\n default: true\n },\n visibleIf: hasNoLegend\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bubble color',\n default: ({ theme }: BubbleChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BubbleChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: ({ options, slots }: BubbleChartConfigContext) => options?.categories?.colored === false && hasNoLegend({ slots })\n }\n ]\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 }: BubbleChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegend\n },\n createInfoTooltipOptionsGroup<BubbleChartConfigContext>()\n];\n\nexport default bubbleChartOptionsConfig;\n"],"mappings":"+FAYA,IAAM,GAAa,CAAE,WACf,MAAM,QAAQ,CAAK,GAAK,GAAO,OAAS,GAClC,GAAO,KAAM,GAAM,GAAG,OAAS,OAAO,CAAC,EAAE,SAAS,QAAU,GAAK,EAGpE,GAGH,GAAe,CAAE,WACjB,MAAM,QAAQ,CAAK,GAAK,GAAO,OAAS,EACnC,GAAG,GAAO,KAAM,GAAM,GAAG,OAAS,OAAO,CAAC,EAAE,SAAS,QAAU,GAAK,GAGtE,GAGH,EAAoE,CACxE,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,SACP,QAAS,EACX,EACA,UAAW,CACb,EACA,CACE,IAAK,uBACL,QAAS,CACP,KAAM,SACN,MAAO,cACP,QAAS,2BACT,QAAS,EACX,CACF,EACA,CACE,IAAK,uBACL,QAAS,CACP,KAAM,SACN,MAAO,cACP,QAAS,2BACT,QAAS,OACT,KAAM,CAAC,OAAQ,aAAc,UAAU,CACzC,CACF,EACA,CACE,IAAK,qBACL,QAAS,CACP,KAAM,SACN,MAAO,2BACP,QAAS,EACX,EACA,UAAW,CACb,EACA,CACE,IAAK,QACL,QAAS,CACP,KAAM,eACN,MAAO,eACP,SAAU,CAAE,WAAsC,EAAA,kBAAkB,CAAK,EACzE,YAAa,CAAE,UAAS,WAAsC,EAAA,4BAA4B,EAAS,EAAO,OAAO,EACjH,0BAA2B,CAAE,UAAS,WACpC,EAAA,0CAA0C,EAAS,EAAO,OAAO,EACnE,uBAAwB,CAAE,UAAS,WACjC,EAAA,uCAAuC,EAAS,EAAO,OAAO,CAClE,EACA,WAAY,CAAE,UAAS,WAAsC,GAAS,YAAY,UAAY,IAAS,EAAY,CAAE,OAAM,CAAC,CAC9H,CACF,CACF,EACA,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,8BAAwD,CAC1D"}
|
|
@@ -1,117 +1,122 @@
|
|
|
1
1
|
import { getThemeMainColor as e, getThemeMainColorExtraLabelClickAction as t, getThemeMainColorExtraLabelHasClickAction as n, getThemeMainColorResetLabel as r } from "../helpers.js";
|
|
2
|
+
import { createInfoTooltipOptionsGroup as i } from "../shared/utils/info-tooltip-options.config.js";
|
|
2
3
|
//#region src/lib/bubble-chart/bubble-chart-options.config.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
key: "display.legend",
|
|
18
|
-
control: {
|
|
19
|
-
type: "switch",
|
|
20
|
-
label: "Legend",
|
|
21
|
-
default: !0
|
|
4
|
+
var a = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? (e?.find((e) => e?.name === "color")?.content?.length ?? 0) > 0 : !1, o = ({ slots: e }) => Array.isArray(e) && e?.length > 0 ? !((e?.find((e) => e?.name === "color")?.content?.length ?? 0) > 0) : !0, s = [
|
|
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
|
+
}
|
|
22
17
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
default: !0
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: "display.bubbleValues",
|
|
36
|
-
control: {
|
|
37
|
-
type: "picker",
|
|
38
|
-
label: "Show values",
|
|
39
|
-
tooltip: "If enough room available",
|
|
40
|
-
default: "none",
|
|
41
|
-
enum: [
|
|
42
|
-
"none",
|
|
43
|
-
"percentage",
|
|
44
|
-
"absolute"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: "categories.colored",
|
|
50
|
-
control: {
|
|
51
|
-
type: "switch",
|
|
52
|
-
label: "Bubble color by category",
|
|
53
|
-
default: !0
|
|
18
|
+
{
|
|
19
|
+
key: "display.legend",
|
|
20
|
+
control: {
|
|
21
|
+
type: "switch",
|
|
22
|
+
label: "Legend",
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
visibleIf: a
|
|
54
26
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
extraLabel: ({ options: e, theme: t }) => r(e, t, "color"),
|
|
64
|
-
extraLabelHasClickAction: ({ options: e, theme: t }) => n(e, t, "color"),
|
|
65
|
-
extraLabelClickAction: ({ options: e, theme: n }) => t(e, n, "color")
|
|
27
|
+
{
|
|
28
|
+
key: "display.bubbleLabels",
|
|
29
|
+
control: {
|
|
30
|
+
type: "switch",
|
|
31
|
+
label: "Show labels",
|
|
32
|
+
tooltip: "If enough room available",
|
|
33
|
+
default: !0
|
|
34
|
+
}
|
|
66
35
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
36
|
+
{
|
|
37
|
+
key: "display.bubbleValues",
|
|
38
|
+
control: {
|
|
39
|
+
type: "picker",
|
|
40
|
+
label: "Show values",
|
|
41
|
+
tooltip: "If enough room available",
|
|
42
|
+
default: "none",
|
|
43
|
+
enum: [
|
|
44
|
+
"none",
|
|
45
|
+
"percentage",
|
|
46
|
+
"absolute"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
key: "categories.colored",
|
|
52
|
+
control: {
|
|
53
|
+
type: "switch",
|
|
54
|
+
label: "Bubble color by category",
|
|
55
|
+
default: !0
|
|
56
|
+
},
|
|
57
|
+
visibleIf: o
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "color",
|
|
61
|
+
control: {
|
|
62
|
+
type: "color-picker",
|
|
63
|
+
label: "Bubble color",
|
|
64
|
+
default: ({ theme: t }) => e(t),
|
|
65
|
+
extraLabel: ({ options: e, theme: t }) => r(e, t, "color"),
|
|
66
|
+
extraLabelHasClickAction: ({ options: e, theme: t }) => n(e, t, "color"),
|
|
67
|
+
extraLabelClickAction: ({ options: e, theme: n }) => t(e, n, "color")
|
|
68
|
+
},
|
|
69
|
+
visibleIf: ({ options: e, slots: t }) => e?.categories?.colored === !1 && o({ slots: t })
|
|
100
70
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
key: "legend",
|
|
75
|
+
type: "group",
|
|
76
|
+
open: !1,
|
|
77
|
+
children: [
|
|
78
|
+
{
|
|
79
|
+
key: "legend.position",
|
|
80
|
+
control: {
|
|
81
|
+
label: "Position",
|
|
82
|
+
type: "position-picker",
|
|
83
|
+
default: "topRight",
|
|
84
|
+
enum: [
|
|
85
|
+
"topLeft",
|
|
86
|
+
"top",
|
|
87
|
+
"topRight",
|
|
88
|
+
"right",
|
|
89
|
+
"bottomRight",
|
|
90
|
+
"bottom",
|
|
91
|
+
"bottomLeft",
|
|
92
|
+
"left"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
108
95
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
96
|
+
{
|
|
97
|
+
key: "legend.customOrder",
|
|
98
|
+
control: {
|
|
99
|
+
label: "Custom order",
|
|
100
|
+
description: "Drag items in the chart legend to set the order.",
|
|
101
|
+
type: "switch",
|
|
102
|
+
default: !1
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: "interactivity.legendReorder",
|
|
107
|
+
control: {
|
|
108
|
+
label: "Allow viewers to reorder",
|
|
109
|
+
type: "switch",
|
|
110
|
+
default: !1
|
|
111
|
+
},
|
|
112
|
+
visibleIf: ({ options: e }) => e?.legend?.customOrder === !0
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
visibleIf: a
|
|
116
|
+
},
|
|
117
|
+
i()
|
|
118
|
+
];
|
|
114
119
|
//#endregion
|
|
115
|
-
export {
|
|
120
|
+
export { s as default };
|
|
116
121
|
|
|
117
122
|
//# sourceMappingURL=bubble-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bubble-chart/bubble-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BubbleChartViewOptions } from './bubble-chart-options';\n\ntype BubbleChartConfigContext = OptionsConfigContext<BubbleChartViewOptions>;\n\nconst hasLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0;\n }\n\n return false;\n};\n\nconst hasNoLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return !((slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0);\n }\n\n return true;\n};\n\nconst bubbleChartOptionsConfig: OptionsConfig<BubbleChartConfigContext> = [\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 visibleIf: hasLegend\n },\n {\n key: 'display.bubbleLabels',\n control: {\n type: 'switch',\n label: 'Show labels',\n tooltip: 'If enough room available',\n default: true\n }\n },\n {\n key: 'display.bubbleValues',\n control: {\n type: 'picker',\n label: 'Show values',\n tooltip: 'If enough room available',\n default: 'none',\n enum: ['none', 'percentage', 'absolute']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n label: 'Bubble color by category',\n default: true\n },\n visibleIf: hasNoLegend\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bubble color',\n default: ({ theme }: BubbleChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BubbleChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: ({ options, slots }: BubbleChartConfigContext) => options?.categories?.colored === false && hasNoLegend({ slots })\n }\n ]\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 }: BubbleChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegend\n }\n];\n\nexport default bubbleChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bubble-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bubble-chart/bubble-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BubbleChartViewOptions } from './bubble-chart-options';\n\ntype BubbleChartConfigContext = OptionsConfigContext<BubbleChartViewOptions>;\n\nconst hasLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return (slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0;\n }\n\n return false;\n};\n\nconst hasNoLegend = ({ slots }: Pick<BubbleChartConfigContext, 'slots'>) => {\n if (Array.isArray(slots) && slots?.length > 0) {\n return !((slots?.find((s) => s?.name === 'color')?.content?.length ?? 0) > 0);\n }\n\n return true;\n};\n\nconst bubbleChartOptionsConfig: OptionsConfig<BubbleChartConfigContext> = [\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 visibleIf: hasLegend\n },\n {\n key: 'display.bubbleLabels',\n control: {\n type: 'switch',\n label: 'Show labels',\n tooltip: 'If enough room available',\n default: true\n }\n },\n {\n key: 'display.bubbleValues',\n control: {\n type: 'picker',\n label: 'Show values',\n tooltip: 'If enough room available',\n default: 'none',\n enum: ['none', 'percentage', 'absolute']\n }\n },\n {\n key: 'categories.colored',\n control: {\n type: 'switch',\n label: 'Bubble color by category',\n default: true\n },\n visibleIf: hasNoLegend\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bubble color',\n default: ({ theme }: BubbleChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BubbleChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BubbleChartConfigContext) =>\n getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n },\n visibleIf: ({ options, slots }: BubbleChartConfigContext) => options?.categories?.colored === false && hasNoLegend({ slots })\n }\n ]\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 }: BubbleChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: hasLegend\n },\n createInfoTooltipOptionsGroup<BubbleChartConfigContext>()\n];\n\nexport default bubbleChartOptionsConfig;\n"],"mappings":";;;AAYA,IAAM,KAAa,EAAE,eACf,MAAM,QAAQ,CAAK,KAAK,GAAO,SAAS,KAClC,GAAO,MAAM,MAAM,GAAG,SAAS,OAAO,CAAC,EAAE,SAAS,UAAU,KAAK,IAGpE,IAGH,KAAe,EAAE,eACjB,MAAM,QAAQ,CAAK,KAAK,GAAO,SAAS,IACnC,GAAG,GAAO,MAAM,MAAM,GAAG,SAAS,OAAO,CAAC,EAAE,SAAS,UAAU,KAAK,KAGtE,IAGH,IAAoE;CACxE;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;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,SAAS;KACT,MAAM;MAAC;MAAQ;MAAc;KAAU;IACzC;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;IACA,WAAW;GACb;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,UAAU,EAAE,eAAsC,EAAkB,CAAK;KACzE,aAAa,EAAE,YAAS,eAAsC,EAA4B,GAAS,GAAO,OAAO;KACjH,2BAA2B,EAAE,YAAS,eACpC,EAA0C,GAAS,GAAO,OAAO;KACnE,wBAAwB,EAAE,YAAS,eACjC,EAAuC,GAAS,GAAO,OAAO;IAClE;IACA,YAAY,EAAE,YAAS,eAAsC,GAAS,YAAY,YAAY,MAAS,EAAY,EAAE,SAAM,CAAC;GAC9H;EACF;CACF;CACA;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,EAAwD;AAC1D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../helpers.cjs");var t=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.ranges`,control:{type:`switch`,label:`Ranges`,default:!0}},{key:`display.bulletSubtitles`,control:{type:`switch`,label:`Bullet subtitle`,default:!1}},{key:`color`,control:{type:`color-picker`,label:`Bullet color`,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`)}},{key:`sort.direction`,control:{type:`picker`,label:`Bullet order`,default:`asc`,enum:[`asc`,`desc`]}}]}];exports.default=t;
|
|
1
|
+
const e=require("../helpers.cjs");var t=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.ranges`,control:{type:`switch`,label:`Ranges`,default:!0}},{key:`display.bulletSubtitles`,control:{type:`switch`,label:`Bullet subtitle`,default:!1}},{key:`color`,control:{type:`color-picker`,label:`Bullet color`,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`)}},{key:`sort.direction`,control:{type:`picker`,label:`Bullet order`,default:`asc`,enum:[`asc`,`desc`]}}]},require("../shared/utils/info-tooltip-options.config.cjs").createInfoTooltipOptionsGroup()];exports.default=t;
|
|
2
2
|
//# sourceMappingURL=bullet-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullet-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bullet-chart/bullet-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BulletChartViewOptions } from './bullet-chart-options';\n\ntype BulletChartConfigContext = OptionsConfigContext<BulletChartViewOptions>;\n\nconst bulletChartOptionsConfig: OptionsConfig<BulletChartConfigContext> = [\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.ranges',\n control: {\n type: 'switch',\n label: 'Ranges',\n default: true\n }\n },\n {\n key: 'display.bulletSubtitles',\n control: {\n type: 'switch',\n label: 'Bullet subtitle',\n default: false\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bullet color',\n default: ({ theme }: BulletChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Bullet order',\n default: 'asc',\n enum: ['asc', 'desc']\n }\n }\n ]\n }\n // TODO needs fetching of values from the bullet chart\n /*\n {\n key: 'bullets',\n type: 'group',\n open: true,\n children: [\n ]\n }\n
|
|
1
|
+
{"version":3,"file":"bullet-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bullet-chart/bullet-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BulletChartViewOptions } from './bullet-chart-options';\n\ntype BulletChartConfigContext = OptionsConfigContext<BulletChartViewOptions>;\n\nconst bulletChartOptionsConfig: OptionsConfig<BulletChartConfigContext> = [\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.ranges',\n control: {\n type: 'switch',\n label: 'Ranges',\n default: true\n }\n },\n {\n key: 'display.bulletSubtitles',\n control: {\n type: 'switch',\n label: 'Bullet subtitle',\n default: false\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bullet color',\n default: ({ theme }: BulletChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Bullet order',\n default: 'asc',\n enum: ['asc', 'desc']\n }\n }\n ]\n }\n // TODO needs fetching of values from the bullet chart\n /*\n {\n key: 'bullets',\n type: 'group',\n open: true,\n children: [\n ]\n }\n */,\n createInfoTooltipOptionsGroup<BulletChartConfigContext>()\n];\n\nexport default bulletChartOptionsConfig;\n"],"mappings":"kCAYA,IAAM,EAAoE,CACxE,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,SACP,QAAS,EACX,CACF,EACA,CACE,IAAK,0BACL,QAAS,CACP,KAAM,SACN,MAAO,kBACP,QAAS,EACX,CACF,EACA,CACE,IAAK,QACL,QAAS,CACP,KAAM,eACN,MAAO,eACP,SAAU,CAAE,WAAsC,EAAA,kBAAkB,CAAK,EACzE,YAAa,CAAE,UAAS,WAAsC,EAAA,4BAA4B,EAAS,EAAO,OAAO,EACjH,0BAA2B,CAAE,UAAS,WAAsC,EAAA,0CAA0C,EAAS,EAAO,OAAO,EAC7I,uBAAwB,CAAE,UAAS,WAAsC,EAAA,uCAAuC,EAAS,EAAO,OAAO,CACzI,CACF,EACA,CACE,IAAK,iBACL,QAAS,CACP,KAAM,SACN,MAAO,eACP,QAAS,MACT,KAAM,CAAC,MAAO,MAAM,CACtB,CACF,CACF,CACF,2DAWA,CAAA,CAAA,8BAAwD,CAC1D"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getThemeMainColor as e, getThemeMainColorExtraLabelClickAction as t, getThemeMainColorExtraLabelHasClickAction as n, getThemeMainColorResetLabel as r } from "../helpers.js";
|
|
2
|
+
import { createInfoTooltipOptionsGroup as i } from "../shared/utils/info-tooltip-options.config.js";
|
|
2
3
|
//#region src/lib/bullet-chart/bullet-chart-options.config.ts
|
|
3
|
-
var
|
|
4
|
+
var a = [{
|
|
4
5
|
key: "general",
|
|
5
6
|
type: "group",
|
|
6
7
|
open: !0,
|
|
@@ -50,8 +51,8 @@ var i = [{
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
]
|
|
53
|
-
}];
|
|
54
|
+
}, i()];
|
|
54
55
|
//#endregion
|
|
55
|
-
export {
|
|
56
|
+
export { a as default };
|
|
56
57
|
|
|
57
58
|
//# sourceMappingURL=bullet-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullet-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bullet-chart/bullet-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BulletChartViewOptions } from './bullet-chart-options';\n\ntype BulletChartConfigContext = OptionsConfigContext<BulletChartViewOptions>;\n\nconst bulletChartOptionsConfig: OptionsConfig<BulletChartConfigContext> = [\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.ranges',\n control: {\n type: 'switch',\n label: 'Ranges',\n default: true\n }\n },\n {\n key: 'display.bulletSubtitles',\n control: {\n type: 'switch',\n label: 'Bullet subtitle',\n default: false\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bullet color',\n default: ({ theme }: BulletChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Bullet order',\n default: 'asc',\n enum: ['asc', 'desc']\n }\n }\n ]\n }\n // TODO needs fetching of values from the bullet chart\n /*\n {\n key: 'bullets',\n type: 'group',\n open: true,\n children: [\n ]\n }\n
|
|
1
|
+
{"version":3,"file":"bullet-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/bullet-chart/bullet-chart-options.config.ts"],"sourcesContent":["import {\n getThemeMainColor,\n getThemeMainColorExtraLabelClickAction,\n getThemeMainColorExtraLabelHasClickAction,\n getThemeMainColorResetLabel\n} from '../helpers';\nimport { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { BulletChartViewOptions } from './bullet-chart-options';\n\ntype BulletChartConfigContext = OptionsConfigContext<BulletChartViewOptions>;\n\nconst bulletChartOptionsConfig: OptionsConfig<BulletChartConfigContext> = [\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.ranges',\n control: {\n type: 'switch',\n label: 'Ranges',\n default: true\n }\n },\n {\n key: 'display.bulletSubtitles',\n control: {\n type: 'switch',\n label: 'Bullet subtitle',\n default: false\n }\n },\n {\n key: 'color',\n control: {\n type: 'color-picker',\n label: 'Bullet color',\n default: ({ theme }: BulletChartConfigContext) => getThemeMainColor(theme),\n extraLabel: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorResetLabel(options, theme, 'color'),\n extraLabelHasClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelHasClickAction(options, theme, 'color'),\n extraLabelClickAction: ({ options, theme }: BulletChartConfigContext) => getThemeMainColorExtraLabelClickAction(options, theme, 'color')\n }\n },\n {\n key: 'sort.direction',\n control: {\n type: 'picker',\n label: 'Bullet order',\n default: 'asc',\n enum: ['asc', 'desc']\n }\n }\n ]\n }\n // TODO needs fetching of values from the bullet chart\n /*\n {\n key: 'bullets',\n type: 'group',\n open: true,\n children: [\n ]\n }\n */,\n createInfoTooltipOptionsGroup<BulletChartConfigContext>()\n];\n\nexport default bulletChartOptionsConfig;\n"],"mappings":";;;AAYA,IAAM,IAAoE,CACxE;CACE,KAAK;CACL,MAAM;CACN,MAAM;CACN,UAAU;EACR;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF;EACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF;EACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;GACX;EACF;EACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,UAAU,EAAE,eAAsC,EAAkB,CAAK;IACzE,aAAa,EAAE,YAAS,eAAsC,EAA4B,GAAS,GAAO,OAAO;IACjH,2BAA2B,EAAE,YAAS,eAAsC,EAA0C,GAAS,GAAO,OAAO;IAC7I,wBAAwB,EAAE,YAAS,eAAsC,EAAuC,GAAS,GAAO,OAAO;GACzI;EACF;EACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM,CAAC,OAAO,MAAM;GACtB;EACF;CACF;AACF,GAWA,EAAwD,CAC1D"}
|