windmill-components 1.501.17 → 1.501.19
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/package/components/apps/editor/AppEditor.svelte +8 -8
- package/package/components/apps/editor/AppEditor.svelte.d.ts +0 -1
- package/package/components/apps/editor/AppEditorHeader.svelte +12 -13
- package/package/components/apps/editor/AppEditorHeader.svelte.d.ts +7 -6
- package/package/components/apps/types.d.ts +1 -0
- package/package.json +4 -4
|
@@ -34,7 +34,7 @@ import StylePanel from './settingsPanel/StylePanel.svelte';
|
|
|
34
34
|
import HideButton from './settingsPanel/HideButton.svelte';
|
|
35
35
|
import AppEditorBottomPanel from './AppEditorBottomPanel.svelte';
|
|
36
36
|
import panzoom from 'panzoom';
|
|
37
|
-
let { app, path, policy, summary, fromHub = false, diffDrawer = undefined, savedApp = $bindable(undefined), version = undefined, newApp = false, newPath = undefined, replaceStateFn = (path) => window.history.replaceState(null, '', path), gotoFn = (path, opt) => window.history.pushState(null, '', path), unsavedConfirmationModal } = $props();
|
|
37
|
+
let { app, path, policy, summary, fromHub = false, diffDrawer = undefined, savedApp = $bindable(undefined), version = undefined, newApp = false, newPath = undefined, replaceStateFn = (path) => window.history.replaceState(null, '', path), gotoFn = (path, opt) => window.history.pushState(null, '', path), unsavedConfirmationModal, onSavedNewAppPath } = $props();
|
|
38
38
|
migrateApp(app);
|
|
39
39
|
const stateApp = $state(app);
|
|
40
40
|
const appStore = writable(stateApp);
|
|
@@ -694,13 +694,13 @@ const unsavedConfirmationModal_render = $derived(unsavedConfirmationModal);
|
|
|
694
694
|
leftPanelHidden={leftPanelSize === 0}
|
|
695
695
|
rightPanelHidden={rightPanelSize === 0}
|
|
696
696
|
bottomPanelHidden={runnablePanelSize === 0}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
697
|
+
{onSavedNewAppPath}
|
|
698
|
+
onShowLeftPanel={() => showLeftPanel()}
|
|
699
|
+
onShowRightPanel={() => showRightPanel()}
|
|
700
|
+
onShowBottomPanel={() => showBottomPanel()}
|
|
701
|
+
onHideLeftPanel={() => hideLeftPanel()}
|
|
702
|
+
onHideRightPanel={() => hideRightPanel()}
|
|
703
|
+
onHideBottomPanel={() => hideBottomPanel()}
|
|
704
704
|
>
|
|
705
705
|
{#snippet unsavedConfirmationModal({
|
|
706
706
|
diffDrawer,
|
|
@@ -14,7 +14,6 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
14
14
|
}
|
|
15
15
|
declare const AppEditor: $$__sveltets_2_IsomorphicComponent<AppEditorProps, {
|
|
16
16
|
restore: CustomEvent<any>;
|
|
17
|
-
savedNewAppPath: CustomEvent<any>;
|
|
18
17
|
} & {
|
|
19
18
|
[evt: string]: CustomEvent<any>;
|
|
20
19
|
}, {}, {
|
|
@@ -8,7 +8,7 @@ import { AppService, DraftService } from '../../../gen';
|
|
|
8
8
|
import { redo, undo } from '../../../history';
|
|
9
9
|
import { enterpriseLicense, userStore, workspaceStore } from '../../../stores';
|
|
10
10
|
import { AlignHorizontalSpaceAround, BellOff, Bug, DiffIcon, Expand, FileJson, FileUp, FormInput, History, Laptop2, Loader2, Save, Smartphone, FileClock, Sun, Moon, SunMoon, Zap, Globe, AlertTriangle } from 'lucide-svelte';
|
|
11
|
-
import {
|
|
11
|
+
import { getContext, untrack } from 'svelte';
|
|
12
12
|
import { cleanValueProperties, orderedJsonStringify, replaceFalseWithUndefined } from '../../../utils';
|
|
13
13
|
import { BG_PREFIX, allItems, toStatic } from '../utils';
|
|
14
14
|
import AppExportButton from './AppExportButton.svelte';
|
|
@@ -60,7 +60,7 @@ async function hash(message) {
|
|
|
60
60
|
return hex;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
let { policy = $bindable(), fromHub = false, diffDrawer = undefined, savedApp = $bindable(undefined), version = $bindable(undefined), leftPanelHidden = false, rightPanelHidden = false, bottomPanelHidden = false, newApp, newPath = '', unsavedConfirmationModal } = $props();
|
|
63
|
+
let { policy = $bindable(), fromHub = false, diffDrawer = undefined, savedApp = $bindable(undefined), version = $bindable(undefined), leftPanelHidden = false, rightPanelHidden = false, bottomPanelHidden = false, newApp, newPath = '', unsavedConfirmationModal, onSavedNewAppPath, onShowLeftPanel, onShowRightPanel, onShowBottomPanel, onHideLeftPanel, onHideRightPanel, onHideBottomPanel } = $props();
|
|
64
64
|
let newEditedPath = $state('');
|
|
65
65
|
let deployedValue = $state(undefined); // Value to diff against
|
|
66
66
|
let deployedBy = $state(undefined); // Author
|
|
@@ -263,7 +263,7 @@ async function createApp(path) {
|
|
|
263
263
|
catch (e) {
|
|
264
264
|
console.error('error interacting with local storage', e);
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
onSavedNewAppPath?.(path);
|
|
267
267
|
}
|
|
268
268
|
catch (e) {
|
|
269
269
|
sendUserToast('Error creating app', e);
|
|
@@ -358,7 +358,7 @@ async function updateApp(npath) {
|
|
|
358
358
|
catch (e) {
|
|
359
359
|
console.error('error interacting with local storage', e);
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
onSavedNewAppPath?.(npath);
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
let secretUrl = $state(undefined);
|
|
@@ -432,7 +432,7 @@ async function saveInitialDraft() {
|
|
|
432
432
|
custom_path: customPath
|
|
433
433
|
};
|
|
434
434
|
draftDrawerOpen = false;
|
|
435
|
-
|
|
435
|
+
onSavedNewAppPath?.(newEditedPath);
|
|
436
436
|
}
|
|
437
437
|
catch (e) {
|
|
438
438
|
sendUserToast('Error saving initial draft', e);
|
|
@@ -528,7 +528,7 @@ async function saveDraft(forceSave = false) {
|
|
|
528
528
|
}
|
|
529
529
|
loading.saveDraft = false;
|
|
530
530
|
if (newApp || savedApp.draft_only) {
|
|
531
|
-
|
|
531
|
+
onSavedNewAppPath?.(newEditedPath || path);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
catch (e) {
|
|
@@ -716,7 +716,6 @@ let appReportingDrawerOpen = $state(false);
|
|
|
716
716
|
export function openTroubleshootPanel() {
|
|
717
717
|
debugAppDrawerOpen = true;
|
|
718
718
|
}
|
|
719
|
-
const dispatch = createEventDispatcher();
|
|
720
719
|
function setTheme(newDarkMode) {
|
|
721
720
|
let globalDarkMode = window.localStorage.getItem('dark-mode')
|
|
722
721
|
? window.localStorage.getItem('dark-mode') === 'dark'
|
|
@@ -1264,9 +1263,9 @@ $effect(() => {
|
|
|
1264
1263
|
hidden={leftPanelHidden}
|
|
1265
1264
|
on:click={() => {
|
|
1266
1265
|
if (leftPanelHidden) {
|
|
1267
|
-
|
|
1266
|
+
onShowLeftPanel?.()
|
|
1268
1267
|
} else {
|
|
1269
|
-
|
|
1268
|
+
onHideLeftPanel?.()
|
|
1270
1269
|
}
|
|
1271
1270
|
}}
|
|
1272
1271
|
/>
|
|
@@ -1275,9 +1274,9 @@ $effect(() => {
|
|
|
1275
1274
|
direction="bottom"
|
|
1276
1275
|
on:click={() => {
|
|
1277
1276
|
if (bottomPanelHidden) {
|
|
1278
|
-
|
|
1277
|
+
onShowBottomPanel?.()
|
|
1279
1278
|
} else {
|
|
1280
|
-
|
|
1279
|
+
onHideBottomPanel?.()
|
|
1281
1280
|
}
|
|
1282
1281
|
}}
|
|
1283
1282
|
/>
|
|
@@ -1286,9 +1285,9 @@ $effect(() => {
|
|
|
1286
1285
|
direction="right"
|
|
1287
1286
|
on:click={() => {
|
|
1288
1287
|
if (rightPanelHidden) {
|
|
1289
|
-
|
|
1288
|
+
onShowRightPanel?.()
|
|
1290
1289
|
} else {
|
|
1291
|
-
|
|
1290
|
+
onHideRightPanel?.()
|
|
1292
1291
|
}
|
|
1293
1292
|
}}
|
|
1294
1293
|
/>
|
|
@@ -21,6 +21,13 @@ interface Props {
|
|
|
21
21
|
newApp: boolean;
|
|
22
22
|
newPath?: string;
|
|
23
23
|
unsavedConfirmationModal?: import('svelte').Snippet<[any]>;
|
|
24
|
+
onSavedNewAppPath?: (path: string) => void;
|
|
25
|
+
onShowRightPanel?: () => void;
|
|
26
|
+
onShowLeftPanel?: () => void;
|
|
27
|
+
onShowBottomPanel?: () => void;
|
|
28
|
+
onHideRightPanel?: () => void;
|
|
29
|
+
onHideLeftPanel?: () => void;
|
|
30
|
+
onHideBottomPanel?: () => void;
|
|
24
31
|
}
|
|
25
32
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
26
33
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
@@ -37,12 +44,6 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
37
44
|
}
|
|
38
45
|
declare const AppEditorHeader: $$__sveltets_2_IsomorphicComponent<Props, {
|
|
39
46
|
restore: CustomEvent<any>;
|
|
40
|
-
showLeftPanel: CustomEvent<any>;
|
|
41
|
-
hideLeftPanel: CustomEvent<any>;
|
|
42
|
-
showBottomPanel: CustomEvent<any>;
|
|
43
|
-
hideBottomPanel: CustomEvent<any>;
|
|
44
|
-
showRightPanel: CustomEvent<any>;
|
|
45
|
-
hideRightPanel: CustomEvent<any>;
|
|
46
47
|
} & {
|
|
47
48
|
[evt: string]: CustomEvent<any>;
|
|
48
49
|
}, {}, {
|
|
@@ -117,6 +117,7 @@ export interface AppEditorProps {
|
|
|
117
117
|
replaceStateFn?: (path: string) => void;
|
|
118
118
|
gotoFn?: (path: string, opt?: Record<string, any> | undefined) => void;
|
|
119
119
|
unsavedConfirmationModal?: import('svelte').Snippet<[any]>;
|
|
120
|
+
onSavedNewAppPath?: (path: string) => void;
|
|
120
121
|
}
|
|
121
122
|
export type App = {
|
|
122
123
|
grid: GridItem[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-components",
|
|
3
|
-
"version": "1.501.
|
|
3
|
+
"version": "1.501.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build",
|
|
@@ -268,9 +268,9 @@
|
|
|
268
268
|
"default": "./package/components/FlowWrapper.svelte"
|
|
269
269
|
},
|
|
270
270
|
"./components/AppWrapper.svelte": {
|
|
271
|
-
"types": "./package/components/
|
|
272
|
-
"svelte": "./package/components/
|
|
273
|
-
"default": "./package/components/
|
|
271
|
+
"types": "./package/components/AppWrapper.svelte.d.ts",
|
|
272
|
+
"svelte": "./package/components/AppWrapper.svelte",
|
|
273
|
+
"default": "./package/components/AppWrapper.svelte"
|
|
274
274
|
},
|
|
275
275
|
"./components/ScriptWrapper.svelte": {
|
|
276
276
|
"types": "./package/components/ScriptWrapper.svelte.d.ts",
|