@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,8 +1,9 @@
|
|
|
1
1
|
import { createAxesOptionsGroup as e } from "../shared/utils/axis-options.config.js";
|
|
2
2
|
import { cartesianGuidelineLineTypes as t, createGuidelinesOptionsGroup as n } from "../shared/utils/guidelines-options.config.js";
|
|
3
3
|
import { createInfoTooltipOptionsGroup as r } from "../shared/utils/info-tooltip-options.config.js";
|
|
4
|
+
import { createInteractivityOptionsGroup as i } from "../shared/utils/interactivity-options.config.js";
|
|
4
5
|
//#region src/lib/combination-chart/combination-chart-options.config.ts
|
|
5
|
-
var
|
|
6
|
+
var a = [
|
|
6
7
|
{
|
|
7
8
|
key: "general",
|
|
8
9
|
type: "group",
|
|
@@ -108,9 +109,13 @@ var i = [
|
|
|
108
109
|
}
|
|
109
110
|
]),
|
|
110
111
|
n(t),
|
|
111
|
-
r()
|
|
112
|
+
r(),
|
|
113
|
+
i({ brush: {
|
|
114
|
+
default: !0,
|
|
115
|
+
excludesClickActions: !0
|
|
116
|
+
} })
|
|
112
117
|
];
|
|
113
118
|
//#endregion
|
|
114
|
-
export {
|
|
119
|
+
export { a as default };
|
|
115
120
|
|
|
116
121
|
//# sourceMappingURL=combination-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combination-chart-options.config.js","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.js","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":";;;;;AAYA,IAAM,IAA8E;CAClF;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU,CACR;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,SAAS;GACX;EACF,GACA;GACE,KAAK;GACL,SAAS;IACP,MAAM;IACN,SAAS;GACX;EACF,CACF;CACF;CACA;EACE,KAAK;EACL,MAAM;EACN,OAAO;EACP,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,OAAO,QAAQ;IACxB;IACA,YAAY,EAAE,iBAA6C,GAAS,SAAS,WAAW;GAC1F;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;IACP;IACA,YAAY,EAAE,iBAA6C,GAAS,SAAS,WAAW;GAC1F;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,KAAK;KACL,KAAK;IACP;GACF;EACF;CACF;CACA,EAAsD;EACpD;GAAE,MAAM;GAAK,MAAM;GAAY,OAAO;GAAM,OAAO;GAAM,UAAU;GAAM,WAAW;GAAM,mBAAmB;EAAK;EAClH;GAAE,MAAM;GAAK,MAAM;GAAW,OAAO;GAAM,aAAa;IAAE,KAAK;IAA0B,kBAAkB;GAAc;GAAG,OAAO;GAAM,OAAO;GAAM,aAAa;GAAM,UAAU;GAAM,WAAW;EAAK;EACzM;GAAE,MAAM;GAAM,MAAM;GAAW,OAAO;GAAM,aAAa;IAAE,KAAK;IAA2B,kBAAkB;GAAe;GAAG,OAAO;GAAM,OAAO;GAAM,aAAa;GAAM,UAAU;GAAM,WAAW;EAAK;CAC9M,CAAC;CACD,EAA6B,CAA2B;CACxD,EAA6D;CAC7D,EAA+D,EAAE,OAAO;EAAE,SAAS;EAAM,sBAAsB;CAAK,EAAE,CAAC;AACzH"}
|
|
@@ -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:`mode`,control:{type:`picker`,default:`donut`,enum:[`donut`,`pie`]}},{key:`slices.half`,control:{type:`picker`,default:`full`,enum:[`full`,`half`],parseValue:e=>e?`half`:`full`,toValue:e=>e===`half`}},{type:`divider`},{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.legend`,control:{type:`switch`,label:`Legend`,default:!0,calculateValue:({options:e})=>e?.display?.legend!==!1||e?.display?.categoryLabels===!0,toOptions:({options:e,value:t})=>({...e,display:{...e.display,legend:t,categoryLabels:!1}})}},{key:`display.categoryLabels`,control:{type:`radio-button-group`,enum:[`list`,`labels`],parseValue:e=>e?`labels`:`list`,toOptions:({options:e,value:t})=>({...e,display:{...e.display,categoryLabels:t===`labels`,legend:t!==`labels`}})},visibleIf:({options:e})=>e?.display?.legend!==!1||e?.display?.categoryLabels===!0}]},{key:`slices`,type:`group`,open:!0,children:[{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}},{key:`display.values`,control:{type:`picker`,default:`none`,enum:[`none`,`absolute`,`percentage`]}},{key:`slices.width`,control:{type:`slider`,default:.35,min:.05,max:.9,step:.01},visibleIf:({options:e})=>e?.mode===`donut`},{key:`slices.maxNumber`,control:{type:`number-field`,default:12,min:0,max:50,step:1}},{key:`slices.minPercentage`,control:{type:`number-field`,default:3,min:0,max:100,step:1}},{key:`slices.roundedCorners`,control:{type:`slider`,default:8,min:0,max:24,step:1,extraLabel:({options:e,theme:t})=>typeof t?.itemSpecific?.rounding==`number`?typeof e?.slices?.roundedCorners==`number`?`reset`:`auto`:null,extraLabelHasClickAction:({options:e,theme:t})=>typeof t?.itemSpecific?.rounding==`number`&&typeof e?.slices?.roundedCorners==`number`,extraLabelClickAction:({options:e})=>{let t={...e};return t?.slices?.roundedCorners!==void 0&&delete t.slices.roundedCorners,{value:null,options:t}}}},{key:`slices.padding`,control:{type:`slider`,default:5,min:0,max:20,step:1,extraLabel:({options:e,theme:t})=>typeof t?.itemSpecific?.padding==`number`?typeof e?.slices?.padding==`number`?`reset`:`auto`:null,extraLabelHasClickAction:({options:e,theme:t})=>typeof t?.itemSpecific?.padding==`number`&&typeof e?.slices?.padding==`number`,extraLabelClickAction:({options:e})=>{let t={...e};return t?.slices?.padding!==void 0&&delete t.slices.padding,{value:null,options:t}}},visibleIf:({options:e})=>e?.mode===`donut`}]},e.createInfoTooltipOptionsGroup(),t.createInteractivityOptionsGroup({select:{default:!0,visibleIf:({slots:e})=>(e?.find(e=>e?.name===`category`)?.content?.length??0)>0}})];exports.default=n;
|
|
2
2
|
//# sourceMappingURL=donut-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"donut-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/donut-chart/donut-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { DonutChartViewOptions } from './donut-chart-options';\n\ntype DonutChartConfigContext = OptionsConfigContext<DonutChartViewOptions>;\ntype DonutChartConfigContextWithValue<T> = DonutChartConfigContext & { value: T };\n\nconst donutChartOptionsConfig: OptionsConfig<DonutChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'donut',\n enum: ['donut', 'pie']\n }\n },\n {\n key: 'slices.half',\n control: {\n type: 'picker',\n default: 'full',\n enum: ['full', 'half'],\n parseValue: (value: boolean | null | undefined) => (value ? 'half' : 'full'),\n toValue: (value: 'half' | 'full') => value === 'half'\n }\n },\n {\n type: 'divider'\n },\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 calculateValue: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<'labels' | 'list'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n }\n ]\n },\n {\n key: 'slices',\n type: 'group',\n open: true,\n children: [\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 key: 'display.values',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage']\n }\n },\n {\n key: 'slices.width',\n control: {\n type: 'slider',\n default: 0.35,\n min: 0.05,\n max: 0.9,\n step: 0.01\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n },\n {\n key: 'slices.maxNumber',\n control: {\n type: 'number-field',\n default: 12,\n min: 0,\n max: 50,\n step: 1\n }\n },\n {\n key: 'slices.minPercentage',\n control: {\n type: 'number-field',\n default: 3,\n min: 0,\n max: 100,\n step: 1\n }\n },\n {\n key: 'slices.roundedCorners',\n control: {\n type: 'slider',\n default: 8,\n min: 0,\n max: 24,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.slices?.roundedCorners !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.roundedCorners !== undefined) {\n delete newOptions.slices.roundedCorners;\n }\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'slices.padding',\n control: {\n type: 'slider',\n default: 5,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.padding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.slices?.padding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.padding !== undefined) {\n delete newOptions.slices.padding;\n }\n\n return { value: null, options: newOptions };\n }\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n }\n ]\n },\n createInfoTooltipOptionsGroup<DonutChartConfigContext>()\n];\n\nexport default donutChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"donut-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/donut-chart/donut-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, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { DonutChartViewOptions } from './donut-chart-options';\n\ntype DonutChartConfigContext = OptionsConfigContext<DonutChartViewOptions>;\ntype DonutChartConfigContextWithValue<T> = DonutChartConfigContext & { value: T };\n\nconst hasCategory = ({ slots }: DonutChartConfigContext) =>\n (slots?.find((slot) => slot?.name === 'category')?.content?.length ?? 0) > 0;\n\nconst donutChartOptionsConfig: OptionsConfig<DonutChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'donut',\n enum: ['donut', 'pie']\n }\n },\n {\n key: 'slices.half',\n control: {\n type: 'picker',\n default: 'full',\n enum: ['full', 'half'],\n parseValue: (value: boolean | null | undefined) => (value ? 'half' : 'full'),\n toValue: (value: 'half' | 'full') => value === 'half'\n }\n },\n {\n type: 'divider'\n },\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 calculateValue: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<'labels' | 'list'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n }\n ]\n },\n {\n key: 'slices',\n type: 'group',\n open: true,\n children: [\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 key: 'display.values',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage']\n }\n },\n {\n key: 'slices.width',\n control: {\n type: 'slider',\n default: 0.35,\n min: 0.05,\n max: 0.9,\n step: 0.01\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n },\n {\n key: 'slices.maxNumber',\n control: {\n type: 'number-field',\n default: 12,\n min: 0,\n max: 50,\n step: 1\n }\n },\n {\n key: 'slices.minPercentage',\n control: {\n type: 'number-field',\n default: 3,\n min: 0,\n max: 100,\n step: 1\n }\n },\n {\n key: 'slices.roundedCorners',\n control: {\n type: 'slider',\n default: 8,\n min: 0,\n max: 24,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.slices?.roundedCorners !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.roundedCorners !== undefined) {\n delete newOptions.slices.roundedCorners;\n }\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'slices.padding',\n control: {\n type: 'slider',\n default: 5,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.padding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.slices?.padding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.padding !== undefined) {\n delete newOptions.slices.padding;\n }\n\n return { value: null, options: newOptions };\n }\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n }\n ]\n },\n createInfoTooltipOptionsGroup<DonutChartConfigContext>(),\n createInteractivityOptionsGroup<DonutChartConfigContext>({ select: { default: true, visibleIf: hasCategory } })\n];\n\nexport default donutChartOptionsConfig;\n"],"mappings":"iIAWA,IAAM,EAAkE,CACtE,CACE,IAAK,UACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,OACL,QAAS,CACP,KAAM,SACN,QAAS,QACT,KAAM,CAAC,QAAS,KAAK,CACvB,CACF,EACA,CACE,IAAK,cACL,QAAS,CACP,KAAM,SACN,QAA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ACF,EACA,EAAA,8BAAuD,EACvD,EAAA,gCAAyD,CAAE,OAAQ,CAAE,QAAS,GAAM,WAlOjE,CAAE,YACpB,GAAO,KAAM,GAAS,GAAM,OAAS,UAAU,CAAC,EAAE,SAAS,QAAU,GAAK,CAiOgC,CAAE,CAAC,CAChH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createInfoTooltipOptionsGroup as e } from "../shared/utils/info-tooltip-options.config.js";
|
|
2
|
-
|
|
3
|
-
var
|
|
2
|
+
import { createInteractivityOptionsGroup as t } from "../shared/utils/interactivity-options.config.js";
|
|
3
|
+
var n = [
|
|
4
4
|
{
|
|
5
5
|
key: "general",
|
|
6
6
|
type: "group",
|
|
@@ -186,9 +186,13 @@ var t = [
|
|
|
186
186
|
}
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
|
-
e()
|
|
189
|
+
e(),
|
|
190
|
+
t({ select: {
|
|
191
|
+
default: !0,
|
|
192
|
+
visibleIf: ({ slots: e }) => (e?.find((e) => e?.name === "category")?.content?.length ?? 0) > 0
|
|
193
|
+
} })
|
|
190
194
|
];
|
|
191
195
|
//#endregion
|
|
192
|
-
export {
|
|
196
|
+
export { n as default };
|
|
193
197
|
|
|
194
198
|
//# sourceMappingURL=donut-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"donut-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/donut-chart/donut-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { DonutChartViewOptions } from './donut-chart-options';\n\ntype DonutChartConfigContext = OptionsConfigContext<DonutChartViewOptions>;\ntype DonutChartConfigContextWithValue<T> = DonutChartConfigContext & { value: T };\n\nconst donutChartOptionsConfig: OptionsConfig<DonutChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'donut',\n enum: ['donut', 'pie']\n }\n },\n {\n key: 'slices.half',\n control: {\n type: 'picker',\n default: 'full',\n enum: ['full', 'half'],\n parseValue: (value: boolean | null | undefined) => (value ? 'half' : 'full'),\n toValue: (value: 'half' | 'full') => value === 'half'\n }\n },\n {\n type: 'divider'\n },\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 calculateValue: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<'labels' | 'list'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n }\n ]\n },\n {\n key: 'slices',\n type: 'group',\n open: true,\n children: [\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 key: 'display.values',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage']\n }\n },\n {\n key: 'slices.width',\n control: {\n type: 'slider',\n default: 0.35,\n min: 0.05,\n max: 0.9,\n step: 0.01\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n },\n {\n key: 'slices.maxNumber',\n control: {\n type: 'number-field',\n default: 12,\n min: 0,\n max: 50,\n step: 1\n }\n },\n {\n key: 'slices.minPercentage',\n control: {\n type: 'number-field',\n default: 3,\n min: 0,\n max: 100,\n step: 1\n }\n },\n {\n key: 'slices.roundedCorners',\n control: {\n type: 'slider',\n default: 8,\n min: 0,\n max: 24,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.slices?.roundedCorners !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.roundedCorners !== undefined) {\n delete newOptions.slices.roundedCorners;\n }\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'slices.padding',\n control: {\n type: 'slider',\n default: 5,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.padding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.slices?.padding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.padding !== undefined) {\n delete newOptions.slices.padding;\n }\n\n return { value: null, options: newOptions };\n }\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n }\n ]\n },\n createInfoTooltipOptionsGroup<DonutChartConfigContext>()\n];\n\nexport default donutChartOptionsConfig;\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"donut-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/donut-chart/donut-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, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { DonutChartViewOptions } from './donut-chart-options';\n\ntype DonutChartConfigContext = OptionsConfigContext<DonutChartViewOptions>;\ntype DonutChartConfigContextWithValue<T> = DonutChartConfigContext & { value: T };\n\nconst hasCategory = ({ slots }: DonutChartConfigContext) =>\n (slots?.find((slot) => slot?.name === 'category')?.content?.length ?? 0) > 0;\n\nconst donutChartOptionsConfig: OptionsConfig<DonutChartConfigContext> = [\n {\n key: 'general',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n default: 'donut',\n enum: ['donut', 'pie']\n }\n },\n {\n key: 'slices.half',\n control: {\n type: 'picker',\n default: 'full',\n enum: ['full', 'half'],\n parseValue: (value: boolean | null | undefined) => (value ? 'half' : 'full'),\n toValue: (value: 'half' | 'full') => value === 'half'\n }\n },\n {\n type: 'divider'\n },\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 calculateValue: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: DonutChartConfigContextWithValue<'labels' | 'list'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: DonutChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n }\n ]\n },\n {\n key: 'slices',\n type: 'group',\n open: true,\n children: [\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 key: 'display.values',\n control: {\n type: 'picker',\n default: 'none',\n enum: ['none', 'absolute', 'percentage']\n }\n },\n {\n key: 'slices.width',\n control: {\n type: 'slider',\n default: 0.35,\n min: 0.05,\n max: 0.9,\n step: 0.01\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n },\n {\n key: 'slices.maxNumber',\n control: {\n type: 'number-field',\n default: 12,\n min: 0,\n max: 50,\n step: 1\n }\n },\n {\n key: 'slices.minPercentage',\n control: {\n type: 'number-field',\n default: 3,\n min: 0,\n max: 100,\n step: 1\n }\n },\n {\n key: 'slices.roundedCorners',\n control: {\n type: 'slider',\n default: 8,\n min: 0,\n max: 24,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.roundedCorners !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.slices?.roundedCorners !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.roundedCorners !== undefined) {\n delete newOptions.slices.roundedCorners;\n }\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'slices.padding',\n control: {\n type: 'slider',\n default: 5,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.slices?.padding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: DonutChartConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.slices?.padding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: DonutChartConfigContext) => {\n const newOptions = { ...options };\n\n if (newOptions?.slices?.padding !== undefined) {\n delete newOptions.slices.padding;\n }\n\n return { value: null, options: newOptions };\n }\n },\n visibleIf: ({ options }: DonutChartConfigContext) => options?.mode === 'donut'\n }\n ]\n },\n createInfoTooltipOptionsGroup<DonutChartConfigContext>(),\n createInteractivityOptionsGroup<DonutChartConfigContext>({ select: { default: true, visibleIf: hasCategory } })\n];\n\nexport default donutChartOptionsConfig;\n"],"mappings":";;AAWA,IAAM,IAAkE;CACtE;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,SAAS;KACT,MAAM,CAAC,SAAS,KAAK;IACvB;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,SAAS;KACT,MAAM,CAAC,QAAQ,MAAM;KACrB,aAAa,MAAuC,IAAQ,SAAS;KACrE,UAAU,MAA2B,MAAU;IACjD;GACF;GACA,EACE,MAAM,UACR;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;IACX;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,iBAAiB,EAAE,iBACjB,GAAS,SAAS,WAAW,MAAS,GAAS,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N,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,YAAa,WAIzC,OAAO,GAAS,QAAQ,kBAAmB,WAIxC,UAHE,SAJA;KASX,2BAA2B,EAAE,YAAS,eAChC,OAAO,GAAO,cAAc,YAAa,YAAY,OAAO,GAAS,QAAQ,kBAAmB;KAMtG,wBAAwB,EAAE,iBAAuC;MAC/D,IAAM,IAAa,EAAE,GAAG,EAAQ;MAMhC,OAJI,GAAY,QAAQ,mBAAmB,KAAA,KACzC,OAAO,EAAW,OAAO,gBAGpB;OAAE,OAAO;OAAM,SAAS;MAAW;KAC5C;IACF;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,SAAS;KACT,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,WAAY,WAIxC,OAAO,GAAS,QAAQ,WAAY,WAIjC,UAHE,SAJA;KASX,2BAA2B,EAAE,YAAS,eAChC,OAAO,GAAO,cAAc,WAAY,YAAY,OAAO,GAAS,QAAQ,WAAY;KAM9F,wBAAwB,EAAE,iBAAuC;MAC/D,IAAM,IAAa,EAAE,GAAG,EAAQ;MAMhC,OAJI,GAAY,QAAQ,YAAY,KAAA,KAClC,OAAO,EAAW,OAAO,SAGpB;OAAE,OAAO;OAAM,SAAS;MAAW;KAC5C;IACF;IACA,YAAY,EAAE,iBAAuC,GAAS,SAAS;GACzE;EACF;CACF;CACA,EAAuD;CACvD,EAAyD,EAAE,QAAQ;EAAE,SAAS;EAAM,YAlOjE,EAAE,gBACpB,GAAO,MAAM,MAAS,GAAM,SAAS,UAAU,CAAC,EAAE,SAAS,UAAU,KAAK;CAiOgC,EAAE,CAAC;AAChH"}
|
|
@@ -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.legend`,control:{type:`switch`,label:`Legend`,default:!0,calculateValue:({options:e})=>e?.display?.legend!==!1||e?.display?.categoryLabels===!0,toOptions:({options:e,value:t})=>({...e,display:{...e.display,legend:t,categoryLabels:!1}})}},{key:`display.categoryLabels`,control:{type:`radio-button-group`,label:`Display legend as`,default:`labels`,enum:[`list`,`labels`],parseValue:e=>e?`labels`:`list`,toOptions:({options:e,value:t})=>({...e,display:{...e.display,categoryLabels:t===`labels`,legend:t!==`labels`}})},visibleIf:({options:e})=>e?.display?.legend!==!1||e?.display?.categoryLabels===!0},{key:`display.values`,control:{type:`switch`,label:`Show values`,default:!1}},{key:`funnel.absValue`,control:{type:`switch`,label:`Show absolute values`,default:!0},visibleIf:({options:e})=>e?.display?.values===!0},{key:`funnel.perc`,control:{type:`picker`,label:`Percentage`,default:`hide`,enum:[`hide`,`ofMax`,`ofTot`]},visibleIf:({options:e})=>e?.display?.values===!0}]},{key:`funnel`,type:`group`,open:!0,children:[{key:`mode`,control:{type:`picker`,label:`Mode`,default:`dynamicWidth`,enum:[`dynamicWidth`,`dynamicHeight`,`regular`]}},{key:`funnel.rectangle`,control:{type:`switch`,label:`Rectangular`,default:!1}},{key:`sort.by`,control:{type:`picker`,label:`Order`,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}}]},{key:`legend`,type:`group`,open:!1,children:[{key:`legend.position`,control:{label:`Position`,type:`position-picker`,default:`right`,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:({options:e})=>e?.display?.legend===!0&&String(e.display?.categoryLabels)===`false`},e.createInfoTooltipOptionsGroup(),t.createInteractivityOptionsGroup({select:{default:!0}})];exports.default=n;
|
|
2
2
|
//# sourceMappingURL=funnel-chart-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"funnel-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/funnel-chart/funnel-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { FunnelChartViewOptions } from './funnel-chart-options';\n\ntype FunnelChartConfigContext = OptionsConfigContext<FunnelChartViewOptions>;\ntype FunnelChartConfigValue<T> = FunnelChartConfigContext & { value: T };\n\nconst funnelChartOptionsConfig: OptionsConfig<FunnelChartConfigContext> = [\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 calculateValue: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: FunnelChartConfigValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n label: 'Display legend as',\n default: 'labels',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: FunnelChartConfigValue<'list' | 'labels'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n },\n {\n key: 'display.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n },\n {\n key: 'funnel.absValue',\n control: {\n type: 'switch',\n label: 'Show absolute values',\n default: true\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n },\n {\n key: 'funnel.perc',\n control: {\n type: 'picker',\n label: 'Percentage',\n default: 'hide',\n enum: ['hide', 'ofMax', 'ofTot']\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n }\n ]\n },\n {\n key: 'funnel',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n label: 'Mode',\n default: 'dynamicWidth',\n enum: ['dynamicWidth', 'dynamicHeight', 'regular']\n }\n },\n {\n key: 'funnel.rectangle',\n control: {\n type: 'switch',\n label: 'Rectangular',\n default: false\n }\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order',\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 {\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: 'right',\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 }: FunnelChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend === true && String(options.display?.categoryLabels) === 'false'\n },\n createInfoTooltipOptionsGroup<FunnelChartConfigContext>()\n];\n\nexport default funnelChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"funnel-chart-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/funnel-chart/funnel-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, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { FunnelChartViewOptions } from './funnel-chart-options';\n\ntype FunnelChartConfigContext = OptionsConfigContext<FunnelChartViewOptions>;\ntype FunnelChartConfigValue<T> = FunnelChartConfigContext & { value: T };\n\nconst funnelChartOptionsConfig: OptionsConfig<FunnelChartConfigContext> = [\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 calculateValue: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: FunnelChartConfigValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n label: 'Display legend as',\n default: 'labels',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: FunnelChartConfigValue<'list' | 'labels'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n },\n {\n key: 'display.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n },\n {\n key: 'funnel.absValue',\n control: {\n type: 'switch',\n label: 'Show absolute values',\n default: true\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n },\n {\n key: 'funnel.perc',\n control: {\n type: 'picker',\n label: 'Percentage',\n default: 'hide',\n enum: ['hide', 'ofMax', 'ofTot']\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n }\n ]\n },\n {\n key: 'funnel',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n label: 'Mode',\n default: 'dynamicWidth',\n enum: ['dynamicWidth', 'dynamicHeight', 'regular']\n }\n },\n {\n key: 'funnel.rectangle',\n control: {\n type: 'switch',\n label: 'Rectangular',\n default: false\n }\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order',\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 {\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: 'right',\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 }: FunnelChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend === true && String(options.display?.categoryLabels) === 'false'\n },\n createInfoTooltipOptionsGroup<FunnelChartConfigContext>(),\n createInteractivityOptionsGroup<FunnelChartConfigContext>({ select: { default: true } })\n];\n\nexport default funnelChartOpt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F,EACA,CACE,IAAK,mBACL,QAAS,CACP,KAAM,SACN,MAAO,cACP,QAAS,EACX,CACF,EACA,CACE,IAAK,UACL,QAAS,CACP,KAAM,SACN,MAAO,QACP,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,CACE,IAAK,SACL,KAAM,QACN,KAAM,GACN,SAAU,CACR,CACE,IAAK,kBACL,QAAS,CACP,MAAO,WACP,KAAM,kBACN,QAAS,QACT,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,WAAY,CAAE,aACZ,GAAS,SAAS,SAAW,IAAQ,OAAO,EAAQ,SAAS,cAAc,IAAM,OACrF,EACA,EAAA,8BAAwD,EACxD,EAAA,gCAA0D,CAAE,OAAQ,CAAE,QAAS,EAAK,CAAE,CAAC,CACzF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
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/funnel-chart/funnel-chart-options.config.ts
|
|
3
|
-
var
|
|
4
|
+
var n = [
|
|
4
5
|
{
|
|
5
6
|
key: "general",
|
|
6
7
|
type: "group",
|
|
@@ -183,9 +184,10 @@ var t = [
|
|
|
183
184
|
],
|
|
184
185
|
visibleIf: ({ options: e }) => e?.display?.legend === !0 && String(e.display?.categoryLabels) === "false"
|
|
185
186
|
},
|
|
186
|
-
e()
|
|
187
|
+
e(),
|
|
188
|
+
t({ select: { default: !0 } })
|
|
187
189
|
];
|
|
188
190
|
//#endregion
|
|
189
|
-
export {
|
|
191
|
+
export { n as default };
|
|
190
192
|
|
|
191
193
|
//# sourceMappingURL=funnel-chart-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"funnel-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/funnel-chart/funnel-chart-options.config.ts"],"sourcesContent":["import { createInfoTooltipOptionsGroup } from '../shared/utils/info-tooltip-options.config';\nimport type { OptionsConfig, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { FunnelChartViewOptions } from './funnel-chart-options';\n\ntype FunnelChartConfigContext = OptionsConfigContext<FunnelChartViewOptions>;\ntype FunnelChartConfigValue<T> = FunnelChartConfigContext & { value: T };\n\nconst funnelChartOptionsConfig: OptionsConfig<FunnelChartConfigContext> = [\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 calculateValue: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: FunnelChartConfigValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n label: 'Display legend as',\n default: 'labels',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: FunnelChartConfigValue<'list' | 'labels'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n },\n {\n key: 'display.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n },\n {\n key: 'funnel.absValue',\n control: {\n type: 'switch',\n label: 'Show absolute values',\n default: true\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n },\n {\n key: 'funnel.perc',\n control: {\n type: 'picker',\n label: 'Percentage',\n default: 'hide',\n enum: ['hide', 'ofMax', 'ofTot']\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n }\n ]\n },\n {\n key: 'funnel',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n label: 'Mode',\n default: 'dynamicWidth',\n enum: ['dynamicWidth', 'dynamicHeight', 'regular']\n }\n },\n {\n key: 'funnel.rectangle',\n control: {\n type: 'switch',\n label: 'Rectangular',\n default: false\n }\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order',\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 {\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: 'right',\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 }: FunnelChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend === true && String(options.display?.categoryLabels) === 'false'\n },\n createInfoTooltipOptionsGroup<FunnelChartConfigContext>()\n];\n\nexport default funnelChartOptionsConfig;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"funnel-chart-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/funnel-chart/funnel-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, OptionsConfigContext } from '../shared/utils/options-config.types';\nimport type { FunnelChartViewOptions } from './funnel-chart-options';\n\ntype FunnelChartConfigContext = OptionsConfigContext<FunnelChartViewOptions>;\ntype FunnelChartConfigValue<T> = FunnelChartConfigContext & { value: T };\n\nconst funnelChartOptionsConfig: OptionsConfig<FunnelChartConfigContext> = [\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 calculateValue: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true,\n toOptions: ({ options, value }: FunnelChartConfigValue<boolean>) => ({\n ...options,\n display: {\n ...options.display,\n legend: value,\n categoryLabels: false\n }\n })\n }\n },\n {\n key: 'display.categoryLabels',\n control: {\n type: 'radio-button-group',\n label: 'Display legend as',\n default: 'labels',\n enum: ['list', 'labels'],\n parseValue: (value: string) => (value ? 'labels' : 'list'),\n toOptions: ({ options, value }: FunnelChartConfigValue<'list' | 'labels'>) => ({\n ...options,\n display: {\n ...options.display,\n categoryLabels: value === 'labels',\n legend: value !== 'labels'\n }\n })\n },\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend !== false || options?.display?.categoryLabels === true\n },\n {\n key: 'display.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n },\n {\n key: 'funnel.absValue',\n control: {\n type: 'switch',\n label: 'Show absolute values',\n default: true\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n },\n {\n key: 'funnel.perc',\n control: {\n type: 'picker',\n label: 'Percentage',\n default: 'hide',\n enum: ['hide', 'ofMax', 'ofTot']\n },\n visibleIf: ({ options }: FunnelChartConfigContext) => options?.display?.values === true\n }\n ]\n },\n {\n key: 'funnel',\n type: 'group',\n open: true,\n children: [\n {\n key: 'mode',\n control: {\n type: 'picker',\n label: 'Mode',\n default: 'dynamicWidth',\n enum: ['dynamicWidth', 'dynamicHeight', 'regular']\n }\n },\n {\n key: 'funnel.rectangle',\n control: {\n type: 'switch',\n label: 'Rectangular',\n default: false\n }\n },\n {\n key: 'sort.by',\n control: {\n type: 'picker',\n label: 'Order',\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 {\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: 'right',\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 }: FunnelChartConfigContext) => options?.legend?.customOrder === true\n }\n ],\n visibleIf: ({ options }: FunnelChartConfigContext) =>\n options?.display?.legend === true && String(options.display?.categoryLabels) === 'false'\n },\n createInfoTooltipOptionsGroup<FunnelChartConfigContext>(),\n createInteractivityOptionsGroup<FunnelChartConfigContext>({ select: { default: true } })\n];\n\nexport default funnelChartOptionsConfig;\n"],"mappings":";;;AAQA,IAAM,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;KACT,iBAAiB,EAAE,iBACjB,GAAS,SAAS,WAAW,MAAS,GAAS,SAAS,mBAAmB;KAC7E,YAAY,EAAE,YAAS,gBAA8C;MACnE,GAAG;MACH,SAAS;OACP,GAAG,EAAQ;OACX,QAAQ;OACR,gBAAgB;MAClB;KACF;IACF;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM,CAAC,QAAQ,QAAQ;KACvB,aAAa,MAAmB,IAAQ,WAAW;KACnD,YAAY,EAAE,YAAS,gBAAwD;MAC7E,GAAG;MACH,SAAS;OACP,GAAG,EAAQ;OACX,gBAAgB,MAAU;OAC1B,QAAQ,MAAU;MACpB;KACF;IACF;IACA,YAAY,EAAE,iBACZ,GAAS,SAAS,WAAW,MAAS,GAAS,SAAS,mBAAmB;GAC/E;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;IACA,YAAY,EAAE,iBAAwC,GAAS,SAAS,WAAW;GACrF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MAAC;MAAQ;MAAS;KAAO;IACjC;IACA,YAAY,EAAE,iBAAwC,GAAS,SAAS,WAAW;GACrF;EACF;CACF;CACA;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,UAAU;GACR;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,SAAS;KACT,MAAM;MAAC;MAAgB;MAAiB;KAAS;IACnD;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;KACT,MAAM,CAAC,WAAW,UAAU;IAC9B;GACF;GACA;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,KAAK;KACL,KAAK;IACP;GACF;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,YAAY,EAAE,iBACZ,GAAS,SAAS,WAAW,MAAQ,OAAO,EAAQ,SAAS,cAAc,MAAM;CACrF;CACA,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/info-tooltip-options.config.cjs"),n=require("../shared/utils/color/color-palettes.cjs"),
|
|
1
|
+
const e=require("../shared/utils/axis-options.config.cjs"),t=require("../shared/utils/info-tooltip-options.config.cjs"),n=require("../shared/utils/interactivity-options.config.cjs"),r=require("../shared/utils/color/color-palettes.cjs"),i=require("../shared/utils/color-range-utils.cjs");var a=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.values`,control:{type:`switch`,label:`Show values`,default:!1}}]},{key:`heatTable`,type:`group`,label:`Heat table`,open:!0,children:[{key:`heattable.opacity`,control:{type:`slider`,label:`Opacity`,default:.8,min:0,max:1,step:.01}},{key:`heattable.rounding`,control:{type:`slider`,label:`Rounding`,default:({theme:e})=>e?.itemSpecific?.rounding,min:0,max:20,step:1,extraLabel:({options:e,theme:t})=>typeof t?.itemSpecific?.rounding==`number`?typeof e?.heattable?.rounding==`number`?`reset`:`auto`:null,extraLabelHasClickAction:({options:e,theme:t})=>typeof t?.itemSpecific?.rounding==`number`&&typeof e?.heattable?.rounding==`number`,extraLabelClickAction:({options:e})=>{let t={...e,heattable:{...e.heattable,rounding:void 0}};return delete t.heattable.rounding,{value:null,options:t}}}},{key:`heattable.spacing`,control:{type:`slider`,label:`Spacing`,default:({theme:e})=>e?.itemSpecific?.padding,min:0,max:20,step:1,extraLabel:({options:e,theme:t})=>typeof t?.itemSpecific?.padding==`number`?typeof e?.heattable?.spacing==`number`?`reset`:`auto`:null,extraLabelHasClickAction:({options:e,theme:t})=>typeof t?.itemSpecific?.padding==`number`&&typeof e?.heattable?.spacing==`number`,extraLabelClickAction:({options:e})=>{let t={...e,heattable:{...e.heattable,spacing:void 0}};return delete t.heattable.spacing,{value:null,options:t}}}},{key:`colorsType`,control:{type:`picker`,label:`Colors type`,default:`sequential`,enum:[`sequential`,`divergent`,`manual`],toOptions:({options:e,value:t})=>{let n=r.getColorMaps()?.[e?.colorsClass]?.type,a=e?.colorsType??n??`sequential`,o=e?.colorsClass??`PuBu`,s=e?.numberClasses??7,c=i.toRangesWithValue(e?.manualValues?.ranges),l=a===`manual`?`manual`:o,u={...e,colorsType:t};if(t===`manual`){let e=i.calculateManualRanges(s,l,c);u.manualValues={...u.manualValues,ranges:i.toRangesWithVal(e)}}else t!==a&&(u.colorsClass=r.getColorMapKeys(t??`sequential`)[0]),delete u.manualValues;return u}}},{key:`classification`,control:{type:`picker`,label:`Method`,default:`quantile`,enum:[`interval`,`quantile`,`continuous`]},visibleIf:({options:e})=>e?.colorsType!==`manual`},{key:`numberClasses`,control:{type:`picker`,label:`Number of classes`,default:`7`,enum:[`3`,`4`,`5`,`6`,`7`,`8`,`9`],parseValue:e=>e?.toString()??`7`,toOptions:({options:e,value:t})=>{let n=Number.parseInt(t,10)||7,r={...e,numberClasses:n};if(e?.colorsType===`manual`){let n=i.calculateManualRanges(t,`manual`,i.toRangesWithValue(e?.manualValues?.ranges));r.manualValues={...r.manualValues,ranges:i.toRangesWithVal(n)}}return r}}},{key:`colorsClass`,control:{type:`color-palette-picker`,label:`Color palette`,hideLabel:!0,default:({options:e})=>{let t=r.getColorMaps()?.[e?.colorsClass]?.type;return r.getColorMapKeys(e?.colorsType??t??`sequential`)[0]},enum:({options:e})=>{let t=r.getColorMaps()?.[e?.colorsClass]?.type;return r.getColorMapKeys(e?.colorsType??t??`sequential`)},toOptions:({options:e,value:t})=>{let n=r.getColorMaps()?.[e?.colorsClass]?.type,i={...e,colorsClass:t,colorsType:n??`sequential`};return delete i.manualValues,i}},visibleIf:({options:e})=>e?.colorsType!==`manual`},{key:`manualValues.ranges`,control:{type:`color-range`,editRangeSize:!1,debounce:500,label:`Manual range values`,hideLabel:!0,calculateValue:({options:e})=>i.calculateManualRanges(e?.numberClasses??7,`manual`,i.toRangesWithValue(e?.manualValues?.ranges)),toOptions:({options:e,value:t})=>({...e,manualValues:{...e.manualValues,ranges:i.toRangesWithVal(t)}})},visibleIf:({options:e})=>e?.colorsType===`manual`}]},e.createAxesOptionsGroup([{axis:`x`,role:`axis`,color:!0,label:!0,tickMode:!0},{axis:`y`,role:`axis`,color:!0,label:!0,tickMode:!0}],[{key:`sort.x.order`,control:{type:`picker`,label:`X-axis order`,default:`asc`,enum:[`asc`,`desc`]}},{key:`sort.y.order`,control:{type:`picker`,label:`Y-axis order`,default:`asc`,enum:[`asc`,`desc`]}}]),t.createInfoTooltipOptionsGroup(),n.createInteractivityOptionsGroup({select:{default:!0}})];exports.default=a;
|
|
2
2
|
//# sourceMappingURL=heat-table-options.config.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heat-table-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/heat-table/heat-table-options.config.ts"],"sourcesContent":["import { type ColorsClassKey, type ColorValue, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport { calculateManualRanges, toRangesWithVal, toRangesWithValue } from '../shared/utils/color-range-utils';\nimport { createAxesOptionsGroup } 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 { HeatTableViewOptions } from './heat-table-options';\n\ntype HeatTableConfigContext = OptionsConfigContext<HeatTableViewOptions>;\ntype HeatTableConfigValue<T> = HeatTableConfigContext & { value: T };\n\nconst heatTableOptionsConfig: OptionsConfig<HeatTableConfigContext> = [\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.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n }\n ]\n },\n {\n key: 'heatTable',\n type: 'group',\n label: 'Heat table',\n open: true,\n children: [\n {\n key: 'heattable.opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.8,\n min: 0,\n max: 1,\n step: 0.01\n }\n },\n {\n key: 'heattable.rounding',\n control: {\n type: 'slider',\n label: 'Rounding',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.rounding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.heattable?.rounding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, rounding: undefined }\n };\n\n delete newOptions.heattable.rounding;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'heattable.spacing',\n control: {\n type: 'slider',\n label: 'Spacing',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.padding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.spacing !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.heattable?.spacing !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, spacing: undefined }\n };\n\n delete newOptions.heattable.spacing;\n\n return { value: null, options: newOptions };\n }\n }\n },\n // TODO make consistent with other color-ranges (choropleth, spike-map, route-map)\n {\n key: 'colorsType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'sequential',\n enum: ['sequential', 'divergent', 'manual'],\n toOptions: ({ options, value }: HeatTableConfigValue<ColorValue['type'] | 'manual'>) => {\n const previousColorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const previousType: ColorValue['type'] | 'manual' = options?.colorsType ?? previousColorClassType ?? 'sequential';\n const previousColorsClassValue = options?.colorsClass ?? 'PuBu';\n const numberClassesValue = options?.numberClasses ?? 7;\n const previousRanges = toRangesWithValue(options?.manualValues?.ranges);\n const useColorsClassToGenerate = previousType === 'manual' ? 'manual' : previousColorsClassValue;\n\n const newOptions = {\n ...options,\n colorsType: value\n };\n\n if (value === 'manual') {\n const manualRanges = calculateManualRanges(numberClassesValue, useColorsClassToGenerate, previousRanges);\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n if (value !== previousType) {\n const newColorsClass = getColorMapKeys(value ?? 'sequential')[0];\n\n newOptions.colorsClass = newColorsClass;\n }\n\n delete newOptions.manualValues;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'classification',\n control: {\n type: 'picker',\n label: 'Method',\n default: 'quantile',\n enum: ['interval', 'quantile', 'continuous']\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'numberClasses',\n control: {\n type: 'picker',\n label: 'Number of classes',\n default: '7',\n enum: ['3', '4', '5', '6', '7', '8', '9'],\n parseValue: (value: number) => value?.toString() ?? '7',\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const numValue = Number.parseInt(value, 10) || 7;\n\n const newOptions = { ...options, numberClasses: numValue };\n\n if (options?.colorsType === 'manual') {\n const manualRanges = calculateManualRanges(value, 'manual', 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: 'colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: HeatTableConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential')[0];\n },\n enum: ({ options }: HeatTableConfigContext) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential');\n },\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const newOptions = {\n ...options,\n colorsClass: value,\n colorsType: colorClassType ?? 'sequential'\n };\n\n delete newOptions.manualValues;\n\n return newOptions;\n }\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n label: 'Manual range values',\n hideLabel: true,\n calculateValue: ({ options }: HeatTableConfigContext) =>\n calculateManualRanges(options?.numberClasses ?? 7, 'manual', toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: HeatTableConfigValue<ReturnType<typeof calculateManualRanges>>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n })\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType === 'manual'\n }\n ]\n },\n createAxesOptionsGroup<HeatTableConfigContext>([\n { axis: 'x', role: 'axis', color: true, label: true, tickMode: true },\n { axis: 'y', role: 'axis', color: true, label: true, tickMode: true }\n ], [\n { key: 'sort.x.order', control: { type: 'picker', label: 'X-axis order', default: 'asc', enum: ['asc', 'desc'] } },\n { key: 'sort.y.order', control: { type: 'picker', label: 'Y-axis order', default: 'asc', enum: ['asc', 'desc'] } }\n ]),\n createInfoTooltipOptionsGroup<HeatTableConfigContext>()\n];\n\nexport default heatTableOptionsConfig;\n"],"mappings":"iOAUA,IAAM,EAAgE,CACpE,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,CACF,CACF,EACA,CACE,IAAK,YACL,KAAM,QACN,MAAO,aACP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,MAAM,CAAE,CAAE,EACjH,CAAE,IAAK,eAAgB,QAAS,CAAE,KAAM,SAAU,MAAO,eAAgB,QAAS,MAAO,KAAM,CAAC,MAAO,MAAM,CAAE,CAAE,CACnH,CAAC,EACD,EAAA,8BAAsD,CACxD"}
|
|
1
|
+
{"version":3,"file":"heat-table-options.config.cjs","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/heat-table/heat-table-options.config.ts"],"sourcesContent":["import { type ColorsClassKey, type ColorValue, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport { calculateManualRanges, toRangesWithVal, toRangesWithValue } from '../shared/utils/color-range-utils';\nimport { createAxesOptionsGroup } from '../shared/utils/axis-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 { HeatTableViewOptions } from './heat-table-options';\n\ntype HeatTableConfigContext = OptionsConfigContext<HeatTableViewOptions>;\ntype HeatTableConfigValue<T> = HeatTableConfigContext & { value: T };\n\nconst heatTableOptionsConfig: OptionsConfig<HeatTableConfigContext> = [\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.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n }\n ]\n },\n {\n key: 'heatTable',\n type: 'group',\n label: 'Heat table',\n open: true,\n children: [\n {\n key: 'heattable.opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.8,\n min: 0,\n max: 1,\n step: 0.01\n }\n },\n {\n key: 'heattable.rounding',\n control: {\n type: 'slider',\n label: 'Rounding',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.rounding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.heattable?.rounding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, rounding: undefined }\n };\n\n delete newOptions.heattable.rounding;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'heattable.spacing',\n control: {\n type: 'slider',\n label: 'Spacing',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.padding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.spacing !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.heattable?.spacing !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, spacing: undefined }\n };\n\n delete newOptions.heattable.spacing;\n\n return { value: null, options: newOptions };\n }\n }\n },\n // TODO make consistent with other color-ranges (choropleth, spike-map, route-map)\n {\n key: 'colorsType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'sequential',\n enum: ['sequential', 'divergent', 'manual'],\n toOptions: ({ options, value }: HeatTableConfigValue<ColorValue['type'] | 'manual'>) => {\n const previousColorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const previousType: ColorValue['type'] | 'manual' = options?.colorsType ?? previousColorClassType ?? 'sequential';\n const previousColorsClassValue = options?.colorsClass ?? 'PuBu';\n const numberClassesValue = options?.numberClasses ?? 7;\n const previousRanges = toRangesWithValue(options?.manualValues?.ranges);\n const useColorsClassToGenerate = previousType === 'manual' ? 'manual' : previousColorsClassValue;\n\n const newOptions = {\n ...options,\n colorsType: value\n };\n\n if (value === 'manual') {\n const manualRanges = calculateManualRanges(numberClassesValue, useColorsClassToGenerate, previousRanges);\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n if (value !== previousType) {\n const newColorsClass = getColorMapKeys(value ?? 'sequential')[0];\n\n newOptions.colorsClass = newColorsClass;\n }\n\n delete newOptions.manualValues;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'classification',\n control: {\n type: 'picker',\n label: 'Method',\n default: 'quantile',\n enum: ['interval', 'quantile', 'continuous']\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'numberClasses',\n control: {\n type: 'picker',\n label: 'Number of classes',\n default: '7',\n enum: ['3', '4', '5', '6', '7', '8', '9'],\n parseValue: (value: number) => value?.toString() ?? '7',\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const numValue = Number.parseInt(value, 10) || 7;\n\n const newOptions = { ...options, numberClasses: numValue };\n\n if (options?.colorsType === 'manual') {\n const manualRanges = calculateManualRanges(value, 'manual', 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: 'colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: HeatTableConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential')[0];\n },\n enum: ({ options }: HeatTableConfigContext) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential');\n },\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const newOptions = {\n ...options,\n colorsClass: value,\n colorsType: colorClassType ?? 'sequential'\n };\n\n delete newOptions.manualValues;\n\n return newOptions;\n }\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n label: 'Manual range values',\n hideLabel: true,\n calculateValue: ({ options }: HeatTableConfigContext) =>\n calculateManualRanges(options?.numberClasses ?? 7, 'manual', toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: HeatTableConfigValue<ReturnType<typeof calculateManualRanges>>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n })\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType === 'manual'\n }\n ]\n },\n createAxesOptionsGroup<HeatTableConfigContext>([\n { axis: 'x', role: 'axis', color: true, label: true, tickMode: true },\n { axis: 'y', role: 'axis', color: true, label: true, tickMode: true }\n ], [\n { key: 'sort.x.order', control: { type: 'picker', label: 'X-axis order', default: 'asc', enum: ['asc', 'desc'] } },\n { key: 'sort.y.order', control: { type: 'picker', label: 'Y-axis order', default: 'asc', enum: ['asc', 'desc'] } }\n ]),\n createInfoTooltipOptionsGroup<HeatTableConfigContext>(),\n createInteractivityOptionsGroup<HeatTableConfigContext>({ select: { default: true } })\n];\n\nexport default heatTableOptionsConfig;\n"],"mappings":"+RAWA,IAAM,EAAgE,CACpE,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,CACF,CACF,EACA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,eAAgB,QAAS,MAAO,KAAM,CAAC,MAAO,MAAM,CAAE,CAAE,EACjH,CAAE,IAAK,eAAgB,QAAS,CAAE,KAAM,SAAU,MAAO,eAAgB,QAAS,MAAO,KAAM,CAAC,MAAO,MAAM,CAAE,CAAE,CACnH,CAAC,EACD,EAAA,8BAAsD,EACtD,EAAA,gCAAwD,CAAE,OAAQ,CAAE,QAAS,EAAK,CAAE,CAAC,CACvF"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createAxesOptionsGroup as e } from "../shared/utils/axis-options.config.js";
|
|
2
2
|
import { createInfoTooltipOptionsGroup as t } from "../shared/utils/info-tooltip-options.config.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { createInteractivityOptionsGroup as n } from "../shared/utils/interactivity-options.config.js";
|
|
4
|
+
import { getColorMapKeys as r, getColorMaps as i } from "../shared/utils/color/color-palettes.js";
|
|
5
|
+
import { calculateManualRanges as a, toRangesWithVal as o, toRangesWithValue as s } from "../shared/utils/color-range-utils.js";
|
|
5
6
|
//#region src/lib/heat-table/heat-table-options.config.ts
|
|
6
|
-
var
|
|
7
|
+
var c = [
|
|
7
8
|
{
|
|
8
9
|
key: "general",
|
|
9
10
|
type: "group",
|
|
@@ -105,17 +106,17 @@ var s = [
|
|
|
105
106
|
"manual"
|
|
106
107
|
],
|
|
107
108
|
toOptions: ({ options: e, value: t }) => {
|
|
108
|
-
let
|
|
109
|
+
let n = i()?.[e?.colorsClass]?.type, c = e?.colorsType ?? n ?? "sequential", l = e?.colorsClass ?? "PuBu", u = e?.numberClasses ?? 7, d = s(e?.manualValues?.ranges), f = c === "manual" ? "manual" : l, p = {
|
|
109
110
|
...e,
|
|
110
111
|
colorsType: t
|
|
111
112
|
};
|
|
112
113
|
if (t === "manual") {
|
|
113
|
-
let e =
|
|
114
|
+
let e = a(u, f, d);
|
|
114
115
|
p.manualValues = {
|
|
115
116
|
...p.manualValues,
|
|
116
|
-
ranges:
|
|
117
|
+
ranges: o(e)
|
|
117
118
|
};
|
|
118
|
-
} else t !== c && (p.colorsClass =
|
|
119
|
+
} else t !== c && (p.colorsClass = r(t ?? "sequential")[0]), delete p.manualValues;
|
|
119
120
|
return p;
|
|
120
121
|
}
|
|
121
122
|
}
|
|
@@ -156,10 +157,10 @@ var s = [
|
|
|
156
157
|
numberClasses: n
|
|
157
158
|
};
|
|
158
159
|
if (e?.colorsType === "manual") {
|
|
159
|
-
let n =
|
|
160
|
+
let n = a(t, "manual", s(e?.manualValues?.ranges));
|
|
160
161
|
r.manualValues = {
|
|
161
162
|
...r.manualValues,
|
|
162
|
-
ranges:
|
|
163
|
+
ranges: o(n)
|
|
163
164
|
};
|
|
164
165
|
}
|
|
165
166
|
return r;
|
|
@@ -173,20 +174,20 @@ var s = [
|
|
|
173
174
|
label: "Color palette",
|
|
174
175
|
hideLabel: !0,
|
|
175
176
|
default: ({ options: e }) => {
|
|
176
|
-
let t =
|
|
177
|
-
return
|
|
177
|
+
let t = i()?.[e?.colorsClass]?.type;
|
|
178
|
+
return r(e?.colorsType ?? t ?? "sequential")[0];
|
|
178
179
|
},
|
|
179
180
|
enum: ({ options: e }) => {
|
|
180
|
-
let t =
|
|
181
|
-
return
|
|
181
|
+
let t = i()?.[e?.colorsClass]?.type;
|
|
182
|
+
return r(e?.colorsType ?? t ?? "sequential");
|
|
182
183
|
},
|
|
183
184
|
toOptions: ({ options: e, value: t }) => {
|
|
184
|
-
let n =
|
|
185
|
+
let n = i()?.[e?.colorsClass]?.type, r = {
|
|
185
186
|
...e,
|
|
186
187
|
colorsClass: t,
|
|
187
188
|
colorsType: n ?? "sequential"
|
|
188
189
|
};
|
|
189
|
-
return delete
|
|
190
|
+
return delete r.manualValues, r;
|
|
190
191
|
}
|
|
191
192
|
},
|
|
192
193
|
visibleIf: ({ options: e }) => e?.colorsType !== "manual"
|
|
@@ -199,12 +200,12 @@ var s = [
|
|
|
199
200
|
debounce: 500,
|
|
200
201
|
label: "Manual range values",
|
|
201
202
|
hideLabel: !0,
|
|
202
|
-
calculateValue: ({ options: e }) =>
|
|
203
|
+
calculateValue: ({ options: e }) => a(e?.numberClasses ?? 7, "manual", s(e?.manualValues?.ranges)),
|
|
203
204
|
toOptions: ({ options: e, value: t }) => ({
|
|
204
205
|
...e,
|
|
205
206
|
manualValues: {
|
|
206
207
|
...e.manualValues,
|
|
207
|
-
ranges:
|
|
208
|
+
ranges: o(t)
|
|
208
209
|
}
|
|
209
210
|
})
|
|
210
211
|
},
|
|
@@ -241,9 +242,10 @@ var s = [
|
|
|
241
242
|
enum: ["asc", "desc"]
|
|
242
243
|
}
|
|
243
244
|
}]),
|
|
244
|
-
t()
|
|
245
|
+
t(),
|
|
246
|
+
n({ select: { default: !0 } })
|
|
245
247
|
];
|
|
246
248
|
//#endregion
|
|
247
|
-
export {
|
|
249
|
+
export { c as default };
|
|
248
250
|
|
|
249
251
|
//# sourceMappingURL=heat-table-options.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heat-table-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/heat-table/heat-table-options.config.ts"],"sourcesContent":["import { type ColorsClassKey, type ColorValue, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport { calculateManualRanges, toRangesWithVal, toRangesWithValue } from '../shared/utils/color-range-utils';\nimport { createAxesOptionsGroup } 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 { HeatTableViewOptions } from './heat-table-options';\n\ntype HeatTableConfigContext = OptionsConfigContext<HeatTableViewOptions>;\ntype HeatTableConfigValue<T> = HeatTableConfigContext & { value: T };\n\nconst heatTableOptionsConfig: OptionsConfig<HeatTableConfigContext> = [\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.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n }\n ]\n },\n {\n key: 'heatTable',\n type: 'group',\n label: 'Heat table',\n open: true,\n children: [\n {\n key: 'heattable.opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.8,\n min: 0,\n max: 1,\n step: 0.01\n }\n },\n {\n key: 'heattable.rounding',\n control: {\n type: 'slider',\n label: 'Rounding',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.rounding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.heattable?.rounding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, rounding: undefined }\n };\n\n delete newOptions.heattable.rounding;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'heattable.spacing',\n control: {\n type: 'slider',\n label: 'Spacing',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.padding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.spacing !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.heattable?.spacing !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, spacing: undefined }\n };\n\n delete newOptions.heattable.spacing;\n\n return { value: null, options: newOptions };\n }\n }\n },\n // TODO make consistent with other color-ranges (choropleth, spike-map, route-map)\n {\n key: 'colorsType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'sequential',\n enum: ['sequential', 'divergent', 'manual'],\n toOptions: ({ options, value }: HeatTableConfigValue<ColorValue['type'] | 'manual'>) => {\n const previousColorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const previousType: ColorValue['type'] | 'manual' = options?.colorsType ?? previousColorClassType ?? 'sequential';\n const previousColorsClassValue = options?.colorsClass ?? 'PuBu';\n const numberClassesValue = options?.numberClasses ?? 7;\n const previousRanges = toRangesWithValue(options?.manualValues?.ranges);\n const useColorsClassToGenerate = previousType === 'manual' ? 'manual' : previousColorsClassValue;\n\n const newOptions = {\n ...options,\n colorsType: value\n };\n\n if (value === 'manual') {\n const manualRanges = calculateManualRanges(numberClassesValue, useColorsClassToGenerate, previousRanges);\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n if (value !== previousType) {\n const newColorsClass = getColorMapKeys(value ?? 'sequential')[0];\n\n newOptions.colorsClass = newColorsClass;\n }\n\n delete newOptions.manualValues;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'classification',\n control: {\n type: 'picker',\n label: 'Method',\n default: 'quantile',\n enum: ['interval', 'quantile', 'continuous']\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'numberClasses',\n control: {\n type: 'picker',\n label: 'Number of classes',\n default: '7',\n enum: ['3', '4', '5', '6', '7', '8', '9'],\n parseValue: (value: number) => value?.toString() ?? '7',\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const numValue = Number.parseInt(value, 10) || 7;\n\n const newOptions = { ...options, numberClasses: numValue };\n\n if (options?.colorsType === 'manual') {\n const manualRanges = calculateManualRanges(value, 'manual', 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: 'colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: HeatTableConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential')[0];\n },\n enum: ({ options }: HeatTableConfigContext) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential');\n },\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const newOptions = {\n ...options,\n colorsClass: value,\n colorsType: colorClassType ?? 'sequential'\n };\n\n delete newOptions.manualValues;\n\n return newOptions;\n }\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n label: 'Manual range values',\n hideLabel: true,\n calculateValue: ({ options }: HeatTableConfigContext) =>\n calculateManualRanges(options?.numberClasses ?? 7, 'manual', toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: HeatTableConfigValue<ReturnType<typeof calculateManualRanges>>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n })\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType === 'manual'\n }\n ]\n },\n createAxesOptionsGroup<HeatTableConfigContext>([\n { axis: 'x', role: 'axis', color: true, label: true, tickMode: true },\n { axis: 'y', role: 'axis', color: true, label: true, tickMode: true }\n ], [\n { key: 'sort.x.order', control: { type: 'picker', label: 'X-axis order', default: 'asc', enum: ['asc', 'desc'] } },\n { key: 'sort.y.order', control: { type: 'picker', label: 'Y-axis order', default: 'asc', enum: ['asc', 'desc'] } }\n ]),\n createInfoTooltipOptionsGroup<HeatTableConfigContext>()\n];\n\nexport default heatTableOptionsConfig;\n"],"mappings":";;;;;AAUA,IAAM,IAAgE;CACpE;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,OAAO;EACP,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,eAAoC,GAAO,cAAc;KACrE,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,YAAa,WAIzC,OAAO,GAAS,WAAW,YAAa,WAIrC,UAHE,SAJA;KASX,2BAA2B,EAAE,YAAS,eAChC,OAAO,GAAO,cAAc,YAAa,YAAY,OAAO,GAAS,WAAW,YAAa;KAMnG,wBAAwB,EAAE,iBAAsC;MAC9D,IAAM,IAAa;OACjB,GAAG;OACH,WAAW;QAAE,GAAG,EAAQ;QAAW,UAAU,KAAA;OAAU;MACzD;MAIA,OAFA,OAAO,EAAW,UAAU,UAErB;OAAE,OAAO;OAAM,SAAS;MAAW;KAC5C;IACF;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,UAAU,EAAE,eAAoC,GAAO,cAAc;KACrE,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,WAAY,WAIxC,OAAO,GAAS,WAAW,WAAY,WAIpC,UAHE,SAJA;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;CACF;CACA,EAA+C,CAC7C;EAAE,MAAM;EAAK,MAAM;EAAQ,OAAO;EAAM,OAAO;EAAM,UAAU;CAAK,GACpE;EAAE,MAAM;EAAK,MAAM;EAAQ,OAAO;EAAM,OAAO;EAAM,UAAU;CAAK,CACtE,GAAG,CACD;EAAE,KAAK;EAAgB,SAAS;GAAE,MAAM;GAAU,OAAO;GAAgB,SAAS;GAAO,MAAM,CAAC,OAAO,MAAM;EAAE;CAAE,GACjH;EAAE,KAAK;EAAgB,SAAS;GAAE,MAAM;GAAU,OAAO;GAAgB,SAAS;GAAO,MAAM,CAAC,OAAO,MAAM;EAAE;CAAE,CACnH,CAAC;CACD,EAAsD;AACxD"}
|
|
1
|
+
{"version":3,"file":"heat-table-options.config.js","names":[],"sources":["../../../../libs/dashboard-contents-types/src/lib/heat-table/heat-table-options.config.ts"],"sourcesContent":["import { type ColorsClassKey, type ColorValue, getColorMapKeys, getColorMaps } from '../shared/utils/color/color-palettes';\nimport { calculateManualRanges, toRangesWithVal, toRangesWithValue } from '../shared/utils/color-range-utils';\nimport { createAxesOptionsGroup } from '../shared/utils/axis-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 { HeatTableViewOptions } from './heat-table-options';\n\ntype HeatTableConfigContext = OptionsConfigContext<HeatTableViewOptions>;\ntype HeatTableConfigValue<T> = HeatTableConfigContext & { value: T };\n\nconst heatTableOptionsConfig: OptionsConfig<HeatTableConfigContext> = [\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.values',\n control: {\n type: 'switch',\n label: 'Show values',\n default: false\n }\n }\n ]\n },\n {\n key: 'heatTable',\n type: 'group',\n label: 'Heat table',\n open: true,\n children: [\n {\n key: 'heattable.opacity',\n control: {\n type: 'slider',\n label: 'Opacity',\n default: 0.8,\n min: 0,\n max: 1,\n step: 0.01\n }\n },\n {\n key: 'heattable.rounding',\n control: {\n type: 'slider',\n label: 'Rounding',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.rounding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.rounding !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.rounding !== 'number' || typeof options?.heattable?.rounding !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, rounding: undefined }\n };\n\n delete newOptions.heattable.rounding;\n\n return { value: null, options: newOptions };\n }\n }\n },\n {\n key: 'heattable.spacing',\n control: {\n type: 'slider',\n label: 'Spacing',\n default: ({ theme }: HeatTableConfigContext) => theme?.itemSpecific?.padding,\n min: 0,\n max: 20,\n step: 1,\n extraLabel: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number') {\n return null;\n }\n\n if (typeof options?.heattable?.spacing !== 'number') {\n return 'auto';\n }\n\n return 'reset';\n },\n extraLabelHasClickAction: ({ options, theme }: HeatTableConfigContext) => {\n if (typeof theme?.itemSpecific?.padding !== 'number' || typeof options?.heattable?.spacing !== 'number') {\n return false;\n }\n\n return true;\n },\n extraLabelClickAction: ({ options }: HeatTableConfigContext) => {\n const newOptions = {\n ...options,\n heattable: { ...options.heattable, spacing: undefined }\n };\n\n delete newOptions.heattable.spacing;\n\n return { value: null, options: newOptions };\n }\n }\n },\n // TODO make consistent with other color-ranges (choropleth, spike-map, route-map)\n {\n key: 'colorsType',\n control: {\n type: 'picker',\n label: 'Colors type',\n default: 'sequential',\n enum: ['sequential', 'divergent', 'manual'],\n toOptions: ({ options, value }: HeatTableConfigValue<ColorValue['type'] | 'manual'>) => {\n const previousColorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const previousType: ColorValue['type'] | 'manual' = options?.colorsType ?? previousColorClassType ?? 'sequential';\n const previousColorsClassValue = options?.colorsClass ?? 'PuBu';\n const numberClassesValue = options?.numberClasses ?? 7;\n const previousRanges = toRangesWithValue(options?.manualValues?.ranges);\n const useColorsClassToGenerate = previousType === 'manual' ? 'manual' : previousColorsClassValue;\n\n const newOptions = {\n ...options,\n colorsType: value\n };\n\n if (value === 'manual') {\n const manualRanges = calculateManualRanges(numberClassesValue, useColorsClassToGenerate, previousRanges);\n\n newOptions.manualValues = {\n ...newOptions.manualValues,\n ranges: toRangesWithVal(manualRanges)\n };\n }\n else {\n if (value !== previousType) {\n const newColorsClass = getColorMapKeys(value ?? 'sequential')[0];\n\n newOptions.colorsClass = newColorsClass;\n }\n\n delete newOptions.manualValues;\n }\n\n return newOptions;\n }\n }\n },\n {\n key: 'classification',\n control: {\n type: 'picker',\n label: 'Method',\n default: 'quantile',\n enum: ['interval', 'quantile', 'continuous']\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'numberClasses',\n control: {\n type: 'picker',\n label: 'Number of classes',\n default: '7',\n enum: ['3', '4', '5', '6', '7', '8', '9'],\n parseValue: (value: number) => value?.toString() ?? '7',\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const numValue = Number.parseInt(value, 10) || 7;\n\n const newOptions = { ...options, numberClasses: numValue };\n\n if (options?.colorsType === 'manual') {\n const manualRanges = calculateManualRanges(value, 'manual', 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: 'colorsClass',\n control: {\n type: 'color-palette-picker',\n label: 'Color palette',\n hideLabel: true,\n default: ({ options }: HeatTableConfigContext) => {\n const colorMaps = getColorMaps();\n const colorClassType = colorMaps?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential')[0];\n },\n enum: ({ options }: HeatTableConfigContext) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n\n return getColorMapKeys(options?.colorsType ?? colorClassType ?? 'sequential');\n },\n toOptions: ({ options, value }: HeatTableConfigValue<string>) => {\n const colorClassType = getColorMaps()?.[options?.colorsClass as ColorsClassKey]?.type;\n const newOptions = {\n ...options,\n colorsClass: value,\n colorsType: colorClassType ?? 'sequential'\n };\n\n delete newOptions.manualValues;\n\n return newOptions;\n }\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType !== 'manual'\n },\n {\n key: 'manualValues.ranges',\n control: {\n type: 'color-range',\n editRangeSize: false,\n debounce: 500,\n label: 'Manual range values',\n hideLabel: true,\n calculateValue: ({ options }: HeatTableConfigContext) =>\n calculateManualRanges(options?.numberClasses ?? 7, 'manual', toRangesWithValue(options?.manualValues?.ranges)),\n toOptions: ({ options, value }: HeatTableConfigValue<ReturnType<typeof calculateManualRanges>>) => ({\n ...options,\n manualValues: {\n ...options.manualValues,\n ranges: toRangesWithVal(value)\n }\n })\n },\n visibleIf: ({ options }: HeatTableConfigContext) => options?.colorsType === 'manual'\n }\n ]\n },\n createAxesOptionsGroup<HeatTableConfigContext>([\n { axis: 'x', role: 'axis', color: true, label: true, tickMode: true },\n { axis: 'y', role: 'axis', color: true, label: true, tickMode: true }\n ], [\n { key: 'sort.x.order', control: { type: 'picker', label: 'X-axis order', default: 'asc', enum: ['asc', 'desc'] } },\n { key: 'sort.y.order', control: { type: 'picker', label: 'Y-axis order', default: 'asc', enum: ['asc', 'desc'] } }\n ]),\n createInfoTooltipOptionsGroup<HeatTableConfigContext>(),\n createInteractivityOptionsGroup<HeatTableConfigContext>({ select: { default: true } })\n];\n\nexport default heatTableOptionsConfig;\n"],"mappings":";;;;;;AAWA,IAAM,IAAgE;CACpE;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,OAAO;EACP,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,eAAoC,GAAO,cAAc;KACrE,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,YAAa,WAIzC,OAAO,GAAS,WAAW,YAAa,WAIrC,UAHE,SAJA;KASX,2BAA2B,EAAE,YAAS,eAChC,OAAO,GAAO,cAAc,YAAa,YAAY,OAAO,GAAS,WAAW,YAAa;KAMnG,wBAAwB,EAAE,iBAAsC;MAC9D,IAAM,IAAa;OACjB,GAAG;OACH,WAAW;QAAE,GAAG,EAAQ;QAAW,UAAU,KAAA;OAAU;MACzD;MAIA,OAFA,OAAO,EAAW,UAAU,UAErB;OAAE,OAAO;OAAM,SAAS;MAAW;KAC5C;IACF;GACF;GACA;IACE,KAAK;IACL,SAAS;KACP,MAAM;KACN,OAAO;KACP,UAAU,EAAE,eAAoC,GAAO,cAAc;KACrE,KAAK;KACL,KAAK;KACL,MAAM;KACN,aAAa,EAAE,YAAS,eAClB,OAAO,GAAO,cAAc,WAAY,WAIxC,OAAO,GAAS,WAAW,WAAY,WAIpC,UAHE,SAJA;KASX,2BAA2B,EAAE,YAAS,eAChC,OAAO,GAAO,cAAc,WAAY,YAAY,OAAO,GAAS,WAAW,WA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