windmill-components 1.35.1 → 1.35.43
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/components/ArgInput.svelte +21 -21
- package/components/ArgInput.svelte.d.ts +3 -3
- package/components/DisplayResult.svelte +73 -67
- package/components/Editor.svelte +184 -246
- package/components/Editor.svelte.d.ts +4 -4
- package/components/EditorBar.svelte +58 -45
- package/components/EditorBar.svelte.d.ts +2 -1
- package/components/FlowBuilder.svelte +113 -121
- package/components/FlowJobResult.svelte +4 -5
- package/components/FlowModulesViewer.svelte +89 -7
- package/components/FlowModulesViewer.svelte.d.ts +1 -0
- package/components/FlowPreviewContent.svelte +56 -15
- package/components/FlowPreviewContent.svelte.d.ts +1 -1
- package/components/FlowStatusViewer.svelte +42 -24
- package/components/FlowStatusViewer.svelte.d.ts +0 -1
- package/components/FlowViewer.svelte +7 -3
- package/components/HighlightCode.svelte +21 -0
- package/components/HighlightCode.svelte.d.ts +17 -0
- package/components/IconedPath.svelte +9 -7
- package/components/IconedResourceType.svelte +1 -1
- package/components/InputTransformForm.svelte +88 -107
- package/components/InputTransformForm.svelte.d.ts +0 -1
- package/components/ItemPicker.svelte +2 -2
- package/components/LogViewer.svelte +23 -0
- package/components/LogViewer.svelte.d.ts +19 -0
- package/components/ModulePreview.svelte +108 -0
- package/components/ModulePreview.svelte.d.ts +24 -0
- package/components/RunForm.svelte +29 -18
- package/components/RunForm.svelte.d.ts +6 -2
- package/components/SchemaEditor.svelte +5 -3
- package/components/SchemaForm.svelte +0 -2
- package/components/SchemaForm.svelte.d.ts +0 -1
- package/components/ScriptBuilder.svelte +77 -66
- package/components/ScriptBuilder.svelte.d.ts +2 -4
- package/components/ScriptEditor.svelte +69 -142
- package/components/ScriptEditor.svelte.d.ts +0 -5
- package/components/ScriptPicker.svelte +3 -3
- package/components/ScriptPicker.svelte.d.ts +2 -1
- package/components/SharedBadge.svelte +5 -13
- package/components/SimpleEditor.svelte +147 -0
- package/components/SimpleEditor.svelte.d.ts +35 -0
- package/components/TestJobLoader.svelte +98 -0
- package/components/TestJobLoader.svelte.d.ts +26 -0
- package/components/Tooltip.svelte +2 -1
- package/components/common/actionRow/ActionRow.svelte +26 -0
- package/components/common/actionRow/ActionRow.svelte.d.ts +21 -0
- package/components/common/alert/Alert.svelte +53 -0
- package/components/common/alert/Alert.svelte.d.ts +20 -0
- package/components/common/alert/model.d.ts +1 -0
- package/components/common/alert/model.js +1 -0
- package/components/common/badge/Badge.svelte +82 -0
- package/components/common/badge/Badge.svelte.d.ts +28 -0
- package/components/common/badge/model.d.ts +8 -0
- package/components/common/badge/model.js +1 -0
- package/components/common/button/Button.svelte +107 -0
- package/components/common/button/Button.svelte.d.ts +37 -0
- package/components/common/button/model.d.ts +6 -0
- package/components/common/button/model.js +1 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte +55 -0
- package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +23 -0
- package/components/common/drawer/Drawer.svelte +3 -0
- package/components/common/drawer/Drawer.svelte.d.ts +2 -0
- package/components/common/index.d.ts +14 -0
- package/components/common/index.js +14 -0
- package/components/common/tabs/TabContent.svelte +3 -2
- package/components/common/tabs/TabContent.svelte.d.ts +1 -0
- package/components/common/tabs/Tabs.svelte +8 -1
- package/components/common/tabs/Tabs.svelte.d.ts +2 -0
- package/components/common/toggleButton/ToggleButton.svelte +20 -0
- package/components/common/toggleButton/ToggleButton.svelte.d.ts +19 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte +33 -0
- package/components/common/toggleButton/ToggleButtonGroup.svelte.d.ts +24 -0
- package/components/flows/FlowEditor.svelte +30 -0
- package/components/{FlowEditor.svelte.d.ts → flows/FlowEditor.svelte.d.ts} +1 -8
- package/components/flows/common/FlowCard.svelte +9 -0
- package/components/flows/common/FlowCard.svelte.d.ts +21 -0
- package/components/flows/common/FlowCardHeader.svelte +39 -0
- package/components/flows/common/FlowCardHeader.svelte.d.ts +20 -0
- package/components/flows/content/CopyFirstStepSchema.svelte +13 -0
- package/components/flows/{CopyFirstStepSchema.svelte.d.ts → content/CopyFirstStepSchema.svelte.d.ts} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte → content/DynamicInputHelpBox.svelte} +0 -0
- package/components/flows/{DynamicInputHelpBox.svelte.d.ts → content/DynamicInputHelpBox.svelte.d.ts} +0 -0
- package/components/flows/content/FlowEditorPanel.svelte +26 -0
- package/components/flows/content/FlowEditorPanel.svelte.d.ts +14 -0
- package/components/flows/content/FlowFailureModule.svelte +17 -0
- package/components/flows/content/FlowFailureModule.svelte.d.ts +14 -0
- package/components/flows/content/FlowInput.svelte +22 -0
- package/components/flows/{FlowInput.svelte.d.ts → content/FlowInput.svelte.d.ts} +0 -0
- package/components/flows/{FlowInputs.svelte → content/FlowInputs.svelte} +24 -13
- package/components/flows/{FlowInputs.svelte.d.ts → content/FlowInputs.svelte.d.ts} +0 -0
- package/components/flows/content/FlowLoop.svelte +38 -0
- package/components/flows/content/FlowLoop.svelte.d.ts +14 -0
- package/components/flows/content/FlowModule.svelte +190 -0
- package/components/flows/content/FlowModule.svelte.d.ts +29 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte +64 -0
- package/components/flows/content/FlowModuleAdvancedSettings.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleHeader.svelte +68 -0
- package/components/flows/{FlowModuleHeader.svelte.d.ts → content/FlowModuleHeader.svelte.d.ts} +2 -3
- package/components/flows/content/FlowModuleScript.svelte +21 -0
- package/components/flows/content/FlowModuleScript.svelte.d.ts +17 -0
- package/components/flows/content/FlowModuleWrapper.svelte +47 -0
- package/components/flows/content/FlowModuleWrapper.svelte.d.ts +14 -0
- package/components/flows/content/FlowRetries.svelte +80 -0
- package/components/flows/content/FlowRetries.svelte.d.ts +14 -0
- package/components/flows/content/FlowSchedules.svelte +18 -0
- package/components/flows/content/FlowSchedules.svelte.d.ts +14 -0
- package/components/flows/content/FlowSettings.svelte +51 -0
- package/components/flows/{FlowSettings.svelte.d.ts → content/FlowSettings.svelte.d.ts} +1 -6
- package/components/flows/content/RemoveStepConfirmationModal.svelte +32 -0
- package/components/flows/content/RemoveStepConfirmationModal.svelte.d.ts +19 -0
- package/components/flows/flowState.d.ts +8 -7
- package/components/flows/flowState.js +25 -46
- package/components/flows/flowStateUtils.d.ts +15 -13
- package/components/flows/flowStateUtils.js +80 -72
- package/components/flows/flowStore.js +7 -4
- package/components/flows/header/FlowEditorHeader.svelte +23 -0
- package/components/flows/header/FlowEditorHeader.svelte.d.ts +14 -0
- package/components/flows/header/FlowImportExportMenu.svelte +56 -0
- package/components/flows/header/FlowImportExportMenu.svelte.d.ts +14 -0
- package/components/flows/header/FlowPreviewButtons.svelte +49 -0
- package/components/flows/header/FlowPreviewButtons.svelte.d.ts +14 -0
- package/components/flows/header/FlowStatus.svelte +36 -0
- package/components/flows/header/FlowStatus.svelte.d.ts +14 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte +54 -0
- package/components/flows/map/FlowErrorHandlerItem.svelte.d.ts +14 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte +58 -0
- package/components/flows/map/FlowModuleSchemaItem.svelte.d.ts +27 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte +161 -0
- package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +20 -0
- package/components/flows/pickers/PickHubScript.svelte +4 -3
- package/components/flows/pickers/PickHubScript.svelte.d.ts +2 -1
- package/components/flows/pickers/PickScript.svelte +4 -12
- package/components/flows/pickers/PickScript.svelte.d.ts +1 -1
- package/components/flows/propPicker/PropPickerWrapper.svelte +42 -0
- package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +31 -0
- package/components/flows/scheduleUtils.d.ts +0 -1
- package/components/flows/scheduleUtils.js +0 -1
- package/components/flows/types.d.ts +9 -0
- package/components/flows/types.js +1 -0
- package/components/flows/utils.d.ts +1 -1
- package/components/flows/utils.js +8 -11
- package/components/icons/HatIcon.svelte +19 -0
- package/components/icons/HatIcon.svelte.d.ts +16 -0
- package/components/landing/FlowGettingStarted.svelte +22 -68
- package/components/landing/FlowLandingBox.svelte +1 -1
- package/components/landing/RessourceGettingStarted.svelte +7 -37
- package/components/landing/ScriptBox.svelte +33 -60
- package/components/landing/ScriptGettingStarted.svelte +23 -69
- package/components/propertyPicker/ObjectViewer.svelte +16 -7
- package/components/propertyPicker/PropPicker.svelte +38 -12
- package/components/propertyPicker/WarningMessage.svelte +2 -15
- package/components/script_editor/LogPanel.svelte +108 -119
- package/components/script_editor/LogPanel.svelte.d.ts +2 -0
- package/components/sidebar/SidebarContent.svelte +2 -2
- package/editorUtils.d.ts +25 -0
- package/editorUtils.js +43 -0
- package/gen/models/CompletedJob.d.ts +2 -1
- package/gen/models/CompletedJob.js +1 -0
- package/gen/models/FlowModule.d.ts +1 -0
- package/gen/models/FlowStatus.d.ts +3 -0
- package/gen/models/FlowStatusModule.d.ts +1 -1
- package/gen/models/FlowValue.d.ts +11 -0
- package/gen/models/Preview.d.ts +2 -1
- package/gen/models/Preview.js +1 -0
- package/gen/models/QueuedJob.d.ts +2 -1
- package/gen/models/QueuedJob.js +1 -0
- package/gen/models/RawScript.d.ts +2 -1
- package/gen/models/RawScript.js +1 -0
- package/gen/models/Script.d.ts +9 -2
- package/gen/models/Script.js +8 -0
- package/gen/services/JobService.d.ts +40 -0
- package/gen/services/JobService.js +70 -0
- package/gen/services/ScriptService.d.ts +14 -3
- package/gen/services/ScriptService.js +13 -0
- package/infer.d.ts +1 -1
- package/infer.js +6 -1
- package/package.json +67 -35
- package/script_helpers.d.ts +5 -2
- package/script_helpers.js +41 -13
- package/stores.d.ts +1 -1
- package/utils.d.ts +6 -4
- package/utils.js +27 -4
- package/components/FlowEditor.svelte +0 -55
- package/components/FlowPreview.svelte +0 -107
- package/components/FlowPreview.svelte.d.ts +0 -23
- package/components/ModuleStep.svelte +0 -131
- package/components/ModuleStep.svelte.d.ts +0 -25
- package/components/flows/CopyFirstStepSchema.svelte +0 -13
- package/components/flows/FlowBox.svelte +0 -16
- package/components/flows/FlowBox.svelte.d.ts +0 -23
- package/components/flows/FlowBoxHeader.svelte +0 -16
- package/components/flows/FlowBoxHeader.svelte.d.ts +0 -21
- package/components/flows/FlowInput.svelte +0 -22
- package/components/flows/FlowModuleHeader.svelte +0 -109
- package/components/flows/FlowSettings.svelte +0 -165
- package/components/flows/FlowTimeline.svelte +0 -169
- package/components/flows/FlowTimeline.svelte.d.ts +0 -21
- package/components/flows/stepOpenedStore.d.ts +0 -1
- package/components/flows/stepOpenedStore.js +0 -6
- package/components/propertyPicker/OverlayPropertyPicker.svelte +0 -69
- package/components/propertyPicker/OverlayPropertyPicker.svelte.d.ts +0 -24
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
<script>import { faInfoCircle, faPen, faPlus, faSliders, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { Button, Toggle, Tooltip } from 'flowbite-svelte';
|
|
3
|
-
import Icon from 'svelte-awesome';
|
|
4
|
-
import ModuleStep from '../ModuleStep.svelte';
|
|
5
|
-
import FlowInput from './FlowInput.svelte';
|
|
6
|
-
import { emptyFlowModuleSchema } from './flowStateUtils';
|
|
7
|
-
import { stepOpened } from './stepOpenedStore';
|
|
8
|
-
export let args = {};
|
|
9
|
-
export let flowModuleSchemas;
|
|
10
|
-
export let parentIndex = undefined;
|
|
11
|
-
const root = parentIndex === undefined;
|
|
12
|
-
function insertAtIndex(index) {
|
|
13
|
-
flowModuleSchemas.splice(index, 0, emptyFlowModuleSchema());
|
|
14
|
-
flowModuleSchemas = flowModuleSchemas;
|
|
15
|
-
const indexes = getIndexes(parentIndex, index);
|
|
16
|
-
stepOpened.update(() => String(indexes.join('-')));
|
|
17
|
-
}
|
|
18
|
-
function removeAtIndex(index) {
|
|
19
|
-
flowModuleSchemas.splice(index, 1);
|
|
20
|
-
flowModuleSchemas = flowModuleSchemas;
|
|
21
|
-
}
|
|
22
|
-
function getIndexes(parentIndex, childIndex) {
|
|
23
|
-
const indexes = [];
|
|
24
|
-
if (parentIndex !== undefined) {
|
|
25
|
-
indexes.push(parentIndex);
|
|
26
|
-
}
|
|
27
|
-
indexes.push(childIndex);
|
|
28
|
-
return indexes;
|
|
29
|
-
}
|
|
30
|
-
const color = root ? 'blue' : 'orange';
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<div class="w-full">
|
|
34
|
-
<ol class="relative ml-4 border-l border-gray-200 dark:border-gray-700 space-y-12 border-dashed">
|
|
35
|
-
{#if root}
|
|
36
|
-
<li class="ml-8">
|
|
37
|
-
<span class="relative">
|
|
38
|
-
<span
|
|
39
|
-
class={`flex absolute -left-12 justify-center items-center w-8 h-8 bg-${color}-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900`}
|
|
40
|
-
>
|
|
41
|
-
<Icon
|
|
42
|
-
class={`text-${color}-600 dark:text-${color}-400 text-font-bold text-center`}
|
|
43
|
-
data={faSliders}
|
|
44
|
-
/>
|
|
45
|
-
</span>
|
|
46
|
-
</span>
|
|
47
|
-
<slot name="settings" />
|
|
48
|
-
</li>
|
|
49
|
-
<li class="ml-8 ">
|
|
50
|
-
<span class="relative">
|
|
51
|
-
<span
|
|
52
|
-
class={`flex absolute top-4 -left-12 justify-center items-center w-8 h-8 bg-${color}-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900`}
|
|
53
|
-
>
|
|
54
|
-
<Icon
|
|
55
|
-
class={`text-${color}-600 dark:text-${color}-400 font-bold text-center`}
|
|
56
|
-
data={faPen}
|
|
57
|
-
/>
|
|
58
|
-
</span>
|
|
59
|
-
</span>
|
|
60
|
-
<FlowInput />
|
|
61
|
-
</li>
|
|
62
|
-
{/if}
|
|
63
|
-
{#each flowModuleSchemas as flowModuleSchema, index (index)}
|
|
64
|
-
{#if flowModuleSchema.flowModule.value.type === 'forloopflow'}
|
|
65
|
-
<li id="module-{index}" class="ml-4 relative">
|
|
66
|
-
<button
|
|
67
|
-
on:click={() => insertAtIndex(index)}
|
|
68
|
-
class="flex absolute -top-10 -left-8 justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
69
|
-
>
|
|
70
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
71
|
-
</button>
|
|
72
|
-
<div
|
|
73
|
-
class="py-2 px-6 ml-4 mb-16 flex justify-between text-sm font-bold border border-gray-300 rounded-md shadow-md"
|
|
74
|
-
role="alert"
|
|
75
|
-
>
|
|
76
|
-
<span class="flex items-center z-50">
|
|
77
|
-
For loop
|
|
78
|
-
<Tooltip
|
|
79
|
-
content="Inside a loop, the flow input has an 'iter' property. It contains the value and the index of the iteration"
|
|
80
|
-
placement="bottom"
|
|
81
|
-
arrow
|
|
82
|
-
>
|
|
83
|
-
<Icon data={faInfoCircle} class="ml-2" /></Tooltip
|
|
84
|
-
>
|
|
85
|
-
</span>
|
|
86
|
-
<span class="flex items-center space-x-2">
|
|
87
|
-
<Toggle size="small" bind:checked={flowModuleSchema.flowModule.value.skip_failures}>
|
|
88
|
-
Skip failures
|
|
89
|
-
</Toggle>
|
|
90
|
-
<Button size="xs" color="alternative" on:click={() => removeAtIndex(index)}>
|
|
91
|
-
<Icon data={faTrashAlt} class="mr-2" />
|
|
92
|
-
Remove loop
|
|
93
|
-
</Button>
|
|
94
|
-
</span>
|
|
95
|
-
</div>
|
|
96
|
-
<span
|
|
97
|
-
class="flex absolute top-3 -left-8 justify-center items-center w-8 h-8 bg-orange-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-orange-900"
|
|
98
|
-
>
|
|
99
|
-
<span class={`text-orange-600 dark:text-orange-400 font-bold text-center`}>
|
|
100
|
-
{index + 1}
|
|
101
|
-
</span>
|
|
102
|
-
</span>
|
|
103
|
-
|
|
104
|
-
<svelte:self
|
|
105
|
-
bind:args
|
|
106
|
-
bind:flowModuleSchemas={flowModuleSchema.childFlowModules}
|
|
107
|
-
parentIndex={index}
|
|
108
|
-
/>
|
|
109
|
-
|
|
110
|
-
<div
|
|
111
|
-
class="flex px-6 py-4 ml-4 mt-4 text-sm font-bold border border-gray-300 rounded-md shadow-md z-50"
|
|
112
|
-
role="alert"
|
|
113
|
-
>
|
|
114
|
-
End of For Loop
|
|
115
|
-
<Tooltip
|
|
116
|
-
content="The results of each iteration are collecting in an array and is the result of the step. "
|
|
117
|
-
placement="bottom"
|
|
118
|
-
arrow
|
|
119
|
-
>
|
|
120
|
-
<Icon data={faInfoCircle} class="ml-2" /></Tooltip
|
|
121
|
-
>
|
|
122
|
-
</div>
|
|
123
|
-
</li>
|
|
124
|
-
{:else}
|
|
125
|
-
<li id="module-{String(getIndexes(parentIndex, index).join('-'))}" class="ml-8">
|
|
126
|
-
<span class="relative">
|
|
127
|
-
<button
|
|
128
|
-
on:click={() => insertAtIndex(index)}
|
|
129
|
-
class="flex absolute -top-10 -left-12 justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
130
|
-
>
|
|
131
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
132
|
-
</button>
|
|
133
|
-
<span
|
|
134
|
-
class={`flex absolute top-4 -left-12 justify-center items-center w-8 h-8 bg-${color}-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900`}
|
|
135
|
-
>
|
|
136
|
-
<span class={`text-${color}-600 dark:text-${color}-400 font-bold text-center`}>
|
|
137
|
-
{index + 1}
|
|
138
|
-
</span>
|
|
139
|
-
</span>
|
|
140
|
-
<ModuleStep
|
|
141
|
-
indexes={getIndexes(parentIndex, index)}
|
|
142
|
-
bind:mod={flowModuleSchema.flowModule}
|
|
143
|
-
bind:args
|
|
144
|
-
bind:schema={flowModuleSchema.schema}
|
|
145
|
-
bind:childFlowModules={flowModuleSchema.childFlowModules}
|
|
146
|
-
on:delete={() => removeAtIndex(index)}
|
|
147
|
-
/>
|
|
148
|
-
</span>
|
|
149
|
-
</li>
|
|
150
|
-
{/if}
|
|
151
|
-
{#if flowModuleSchemas.length - 1 === index}
|
|
152
|
-
<button
|
|
153
|
-
on:click={() => insertAtIndex(flowModuleSchemas.length)}
|
|
154
|
-
class="-ml-4 -mt-4 flex justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
155
|
-
>
|
|
156
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
157
|
-
</button>
|
|
158
|
-
{/if}
|
|
159
|
-
{/each}
|
|
160
|
-
{#if flowModuleSchemas.length === 0}
|
|
161
|
-
<button
|
|
162
|
-
on:click={() => insertAtIndex(0)}
|
|
163
|
-
class="-ml-4 flex justify-center items-center bg-white border-2 border-gray-200 w-8 h-8 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-${color}-900"
|
|
164
|
-
>
|
|
165
|
-
<Icon class="text-gray-400" data={faPlus} />
|
|
166
|
-
</button>
|
|
167
|
-
{/if}
|
|
168
|
-
</ol>
|
|
169
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { FlowState } from './flowState';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
args?: Record<string, any> | undefined;
|
|
6
|
-
flowModuleSchemas: FlowState;
|
|
7
|
-
parentIndex?: number | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
settings: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare type FlowTimelineProps = typeof __propDef.props;
|
|
17
|
-
export declare type FlowTimelineEvents = typeof __propDef.events;
|
|
18
|
-
export declare type FlowTimelineSlots = typeof __propDef.slots;
|
|
19
|
-
export default class FlowTimeline extends SvelteComponentTyped<FlowTimelineProps, FlowTimelineEvents, FlowTimelineSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const stepOpened: import("svelte/store").Writable<string | undefined>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
import { createPopperActions } from 'svelte-popperjs';
|
|
3
|
-
import PropPicker from './PropPicker.svelte';
|
|
4
|
-
const [popperRef, popperContent] = createPopperActions({
|
|
5
|
-
placement: 'bottom',
|
|
6
|
-
strategy: 'fixed'
|
|
7
|
-
});
|
|
8
|
-
export let pickableProperties;
|
|
9
|
-
let isOpen = false;
|
|
10
|
-
let isFocused = false;
|
|
11
|
-
let timeout;
|
|
12
|
-
let pickerVariation = 'append';
|
|
13
|
-
export function unfocus() {
|
|
14
|
-
isFocused = false;
|
|
15
|
-
close();
|
|
16
|
-
}
|
|
17
|
-
export function focus(newPickerVariation) {
|
|
18
|
-
if (newPickerVariation) {
|
|
19
|
-
pickerVariation = newPickerVariation;
|
|
20
|
-
}
|
|
21
|
-
isFocused = true;
|
|
22
|
-
open();
|
|
23
|
-
}
|
|
24
|
-
function open() {
|
|
25
|
-
if (isFocused) {
|
|
26
|
-
clearTimeout(timeout);
|
|
27
|
-
!isOpen && (isOpen = true);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function close() {
|
|
31
|
-
if (pickerVariation === 'append') {
|
|
32
|
-
timeout = setTimeout(() => (isOpen = false), 50);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function closePropertyPicker() {
|
|
36
|
-
timeout = setTimeout(() => (isOpen = false), 50);
|
|
37
|
-
}
|
|
38
|
-
const dispatch = createEventDispatcher();
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<div class="w-full">
|
|
42
|
-
<div use:popperRef on:click={open} on:input={open} on:mouseleave={close}>
|
|
43
|
-
<slot />
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
{#if isOpen}
|
|
47
|
-
<div class="content" use:popperContent on:mouseenter={open} on:mouseleave={closePropertyPicker}>
|
|
48
|
-
<PropPicker
|
|
49
|
-
bind:pickableProperties
|
|
50
|
-
on:select={(event) => {
|
|
51
|
-
dispatch('select', { propPath: event.detail, pickerVariation })
|
|
52
|
-
isOpen = false
|
|
53
|
-
pickerVariation = 'append'
|
|
54
|
-
}}
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
{/if}
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<style>
|
|
61
|
-
.content {
|
|
62
|
-
--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08));
|
|
63
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
64
|
-
width: 100%;
|
|
65
|
-
max-width: 56rem;
|
|
66
|
-
padding-left: 1.5rem;
|
|
67
|
-
padding-right: 1.5rem;
|
|
68
|
-
z-index: 50
|
|
69
|
-
}</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
pickableProperties: Object | undefined;
|
|
5
|
-
unfocus?: (() => void) | undefined;
|
|
6
|
-
focus?: ((newPickerVariation?: ("append" | "connect") | undefined) => void) | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
select: CustomEvent<any>;
|
|
10
|
-
} & {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare type OverlayPropertyPickerProps = typeof __propDef.props;
|
|
18
|
-
export declare type OverlayPropertyPickerEvents = typeof __propDef.events;
|
|
19
|
-
export declare type OverlayPropertyPickerSlots = typeof __propDef.slots;
|
|
20
|
-
export default class OverlayPropertyPicker extends SvelteComponentTyped<OverlayPropertyPickerProps, OverlayPropertyPickerEvents, OverlayPropertyPickerSlots> {
|
|
21
|
-
get unfocus(): () => void;
|
|
22
|
-
get focus(): (newPickerVariation?: ("append" | "connect") | undefined) => void;
|
|
23
|
-
}
|
|
24
|
-
export {};
|