windmill-components 1.82.4 → 1.82.6
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/common.d.ts +2 -2
- package/components/ArgInput.svelte +72 -52
- package/components/ArgInput.svelte.d.ts +3 -1
- package/components/DisplayResult.svelte +17 -17
- package/components/Editor.svelte +3 -0
- package/components/Editor.svelte.d.ts +1 -0
- package/components/FieldHeader.svelte +1 -0
- package/components/FieldHeader.svelte.d.ts +4 -0
- package/components/FlowBuilder.svelte +0 -6
- package/components/FlowStatusViewer.svelte +4 -7
- package/components/FlowStatusViewer.svelte.d.ts +0 -1
- package/components/FlowViewer.svelte +1 -0
- package/components/InputTransformForm.svelte +1 -0
- package/components/LightweightArgInput.svelte +14 -1
- package/components/LightweightArgInput.svelte.d.ts +3 -1
- package/components/Multiselect.svelte.d.ts +2 -2
- package/components/SimpleEditor.svelte +1 -0
- package/components/SimpleEditor.svelte.d.ts +1 -0
- package/components/TemplateEditor.svelte +1 -0
- package/components/Toggle.svelte +1 -1
- package/components/Toggle.svelte.d.ts +1 -0
- package/components/apps/components/buttons/AppButton.svelte +17 -3
- package/components/apps/components/buttons/AppForm.svelte +10 -2
- package/components/apps/components/buttons/AppFormButton.svelte +82 -58
- package/components/apps/components/display/AppDisplayComponent.svelte +17 -23
- package/components/apps/components/display/AppHtml.svelte +1 -7
- package/components/apps/components/display/AppHtml.svelte.d.ts +0 -2
- package/components/apps/components/display/AppMap.svelte +1 -1
- package/components/apps/components/display/AppPdf.svelte +1 -1
- package/components/apps/components/display/PlotlyHtml.svelte +3 -20
- package/components/apps/components/display/PlotlyHtml.svelte.d.ts +0 -2
- package/components/apps/components/display/table/AppAggridTable.svelte +1 -1
- package/components/apps/components/display/table/AppTable.svelte +49 -75
- package/components/apps/components/display/table/AppTable.svelte.d.ts +1 -1
- package/components/apps/components/display/table/AppTableFooter.svelte +1 -2
- package/components/apps/components/display/table/AppTableFooter.svelte.d.ts +0 -1
- package/components/apps/components/display/table/tableOptions.js +1 -1
- package/components/apps/components/helpers/DebouncedInput.svelte +0 -1
- package/components/apps/components/helpers/DebouncedInput.svelte.d.ts +0 -2
- package/components/apps/components/helpers/HiddenComponent.svelte +2 -3
- package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +1 -2
- package/components/apps/components/helpers/InputValue.svelte +3 -3
- package/components/apps/components/helpers/RefreshButton.svelte +10 -3
- package/components/apps/components/helpers/RefreshButton.svelte.d.ts +0 -1
- package/components/apps/components/helpers/RunnableComponent.svelte +15 -19
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +1 -2
- package/components/apps/components/helpers/RunnableWrapper.svelte +1 -3
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +0 -1
- package/components/apps/components/helpers/eval.d.ts +2 -4
- package/components/apps/components/helpers/eval.js +4 -6
- package/components/apps/components/inputs/AppCheckbox.svelte +4 -0
- package/components/apps/components/inputs/AppDateInput.svelte +2 -2
- package/components/apps/components/inputs/AppMultiSelect.svelte +5 -13
- package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +2 -0
- package/components/apps/components/inputs/AppNumberInput.svelte +3 -3
- package/components/apps/components/inputs/AppSelect.svelte +4 -11
- package/components/apps/components/inputs/AppSelect.svelte.d.ts +2 -0
- package/components/apps/components/inputs/AppSliderInputs.svelte +1 -1
- package/components/apps/components/inputs/AppTextInput.svelte +43 -53
- package/components/apps/components/inputs/AppTextInput.svelte.d.ts +1 -1
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +1 -1
- package/components/apps/components/layout/AppContainer.svelte +2 -2
- package/components/apps/components/layout/AppDrawer.svelte +2 -1
- package/components/apps/components/layout/AppSplitpanes.svelte +3 -3
- package/components/apps/components/layout/AppTabs.svelte +1 -1
- package/components/apps/editor/AppEditor.svelte +21 -49
- package/components/apps/editor/AppEditorHeader.svelte +0 -5
- package/components/apps/editor/AppPreview.svelte +7 -18
- package/components/apps/editor/ComponentHeader.svelte +0 -1
- package/components/apps/editor/ComponentHeader.svelte.d.ts +1 -1
- package/components/apps/editor/GridEditor.svelte +12 -22
- package/components/apps/editor/GridViewer.svelte +2 -2
- package/components/apps/editor/GridViewer.svelte.d.ts +1 -1
- package/components/apps/editor/RecomputeAllComponents.svelte +7 -5
- package/components/apps/editor/SettingsPanel.svelte +4 -4
- package/components/apps/editor/SubGridEditor.svelte +12 -13
- package/components/apps/editor/appUtils.d.ts +0 -1
- package/components/apps/editor/appUtils.js +0 -19
- package/components/apps/editor/component/Component.svelte +8 -19
- package/components/apps/editor/component/Component.svelte.d.ts +1 -1
- package/components/apps/editor/component/ComponentNavigation.svelte +47 -57
- package/components/apps/editor/component/README.md +0 -4
- package/components/apps/editor/component/components.d.ts +28 -45
- package/components/apps/editor/component/components.js +27 -41
- package/components/apps/editor/component/sets.js +1 -2
- package/components/apps/editor/componentsPanel/ComponentList.svelte +1 -1
- package/components/apps/editor/componentsPanel/CssProperty.svelte +48 -62
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +2 -3
- package/components/apps/editor/componentsPanel/CssSettings.svelte +0 -1
- package/components/apps/editor/componentsPanel/store.js +4 -4
- package/components/apps/editor/contextPanel/ComponentOutput.svelte +26 -2
- package/components/apps/editor/contextPanel/ComponentOutput.svelte.d.ts +1 -0
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +6 -8
- package/components/apps/editor/contextPanel/ContextPanel.svelte +14 -7
- package/components/apps/editor/contextPanel/components/BackgroundScriptOutput.svelte +25 -2
- package/components/apps/editor/contextPanel/components/MinMaxButton.svelte +25 -0
- package/components/apps/editor/contextPanel/components/MinMaxButton.svelte.d.ts +16 -0
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte +40 -29
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte.d.ts +2 -1
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +7 -2
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte.d.ts +1 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +11 -10
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +3 -4
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +0 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +1 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +2 -2
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte +0 -2
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +19 -22
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +13 -42
- package/components/apps/editor/settingsPanel/GridTab.svelte +2 -1
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +1 -2
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +0 -4
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +0 -1
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte +2 -1
- package/components/apps/editor/settingsPanel/TableActions.svelte +3 -3
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +12 -12
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +2 -3
- package/components/apps/editor/settingsPanel/inputEditor/EvalInputEditor.svelte +1 -5
- package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte +3 -3
- package/components/apps/editor/settingsPanel/inputEditor/JsonEditor.svelte +2 -3
- package/components/apps/editor/settingsPanel/inputEditor/JsonEditor.svelte.d.ts +1 -4
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +3 -3
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +1 -1
- package/components/apps/inputType.d.ts +2 -2
- package/components/apps/rx.d.ts +2 -2
- package/components/apps/svelte-grid/Grid.svelte +34 -50
- package/components/apps/svelte-grid/Grid.svelte.d.ts +9 -14
- package/components/apps/svelte-grid/MoveResize.svelte +55 -76
- package/components/apps/svelte-grid/MoveResize.svelte.d.ts +9 -15
- package/components/apps/svelte-grid/utils/helper.d.ts +1 -0
- package/components/apps/svelte-grid/utils/helper.js +3 -0
- package/components/apps/types.d.ts +5 -9
- package/components/apps/utils.d.ts +0 -2
- package/components/apps/utils.js +1 -33
- package/components/common/button/ButtonPopup.svelte +2 -5
- package/components/common/button/ButtonPopup.svelte.d.ts +1 -5
- package/components/common/button/ButtonPopupItem.svelte +1 -2
- package/components/common/button/ButtonPopupItem.svelte.d.ts +0 -1
- package/components/common/index.d.ts +0 -1
- package/components/common/index.js +0 -1
- package/components/common/kbd/Kbd.svelte +1 -4
- package/components/common/kbd/Kbd.svelte.d.ts +14 -6
- package/components/common/menu/Menu.svelte +2 -8
- package/components/common/menu/Menu.svelte.d.ts +1 -4
- package/components/flows/map/MapItem.svelte +3 -3
- package/components/propertyPicker/ObjectViewer.svelte +3 -0
- package/components/scriptEditor/LogPanel.svelte +3 -3
- package/infer.js +1 -6
- package/package.json +2 -11
- package/utils.d.ts +0 -1
- package/utils.js +0 -3
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte +0 -170
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte.d.ts +0 -18
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +0 -130
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte.d.ts +0 -21
- package/components/apps/editor/componentsPanel/quickStyleProperties.d.ts +0 -535
- package/components/apps/editor/componentsPanel/quickStyleProperties.js +0 -598
- package/components/apps/editor/settingsPanel/StylePanel.svelte +0 -61
- package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +0 -17
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +0 -47
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte.d.ts +0 -14
- package/components/apps/editor/settingsPanel/secondaryMenu/index.d.ts +0 -2
- package/components/apps/editor/settingsPanel/secondaryMenu/index.js +0 -2
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.d.ts +0 -12
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.js +0 -10
- package/components/common/clearableInput/ClearableInput.svelte +0 -56
- package/components/common/clearableInput/ClearableInput.svelte.d.ts +0 -28
- package/components/common/modal/AlwaysMountedModal.svelte +0 -109
- package/components/common/modal/AlwaysMountedModal.svelte.d.ts +0 -22
|
@@ -1,598 +0,0 @@
|
|
|
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
|
-
textareainputcomponent: {
|
|
533
|
-
input: inputDefaultProps
|
|
534
|
-
},
|
|
535
|
-
emailinputcomponent: {
|
|
536
|
-
input: inputDefaultProps
|
|
537
|
-
},
|
|
538
|
-
formbuttoncomponent: {
|
|
539
|
-
button: buttonDefaultProps,
|
|
540
|
-
popup: containerDefaultProps
|
|
541
|
-
},
|
|
542
|
-
timeseriescomponent: {
|
|
543
|
-
container: containerDefaultProps
|
|
544
|
-
},
|
|
545
|
-
multiselectcomponent: {
|
|
546
|
-
input: inputDefaultProps
|
|
547
|
-
},
|
|
548
|
-
numberinputcomponent: {
|
|
549
|
-
input: inputDefaultProps
|
|
550
|
-
},
|
|
551
|
-
scatterchartcomponent: {
|
|
552
|
-
container: containerDefaultProps
|
|
553
|
-
},
|
|
554
|
-
passwordinputcomponent: {
|
|
555
|
-
input: inputDefaultProps
|
|
556
|
-
},
|
|
557
|
-
resourceselectcomponent: {
|
|
558
|
-
input: inputDefaultProps
|
|
559
|
-
},
|
|
560
|
-
verticaldividercomponent: {
|
|
561
|
-
divider: [
|
|
562
|
-
'padding',
|
|
563
|
-
'opacity',
|
|
564
|
-
'width',
|
|
565
|
-
'min-width',
|
|
566
|
-
'max-width',
|
|
567
|
-
'height',
|
|
568
|
-
'min-height',
|
|
569
|
-
'max-height',
|
|
570
|
-
'border',
|
|
571
|
-
'border-radius',
|
|
572
|
-
'background-color'
|
|
573
|
-
],
|
|
574
|
-
container: containerDefaultProps
|
|
575
|
-
},
|
|
576
|
-
horizontaldividercomponent: {
|
|
577
|
-
divider: [
|
|
578
|
-
'padding',
|
|
579
|
-
'opacity',
|
|
580
|
-
'width',
|
|
581
|
-
'min-width',
|
|
582
|
-
'max-width',
|
|
583
|
-
'height',
|
|
584
|
-
'min-height',
|
|
585
|
-
'max-height',
|
|
586
|
-
'border',
|
|
587
|
-
'border-radius',
|
|
588
|
-
'background-color'
|
|
589
|
-
],
|
|
590
|
-
container: containerDefaultProps
|
|
591
|
-
},
|
|
592
|
-
verticalsplitpanescomponent: {
|
|
593
|
-
container: containerDefaultProps
|
|
594
|
-
},
|
|
595
|
-
horizontalsplitpanescomponent: {
|
|
596
|
-
container: containerDefaultProps
|
|
597
|
-
}
|
|
598
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script>import { Button } from '../../../common';
|
|
2
|
-
import { sendUserToast } from '../../../../utils';
|
|
3
|
-
import { Copy } from 'lucide-svelte';
|
|
4
|
-
import { getContext } from 'svelte';
|
|
5
|
-
import { ccomponents } from '../component';
|
|
6
|
-
import CssProperty from '../componentsPanel/CssProperty.svelte';
|
|
7
|
-
import { quickStyleProperties } from '../componentsPanel/quickStyleProperties';
|
|
8
|
-
export let component;
|
|
9
|
-
const { app } = getContext('AppViewerContext');
|
|
10
|
-
function applyToAllInstances() {
|
|
11
|
-
if (component) {
|
|
12
|
-
if (!$app.css) {
|
|
13
|
-
$app.css = {};
|
|
14
|
-
}
|
|
15
|
-
let componentType = component?.type;
|
|
16
|
-
if (!$app.css[componentType]) {
|
|
17
|
-
$app.css[componentType] = {};
|
|
18
|
-
}
|
|
19
|
-
Object.keys(ccomponents[component.type].customCss ?? {}).forEach((name) => {
|
|
20
|
-
if (!$app.css[componentType][name]) {
|
|
21
|
-
$app.css[componentType][name] = {};
|
|
22
|
-
}
|
|
23
|
-
if (component) {
|
|
24
|
-
let nstyle = component.customCss[name];
|
|
25
|
-
if (nstyle.style) {
|
|
26
|
-
$app.css[componentType][name].style = nstyle.style;
|
|
27
|
-
}
|
|
28
|
-
if (nstyle.class) {
|
|
29
|
-
$app.css[componentType][name].class = nstyle.class;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
sendUserToast(`Applied style to all instances of the ${componentType.replace('component', '')} component`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<Button
|
|
39
|
-
variant="border"
|
|
40
|
-
color="light"
|
|
41
|
-
size="xs"
|
|
42
|
-
aria-label="Apply to all instances of this component"
|
|
43
|
-
on:click={applyToAllInstances}
|
|
44
|
-
>
|
|
45
|
-
Copy style to global CSS <Copy size={18} />
|
|
46
|
-
</Button>
|
|
47
|
-
|
|
48
|
-
{#if component && component.customCss !== undefined}
|
|
49
|
-
{#each Object.keys(ccomponents[component.type].customCss ?? {}) as name}
|
|
50
|
-
<div class="w-full">
|
|
51
|
-
<CssProperty
|
|
52
|
-
quickStyleProperties={quickStyleProperties?.[component.type]?.[name]}
|
|
53
|
-
forceStyle={ccomponents[component.type].customCss[name].style !== undefined}
|
|
54
|
-
forceClass={ccomponents[component.type].customCss[name].class !== undefined}
|
|
55
|
-
{name}
|
|
56
|
-
bind:value={component.customCss[name]}
|
|
57
|
-
on:change={() => app.set($app)}
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
{/each}
|
|
61
|
-
{/if}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type AppComponent } from '../component';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
component: AppComponent | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
};
|
|
12
|
-
export type StylePanelProps = typeof __propDef.props;
|
|
13
|
-
export type StylePanelEvents = typeof __propDef.events;
|
|
14
|
-
export type StylePanelSlots = typeof __propDef.slots;
|
|
15
|
-
export default class StylePanel extends SvelteComponentTyped<StylePanelProps, StylePanelEvents, StylePanelSlots> {
|
|
16
|
-
}
|
|
17
|
-
export {};
|