@blokkli/editor 2.0.0-alpha.36 → 2.0.0-alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global/types/blockOptions.d.ts +4 -3
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +71 -4
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +276 -6
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +31 -14
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +2 -20
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +0 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +66 -59
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +10 -12
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +1 -5
- package/dist/modules/agent/runtime/app/features/agent/index.vue +89 -37
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +16 -19
- package/dist/modules/agent/runtime/app/helpers/index.js +22 -46
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +1 -1
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +5 -9
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/analyze_content/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/analyze_content/index.js +120 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.js +57 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -1
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +2 -5
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -1
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +53 -0
- package/dist/modules/agent/runtime/app/tools/helpers.js +187 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +0 -52
- package/dist/modules/agent/runtime/app/tools/schemas.js +0 -187
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +40 -47
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +2 -5
- package/dist/modules/agent/runtime/app/types/index.d.ts +0 -61
- package/dist/modules/agent/runtime/server/Session.d.ts +25 -6
- package/dist/modules/agent/runtime/server/Session.js +109 -30
- package/dist/modules/agent/runtime/server/SessionManager.d.ts +3 -0
- package/dist/modules/agent/runtime/server/SessionManager.js +4 -1
- package/dist/modules/agent/runtime/server/agent.js +3 -2
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.js +69 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +28 -0
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +10 -2
- package/dist/modules/agent/runtime/server/server-tools/index.js +1 -1
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +1 -1
- package/dist/modules/agent/runtime/shared/types.d.ts +46 -11
- package/dist/modules/agent/runtime/shared/types.js +22 -10
- package/dist/modules/charts/index.d.mts +1 -1
- package/dist/modules/charts/index.mjs +21 -7
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +6 -6
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +25 -2
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +39 -1
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +24 -17
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +11 -19
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +2 -4
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +8 -20
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +6 -1
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +7 -1
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +1 -1
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +5 -1
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +3 -1
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +18 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +6 -1
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +4 -1
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +6 -1
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +5 -1
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +20 -5
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +6 -6
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +145 -2
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +2 -2
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +145 -2
- package/dist/modules/charts/runtime/components/index.d.ts +1 -0
- package/dist/modules/charts/runtime/components/index.js +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +3 -2
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +3 -2
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +1 -2
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +2 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +35 -13
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +2 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +9 -3
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +1 -1
- package/dist/modules/charts/runtime/features/charts/index.vue +6 -6
- package/dist/modules/charts/runtime/helpers/index.d.ts +25 -0
- package/dist/modules/charts/runtime/helpers/index.js +63 -0
- package/dist/modules/charts/runtime/types.d.ts +10 -28
- package/dist/modules/charts/runtime/types.js +0 -64
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -1
- package/dist/modules/drupal/runtime/adapter/index.js +4 -4
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/BlokkliItem.vue +1 -1
- package/dist/runtime/composables/defineBlokkli.js +1 -1
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +13 -7
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Banner/index.vue +1 -1
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/DropdownItem/index.vue +3 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/EditProvider.vue +7 -4
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +4 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +24 -101
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +4 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +28 -9
- package/dist/runtime/editor/components/Popup/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Popup/index.vue +82 -0
- package/dist/runtime/editor/components/Popup/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Resizable/index.vue +4 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +107 -6
- package/dist/runtime/editor/components/index.d.ts +4 -3
- package/dist/runtime/editor/components/index.js +6 -4
- package/dist/runtime/editor/composables/defineDropAreas.js +3 -3
- package/dist/runtime/editor/composables/defineDropHandler.d.ts +3 -0
- package/dist/runtime/editor/composables/defineDropHandler.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +1 -0
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +9 -0
- package/dist/runtime/editor/features/add-list/index.vue +58 -1
- package/dist/runtime/editor/features/analyze/Main.d.vue.ts +3 -2
- package/dist/runtime/editor/features/analyze/Main.vue +28 -44
- package/dist/runtime/editor/features/analyze/Main.vue.d.ts +3 -2
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +65 -0
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +19 -0
- package/dist/runtime/editor/features/analyze/index.vue +18 -15
- package/dist/runtime/editor/features/clipboard/DropElement/Video.d.vue.ts +8 -0
- package/dist/runtime/editor/features/clipboard/{List/Item → DropElement}/Video.vue +1 -5
- package/dist/runtime/editor/features/clipboard/DropElement/Video.vue.d.ts +8 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.d.ts +1 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.js +14 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +97 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/clipboard/helpers.d.ts +15 -0
- package/dist/runtime/editor/features/clipboard/helpers.js +62 -0
- package/dist/runtime/editor/features/clipboard/index.vue +585 -337
- package/dist/runtime/editor/features/clipboard/types.d.ts +14 -2
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +17 -5
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +2 -2
- package/dist/runtime/editor/features/dragging-overlay/index.vue +125 -219
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +4 -4
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +6 -0
- package/dist/runtime/editor/features/library/index.vue +14 -0
- package/dist/runtime/editor/features/media-library/index.vue +32 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +36 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +3 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +10 -2
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +3 -2
- package/dist/runtime/editor/features/options/Form/index.vue +5 -0
- package/dist/runtime/editor/features/search/index.vue +25 -1
- package/dist/runtime/editor/features/structure/index.vue +25 -1
- package/dist/runtime/editor/features/tour/index.vue +22 -12
- package/dist/runtime/editor/helpers/clipboardData/index.d.ts +11 -0
- package/dist/runtime/editor/helpers/clipboardData/index.js +157 -0
- package/dist/runtime/editor/helpers/options/index.js +5 -0
- package/dist/runtime/editor/icons/svg/stars.svg +5 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +13 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue +4 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +13 -2
- package/dist/runtime/editor/providers/analyze.d.ts +43 -0
- package/dist/runtime/editor/providers/analyze.js +78 -0
- package/dist/runtime/editor/providers/animation.d.ts +4 -0
- package/dist/runtime/editor/providers/animation.js +6 -0
- package/dist/runtime/editor/providers/dragdrop.d.ts +55 -0
- package/dist/runtime/editor/providers/dragdrop.js +37 -0
- package/dist/runtime/editor/providers/storage.js +15 -0
- package/dist/runtime/editor/providers/ui.d.ts +6 -0
- package/dist/runtime/editor/providers/ui.js +19 -0
- package/dist/runtime/editor/translations/de.json +73 -61
- package/dist/runtime/editor/translations/fr.json +67 -55
- package/dist/runtime/editor/translations/gsw_CH.json +71 -59
- package/dist/runtime/editor/translations/it.json +67 -55
- package/dist/runtime/editor/types/app.d.ts +4 -2
- package/dist/runtime/editor/types/draggable.d.ts +1 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -1
- package/dist/runtime/helpers/injections.d.ts +1 -1
- package/dist/runtime/types/blockOptions.d.ts +2 -1
- package/dist/runtime/types/definitions.d.ts +4 -0
- package/dist/shared/{editor.CWQIFIEQ.d.mts → editor.BdBm1Z7C.d.mts} +12 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -3
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.d.vue.ts +0 -3
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue +0 -29
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue.d.ts +0 -3
- package/dist/runtime/editor/features/clipboard/List/Item/File.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue +0 -60
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/index.d.vue.ts +0 -11
- package/dist/runtime/editor/features/clipboard/List/index.vue +0 -72
- package/dist/runtime/editor/features/clipboard/List/index.vue.d.ts +0 -11
- package/dist/runtime/editor/features/tour/Popup/index.d.vue.ts +0 -9
- package/dist/runtime/editor/features/tour/Popup/index.vue +0 -34
- package/dist/runtime/editor/features/tour/Popup/index.vue.d.ts +0 -9
- package/dist/runtime/editor/providers/dropArea.d.ts +0 -48
- package/dist/runtime/editor/providers/dropArea.js +0 -22
|
@@ -1,4 +1,147 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<({
|
|
2
|
+
title: string;
|
|
3
|
+
categories: string[];
|
|
4
|
+
series: import("../../types.js").ChartSeries[];
|
|
5
|
+
categoryColors: string[];
|
|
6
|
+
footnotes: string[];
|
|
7
|
+
} & {
|
|
8
|
+
type: "bar";
|
|
9
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
10
|
+
}) | ({
|
|
11
|
+
title: string;
|
|
12
|
+
categories: string[];
|
|
13
|
+
series: import("../../types.js").ChartSeries[];
|
|
14
|
+
categoryColors: string[];
|
|
15
|
+
footnotes: string[];
|
|
16
|
+
} & {
|
|
17
|
+
type: "line";
|
|
18
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
19
|
+
}) | ({
|
|
20
|
+
title: string;
|
|
21
|
+
categories: string[];
|
|
22
|
+
series: import("../../types.js").ChartSeries[];
|
|
23
|
+
categoryColors: string[];
|
|
24
|
+
footnotes: string[];
|
|
25
|
+
} & {
|
|
26
|
+
type: "area";
|
|
27
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
28
|
+
}) | ({
|
|
29
|
+
title: string;
|
|
30
|
+
categories: string[];
|
|
31
|
+
series: import("../../types.js").ChartSeries[];
|
|
32
|
+
categoryColors: string[];
|
|
33
|
+
footnotes: string[];
|
|
34
|
+
} & {
|
|
35
|
+
type: "pie";
|
|
36
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
37
|
+
}) | ({
|
|
38
|
+
title: string;
|
|
39
|
+
categories: string[];
|
|
40
|
+
series: import("../../types.js").ChartSeries[];
|
|
41
|
+
categoryColors: string[];
|
|
42
|
+
footnotes: string[];
|
|
43
|
+
} & {
|
|
44
|
+
type: "donut";
|
|
45
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
46
|
+
}) | ({
|
|
47
|
+
title: string;
|
|
48
|
+
categories: string[];
|
|
49
|
+
series: import("../../types.js").ChartSeries[];
|
|
50
|
+
categoryColors: string[];
|
|
51
|
+
footnotes: string[];
|
|
52
|
+
} & {
|
|
53
|
+
type: "heatmap";
|
|
54
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
55
|
+
}) | ({
|
|
56
|
+
title: string;
|
|
57
|
+
categories: string[];
|
|
58
|
+
series: import("../../types.js").ChartSeries[];
|
|
59
|
+
categoryColors: string[];
|
|
60
|
+
footnotes: string[];
|
|
61
|
+
} & {
|
|
62
|
+
type: "radialBar";
|
|
63
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
64
|
+
}) | ({
|
|
65
|
+
title: string;
|
|
66
|
+
categories: string[];
|
|
67
|
+
series: import("../../types.js").ChartSeries[];
|
|
68
|
+
categoryColors: string[];
|
|
69
|
+
footnotes: string[];
|
|
70
|
+
} & {
|
|
71
|
+
type: "radar";
|
|
72
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
73
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<({
|
|
74
|
+
title: string;
|
|
75
|
+
categories: string[];
|
|
76
|
+
series: import("../../types.js").ChartSeries[];
|
|
77
|
+
categoryColors: string[];
|
|
78
|
+
footnotes: string[];
|
|
79
|
+
} & {
|
|
80
|
+
type: "bar";
|
|
81
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
82
|
+
}) | ({
|
|
83
|
+
title: string;
|
|
84
|
+
categories: string[];
|
|
85
|
+
series: import("../../types.js").ChartSeries[];
|
|
86
|
+
categoryColors: string[];
|
|
87
|
+
footnotes: string[];
|
|
88
|
+
} & {
|
|
89
|
+
type: "line";
|
|
90
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
91
|
+
}) | ({
|
|
92
|
+
title: string;
|
|
93
|
+
categories: string[];
|
|
94
|
+
series: import("../../types.js").ChartSeries[];
|
|
95
|
+
categoryColors: string[];
|
|
96
|
+
footnotes: string[];
|
|
97
|
+
} & {
|
|
98
|
+
type: "area";
|
|
99
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
100
|
+
}) | ({
|
|
101
|
+
title: string;
|
|
102
|
+
categories: string[];
|
|
103
|
+
series: import("../../types.js").ChartSeries[];
|
|
104
|
+
categoryColors: string[];
|
|
105
|
+
footnotes: string[];
|
|
106
|
+
} & {
|
|
107
|
+
type: "pie";
|
|
108
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
109
|
+
}) | ({
|
|
110
|
+
title: string;
|
|
111
|
+
categories: string[];
|
|
112
|
+
series: import("../../types.js").ChartSeries[];
|
|
113
|
+
categoryColors: string[];
|
|
114
|
+
footnotes: string[];
|
|
115
|
+
} & {
|
|
116
|
+
type: "donut";
|
|
117
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
118
|
+
}) | ({
|
|
119
|
+
title: string;
|
|
120
|
+
categories: string[];
|
|
121
|
+
series: import("../../types.js").ChartSeries[];
|
|
122
|
+
categoryColors: string[];
|
|
123
|
+
footnotes: string[];
|
|
124
|
+
} & {
|
|
125
|
+
type: "heatmap";
|
|
126
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
127
|
+
}) | ({
|
|
128
|
+
title: string;
|
|
129
|
+
categories: string[];
|
|
130
|
+
series: import("../../types.js").ChartSeries[];
|
|
131
|
+
categoryColors: string[];
|
|
132
|
+
footnotes: string[];
|
|
133
|
+
} & {
|
|
134
|
+
type: "radialBar";
|
|
135
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
136
|
+
}) | ({
|
|
137
|
+
title: string;
|
|
138
|
+
categories: string[];
|
|
139
|
+
series: import("../../types.js").ChartSeries[];
|
|
140
|
+
categoryColors: string[];
|
|
141
|
+
footnotes: string[];
|
|
142
|
+
} & {
|
|
143
|
+
type: "radar";
|
|
144
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
145
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
146
|
declare const _default: typeof __VLS_export;
|
|
4
147
|
export default _default;
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
|
|
22
22
|
<script setup>
|
|
23
23
|
import { computed, defineAsyncComponent, useTemplateRef } from "#imports";
|
|
24
|
-
import { resolveChartColor, applyFootnotes, SUPERSCRIPTS } from "../../
|
|
24
|
+
import { resolveChartColor, applyFootnotes, SUPERSCRIPTS } from "../../helpers";
|
|
25
25
|
import { getChartTypeRuntime, getDefaultTypeOptions } from "../../chartTypes";
|
|
26
26
|
import { COLORS } from "#blokkli-build/charts-config";
|
|
27
27
|
const ApexChart = defineAsyncComponent(() => import("vue3-apexcharts"));
|
|
28
28
|
const props = defineProps({
|
|
29
29
|
title: { type: String, required: true },
|
|
30
|
-
type: { type: String, required: true },
|
|
31
30
|
categories: { type: Array, required: true },
|
|
32
31
|
series: { type: Array, required: true },
|
|
33
32
|
categoryColors: { type: Array, required: true },
|
|
34
33
|
footnotes: { type: Array, required: true },
|
|
34
|
+
type: { type: null, required: true },
|
|
35
35
|
typeOptions: { type: Object, required: false }
|
|
36
36
|
});
|
|
37
37
|
const rootEl = useTemplateRef("rootEl");
|
|
@@ -1,4 +1,147 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<({
|
|
2
|
+
title: string;
|
|
3
|
+
categories: string[];
|
|
4
|
+
series: import("../../types.js").ChartSeries[];
|
|
5
|
+
categoryColors: string[];
|
|
6
|
+
footnotes: string[];
|
|
7
|
+
} & {
|
|
8
|
+
type: "bar";
|
|
9
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
10
|
+
}) | ({
|
|
11
|
+
title: string;
|
|
12
|
+
categories: string[];
|
|
13
|
+
series: import("../../types.js").ChartSeries[];
|
|
14
|
+
categoryColors: string[];
|
|
15
|
+
footnotes: string[];
|
|
16
|
+
} & {
|
|
17
|
+
type: "line";
|
|
18
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
19
|
+
}) | ({
|
|
20
|
+
title: string;
|
|
21
|
+
categories: string[];
|
|
22
|
+
series: import("../../types.js").ChartSeries[];
|
|
23
|
+
categoryColors: string[];
|
|
24
|
+
footnotes: string[];
|
|
25
|
+
} & {
|
|
26
|
+
type: "area";
|
|
27
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
28
|
+
}) | ({
|
|
29
|
+
title: string;
|
|
30
|
+
categories: string[];
|
|
31
|
+
series: import("../../types.js").ChartSeries[];
|
|
32
|
+
categoryColors: string[];
|
|
33
|
+
footnotes: string[];
|
|
34
|
+
} & {
|
|
35
|
+
type: "pie";
|
|
36
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
37
|
+
}) | ({
|
|
38
|
+
title: string;
|
|
39
|
+
categories: string[];
|
|
40
|
+
series: import("../../types.js").ChartSeries[];
|
|
41
|
+
categoryColors: string[];
|
|
42
|
+
footnotes: string[];
|
|
43
|
+
} & {
|
|
44
|
+
type: "donut";
|
|
45
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
46
|
+
}) | ({
|
|
47
|
+
title: string;
|
|
48
|
+
categories: string[];
|
|
49
|
+
series: import("../../types.js").ChartSeries[];
|
|
50
|
+
categoryColors: string[];
|
|
51
|
+
footnotes: string[];
|
|
52
|
+
} & {
|
|
53
|
+
type: "heatmap";
|
|
54
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
55
|
+
}) | ({
|
|
56
|
+
title: string;
|
|
57
|
+
categories: string[];
|
|
58
|
+
series: import("../../types.js").ChartSeries[];
|
|
59
|
+
categoryColors: string[];
|
|
60
|
+
footnotes: string[];
|
|
61
|
+
} & {
|
|
62
|
+
type: "radialBar";
|
|
63
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
64
|
+
}) | ({
|
|
65
|
+
title: string;
|
|
66
|
+
categories: string[];
|
|
67
|
+
series: import("../../types.js").ChartSeries[];
|
|
68
|
+
categoryColors: string[];
|
|
69
|
+
footnotes: string[];
|
|
70
|
+
} & {
|
|
71
|
+
type: "radar";
|
|
72
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
73
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<({
|
|
74
|
+
title: string;
|
|
75
|
+
categories: string[];
|
|
76
|
+
series: import("../../types.js").ChartSeries[];
|
|
77
|
+
categoryColors: string[];
|
|
78
|
+
footnotes: string[];
|
|
79
|
+
} & {
|
|
80
|
+
type: "bar";
|
|
81
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
82
|
+
}) | ({
|
|
83
|
+
title: string;
|
|
84
|
+
categories: string[];
|
|
85
|
+
series: import("../../types.js").ChartSeries[];
|
|
86
|
+
categoryColors: string[];
|
|
87
|
+
footnotes: string[];
|
|
88
|
+
} & {
|
|
89
|
+
type: "line";
|
|
90
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
91
|
+
}) | ({
|
|
92
|
+
title: string;
|
|
93
|
+
categories: string[];
|
|
94
|
+
series: import("../../types.js").ChartSeries[];
|
|
95
|
+
categoryColors: string[];
|
|
96
|
+
footnotes: string[];
|
|
97
|
+
} & {
|
|
98
|
+
type: "area";
|
|
99
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
100
|
+
}) | ({
|
|
101
|
+
title: string;
|
|
102
|
+
categories: string[];
|
|
103
|
+
series: import("../../types.js").ChartSeries[];
|
|
104
|
+
categoryColors: string[];
|
|
105
|
+
footnotes: string[];
|
|
106
|
+
} & {
|
|
107
|
+
type: "pie";
|
|
108
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
109
|
+
}) | ({
|
|
110
|
+
title: string;
|
|
111
|
+
categories: string[];
|
|
112
|
+
series: import("../../types.js").ChartSeries[];
|
|
113
|
+
categoryColors: string[];
|
|
114
|
+
footnotes: string[];
|
|
115
|
+
} & {
|
|
116
|
+
type: "donut";
|
|
117
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
118
|
+
}) | ({
|
|
119
|
+
title: string;
|
|
120
|
+
categories: string[];
|
|
121
|
+
series: import("../../types.js").ChartSeries[];
|
|
122
|
+
categoryColors: string[];
|
|
123
|
+
footnotes: string[];
|
|
124
|
+
} & {
|
|
125
|
+
type: "heatmap";
|
|
126
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
127
|
+
}) | ({
|
|
128
|
+
title: string;
|
|
129
|
+
categories: string[];
|
|
130
|
+
series: import("../../types.js").ChartSeries[];
|
|
131
|
+
categoryColors: string[];
|
|
132
|
+
footnotes: string[];
|
|
133
|
+
} & {
|
|
134
|
+
type: "radialBar";
|
|
135
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
136
|
+
}) | ({
|
|
137
|
+
title: string;
|
|
138
|
+
categories: string[];
|
|
139
|
+
series: import("../../types.js").ChartSeries[];
|
|
140
|
+
categoryColors: string[];
|
|
141
|
+
footnotes: string[];
|
|
142
|
+
} & {
|
|
143
|
+
type: "radar";
|
|
144
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
145
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
146
|
declare const _default: typeof __VLS_export;
|
|
4
147
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChartRenderer } from './ChartRenderer/index.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChartRenderer } from "./ChartRenderer/index.vue";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChartTypeDefinition } from '../../../../chartTypes/types.js';
|
|
2
|
+
type ChartOption = ChartTypeDefinition['editor']['options'][string];
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
title: string;
|
|
4
|
-
options: Record<string,
|
|
5
|
+
options: Record<string, ChartOption>;
|
|
5
6
|
typeOptions: Record<string, unknown>;
|
|
6
7
|
};
|
|
7
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChartTypeDefinition } from '../../../../chartTypes/types.js';
|
|
2
|
+
type ChartOption = ChartTypeDefinition['editor']['options'][string];
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
title: string;
|
|
4
|
-
options: Record<string,
|
|
5
|
+
options: Record<string, ChartOption>;
|
|
5
6
|
typeOptions: Record<string, unknown>;
|
|
6
7
|
};
|
|
7
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { useTemplateRef, useBlokkli } from "#imports";
|
|
20
|
-
import { getColorIdAtIndex } from "../../../../
|
|
21
|
-
import { parseNumericInput } from "../../../../helpers";
|
|
20
|
+
import { getColorIdAtIndex, parseNumericInput } from "../../../../helpers";
|
|
22
21
|
const props = defineProps({
|
|
23
22
|
colors: { type: Object, required: true }
|
|
24
23
|
});
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
<script setup>
|
|
36
36
|
import { useBlokkli } from "#imports";
|
|
37
|
-
import { SUPERSCRIPTS } from "../../../../
|
|
37
|
+
import { SUPERSCRIPTS } from "../../../../helpers";
|
|
38
38
|
import { Icon } from "#blokkli/editor/components";
|
|
39
39
|
const { $t } = useBlokkli();
|
|
40
40
|
const props = defineProps({
|
|
@@ -1,23 +1,45 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="{ 'bk-is-stale': stale }">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
)
|
|
10
|
-
}}
|
|
11
|
-
</div>
|
|
3
|
+
<BlokkliItem
|
|
4
|
+
v-if="item"
|
|
5
|
+
v-bind="item"
|
|
6
|
+
:options="mergedOptions"
|
|
7
|
+
:is-editing="false"
|
|
8
|
+
/>
|
|
12
9
|
</div>
|
|
13
10
|
</template>
|
|
14
11
|
|
|
15
12
|
<script setup>
|
|
16
|
-
import { useBlokkli } from "#imports";
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
import { computed, provide, useBlokkli } from "#imports";
|
|
14
|
+
import {
|
|
15
|
+
INJECT_EDIT_CONTEXT,
|
|
16
|
+
INJECT_FIELD_LIST_BLOCKS,
|
|
17
|
+
INJECT_FIELD_LIST_TYPE,
|
|
18
|
+
INJECT_IS_EDITING,
|
|
19
|
+
INJECT_IS_IN_REUSABLE,
|
|
20
|
+
INJECT_PROVIDER_BLOCKS
|
|
21
|
+
} from "#blokkli/helpers/injections";
|
|
22
|
+
const { state } = useBlokkli();
|
|
23
|
+
const props = defineProps({
|
|
24
|
+
uuid: { type: String, required: true },
|
|
25
|
+
optionKey: { type: String, required: true },
|
|
20
26
|
data: { type: [Object, null], required: true },
|
|
21
27
|
stale: { type: Boolean, required: true }
|
|
22
28
|
});
|
|
29
|
+
const item = computed(() => state.getFieldListItem(props.uuid));
|
|
30
|
+
const mergedOptions = computed(() => {
|
|
31
|
+
const base = item.value?.options || {};
|
|
32
|
+
return {
|
|
33
|
+
...base,
|
|
34
|
+
[props.optionKey]: JSON.stringify(props.data)
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const blocks = computed(() => []);
|
|
38
|
+
const fieldListType = computed(() => "default");
|
|
39
|
+
provide(INJECT_IS_IN_REUSABLE, true);
|
|
40
|
+
provide(INJECT_IS_EDITING, false);
|
|
41
|
+
provide(INJECT_FIELD_LIST_BLOCKS, blocks);
|
|
42
|
+
provide(INJECT_PROVIDER_BLOCKS, blocks);
|
|
43
|
+
provide(INJECT_FIELD_LIST_TYPE, fieldListType);
|
|
44
|
+
provide(INJECT_EDIT_CONTEXT, null);
|
|
23
45
|
</script>
|
|
@@ -44,7 +44,12 @@
|
|
|
44
44
|
/>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
|
-
<Preview
|
|
47
|
+
<Preview
|
|
48
|
+
:uuid
|
|
49
|
+
:option-key="optionKey"
|
|
50
|
+
:data="previewData"
|
|
51
|
+
:stale="isStale"
|
|
52
|
+
/>
|
|
48
53
|
</div>
|
|
49
54
|
|
|
50
55
|
<div class="bk-chart-editor-section">
|
|
@@ -93,7 +98,7 @@
|
|
|
93
98
|
|
|
94
99
|
<script setup>
|
|
95
100
|
import { ref, computed, watch, useBlokkli, onBeforeUnmount } from "#imports";
|
|
96
|
-
import { getDefaultChartData, getFirstColorId } from "../../../
|
|
101
|
+
import { getDefaultChartData, getFirstColorId } from "../../../helpers";
|
|
97
102
|
import { getChartType, getDefaultTypeOptions } from "../../../chartTypes";
|
|
98
103
|
import { COLORS } from "#blokkli-build/charts-config";
|
|
99
104
|
import { useChartEditorState } from "./useChartEditorState";
|
|
@@ -106,7 +111,8 @@ import Preview from "./Preview/index.vue";
|
|
|
106
111
|
import ChartTypeOptions from "./ChartTypeOptions/index.vue";
|
|
107
112
|
import { onBlokkliEvent } from "#blokkli/editor/composables";
|
|
108
113
|
const props = defineProps({
|
|
109
|
-
uuid: { type: String, required: true }
|
|
114
|
+
uuid: { type: String, required: true },
|
|
115
|
+
optionKey: { type: String, required: true }
|
|
110
116
|
});
|
|
111
117
|
const { $t, state } = useBlokkli();
|
|
112
118
|
function getCurrentData() {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@submit="onSubmit"
|
|
10
10
|
@close="onSubmit"
|
|
11
11
|
>
|
|
12
|
-
<ChartsEditor ref="editorRef" :uuid />
|
|
12
|
+
<ChartsEditor ref="editorRef" :uuid :option-key="optionKey" />
|
|
13
13
|
</NestedEditorOverlay>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
@@ -33,6 +33,7 @@ defineBlokkliFeature({
|
|
|
33
33
|
});
|
|
34
34
|
const { $t, state, adapter, dom, blocks } = useBlokkli();
|
|
35
35
|
const uuid = ref(null);
|
|
36
|
+
const optionKey = ref("data");
|
|
36
37
|
const element = computed(() => {
|
|
37
38
|
if (!uuid.value) {
|
|
38
39
|
return null;
|
|
@@ -53,7 +54,7 @@ async function onSubmit() {
|
|
|
53
54
|
() => adapter.updateOptions([
|
|
54
55
|
{
|
|
55
56
|
uuid: uuid.value,
|
|
56
|
-
key:
|
|
57
|
+
key: optionKey.value,
|
|
57
58
|
value: JSON.stringify(chartData)
|
|
58
59
|
}
|
|
59
60
|
]),
|
|
@@ -62,11 +63,10 @@ async function onSubmit() {
|
|
|
62
63
|
isLoading.value = false;
|
|
63
64
|
uuid.value = null;
|
|
64
65
|
}
|
|
65
|
-
onBlokkliEvent("
|
|
66
|
-
if (data.
|
|
66
|
+
onBlokkliEvent("option:edit-complex", (data) => {
|
|
67
|
+
if (data.dataType === "chart") {
|
|
67
68
|
uuid.value = data.uuid;
|
|
68
|
-
|
|
69
|
-
uuid.value = null;
|
|
69
|
+
optionKey.value = data.key;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
</script>
|
|
@@ -1 +1,26 @@
|
|
|
1
|
+
import type { BlokkliChartData, ChartColor } from '../types.js';
|
|
2
|
+
export declare const SUPERSCRIPTS: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Replace `{1}`, `{2}`, etc. with Unicode superscript characters.
|
|
5
|
+
*/
|
|
6
|
+
export declare function applyFootnotes(text: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Resolve a color ID to a concrete CSS color value that ApexCharts can use.
|
|
9
|
+
*
|
|
10
|
+
* Plain values like '#ff0000' or 'rgb(255, 0, 0)' are returned as-is.
|
|
11
|
+
* Values containing 'var(' (e.g. 'rgb(var(--theme-primary))') are resolved
|
|
12
|
+
* by setting the value on a DOM element and reading the computed color.
|
|
13
|
+
*
|
|
14
|
+
* Falls back to the first defined color if the ID is not found.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveChartColor(colorId: string, colors: Record<string, ChartColor>, el?: HTMLElement | null): string;
|
|
17
|
+
/**
|
|
18
|
+
* Get the fallback color ID (first defined color).
|
|
19
|
+
*/
|
|
20
|
+
export declare function getFirstColorId(colors: Record<string, ChartColor>): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get a color ID for the given index, cycling through available colors.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getColorIdAtIndex(index: number, colors: Record<string, ChartColor>): string;
|
|
25
|
+
export declare function getDefaultChartData(colors: Record<string, ChartColor>): BlokkliChartData;
|
|
1
26
|
export declare function parseNumericInput(raw: string): number;
|
|
@@ -1,3 +1,66 @@
|
|
|
1
|
+
export const SUPERSCRIPTS = {
|
|
2
|
+
"1": "\xB9",
|
|
3
|
+
"2": "\xB2",
|
|
4
|
+
"3": "\xB3",
|
|
5
|
+
"4": "\u2074",
|
|
6
|
+
"5": "\u2075",
|
|
7
|
+
"6": "\u2076",
|
|
8
|
+
"7": "\u2077",
|
|
9
|
+
"8": "\u2078",
|
|
10
|
+
"9": "\u2079",
|
|
11
|
+
"0": "\u2070"
|
|
12
|
+
};
|
|
13
|
+
export function applyFootnotes(text) {
|
|
14
|
+
return text.replace(
|
|
15
|
+
/\{(\d)\}/g,
|
|
16
|
+
(_, d) => SUPERSCRIPTS[d] || `{${d}}`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export function resolveChartColor(colorId, colors, el) {
|
|
20
|
+
const ids = Object.keys(colors);
|
|
21
|
+
const entry = colors[colorId] || colors[ids[0] || ""];
|
|
22
|
+
if (!entry) {
|
|
23
|
+
return "#888888";
|
|
24
|
+
}
|
|
25
|
+
const value = entry.color;
|
|
26
|
+
if (!value.includes("var(")) {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
const target = el || document.documentElement;
|
|
30
|
+
const prev = target.style.color;
|
|
31
|
+
target.style.color = value;
|
|
32
|
+
const resolved = getComputedStyle(target).color;
|
|
33
|
+
target.style.color = prev;
|
|
34
|
+
return resolved || value;
|
|
35
|
+
}
|
|
36
|
+
export function getFirstColorId(colors) {
|
|
37
|
+
return Object.keys(colors)[0] || "";
|
|
38
|
+
}
|
|
39
|
+
export function getColorIdAtIndex(index, colors) {
|
|
40
|
+
const ids = Object.keys(colors);
|
|
41
|
+
return ids[index % ids.length] || ids[0] || "";
|
|
42
|
+
}
|
|
43
|
+
export function getDefaultChartData(colors) {
|
|
44
|
+
return {
|
|
45
|
+
title: "",
|
|
46
|
+
type: "bar",
|
|
47
|
+
categories: ["Category 1", "Category 2", "Category 3"],
|
|
48
|
+
series: [
|
|
49
|
+
{
|
|
50
|
+
name: "Series 1",
|
|
51
|
+
color: getColorIdAtIndex(0, colors),
|
|
52
|
+
data: [30, 40, 35]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
categoryColors: [
|
|
56
|
+
getColorIdAtIndex(0, colors),
|
|
57
|
+
getColorIdAtIndex(1, colors),
|
|
58
|
+
getColorIdAtIndex(2, colors)
|
|
59
|
+
],
|
|
60
|
+
footnotes: [],
|
|
61
|
+
typeOptions: {}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
1
64
|
export function parseNumericInput(raw) {
|
|
2
65
|
let str = raw.trim();
|
|
3
66
|
if (!str) return 0;
|