windmill-components 1.352.8 → 1.352.9
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.
|
@@ -19,6 +19,7 @@ export let resource_type = undefined;
|
|
|
19
19
|
export let path = '';
|
|
20
20
|
export let newResource = false;
|
|
21
21
|
export let hidePath = false;
|
|
22
|
+
export let watchChanges = false;
|
|
22
23
|
let isValid = true;
|
|
23
24
|
let jsonError = '';
|
|
24
25
|
let can_write = true;
|
|
@@ -34,8 +35,9 @@ let linkedVars = [];
|
|
|
34
35
|
let resourceTypeInfo = undefined;
|
|
35
36
|
let editDescription = false;
|
|
36
37
|
let viewJsonSchema = false;
|
|
37
|
-
let rawCode = undefined;
|
|
38
38
|
const dispatch = createEventDispatcher();
|
|
39
|
+
$: watchChanges && dispatch('change', { path, args, description });
|
|
40
|
+
let rawCode = undefined;
|
|
39
41
|
async function initEdit() {
|
|
40
42
|
resourceToEdit = await ResourceService.getResource({ workspace: $workspaceStore, path });
|
|
41
43
|
description = resourceToEdit.description ?? '';
|
|
@@ -6,10 +6,12 @@ declare const __propDef: {
|
|
|
6
6
|
path?: string | undefined;
|
|
7
7
|
newResource?: boolean | undefined;
|
|
8
8
|
hidePath?: boolean | undefined;
|
|
9
|
+
watchChanges?: boolean | undefined;
|
|
9
10
|
editResource?: (() => Promise<void>) | undefined;
|
|
10
11
|
createResource?: (() => Promise<void>) | undefined;
|
|
11
12
|
};
|
|
12
13
|
events: {
|
|
14
|
+
change: CustomEvent<any>;
|
|
13
15
|
refresh: CustomEvent<any>;
|
|
14
16
|
} & {
|
|
15
17
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<script>import { twMerge } from 'tailwind-merge';
|
|
2
2
|
import EditableSchemaForm from '../EditableSchemaForm.svelte';
|
|
3
3
|
import AddProperty from './AddProperty.svelte';
|
|
4
|
+
import { createEventDispatcher } from 'svelte';
|
|
4
5
|
export let schema;
|
|
5
6
|
export let offset = 0;
|
|
6
7
|
export let uiOnly = false;
|
|
7
8
|
export let noPreview = false;
|
|
8
9
|
export let fullHeight = true;
|
|
9
10
|
export let lightweightMode = false;
|
|
11
|
+
export let watchChanges = false;
|
|
12
|
+
const dispatch = createEventDispatcher();
|
|
13
|
+
$: watchChanges && dispatch('change', { schema });
|
|
10
14
|
let addProperty = undefined;
|
|
11
15
|
</script>
|
|
12
16
|
|
|
@@ -8,8 +8,11 @@ declare const __propDef: {
|
|
|
8
8
|
noPreview?: boolean | undefined;
|
|
9
9
|
fullHeight?: boolean | undefined;
|
|
10
10
|
lightweightMode?: boolean | undefined;
|
|
11
|
+
watchChanges?: boolean | undefined;
|
|
11
12
|
};
|
|
12
13
|
events: {
|
|
14
|
+
change: CustomEvent<any>;
|
|
15
|
+
} & {
|
|
13
16
|
[evt: string]: CustomEvent<any>;
|
|
14
17
|
};
|
|
15
18
|
slots: {};
|