windmill-components 1.79.0 → 1.82.1
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/components/ArgInput.svelte +3 -0
- package/components/ArgInput.svelte.d.ts +1 -0
- package/components/DisplayResult.svelte +18 -15
- package/components/Multiselect.svelte.d.ts +2 -2
- package/components/SchemaEditor.svelte +15 -10
- package/components/SettingSection.svelte +1 -1
- package/components/Toggle.svelte +5 -2
- package/components/Toggle.svelte.d.ts +1 -0
- package/components/apps/components/buttons/AppButton.svelte +35 -56
- package/components/apps/components/buttons/AppButton.svelte.d.ts +2 -1
- package/components/apps/components/buttons/AppForm.svelte +24 -24
- package/components/apps/components/buttons/AppForm.svelte.d.ts +1 -1
- package/components/apps/components/buttons/AppFormButton.svelte +79 -94
- package/components/apps/components/buttons/AppFormButton.svelte.d.ts +1 -3
- package/components/apps/components/display/AppBarChart.svelte +2 -2
- package/components/apps/components/display/AppBarChart.svelte.d.ts +1 -1
- package/components/apps/components/display/AppDisplayComponent.svelte +2 -2
- package/components/apps/components/display/AppDisplayComponent.svelte.d.ts +1 -1
- package/components/apps/components/display/AppHtml.svelte +10 -2
- package/components/apps/components/display/AppHtml.svelte.d.ts +1 -1
- package/components/apps/components/display/AppIcon.svelte +4 -1
- package/components/apps/components/display/AppIcon.svelte.d.ts +1 -1
- package/components/apps/components/display/AppImage.svelte +28 -15
- package/components/apps/components/display/AppImage.svelte.d.ts +1 -1
- package/components/apps/components/display/AppMap.svelte.d.ts +1 -1
- package/components/apps/components/display/AppPdf.svelte +3 -2
- package/components/apps/components/display/AppPdf.svelte.d.ts +1 -1
- package/components/apps/components/display/AppPieChart.svelte +2 -2
- package/components/apps/components/display/AppPieChart.svelte.d.ts +1 -1
- package/components/apps/components/display/AppScatterChart.svelte +2 -2
- package/components/apps/components/display/AppScatterChart.svelte.d.ts +1 -1
- package/components/apps/components/display/AppText.svelte +35 -22
- package/components/apps/components/display/AppText.svelte.d.ts +1 -1
- package/components/apps/components/display/AppTimeseries.svelte +2 -2
- package/components/apps/components/display/AppTimeseries.svelte.d.ts +1 -1
- package/components/apps/components/display/PlotlyHtml.svelte +3 -3
- package/components/apps/components/display/VegaLiteHtml.svelte +2 -2
- package/components/apps/components/display/table/AppAggridTable.svelte +1 -1
- package/components/apps/components/display/table/AppTable.svelte +40 -17
- package/components/apps/components/display/table/AppTable.svelte.d.ts +1 -1
- package/components/apps/components/helpers/HiddenComponent.svelte +6 -3
- package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +1 -1
- package/components/apps/components/helpers/InputValue.svelte +9 -9
- package/components/apps/components/helpers/Loader.svelte +18 -0
- package/components/apps/components/helpers/Loader.svelte.d.ts +18 -0
- package/components/apps/components/helpers/NonRunnableComponent.svelte +1 -12
- package/components/apps/components/helpers/ResolveConfig.svelte +29 -0
- package/components/apps/components/helpers/ResolveConfig.svelte.d.ts +21 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +117 -89
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +14 -3
- package/components/apps/components/helpers/RunnableWrapper.svelte +50 -9
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +27 -2
- package/components/apps/components/inputs/AppCheckbox.svelte +1 -1
- package/components/apps/components/inputs/AppCheckbox.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppDateInput.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppFileInput.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppMultiSelect.svelte +0 -1
- package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppNumberInput.svelte +1 -1
- package/components/apps/components/inputs/AppNumberInput.svelte.d.ts +1 -3
- package/components/apps/components/inputs/AppRangeInput.svelte +7 -1
- package/components/apps/components/inputs/AppRangeInput.svelte.d.ts +2 -1
- package/components/apps/components/inputs/AppSelect.svelte +8 -3
- package/components/apps/components/inputs/AppSelect.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppSliderInputs.svelte +7 -1
- package/components/apps/components/inputs/AppSliderInputs.svelte.d.ts +2 -1
- package/components/apps/components/inputs/AppTextInput.svelte +4 -4
- package/components/apps/components/inputs/AppTextInput.svelte.d.ts +1 -3
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +17 -19
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppContainer.svelte +7 -4
- package/components/apps/components/layout/AppContainer.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppDivider.svelte +4 -1
- package/components/apps/components/layout/AppDivider.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppDrawer.svelte +7 -4
- package/components/apps/components/layout/AppDrawer.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppSplitpanes.svelte +34 -21
- package/components/apps/components/layout/AppSplitpanes.svelte.d.ts +1 -3
- package/components/apps/components/layout/AppTabs.svelte +17 -34
- package/components/apps/components/layout/AppTabs.svelte.d.ts +1 -2
- package/components/apps/editor/AppEditor.svelte +17 -13
- package/components/apps/editor/AppEditorHeader.svelte +2 -3
- package/components/apps/editor/AppPreview.svelte +11 -17
- package/components/apps/editor/ComponentHeader.svelte +10 -8
- package/components/apps/editor/ComponentHeader.svelte.d.ts +0 -1
- package/components/apps/editor/GridEditor.svelte +21 -50
- package/components/apps/editor/GridEditor.svelte.d.ts +0 -2
- package/components/apps/editor/RecomputeAllComponents.svelte +13 -2
- package/components/apps/editor/SettingsPanel.svelte +103 -40
- package/components/apps/editor/SubGridEditor.svelte +32 -41
- package/components/apps/editor/SubGridEditor.svelte.d.ts +1 -2
- package/components/apps/editor/appUtils.d.ts +49 -7
- package/components/apps/editor/appUtils.js +133 -37
- package/components/apps/editor/component/Component.svelte +22 -11
- package/components/apps/editor/component/Component.svelte.d.ts +1 -2
- package/components/apps/editor/component/ComponentNavigation.svelte +19 -12
- package/components/apps/editor/component/README.md +4 -0
- package/components/apps/editor/component/components.d.ts +1550 -17
- package/components/apps/editor/component/components.js +295 -325
- package/components/apps/editor/component/default-codes.d.ts +1 -1
- package/components/apps/editor/component/default-codes.js +25 -25
- package/components/apps/editor/componentsPanel/ComponentList.svelte +18 -3
- package/components/apps/editor/componentsPanel/CssProperty.svelte +92 -50
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +8 -3
- package/components/apps/editor/componentsPanel/CssSettings.svelte +48 -90
- package/components/apps/editor/componentsPanel/ListItem.svelte +3 -0
- package/components/apps/editor/componentsPanel/ListItem.svelte.d.ts +2 -0
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte +167 -0
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte.d.ts +18 -0
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +130 -0
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte.d.ts +21 -0
- package/components/apps/editor/componentsPanel/quickStyleProperties.d.ts +535 -0
- package/components/apps/editor/componentsPanel/quickStyleProperties.js +595 -0
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +1 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +146 -130
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte.d.ts +2 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +31 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +1 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +42 -76
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +67 -17
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte.d.ts +1 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte +27 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte.d.ts +17 -0
- package/components/apps/editor/inlineScriptsPanel/utils.d.ts +2 -0
- package/components/apps/editor/inlineScriptsPanel/utils.js +6 -5
- package/components/apps/editor/settingsPanel/AlignmentEditor.svelte +10 -2
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +37 -31
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +4 -104
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +113 -67
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte.d.ts +5 -3
- package/components/apps/editor/settingsPanel/GridTab.svelte +0 -1
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +99 -80
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +8 -0
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +25 -2
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte +52 -0
- package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte.d.ts +28 -0
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte +70 -26
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/StylePanel.svelte +23 -0
- package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +17 -0
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte +7 -5
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte.d.ts +3 -2
- package/components/apps/editor/settingsPanel/TableActions.svelte +8 -63
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +12 -12
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +3 -4
- package/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte +3 -1
- package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte.d.ts +2 -4
- package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte +5 -5
- package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +48 -32
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte.d.ts +8 -2
- package/components/apps/editor/settingsPanel/inputEditor/TabSelectInput.svelte +46 -0
- package/components/apps/editor/settingsPanel/inputEditor/TabSelectInput.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +7 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +47 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte.d.ts +14 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/index.d.ts +2 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/index.js +2 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.d.ts +12 -0
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.js +10 -0
- package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte +20 -70
- package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +14 -8
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte.d.ts +5 -1
- package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte +85 -27
- package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte.d.ts +4 -6
- package/components/apps/gridUtils.js +1 -1
- package/components/apps/inputType.d.ts +12 -16
- package/components/apps/rx.d.ts +2 -0
- package/components/apps/rx.js +8 -2
- package/components/apps/svelte-grid/Grid.svelte +0 -4
- package/components/apps/svelte-grid/Grid.svelte.d.ts +1 -1
- package/components/apps/svelte-grid/MoveResize.svelte +24 -30
- package/components/apps/svelte-grid/MoveResize.svelte.d.ts +0 -4
- package/components/apps/svelte-grid/types.d.ts +1 -7
- package/components/apps/svelte-grid/utils/helper.js +6 -10
- package/components/apps/types.d.ts +22 -22
- package/components/apps/utils.d.ts +2 -2
- package/components/apps/utils.js +13 -11
- package/components/common/button/ButtonPopup.svelte +5 -2
- package/components/common/button/ButtonPopup.svelte.d.ts +5 -1
- package/components/common/button/ButtonPopupItem.svelte +2 -1
- package/components/common/button/ButtonPopupItem.svelte.d.ts +1 -0
- package/components/common/clearableInput/ClearableInput.svelte +56 -0
- package/components/common/clearableInput/ClearableInput.svelte.d.ts +28 -0
- package/components/common/index.d.ts +1 -0
- package/components/common/index.js +1 -0
- package/components/common/kbd/Kbd.svelte +4 -1
- package/components/common/kbd/Kbd.svelte.d.ts +6 -14
- package/components/common/menu/Menu.svelte +8 -2
- package/components/common/menu/Menu.svelte.d.ts +4 -1
- package/components/common/modal/AlwaysMountedModal.svelte +109 -0
- package/components/common/modal/AlwaysMountedModal.svelte.d.ts +22 -0
- package/components/common/skeleton/Skeleton.svelte +1 -1
- package/components/flows/flowStateUtils.js +8 -1
- package/package.json +672 -659
- package/utils.d.ts +1 -0
- package/utils.js +3 -0
- package/components/apps/editor/GridPanel.svelte +0 -31
- package/components/apps/editor/GridPanel.svelte.d.ts +0 -18
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +0 -12
- package/components/apps/editor/componentsPanel/componentStaticValues.js +0 -25
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { get, writable } from 'svelte/store';
|
|
2
|
+
import { AlignCenter, AlignJustify, AlignLeft, AlignRight, Asterisk, Eye, EyeOff, Grid, Italic, Mouse, MousePointer, Pointer, RectangleHorizontal, Slash, Square, StretchVertical, Strikethrough, Type, Underline } from 'lucide-svelte';
|
|
3
|
+
export const STYLE_STORE_KEY = 'style_store';
|
|
4
|
+
export function createStyleStore(properties) {
|
|
5
|
+
const style = StyleProperty.filter((p) => properties.includes(p.key)).map((p) => ({
|
|
6
|
+
prop: p,
|
|
7
|
+
value: ''
|
|
8
|
+
}));
|
|
9
|
+
const store = writable({
|
|
10
|
+
style: [...style],
|
|
11
|
+
topColors: []
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
subscribe: store.subscribe,
|
|
15
|
+
set: store.set,
|
|
16
|
+
update: store.update,
|
|
17
|
+
updatePropValue: (key, value) => {
|
|
18
|
+
if (!key) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
store.update((s) => {
|
|
22
|
+
const index = s.style.findIndex((p) => p.prop.key === key);
|
|
23
|
+
if (index !== -1) {
|
|
24
|
+
s.style[index].value = value || '';
|
|
25
|
+
}
|
|
26
|
+
return s;
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
getProp(key) {
|
|
30
|
+
const s = get(store);
|
|
31
|
+
const index = s.style.findIndex((p) => p.prop.key === key);
|
|
32
|
+
return {
|
|
33
|
+
prop: s.style[index],
|
|
34
|
+
index: index === -1 ? undefined : index
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
resetStyle: () => {
|
|
38
|
+
store.update((s) => {
|
|
39
|
+
s.style = style.map((s) => ({ ...s, value: '' }));
|
|
40
|
+
return s;
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
setTopColors: (colors) => {
|
|
44
|
+
store.update((s) => {
|
|
45
|
+
s.topColors = colors;
|
|
46
|
+
return s;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export var StylePropertyType;
|
|
52
|
+
(function (StylePropertyType) {
|
|
53
|
+
StylePropertyType["color"] = "color";
|
|
54
|
+
StylePropertyType["unit"] = "unit";
|
|
55
|
+
StylePropertyType["number"] = "number";
|
|
56
|
+
StylePropertyType["text"] = "text"; // text like the value of 'display'
|
|
57
|
+
})(StylePropertyType || (StylePropertyType = {}));
|
|
58
|
+
export const StylePropertyUnits = ['px', 'em', 'rem', '%', 'vh', 'vw'];
|
|
59
|
+
// Using an array instead of an object to preserve the order of the properties
|
|
60
|
+
export const StyleProperty = [
|
|
61
|
+
{
|
|
62
|
+
key: 'display',
|
|
63
|
+
value: {
|
|
64
|
+
type: StylePropertyType.text,
|
|
65
|
+
options: [
|
|
66
|
+
{
|
|
67
|
+
text: 'block',
|
|
68
|
+
icon: Square
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
text: 'inline-block',
|
|
72
|
+
icon: RectangleHorizontal
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
text: 'flex',
|
|
76
|
+
icon: StretchVertical
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
text: 'grid',
|
|
80
|
+
icon: Grid
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: 'padding',
|
|
87
|
+
value: [
|
|
88
|
+
{
|
|
89
|
+
type: StylePropertyType.unit,
|
|
90
|
+
title: 'top'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: StylePropertyType.unit,
|
|
94
|
+
title: 'right'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: StylePropertyType.unit,
|
|
98
|
+
title: 'bottom'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: StylePropertyType.unit,
|
|
102
|
+
title: 'left'
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: 'opacity',
|
|
108
|
+
value: {
|
|
109
|
+
type: StylePropertyType.number,
|
|
110
|
+
step: 0.1,
|
|
111
|
+
min: 0,
|
|
112
|
+
max: 1
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: 'cursor',
|
|
117
|
+
value: {
|
|
118
|
+
type: StylePropertyType.text,
|
|
119
|
+
options: [
|
|
120
|
+
{
|
|
121
|
+
text: 'default',
|
|
122
|
+
icon: MousePointer
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
text: 'pointer',
|
|
126
|
+
icon: Pointer
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: 'width',
|
|
133
|
+
value: {
|
|
134
|
+
type: StylePropertyType.unit
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
key: 'min-width',
|
|
139
|
+
value: {
|
|
140
|
+
type: StylePropertyType.unit
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
key: 'max-width',
|
|
145
|
+
value: {
|
|
146
|
+
type: StylePropertyType.unit
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: 'height',
|
|
151
|
+
value: {
|
|
152
|
+
type: StylePropertyType.unit
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: 'min-height',
|
|
157
|
+
value: {
|
|
158
|
+
type: StylePropertyType.unit
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
key: 'max-height',
|
|
163
|
+
value: {
|
|
164
|
+
type: StylePropertyType.unit
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
key: 'border',
|
|
169
|
+
value: [
|
|
170
|
+
{
|
|
171
|
+
type: StylePropertyType.unit,
|
|
172
|
+
title: 'width'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: StylePropertyType.text,
|
|
176
|
+
title: 'style',
|
|
177
|
+
options: [
|
|
178
|
+
{
|
|
179
|
+
text: 'solid',
|
|
180
|
+
icon: '___'
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
text: 'dashed',
|
|
184
|
+
icon: '_ _'
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
text: 'dotted',
|
|
188
|
+
icon: '. .'
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
type: StylePropertyType.color,
|
|
194
|
+
title: 'color'
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
key: 'border-radius',
|
|
200
|
+
value: {
|
|
201
|
+
type: StylePropertyType.unit
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
key: 'box-shadow',
|
|
206
|
+
value: [
|
|
207
|
+
{
|
|
208
|
+
type: StylePropertyType.unit,
|
|
209
|
+
title: 'offset-x'
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: StylePropertyType.unit,
|
|
213
|
+
title: 'offset-y'
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: StylePropertyType.unit,
|
|
217
|
+
title: 'blur'
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
type: StylePropertyType.unit,
|
|
221
|
+
title: 'spread'
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
type: StylePropertyType.color,
|
|
225
|
+
title: 'color'
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
key: 'background-color',
|
|
231
|
+
value: {
|
|
232
|
+
type: StylePropertyType.color
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
key: 'color',
|
|
237
|
+
value: {
|
|
238
|
+
type: StylePropertyType.color
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
key: 'font-size',
|
|
243
|
+
value: {
|
|
244
|
+
type: StylePropertyType.unit
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
key: 'font-family',
|
|
249
|
+
value: {
|
|
250
|
+
type: StylePropertyType.text
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
key: 'font-weight',
|
|
255
|
+
value: {
|
|
256
|
+
type: StylePropertyType.number
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
key: 'font-style',
|
|
261
|
+
value: {
|
|
262
|
+
type: StylePropertyType.text,
|
|
263
|
+
options: [
|
|
264
|
+
{
|
|
265
|
+
text: 'normal',
|
|
266
|
+
icon: Type
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
text: 'italic',
|
|
270
|
+
icon: Italic
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
key: 'text-align',
|
|
277
|
+
value: {
|
|
278
|
+
type: StylePropertyType.text,
|
|
279
|
+
options: [
|
|
280
|
+
{
|
|
281
|
+
text: 'left',
|
|
282
|
+
icon: AlignLeft
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
text: 'center',
|
|
286
|
+
icon: AlignCenter
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
text: 'right',
|
|
290
|
+
icon: AlignRight
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
text: 'justify',
|
|
294
|
+
icon: AlignJustify
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
key: 'text-decoration',
|
|
301
|
+
value: {
|
|
302
|
+
type: StylePropertyType.text,
|
|
303
|
+
options: [
|
|
304
|
+
{
|
|
305
|
+
text: 'none',
|
|
306
|
+
icon: Slash
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
text: 'underline',
|
|
310
|
+
icon: Underline
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
text: 'line-through',
|
|
314
|
+
icon: Strikethrough
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
key: 'text-transform',
|
|
321
|
+
value: {
|
|
322
|
+
type: StylePropertyType.text,
|
|
323
|
+
options: [
|
|
324
|
+
{
|
|
325
|
+
text: 'none',
|
|
326
|
+
icon: Slash
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
text: 'capitalize',
|
|
330
|
+
icon: 'Aa'
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
text: 'uppercase',
|
|
334
|
+
icon: 'AA'
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
text: 'lowercase',
|
|
338
|
+
icon: 'aa'
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
key: 'line-height',
|
|
345
|
+
value: {
|
|
346
|
+
type: StylePropertyType.unit
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
key: 'letter-spacing',
|
|
351
|
+
value: {
|
|
352
|
+
type: StylePropertyType.unit
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
key: 'word-spacing',
|
|
357
|
+
value: {
|
|
358
|
+
type: StylePropertyType.unit
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
key: 'overflow',
|
|
363
|
+
value: {
|
|
364
|
+
type: StylePropertyType.text,
|
|
365
|
+
options: [
|
|
366
|
+
{
|
|
367
|
+
text: 'auto',
|
|
368
|
+
icon: Asterisk
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
text: 'visible',
|
|
372
|
+
icon: Eye
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
text: 'hidden',
|
|
376
|
+
icon: EyeOff
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
text: 'scroll',
|
|
380
|
+
icon: Mouse
|
|
381
|
+
}
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
];
|
|
386
|
+
const allDefaultProps = StyleProperty.map(({ key }) => key);
|
|
387
|
+
const containerDefaultProps = [
|
|
388
|
+
'padding',
|
|
389
|
+
'opacity',
|
|
390
|
+
'border',
|
|
391
|
+
'border-radius',
|
|
392
|
+
'box-shadow',
|
|
393
|
+
'background-color',
|
|
394
|
+
'overflow'
|
|
395
|
+
];
|
|
396
|
+
const textDefaultProps = [
|
|
397
|
+
'padding',
|
|
398
|
+
'opacity',
|
|
399
|
+
'background-color',
|
|
400
|
+
'color',
|
|
401
|
+
'font-size',
|
|
402
|
+
'font-family',
|
|
403
|
+
'font-weight',
|
|
404
|
+
'font-style',
|
|
405
|
+
'text-align',
|
|
406
|
+
'text-decoration',
|
|
407
|
+
'text-transform',
|
|
408
|
+
'line-height',
|
|
409
|
+
'letter-spacing',
|
|
410
|
+
'word-spacing'
|
|
411
|
+
];
|
|
412
|
+
const sizeDefaultProps = [
|
|
413
|
+
'width',
|
|
414
|
+
'min-width',
|
|
415
|
+
'max-width',
|
|
416
|
+
'height',
|
|
417
|
+
'min-height',
|
|
418
|
+
'max-height'
|
|
419
|
+
];
|
|
420
|
+
const buttonDefaultProps = [
|
|
421
|
+
'cursor',
|
|
422
|
+
'border',
|
|
423
|
+
'border-radius',
|
|
424
|
+
'box-shadow',
|
|
425
|
+
...textDefaultProps
|
|
426
|
+
];
|
|
427
|
+
const inputDefaultProps = [
|
|
428
|
+
'cursor',
|
|
429
|
+
'border',
|
|
430
|
+
'border-radius',
|
|
431
|
+
...textDefaultProps
|
|
432
|
+
];
|
|
433
|
+
export const quickStyleProperties = {
|
|
434
|
+
mapcomponent: {
|
|
435
|
+
map: containerDefaultProps
|
|
436
|
+
},
|
|
437
|
+
pdfcomponent: {
|
|
438
|
+
container: containerDefaultProps
|
|
439
|
+
},
|
|
440
|
+
formcomponent: {
|
|
441
|
+
container: containerDefaultProps,
|
|
442
|
+
button: buttonDefaultProps
|
|
443
|
+
},
|
|
444
|
+
htmlcomponent: {
|
|
445
|
+
container: allDefaultProps
|
|
446
|
+
},
|
|
447
|
+
iconcomponent: {
|
|
448
|
+
container: containerDefaultProps,
|
|
449
|
+
icon: [
|
|
450
|
+
'padding',
|
|
451
|
+
'opacity',
|
|
452
|
+
'cursor',
|
|
453
|
+
'width',
|
|
454
|
+
'min-width',
|
|
455
|
+
'max-width',
|
|
456
|
+
'height',
|
|
457
|
+
'min-height',
|
|
458
|
+
'max-height',
|
|
459
|
+
'color'
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
tabscomponent: {
|
|
463
|
+
tabRow: containerDefaultProps,
|
|
464
|
+
allTabs: [...textDefaultProps, ...sizeDefaultProps],
|
|
465
|
+
selectedTab: [...textDefaultProps, ...sizeDefaultProps],
|
|
466
|
+
container: containerDefaultProps
|
|
467
|
+
},
|
|
468
|
+
textcomponent: {
|
|
469
|
+
text: textDefaultProps
|
|
470
|
+
},
|
|
471
|
+
imagecomponent: {
|
|
472
|
+
image: containerDefaultProps
|
|
473
|
+
},
|
|
474
|
+
rangecomponent: {
|
|
475
|
+
handles: ['opacity', 'cursor', 'border', 'border-radius', 'background-color'],
|
|
476
|
+
bar: ['opacity', 'cursor', 'border', 'border-radius', 'background-color'],
|
|
477
|
+
limits: textDefaultProps,
|
|
478
|
+
values: textDefaultProps
|
|
479
|
+
},
|
|
480
|
+
tablecomponent: {
|
|
481
|
+
tableHeader: containerDefaultProps,
|
|
482
|
+
tableBody: containerDefaultProps,
|
|
483
|
+
tableFooter: containerDefaultProps,
|
|
484
|
+
container: containerDefaultProps
|
|
485
|
+
},
|
|
486
|
+
aggridcomponent: {},
|
|
487
|
+
buttoncomponent: {
|
|
488
|
+
button: buttonDefaultProps
|
|
489
|
+
},
|
|
490
|
+
drawercomponent: {
|
|
491
|
+
container: containerDefaultProps
|
|
492
|
+
},
|
|
493
|
+
plotlycomponent: {},
|
|
494
|
+
selectcomponent: {
|
|
495
|
+
input: inputDefaultProps
|
|
496
|
+
},
|
|
497
|
+
slidercomponent: {
|
|
498
|
+
handles: ['opacity', 'cursor', 'border', 'border-radius', 'background-color'],
|
|
499
|
+
bar: ['opacity', 'cursor', 'border', 'border-radius', 'background-color'],
|
|
500
|
+
limits: textDefaultProps,
|
|
501
|
+
values: textDefaultProps
|
|
502
|
+
},
|
|
503
|
+
displaycomponent: {
|
|
504
|
+
header: [...containerDefaultProps, ...textDefaultProps],
|
|
505
|
+
container: containerDefaultProps
|
|
506
|
+
},
|
|
507
|
+
barchartcomponent: {
|
|
508
|
+
container: containerDefaultProps
|
|
509
|
+
},
|
|
510
|
+
checkboxcomponent: {
|
|
511
|
+
text: textDefaultProps
|
|
512
|
+
},
|
|
513
|
+
currencycomponent: {
|
|
514
|
+
input: inputDefaultProps
|
|
515
|
+
},
|
|
516
|
+
piechartcomponent: {
|
|
517
|
+
container: containerDefaultProps
|
|
518
|
+
},
|
|
519
|
+
vegalitecomponent: {},
|
|
520
|
+
containercomponent: {
|
|
521
|
+
container: containerDefaultProps
|
|
522
|
+
},
|
|
523
|
+
dateinputcomponent: {
|
|
524
|
+
input: inputDefaultProps
|
|
525
|
+
},
|
|
526
|
+
fileinputcomponent: {
|
|
527
|
+
container: containerDefaultProps
|
|
528
|
+
},
|
|
529
|
+
textinputcomponent: {
|
|
530
|
+
input: inputDefaultProps
|
|
531
|
+
},
|
|
532
|
+
emailinputcomponent: {
|
|
533
|
+
input: inputDefaultProps
|
|
534
|
+
},
|
|
535
|
+
formbuttoncomponent: {
|
|
536
|
+
button: buttonDefaultProps,
|
|
537
|
+
popup: containerDefaultProps
|
|
538
|
+
},
|
|
539
|
+
timeseriescomponent: {
|
|
540
|
+
container: containerDefaultProps
|
|
541
|
+
},
|
|
542
|
+
multiselectcomponent: {
|
|
543
|
+
input: inputDefaultProps
|
|
544
|
+
},
|
|
545
|
+
numberinputcomponent: {
|
|
546
|
+
input: inputDefaultProps
|
|
547
|
+
},
|
|
548
|
+
scatterchartcomponent: {
|
|
549
|
+
container: containerDefaultProps
|
|
550
|
+
},
|
|
551
|
+
passwordinputcomponent: {
|
|
552
|
+
input: inputDefaultProps
|
|
553
|
+
},
|
|
554
|
+
resourceselectcomponent: {
|
|
555
|
+
input: inputDefaultProps
|
|
556
|
+
},
|
|
557
|
+
verticaldividercomponent: {
|
|
558
|
+
divider: [
|
|
559
|
+
'padding',
|
|
560
|
+
'opacity',
|
|
561
|
+
'width',
|
|
562
|
+
'min-width',
|
|
563
|
+
'max-width',
|
|
564
|
+
'height',
|
|
565
|
+
'min-height',
|
|
566
|
+
'max-height',
|
|
567
|
+
'border',
|
|
568
|
+
'border-radius',
|
|
569
|
+
'background-color'
|
|
570
|
+
],
|
|
571
|
+
container: containerDefaultProps
|
|
572
|
+
},
|
|
573
|
+
horizontaldividercomponent: {
|
|
574
|
+
divider: [
|
|
575
|
+
'padding',
|
|
576
|
+
'opacity',
|
|
577
|
+
'width',
|
|
578
|
+
'min-width',
|
|
579
|
+
'max-width',
|
|
580
|
+
'height',
|
|
581
|
+
'min-height',
|
|
582
|
+
'max-height',
|
|
583
|
+
'border',
|
|
584
|
+
'border-radius',
|
|
585
|
+
'background-color'
|
|
586
|
+
],
|
|
587
|
+
container: containerDefaultProps
|
|
588
|
+
},
|
|
589
|
+
verticalsplitpanescomponent: {
|
|
590
|
+
container: containerDefaultProps
|
|
591
|
+
},
|
|
592
|
+
horizontalsplitpanescomponent: {
|
|
593
|
+
container: containerDefaultProps
|
|
594
|
+
}
|
|
595
|
+
};
|
|
@@ -6,7 +6,7 @@ import { Script } from '../../../../gen';
|
|
|
6
6
|
import { inferArgs } from '../../../../infer';
|
|
7
7
|
import { initialCode } from '../../../../script_helpers';
|
|
8
8
|
import { capitalize, emptySchema, getScriptByPath } from '../../../../utils';
|
|
9
|
-
import { faCodeBranch
|
|
9
|
+
import { faCodeBranch } from '@fortawesome/free-solid-svg-icons';
|
|
10
10
|
import { Building, Globe2 } from 'lucide-svelte';
|
|
11
11
|
import { createEventDispatcher, getContext } from 'svelte';
|
|
12
12
|
import { fly } from 'svelte/transition';
|