windmill-components 1.501.14 → 1.501.15

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.
Files changed (46) hide show
  1. package/package/components/AppWrapper.svelte +0 -0
  2. package/package/components/AppWrapper.svelte.d.ts +26 -0
  3. package/package/components/EditorBar.svelte +1 -1
  4. package/package/components/FlowBuilder.svelte +2 -2
  5. package/package/components/FlowBuilder.svelte.d.ts +4 -60
  6. package/package/components/FlowWrapper.svelte +6 -0
  7. package/package/components/FlowWrapper.svelte.d.ts +4 -0
  8. package/package/components/InstanceSetting.svelte +2 -2
  9. package/package/components/ModulePreviewResultViewer.svelte +11 -21
  10. package/package/components/ModulePreviewResultViewer.svelte.d.ts +1 -1
  11. package/package/components/ModuleTest.svelte +4 -1
  12. package/package/components/ObjectStoreConfigSettings.svelte +49 -3
  13. package/package/components/ObjectStoreConfigSettings.svelte.d.ts +4 -0
  14. package/package/components/ScriptBuilder.svelte +3 -3
  15. package/package/components/ScriptBuilder.svelte.d.ts +4 -56
  16. package/package/components/ScriptWrapper.svelte +10 -0
  17. package/package/components/ScriptWrapper.svelte.d.ts +4 -0
  18. package/package/components/apps/editor/AppEditor.svelte.d.ts +2 -27
  19. package/package/components/apps/editor/AppEditorHeader.svelte +2 -2
  20. package/package/components/apps/editor/AppEditorHeader.svelte.d.ts +2 -2
  21. package/package/components/apps/types.d.ts +24 -0
  22. package/package/components/common/confirmationModal/DeployOverrideConfirmationModal.svelte +1 -6
  23. package/package/components/common/confirmationModal/DeployOverrideConfirmationModal.svelte.d.ts +6 -20
  24. package/package/components/copilot/chat/AIChatDisplay.svelte +51 -50
  25. package/package/components/copilot/chat/ContextTextarea.svelte +20 -16
  26. package/package/components/diff_drawer.d.ts +26 -0
  27. package/package/components/diff_drawer.js +1 -0
  28. package/package/components/flow_builder.d.ts +52 -0
  29. package/package/components/flow_builder.js +1 -0
  30. package/package/components/flows/content/FlowModuleComponent.svelte +5 -2
  31. package/package/components/flows/map/FlowModuleSchemaItem.svelte +57 -58
  32. package/package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +1 -0
  33. package/package/components/flows/map/MapItem.svelte +1 -0
  34. package/package/components/flows/propPicker/OutputPickerInner.svelte +23 -14
  35. package/package/components/flows/propPicker/OutputPickerInner.svelte.d.ts +2 -1
  36. package/package/components/raw_apps/RawAppEditorHeader.svelte +2 -2
  37. package/package/components/schema/EditableSchemaSdkWrapper.svelte +6 -0
  38. package/package/components/schema/EditableSchemaSdkWrapper.svelte.d.ts +3 -0
  39. package/package/components/schema/editable_schema_wrapper.d.ts +0 -0
  40. package/package/components/schema/editable_schema_wrapper.js +1 -0
  41. package/package/components/script_builder.d.ts +49 -0
  42. package/package/components/script_builder.js +1 -0
  43. package/package/components/workspaceSettings/StorageSettings.svelte +7 -3
  44. package/package/workspace_settings.d.ts +1 -1
  45. package/package/workspace_settings.js +13 -0
  46. package/package.json +25 -25
