@dosgato/dialog 0.0.32 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/Button.svelte.d.ts +7 -7
  2. package/ButtonGroup.svelte.d.ts +5 -5
  3. package/Checkbox.svelte.d.ts +4 -4
  4. package/Container.svelte.d.ts +2 -2
  5. package/Dialog.svelte +3 -2
  6. package/Dialog.svelte.d.ts +14 -14
  7. package/FieldAutocomplete.svelte +7 -2
  8. package/FieldAutocomplete.svelte.d.ts +9 -9
  9. package/FieldCheckbox.svelte.d.ts +4 -4
  10. package/FieldChoices.svelte.d.ts +6 -6
  11. package/FieldChooserLink.svelte +20 -4
  12. package/FieldChooserLink.svelte.d.ts +8 -8
  13. package/FieldCodeEditor.svelte +2 -2
  14. package/FieldCodeEditor.svelte.d.ts +7 -7
  15. package/FieldDate.svelte.d.ts +4 -4
  16. package/FieldDateTime.svelte.d.ts +3 -3
  17. package/FieldDualListbox.svelte.d.ts +6 -6
  18. package/FieldHidden.svelte +1 -1
  19. package/FieldHidden.svelte.d.ts +2 -2
  20. package/FieldMultiple.svelte.d.ts +7 -7
  21. package/FieldMultiselect.svelte +5 -1
  22. package/FieldMultiselect.svelte.d.ts +5 -5
  23. package/FieldNumber.svelte.d.ts +5 -5
  24. package/FieldRadio.svelte.d.ts +13 -13
  25. package/FieldSelect.svelte.d.ts +15 -15
  26. package/FieldStandard.svelte.d.ts +10 -10
  27. package/FieldText.svelte +1 -1
  28. package/FieldText.svelte.d.ts +8 -8
  29. package/FieldTextArea.svelte +1 -1
  30. package/FieldTextArea.svelte.d.ts +6 -6
  31. package/FileIcon.svelte.d.ts +5 -5
  32. package/Form.svelte +3 -3
  33. package/Form.svelte.d.ts +5 -5
  34. package/FormDialog.svelte +2 -2
  35. package/FormDialog.svelte.d.ts +24 -21
  36. package/Icon.svelte.d.ts +5 -5
  37. package/Input.svelte.d.ts +8 -8
  38. package/Listbox.svelte +2 -2
  39. package/Listbox.svelte.d.ts +6 -6
  40. package/Radio.svelte.d.ts +4 -4
  41. package/Switcher.svelte.d.ts +11 -11
  42. package/TabStore.d.ts +3 -3
  43. package/TabStore.js +7 -6
  44. package/Tabs.svelte +6 -6
  45. package/Tabs.svelte.d.ts +2 -2
  46. package/chooser/Chooser.svelte +4 -3
  47. package/chooser/Chooser.svelte.d.ts +12 -12
  48. package/chooser/ChooserStore.d.ts +4 -4
  49. package/chooser/ChooserStore.js +3 -3
  50. package/colorpicker/FieldColorPicker.svelte.d.ts +5 -5
  51. package/cropper/FieldCropper.svelte +219 -0
  52. package/cropper/FieldCropper.svelte.d.ts +24 -0
  53. package/cropper/cropper.d.ts +78 -0
  54. package/cropper/cropper.js +220 -0
  55. package/cropper/index.d.ts +2 -0
  56. package/cropper/index.js +2 -0
  57. package/helpers.d.ts +1 -1
  58. package/iconpicker/FieldIconPicker.svelte +5 -5
  59. package/iconpicker/FieldIconPicker.svelte.d.ts +3 -3
  60. package/index.d.ts +1 -1
  61. package/index.js +1 -1
  62. package/package.json +13 -14
  63. package/tree/LoadIcon.svelte.d.ts +2 -2
  64. package/tree/Tree.svelte.d.ts +11 -11
  65. package/tree/TreeNode.svelte +4 -1
  66. package/tree/TreeNode.svelte.d.ts +4 -4
  67. package/tree/treestore.d.ts +16 -16
  68. package/tree/treestore.js +3 -3
  69. package/imagecropper/FieldImageCropper.svelte +0 -377
  70. package/imagecropper/FieldImageCropper.svelte.d.ts +0 -25
  71. package/imagecropper/ImageCropperStore.d.ts +0 -15
  72. package/imagecropper/ImageCropperStore.js +0 -96
  73. package/imagecropper/imagecropper.d.ts +0 -20
  74. package/imagecropper/imagecropper.js +0 -1
  75. package/imagecropper/index.d.ts +0 -1
  76. package/imagecropper/index.js +0 -1
