@dosgato/dialog 0.0.33 → 0.0.35
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/Button.svelte.d.ts +7 -7
- package/ButtonGroup.svelte.d.ts +5 -5
- package/Checkbox.svelte.d.ts +4 -4
- package/Container.svelte.d.ts +2 -2
- package/Dialog.svelte +3 -2
- package/Dialog.svelte.d.ts +14 -14
- package/FieldAutocomplete.svelte +7 -2
- package/FieldAutocomplete.svelte.d.ts +9 -9
- package/FieldCheckbox.svelte.d.ts +4 -4
- package/FieldChoices.svelte.d.ts +6 -6
- package/FieldChooserLink.svelte +7 -2
- package/FieldChooserLink.svelte.d.ts +8 -8
- package/FieldCodeEditor.svelte +2 -2
- package/FieldCodeEditor.svelte.d.ts +7 -7
- package/FieldDate.svelte.d.ts +4 -4
- package/FieldDateTime.svelte.d.ts +3 -3
- package/FieldDualListbox.svelte.d.ts +6 -6
- package/FieldHidden.svelte +1 -1
- package/FieldHidden.svelte.d.ts +2 -2
- package/FieldMultiple.svelte.d.ts +7 -7
- package/FieldMultiselect.svelte +5 -1
- package/FieldMultiselect.svelte.d.ts +5 -5
- package/FieldNumber.svelte.d.ts +5 -5
- package/FieldRadio.svelte.d.ts +13 -13
- package/FieldSelect.svelte.d.ts +15 -15
- package/FieldStandard.svelte +2 -1
- package/FieldStandard.svelte.d.ts +11 -10
- package/FieldText.svelte +1 -1
- package/FieldText.svelte.d.ts +8 -8
- package/FieldTextArea.svelte +1 -1
- package/FieldTextArea.svelte.d.ts +6 -6
- package/FileIcon.svelte.d.ts +5 -5
- package/Form.svelte +3 -3
- package/Form.svelte.d.ts +5 -5
- package/FormDialog.svelte +2 -2
- package/FormDialog.svelte.d.ts +24 -21
- package/Icon.svelte.d.ts +5 -5
- package/Input.svelte.d.ts +8 -8
- package/Listbox.svelte +2 -2
- package/Listbox.svelte.d.ts +6 -6
- package/Radio.svelte.d.ts +4 -4
- package/Switcher.svelte.d.ts +11 -11
- package/TabStore.d.ts +3 -3
- package/TabStore.js +7 -6
- package/Tabs.svelte +6 -6
- package/Tabs.svelte.d.ts +2 -2
- package/chooser/Chooser.svelte +4 -3
- package/chooser/Chooser.svelte.d.ts +12 -12
- package/chooser/ChooserStore.d.ts +4 -4
- package/chooser/ChooserStore.js +3 -3
- package/colorpicker/FieldColorPicker.svelte.d.ts +5 -5
- package/cropper/FieldCropper.svelte +219 -0
- package/cropper/FieldCropper.svelte.d.ts +24 -0
- package/cropper/cropper.d.ts +78 -0
- package/cropper/cropper.js +220 -0
- package/cropper/index.d.ts +2 -0
- package/cropper/index.js +2 -0
- package/helpers.d.ts +1 -1
- package/iconpicker/FieldIconPicker.svelte +5 -5
- package/iconpicker/FieldIconPicker.svelte.d.ts +3 -3
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +13 -14
- package/tree/LoadIcon.svelte.d.ts +2 -2
- package/tree/Tree.svelte.d.ts +11 -11
- package/tree/TreeNode.svelte +4 -1
- package/tree/TreeNode.svelte.d.ts +4 -4
- package/tree/treestore.d.ts +16 -16
- package/tree/treestore.js +3 -3
- package/imagecropper/FieldImageCropper.svelte +0 -380
- package/imagecropper/FieldImageCropper.svelte.d.ts +0 -25
- package/imagecropper/ImageCropperStore.d.ts +0 -16
- package/imagecropper/ImageCropperStore.js +0 -104
- package/imagecropper/imagecropper.d.ts +0 -21
- package/imagecropper/imagecropper.js +0 -1
- package/imagecropper/index.d.ts +0 -1
- package/imagecropper/index.js +0 -1
package/Button.svelte.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { IconifyIcon } from '@iconify/svelte';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
type?:
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
compact?: boolean;
|
|
8
|
-
cancel?: boolean;
|
|
9
|
-
destructive?: boolean;
|
|
10
|
-
secondary?: boolean;
|
|
5
|
+
type?: "button" | "submit" | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
compact?: boolean | undefined;
|
|
8
|
+
cancel?: boolean | undefined;
|
|
9
|
+
destructive?: boolean | undefined;
|
|
10
|
+
secondary?: boolean | undefined;
|
|
11
11
|
describedby?: string | undefined;
|
|
12
12
|
element?: HTMLElement | undefined;
|
|
13
|
-
icon?: IconifyIcon;
|
|
13
|
+
icon?: IconifyIcon | undefined;
|
|
14
14
|
class?: string | undefined;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
package/ButtonGroup.svelte.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import { type PopupMenuItem } from '@txstate-mws/svelte-components';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
name?: string;
|
|
5
|
+
name?: string | undefined;
|
|
6
6
|
choices: PopupMenuItem[];
|
|
7
|
-
value?: string;
|
|
7
|
+
value?: string | undefined;
|
|
8
8
|
groupid?: string | undefined;
|
|
9
9
|
messagesid?: string | undefined;
|
|
10
10
|
ariaControls?: string | undefined;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
valid?: boolean;
|
|
13
|
-
invalid?: boolean;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
valid?: boolean | undefined;
|
|
13
|
+
invalid?: boolean | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
blur: FocusEvent;
|
package/Checkbox.svelte.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ declare const __propDef: {
|
|
|
8
8
|
onBlur?: any;
|
|
9
9
|
descid?: string | undefined;
|
|
10
10
|
messagesid?: string | undefined;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
valid?: boolean;
|
|
13
|
-
invalid?: boolean;
|
|
14
|
-
inputelement?: HTMLInputElement;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
valid?: boolean | undefined;
|
|
13
|
+
invalid?: boolean | undefined;
|
|
14
|
+
inputelement?: HTMLInputElement | undefined;
|
|
15
15
|
helptextid?: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
package/Container.svelte.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
label: string;
|
|
8
8
|
helptext?: string | undefined;
|
|
9
9
|
messages: Feedback[];
|
|
10
|
-
required?: boolean;
|
|
10
|
+
required?: boolean | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -15,7 +15,7 @@ declare const __propDef: {
|
|
|
15
15
|
slots: {
|
|
16
16
|
default: {
|
|
17
17
|
messagesid: any;
|
|
18
|
-
helptextid: string;
|
|
18
|
+
helptextid: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
};
|
package/Dialog.svelte
CHANGED
|
@@ -44,7 +44,7 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
|
|
|
44
44
|
{#if escapable}
|
|
45
45
|
<button type="button" class="escape" on:click={() => dispatch('escape')}><Icon icon={xLight} width="2em" hiddenLabel="Close Dialog" /></button>
|
|
46
46
|
{/if}
|
|
47
|
-
<div id={descid} class="content">
|
|
47
|
+
<div id={descid} class="dialog-content">
|
|
48
48
|
<slot></slot>
|
|
49
49
|
</div>
|
|
50
50
|
<footer class="actions">
|
|
@@ -111,7 +111,8 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
|
|
|
111
111
|
margin-right: 0.4em;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.content {
|
|
114
|
+
.dialog-content {
|
|
115
|
+
position: relative;
|
|
115
116
|
margin: 0 -1em;
|
|
116
117
|
padding: 1em;
|
|
117
118
|
min-height: 5em;
|
package/Dialog.svelte.d.ts
CHANGED
|
@@ -13,17 +13,17 @@ import type { IconifyIcon } from '@iconify/svelte';
|
|
|
13
13
|
declare const __propDef: {
|
|
14
14
|
props: {
|
|
15
15
|
initialfocus?: string | undefined;
|
|
16
|
-
title?: string;
|
|
17
|
-
icon?: IconifyIcon;
|
|
18
|
-
size?:
|
|
16
|
+
title?: string | undefined;
|
|
17
|
+
icon?: IconifyIcon | undefined;
|
|
18
|
+
size?: "small" | "normal" | "tiny" | "large" | "xl" | undefined;
|
|
19
19
|
cancelText?: string | undefined;
|
|
20
|
-
continueText?: string;
|
|
21
|
-
continueIcon?: IconifyIcon;
|
|
22
|
-
escapable?: boolean;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
ignoreTabs?: boolean;
|
|
25
|
-
labelid?: string;
|
|
26
|
-
descid?: string;
|
|
20
|
+
continueText?: string | undefined;
|
|
21
|
+
continueIcon?: IconifyIcon | undefined;
|
|
22
|
+
escapable?: boolean | undefined;
|
|
23
|
+
disabled?: boolean | undefined;
|
|
24
|
+
ignoreTabs?: boolean | undefined;
|
|
25
|
+
labelid?: string | undefined;
|
|
26
|
+
descid?: string | undefined;
|
|
27
27
|
};
|
|
28
28
|
events: {
|
|
29
29
|
escape: CustomEvent<any>;
|
|
@@ -34,11 +34,11 @@ declare const __propDef: {
|
|
|
34
34
|
slots: {
|
|
35
35
|
default: {};
|
|
36
36
|
buttons: {
|
|
37
|
-
nextTitle: string;
|
|
38
|
-
prevTitle: string;
|
|
37
|
+
nextTitle: string | undefined;
|
|
38
|
+
prevTitle: string | undefined;
|
|
39
39
|
hasRequired: boolean;
|
|
40
|
-
onPrev: () => void;
|
|
41
|
-
onNext: () => void;
|
|
40
|
+
onPrev: (() => void) | undefined;
|
|
41
|
+
onNext: (() => void) | undefined;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
};
|
package/FieldAutocomplete.svelte
CHANGED
|
@@ -3,6 +3,7 @@ import FieldStandard from './FieldStandard.svelte';
|
|
|
3
3
|
import { randomid } from 'txstate-utils';
|
|
4
4
|
import { PopupMenu, ScreenReaderOnly } from '@txstate-mws/svelte-components';
|
|
5
5
|
import { getDescribedBy } from './';
|
|
6
|
+
import { onMount } from 'svelte';
|
|
6
7
|
export let id = undefined;
|
|
7
8
|
export let path;
|
|
8
9
|
export let label = '';
|
|
@@ -54,12 +55,16 @@ function reactToInitialValue(value) {
|
|
|
54
55
|
savedLabel = inputvalue;
|
|
55
56
|
set = true;
|
|
56
57
|
}
|
|
58
|
+
let portal;
|
|
59
|
+
onMount(() => {
|
|
60
|
+
portal = inputelement.closest('.dialog-content');
|
|
61
|
+
});
|
|
57
62
|
</script>
|
|
58
63
|
|
|
59
|
-
<FieldStandard bind:id {label} {path} {required} {defaultValue} {conditional} {helptext} serialize={!notNull
|
|
64
|
+
<FieldStandard bind:id {label} {path} {required} {defaultValue} {conditional} {helptext} serialize={!notNull ? nullableSerialize : undefined} deserialize={!notNull ? nullableDeserialize : undefined} let:value let:setVal let:valid let:invalid let:id let:onBlur let:onChange let:messagesid let:helptextid>
|
|
60
65
|
{@const _ = reactToInitialValue(value)}
|
|
61
66
|
<input bind:this={inputelement} bind:value={inputvalue} {id} {placeholder} class="dialog-input {className}" class:valid class:invalid aria-invalid={invalid} aria-expanded={false} aria-controls={menuid} on:blur={onBlur} on:change={onChange} autocapitalize="none" type="text" autocomplete="off" aria-autocomplete="list" role="combobox" {disabled} aria-describedby={getDescribedBy([messagesid, helptextid])} on:keydown={checkifchanged}>
|
|
62
|
-
<PopupMenu bind:menuid align="bottomleft" items={filteredChoices} buttonelement={inputelement} bind:value={popupvalue} on:change={onchangepopup(setVal)} emptyText="No options available"/>
|
|
67
|
+
<PopupMenu bind:menuid align="bottomleft" usePortal={portal} items={filteredChoices} buttonelement={inputelement} bind:value={popupvalue} on:change={onchangepopup(setVal)} emptyText="No options available"/>
|
|
63
68
|
<ScreenReaderOnly arialive="polite" ariaatomic={true} id={liveTextId}>
|
|
64
69
|
{filteredChoices.length} {filteredChoices.length === 1 ? 'option' : 'options'} available.
|
|
65
70
|
</ScreenReaderOnly>
|
|
@@ -3,20 +3,20 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
path: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
class?: string;
|
|
9
|
-
notNull?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
|
+
class?: string | undefined;
|
|
9
|
+
notNull?: boolean | undefined;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
11
11
|
choices: {
|
|
12
|
-
label?: string;
|
|
12
|
+
label?: string | undefined;
|
|
13
13
|
value: string;
|
|
14
|
-
disabled?: boolean;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
15
|
}[];
|
|
16
16
|
defaultValue?: any;
|
|
17
17
|
conditional?: boolean | undefined;
|
|
18
|
-
required?: boolean;
|
|
19
|
-
inputelement?: HTMLInputElement;
|
|
18
|
+
required?: boolean | undefined;
|
|
19
|
+
inputelement?: HTMLInputElement | undefined;
|
|
20
20
|
helptext?: string | undefined;
|
|
21
21
|
};
|
|
22
22
|
events: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
7
|
+
label?: string | undefined;
|
|
8
8
|
boxLabel: string;
|
|
9
9
|
defaultValue?: boolean | undefined;
|
|
10
10
|
conditional?: boolean | undefined;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
inputelement?: HTMLInputElement;
|
|
11
|
+
required?: boolean | undefined;
|
|
12
|
+
inputelement?: HTMLInputElement | undefined;
|
|
13
13
|
helptext?: string | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
package/FieldChoices.svelte.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
7
|
+
label?: string | undefined;
|
|
8
8
|
choices: {
|
|
9
|
-
label?: string;
|
|
9
|
+
label?: string | undefined;
|
|
10
10
|
value: any;
|
|
11
|
-
disabled?: boolean;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
12
|
}[];
|
|
13
13
|
defaultValue?: any;
|
|
14
14
|
conditional?: boolean | undefined;
|
|
15
|
-
maxwidth?: number;
|
|
16
|
-
leftToRight?: boolean;
|
|
15
|
+
maxwidth?: number | undefined;
|
|
16
|
+
leftToRight?: boolean | undefined;
|
|
17
17
|
helptext?: string | undefined;
|
|
18
18
|
};
|
|
19
19
|
events: {
|
package/FieldChooserLink.svelte
CHANGED
|
@@ -66,6 +66,9 @@ async function userUrlEntryDebounced() {
|
|
|
66
66
|
(item.type === 'asset' && !assets) || // they typed the URL for an asset but not allowed
|
|
67
67
|
(item.type === 'asset' && !item.image && images) // they typed the URL for a non-image asset but we only want images
|
|
68
68
|
) {
|
|
69
|
+
// they entered something that is recognized but not allowed
|
|
70
|
+
// they can keep the typing they've done, but the id must be 'undefined' so that nothing
|
|
71
|
+
// is entered into the form data
|
|
69
72
|
selectedAsset = {
|
|
70
73
|
type: 'raw',
|
|
71
74
|
id: undefined,
|
|
@@ -80,14 +83,16 @@ async function userUrlEntryDebounced() {
|
|
|
80
83
|
if (!found) {
|
|
81
84
|
try {
|
|
82
85
|
const _ = new URL(url);
|
|
83
|
-
const newVal = chooserClient.urlToValue?.(url) ?? url;
|
|
84
86
|
selectedAsset = {
|
|
85
87
|
type: 'raw',
|
|
86
|
-
id:
|
|
88
|
+
id: chooserClient.urlToValue?.(url) ?? url,
|
|
87
89
|
url
|
|
88
90
|
};
|
|
89
91
|
}
|
|
90
92
|
catch (e) {
|
|
93
|
+
// here we "select" a raw url so that we do not interrupt the users' typing, but
|
|
94
|
+
// we set its id to 'undefined' so that nothing makes it into the form until it's
|
|
95
|
+
// a valid URL
|
|
91
96
|
selectedAsset = {
|
|
92
97
|
type: 'raw',
|
|
93
98
|
id: undefined,
|
|
@@ -5,19 +5,19 @@ declare const __propDef: {
|
|
|
5
5
|
props: {
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
path: string;
|
|
8
|
-
label?: string;
|
|
8
|
+
label?: string | undefined;
|
|
9
9
|
defaultValue?: boolean | undefined;
|
|
10
10
|
conditional?: boolean | undefined;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
images?: boolean;
|
|
13
|
-
pages?: boolean;
|
|
14
|
-
assets?: boolean;
|
|
15
|
-
folders?: boolean;
|
|
16
|
-
urlEntry?: boolean;
|
|
11
|
+
required?: boolean | undefined;
|
|
12
|
+
images?: boolean | undefined;
|
|
13
|
+
pages?: boolean | undefined;
|
|
14
|
+
assets?: boolean | undefined;
|
|
15
|
+
folders?: boolean | undefined;
|
|
16
|
+
urlEntry?: boolean | undefined;
|
|
17
17
|
initialSource?: string | undefined;
|
|
18
18
|
initialPath?: string | undefined;
|
|
19
19
|
helptext?: string | undefined;
|
|
20
|
-
selectedAsset?: AnyItem | RawURL;
|
|
20
|
+
selectedAsset?: AnyItem | RawURL | undefined;
|
|
21
21
|
};
|
|
22
22
|
events: {
|
|
23
23
|
[evt: string]: CustomEvent<any>;
|
package/FieldCodeEditor.svelte
CHANGED
|
@@ -47,13 +47,13 @@ function updateValidState(invalidIn, messagesIdIn) {
|
|
|
47
47
|
inputelement?.setAttribute('aria-invalid', String(!!invalid));
|
|
48
48
|
const descby = getDescribedBy([messagesid, helptextid]);
|
|
49
49
|
if (descby)
|
|
50
|
-
inputelement?.setAttribute('aria-describedby',
|
|
50
|
+
inputelement?.setAttribute('aria-describedby', descby);
|
|
51
51
|
else
|
|
52
52
|
inputelement?.removeAttribute('aria-describedby');
|
|
53
53
|
}
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
|
-
<FieldStandard bind:id {label} {path} {required} {defaultValue} {conditional} {helptext} serialize={!notNull
|
|
56
|
+
<FieldStandard bind:id {label} {path} {required} {defaultValue} {conditional} {helptext} serialize={!notNull ? nullableSerialize : undefined} deserialize={!notNull ? nullableDeserialize : undefined} let:value let:valid let:invalid let:id let:onBlur let:onChange let:messagesid let:helptextid>
|
|
57
57
|
{@const _ = setSlotProps(helptextid, onChange)}
|
|
58
58
|
{@const __ = updateValidState(invalid, messagesid)}
|
|
59
59
|
<div bind:this={editorelement} style:height="{rows * 1.333}em" class:valid class:invalid on:paste on:focusout={onBlur} use:passActions={use}></div>
|
|
@@ -2,17 +2,17 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import { type HTMLActionEntry } from '@txstate-mws/svelte-components';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
class?: string;
|
|
5
|
+
class?: string | undefined;
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
path: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
notNull?: boolean;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
notNull?: boolean | undefined;
|
|
10
10
|
defaultValue?: any;
|
|
11
|
-
rows?: number;
|
|
11
|
+
rows?: number | undefined;
|
|
12
12
|
conditional?: boolean | undefined;
|
|
13
|
-
required?: boolean;
|
|
14
|
-
use?: HTMLActionEntry[];
|
|
15
|
-
inputelement?: HTMLTextAreaElement;
|
|
13
|
+
required?: boolean | undefined;
|
|
14
|
+
use?: HTMLActionEntry<any>[] | undefined;
|
|
15
|
+
inputelement?: HTMLTextAreaElement | undefined;
|
|
16
16
|
helptext?: string | undefined;
|
|
17
17
|
language: 'js' | 'css' | 'html';
|
|
18
18
|
};
|
package/FieldDate.svelte.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
7
|
+
label?: string | undefined;
|
|
8
8
|
defaultValue?: any;
|
|
9
9
|
min?: Date | {
|
|
10
10
|
toJSDate: () => Date;
|
|
@@ -14,8 +14,8 @@ declare const __propDef: {
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
step?: number | undefined;
|
|
16
16
|
conditional?: boolean | undefined;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
inputelement?: HTMLInputElement;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
inputelement?: HTMLInputElement | undefined;
|
|
19
19
|
helptext?: string | undefined;
|
|
20
20
|
};
|
|
21
21
|
events: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
7
|
+
label?: string | undefined;
|
|
8
8
|
defaultValue?: any;
|
|
9
9
|
min?: Date | {
|
|
10
10
|
toJSDate: () => Date;
|
|
@@ -14,7 +14,7 @@ declare const __propDef: {
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
step?: number | undefined;
|
|
16
16
|
conditional?: boolean | undefined;
|
|
17
|
-
required?: boolean;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
18
|
helptext?: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
events: {
|
|
@@ -4,14 +4,14 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
sourceLabel?: string;
|
|
9
|
-
selectedLabel?: string;
|
|
10
|
-
multiselect?: boolean;
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
sourceLabel?: string | undefined;
|
|
9
|
+
selectedLabel?: string | undefined;
|
|
10
|
+
multiselect?: boolean | undefined;
|
|
11
11
|
choices: PopupMenuItem[];
|
|
12
|
-
defaultValue?: string[];
|
|
12
|
+
defaultValue?: string[] | undefined;
|
|
13
13
|
conditional?: boolean | undefined;
|
|
14
|
-
required?: boolean;
|
|
14
|
+
required?: boolean | undefined;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
17
|
[evt: string]: CustomEvent<any>;
|
package/FieldHidden.svelte
CHANGED
|
@@ -9,6 +9,6 @@ const store = getContext(FORM_CONTEXT);
|
|
|
9
9
|
$: store.setField(path, value);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
|
-
<Field {path} {conditional} serialize={!notNull
|
|
12
|
+
<Field {path} {conditional} serialize={!notNull ? nullableSerialize : undefined} deserialize={!notNull ? nullableDeserialize : undefined} let:value>
|
|
13
13
|
<input type="hidden" name={path} {value} {id}>
|
|
14
14
|
</Field>
|
package/FieldHidden.svelte.d.ts
CHANGED
|
@@ -4,15 +4,15 @@ declare const __propDef: {
|
|
|
4
4
|
path: string;
|
|
5
5
|
label: string;
|
|
6
6
|
initialState?: any;
|
|
7
|
-
minLength?: number;
|
|
7
|
+
minLength?: number | undefined;
|
|
8
8
|
maxLength?: number | undefined;
|
|
9
|
-
compact?: boolean;
|
|
10
|
-
removable?: boolean;
|
|
11
|
-
reorder?: boolean;
|
|
9
|
+
compact?: boolean | undefined;
|
|
10
|
+
removable?: boolean | undefined;
|
|
11
|
+
reorder?: boolean | undefined;
|
|
12
12
|
conditional?: boolean | undefined;
|
|
13
|
-
addMoreText?: string;
|
|
14
|
-
maxedText?: string;
|
|
15
|
-
addMoreClass?: string;
|
|
13
|
+
addMoreText?: string | undefined;
|
|
14
|
+
maxedText?: string | undefined;
|
|
15
|
+
addMoreClass?: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
|
18
18
|
[evt: string]: CustomEvent<any>;
|
package/FieldMultiselect.svelte
CHANGED
|
@@ -29,7 +29,10 @@ async function wrapGetOptions(search) {
|
|
|
29
29
|
}
|
|
30
30
|
const selectedStore = new Store([]);
|
|
31
31
|
let hasInit = !defaultValue.length;
|
|
32
|
+
let inputelement;
|
|
33
|
+
let portal;
|
|
32
34
|
onMount(async () => {
|
|
35
|
+
portal = inputelement.closest('.dialog-content');
|
|
33
36
|
await reactToValue(defaultValue);
|
|
34
37
|
hasInit = true;
|
|
35
38
|
});
|
|
@@ -46,11 +49,12 @@ async function reactToValue(value) {
|
|
|
46
49
|
}
|
|
47
50
|
</script>
|
|
48
51
|
|
|
52
|
+
<div bind:this={inputelement}></div>
|
|
49
53
|
{#if hasInit}
|
|
50
54
|
<FieldStandard bind:id {label} {path} {required} {defaultValue} {conditional} let:value let:valid let:invalid let:id let:onBlur let:setVal>
|
|
51
55
|
{@const _ = reactToValue(value)}
|
|
52
56
|
<div class:valid class:invalid>
|
|
53
|
-
<MultiSelect {id} name={path} {disabled} selected={$selectedStore} {placeholder} getOptions={wrapGetOptions} on:change={e => setVal(e.detail.map(itm => itm.value))} on:blur={onBlur}></MultiSelect>
|
|
57
|
+
<MultiSelect {id} name={path} usePortal={portal} {disabled} selected={$selectedStore} {placeholder} getOptions={wrapGetOptions} on:change={e => setVal(e.detail.map(itm => itm.value))} on:blur={onBlur}></MultiSelect>
|
|
54
58
|
</div>
|
|
55
59
|
</FieldStandard>
|
|
56
60
|
{/if}
|
|
@@ -4,12 +4,12 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
defaultValue?: string[];
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
placeholder?: string | undefined;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
defaultValue?: string[] | undefined;
|
|
11
11
|
conditional?: boolean | undefined;
|
|
12
|
-
required?: boolean;
|
|
12
|
+
required?: boolean | undefined;
|
|
13
13
|
getOptions: (search: string) => Promise<PopupMenuItem[]>;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
package/FieldNumber.svelte.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
7
|
+
label?: string | undefined;
|
|
8
8
|
defaultValue?: number | undefined;
|
|
9
|
-
nullable?: boolean;
|
|
9
|
+
nullable?: boolean | undefined;
|
|
10
10
|
min?: number | undefined;
|
|
11
11
|
max?: number | undefined;
|
|
12
12
|
step?: number | undefined;
|
|
13
13
|
conditional?: boolean | undefined;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
inputelement?: HTMLInputElement;
|
|
14
|
+
required?: boolean | undefined;
|
|
15
|
+
inputelement?: HTMLInputElement | undefined;
|
|
16
16
|
helptext?: string | undefined;
|
|
17
17
|
};
|
|
18
18
|
events: {
|
package/FieldRadio.svelte.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
notNull?: boolean;
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
notNull?: boolean | undefined;
|
|
9
9
|
choices: {
|
|
10
|
-
label?: string;
|
|
10
|
+
label?: string | undefined;
|
|
11
11
|
value: any;
|
|
12
|
-
disabled?: boolean;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
13
|
}[];
|
|
14
14
|
defaultValue?: any;
|
|
15
15
|
conditional?: boolean | undefined;
|
|
16
|
-
required?: boolean;
|
|
17
|
-
horizontal?: boolean;
|
|
16
|
+
required?: boolean | undefined;
|
|
17
|
+
horizontal?: boolean | undefined;
|
|
18
18
|
helptext?: string | undefined;
|
|
19
|
-
number?: boolean;
|
|
20
|
-
date?: boolean;
|
|
21
|
-
datetime?: boolean;
|
|
22
|
-
boolean?: boolean;
|
|
23
|
-
serialize?: (value: any) => string;
|
|
24
|
-
deserialize?: (value: string) => any;
|
|
19
|
+
number?: boolean | undefined;
|
|
20
|
+
date?: boolean | undefined;
|
|
21
|
+
datetime?: boolean | undefined;
|
|
22
|
+
boolean?: boolean | undefined;
|
|
23
|
+
serialize?: ((value: any) => string) | undefined;
|
|
24
|
+
deserialize?: ((value: string) => any) | undefined;
|
|
25
25
|
};
|
|
26
26
|
events: {
|
|
27
27
|
[evt: string]: CustomEvent<any>;
|
package/FieldSelect.svelte.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
class?: string;
|
|
4
|
+
class?: string | undefined;
|
|
5
5
|
id?: string | undefined;
|
|
6
6
|
path: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
notNull?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
placeholder?: string | undefined;
|
|
9
|
+
notNull?: boolean | undefined;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
11
11
|
choices: {
|
|
12
|
-
label?: string;
|
|
12
|
+
label?: string | undefined;
|
|
13
13
|
value: any;
|
|
14
|
-
disabled?: boolean;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
15
|
}[];
|
|
16
16
|
defaultValue?: any;
|
|
17
17
|
conditional?: boolean | undefined;
|
|
18
|
-
required?: boolean;
|
|
19
|
-
inputelement?: HTMLSelectElement;
|
|
18
|
+
required?: boolean | undefined;
|
|
19
|
+
inputelement?: HTMLSelectElement | undefined;
|
|
20
20
|
helptext?: string | undefined;
|
|
21
|
-
number?: boolean;
|
|
22
|
-
date?: boolean;
|
|
23
|
-
datetime?: boolean;
|
|
24
|
-
boolean?: boolean;
|
|
25
|
-
serialize?: (value: any) => string;
|
|
26
|
-
deserialize?: (value: string) => any;
|
|
21
|
+
number?: boolean | undefined;
|
|
22
|
+
date?: boolean | undefined;
|
|
23
|
+
datetime?: boolean | undefined;
|
|
24
|
+
boolean?: boolean | undefined;
|
|
25
|
+
serialize?: ((value: any) => string) | undefined;
|
|
26
|
+
deserialize?: ((value: string) => any) | undefined;
|
|
27
27
|
};
|
|
28
28
|
events: {
|
|
29
29
|
[evt: string]: CustomEvent<any>;
|
package/FieldStandard.svelte
CHANGED
|
@@ -13,12 +13,13 @@ export let datetime = false;
|
|
|
13
13
|
export let boolean = false;
|
|
14
14
|
export let serialize = undefined;
|
|
15
15
|
export let deserialize = undefined;
|
|
16
|
+
export let finalize = undefined;
|
|
16
17
|
export let conditional = undefined;
|
|
17
18
|
export let required = false;
|
|
18
19
|
export let helptext = undefined;
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
|
-
<Field {path} {defaultValue} {conditional} {notNull} {number} {date} {datetime} {boolean} {serialize} {deserialize} let:path let:value let:onBlur let:onChange let:setVal let:messages let:valid let:invalid let:serialize let:deserialize>
|
|
22
|
+
<Field {path} {defaultValue} {conditional} {notNull} {number} {date} {datetime} {boolean} {serialize} {deserialize} {finalize} let:path let:value let:onBlur let:onChange let:setVal let:messages let:valid let:invalid let:serialize let:deserialize>
|
|
22
23
|
<Container {id} {label} {messages} {descid} {required} {helptext} let:messagesid let:helptextid>
|
|
23
24
|
<slot {id} {path} {value} {onBlur} {onChange} {setVal} {valid} {invalid} {messagesid} {helptextid} {serialize} {deserialize} />
|
|
24
25
|
</Container>
|