windmill-components 1.77.0 → 1.78.0
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 +4 -14
- package/components/LightweightArgInput.svelte +315 -0
- package/components/LightweightArgInput.svelte.d.ts +47 -0
- package/components/LightweightSchemaForm.svelte +31 -0
- package/components/LightweightSchemaForm.svelte.d.ts +18 -0
- package/components/ModulePreview.svelte +1 -0
- package/components/Multiselect.svelte.d.ts +2 -2
- package/components/Path.svelte +4 -0
- package/components/Range.svelte.d.ts +2 -2
- package/components/SimpleEditor.svelte +1 -1
- package/components/SimpleEditor.svelte.d.ts +2 -0
- package/components/TemplateEditor.svelte +3 -0
- package/components/TemplateEditor.svelte.d.ts +0 -204
- package/components/VariableEditor.svelte +2 -1
- package/components/apps/components/buttons/AppButton.svelte +5 -3
- package/components/apps/components/buttons/AppButton.svelte.d.ts +0 -2
- package/components/apps/components/buttons/AppFormButton.svelte +1 -1
- package/components/apps/components/display/AppBarChart.svelte +7 -3
- package/components/apps/components/display/AppBarChart.svelte.d.ts +0 -2
- package/components/apps/components/display/AppDisplayComponent.svelte +7 -3
- package/components/apps/components/display/AppDisplayComponent.svelte.d.ts +0 -2
- package/components/apps/components/display/AppHtml.svelte +7 -11
- package/components/apps/components/display/AppHtml.svelte.d.ts +0 -2
- package/components/apps/components/display/AppIcon.svelte +0 -1
- package/components/apps/components/display/AppIcon.svelte.d.ts +0 -2
- package/components/apps/components/display/AppImage.svelte +0 -1
- package/components/apps/components/display/AppImage.svelte.d.ts +0 -2
- package/components/apps/components/display/AppMap.svelte +10 -3
- package/components/apps/components/display/AppMap.svelte.d.ts +0 -2
- package/components/apps/components/display/AppPdf.svelte +8 -3
- package/components/apps/components/display/AppPdf.svelte.d.ts +0 -2
- package/components/apps/components/display/AppPieChart.svelte +7 -3
- package/components/apps/components/display/AppPieChart.svelte.d.ts +0 -2
- package/components/apps/components/display/AppScatterChart.svelte +7 -3
- package/components/apps/components/display/AppScatterChart.svelte.d.ts +0 -2
- package/components/apps/components/display/AppText.svelte +41 -17
- package/components/apps/components/display/AppText.svelte.d.ts +0 -2
- package/components/apps/components/display/AppTimeseries.svelte +7 -3
- package/components/apps/components/display/AppTimeseries.svelte.d.ts +0 -2
- package/components/apps/components/display/PlotlyHtml.svelte +9 -4
- package/components/apps/components/display/PlotlyHtml.svelte.d.ts +0 -2
- package/components/apps/components/display/VegaLiteHtml.svelte +8 -3
- package/components/apps/components/display/VegaLiteHtml.svelte.d.ts +0 -2
- package/components/apps/components/display/table/AppAggridTable.svelte +9 -4
- package/components/apps/components/display/table/AppAggridTable.svelte.d.ts +0 -2
- package/components/apps/components/display/table/AppTable.svelte +15 -12
- package/components/apps/components/display/table/AppTable.svelte.d.ts +0 -2
- package/components/apps/components/helpers/HiddenComponent.svelte +8 -2
- package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +0 -2
- package/components/apps/components/helpers/NonRunnableComponent.svelte +2 -2
- package/components/apps/components/helpers/ResizeWrapper.svelte +3 -4
- package/components/apps/components/helpers/RunnableComponent.svelte +3 -18
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +0 -1
- package/components/apps/components/helpers/RunnableWrapper.svelte +0 -2
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +0 -1
- package/components/apps/components/inputs/AppCheckbox.svelte +4 -2
- package/components/apps/components/inputs/AppCheckbox.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppDateInput.svelte +4 -2
- package/components/apps/components/inputs/AppDateInput.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppFileInput.svelte +4 -2
- package/components/apps/components/inputs/AppFileInput.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppMultiSelect.svelte +4 -2
- package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppNumberInput.svelte +4 -2
- package/components/apps/components/inputs/AppNumberInput.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppRangeInput.svelte +5 -2
- package/components/apps/components/inputs/AppRangeInput.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppSelect.svelte +4 -2
- package/components/apps/components/inputs/AppSelect.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppSliderInputs.svelte +4 -2
- package/components/apps/components/inputs/AppSliderInputs.svelte.d.ts +0 -2
- package/components/apps/components/inputs/AppTextInput.svelte +5 -3
- package/components/apps/components/inputs/AppTextInput.svelte.d.ts +0 -2
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +5 -2
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte.d.ts +0 -2
- package/components/apps/components/layout/AppContainer.svelte +0 -1
- package/components/apps/components/layout/AppContainer.svelte.d.ts +0 -2
- package/components/apps/components/layout/AppTabs.svelte +3 -6
- package/components/apps/components/layout/AppTabs.svelte.d.ts +0 -2
- package/components/apps/editor/AppComponentInput.svelte +2 -1
- package/components/apps/editor/AppEditor.svelte +9 -12
- package/components/apps/editor/AppPreview.svelte +66 -14
- package/components/apps/editor/GridEditor.svelte +6 -27
- package/components/apps/editor/GridPanel.svelte +3 -1
- package/components/apps/editor/GridViewer.svelte +91 -0
- package/components/apps/editor/GridViewer.svelte.d.ts +32 -0
- package/components/apps/editor/SubGridEditor.svelte +73 -50
- package/components/apps/editor/appUtils.d.ts +3 -2
- package/components/apps/editor/appUtils.js +14 -19
- package/components/apps/editor/component/Component.svelte +2 -43
- package/components/apps/editor/component/ComponentNavigation.svelte +17 -12
- package/components/apps/editor/component/components.d.ts +2 -2
- package/components/apps/editor/component/components.js +42 -79
- package/components/apps/editor/componentsPanel/ComponentList.svelte +5 -4
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +1 -1
- package/components/apps/editor/contextPanel/ComponentOutput.svelte +23 -33
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +14 -13
- package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte.d.ts +0 -1
- package/components/apps/editor/contextPanel/ContextPanel.svelte +16 -23
- package/components/apps/editor/contextPanel/SubGridOutput.svelte +5 -10
- package/components/apps/editor/contextPanel/components/BackgroundScriptOutput.svelte +9 -6
- package/components/apps/editor/contextPanel/components/BackgroundScriptOutput.svelte.d.ts +0 -1
- package/components/apps/editor/contextPanel/components/BackgroundScriptsOutput.svelte +1 -2
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte +62 -41
- package/components/apps/editor/contextPanel/components/OutputHeader.svelte.d.ts +0 -2
- package/components/apps/editor/contextPanel/components/TableActionOutput.svelte +2 -4
- package/components/apps/editor/contextPanel/components/TableActionOutput.svelte.d.ts +0 -1
- package/components/apps/editor/contextPanel/components/TableActionsOutput.svelte +1 -2
- package/components/apps/editor/contextPanel/components/TableActionsOutput.svelte.d.ts +0 -1
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +2 -2
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +6 -2
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +5 -9
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +12 -7
- package/components/apps/editor/settingsPanel/GridPane.svelte +1 -3
- package/components/apps/editor/settingsPanel/GridTab.svelte +1 -3
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +1 -16
- package/components/apps/editor/settingsPanel/TableActions.svelte +2 -5
- package/components/apps/gridUtils.d.ts +1 -3
- package/components/apps/gridUtils.js +1 -15
- package/components/apps/rx.d.ts +1 -1
- package/components/apps/rx.js +8 -10
- package/components/apps/svelte-grid/Grid.svelte +8 -12
- package/components/apps/svelte-grid/Grid.svelte.d.ts +0 -2
- package/components/apps/svelte-grid/MoveResize.svelte +1 -1
- package/components/apps/svelte-grid/types.d.ts +12 -16
- package/components/apps/svelte-grid/utils/helper.d.ts +1 -5
- package/components/apps/types.d.ts +9 -7
- package/components/apps/utils.js +2 -2
- package/components/common/button/Button.svelte.d.ts +1 -1
- package/components/common/button/ButtonPopup.svelte.d.ts +1 -1
- package/components/common/menu/Menu.svelte.d.ts +1 -1
- package/components/propertyPicker/ObjectViewer.svelte +1 -1
- package/components/propertyPicker/PropPicker.svelte +4 -1
- package/package.json +4 -2
- package/components/apps/editor/AppComponentInputs.svelte +0 -13
- package/components/apps/editor/AppComponentInputs.svelte.d.ts +0 -20
|
@@ -1,205 +1 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
conf?: {
|
|
6
|
-
wordPattern: RegExp;
|
|
7
|
-
comments: {
|
|
8
|
-
lineComment: string;
|
|
9
|
-
blockComment: [string, string];
|
|
10
|
-
};
|
|
11
|
-
brackets: [string, string][];
|
|
12
|
-
onEnterRules: never[];
|
|
13
|
-
autoClosingPairs: ({
|
|
14
|
-
open: string;
|
|
15
|
-
close: string;
|
|
16
|
-
notIn?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
open: string;
|
|
19
|
-
close: string;
|
|
20
|
-
notIn: string[];
|
|
21
|
-
})[];
|
|
22
|
-
folding: {
|
|
23
|
-
markers: {
|
|
24
|
-
start: RegExp;
|
|
25
|
-
end: RegExp;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
} | undefined;
|
|
29
|
-
language?: {
|
|
30
|
-
defaultToken: string;
|
|
31
|
-
tokenPostfix: string;
|
|
32
|
-
keywords: string[];
|
|
33
|
-
operators: string[];
|
|
34
|
-
symbols: RegExp;
|
|
35
|
-
escapes: RegExp;
|
|
36
|
-
digits: RegExp;
|
|
37
|
-
octaldigits: RegExp;
|
|
38
|
-
binarydigits: RegExp;
|
|
39
|
-
hexdigits: RegExp;
|
|
40
|
-
regexpctl: RegExp;
|
|
41
|
-
regexpesc: RegExp;
|
|
42
|
-
tokenizer: {
|
|
43
|
-
root: ((string | RegExp)[] | (RegExp | {
|
|
44
|
-
token: string;
|
|
45
|
-
next: string;
|
|
46
|
-
})[])[];
|
|
47
|
-
common: ((string | RegExp)[] | (RegExp | {
|
|
48
|
-
cases: {
|
|
49
|
-
'@keywords': string;
|
|
50
|
-
'@default': string;
|
|
51
|
-
};
|
|
52
|
-
})[] | {
|
|
53
|
-
include: string;
|
|
54
|
-
} | (RegExp | {
|
|
55
|
-
token: string;
|
|
56
|
-
bracket: string;
|
|
57
|
-
next: string;
|
|
58
|
-
})[] | (RegExp | {
|
|
59
|
-
cases: {
|
|
60
|
-
'@operators': string;
|
|
61
|
-
'@default': string;
|
|
62
|
-
};
|
|
63
|
-
})[])[];
|
|
64
|
-
whitespace: (string | RegExp)[][];
|
|
65
|
-
comment: (string | RegExp)[][];
|
|
66
|
-
jsdoc: (string | RegExp)[][];
|
|
67
|
-
regexp: ((string | RegExp)[] | (RegExp | (string | {
|
|
68
|
-
token: string;
|
|
69
|
-
next: string;
|
|
70
|
-
})[])[] | (RegExp | (string | {
|
|
71
|
-
token: string;
|
|
72
|
-
bracket: string;
|
|
73
|
-
next: string;
|
|
74
|
-
})[])[])[];
|
|
75
|
-
regexrange: ((string | RegExp)[] | (RegExp | {
|
|
76
|
-
token: string;
|
|
77
|
-
next: string;
|
|
78
|
-
bracket: string;
|
|
79
|
-
})[])[];
|
|
80
|
-
string_double: (string | RegExp)[][];
|
|
81
|
-
string_single: (string | RegExp)[][];
|
|
82
|
-
string_backtick: ((string | RegExp)[] | (RegExp | {
|
|
83
|
-
token: string;
|
|
84
|
-
next: string;
|
|
85
|
-
})[])[];
|
|
86
|
-
bracketCounting: ((string | RegExp)[] | {
|
|
87
|
-
include: string;
|
|
88
|
-
})[];
|
|
89
|
-
};
|
|
90
|
-
} | undefined;
|
|
91
|
-
code?: string | undefined;
|
|
92
|
-
hash?: string | undefined;
|
|
93
|
-
automaticLayout?: boolean | undefined;
|
|
94
|
-
extraLib?: string | undefined;
|
|
95
|
-
autoHeight?: boolean | undefined;
|
|
96
|
-
fixedOverflowWidgets?: boolean | undefined;
|
|
97
|
-
fontSize?: number | undefined;
|
|
98
|
-
insertAtCursor?: ((code: string) => void) | undefined;
|
|
99
|
-
setCode?: ((ncode: string) => void) | undefined;
|
|
100
|
-
getCode?: (() => string) | undefined;
|
|
101
|
-
};
|
|
102
|
-
events: {
|
|
103
|
-
change: CustomEvent<any>;
|
|
104
|
-
focus: CustomEvent<any>;
|
|
105
|
-
blur: CustomEvent<any>;
|
|
106
|
-
} & {
|
|
107
|
-
[evt: string]: CustomEvent<any>;
|
|
108
|
-
};
|
|
109
|
-
slots: {};
|
|
110
|
-
};
|
|
111
|
-
export type TemplateEditorProps = typeof __propDef.props;
|
|
112
|
-
export type TemplateEditorEvents = typeof __propDef.events;
|
|
113
|
-
export type TemplateEditorSlots = typeof __propDef.slots;
|
|
114
|
-
export default class TemplateEditor extends SvelteComponentTyped<TemplateEditorProps, TemplateEditorEvents, TemplateEditorSlots> {
|
|
115
|
-
get conf(): {
|
|
116
|
-
wordPattern: RegExp;
|
|
117
|
-
comments: {
|
|
118
|
-
lineComment: string;
|
|
119
|
-
blockComment: [string, string];
|
|
120
|
-
};
|
|
121
|
-
brackets: [string, string][];
|
|
122
|
-
onEnterRules: never[];
|
|
123
|
-
autoClosingPairs: ({
|
|
124
|
-
open: string;
|
|
125
|
-
close: string;
|
|
126
|
-
notIn?: undefined;
|
|
127
|
-
} | {
|
|
128
|
-
open: string;
|
|
129
|
-
close: string;
|
|
130
|
-
notIn: string[];
|
|
131
|
-
})[];
|
|
132
|
-
folding: {
|
|
133
|
-
markers: {
|
|
134
|
-
start: RegExp;
|
|
135
|
-
end: RegExp;
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
get language(): {
|
|
140
|
-
defaultToken: string;
|
|
141
|
-
tokenPostfix: string;
|
|
142
|
-
keywords: string[];
|
|
143
|
-
operators: string[];
|
|
144
|
-
symbols: RegExp;
|
|
145
|
-
escapes: RegExp;
|
|
146
|
-
digits: RegExp;
|
|
147
|
-
octaldigits: RegExp;
|
|
148
|
-
binarydigits: RegExp;
|
|
149
|
-
hexdigits: RegExp;
|
|
150
|
-
regexpctl: RegExp;
|
|
151
|
-
regexpesc: RegExp;
|
|
152
|
-
tokenizer: {
|
|
153
|
-
root: ((string | RegExp)[] | (RegExp | {
|
|
154
|
-
token: string;
|
|
155
|
-
next: string;
|
|
156
|
-
})[])[];
|
|
157
|
-
common: ((string | RegExp)[] | (RegExp | {
|
|
158
|
-
cases: {
|
|
159
|
-
'@keywords': string;
|
|
160
|
-
'@default': string;
|
|
161
|
-
};
|
|
162
|
-
})[] | {
|
|
163
|
-
include: string;
|
|
164
|
-
} | (RegExp | {
|
|
165
|
-
token: string;
|
|
166
|
-
bracket: string;
|
|
167
|
-
next: string;
|
|
168
|
-
})[] | (RegExp | {
|
|
169
|
-
cases: {
|
|
170
|
-
'@operators': string;
|
|
171
|
-
'@default': string;
|
|
172
|
-
};
|
|
173
|
-
})[])[];
|
|
174
|
-
whitespace: (string | RegExp)[][];
|
|
175
|
-
comment: (string | RegExp)[][];
|
|
176
|
-
jsdoc: (string | RegExp)[][];
|
|
177
|
-
regexp: ((string | RegExp)[] | (RegExp | (string | {
|
|
178
|
-
token: string;
|
|
179
|
-
next: string;
|
|
180
|
-
})[])[] | (RegExp | (string | {
|
|
181
|
-
token: string;
|
|
182
|
-
bracket: string;
|
|
183
|
-
next: string;
|
|
184
|
-
})[])[])[];
|
|
185
|
-
regexrange: ((string | RegExp)[] | (RegExp | {
|
|
186
|
-
token: string;
|
|
187
|
-
next: string;
|
|
188
|
-
bracket: string;
|
|
189
|
-
})[])[];
|
|
190
|
-
string_double: (string | RegExp)[][];
|
|
191
|
-
string_single: (string | RegExp)[][];
|
|
192
|
-
string_backtick: ((string | RegExp)[] | (RegExp | {
|
|
193
|
-
token: string;
|
|
194
|
-
next: string;
|
|
195
|
-
})[])[];
|
|
196
|
-
bracketCounting: ((string | RegExp)[] | {
|
|
197
|
-
include: string;
|
|
198
|
-
})[];
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
get insertAtCursor(): (code: string) => void;
|
|
202
|
-
get setCode(): (ncode: string) => void;
|
|
203
|
-
get getCode(): () => string;
|
|
204
|
-
}
|
|
205
1
|
export {};
|
|
@@ -46,7 +46,8 @@ export async function editVariable(edit_path) {
|
|
|
46
46
|
decryptSecret: false
|
|
47
47
|
});
|
|
48
48
|
can_write =
|
|
49
|
-
getV.workspace_id == $workspaceStore &&
|
|
49
|
+
getV.workspace_id == $workspaceStore &&
|
|
50
|
+
canWrite(edit_path, getV.extra_perms ?? {}, $userStore);
|
|
50
51
|
variable = {
|
|
51
52
|
value: getV.value ?? '',
|
|
52
53
|
is_secret: getV.is_secret,
|
|
@@ -6,6 +6,7 @@ import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
|
6
6
|
import { loadIcon } from '../icon';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
8
|
import { goto } from '$app/navigation';
|
|
9
|
+
import { initOutput } from '../../editor/appUtils';
|
|
9
10
|
export let id;
|
|
10
11
|
export let componentInput;
|
|
11
12
|
export let configuration;
|
|
@@ -18,7 +19,6 @@ export let preclickAction = undefined;
|
|
|
18
19
|
export let customCss = undefined;
|
|
19
20
|
export let render;
|
|
20
21
|
export let initializing = true;
|
|
21
|
-
export const staticOutputs = ['loading', 'result'];
|
|
22
22
|
const { worldStore, app } = getContext('AppViewerContext');
|
|
23
23
|
let labelValue;
|
|
24
24
|
let color;
|
|
@@ -47,7 +47,10 @@ async function handleAfterIcon() {
|
|
|
47
47
|
afterIconComponent = await loadIcon(afterIcon);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
let outputs = initOutput($worldStore, id, {
|
|
51
|
+
result: undefined,
|
|
52
|
+
loading: false
|
|
53
|
+
});
|
|
51
54
|
$: triggerOnAppLoad && runnableComponent?.runComponent();
|
|
52
55
|
$: if (outputs?.loading != undefined) {
|
|
53
56
|
outputs.loading.set(false, true);
|
|
@@ -113,7 +116,6 @@ async function handleClick(event) {
|
|
|
113
116
|
<InputValue {id} input={configuration.gotoNewTab} bind:value={gotoNewTab} />
|
|
114
117
|
|
|
115
118
|
<RunnableWrapper
|
|
116
|
-
flexWrap
|
|
117
119
|
{recomputeIds}
|
|
118
120
|
bind:runnableComponent
|
|
119
121
|
{componentInput}
|
|
@@ -15,7 +15,6 @@ declare const __propDef: {
|
|
|
15
15
|
customCss?: ComponentCustomCSS<'button'> | undefined;
|
|
16
16
|
render: boolean;
|
|
17
17
|
initializing?: boolean | undefined;
|
|
18
|
-
staticOutputs?: string[] | undefined;
|
|
19
18
|
};
|
|
20
19
|
events: {
|
|
21
20
|
[evt: string]: CustomEvent<any>;
|
|
@@ -26,6 +25,5 @@ export type AppButtonProps = typeof __propDef.props;
|
|
|
26
25
|
export type AppButtonEvents = typeof __propDef.events;
|
|
27
26
|
export type AppButtonSlots = typeof __propDef.slots;
|
|
28
27
|
export default class AppButton extends SvelteComponentTyped<AppButtonProps, AppButtonEvents, AppButtonSlots> {
|
|
29
|
-
get staticOutputs(): string[];
|
|
30
28
|
}
|
|
31
29
|
export {};
|
|
@@ -18,7 +18,7 @@ export let verticalAlignment = undefined;
|
|
|
18
18
|
export let customCss = undefined;
|
|
19
19
|
export let render;
|
|
20
20
|
export const staticOutputs = ['loading', 'result'];
|
|
21
|
-
const { app,
|
|
21
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
22
22
|
let labelValue = 'Default label';
|
|
23
23
|
let color;
|
|
24
24
|
let size;
|
|
@@ -4,14 +4,18 @@ import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
|
4
4
|
import InputValue from '../helpers/InputValue.svelte';
|
|
5
5
|
import { concatCustomCss } from '../../utils';
|
|
6
6
|
import { getContext } from 'svelte';
|
|
7
|
+
import { initOutput } from '../../editor/appUtils';
|
|
7
8
|
export let id;
|
|
8
9
|
export let componentInput;
|
|
9
10
|
export let configuration;
|
|
10
11
|
export let initializing = undefined;
|
|
11
12
|
export let customCss = undefined;
|
|
12
13
|
export let render;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
15
|
+
initOutput($worldStore, id, {
|
|
16
|
+
result: undefined,
|
|
17
|
+
loading: false
|
|
18
|
+
});
|
|
15
19
|
ChartJS.register(Title, Tooltip, Legend, LineElement, LinearScale, PointElement, CategoryScale, BarElement);
|
|
16
20
|
let result = undefined;
|
|
17
21
|
let theme = 'theme1';
|
|
@@ -58,7 +62,7 @@ $: css = concatCustomCss($app.css?.barchartcomponent, customCss);
|
|
|
58
62
|
<InputValue {id} input={configuration.theme} bind:value={theme} />
|
|
59
63
|
<InputValue {id} input={configuration.line} bind:value={lineChart} />
|
|
60
64
|
|
|
61
|
-
<RunnableWrapper {render}
|
|
65
|
+
<RunnableWrapper {render} autoRefresh {componentInput} {id} bind:initializing bind:result>
|
|
62
66
|
<div class="w-full h-full {css?.container?.class ?? ''}" style={css?.container?.style ?? ''}>
|
|
63
67
|
{#if result}
|
|
64
68
|
{#if lineChart}
|
|
@@ -9,7 +9,6 @@ declare const __propDef: {
|
|
|
9
9
|
initializing?: boolean | undefined;
|
|
10
10
|
customCss?: ComponentCustomCSS<'container'> | undefined;
|
|
11
11
|
render: boolean;
|
|
12
|
-
staticOutputs?: string[] | undefined;
|
|
13
12
|
};
|
|
14
13
|
events: {
|
|
15
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -20,6 +19,5 @@ export type AppBarChartProps = typeof __propDef.props;
|
|
|
20
19
|
export type AppBarChartEvents = typeof __propDef.events;
|
|
21
20
|
export type AppBarChartSlots = typeof __propDef.slots;
|
|
22
21
|
export default class AppBarChart extends SvelteComponentTyped<AppBarChartProps, AppBarChartEvents, AppBarChartSlots> {
|
|
23
|
-
get staticOutputs(): string[];
|
|
24
22
|
}
|
|
25
23
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import DisplayResult from '../../../DisplayResult.svelte';
|
|
2
2
|
import { getContext } from 'svelte';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { initOutput } from '../../editor/appUtils';
|
|
4
5
|
import { IS_APP_PUBLIC_CONTEXT_KEY } from '../../types';
|
|
5
6
|
import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
6
7
|
export let id;
|
|
@@ -9,12 +10,15 @@ export let initializing = undefined;
|
|
|
9
10
|
export let customCss = undefined;
|
|
10
11
|
export let render;
|
|
11
12
|
const requireHtmlApproval = getContext(IS_APP_PUBLIC_CONTEXT_KEY);
|
|
12
|
-
const { app } = getContext('AppViewerContext');
|
|
13
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
13
14
|
let result = undefined;
|
|
14
|
-
|
|
15
|
+
initOutput($worldStore, id, {
|
|
16
|
+
result: undefined,
|
|
17
|
+
loading: false
|
|
18
|
+
});
|
|
15
19
|
</script>
|
|
16
20
|
|
|
17
|
-
<RunnableWrapper {render}
|
|
21
|
+
<RunnableWrapper {render} {componentInput} {id} bind:initializing bind:result>
|
|
18
22
|
<div
|
|
19
23
|
class={twMerge(
|
|
20
24
|
'w-full border-b px-2 text-xs p-1 font-semibold bg-gray-500 text-white rounded-t-sm',
|
|
@@ -8,7 +8,6 @@ declare const __propDef: {
|
|
|
8
8
|
initializing?: boolean | undefined;
|
|
9
9
|
customCss?: ComponentCustomCSS<'header' | 'container'> | undefined;
|
|
10
10
|
render: boolean;
|
|
11
|
-
staticOutputs?: string[] | undefined;
|
|
12
11
|
};
|
|
13
12
|
events: {
|
|
14
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -19,6 +18,5 @@ export type AppDisplayComponentProps = typeof __propDef.props;
|
|
|
19
18
|
export type AppDisplayComponentEvents = typeof __propDef.events;
|
|
20
19
|
export type AppDisplayComponentSlots = typeof __propDef.slots;
|
|
21
20
|
export default class AppDisplayComponent extends SvelteComponentTyped<AppDisplayComponentProps, AppDisplayComponentEvents, AppDisplayComponentSlots> {
|
|
22
|
-
get staticOutputs(): string[];
|
|
23
21
|
}
|
|
24
22
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>import { getContext } from 'svelte';
|
|
2
|
+
import { initOutput } from '../../editor/appUtils';
|
|
2
3
|
import { concatCustomCss } from '../../utils';
|
|
3
4
|
import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
4
5
|
export let id;
|
|
@@ -6,8 +7,11 @@ export let componentInput;
|
|
|
6
7
|
export let initializing = undefined;
|
|
7
8
|
export let customCss = undefined;
|
|
8
9
|
export let render;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
11
|
+
initOutput($worldStore, id, {
|
|
12
|
+
result: undefined,
|
|
13
|
+
loading: false
|
|
14
|
+
});
|
|
11
15
|
let result = undefined;
|
|
12
16
|
let h = undefined;
|
|
13
17
|
let w = undefined;
|
|
@@ -22,15 +26,7 @@ $: css = concatCustomCss($app.css?.htmlcomponent, customCss);
|
|
|
22
26
|
bind:clientHeight={h}
|
|
23
27
|
bind:clientWidth={w}
|
|
24
28
|
>
|
|
25
|
-
<RunnableWrapper
|
|
26
|
-
{render}
|
|
27
|
-
autoRefresh
|
|
28
|
-
flexWrap
|
|
29
|
-
{componentInput}
|
|
30
|
-
{id}
|
|
31
|
-
bind:initializing
|
|
32
|
-
bind:result
|
|
33
|
-
>
|
|
29
|
+
<RunnableWrapper {render} autoRefresh {componentInput} {id} bind:initializing bind:result>
|
|
34
30
|
{#key result}
|
|
35
31
|
<iframe
|
|
36
32
|
frameborder="0"
|
|
@@ -8,7 +8,6 @@ declare const __propDef: {
|
|
|
8
8
|
initializing?: boolean | undefined;
|
|
9
9
|
customCss?: ComponentCustomCSS<'container'> | undefined;
|
|
10
10
|
render: boolean;
|
|
11
|
-
staticOutputs?: string[] | undefined;
|
|
12
11
|
};
|
|
13
12
|
events: {
|
|
14
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -19,6 +18,5 @@ export type AppHtmlProps = typeof __propDef.props;
|
|
|
19
18
|
export type AppHtmlEvents = typeof __propDef.events;
|
|
20
19
|
export type AppHtmlSlots = typeof __propDef.slots;
|
|
21
20
|
export default class AppHtml extends SvelteComponentTyped<AppHtmlProps, AppHtmlEvents, AppHtmlSlots> {
|
|
22
|
-
get staticOutputs(): string[];
|
|
23
21
|
}
|
|
24
22
|
export {};
|
|
@@ -6,7 +6,6 @@ export let id;
|
|
|
6
6
|
export let horizontalAlignment = 'left';
|
|
7
7
|
export let verticalAlignment = undefined;
|
|
8
8
|
export let configuration;
|
|
9
|
-
export const staticOutputs = [];
|
|
10
9
|
export let customCss = undefined;
|
|
11
10
|
export let render;
|
|
12
11
|
const { app } = getContext('AppViewerContext');
|
|
@@ -7,7 +7,6 @@ declare const __propDef: {
|
|
|
7
7
|
horizontalAlignment?: 'left' | 'center' | 'right' | undefined;
|
|
8
8
|
verticalAlignment?: 'top' | 'center' | 'bottom' | undefined;
|
|
9
9
|
configuration: Record<string, AppInput>;
|
|
10
|
-
staticOutputs?: string[] | undefined;
|
|
11
10
|
customCss?: ComponentCustomCSS<'container' | 'icon'> | undefined;
|
|
12
11
|
render: boolean;
|
|
13
12
|
};
|
|
@@ -20,6 +19,5 @@ export type AppIconProps = typeof __propDef.props;
|
|
|
20
19
|
export type AppIconEvents = typeof __propDef.events;
|
|
21
20
|
export type AppIconSlots = typeof __propDef.slots;
|
|
22
21
|
export default class AppIcon extends SvelteComponentTyped<AppIconProps, AppIconEvents, AppIconSlots> {
|
|
23
|
-
get staticOutputs(): string[];
|
|
24
22
|
}
|
|
25
23
|
export {};
|
|
@@ -4,7 +4,6 @@ import { concatCustomCss } from '../../utils';
|
|
|
4
4
|
import InputValue from '../helpers/InputValue.svelte';
|
|
5
5
|
export let id;
|
|
6
6
|
export let configuration;
|
|
7
|
-
export const staticOutputs = ['loading'];
|
|
8
7
|
export let customCss = undefined;
|
|
9
8
|
export let render;
|
|
10
9
|
const { app } = getContext('AppViewerContext');
|
|
@@ -5,7 +5,6 @@ declare const __propDef: {
|
|
|
5
5
|
props: {
|
|
6
6
|
id: string;
|
|
7
7
|
configuration: Record<string, AppInput>;
|
|
8
|
-
staticOutputs?: string[] | undefined;
|
|
9
8
|
customCss?: ComponentCustomCSS<'image'> | undefined;
|
|
10
9
|
render: boolean;
|
|
11
10
|
};
|
|
@@ -20,6 +19,5 @@ export type AppImageProps = typeof __propDef.props;
|
|
|
20
19
|
export type AppImageEvents = typeof __propDef.events;
|
|
21
20
|
export type AppImageSlots = typeof __propDef.slots;
|
|
22
21
|
export default class AppImage extends SvelteComponentTyped<AppImageProps, AppImageEvents, AppImageSlots> {
|
|
23
|
-
get staticOutputs(): string[];
|
|
24
22
|
}
|
|
25
23
|
export {};
|
|
@@ -8,17 +8,21 @@ import { OSM, Vector as VectorSource } from 'ol/source';
|
|
|
8
8
|
import { Vector as VectorLayer, Tile as TileLayer } from 'ol/layer';
|
|
9
9
|
import { Point } from 'ol/geom';
|
|
10
10
|
import { defaults as defaultControls } from 'ol/control';
|
|
11
|
-
import { findGridItem } from '../../editor/appUtils';
|
|
11
|
+
import { findGridItem, initOutput } from '../../editor/appUtils';
|
|
12
12
|
const LAYER_NAME = {
|
|
13
13
|
MARKER: 'Marker'
|
|
14
14
|
};
|
|
15
15
|
export let id;
|
|
16
16
|
export let configuration;
|
|
17
|
-
export const staticOutputs = ['mapRegion'];
|
|
18
17
|
export let customCss = undefined;
|
|
19
18
|
export let render;
|
|
20
19
|
const { app, worldStore, selectedComponent, connectingInput, focusedGrid, mode } = getContext('AppViewerContext');
|
|
21
|
-
|
|
20
|
+
let outputs = initOutput($worldStore, id, {
|
|
21
|
+
mapRegion: {
|
|
22
|
+
topLeft: { lat: 0, lon: 0 },
|
|
23
|
+
bottomRight: { lat: 0, lon: 0 }
|
|
24
|
+
}
|
|
25
|
+
});
|
|
22
26
|
let map;
|
|
23
27
|
let mapElement;
|
|
24
28
|
let longitude = undefined;
|
|
@@ -134,6 +138,7 @@ function handleSyncRegion() {
|
|
|
134
138
|
const z = map.getView().getZoom();
|
|
135
139
|
updateRegionOutput();
|
|
136
140
|
if (z) {
|
|
141
|
+
//@ts-ignore
|
|
137
142
|
gridItem.data.configuration.zoom.value = z;
|
|
138
143
|
}
|
|
139
144
|
const center = map.getView().getCenter();
|
|
@@ -141,7 +146,9 @@ function handleSyncRegion() {
|
|
|
141
146
|
return;
|
|
142
147
|
}
|
|
143
148
|
if (gridItem) {
|
|
149
|
+
//@ts-ignore
|
|
144
150
|
gridItem.data.configuration.longitude.value = center[0];
|
|
151
|
+
//@ts-ignore
|
|
145
152
|
gridItem.data.configuration.latitude.value = center[1];
|
|
146
153
|
}
|
|
147
154
|
}
|
|
@@ -5,7 +5,6 @@ declare const __propDef: {
|
|
|
5
5
|
props: {
|
|
6
6
|
id: string;
|
|
7
7
|
configuration: Record<string, AppInput>;
|
|
8
|
-
staticOutputs?: string[] | undefined;
|
|
9
8
|
customCss?: ComponentCustomCSS<'map'> | undefined;
|
|
10
9
|
render: boolean;
|
|
11
10
|
};
|
|
@@ -18,6 +17,5 @@ export type AppMapProps = typeof __propDef.props;
|
|
|
18
17
|
export type AppMapEvents = typeof __propDef.events;
|
|
19
18
|
export type AppMapSlots = typeof __propDef.slots;
|
|
20
19
|
export default class AppMap extends SvelteComponentTyped<AppMapProps, AppMapEvents, AppMapSlots> {
|
|
21
|
-
get staticOutputs(): string[];
|
|
22
20
|
}
|
|
23
21
|
export {};
|
|
@@ -8,13 +8,16 @@ import { throttle } from '../../../../utils';
|
|
|
8
8
|
import { Button } from '../../../common';
|
|
9
9
|
import { Download, Loader2, MoveHorizontal, ZoomIn, ZoomOut } from 'lucide-svelte';
|
|
10
10
|
import { fade } from 'svelte/transition';
|
|
11
|
-
import { findGridItem } from '../../editor/appUtils';
|
|
11
|
+
import { findGridItem, initOutput } from '../../editor/appUtils';
|
|
12
12
|
export let id;
|
|
13
13
|
export let configuration;
|
|
14
|
-
export const staticOutputs = ['loading'];
|
|
15
14
|
export let customCss = undefined;
|
|
16
15
|
export let render;
|
|
17
|
-
const { app, mode, selectedComponent } = getContext('AppViewerContext');
|
|
16
|
+
const { app, mode, worldStore, selectedComponent } = getContext('AppViewerContext');
|
|
17
|
+
initOutput($worldStore, id, {
|
|
18
|
+
result: undefined,
|
|
19
|
+
loading: false
|
|
20
|
+
});
|
|
18
21
|
let source = undefined;
|
|
19
22
|
let wrapper = undefined;
|
|
20
23
|
let error = undefined;
|
|
@@ -136,7 +139,9 @@ function onScroll() {
|
|
|
136
139
|
}
|
|
137
140
|
function syncZoomValue() {
|
|
138
141
|
const gridItem = findGridItem($app, id);
|
|
142
|
+
//@ts-ignore
|
|
139
143
|
if (gridItem && gridItem.data.configuration.zoom.value !== zoom) {
|
|
144
|
+
//@ts-ignore
|
|
140
145
|
gridItem.data.configuration.zoom.value = zoom;
|
|
141
146
|
}
|
|
142
147
|
$app = $app;
|
|
@@ -6,7 +6,6 @@ declare const __propDef: {
|
|
|
6
6
|
props: {
|
|
7
7
|
id: string;
|
|
8
8
|
configuration: Record<string, AppInput>;
|
|
9
|
-
staticOutputs?: string[] | undefined;
|
|
10
9
|
customCss?: ComponentCustomCSS<'container'> | undefined;
|
|
11
10
|
render: boolean;
|
|
12
11
|
};
|
|
@@ -19,6 +18,5 @@ export type AppPdfProps = typeof __propDef.props;
|
|
|
19
18
|
export type AppPdfEvents = typeof __propDef.events;
|
|
20
19
|
export type AppPdfSlots = typeof __propDef.slots;
|
|
21
20
|
export default class AppPdf extends SvelteComponentTyped<AppPdfProps, AppPdfEvents, AppPdfSlots> {
|
|
22
|
-
get staticOutputs(): string[];
|
|
23
21
|
}
|
|
24
22
|
export {};
|
|
@@ -4,14 +4,18 @@ import RunnableWrapper from '../helpers/RunnableWrapper.svelte';
|
|
|
4
4
|
import InputValue from '../helpers/InputValue.svelte';
|
|
5
5
|
import { concatCustomCss } from '../../utils';
|
|
6
6
|
import { getContext } from 'svelte';
|
|
7
|
+
import { initOutput } from '../../editor/appUtils';
|
|
7
8
|
export let id;
|
|
8
9
|
export let componentInput;
|
|
9
10
|
export let configuration;
|
|
10
11
|
export let initializing = undefined;
|
|
11
12
|
export let customCss = undefined;
|
|
12
13
|
export let render;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
15
|
+
initOutput($worldStore, id, {
|
|
16
|
+
result: undefined,
|
|
17
|
+
loading: false
|
|
18
|
+
});
|
|
15
19
|
ChartJS.register(Title, Tooltip, Legend, LineElement, LinearScale, PointElement, CategoryScale, ArcElement);
|
|
16
20
|
let result = undefined;
|
|
17
21
|
let theme = 'theme1';
|
|
@@ -43,7 +47,7 @@ $: css = concatCustomCss($app.css?.piechartcomponent, customCss);
|
|
|
43
47
|
<InputValue {id} input={configuration.theme} bind:value={theme} />
|
|
44
48
|
<InputValue {id} input={configuration.doughnutStyle} bind:value={doughnut} />
|
|
45
49
|
|
|
46
|
-
<RunnableWrapper {render}
|
|
50
|
+
<RunnableWrapper {render} autoRefresh {componentInput} {id} bind:initializing bind:result>
|
|
47
51
|
<div class="w-full h-full {css?.container?.class ?? ''}" style={css?.container?.style ?? ''}>
|
|
48
52
|
{#if result}
|
|
49
53
|
{#if doughnut}
|
|
@@ -9,7 +9,6 @@ declare const __propDef: {
|
|
|
9
9
|
initializing?: boolean | undefined;
|
|
10
10
|
customCss?: ComponentCustomCSS<'container'> | undefined;
|
|
11
11
|
render: boolean;
|
|
12
|
-
staticOutputs?: string[] | undefined;
|
|
13
12
|
};
|
|
14
13
|
events: {
|
|
15
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -20,6 +19,5 @@ export type AppPieChartProps = typeof __propDef.props;
|
|
|
20
19
|
export type AppPieChartEvents = typeof __propDef.events;
|
|
21
20
|
export type AppPieChartSlots = typeof __propDef.slots;
|
|
22
21
|
export default class AppPieChart extends SvelteComponentTyped<AppPieChartProps, AppPieChartEvents, AppPieChartSlots> {
|
|
23
|
-
get staticOutputs(): string[];
|
|
24
22
|
}
|
|
25
23
|
export {};
|
|
@@ -5,6 +5,7 @@ import Scatter from 'svelte-chartjs/Scatter.svelte';
|
|
|
5
5
|
import InputValue from '../helpers/InputValue.svelte';
|
|
6
6
|
import { concatCustomCss } from '../../utils';
|
|
7
7
|
import { getContext } from 'svelte';
|
|
8
|
+
import { initOutput } from '../../editor/appUtils';
|
|
8
9
|
export let id;
|
|
9
10
|
export let componentInput;
|
|
10
11
|
export let configuration;
|
|
@@ -13,8 +14,11 @@ export let customCss = undefined;
|
|
|
13
14
|
export let render;
|
|
14
15
|
let zoomable = false;
|
|
15
16
|
let pannable = false;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
18
|
+
initOutput($worldStore, id, {
|
|
19
|
+
result: undefined,
|
|
20
|
+
loading: false
|
|
21
|
+
});
|
|
18
22
|
ChartJS.register(Title, Tooltip, Legend, LineElement, LinearScale, PointElement, CategoryScale, BarElement, zoomPlugin);
|
|
19
23
|
let result = undefined;
|
|
20
24
|
$: options = {
|
|
@@ -46,7 +50,7 @@ $: css = concatCustomCss($app.css?.scatterchartcomponent, customCss);
|
|
|
46
50
|
<InputValue {id} input={configuration.zoomable} bind:value={zoomable} />
|
|
47
51
|
<InputValue {id} input={configuration.pannable} bind:value={pannable} />
|
|
48
52
|
|
|
49
|
-
<RunnableWrapper {render}
|
|
53
|
+
<RunnableWrapper {render} autoRefresh {componentInput} {id} bind:initializing bind:result>
|
|
50
54
|
<div class="w-full h-full {css?.container?.class ?? ''}" style={css?.container?.style ?? ''}>
|
|
51
55
|
{#if result}
|
|
52
56
|
<Scatter {data} {options} />
|
|
@@ -9,7 +9,6 @@ declare const __propDef: {
|
|
|
9
9
|
initializing?: boolean | undefined;
|
|
10
10
|
customCss?: ComponentCustomCSS<'container'> | undefined;
|
|
11
11
|
render: boolean;
|
|
12
|
-
staticOutputs?: string[] | undefined;
|
|
13
12
|
};
|
|
14
13
|
events: {
|
|
15
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -20,6 +19,5 @@ export type AppScatterChartProps = typeof __propDef.props;
|
|
|
20
19
|
export type AppScatterChartEvents = typeof __propDef.events;
|
|
21
20
|
export type AppScatterChartSlots = typeof __propDef.slots;
|
|
22
21
|
export default class AppScatterChart extends SvelteComponentTyped<AppScatterChartProps, AppScatterChartEvents, AppScatterChartSlots> {
|
|
23
|
-
get staticOutputs(): string[];
|
|
24
22
|
}
|
|
25
23
|
export {};
|