@@ -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?: 'button' | 'submit';
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: {
@@ -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;
@@ -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: {
@@ -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;
@@ -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?: 'tiny' | 'small' | 'normal' | 'large' | 'xl';
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
  };
@@ -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 && nullableSerialize} deserialize={!notNull && nullableDeserialize} let:value let:setVal let:valid let:invalid let:id let:onBlur let:onChange let:messagesid let:helptextid>
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: {
@@ -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: {
@@ -46,12 +46,19 @@ function onChange(setVal) {
46
46
  hide();
47
47
  };
48
48
  }
49
- async function userUrlEntry() {
49
+ let timer;
50
+ function userUrlEntry() {
51
+ clearTimeout(timer);
52
+ timer = setTimeout(userUrlEntryDebounced.bind(this), 300);
53
+ }
54
+ async function userUrlEntryDebounced() {
50
55
  const url = this.value;
51
56
  store.clearPreview();
52
57
  let found = false;
53
58
  if (chooserClient.findByUrl) {
54
59
  const item = await chooserClient.findByUrl(url);
60
+ if (url !== this.value)
61
+ return;
55
62
  if (item) {
56
63
  found = true;
57
64
  if ((item.type === 'page' && !pages) || // they typed the URL for a page but we don't allow pages right now
@@ -59,6 +66,9 @@ async function userUrlEntry() {
59
66
  (item.type === 'asset' && !assets) || // they typed the URL for an asset but not allowed
60
67
  (item.type === 'asset' && !item.image && images) // they typed the URL for a non-image asset but we only want images
61
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
62
72
  selectedAsset = {
63
73
  type: 'raw',
64
74
  id: undefined,
@@ -73,14 +83,16 @@ async function userUrlEntry() {
73
83
  if (!found) {
74
84
  try {
75
85
  const _ = new URL(url);
76
- const newVal = chooserClient.urlToValue?.(url) ?? url;
77
86
  selectedAsset = {
78
87
  type: 'raw',
79
- id: newVal,
88
+ id: chooserClient.urlToValue?.(url) ?? url,
80
89
  url
81
90
  };
82
91
  }
83
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
84
96
  selectedAsset = {
85
97
  type: 'raw',
86
98
  id: undefined,
@@ -93,7 +105,11 @@ async function userUrlEntry() {
93
105
  }
94
106
  async function updateSelected(..._) {
95
107
  if ($value && selectedAsset?.id !== $value) {
96
- selectedAsset = await chooserClient.findById($value);
108
+ const valueBeforeFind = $value;
109
+ const asset = await chooserClient.findById($value);
110
+ if ($value !== valueBeforeFind)
111
+ return;
112
+ selectedAsset = asset;
97
113
  try {
98
114
  if (!selectedAsset)
99
115
  selectedAsset = { type: 'raw', id: $value, url: chooserClient.valueToUrl?.($value) ?? $value };
@@ -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>;
@@ -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', getDescribedBy([messagesid, helptextid]));
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 && nullableSerialize} deserialize={!notNull && nullableDeserialize} let:value let:valid let:invalid let:id let:onBlur let:onChange let:messagesid let:helptextid>
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
  };
@@ -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>;
@@ -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 && nullableSerialize} deserialize={!notNull && nullableDeserialize} let:value>
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>
@@ -3,8 +3,8 @@ declare const __propDef: {
3
3
  props: {
4
4
  id?: string | undefined;
5
5
  path: string;
6
- value?: string;
7
- notNull?: boolean;
6
+ value?: string | undefined;
7
+ notNull?: boolean | undefined;
8
8
  conditional?: boolean | undefined;
9
9
  };
10
10
  events: {
@@ -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>;
@@ -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: {
@@ -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: {
@@ -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>;
@@ -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>;