File without changes
@@ -0,0 +1,26 @@
1
+ export default AppWrapper;
2
+ type AppWrapper = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const AppWrapper: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
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> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -641,7 +641,7 @@ JsonNode ${windmillPathToCamelCaseName(path)} = JsonNode.Parse(await client.GetS
641
641
  {/if}
642
642
 
643
643
  {#if customUi?.assistants != false}
644
- {#if lang == 'deno' || lang == 'python3' || lang == 'go' || lang == 'bash' || lang == 'nu'}
644
+ {#if lang == 'deno' || lang == 'python3' || lang == 'go' || lang == 'bash'}
645
645
  <Button
646
646
  aiId="editor-bar-reload-assistants"
647
647
  aiDescription="Reload assistants"
@@ -677,8 +677,8 @@ export function setLoadedFromHistory(loadedFromHistoryUrl) {
677
677
  {@render children?.()}
678
678
 
679
679
  <DeployOverrideConfirmationModal
680
- bind:deployedBy
681
- bind:confirmCallback
680
+ {deployedBy}
681
+ {confirmCallback}
682
682
  bind:open
683
683
  {diffDrawer}
684
684
  bind:deployedValue
@@ -1,66 +1,10 @@
1
- import { type Flow, type OpenFlow } from '../gen';
2
- import { type StateStore } from '../utils';
3
- import { type Writable } from 'svelte/store';
4
- import type { FlowState } from './flows/flowState';
5
- import type DiffDrawer from './DiffDrawer.svelte';
6
- import type { FlowBuilderWhitelabelCustomUi } from './custom_ui';
1
+ import { type Flow } from '../gen';
7
2
  import { type ScheduleTrigger } from './triggers';
8
3
  import type { SavedAndModifiedValue } from './common/confirmationModal/unsavedTypes';
9
- import type { FlowWithDraftAndDraftTriggers, Trigger } from './triggers/utils';
4
+ import type { Trigger } from './triggers/utils';
10
5
  import { type stepState } from './stepHistoryLoader.svelte';
11
- interface Props {
12
- initialPath?: string;
13
- pathStoreInit?: string | undefined;
14
- newFlow: boolean;
15
- selectedId: string | undefined;
16
- initialArgs?: Record<string, any>;
17
- loading?: boolean;
18
- flowStore: StateStore<OpenFlow>;
19
- flowStateStore: Writable<FlowState>;
20
- savedFlow?: FlowWithDraftAndDraftTriggers | undefined;
21
- diffDrawer?: DiffDrawer | undefined;
22
- customUi?: FlowBuilderWhitelabelCustomUi;
23
- disableAi?: boolean;
24
- disabledFlowInputs?: boolean;
25
- savedPrimarySchedule?: ScheduleTrigger | undefined;
26
- version?: number | undefined;
27
- setSavedraftCb?: ((cb: () => void) => void) | undefined;
28
- draftTriggersFromUrl?: Trigger[] | undefined;
29
- selectedTriggerIndexFromUrl?: number | undefined;
30
- children?: import('svelte').Snippet;
31
- loadedFromHistoryFromUrl?: {
32
- flowJobInitial: boolean | undefined;
33
- stepsState: Record<string, stepState>;
34
- };
35
- noInitial?: boolean;
36
- onSaveInitial?: ({ path, id }: {
37
- path: string;
38
- id: string;
39
- }) => void;
40
- onSaveDraft?: ({ path, savedAtNewPath, newFlow }: {
41
- path: string;
42
- savedAtNewPath: boolean;
43
- newFlow: boolean;
44
- }) => void;
45
- onSaveDraftError?: ({ error }: {
46
- error: any;
47
- }) => void;
48
- onSaveDraftOnlyAtNewPath?: ({ path, selectedId }: {
49
- path: string;
50
- selectedId: string;
51
- }) => void;
52
- onDeploy?: ({ path }: {
53
- path: string;
54
- }) => void;
55
- onDeployError?: ({ error }: {
56
- error: any;
57
- }) => void;
58
- onDetails?: ({ path }: {
59
- path: string;
60
- }) => void;
61
- onHistoryRestore?: () => void;
62
- }
63
- declare const FlowBuilder: import("svelte").Component<Props, {
6
+ import type { FlowBuilderProps } from './flow_builder';
7
+ declare const FlowBuilder: import("svelte").Component<FlowBuilderProps, {
64
8
  getInitialAndModifiedValues: () => SavedAndModifiedValue;
65
9
  setPrimarySchedule: (schedule: ScheduleTrigger | undefined | false) => void;
66
10
  setDraftTriggers: (triggers: Trigger[] | undefined) => void;
@@ -0,0 +1,6 @@
1
+ <script lang="ts">import FlowBuilder from './FlowBuilder.svelte';
2
+ let { flowStore: oldFlowStore, ...props } = $props();
3
+ let flowStore = $state(oldFlowStore);
4
+ </script>
5
+
6
+ <FlowBuilder {flowStore} {...props} />
@@ -0,0 +1,4 @@
1
+ import type { FlowBuilderProps } from './flow_builder';
2
+ declare const FlowWrapper: import("svelte").Component<FlowBuilderProps, {}, "">;
3
+ type FlowWrapper = ReturnType<typeof FlowWrapper>;
4
+ export default FlowWrapper;
@@ -601,7 +601,7 @@ function handleChannelChange(channel, i) {
601
601
  <Button
602
602
  variant="border"
603
603
  color="light"
604
- size="md"
604
+ size="xs"
605
605
  btnClasses="mt-1"
606
606
  on:click={() => {
607
607
  if ($values[setting.key] == undefined || !Array.isArray($values[setting.key])) {
@@ -620,7 +620,7 @@ function handleChannelChange(channel, i) {
620
620
  disabled={!$enterpriseLicense}
621
621
  variant="border"
622
622
  color="light"
623
- size="md"
623
+ size="xs"
624
624
  on:click={async () => {
625
625
  try {
626
626
  await SettingService.testCriticalChannels({
@@ -5,22 +5,13 @@ import OutputPickerInner from './flows/propPicker/OutputPickerInner.svelte';
5
5
  import { Pane, Splitpanes } from 'svelte-splitpanes';
6
6
  import { getContext } from 'svelte';
7
7
  import { getStringError } from './copilot/chat/utils';
8
- let { lang, editor, diffEditor, loopStatus = undefined, lastJob = undefined, scriptProgress = $bindable(undefined), testJob = undefined, mod, testIsLoading = false, disableMock = false, disableHistory = false, onUpdateMock, loadingHistory = false } = $props();
8
+ let { lang, editor, diffEditor, loopStatus = undefined, lastJob = undefined, scriptProgress = $bindable(undefined), testJob = undefined, mod, testIsLoading = false, disableMock = false, disableHistory = false, onUpdateMock, loadingJob = false } = $props();
9
9
  const { testSteps } = getContext('FlowEditorContext');
10
10
  let selectedJob = $state(undefined);
11
- let fetchingLastJob = false;
12
11
  let preview = $state(undefined);
13
12
  let jobProgressReset = $state(() => { });
14
- let nlastJob = $derived.by(() => {
15
- if (testJob && testJob.type === 'CompletedJob') {
16
- return { ...testJob, preview: true };
17
- }
18
- if (lastJob) {
19
- return { ...lastJob, preview: false };
20
- }
21
- return undefined;
22
- });
23
13
  let forceJson = $state(false);
14
+ const logJob = $derived(testJob ?? selectedJob);
24
15
  </script>
25
16
 
26
17
  <Splitpanes horizontal>
@@ -35,7 +26,8 @@ let forceJson = $state(false);
35
26
  {/if}
36
27
 
37
28
  <OutputPickerInner
38
- lastJob={nlastJob}
29
+ {lastJob}
30
+ {testJob}
39
31
  fullResult
40
32
  moduleId={mod.id}
41
33
  closeOnOutsideClick={true}
@@ -44,7 +36,7 @@ let forceJson = $state(false);
44
36
  mock={mod.mock}
45
37
  bind:forceJson
46
38
  bind:selectedJob
47
- isLoading={(testIsLoading && !scriptProgress) || fetchingLastJob || loadingHistory}
39
+ isLoading={testIsLoading || loadingJob}
48
40
  bind:preview
49
41
  path={`path` in mod.value ? mod.value.path : ''}
50
42
  {loopStatus}
@@ -70,14 +62,12 @@ let forceJson = $state(false);
70
62
  {:else}
71
63
  <LogViewer
72
64
  small
73
- jobId={selectedJob?.id}
74
- duration={selectedJob?.['duration_ms']}
75
- mem={selectedJob?.['mem_peak']}
76
- content={selectedJob?.logs}
77
- isLoading={(testIsLoading && selectedJob?.['running'] == false) ||
78
- fetchingLastJob ||
79
- loadingHistory}
80
- tag={selectedJob?.tag}
65
+ jobId={logJob?.id}
66
+ duration={logJob?.['duration_ms']}
67
+ mem={logJob?.['mem_peak']}
68
+ content={logJob?.logs}
69
+ isLoading={(testIsLoading && logJob?.['running'] == false) || loadingJob}
70
+ tag={logJob?.tag}
81
71
  />
82
72
  {/if}
83
73
  </Pane>
@@ -20,7 +20,7 @@ interface Props {
20
20
  enabled: boolean;
21
21
  return_value?: unknown;
22
22
  }) => void;
23
- loadingHistory?: boolean;
23
+ loadingJob?: boolean;
24
24
  }
25
25
  declare const ModulePreviewResultViewer: import("svelte").Component<Props, {}, "scriptProgress">;
26
26
  type ModulePreviewResultViewer = ReturnType<typeof ModulePreviewResultViewer>;
@@ -24,7 +24,10 @@ export async function runTest(args) {
24
24
  // Not defined if JobProgressBar not loaded
25
25
  if (jobProgressReset)
26
26
  jobProgressReset();
27
- testModulesState[mod.id].cancel = testJobLoader?.cancelJob;
27
+ testModulesState[mod.id].cancel = async () => {
28
+ await testJobLoader?.cancelJob();
29
+ testJob = undefined;
30
+ };
28
31
  const val = mod.value;
29
32
  // let jobId: string | undefined = undefined
30
33
  if (val.type == 'rawscript') {
@@ -5,6 +5,7 @@ import { SettingService } from '../gen';
5
5
  import { sendUserToast } from '../toast';
6
6
  import TestConnection from './TestConnection.svelte';
7
7
  import { enterpriseLicense } from '../stores';
8
+ import SimpleEditor from './SimpleEditor.svelte';
8
9
  export let bucket_config = undefined;
9
10
  $: bucket_config?.type == 'S3' &&
10
11
  bucket_config.allow_http == undefined &&
@@ -77,9 +78,9 @@ async function testConnection() {
77
78
  </div>
78
79
 
79
80
  <Tabs
80
- bind:selected={bucket_config.type}
81
+ selected={bucket_config?.type ?? 'S3'}
81
82
  on:selected={(e) => {
82
- if (e.detail === 'S3') {
83
+ if (e.detail === 'S3' && bucket_config?.type !== 'S3') {
83
84
  bucket_config = {
84
85
  type: 'S3',
85
86
  bucket: '',
@@ -88,7 +89,7 @@ async function testConnection() {
88
89
  secret_key: '',
89
90
  endpoint: ''
90
91
  }
91
- } else if (e.detail === 'Azure') {
92
+ } else if (e.detail === 'Azure' && bucket_config?.type !== 'Azure') {
92
93
  bucket_config = {
93
94
  type: 'Azure',
94
95
  accountName: '',
@@ -98,12 +99,26 @@ async function testConnection() {
98
99
  clientId: '',
99
100
  accessKey: ''
100
101
  }
102
+ } else if (e.detail === 'Gcs' && bucket_config?.type !== 'Gcs') {
103
+ bucket_config = {
104
+ type: 'Gcs',
105
+ bucket: '',
106
+ serviceAccountKey: {}
107
+ }
108
+ } else if (e.detail === 'AwsOidc' && bucket_config?.type !== 'AwsOidc') {
109
+ bucket_config = {
110
+ type: 'AwsOidc',
111
+ bucket: '',
112
+ region: '',
113
+ roleArn: ''
114
+ }
101
115
  }
102
116
  }}
103
117
  >
104
118
  <Tab size="sm" value="S3">S3</Tab>
105
119
  <Tab size="sm" value="Azure">Azure Blob</Tab>
106
120
  <Tab size="sm" value="AwsOidc">AWS OIDC</Tab>
121
+ <Tab size="sm" value="Gcs">Google Cloud Storage</Tab>
107
122
  </Tabs>
108
123
  <div class="flex flex-col gap-2 mt-2 p-2 border rounded-md">
109
124
  {#if bucket_config.type === 'S3'}
@@ -206,6 +221,37 @@ async function testConnection() {
206
221
  bind:value={bucket_config.roleArn}
207
222
  />
208
223
  </label>
224
+ {:else if bucket_config.type === 'Gcs'}
225
+ <label class="block pb-2">
226
+ <span class="text-primary font-semibold text-sm">Bucket</span>
227
+ <input type="text" placeholder="bucket-name" bind:value={bucket_config.bucket} />
228
+ </label>
229
+ <label class="block pb-2">
230
+ <span class="text-primary font-semibold text-sm">Service Account Key</span>
231
+ <span class="text-tertiary text-2xs">JSON content of the service account key file</span>
232
+ <SimpleEditor
233
+ lang="json"
234
+ bind:code={
235
+ () => {
236
+ if (bucket_config?.type === 'Gcs') {
237
+ return JSON.stringify(bucket_config.serviceAccountKey)
238
+ } else {
239
+ return '{}'
240
+ }
241
+ },
242
+ (v) => {
243
+ if (bucket_config?.type === 'Gcs') {
244
+ try {
245
+ bucket_config.serviceAccountKey = JSON.parse(v ?? '{}')
246
+ } catch (_) {
247
+ bucket_config.serviceAccountKey = {}
248
+ }
249
+ }
250
+ }
251
+ }
252
+ class="h-80"
253
+ />
254
+ </label>
209
255
  {:else}
210
256
  <div>Unknown bucket type {bucket_config['type']}</div>
211
257
  {/if}
@@ -34,6 +34,10 @@ declare const ObjectStoreConfigSettings: $$__sveltets_2_IsomorphicComponent<{
34
34
  bucket: string;
35
35
  region: string;
36
36
  roleArn: string;
37
+ } | {
38
+ type: "Gcs";
39
+ bucket: string;
40
+ serviceAccountKey: Record<string, string>;
37
41
  } | undefined;
38
42
  }, {
39
43
  [evt: string]: CustomEvent<any>;
@@ -40,7 +40,7 @@ import DeployButton from './DeployButton.svelte';
40
40
  import { deployTriggers, filterDraftTriggers, handleSelectTriggerFromKind } from './triggers/utils';
41
41
  import DraftTriggersConfirmationModal from './common/confirmationModal/DraftTriggersConfirmationModal.svelte';
42
42
  import { Triggers } from './triggers/triggers.svelte';
43
- let { script = $bindable(), fullyLoaded = true, initialPath = $bindable(''), template = $bindable('script'), initialArgs = {}, lockedLanguage = false, showMeta = false, neverShowMeta = false, diffDrawer = undefined, savedScript = $bindable(undefined), searchParams = new URLSearchParams(), disableHistoryChange = false, replaceStateFn = (url) => window.history.replaceState(null, '', url), customUi = {}, savedPrimarySchedule = undefined, functionExports = undefined, children, onDeploy, onDeployError, onSaveInitial, onSeeDetails, onSaveDraftError, onSaveDraft } = $props();
43
+ let { script, fullyLoaded = true, initialPath = $bindable(''), template = $bindable('script'), initialArgs = {}, lockedLanguage = false, showMeta = false, neverShowMeta = false, diffDrawer = undefined, savedScript = $bindable(undefined), searchParams = new URLSearchParams(), disableHistoryChange = false, replaceStateFn = (url) => window.history.replaceState(null, '', url), customUi = {}, savedPrimarySchedule = undefined, functionExports = undefined, children, onDeploy, onDeployError, onSaveInitial, onSeeDetails, onSaveDraftError, onSaveDraft } = $props();
44
44
  export function getInitialAndModifiedValues() {
45
45
  return {
46
46
  savedValue: savedScript,
@@ -720,8 +720,8 @@ $effect(() => {
720
720
  {@render children?.()}
721
721
 
722
722
  <DeployOverrideConfirmationModal
723
- bind:deployedBy
724
- bind:confirmCallback
723
+ {deployedBy}
724
+ {confirmCallback}
725
725
  bind:open
726
726
  {diffDrawer}
727
727
  bind:deployedValue
@@ -1,64 +1,12 @@
1
- import { type NewScript } from '../gen';
2
- import type DiffDrawer from './DiffDrawer.svelte';
3
- import type { ScriptBuilderWhitelabelCustomUi } from './custom_ui';
4
1
  import type { ScheduleTrigger } from './triggers';
5
2
  import type { SavedAndModifiedValue } from './common/confirmationModal/unsavedTypes';
6
- import type { ScriptBuilderFunctionExports } from './scriptBuilder';
7
- import { type NewScriptWithDraftAndDraftTriggers, type Trigger } from './triggers/utils';
8
- interface Props {
9
- script: NewScript & {
10
- draft_triggers?: Trigger[];
11
- };
12
- fullyLoaded?: boolean;
13
- initialPath?: string;
14
- template?: 'docker' | 'bunnative' | 'script';
15
- initialArgs?: Record<string, any>;
16
- lockedLanguage?: boolean;
17
- showMeta?: boolean;
18
- neverShowMeta?: boolean;
19
- diffDrawer?: DiffDrawer | undefined;
20
- savedScript?: NewScriptWithDraftAndDraftTriggers | undefined;
21
- searchParams?: URLSearchParams;
22
- disableHistoryChange?: boolean;
23
- replaceStateFn?: (url: string) => void;
24
- customUi?: ScriptBuilderWhitelabelCustomUi;
25
- savedPrimarySchedule?: ScheduleTrigger | undefined;
26
- functionExports?: ((exports: ScriptBuilderFunctionExports) => void) | undefined;
27
- children?: import('svelte').Snippet;
28
- onDeploy?: (e: {
29
- path: string;
30
- hash: string;
31
- }) => void;
32
- onDeployError?: (e: {
33
- path: string;
34
- error: any;
35
- }) => void;
36
- onSaveInitial?: (e: {
37
- path: string;
38
- hash: string;
39
- }) => void;
40
- onHistoryRestore?: () => void;
41
- onSaveDraftOnlyAtNewPath?: (e: {
42
- path: string;
43
- }) => void;
44
- onSaveDraft?: (e: {
45
- path: string;
46
- savedAtNewPath: boolean;
47
- script: NewScript;
48
- }) => void;
49
- onSeeDetails?: (e: {
50
- path: string;
51
- }) => void;
52
- onSaveDraftError?: (e: {
53
- path: string;
54
- error: any;
55
- }) => void;
56
- }
57
- declare const ScriptBuilder: import("svelte").Component<Props, {
3
+ import { type Trigger } from './triggers/utils';
4
+ import type { ScriptBuilderProps } from './script_builder';
5
+ declare const ScriptBuilder: import("svelte").Component<ScriptBuilderProps, {
58
6
  getInitialAndModifiedValues: () => SavedAndModifiedValue;
59
7
  setPrimarySchedule: (schedule: ScheduleTrigger | undefined | false) => void;
60
8
  setDraftTriggers: (triggers: Trigger[] | undefined) => void;
61
9
  setCode: (code: string) => void;
62
- }, "script" | "template" | "initialPath" | "savedScript">;
10
+ }, "template" | "initialPath" | "savedScript">;
63
11
  type ScriptBuilder = ReturnType<typeof ScriptBuilder>;
64
12
  export default ScriptBuilder;
@@ -0,0 +1,10 @@
1
+ <script lang="ts">import ScriptBuilder from './ScriptBuilder.svelte';
2
+ let { script: oldScript, ...props } = $props();
3
+ let script = $state(oldScript);
4
+ </script>
5
+
6
+
7
+ <ScriptBuilder
8
+ {script}
9
+ {...props}
10
+ />
@@ -0,0 +1,4 @@
1
+ import type { ScriptBuilderProps } from './script_builder';
2
+ declare const ScriptWrapper: import("svelte").Component<ScriptBuilderProps, {}, "">;
3
+ type ScriptWrapper = ReturnType<typeof ScriptWrapper>;
4
+ export default ScriptWrapper;
@@ -1,29 +1,4 @@
1
- import type { App } from '../types';
2
- import { type Policy } from '../../../gen';
3
- import type DiffDrawer from '../../DiffDrawer.svelte';
4
- interface Props {
5
- app: App;
6
- path: string;
7
- policy: Policy;
8
- summary: string;
9
- fromHub?: boolean;
10
- diffDrawer?: DiffDrawer | undefined;
11
- savedApp?: {
12
- value: App;
13
- draft?: any;
14
- path: string;
15
- summary: string;
16
- policy: any;
17
- draft_only?: boolean;
18
- custom_path?: string;
19
- } | undefined;
20
- version?: number | undefined;
21
- newApp?: boolean;
22
- newPath?: string | undefined;
23
- replaceStateFn?: (path: string) => void;
24
- gotoFn?: (path: string, opt?: Record<string, any> | undefined) => void;
25
- unsavedConfirmationModal?: import('svelte').Snippet<[any]>;
26
- }
1
+ import type { AppEditorProps } from '../types';
27
2
  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> {
28
3
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
29
4
  $$bindings?: Bindings;
@@ -37,7 +12,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
37
12
  };
38
13
  z_$$bindings?: Bindings;
39
14
  }
40
- declare const AppEditor: $$__sveltets_2_IsomorphicComponent<Props, {
15
+ declare const AppEditor: $$__sveltets_2_IsomorphicComponent<AppEditorProps, {
41
16
  restore: CustomEvent<any>;
42
17
  savedNewAppPath: CustomEvent<any>;
43
18
  } & {
@@ -803,8 +803,8 @@ $effect(() => {
803
803
  })}
804
804
  {/if}
805
805
  <DeployOverrideConfirmationModal
806
- bind:deployedBy
807
- bind:confirmCallback
806
+ {deployedBy}
807
+ {confirmCallback}
808
808
  bind:open
809
809
  {diffDrawer}
810
810
  bind:deployedValue
@@ -1,10 +1,10 @@
1
1
  import { type Policy } from '../../../gen';
2
2
  import type { App } from '../types';
3
- import type DiffDrawer from '../../DiffDrawer.svelte';
3
+ import type { DiffDrawerI } from '../../diff_drawer';
4
4
  interface Props {
5
5
  policy: Policy;
6
6
  fromHub?: boolean;
7
- diffDrawer?: DiffDrawer | undefined;
7
+ diffDrawer?: DiffDrawerI | undefined;
8
8
  savedApp?: {
9
9
  value: App;
10
10
  draft?: any;
@@ -94,6 +94,30 @@ export type AppTheme = {
94
94
  type: 'inlined';
95
95
  css: string;
96
96
  };
97
+ import type { DiffDrawerI } from "../diff_drawer";
98
+ export interface AppEditorProps {
99
+ app: App;
100
+ path: string;
101
+ policy: Policy;
102
+ summary: string;
103
+ fromHub?: boolean;
104
+ diffDrawer?: DiffDrawerI | undefined;
105
+ savedApp?: {
106
+ value: App;
107
+ draft?: any;
108
+ path: string;
109
+ summary: string;
110
+ policy: any;
111
+ draft_only?: boolean;
112
+ custom_path?: string;
113
+ } | undefined;
114
+ version?: number | undefined;
115
+ newApp?: boolean;
116
+ newPath?: string | undefined;
117
+ replaceStateFn?: (path: string) => void;
118
+ gotoFn?: (path: string, opt?: Record<string, any> | undefined) => void;
119
+ unsavedConfirmationModal?: import('svelte').Snippet<[any]>;
120
+ }
97
121
  export type App = {
98
122
  grid: GridItem[];
99
123
  darkMode?: boolean;
@@ -1,12 +1,7 @@
1
1
  <script lang="ts">import ConfirmationModal from './ConfirmationModal.svelte';
2
2
  import Button from '../button/Button.svelte';
3
3
  import {} from '../../../utils';
4
- export let deployedValue = undefined;
5
- export let currentValue = undefined;
6
- export let diffDrawer = undefined;
7
- export let confirmCallback;
8
- export let deployedBy = undefined;
9
- export let open = false;
4
+ let { deployedValue = $bindable(), currentValue = undefined, diffDrawer = undefined, confirmCallback, deployedBy = undefined, open = $bindable(false) } = $props();
10
5
  </script>
11
6
 
12
7
  <ConfirmationModal
@@ -1,27 +1,13 @@
1
- import type DiffDrawer from '../../DiffDrawer.svelte';
2
1
  import { type Value } from '../../../utils';
3
- 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> {
4
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
5
- $$bindings?: Bindings;
6
- } & Exports;
7
- (internal: unknown, props: Props & {
8
- $$events?: Events;
9
- $$slots?: Slots;
10
- }): Exports & {
11
- $set?: any;
12
- $on?: any;
13
- };
14
- z_$$bindings?: Bindings;
15
- }
16
- declare const DeployOverrideConfirmationModal: $$__sveltets_2_IsomorphicComponent<{
2
+ import type { DiffDrawerI } from '../../diff_drawer';
3
+ interface Props {
17
4
  deployedValue?: Value | undefined;
18
5
  currentValue?: Value | undefined;
19
- diffDrawer?: DiffDrawer | undefined;
6
+ diffDrawer?: DiffDrawerI | undefined;
20
7
  confirmCallback: () => void;
21
8
  deployedBy?: string | undefined;
22
9
  open?: boolean;
23
- }, {
24
- [evt: string]: CustomEvent<any>;
25
- }, {}, {}, string>;
26
- type DeployOverrideConfirmationModal = InstanceType<typeof DeployOverrideConfirmationModal>;
10
+ }
11
+ declare const DeployOverrideConfirmationModal: import("svelte").Component<Props, {}, "open" | "deployedValue">;
12
+ type DeployOverrideConfirmationModal = ReturnType<typeof DeployOverrideConfirmationModal>;
27
13
  export default DeployOverrideConfirmationModal;