windmill-components 1.82.1 → 1.82.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/components/Multiselect.svelte.d.ts +2 -2
- package/components/apps/components/buttons/AppButton.svelte +16 -2
- package/components/apps/components/buttons/AppForm.svelte +9 -2
- package/components/apps/components/buttons/AppFormButton.svelte +82 -59
- package/components/apps/components/display/PlotlyHtml.svelte +1 -1
- package/components/apps/components/display/table/AppTable.svelte +8 -15
- package/components/apps/components/helpers/RunnableComponent.svelte +6 -9
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +0 -1
- package/components/apps/components/helpers/RunnableWrapper.svelte +0 -2
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +0 -1
- package/components/apps/editor/AppEditor.svelte +12 -14
- package/components/apps/editor/AppPreview.svelte +2 -1
- package/components/apps/editor/component/Component.svelte +1 -1
- package/components/apps/editor/component/README.md +0 -4
- package/components/apps/editor/componentsPanel/CssProperty.svelte +47 -87
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +2 -5
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +14 -24
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +12 -12
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +2 -3
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +1 -1
- package/components/apps/types.d.ts +1 -2
- package/components/common/button/ButtonPopup.svelte +2 -5
- package/components/common/button/ButtonPopup.svelte.d.ts +1 -5
- package/components/common/button/ButtonPopupItem.svelte +1 -2
- package/components/common/button/ButtonPopupItem.svelte.d.ts +0 -1
- package/components/common/index.d.ts +0 -1
- package/components/common/index.js +0 -1
- package/components/common/kbd/Kbd.svelte +1 -4
- package/components/common/kbd/Kbd.svelte.d.ts +14 -6
- package/components/common/menu/Menu.svelte +2 -8
- package/components/common/menu/Menu.svelte.d.ts +1 -4
- package/package.json +1 -11
- package/utils.d.ts +0 -1
- package/utils.js +0 -3
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte +0 -167
- package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte.d.ts +0 -18
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +0 -130
- package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte.d.ts +0 -21
- package/components/apps/editor/componentsPanel/quickStyleProperties.d.ts +0 -535
- package/components/apps/editor/componentsPanel/quickStyleProperties.js +0 -595
- package/components/apps/editor/settingsPanel/StylePanel.svelte +0 -23
- package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +0 -17
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +0 -47
- package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte.d.ts +0 -14
- package/components/apps/editor/settingsPanel/secondaryMenu/index.d.ts +0 -2
- package/components/apps/editor/settingsPanel/secondaryMenu/index.js +0 -2
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.d.ts +0 -12
- package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.js +0 -10
- package/components/common/clearableInput/ClearableInput.svelte +0 -56
- package/components/common/clearableInput/ClearableInput.svelte.d.ts +0 -28
- package/components/common/modal/AlwaysMountedModal.svelte +0 -109
- package/components/common/modal/AlwaysMountedModal.svelte.d.ts +0 -22
|
@@ -1,107 +1,67 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import { createEventDispatcher, getContext } from 'svelte';
|
|
1
|
+
<script>import { X } from 'lucide-svelte';
|
|
3
2
|
import { fade } from 'svelte/transition';
|
|
4
|
-
import { addWhitespaceBeforeCapitals
|
|
5
|
-
import { Button, ClearableInput } from '../../../common';
|
|
6
|
-
import Popover from '../../../Popover.svelte';
|
|
7
|
-
import QuickStyleMenu from './QuickStyleMenu.svelte';
|
|
3
|
+
import { addWhitespaceBeforeCapitals } from '../../../../utils';
|
|
8
4
|
export let name;
|
|
9
|
-
export let componentType = undefined;
|
|
10
5
|
export let value = {};
|
|
11
6
|
export let forceStyle = false;
|
|
12
7
|
export let forceClass = false;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let isQuickMenuOpen = false;
|
|
17
|
-
$: dispatch('change', value);
|
|
18
|
-
function toggleQuickMenu() {
|
|
19
|
-
isQuickMenuOpen = !isQuickMenuOpen;
|
|
20
|
-
}
|
|
21
|
-
function applyToAllInstances() {
|
|
22
|
-
if (componentType &&
|
|
23
|
-
componentType in ($app?.css || {}) &&
|
|
24
|
-
name in ($app?.css?.[componentType] || {})) {
|
|
25
|
-
$app.css[componentType][name].style = value.style;
|
|
26
|
-
sendUserToast(`Applied style to all instances of the ${componentType.replace('component', '')} component`);
|
|
8
|
+
function reset(property) {
|
|
9
|
+
if (value) {
|
|
10
|
+
value[property] = '';
|
|
27
11
|
}
|
|
28
12
|
}
|
|
29
13
|
</script>
|
|
30
14
|
|
|
31
|
-
<div
|
|
32
|
-
class="sticky top-0 z-20 text-lg bg-white font-semibold [font-variant:small-caps] text-gray-700 pt-2 pb-1"
|
|
33
|
-
>
|
|
15
|
+
<div class="text-sm font-semibold text-gray-500 capitalize pt-2">
|
|
34
16
|
{addWhitespaceBeforeCapitals(name)}
|
|
35
17
|
</div>
|
|
36
18
|
{#if value}
|
|
37
|
-
<div class="border-l border-gray-400/80 py-1 pl-3.5 ml-0.5">
|
|
19
|
+
<div class="border-l border-gray-400/80 py-1 pl-3.5 mt-1 ml-0.5">
|
|
38
20
|
{#if value.style !== undefined || forceStyle}
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
on:click={applyToAllInstances}
|
|
62
|
-
>
|
|
63
|
-
<Forward size={18} />
|
|
64
|
-
</Button>
|
|
65
|
-
<svelte:fragment slot="text">
|
|
66
|
-
Apply to all instances of this component
|
|
67
|
-
</svelte:fragment>
|
|
68
|
-
</Popover>
|
|
69
|
-
{/if}
|
|
70
|
-
{#if quickStyleProperties?.length}
|
|
71
|
-
<Popover placement="bottom" notClickable disapperTimoout={0}>
|
|
72
|
-
<Button
|
|
73
|
-
variant="border"
|
|
74
|
-
color="light"
|
|
75
|
-
size="xs"
|
|
76
|
-
btnClasses="!p-1 !w-[34px] !h-[34px] {isQuickMenuOpen
|
|
77
|
-
? '!bg-gray-200/60 hover:!bg-gray-200'
|
|
78
|
-
: ''}"
|
|
79
|
-
aria-label="{isQuickMenuOpen ? 'Close' : 'Open'} styling menu"
|
|
80
|
-
on:click={toggleQuickMenu}
|
|
81
|
-
>
|
|
82
|
-
<Paintbrush2 size={18} />
|
|
83
|
-
</Button>
|
|
84
|
-
<svelte:fragment slot="text">
|
|
85
|
-
{isQuickMenuOpen ? 'Close' : 'Open'} styling menu
|
|
86
|
-
</svelte:fragment>
|
|
87
|
-
</Popover>
|
|
88
|
-
{/if}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</label>
|
|
92
|
-
{#if quickStyleProperties?.length && isQuickMenuOpen}
|
|
93
|
-
<div transition:fade|local={{ duration: 200 }} class="w-full pt-1">
|
|
94
|
-
<QuickStyleMenu bind:value={value.style} properties={quickStyleProperties} />
|
|
95
|
-
</div>
|
|
96
|
-
{/if}
|
|
97
|
-
</div>
|
|
21
|
+
<label class="block pb-2">
|
|
22
|
+
<div class="text-xs font-medium pb-0.5"> Style </div>
|
|
23
|
+
<div class="relative">
|
|
24
|
+
<input
|
|
25
|
+
on:keydown|stopPropagation
|
|
26
|
+
type="text"
|
|
27
|
+
class="!pr-7"
|
|
28
|
+
bind:value={value.style}
|
|
29
|
+
on:focus
|
|
30
|
+
/>
|
|
31
|
+
{#if value?.style}
|
|
32
|
+
<button
|
|
33
|
+
transition:fade|local={{ duration: 100 }}
|
|
34
|
+
class="absolute z-10 top-1.5 right-1 rounded-full p-1 duration-200 hover:bg-gray-200"
|
|
35
|
+
aria-label="Remove styles"
|
|
36
|
+
on:click|preventDefault|stopPropagation={() => reset('style')}
|
|
37
|
+
>
|
|
38
|
+
<X size={14} />
|
|
39
|
+
</button>
|
|
40
|
+
{/if}
|
|
41
|
+
</div>
|
|
42
|
+
</label>
|
|
98
43
|
{/if}
|
|
99
44
|
{#if value.class !== undefined || forceClass}
|
|
100
|
-
<!-- svelte-ignore a11y-label-has-associated-control -->
|
|
101
45
|
<label class="block">
|
|
102
|
-
<div class="text-
|
|
46
|
+
<div class="text-xs font-medium pb-0.5"> Tailwind classes </div>
|
|
103
47
|
<div class="relative">
|
|
104
|
-
<
|
|
48
|
+
<input
|
|
49
|
+
on:keydown|stopPropagation
|
|
50
|
+
type="text"
|
|
51
|
+
class="!pr-7"
|
|
52
|
+
bind:value={value.class}
|
|
53
|
+
on:focus
|
|
54
|
+
/>
|
|
55
|
+
{#if value?.class}
|
|
56
|
+
<button
|
|
57
|
+
transition:fade|local={{ duration: 100 }}
|
|
58
|
+
class="absolute z-10 top-1.5 right-1 rounded-full p-1 duration-200 hover:bg-gray-200"
|
|
59
|
+
aria-label="Remove classes"
|
|
60
|
+
on:click|preventDefault|stopPropagation={() => reset('class')}
|
|
61
|
+
>
|
|
62
|
+
<X size={14} />
|
|
63
|
+
</button>
|
|
64
|
+
{/if}
|
|
105
65
|
</div>
|
|
106
66
|
</label>
|
|
107
67
|
{/if}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { ComponentCssProperty } from '../../types';
|
|
3
|
-
import type { AppComponent } from '../component/components';
|
|
4
|
-
import type { StylePropertyKey } from './quickStyleProperties';
|
|
5
3
|
declare const __propDef: {
|
|
6
4
|
props: {
|
|
7
5
|
name: string;
|
|
8
|
-
componentType?: AppComponent['type'] | undefined;
|
|
9
6
|
value?: ComponentCssProperty | undefined;
|
|
10
7
|
forceStyle?: boolean | undefined;
|
|
11
8
|
forceClass?: boolean | undefined;
|
|
12
|
-
quickStyleProperties?: StylePropertyKey[] | undefined;
|
|
13
9
|
};
|
|
14
10
|
events: {
|
|
15
|
-
|
|
11
|
+
keydown: KeyboardEvent;
|
|
12
|
+
focus: FocusEvent;
|
|
16
13
|
} & {
|
|
17
14
|
[evt: string]: CustomEvent<any>;
|
|
18
15
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import Button from '../../../common/button/Button.svelte';
|
|
2
|
-
import {
|
|
2
|
+
import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
3
3
|
import { getContext } from 'svelte';
|
|
4
4
|
import PanelSection from './common/PanelSection.svelte';
|
|
5
5
|
import InputsSpecsEditor from './InputsSpecsEditor.svelte';
|
|
@@ -7,7 +7,7 @@ import TableActions from './TableActions.svelte';
|
|
|
7
7
|
import StaticInputEditor from './inputEditor/StaticInputEditor.svelte';
|
|
8
8
|
import ConnectedInputEditor from './inputEditor/ConnectedInputEditor.svelte';
|
|
9
9
|
import Badge from '../../../common/badge/Badge.svelte';
|
|
10
|
-
import { capitalize, classNames, getModifierKey
|
|
10
|
+
import { capitalize, classNames, getModifierKey } from '../../../../utils';
|
|
11
11
|
import { buildExtraLib, fieldTypeToTsType } from '../../utils';
|
|
12
12
|
import Recompute from './Recompute.svelte';
|
|
13
13
|
import Tooltip from '../../../Tooltip.svelte';
|
|
@@ -23,9 +23,6 @@ import GridPane from './GridPane.svelte';
|
|
|
23
23
|
import { slide } from 'svelte/transition';
|
|
24
24
|
import { push } from '../../../../history';
|
|
25
25
|
import Kbd from '../../../common/kbd/Kbd.svelte';
|
|
26
|
-
import { secondaryMenu } from './secondaryMenu';
|
|
27
|
-
import StylePanel from './StylePanel.svelte';
|
|
28
|
-
import { Delete } from 'lucide-svelte';
|
|
29
26
|
export let componentSettings = undefined;
|
|
30
27
|
export let rowColumns = false;
|
|
31
28
|
export let onDelete = undefined;
|
|
@@ -62,10 +59,12 @@ $: extraLib =
|
|
|
62
59
|
? buildExtraLib($worldStore?.outputsById ?? {}, componentSettings?.item?.data?.id, false, $state, false)
|
|
63
60
|
: undefined;
|
|
64
61
|
function keydown(event) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
switch (event.key) {
|
|
63
|
+
case 'Delete': {
|
|
64
|
+
removeGridElement();
|
|
65
|
+
event.stopPropagation();
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
const initialConfiguration = componentSettings?.item?.data?.type
|
|
@@ -202,20 +201,19 @@ $: componentSettings?.item?.data && ($app = $app);
|
|
|
202
201
|
<div class="grow shrink" />
|
|
203
202
|
|
|
204
203
|
{#if Object.keys(ccomponents[component.type].customCss ?? {}).length > 0}
|
|
205
|
-
<PanelSection title="
|
|
204
|
+
<PanelSection title="Custom CSS">
|
|
206
205
|
<div slot="action">
|
|
207
206
|
<Button
|
|
208
207
|
color="light"
|
|
209
208
|
size="xs"
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
on:click={() => secondaryMenu.open(StylePanel, { component })}
|
|
209
|
+
endIcon={{ icon: viewCssOptions ? faChevronUp : faChevronDown }}
|
|
210
|
+
on:click={() => (viewCssOptions = !viewCssOptions)}
|
|
213
211
|
>
|
|
214
|
-
|
|
212
|
+
{viewCssOptions ? 'Hide' : 'Show'}
|
|
215
213
|
</Button>
|
|
216
214
|
</div>
|
|
217
215
|
{#if viewCssOptions}
|
|
218
|
-
<div transition:slide|local
|
|
216
|
+
<div transition:slide|local>
|
|
219
217
|
{#each Object.keys(ccomponents[component.type].customCss ?? {}) as name}
|
|
220
218
|
{#if componentSettings.item.data?.customCss != undefined}
|
|
221
219
|
<div class="w-full mb-2">
|
|
@@ -238,15 +236,7 @@ $: componentSettings?.item?.data && ($app = $app);
|
|
|
238
236
|
<div slot="action">
|
|
239
237
|
<Button size="xs" color="red" variant="border" on:click={removeGridElement}>
|
|
240
238
|
Delete
|
|
241
|
-
|
|
242
|
-
<Kbd kbdClass="center-center">
|
|
243
|
-
<span class="text-lg leading-none">⌘</span>
|
|
244
|
-
<span class="px-0.5">+</span>
|
|
245
|
-
<Delete size={16} />
|
|
246
|
-
</Kbd>
|
|
247
|
-
{:else}
|
|
248
|
-
<Kbd>Del</Kbd>
|
|
249
|
-
{/if}
|
|
239
|
+
<Kbd>Del</Kbd>
|
|
250
240
|
</Button>
|
|
251
241
|
</div>
|
|
252
242
|
<div class="flex flex-col gap-1">
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
|
|
3
|
-
import { ClearableInput } from '../../../../common';
|
|
4
|
-
export let value = '#fff';
|
|
5
|
-
const dispatch = createEventDispatcher();
|
|
1
|
+
<script>import ColorPicker, { ChromeVariant } from 'svelte-awesome-color-picker';
|
|
2
|
+
export let componentInput;
|
|
6
3
|
let isOpen = false;
|
|
7
|
-
$: dispatch('change', value);
|
|
8
4
|
</script>
|
|
9
5
|
|
|
10
|
-
<div class="color-picker-input
|
|
11
|
-
<
|
|
6
|
+
<div class="color-picker-input">
|
|
7
|
+
<input
|
|
8
|
+
type="text"
|
|
9
|
+
readonly
|
|
10
|
+
value={componentInput.value}
|
|
11
|
+
on:focus|preventDefault|stopPropagation={() => (isOpen = true)}
|
|
12
|
+
/>
|
|
12
13
|
<ColorPicker
|
|
13
14
|
bind:isOpen
|
|
14
|
-
bind:hex={value}
|
|
15
|
-
label={value}
|
|
15
|
+
bind:hex={componentInput.value}
|
|
16
|
+
label={componentInput.value}
|
|
16
17
|
canChangeMode={false}
|
|
17
18
|
components={ChromeVariant}
|
|
18
19
|
toRight
|
|
@@ -21,7 +22,7 @@ $: dispatch('change', value);
|
|
|
21
22
|
</div>
|
|
22
23
|
|
|
23
24
|
<style global>
|
|
24
|
-
:global(.color-picker-input) :global(span) > :global(label) {
|
|
25
|
+
:global(.color-picker-input) :global(span) > :global(label.svelte-rogbpz) {
|
|
25
26
|
display: none;
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -29,7 +30,6 @@ $: dispatch('change', value);
|
|
|
29
30
|
box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.25) !important;
|
|
30
31
|
border-style: none !important;
|
|
31
32
|
border-radius: 0.375rem !important;
|
|
32
|
-
z-index: 20;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:global(.color-picker-input) :global(.slider-wrapper) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { StaticInput } from '../../../inputType';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
|
|
5
|
+
componentInput: StaticInput<string>;
|
|
5
6
|
};
|
|
6
7
|
events: {
|
|
7
|
-
change: CustomEvent<any>;
|
|
8
|
-
} & {
|
|
9
8
|
[evt: string]: CustomEvent<any>;
|
|
10
9
|
};
|
|
11
10
|
slots: {};
|
|
@@ -74,7 +74,7 @@ $: componentInput && onchange?.();
|
|
|
74
74
|
Inconsistent labeled resource object
|
|
75
75
|
{/if}
|
|
76
76
|
{:else if fieldType === 'color'}
|
|
77
|
-
<ColorInput bind:
|
|
77
|
+
<ColorInput bind:componentInput />
|
|
78
78
|
{:else if fieldType === 'object'}
|
|
79
79
|
{#if format?.startsWith('resource-')}
|
|
80
80
|
<ResourcePicker
|
|
@@ -63,7 +63,6 @@ export type InlineScript = {
|
|
|
63
63
|
key: string;
|
|
64
64
|
}[];
|
|
65
65
|
};
|
|
66
|
-
export type AppCssItemName = 'viewer' | 'grid' | AppComponent['type'];
|
|
67
66
|
export type App = {
|
|
68
67
|
grid: GridItem[];
|
|
69
68
|
fullscreen: boolean;
|
|
@@ -79,7 +78,7 @@ export type App = {
|
|
|
79
78
|
autoRefresh?: boolean;
|
|
80
79
|
doNotRecomputeOnInputChanged?: boolean;
|
|
81
80
|
}>;
|
|
82
|
-
css?: Partial<Record<
|
|
81
|
+
css?: Partial<Record<'viewer' | 'grid' | AppComponent['type'], Record<string, ComponentCssProperty>>>;
|
|
83
82
|
subgrids?: Record<string, GridItem[]>;
|
|
84
83
|
};
|
|
85
84
|
export type ConnectingInput = {
|
|
@@ -7,7 +7,6 @@ export let color = 'blue';
|
|
|
7
7
|
export let variant = 'contained';
|
|
8
8
|
export let mainClasses = '';
|
|
9
9
|
export let toggleClasses = '';
|
|
10
|
-
export let listClasses = '';
|
|
11
10
|
export let disabled = false;
|
|
12
11
|
export let href = undefined;
|
|
13
12
|
export let target = '_self';
|
|
@@ -60,16 +59,14 @@ $: commonProps = {
|
|
|
60
59
|
{#if ref}
|
|
61
60
|
<Popup
|
|
62
61
|
{ref}
|
|
63
|
-
let:open
|
|
64
|
-
let:close
|
|
65
62
|
options={{
|
|
66
63
|
placement: $$slots.main ? 'bottom-end' : 'bottom',
|
|
67
64
|
strategy: 'absolute',
|
|
68
65
|
modifiers: [{ name: 'offset', options: { offset: [0, 0] } }]
|
|
69
66
|
}}
|
|
70
67
|
>
|
|
71
|
-
<ul class="bg-white rounded-t border pt-1 pb-2 max-h-40 overflow-auto
|
|
72
|
-
<slot
|
|
68
|
+
<ul class="bg-white rounded-t border pt-1 pb-2 max-h-40 overflow-auto">
|
|
69
|
+
<slot />
|
|
73
70
|
</ul>
|
|
74
71
|
</Popup>
|
|
75
72
|
{/if}
|
|
@@ -8,7 +8,6 @@ declare const __propDef: {
|
|
|
8
8
|
variant?: ButtonType.Variant | undefined;
|
|
9
9
|
mainClasses?: string | undefined;
|
|
10
10
|
toggleClasses?: string | undefined;
|
|
11
|
-
listClasses?: string | undefined;
|
|
12
11
|
disabled?: boolean | undefined;
|
|
13
12
|
href?: string | undefined;
|
|
14
13
|
target?: ButtonType.Target | undefined;
|
|
@@ -25,10 +24,7 @@ declare const __propDef: {
|
|
|
25
24
|
slots: {
|
|
26
25
|
main: {};
|
|
27
26
|
toggle: {};
|
|
28
|
-
default: {
|
|
29
|
-
open: () => void;
|
|
30
|
-
close: () => void;
|
|
31
|
-
};
|
|
27
|
+
default: {};
|
|
32
28
|
};
|
|
33
29
|
};
|
|
34
30
|
export type ButtonPopupProps = typeof __propDef.props;
|
|
@@ -8,7 +8,6 @@ export let target = '_self';
|
|
|
8
8
|
export let iconOnly = false;
|
|
9
9
|
export let startIcon = undefined;
|
|
10
10
|
export let endIcon = undefined;
|
|
11
|
-
export let wrapperClasses = '';
|
|
12
11
|
const props = getContext(ButtonType.ItemContextKey);
|
|
13
12
|
const iconWidthClass = {
|
|
14
13
|
xs: '!w-[12px]',
|
|
@@ -41,7 +40,7 @@ $: buttonProps = {
|
|
|
41
40
|
};
|
|
42
41
|
</script>
|
|
43
42
|
|
|
44
|
-
<li class="mt-1
|
|
43
|
+
<li class="mt-1">
|
|
45
44
|
<Button {...buttonProps} on:click>
|
|
46
45
|
<slot />
|
|
47
46
|
</Button>
|
|
@@ -5,7 +5,6 @@ export { default as Button } from './button/Button.svelte';
|
|
|
5
5
|
export { default as ButtonPopup } from './button/ButtonPopup.svelte';
|
|
6
6
|
export { default as ButtonPopupItem } from './button/ButtonPopupItem.svelte';
|
|
7
7
|
export { default as UndoRedo } from './button/UndoRedo.svelte';
|
|
8
|
-
export { default as ClearableInput } from './clearableInput/ClearableInput.svelte';
|
|
9
8
|
export { default as Drawer } from './drawer/Drawer.svelte';
|
|
10
9
|
export { default as DrawerContent } from './drawer/DrawerContent.svelte';
|
|
11
10
|
export { default as Kbd } from './kbd/Kbd.svelte';
|
|
@@ -5,7 +5,6 @@ export { default as Button } from './button/Button.svelte';
|
|
|
5
5
|
export { default as ButtonPopup } from './button/ButtonPopup.svelte';
|
|
6
6
|
export { default as ButtonPopupItem } from './button/ButtonPopupItem.svelte';
|
|
7
7
|
export { default as UndoRedo } from './button/UndoRedo.svelte';
|
|
8
|
-
export { default as ClearableInput } from './clearableInput/ClearableInput.svelte';
|
|
9
8
|
export { default as Drawer } from './drawer/Drawer.svelte';
|
|
10
9
|
export { default as DrawerContent } from './drawer/DrawerContent.svelte';
|
|
11
10
|
export { default as Kbd } from './kbd/Kbd.svelte';
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
<script>export let kbdClass = '';
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
1
|
<span
|
|
5
2
|
class="{$$props.class} rounded border bg-white/70 px-1.5 !text-xs text-gray-600 shadow-sm font-light transition-all group-hover:border-primary-500 group-hover:text-primary-500"
|
|
6
3
|
>
|
|
7
|
-
<kbd
|
|
4
|
+
<kbd>
|
|
8
5
|
<slot />
|
|
9
6
|
</kbd>
|
|
10
7
|
</span>
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} KbdProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} KbdEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} KbdSlots */
|
|
4
|
+
export default class Kbd extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type KbdProps = typeof __propDef.props;
|
|
13
|
+
export type KbdEvents = typeof __propDef.events;
|
|
14
|
+
export type KbdSlots = typeof __propDef.slots;
|
|
1
15
|
import { SvelteComponentTyped } from "svelte";
|
|
2
16
|
declare const __propDef: {
|
|
3
17
|
props: {
|
|
4
18
|
[x: string]: any;
|
|
5
|
-
kbdClass?: string | undefined;
|
|
6
19
|
};
|
|
7
20
|
events: {
|
|
8
21
|
[evt: string]: CustomEvent<any>;
|
|
@@ -11,9 +24,4 @@ declare const __propDef: {
|
|
|
11
24
|
default: {};
|
|
12
25
|
};
|
|
13
26
|
};
|
|
14
|
-
export type KbdProps = typeof __propDef.props;
|
|
15
|
-
export type KbdEvents = typeof __propDef.events;
|
|
16
|
-
export type KbdSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Kbd extends SvelteComponentTyped<KbdProps, KbdEvents, KbdSlots> {
|
|
18
|
-
}
|
|
19
27
|
export {};
|
|
@@ -4,12 +4,8 @@ let current = undefined;
|
|
|
4
4
|
|
|
5
5
|
<script>import { classNames } from '../../../utils';
|
|
6
6
|
import { onMount } from 'svelte';
|
|
7
|
-
import { fade } from 'svelte/transition';
|
|
8
7
|
export let noMinW = false;
|
|
9
8
|
export let show = false;
|
|
10
|
-
export let wrapperClasses = '';
|
|
11
|
-
export let popupClasses = '';
|
|
12
|
-
export let transitionDuration = 100;
|
|
13
9
|
let menu;
|
|
14
10
|
export let placement = 'bottom-start';
|
|
15
11
|
function handleOutsideClick(event) {
|
|
@@ -44,7 +40,7 @@ const placementsClasses = {
|
|
|
44
40
|
};
|
|
45
41
|
</script>
|
|
46
42
|
|
|
47
|
-
<div class="relative
|
|
43
|
+
<div class="relative" bind:this={menu}>
|
|
48
44
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
49
45
|
<div
|
|
50
46
|
on:click|stopPropagation={() => {
|
|
@@ -60,12 +56,10 @@ const placementsClasses = {
|
|
|
60
56
|
</div>
|
|
61
57
|
{#if show}
|
|
62
58
|
<div
|
|
63
|
-
transition:fade|local={{ duration: transitionDuration }}
|
|
64
59
|
class={classNames(
|
|
65
60
|
'z-50 absolute mt-2 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none',
|
|
66
61
|
placementsClasses[placement],
|
|
67
|
-
noMinW ? 'min-w-0' : 'w-60'
|
|
68
|
-
popupClasses
|
|
62
|
+
noMinW ? 'min-w-0' : 'w-60'
|
|
69
63
|
)}
|
|
70
64
|
role="menu"
|
|
71
65
|
tabindex="-1"
|
|
@@ -3,10 +3,7 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
noMinW?: boolean | undefined;
|
|
5
5
|
show?: boolean | undefined;
|
|
6
|
-
|
|
7
|
-
popupClasses?: string | undefined;
|
|
8
|
-
transitionDuration?: number | undefined;
|
|
9
|
-
placement?: "top-start" | "top-end" | "bottom-start" | "bottom-end" | "top-center" | "bottom-center" | undefined;
|
|
6
|
+
placement?: "top-start" | "top-end" | "top-center" | "bottom-start" | "bottom-end" | "bottom-center" | undefined;
|
|
10
7
|
};
|
|
11
8
|
events: {
|
|
12
9
|
[evt: string]: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-components",
|
|
3
|
-
"version": "1.82.
|
|
3
|
+
"version": "1.82.3",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@playwright/test": "^1.31.1",
|
|
6
6
|
"@sveltejs/adapter-static": "^1.0.0",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"prettier": "^2.8.3",
|
|
32
32
|
"prettier-plugin-svelte": "^2.9.0",
|
|
33
33
|
"simple-svelte-autocomplete": "^2.5.1",
|
|
34
|
-
"style-to-object": "^0.4.1",
|
|
35
34
|
"stylelint-config-recommended": "^9.0.0",
|
|
36
35
|
"svelte": "^3.55.1",
|
|
37
36
|
"svelte-awesome": "^3.0.0",
|
|
@@ -263,10 +262,7 @@
|
|
|
263
262
|
"./components/apps/editor/componentsPanel/CssProperty.svelte": "./components/apps/editor/componentsPanel/CssProperty.svelte",
|
|
264
263
|
"./components/apps/editor/componentsPanel/CssSettings.svelte": "./components/apps/editor/componentsPanel/CssSettings.svelte",
|
|
265
264
|
"./components/apps/editor/componentsPanel/ListItem.svelte": "./components/apps/editor/componentsPanel/ListItem.svelte",
|
|
266
|
-
"./components/apps/editor/componentsPanel/QuickStyleMenu.svelte": "./components/apps/editor/componentsPanel/QuickStyleMenu.svelte",
|
|
267
|
-
"./components/apps/editor/componentsPanel/QuickStyleProperty.svelte": "./components/apps/editor/componentsPanel/QuickStyleProperty.svelte",
|
|
268
265
|
"./components/apps/editor/componentsPanel/componentDefaultProps": "./components/apps/editor/componentsPanel/componentDefaultProps.js",
|
|
269
|
-
"./components/apps/editor/componentsPanel/quickStyleProperties": "./components/apps/editor/componentsPanel/quickStyleProperties.js",
|
|
270
266
|
"./components/apps/editor/componentsPanel/store": "./components/apps/editor/componentsPanel/store.js",
|
|
271
267
|
"./components/apps/editor/contextPanel/ComponentOutput.svelte": "./components/apps/editor/contextPanel/ComponentOutput.svelte",
|
|
272
268
|
"./components/apps/editor/contextPanel/ComponentOutputViewer.svelte": "./components/apps/editor/contextPanel/ComponentOutputViewer.svelte",
|
|
@@ -299,7 +295,6 @@
|
|
|
299
295
|
"./components/apps/editor/settingsPanel/PickInlineScript.svelte": "./components/apps/editor/settingsPanel/PickInlineScript.svelte",
|
|
300
296
|
"./components/apps/editor/settingsPanel/Recompute.svelte": "./components/apps/editor/settingsPanel/Recompute.svelte",
|
|
301
297
|
"./components/apps/editor/settingsPanel/SelectedRunnable.svelte": "./components/apps/editor/settingsPanel/SelectedRunnable.svelte",
|
|
302
|
-
"./components/apps/editor/settingsPanel/StylePanel.svelte": "./components/apps/editor/settingsPanel/StylePanel.svelte",
|
|
303
298
|
"./components/apps/editor/settingsPanel/SubTypeEditor.svelte": "./components/apps/editor/settingsPanel/SubTypeEditor.svelte",
|
|
304
299
|
"./components/apps/editor/settingsPanel/TableActionLabel.svelte": "./components/apps/editor/settingsPanel/TableActionLabel.svelte",
|
|
305
300
|
"./components/apps/editor/settingsPanel/TableActions.svelte": "./components/apps/editor/settingsPanel/TableActions.svelte",
|
|
@@ -318,9 +313,6 @@
|
|
|
318
313
|
"./components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte": "./components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte",
|
|
319
314
|
"./components/apps/editor/settingsPanel/mainInput/WorkspaceFlowList.svelte": "./components/apps/editor/settingsPanel/mainInput/WorkspaceFlowList.svelte",
|
|
320
315
|
"./components/apps/editor/settingsPanel/mainInput/WorkspaceScriptList.svelte": "./components/apps/editor/settingsPanel/mainInput/WorkspaceScriptList.svelte",
|
|
321
|
-
"./components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte": "./components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte",
|
|
322
|
-
"./components/apps/editor/settingsPanel/secondaryMenu": "./components/apps/editor/settingsPanel/secondaryMenu/index.js",
|
|
323
|
-
"./components/apps/editor/settingsPanel/secondaryMenu/menuStore": "./components/apps/editor/settingsPanel/secondaryMenu/menuStore.js",
|
|
324
316
|
"./components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte": "./components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte",
|
|
325
317
|
"./components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte": "./components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte",
|
|
326
318
|
"./components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte": "./components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte",
|
|
@@ -351,7 +343,6 @@
|
|
|
351
343
|
"./components/common/button/ButtonPopupItem.svelte": "./components/common/button/ButtonPopupItem.svelte",
|
|
352
344
|
"./components/common/button/UndoRedo.svelte": "./components/common/button/UndoRedo.svelte",
|
|
353
345
|
"./components/common/button/model": "./components/common/button/model.js",
|
|
354
|
-
"./components/common/clearableInput/ClearableInput.svelte": "./components/common/clearableInput/ClearableInput.svelte",
|
|
355
346
|
"./components/common/confirmationModal/ConfirmationModal.svelte": "./components/common/confirmationModal/ConfirmationModal.svelte",
|
|
356
347
|
"./components/common/confirmationModal/UnsavedConfirmationModal.svelte": "./components/common/confirmationModal/UnsavedConfirmationModal.svelte",
|
|
357
348
|
"./components/common/confirmationModal/dirtyStore": "./components/common/confirmationModal/dirtyStore.js",
|
|
@@ -370,7 +361,6 @@
|
|
|
370
361
|
"./components/common/languageIcons": "./components/common/languageIcons/index.js",
|
|
371
362
|
"./components/common/menu/Menu.svelte": "./components/common/menu/Menu.svelte",
|
|
372
363
|
"./components/common/menu/MenuItem.svelte": "./components/common/menu/MenuItem.svelte",
|
|
373
|
-
"./components/common/modal/AlwaysMountedModal.svelte": "./components/common/modal/AlwaysMountedModal.svelte",
|
|
374
364
|
"./components/common/modal/Modal.svelte": "./components/common/modal/Modal.svelte",
|
|
375
365
|
"./components/common/popup/Popup.svelte": "./components/common/popup/Popup.svelte",
|
|
376
366
|
"./components/common/skeleton/Skeleton.svelte": "./components/common/skeleton/Skeleton.svelte",
|
package/utils.d.ts
CHANGED
|
@@ -116,4 +116,3 @@ export declare function debounce(func: (...args: any[]) => any, wait: number): (
|
|
|
116
116
|
export declare function throttle<T>(func: (...args: any[]) => T, wait: number): (...args: any[]) => void;
|
|
117
117
|
export declare function isMac(): boolean;
|
|
118
118
|
export declare function getModifierKey(): string;
|
|
119
|
-
export declare function isValidHexColor(color: string): boolean;
|