windmill-components 1.501.19 → 1.501.21
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.
|
@@ -42,7 +42,7 @@ let initialPathStore = writable(initialPath);
|
|
|
42
42
|
let fakeInitialPath = 'u/' +
|
|
43
43
|
($userStore?.username?.includes('@')
|
|
44
44
|
? $userStore.username.split('@')[0].replace(/[^a-zA-Z0-9_]/g, '')
|
|
45
|
-
: $userStore
|
|
45
|
+
: $userStore?.username) +
|
|
46
46
|
'/' +
|
|
47
47
|
generateRandomString(12);
|
|
48
48
|
// Used by multiplayer deploy collision warning
|
|
@@ -16,9 +16,8 @@ import Markdown from 'svelte-exmarkdown';
|
|
|
16
16
|
import autosize from '../autosize';
|
|
17
17
|
import GfmMarkdown from './GfmMarkdown.svelte';
|
|
18
18
|
import TestTriggerConnection from './triggers/TestTriggerConnection.svelte';
|
|
19
|
-
import { createDispatcherIfMounted } from '../createDispatcherIfMounted';
|
|
20
19
|
import GitHubAppIntegration from './GitHubAppIntegration.svelte';
|
|
21
|
-
let { canSave = $bindable(true), resource_type = $bindable(undefined), path = $bindable(''), newResource = false, hidePath = false,
|
|
20
|
+
let { canSave = $bindable(true), resource_type = $bindable(undefined), path = $bindable(''), newResource = false, hidePath = false, onChange, defaultValues = undefined } = $props();
|
|
22
21
|
let isValid = $state(true);
|
|
23
22
|
let jsonError = $state('');
|
|
24
23
|
let can_write = $state(true);
|
|
@@ -34,7 +33,6 @@ let resourceTypeInfo = $state(undefined);
|
|
|
34
33
|
let editDescription = $state(false);
|
|
35
34
|
let viewJsonSchema = $state(false);
|
|
36
35
|
const dispatch = createEventDispatcher();
|
|
37
|
-
const dispatchIfMounted = createDispatcherIfMounted(dispatch);
|
|
38
36
|
let rawCode = $state(undefined);
|
|
39
37
|
async function initEdit() {
|
|
40
38
|
resourceToEdit = await ResourceService.getResource({ workspace: $workspaceStore, path });
|
|
@@ -148,8 +146,8 @@ run(() => {
|
|
|
148
146
|
run(() => {
|
|
149
147
|
canSave = can_write && isValid && jsonError == '';
|
|
150
148
|
});
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
$effect(() => {
|
|
150
|
+
onChange && onChange({ path, args, description });
|
|
153
151
|
});
|
|
154
152
|
run(() => {
|
|
155
153
|
rawCode && untrack(() => parseJson());
|
|
@@ -4,7 +4,11 @@ interface Props {
|
|
|
4
4
|
path?: string;
|
|
5
5
|
newResource?: boolean;
|
|
6
6
|
hidePath?: boolean;
|
|
7
|
-
|
|
7
|
+
onChange?: (args: {
|
|
8
|
+
path: string;
|
|
9
|
+
args: Record<string, any>;
|
|
10
|
+
description: string;
|
|
11
|
+
}) => void;
|
|
8
12
|
defaultValues?: Record<string, any> | undefined;
|
|
9
13
|
}
|
|
10
14
|
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> {
|