From 0bee8e71e47f2232c0aaffc3a5e25807a327abcb Mon Sep 17 00:00:00 2001 From: Eric Wei Date: Fri, 4 Nov 2022 11:33:01 -0700 Subject: [PATCH] Fix for app analytics crash (#1255) * fix for app analytics crash Signed-off-by: Eric Wei * updated snapshots Signed-off-by: Eric Wei * fix saved object issue and remove config options not in release Signed-off-by: Eric Wei * update snapshots Signed-off-by: Eric Wei Signed-off-by: Eric Wei --- .../common/types/explorer.ts | 2 +- .../__snapshots__/utils.test.tsx.snap | 63 -- .../event_analytics/explorer/explorer.tsx | 12 +- .../__snapshots__/config_panel.test.tsx.snap | 842 ------------------ .../__tests__/__snapshots__/bar.test.tsx.snap | 7 - .../__snapshots__/heatmap.test.tsx.snap | 7 - .../__snapshots__/histogram.test.tsx.snap | 7 - .../horizontal_bar.test.tsx.snap | 7 - .../__snapshots__/line.test.tsx.snap | 7 - .../__snapshots__/logs_view.test.tsx.snap | 7 - .../__tests__/__snapshots__/pie.test.tsx.snap | 7 - .../__snapshots__/text.test.tsx.snap | 7 - .../__snapshots__/treemap.test.tsx.snap | 7 - .../visualizations/charts/bar/bar_type.ts | 7 - .../charts/data_table/data_table_type.ts | 7 - .../visualizations/charts/lines/line_type.ts | 7 - .../visualizations/charts/pie/pie_type.ts | 9 - 17 files changed, 7 insertions(+), 1005 deletions(-) diff --git a/dashboards-observability/common/types/explorer.ts b/dashboards-observability/common/types/explorer.ts index c1c6ccc07..3174d5c0b 100644 --- a/dashboards-observability/common/types/explorer.ts +++ b/dashboards-observability/common/types/explorer.ts @@ -139,7 +139,7 @@ export interface IExplorerProps { appBaseQuery?: string; callback?: any; callbackInApp?: any; - queryManager: QueryManager; + queryManager?: QueryManager; } export interface SavedQuery { diff --git a/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap b/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap index 4d71b9e61..3b6fa66d6 100644 --- a/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap +++ b/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap @@ -402,13 +402,6 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -864,13 +857,6 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -1333,13 +1319,6 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -2027,13 +2006,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -2557,13 +2529,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -3101,13 +3066,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -3796,13 +3754,6 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -4258,13 +4209,6 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -4727,13 +4671,6 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx b/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx index 82071906d..8090aa402 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx @@ -104,6 +104,7 @@ import { Sidebar } from './sidebar'; import { TimechartHeader } from './timechart_header'; import { ExplorerVisualizations } from './visualizations'; import { CountDistribution } from './visualizations/count_distribution'; +import { QueryManager } from '../../../../common/query_manager'; const TYPE_TAB_MAPPING = { [SAVED_QUERY]: TAB_EVENT_ID, @@ -132,7 +133,7 @@ export const Explorer = ({ setEndTime, callback, callbackInApp, - queryManager, + queryManager = new QueryManager(), }: IExplorerProps) => { const dispatch = useDispatch(); const requestParams = { tabId }; @@ -182,8 +183,6 @@ export const Explorer = ({ const [liveTimestamp, setLiveTimestamp] = useState(DATE_PICKER_FORMAT); const [triggerAvailability, setTriggerAvailability] = useState(false); const [viewLogPatterns, setViewLogPatterns] = useState(false); - const [isValidDataConfigOptionSelected, setIsValidDataConfigOptionSelected] = - useState(false); const [spanValue, setSpanValue] = useState(false); const [subType, setSubType] = useState('visualization'); const [metricMeasure, setMetricMeasure] = useState(''); @@ -309,8 +308,9 @@ export const Explorer = ({ // fill saved user configs if (objectData?.type) { let visConfig = {}; - if (!isEmpty(objectData.user_configs) && !isEmpty(objectData.user_configs.series)) { - visConfig = JSON.parse(objectData.user_configs); + const customConfig = objectData.user_configs ? JSON.parse(objectData.user_configs) : {}; + if (!isEmpty(customConfig.dataConfig) && !isEmpty(customConfig.dataConfig?.series)) { + visConfig = { ...customConfig }; } else { const statsTokens = queryManager.queryParser().parse(objectData.query).getStats(); visConfig = { dataConfig: { ...getDefaultVisConfig(statsTokens) } }; @@ -1350,7 +1350,7 @@ export const Explorer = ({ delayTime: number ) => { setLiveTailName(name); - setLiveTailTabId(curSelectedTabId.current as unknown as string); + setLiveTailTabId((curSelectedTabId.current as unknown) as string); setIsLiveTailOn(true); setToast('Live tail On', 'success'); setIsLiveTailPopoverOpen(false); diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap index 7283927bb..cc5cc9941 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap @@ -452,13 +452,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -775,13 +768,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -1081,13 +1067,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -1410,13 +1389,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -1670,28 +1642,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "mapTo": "labelSize", "name": "Label size", }, - Object { - "component": [Function], - "defaultState": Object { - "name": "default", - }, - "eleType": "colorpicker", - "isSingleSelection": true, - "mapTo": "colorTheme", - "name": "Color theme", - "options": Array [ - Object { - "title": "Default", - "type": "text", - "value": "default", - }, - Object { - "title": "Single Color", - "type": "text", - "value": "singleColor", - }, - ], - }, ], }, ], @@ -2507,13 +2457,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -2845,13 +2788,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -3188,13 +3124,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -3466,13 +3395,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -3810,13 +3732,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -4124,13 +4039,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -4606,13 +4514,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], } } @@ -5064,13 +4965,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -5397,13 +5291,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], } } @@ -5855,13 +5742,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -6401,13 +6281,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -6778,13 +6651,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], } } @@ -7236,13 +7102,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -7796,13 +7655,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -8623,13 +8475,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -9949,13 +9794,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -11296,13 +11134,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { @@ -13736,679 +13567,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] - -
-
- - -
-
- -
-
- -
-
- - - - - - -
- -
-
- -
-
- - -
-
-
diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap index bbbb71931..8c66dcbd0 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Veritcal Bar component Renders veritcal bar component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap index 967f3492e..497c9aa43 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Heatmap component Renders heatmap component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap index 419ff3c03..17bdfda8c 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Histogram component Renders histogram component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap index c8115cee2..8b6fbceae 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Horizontal bar component Renders horizontal bar component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap index 9694c40d7..4f4735aef 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Line component Renders line component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/logs_view.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/logs_view.test.tsx.snap index 1a1281d6e..0cf1a216c 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/logs_view.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/logs_view.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Logs View component Renders logs view component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap index 4bcc7e430..41d7f3d02 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Pie component Renders pie component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap index 762a46316..41c61aece 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap @@ -450,13 +450,6 @@ exports[`Text component Renders text component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap index 23d4f693a..2b6713d8b 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap @@ -467,13 +467,6 @@ exports[`Treemap component Renders treemap component 1`] = ` }, ], }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, ], }, Object { diff --git a/dashboards-observability/public/components/visualizations/charts/bar/bar_type.ts b/dashboards-observability/public/components/visualizations/charts/bar/bar_type.ts index f07555159..8fc51ce22 100644 --- a/dashboards-observability/public/components/visualizations/charts/bar/bar_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/bar/bar_type.ts @@ -197,13 +197,6 @@ export const createBarTypeDefinition = (params: any) => ({ }, ], }, - { - id: 'color-theme', - name: 'Color theme', - editor: ConfigColorTheme, - mapTo: 'colorTheme', - schemas: [], - }, ], }, { diff --git a/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts b/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts index effa7b716..7ad582ccd 100644 --- a/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts @@ -97,13 +97,6 @@ export const createDatatableTypeDefinition = (params: any = {}) => ({ }, ], }, - { - id: 'style-panel', - name: 'Layout', - mapTo: 'layoutConfig', - editor: ConfigEditor, - content: [], - }, ], }, visconfig: { diff --git a/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts b/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts index d02558b66..b82e44eb0 100644 --- a/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts @@ -204,13 +204,6 @@ export const createLineTypeDefinition = (params: any = {}) => ({ }, ], }, - { - id: 'color-theme', - name: 'Color theme', - editor: ConfigColorTheme, - mapTo: 'colorTheme', - schemas: [], - }, { id: 'thresholds', name: 'Thresholds', diff --git a/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts b/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts index 690754556..2ec2dc1e7 100644 --- a/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts @@ -121,15 +121,6 @@ export const createPieTypeDefinition = (params: any) => ({ mapTo: 'labelSize', eleType: 'input', }, - { - name: 'Color theme', - isSingleSelection: true, - component: ColorPalettePicker, - mapTo: 'colorTheme', - eleType: 'colorpicker', - options: PIE_PALETTES, - defaultState: { name: DEFAULT_PALETTE }, - }, ], }, ],