windmill-components 1.362.2 → 1.362.4
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.
|
@@ -78,7 +78,6 @@ function hasExtraKeys() {
|
|
|
78
78
|
return Object.keys(args ?? {}).some((x) => !keys.includes(x));
|
|
79
79
|
}
|
|
80
80
|
function reorder() {
|
|
81
|
-
dispatch('change');
|
|
82
81
|
let lkeys = Object.keys(schema?.properties ?? {});
|
|
83
82
|
if (!deepEqual(schema?.order, lkeys) || !deepEqual(keys, lkeys)) {
|
|
84
83
|
if (schema?.order && Array.isArray(schema.order)) {
|
|
@@ -95,7 +94,11 @@ function reorder() {
|
|
|
95
94
|
});
|
|
96
95
|
schema.properties = n;
|
|
97
96
|
}
|
|
98
|
-
|
|
97
|
+
let nkeys = Object.keys(schema.properties ?? {});
|
|
98
|
+
if (!deepEqual(keys, nkeys)) {
|
|
99
|
+
keys = nkeys;
|
|
100
|
+
dispatch('change');
|
|
101
|
+
}
|
|
99
102
|
}
|
|
100
103
|
if (!noDelete && hasExtraKeys()) {
|
|
101
104
|
removeExtraKey();
|
|
@@ -1,6 +1,7 @@
|
|
|
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;
|
|
@@ -8,15 +9,16 @@ export let noPreview = false;
|
|
|
8
9
|
export let fullHeight = true;
|
|
9
10
|
export let lightweightMode = false;
|
|
10
11
|
let addProperty = undefined;
|
|
12
|
+
const dispatch = createEventDispatcher();
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
<div class={twMerge(fullHeight ? 'h-full' : 'h-80', 'border overflow-y-auto rounded-md')}>
|
|
14
16
|
<div class="p-4 border-b">
|
|
15
|
-
<AddProperty on:change bind:schema bind:this={addProperty} />
|
|
17
|
+
<AddProperty on:change={() => dispatch('change', schema)} bind:schema bind:this={addProperty} />
|
|
16
18
|
</div>
|
|
17
19
|
<EditableSchemaForm
|
|
18
20
|
bind:schema
|
|
19
|
-
on:change
|
|
21
|
+
on:change={() => dispatch('change', schema)}
|
|
20
22
|
isFlowInput
|
|
21
23
|
on:edit={(e) => {
|
|
22
24
|
addProperty?.openDrawer(e.detail)
|