windmill-components 1.13.0 → 1.13.3
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/common.js +23 -0
- package/components/ArgInfo.svelte +3 -3
- package/{lib/components → components}/ArgInfo.svelte.d.ts +0 -0
- package/{lib/components → components}/ArgInput.svelte.d.ts +2 -2
- package/{lib/components → components}/AutosizedTextarea.svelte.d.ts +0 -0
- package/{lib/components → components}/Badge.svelte.d.ts +0 -0
- package/{lib/components → components}/Button.svelte.d.ts +0 -0
- package/{lib/components → components}/ButtonAndDropdown.svelte.d.ts +1 -1
- package/{lib/components → components}/CenteredPage.svelte.d.ts +0 -0
- package/{lib/components → components}/ChevronButton.svelte.d.ts +0 -0
- package/{lib/components → components}/DisplayResult.svelte.d.ts +0 -0
- package/components/Dropdown.svelte +1 -1
- package/{lib/components → components}/Dropdown.svelte.d.ts +1 -1
- package/components/Editor.svelte +3 -0
- package/{lib/components → components}/Editor.svelte.d.ts +2 -0
- package/{lib/components → components}/FieldHeader.svelte.d.ts +2 -1
- package/components/FlowBuilder.svelte +3 -3
- package/{lib/components → components}/FlowBuilder.svelte.d.ts +1 -1
- package/components/FlowEditor.svelte +3 -3
- package/{lib/components → components}/FlowEditor.svelte.d.ts +1 -1
- package/components/FlowPreview.svelte +3 -3
- package/{lib/components → components}/FlowPreview.svelte.d.ts +2 -2
- package/components/FlowStatusViewer.svelte +3 -3
- package/{lib/components → components}/FlowStatusViewer.svelte.d.ts +1 -1
- package/components/GroupModal.svelte +3 -3
- package/{lib/components → components}/GroupModal.svelte.d.ts +0 -0
- package/{lib/components → components}/IconedResourceType.svelte.d.ts +0 -0
- package/components/InviteGlobalUser.svelte +2 -2
- package/{lib/components → components}/InviteGlobalUser.svelte.d.ts +0 -0
- package/components/InviteUser.svelte +3 -3
- package/{lib/components → components}/InviteUser.svelte.d.ts +0 -0
- package/{lib/components → components}/ItemPicker.svelte.d.ts +0 -0
- package/components/JobStatus.svelte +1 -1
- package/{lib/components → components}/JobStatus.svelte.d.ts +1 -1
- package/{lib/components → components}/Modal.svelte.d.ts +0 -0
- package/components/ModuleStep.svelte +1 -1
- package/{lib/components → components}/ModuleStep.svelte.d.ts +2 -2
- package/{lib/components → components}/Multiselect.svelte.d.ts +0 -0
- package/components/ObjectResourceInput.svelte +2 -2
- package/{lib/components → components}/ObjectResourceInput.svelte.d.ts +0 -0
- package/{lib/components → components}/ObjectTypeNarrowing.svelte.d.ts +0 -0
- package/{lib/components → components}/PageHeader.svelte.d.ts +0 -0
- package/{lib/components → components}/Password.svelte.d.ts +0 -0
- package/components/Path.svelte +4 -4
- package/{lib/components → components}/Path.svelte.d.ts +1 -1
- package/{lib/components → components}/RadioButton.svelte.d.ts +0 -0
- package/{lib/components → components}/Required.svelte.d.ts +0 -0
- package/components/ResourceEditor.svelte +3 -3
- package/{lib/components → components}/ResourceEditor.svelte.d.ts +0 -0
- package/components/ResourcePicker.svelte +2 -2
- package/{lib/components → components}/ResourcePicker.svelte.d.ts +0 -0
- package/components/ResourceTypePicker.svelte +2 -2
- package/{lib/components → components}/ResourceTypePicker.svelte.d.ts +0 -0
- package/components/RunForm.svelte +1 -1
- package/{lib/components → components}/RunForm.svelte.d.ts +1 -1
- package/components/SchemaEditor.svelte +76 -71
- package/{lib/components → components}/SchemaEditor.svelte.d.ts +1 -4
- package/components/SchemaForm.svelte +1 -1
- package/{lib/components → components}/SchemaForm.svelte.d.ts +1 -1
- package/{lib/components → components}/SchemaModal.svelte.d.ts +1 -1
- package/components/SchemaViewer.svelte +1 -1
- package/{lib/components → components}/SchemaViewer.svelte.d.ts +1 -1
- package/components/ScriptBuilder.svelte +4 -4
- package/{lib/components → components}/ScriptBuilder.svelte.d.ts +1 -1
- package/components/ScriptEditor.svelte +4 -4
- package/{lib/components → components}/ScriptEditor.svelte.d.ts +2 -2
- package/components/ScriptPicker.svelte +3 -3
- package/{lib/components → components}/ScriptPicker.svelte.d.ts +0 -0
- package/{lib/components → components}/ScriptSchema.svelte.d.ts +1 -1
- package/components/ShareModal.svelte +4 -4
- package/{lib/components → components}/ShareModal.svelte.d.ts +0 -0
- package/components/SharedBadge.svelte +1 -1
- package/{lib/components → components}/SharedBadge.svelte.d.ts +0 -0
- package/{lib/components → components}/StringTypeNarrowing.svelte.d.ts +0 -0
- package/{lib/components → components}/Switch.svelte.d.ts +0 -0
- package/{lib/components → components}/TableCustom.svelte.d.ts +0 -0
- package/{lib/components → components}/TableSimple.svelte.d.ts +0 -0
- package/{lib/components → components}/Tabs.svelte.d.ts +0 -0
- package/{lib/components → components}/Tooltip.svelte.d.ts +0 -0
- package/components/VariableEditor.svelte +3 -3
- package/{lib/components → components}/VariableEditor.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/DbIcon.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/Mail.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/Mysql.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/PostgresIcon.svelte.d.ts +0 -0
- package/{lib/components → components}/icons/Slack.svelte.d.ts +0 -0
- package/gen/core/ApiError.js +10 -0
- package/gen/core/ApiRequestOptions.js +1 -0
- package/gen/core/ApiResult.js +1 -0
- package/gen/core/CancelablePromise.js +86 -0
- package/gen/core/OpenAPI.js +11 -0
- package/gen/core/request.js +261 -0
- package/gen/index.js +30 -0
- package/gen/models/AuditLog.js +29 -0
- package/gen/models/CompletedJob.js +19 -0
- package/gen/models/ContextualVariable.js +4 -0
- package/gen/models/CreateResource.js +4 -0
- package/gen/models/CreateVariable.js +4 -0
- package/gen/models/CreateWorkspace.js +4 -0
- package/gen/models/EditResource.js +4 -0
- package/gen/models/EditResourceType.js +4 -0
- package/gen/models/EditSchedule.js +4 -0
- package/gen/models/EditVariable.js +4 -0
- package/gen/models/EditWorkspaceUser.js +4 -0
- package/gen/models/Flow.js +4 -0
- package/gen/models/FlowModule.js +4 -0
- package/gen/models/FlowModuleValue.js +11 -0
- package/gen/models/FlowPreview.js +4 -0
- package/gen/models/FlowStatus.js +4 -0
- package/gen/models/FlowStatusModule.js +15 -0
- package/gen/models/FlowValue.js +4 -0
- package/gen/models/GlobalUserInfo.js +11 -0
- package/gen/models/Group.js +4 -0
- package/gen/models/InputTransform.js +11 -0
- package/gen/models/Job.js +11 -0
- package/gen/models/ListableVariable.js +4 -0
- package/gen/models/Login.js +4 -0
- package/gen/models/MainArgSignature.js +4 -0
- package/gen/models/NewSchedule.js +4 -0
- package/gen/models/NewToken.js +4 -0
- package/gen/models/NewUser.js +4 -0
- package/gen/models/Preview.js +11 -0
- package/gen/models/QueuedJob.js +19 -0
- package/gen/models/Resource.js +4 -0
- package/gen/models/ResourceType.js +4 -0
- package/gen/models/Schedule.js +4 -0
- package/gen/models/Script.js +11 -0
- package/gen/models/ScriptArgs.js +4 -0
- package/gen/models/TruncatedToken.js +4 -0
- package/gen/models/User.js +4 -0
- package/gen/models/UserWorkspaceList.js +4 -0
- package/gen/models/WorkerPing.js +4 -0
- package/gen/models/Workspace.js +4 -0
- package/gen/models/WorkspaceInvite.js +4 -0
- package/gen/services/AdminService.js +52 -0
- package/gen/services/AuditService.js +43 -0
- package/gen/services/FlowService.js +90 -0
- package/gen/services/GranularAclService.js +56 -0
- package/gen/services/GroupService.js +133 -0
- package/gen/services/JobService.js +260 -0
- package/gen/services/ResourceService.js +177 -0
- package/gen/services/ScheduleService.js +100 -0
- package/gen/services/ScriptService.js +188 -0
- package/gen/services/SettingsService.js +26 -0
- package/gen/services/UserService.js +302 -0
- package/gen/services/VariableService.js +98 -0
- package/gen/services/WorkerService.js +19 -0
- package/gen/services/WorkspaceService.js +185 -0
- package/infer.js +81 -0
- package/package.json +69 -3
- package/stores.js +26 -0
- package/utils.js +258 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import SchemaModal, { DEFAULT_PROPERTY, modalToSchema, schemaToModal } from './SchemaModal.svelte';
|
|
2
2
|
import Editor from './Editor.svelte';
|
|
3
|
-
import { emptySchema, sendUserToast } from '
|
|
3
|
+
import { emptySchema, sendUserToast } from '../utils';
|
|
4
4
|
import Tooltip from './Tooltip.svelte';
|
|
5
5
|
import TableCustom from './TableCustom.svelte';
|
|
6
6
|
export let schema = emptySchema();
|
|
@@ -12,16 +12,11 @@ let argError = '';
|
|
|
12
12
|
let editing = false;
|
|
13
13
|
let oldArgName; // when editing argument and changing name
|
|
14
14
|
let viewJsonSchema = false;
|
|
15
|
-
let editor;
|
|
16
|
-
$: schemaString = JSON.stringify(schema, null, '\t');
|
|
17
|
-
export function getEditor() {
|
|
18
|
-
return editor;
|
|
19
|
-
}
|
|
20
15
|
// Binding is not enough because monaco Editor does not support two-way binding
|
|
21
16
|
export function getSchema() {
|
|
22
17
|
if (viewJsonSchema) {
|
|
23
18
|
try {
|
|
24
|
-
schema = JSON.parse(
|
|
19
|
+
schema = JSON.parse(schemaString);
|
|
25
20
|
return schema;
|
|
26
21
|
}
|
|
27
22
|
catch (err) {
|
|
@@ -30,7 +25,7 @@ export function getSchema() {
|
|
|
30
25
|
}
|
|
31
26
|
else {
|
|
32
27
|
try {
|
|
33
|
-
|
|
28
|
+
schemaString = JSON.stringify(schema, null, '\t');
|
|
34
29
|
return schema;
|
|
35
30
|
}
|
|
36
31
|
catch (err) {
|
|
@@ -66,6 +61,8 @@ function handleAddOrEditArgument() {
|
|
|
66
61
|
oldArgName = undefined;
|
|
67
62
|
schemaModal.closeModal();
|
|
68
63
|
}
|
|
64
|
+
schema = schema;
|
|
65
|
+
schemaString = JSON.stringify(schema, null, '\t');
|
|
69
66
|
}
|
|
70
67
|
function startEditArgument(argName) {
|
|
71
68
|
argError = '';
|
|
@@ -83,7 +80,8 @@ function handleDeleteArgument(argName) {
|
|
|
83
80
|
try {
|
|
84
81
|
if (Object.keys(schema.properties).includes(argName)) {
|
|
85
82
|
delete schema.properties[argName];
|
|
86
|
-
schema = schema;
|
|
83
|
+
schema = schema;
|
|
84
|
+
schemaString = JSON.stringify(schema, null, '\t');
|
|
87
85
|
}
|
|
88
86
|
else {
|
|
89
87
|
throw Error('Argument not found!');
|
|
@@ -96,21 +94,14 @@ function handleDeleteArgument(argName) {
|
|
|
96
94
|
}
|
|
97
95
|
function switchTab() {
|
|
98
96
|
if (viewJsonSchema) {
|
|
99
|
-
let schemaString = editor.getCode();
|
|
100
97
|
if (schemaString === '') {
|
|
101
98
|
schemaString = JSON.stringify(emptySchema(), null, 4);
|
|
102
99
|
}
|
|
103
|
-
|
|
104
|
-
schema = JSON.parse(schemaString);
|
|
105
|
-
viewJsonSchema = false;
|
|
106
|
-
}
|
|
107
|
-
catch (err) {
|
|
108
|
-
sendUserToast(err, true);
|
|
109
|
-
}
|
|
100
|
+
viewJsonSchema = false;
|
|
110
101
|
}
|
|
111
102
|
else {
|
|
112
103
|
try {
|
|
113
|
-
|
|
104
|
+
schemaString = JSON.stringify(schema, null, '\t');
|
|
114
105
|
viewJsonSchema = true;
|
|
115
106
|
}
|
|
116
107
|
catch (err) {
|
|
@@ -153,61 +144,75 @@ function switchTab() {
|
|
|
153
144
|
</div>
|
|
154
145
|
<!--json schema or table view-->
|
|
155
146
|
<div class="border-t py-1 h-full overflow-y-auto">
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
147
|
+
{#if !viewJsonSchema}
|
|
148
|
+
<div class="h-full">
|
|
149
|
+
{#if schema.properties && Object.keys(schema.properties).length > 0 && schema.required}
|
|
150
|
+
<TableCustom class="w-full min-h-full">
|
|
151
|
+
<tr slot="header-row" class="underline">
|
|
152
|
+
<th>name</th>
|
|
153
|
+
<th>type</th>
|
|
154
|
+
<th>description</th>
|
|
155
|
+
<th>default</th>
|
|
156
|
+
<th>required</th>
|
|
157
|
+
</tr>
|
|
158
|
+
<tbody slot="body">
|
|
159
|
+
{#each Object.entries(schema.properties) as [name, property] (name)}
|
|
160
|
+
<tr>
|
|
161
|
+
<td>{name}</td>
|
|
162
|
+
<td
|
|
163
|
+
>{#if !property.type} any {:else} {property.type} {/if}</td
|
|
164
|
+
>
|
|
165
|
+
<td>{property.description}</td>
|
|
166
|
+
<td>{JSON.stringify(property.default) ?? ''}</td>
|
|
167
|
+
<td>{schema.required.includes(name) ? 'required' : 'optional'}</td>
|
|
168
|
+
<td class="">
|
|
169
|
+
<button class="mr-2" on:click={() => handleDeleteArgument(name)}
|
|
170
|
+
><svg
|
|
171
|
+
class="w-4 h-4"
|
|
172
|
+
fill="none"
|
|
173
|
+
stroke="currentColor"
|
|
174
|
+
viewBox="0 0 24 14"
|
|
175
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
176
|
+
>
|
|
177
|
+
<path
|
|
178
|
+
stroke-linecap="round"
|
|
179
|
+
stroke-linejoin="round"
|
|
180
|
+
stroke-width="2"
|
|
181
|
+
d="M6 18L18 6M6 6l12 12"
|
|
182
|
+
/>
|
|
183
|
+
</svg></button
|
|
184
184
|
>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
</svg></button
|
|
185
|
+
<button
|
|
186
|
+
class="default-button-secondary text-xs inline-flex"
|
|
187
|
+
on:click={() => {
|
|
188
|
+
startEditArgument(name)
|
|
189
|
+
}}>edit</button
|
|
190
|
+
></td
|
|
192
191
|
>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
192
|
+
</tr>
|
|
193
|
+
{/each}
|
|
194
|
+
</tbody>
|
|
195
|
+
</TableCustom>
|
|
196
|
+
{:else}
|
|
197
|
+
<div class="text-gray-700 text-xs italic">This script has no argument</div>
|
|
198
|
+
{/if}
|
|
199
|
+
</div>
|
|
200
|
+
{:else}
|
|
201
|
+
<div>
|
|
202
|
+
<Editor
|
|
203
|
+
on:change={() => {
|
|
204
|
+
try {
|
|
205
|
+
schema = JSON.parse(schemaString)
|
|
206
|
+
} catch (err) {
|
|
207
|
+
sendUserToast(err.message, true)
|
|
208
|
+
}
|
|
209
|
+
}}
|
|
210
|
+
bind:code={schemaString}
|
|
211
|
+
lang={'json'}
|
|
212
|
+
class="small-editor"
|
|
213
|
+
/>
|
|
214
|
+
</div>
|
|
215
|
+
{/if}
|
|
211
216
|
</div>
|
|
212
217
|
</div>
|
|
213
218
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Schema } from '
|
|
3
|
-
import Editor from './Editor.svelte';
|
|
2
|
+
import type { Schema } from '../common';
|
|
4
3
|
declare const __propDef: {
|
|
5
4
|
props: {
|
|
6
5
|
schema?: Schema | undefined;
|
|
7
|
-
getEditor?: (() => Editor) | undefined;
|
|
8
6
|
getSchema?: (() => Schema) | undefined;
|
|
9
7
|
};
|
|
10
8
|
events: {
|
|
@@ -16,7 +14,6 @@ export declare type SchemaEditorProps = typeof __propDef.props;
|
|
|
16
14
|
export declare type SchemaEditorEvents = typeof __propDef.events;
|
|
17
15
|
export declare type SchemaEditorSlots = typeof __propDef.slots;
|
|
18
16
|
export default class SchemaEditor extends SvelteComponentTyped<SchemaEditorProps, SchemaEditorEvents, SchemaEditorSlots> {
|
|
19
|
-
get getEditor(): () => Editor;
|
|
20
17
|
get getSchema(): () => Schema;
|
|
21
18
|
}
|
|
22
19
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { SchemaProperty } from '
|
|
2
|
+
import type { SchemaProperty } from '../common';
|
|
3
3
|
export declare const ARG_TYPES: readonly ["integer", "number", "string", "boolean", "object", "array"];
|
|
4
4
|
export declare type ArgType = typeof ARG_TYPES[number];
|
|
5
5
|
export interface ModalSchemaProperty {
|
|
@@ -46,17 +46,17 @@ export async function main(x: string, y: string = 'default arg') {
|
|
|
46
46
|
`
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
|
-
<script>import { ScriptService } from '
|
|
50
|
-
import { emptySchema, sendUserToast } from '
|
|
49
|
+
<script>import { ScriptService } from '../gen';
|
|
50
|
+
import { emptySchema, sendUserToast } from '../utils';
|
|
51
51
|
import { onDestroy } from 'svelte';
|
|
52
52
|
import ScriptEditor from './ScriptEditor.svelte';
|
|
53
53
|
import { page } from '$app/stores';
|
|
54
54
|
import { goto } from '$app/navigation';
|
|
55
55
|
import Path from './Path.svelte';
|
|
56
56
|
import SvelteMarkdown from 'svelte-markdown';
|
|
57
|
-
import { workspaceStore } from '
|
|
57
|
+
import { workspaceStore } from '../stores';
|
|
58
58
|
import ScriptSchema from './ScriptSchema.svelte';
|
|
59
|
-
import { inferArgs } from '
|
|
59
|
+
import { inferArgs } from '../infer';
|
|
60
60
|
import Required from './Required.svelte';
|
|
61
61
|
import RadioButton from './RadioButton.svelte';
|
|
62
62
|
let editor;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<script>import { JobService, Job, CompletedJob, VariableService, ResourceService, ScriptService } from '
|
|
2
|
-
import { sendUserToast, emptySchema, displayDate } from '
|
|
1
|
+
<script>import { JobService, Job, CompletedJob, VariableService, ResourceService, ScriptService } from '../gen';
|
|
2
|
+
import { sendUserToast, emptySchema, displayDate } from '../utils';
|
|
3
3
|
import { fade } from 'svelte/transition';
|
|
4
4
|
import Icon from 'svelte-awesome';
|
|
5
5
|
import { faCheck, faChevronDown, faChevronUp, faExclamationTriangle, faMagic, faSearch, faSpinner, faTimes } from '@fortawesome/free-solid-svg-icons';
|
|
6
6
|
import Editor from './Editor.svelte';
|
|
7
7
|
import Tooltip from './Tooltip.svelte';
|
|
8
8
|
import { onDestroy, onMount } from 'svelte';
|
|
9
|
-
import { userStore, workspaceStore } from '
|
|
9
|
+
import { userStore, workspaceStore } from '../stores';
|
|
10
10
|
import TableCustom from './TableCustom.svelte';
|
|
11
11
|
import { check } from 'svelte-awesome/icons';
|
|
12
12
|
import Modal from './Modal.svelte';
|
|
@@ -16,7 +16,7 @@ import github from 'svelte-highlight/styles/github';
|
|
|
16
16
|
import ItemPicker from './ItemPicker.svelte';
|
|
17
17
|
import VariableEditor from './VariableEditor.svelte';
|
|
18
18
|
import ResourceEditor from './ResourceEditor.svelte';
|
|
19
|
-
import { inferArgs } from '
|
|
19
|
+
import { inferArgs } from '../infer';
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import { VSplitPane } from 'svelte-split-pane';
|
|
22
22
|
import SchemaForm from './SchemaForm.svelte';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Schema } from '
|
|
2
|
+
import type { Schema } from '../common';
|
|
3
3
|
import Editor from './Editor.svelte';
|
|
4
|
-
import type { Preview } from '
|
|
4
|
+
import type { Preview } from '../gen/models/Preview';
|
|
5
5
|
declare const __propDef: {
|
|
6
6
|
props: {
|
|
7
7
|
schema?: Schema | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<script>import { sendUserToast } from '
|
|
2
|
-
import { ScriptService, FlowService, Script } from '
|
|
1
|
+
<script>import { sendUserToast } from '../utils';
|
|
2
|
+
import { ScriptService, FlowService, Script } from '../gen';
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
4
|
import { faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
-
import { hubScripts, workspaceStore } from '
|
|
5
|
+
import { hubScripts, workspaceStore } from '../stores';
|
|
6
6
|
import { createEventDispatcher } from 'svelte';
|
|
7
7
|
import ItemPicker from './ItemPicker.svelte';
|
|
8
8
|
import RadioButton from './RadioButton.svelte';
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script>import Modal from './Modal.svelte';
|
|
2
2
|
import TableCustom from './TableCustom.svelte';
|
|
3
|
-
import { GranularAclService } from '
|
|
4
|
-
import { sendUserToast } from '
|
|
5
|
-
import { GroupService, UserService } from '
|
|
3
|
+
import { GranularAclService } from '../gen/services/GranularAclService';
|
|
4
|
+
import { sendUserToast } from '../utils';
|
|
5
|
+
import { GroupService, UserService } from '../gen';
|
|
6
6
|
import { createEventDispatcher } from 'svelte';
|
|
7
7
|
import AutoComplete from 'simple-svelte-autocomplete';
|
|
8
|
-
import { workspaceStore } from '
|
|
8
|
+
import { workspaceStore } from '../stores';
|
|
9
9
|
const dispatch = createEventDispatcher();
|
|
10
10
|
export let kind;
|
|
11
11
|
export let path = '';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script>import Password from './Password.svelte';
|
|
2
|
-
import { sendUserToast } from '
|
|
3
|
-
import { VariableService } from '
|
|
2
|
+
import { sendUserToast } from '../utils';
|
|
3
|
+
import { VariableService } from '../gen';
|
|
4
4
|
import AutosizedTextarea from './AutosizedTextarea.svelte';
|
|
5
5
|
import Path from './Path.svelte';
|
|
6
6
|
import Modal from './Modal.svelte';
|
|
7
7
|
import { createEventDispatcher } from 'svelte';
|
|
8
|
-
import { workspaceStore } from '
|
|
8
|
+
import { workspaceStore } from '../stores';
|
|
9
9
|
import Required from './Required.svelte';
|
|
10
10
|
const dispatch = createEventDispatcher();
|
|
11
11
|
let path = '';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
export class CancelError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'CancelError';
|
|
8
|
+
}
|
|
9
|
+
get isCancelled() {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class CancelablePromise {
|
|
14
|
+
constructor(executor) {
|
|
15
|
+
this._isResolved = false;
|
|
16
|
+
this._isRejected = false;
|
|
17
|
+
this._isCancelled = false;
|
|
18
|
+
this._cancelHandlers = [];
|
|
19
|
+
this._promise = new Promise((resolve, reject) => {
|
|
20
|
+
this._resolve = resolve;
|
|
21
|
+
this._reject = reject;
|
|
22
|
+
const onResolve = (value) => {
|
|
23
|
+
if (this._isResolved || this._isRejected || this._isCancelled) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this._isResolved = true;
|
|
27
|
+
this._resolve?.(value);
|
|
28
|
+
};
|
|
29
|
+
const onReject = (reason) => {
|
|
30
|
+
if (this._isResolved || this._isRejected || this._isCancelled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this._isRejected = true;
|
|
34
|
+
this._reject?.(reason);
|
|
35
|
+
};
|
|
36
|
+
const onCancel = (cancelHandler) => {
|
|
37
|
+
if (this._isResolved || this._isRejected || this._isCancelled) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this._cancelHandlers.push(cancelHandler);
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(onCancel, 'isResolved', {
|
|
43
|
+
get: () => this._isResolved,
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(onCancel, 'isRejected', {
|
|
46
|
+
get: () => this._isRejected,
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(onCancel, 'isCancelled', {
|
|
49
|
+
get: () => this._isCancelled,
|
|
50
|
+
});
|
|
51
|
+
return executor(onResolve, onReject, onCancel);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
then(onFulfilled, onRejected) {
|
|
55
|
+
return this._promise.then(onFulfilled, onRejected);
|
|
56
|
+
}
|
|
57
|
+
catch(onRejected) {
|
|
58
|
+
return this._promise.catch(onRejected);
|
|
59
|
+
}
|
|
60
|
+
finally(onFinally) {
|
|
61
|
+
return this._promise.finally(onFinally);
|
|
62
|
+
}
|
|
63
|
+
cancel() {
|
|
64
|
+
if (this._isResolved || this._isRejected || this._isCancelled) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this._isCancelled = true;
|
|
68
|
+
if (this._cancelHandlers.length) {
|
|
69
|
+
try {
|
|
70
|
+
for (const cancelHandler of this._cancelHandlers) {
|
|
71
|
+
cancelHandler();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.warn('Cancellation threw an error', error);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
this._cancelHandlers.length = 0;
|
|
80
|
+
this._reject?.(new CancelError('Request aborted'));
|
|
81
|
+
}
|
|
82
|
+
get isCancelled() {
|
|
83
|
+
return this._isCancelled;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
Symbol.toStringTag;
|