@stubber/form-fields 2.2.6 → 3.0.0

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 (126) hide show
  1. package/README.md +63 -25
  2. package/dist/form-fields/Autocomplete.svelte +261 -0
  3. package/dist/form-fields/Autocomplete.svelte.d.ts +43 -0
  4. package/dist/form-fields/CollapsibleSection.svelte +127 -0
  5. package/dist/form-fields/CollapsibleSection.svelte.d.ts +26 -0
  6. package/dist/form-fields/FieldLabel.svelte +18 -3
  7. package/dist/form-fields/FieldLabel.svelte.d.ts +1 -0
  8. package/dist/form-fields/FieldMessage.svelte +20 -9
  9. package/dist/form-fields/Form.svelte +19 -2
  10. package/dist/form-fields/Form.svelte.d.ts +2 -0
  11. package/dist/form-fields/UploadStatus.svelte +76 -0
  12. package/dist/form-fields/UploadStatus.svelte.d.ts +18 -0
  13. package/dist/form-fields/fields/_field-builder-reorder.svelte +35 -0
  14. package/dist/form-fields/fields/_field-builder-reorder.svelte.d.ts +22 -0
  15. package/dist/form-fields/{sub → fields}/array-builder-field.svelte +104 -38
  16. package/dist/form-fields/fields/checkbox-autocomplete.svelte +153 -0
  17. package/dist/form-fields/fields/checkbox-field.svelte +69 -0
  18. package/dist/form-fields/{sub → fields}/contact-selector-field.svelte +9 -6
  19. package/dist/form-fields/{sub → fields}/currency-field.svelte +108 -70
  20. package/dist/form-fields/fields/data-indication-field.svelte +39 -0
  21. package/dist/form-fields/fields/date-field.svelte +31 -0
  22. package/dist/form-fields/fields/date-time-field.svelte +31 -0
  23. package/dist/form-fields/{sub → fields}/email-field.svelte +25 -11
  24. package/dist/form-fields/fields/field-builder-field.svelte +568 -0
  25. package/dist/form-fields/fields/file-field.svelte +284 -0
  26. package/dist/form-fields/{sub → fields}/file-field.svelte.d.ts +2 -0
  27. package/dist/form-fields/fields/grid-field.svelte +152 -0
  28. package/dist/form-fields/{sub → fields}/heading-field.svelte +7 -4
  29. package/dist/form-fields/{sub → fields}/html-field.svelte +6 -4
  30. package/dist/form-fields/{sub → fields}/map-field.svelte +121 -78
  31. package/dist/form-fields/{sub → fields}/multi-checkbox-field.svelte +35 -20
  32. package/dist/form-fields/fields/multistep-field.svelte +135 -0
  33. package/dist/form-fields/fields/note-field.svelte +35 -0
  34. package/dist/form-fields/{sub → fields}/number-field.svelte +29 -14
  35. package/dist/form-fields/fields/object-builder-field.svelte +176 -0
  36. package/dist/form-fields/fields/qr-code-scanner-field.svelte +203 -0
  37. package/dist/form-fields/fields/radio-field.svelte +82 -0
  38. package/dist/form-fields/{sub → fields}/radio-field.svelte.d.ts +1 -1
  39. package/dist/form-fields/fields/screenrecorder-field.svelte +255 -0
  40. package/dist/form-fields/{sub → fields}/screenshot-field.svelte +101 -40
  41. package/dist/form-fields/{sub → fields}/scroll-and-read-display-field.svelte +43 -27
  42. package/dist/form-fields/fields/section-field.svelte +73 -0
  43. package/dist/form-fields/fields/select-field.svelte +104 -0
  44. package/dist/form-fields/{sub → fields}/signature-field.svelte +78 -22
  45. package/dist/form-fields/fields/slider-field.svelte +53 -0
  46. package/dist/form-fields/{sub → fields}/smart-text-field.svelte +62 -82
  47. package/dist/form-fields/fields/telephone-field.svelte +108 -0
  48. package/dist/form-fields/{sub → fields}/telephone-field.svelte.d.ts +1 -1
  49. package/dist/form-fields/{sub → fields}/text-field.svelte +28 -11
  50. package/dist/form-fields/{sub → fields}/voicenote-field.svelte +117 -46
  51. package/dist/form-fields/file_creation_options.d.ts +1 -1
  52. package/dist/form-fields/form-field.svelte +8 -1
  53. package/dist/form-fields/icons/ChevronDownIcon.svelte +21 -0
  54. package/dist/form-fields/icons/ChevronDownIcon.svelte.d.ts +20 -0
  55. package/dist/form-fields/icons/QrCodeScannerIcon.svelte +25 -0
  56. package/dist/form-fields/icons/QrCodeScannerIcon.svelte.d.ts +19 -0
  57. package/dist/form-fields/icons/ScreenRecordingIcon.svelte +21 -0
  58. package/dist/form-fields/icons/ScreenRecordingIcon.svelte.d.ts +19 -0
  59. package/dist/form-fields/icons/ScreenshotIcon.svelte +22 -0
  60. package/dist/form-fields/icons/ScreenshotIcon.svelte.d.ts +19 -0
  61. package/dist/form-fields/index.d.ts +5 -1
  62. package/dist/form-fields/index.js +3 -1
  63. package/dist/form-fields/interfaces.d.ts +63 -63
  64. package/dist/form-fields/interfaces.js +42 -39
  65. package/dist/form-fields/intl-tel-input.css +1 -0
  66. package/dist/form-fields/styles.d.ts +17 -0
  67. package/dist/form-fields/styles.js +4 -0
  68. package/package.json +2 -4
  69. package/dist/form-fields/sub/checkbox-autocomplete.svelte +0 -56
  70. package/dist/form-fields/sub/checkbox-field.svelte +0 -42
  71. package/dist/form-fields/sub/data-indication-field.svelte +0 -19
  72. package/dist/form-fields/sub/date-field.svelte +0 -31
  73. package/dist/form-fields/sub/date-time-field.svelte +0 -31
  74. package/dist/form-fields/sub/field-builder-field.svelte +0 -657
  75. package/dist/form-fields/sub/file-field.svelte +0 -159
  76. package/dist/form-fields/sub/grid-field.svelte +0 -69
  77. package/dist/form-fields/sub/multistep-field.svelte +0 -70
  78. package/dist/form-fields/sub/note-field.svelte +0 -18
  79. package/dist/form-fields/sub/object-builder-field.svelte +0 -134
  80. package/dist/form-fields/sub/qr-code-scanner-field.svelte +0 -84
  81. package/dist/form-fields/sub/radio-field.svelte +0 -69
  82. package/dist/form-fields/sub/screenrecorder-field.svelte +0 -178
  83. package/dist/form-fields/sub/section-field.svelte +0 -50
  84. package/dist/form-fields/sub/select-field.svelte +0 -150
  85. package/dist/form-fields/sub/slider-field.svelte +0 -28
  86. package/dist/form-fields/sub/telephone-field.svelte +0 -64
  87. /package/dist/form-fields/{sub → fields}/array-builder-field.svelte.d.ts +0 -0
  88. /package/dist/form-fields/{sub → fields}/checkbox-autocomplete.svelte.d.ts +0 -0
  89. /package/dist/form-fields/{sub → fields}/checkbox-field.svelte.d.ts +0 -0
  90. /package/dist/form-fields/{sub → fields}/code-field.svelte +0 -0
  91. /package/dist/form-fields/{sub → fields}/code-field.svelte.d.ts +0 -0
  92. /package/dist/form-fields/{sub → fields}/contact-selector-field.svelte.d.ts +0 -0
  93. /package/dist/form-fields/{sub → fields}/currency-field.svelte.d.ts +0 -0
  94. /package/dist/form-fields/{sub → fields}/data-indication-field.svelte.d.ts +0 -0
  95. /package/dist/form-fields/{sub → fields}/date-field.svelte.d.ts +0 -0
  96. /package/dist/form-fields/{sub → fields}/date-time-field.svelte.d.ts +0 -0
  97. /package/dist/form-fields/{sub → fields}/email-field.svelte.d.ts +0 -0
  98. /package/dist/form-fields/{sub → fields}/field-builder-field.svelte.d.ts +0 -0
  99. /package/dist/form-fields/{sub → fields}/grid-field.svelte.d.ts +0 -0
  100. /package/dist/form-fields/{sub → fields}/heading-field.svelte.d.ts +0 -0
  101. /package/dist/form-fields/{sub → fields}/hidden-field.svelte +0 -0
  102. /package/dist/form-fields/{sub → fields}/hidden-field.svelte.d.ts +0 -0
  103. /package/dist/form-fields/{sub → fields}/hidden-location-field.svelte +0 -0
  104. /package/dist/form-fields/{sub → fields}/hidden-location-field.svelte.d.ts +0 -0
  105. /package/dist/form-fields/{sub → fields}/html-field.svelte.d.ts +0 -0
  106. /package/dist/form-fields/{sub → fields}/jsoneditor-field.svelte +0 -0
  107. /package/dist/form-fields/{sub → fields}/jsoneditor-field.svelte.d.ts +0 -0
  108. /package/dist/form-fields/{sub → fields}/map-field.svelte.d.ts +0 -0
  109. /package/dist/form-fields/{sub → fields}/multi-checkbox-field.svelte.d.ts +0 -0
  110. /package/dist/form-fields/{sub → fields}/multistep-field.svelte.d.ts +0 -0
  111. /package/dist/form-fields/{sub → fields}/note-field.svelte.d.ts +0 -0
  112. /package/dist/form-fields/{sub → fields}/number-field.svelte.d.ts +0 -0
  113. /package/dist/form-fields/{sub → fields}/object-builder-field.svelte.d.ts +0 -0
  114. /package/dist/form-fields/{sub → fields}/qr-code-scanner-field.svelte.d.ts +0 -0
  115. /package/dist/form-fields/{sub → fields}/screenrecorder-field.svelte.d.ts +0 -0
  116. /package/dist/form-fields/{sub → fields}/screenshot-field.svelte.d.ts +0 -0
  117. /package/dist/form-fields/{sub → fields}/scroll-and-read-display-field.svelte.d.ts +0 -0
  118. /package/dist/form-fields/{sub → fields}/section-field.svelte.d.ts +0 -0
  119. /package/dist/form-fields/{sub → fields}/select-field.svelte.d.ts +0 -0
  120. /package/dist/form-fields/{sub → fields}/selectresource-field.svelte +0 -0
  121. /package/dist/form-fields/{sub → fields}/selectresource-field.svelte.d.ts +0 -0
  122. /package/dist/form-fields/{sub → fields}/signature-field.svelte.d.ts +0 -0
  123. /package/dist/form-fields/{sub → fields}/slider-field.svelte.d.ts +0 -0
  124. /package/dist/form-fields/{sub → fields}/smart-text-field.svelte.d.ts +0 -0
  125. /package/dist/form-fields/{sub → fields}/text-field.svelte.d.ts +0 -0
  126. /package/dist/form-fields/{sub → fields}/voicenote-field.svelte.d.ts +0 -0
@@ -1,20 +1,31 @@
1
1
  <script context="module">import {} from "../interfaces";
2
2
  </script>
3
3
 
4
- <script>import { Button } from "@stubber/ui/button";
5
- import { snakeCase } from "lodash-es";
4
+ <script>import { snakeCase } from "lodash-es";
5
+ import { getContext, onDestroy } from "svelte";
6
6
  import FieldLabel from "../FieldLabel.svelte";
7
7
  import FieldMessage from "../FieldMessage.svelte";
8
+ import UploadStatus from "../UploadStatus.svelte";
8
9
  import {
9
10
  append_attachment,
10
11
  remove_attachment,
11
12
  uploadFiles
12
13
  } from "../fileserver";
14
+ import { STYLES_CONTEXT, classNames } from "../styles";
13
15
  export let fieldStore;
16
+ const styles = getContext(STYLES_CONTEXT);
14
17
  const file_name_prefix = snakeCase($fieldStore.label || "voicenote");
15
18
  let mediaRecorder = null;
16
19
  let media = [];
17
20
  let fileList = [];
21
+ onDestroy(() => {
22
+ if (mediaRecorder?.state === "recording") {
23
+ mediaRecorder.onstop = null;
24
+ mediaRecorder.stop();
25
+ }
26
+ mediaRecorder?.stream.getTracks().forEach((track) => track.stop());
27
+ fileList.forEach((item) => item.previewUrl && URL.revokeObjectURL(item.previewUrl));
28
+ });
18
29
  $: isRecording = mediaRecorder?.state === "recording";
19
30
  $: buttonLabel = isRecording ? "Stop Recording" : "Start Recording";
20
31
  let max_files_param = $fieldStore.params?.max_files;
@@ -41,19 +52,21 @@ async function startRecording() {
41
52
  let filename = `${file_name_prefix}_${id}.ogg`;
42
53
  let blob = new Blob(media, { type: "audio/ogg; codecs=opus" });
43
54
  let file = new File([blob], filename, { type: "audio/ogg; codecs=opus" });
44
- uploadFile(file, blob, filename);
55
+ uploadFile(file, blob, filename, URL.createObjectURL(blob));
45
56
  media = [];
57
+ mediaRecorder?.stream.getTracks().forEach((track) => track.stop());
46
58
  mediaRecorder = null;
47
59
  };
48
60
  mediaRecorder.start();
49
61
  }
50
- async function uploadFile(file, blob, filename) {
62
+ async function uploadFile(file, blob, filename, previewUrl) {
51
63
  fileList = [
52
64
  ...fileList,
53
65
  {
54
66
  file,
55
67
  blob,
56
68
  filename,
69
+ previewUrl,
57
70
  is_uploaded: false,
58
71
  is_failed: false
59
72
  }
@@ -112,54 +125,112 @@ function stopRecording() {
112
125
  }
113
126
  function removeFile(item) {
114
127
  fileList = fileList.filter((f) => f !== item);
128
+ if (item.previewUrl) URL.revokeObjectURL(item.previewUrl);
115
129
  remove_attachment(item.fileuuid, $fieldStore.attachmentsStore);
116
130
  }
117
131
  </script>
118
132
 
119
- <FieldLabel {fieldStore} />
120
- <div class="flex flex-col items-start gap-2">
121
- <Button variant={isRecording ? "destructive" : "default"} on:click={toggleRecording}>
122
- {#if isRecording}
123
- <i class="fa-solid fa-microphone-slash" />
124
- {:else}
125
- <i class="fa-solid fa-microphone" />
126
- {/if}
127
- {buttonLabel}
128
- </Button>
129
- <div class="flex w-full flex-col gap-1">
130
- {#each fileList as item}
131
- <div class="flex w-full flex-row items-center gap-1">
132
- <div class="flex h-6 w-6 shrink-0 items-center justify-center">
133
- {#if item.is_uploaded}
134
- <i class="fa fa-check text-success-500" />
135
- {:else if item.is_failed}
136
- <i class="fa-regular fa-triangle-exclamation text-danger-400" />
133
+ <div class="voicenote-field">
134
+ <FieldLabel {fieldStore} />
135
+ <div
136
+ class="voicenote-control"
137
+ class:voicenote-control-invalid={$fieldStore.validation_result?.type === "error"}
138
+ aria-invalid={$fieldStore.validation_result?.type === "error" ? true : undefined}
139
+ >
140
+ <div class="voicenote-list" aria-live="polite">
141
+ {#each fileList as item}
142
+ <div class={classNames("voicenote-item", $styles.uploadItem)}>
143
+ <UploadStatus
144
+ status={item.is_uploaded ? "uploaded" : item.is_failed ? "failed" : "uploading"}
145
+ />
146
+ {#if item.previewUrl}
147
+ <audio class="voicenote-preview" controls src={item.previewUrl}>
148
+ <track kind="captions" />
149
+ </audio>
137
150
  {:else}
138
- <i class="fa fa-pulse fa-spinner text-surface-500" />
151
+ <p class="voicenote-filename">{item?.filename}</p>
139
152
  {/if}
153
+ <button
154
+ type="button"
155
+ class={classNames("voicenote-remove", $styles.button)}
156
+ data-variant="destructive"
157
+ data-size="icon"
158
+ aria-label="Remove {item.filename}"
159
+ on:click={() => removeFile(item)}
160
+ >
161
+ <span aria-hidden="true">×</span>
162
+ </button>
140
163
  </div>
141
- {#if item?.blob}
142
- <div class="w-full shrink p-2">
143
- <div class="overflow-hidden">
144
- <audio class="w-full" controls src={window.URL.createObjectURL(item.blob)} />
145
- </div>
146
- </div>
147
- {:else}
148
- <div class="w-full shrink truncate rounded-sm border border-surface-200 py-1 pl-2">
149
- <p class="text-fluid-md text-surface-800">
150
- {item?.filename}
151
- </p>
152
- </div>
153
- {/if}
154
- <Button
155
- variant="destructive"
156
- class="h-6 w-6 shrink-0 p-0"
157
- on:click={() => removeFile(item)}
158
- >
159
- <i class="fa-solid fa-2xs fa-x" />
160
- </Button>
161
- </div>
162
- {/each}
164
+ {/each}
165
+ </div>
166
+ <button
167
+ id={$fieldStore.id}
168
+ type="button"
169
+ class={classNames("voicenote-record", $styles.button)}
170
+ data-variant="primary"
171
+ class:voicenote-record-active={isRecording}
172
+ aria-pressed={isRecording}
173
+ aria-describedby="message-{$fieldStore.id}"
174
+ on:click={toggleRecording}
175
+ >
176
+ <span class="voicenote-icon" aria-hidden="true">
177
+ {isRecording ? "■" : "●"}
178
+ </span>
179
+ {buttonLabel}
180
+ </button>
163
181
  </div>
182
+ <FieldMessage {fieldStore} />
164
183
  </div>
165
- <FieldMessage {fieldStore} />
184
+
185
+ <style>
186
+ .voicenote-field,
187
+ .voicenote-control,
188
+ .voicenote-list {
189
+ box-sizing: border-box;
190
+ width: 100%;
191
+ min-width: 0;
192
+ }
193
+
194
+ .voicenote-list {
195
+ display: flex;
196
+ flex-direction: column;
197
+ gap: 0.5rem;
198
+ }
199
+
200
+ .voicenote-control {
201
+ display: flex;
202
+ flex-direction: column;
203
+ gap: 0.5rem;
204
+ }
205
+
206
+ :where(.voicenote-item) {
207
+ display: flex;
208
+ align-items: center;
209
+ gap: 0.5rem;
210
+ min-width: 0;
211
+ padding: var(--form-upload-item-padding, 0.625rem 0.75rem);
212
+ border: var(--form-upload-item-border, 1px solid #e2e8f0);
213
+ border-radius: var(--form-upload-item-radius, 0.5rem);
214
+ background: var(--form-upload-item-background, #fff);
215
+ }
216
+
217
+ .voicenote-preview,
218
+ .voicenote-filename {
219
+ flex: 1;
220
+ min-width: 0;
221
+ max-width: 100%;
222
+ }
223
+
224
+ .voicenote-filename {
225
+ margin: 0;
226
+ overflow-wrap: anywhere;
227
+ }
228
+
229
+ :where(.voicenote-record) {
230
+ align-self: flex-start;
231
+ }
232
+
233
+ :where(.voicenote-remove) {
234
+ flex: none;
235
+ }
236
+ </style>
@@ -1,4 +1,4 @@
1
1
  import type { IInitialForm } from "./interfaces";
2
- import type { ISectionField } from "./sub/section-field.svelte";
2
+ import type { ISectionField } from "./fields/section-field.svelte";
3
3
  export declare const file_creation_options_field_spec: ISectionField;
4
4
  export declare const basic_files_field_param_spec: IInitialForm;
@@ -30,7 +30,14 @@ const handle_field_type_change = (new_fieldtype) => {
30
30
  </script>
31
31
 
32
32
  {#if !$fieldStore.hidden}
33
- <div class="w-full">
33
+ <div class="formField">
34
34
  <svelte:component this={component} {fieldStore} />
35
35
  </div>
36
36
  {/if}
37
+
38
+ <style>
39
+ .formField {
40
+ min-width: 0;
41
+ width: 100%;
42
+ }
43
+ </style>
@@ -0,0 +1,21 @@
1
+ <script>export let size = 16;
2
+ export let strokeWidth = 2;
3
+ export let title = void 0;
4
+ </script>
5
+
6
+ <svg
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ stroke="currentColor"
13
+ stroke-width={strokeWidth}
14
+ stroke-linecap="round"
15
+ stroke-linejoin="round"
16
+ aria-hidden={title ? undefined : "true"}
17
+ role={title ? "img" : undefined}
18
+ >
19
+ {#if title}<title>{title}</title>{/if}
20
+ <path d="m6 9 6 6 6-6" />
21
+ </svg>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ size?: number | string;
5
+ strokeWidth?: number;
6
+ title?: string | undefined;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {};
12
+ exports?: {} | undefined;
13
+ bindings?: string | undefined;
14
+ };
15
+ export type ChevronDownIconProps = typeof __propDef.props;
16
+ export type ChevronDownIconEvents = typeof __propDef.events;
17
+ export type ChevronDownIconSlots = typeof __propDef.slots;
18
+ export default class ChevronDownIcon extends SvelteComponent<ChevronDownIconProps, ChevronDownIconEvents, ChevronDownIconSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,25 @@
1
+ <script>export let size = 18;
2
+ export let strokeWidth = 1.75;
3
+ </script>
4
+
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width={size}
8
+ height={size}
9
+ viewBox="0 0 24 24"
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width={strokeWidth}
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ aria-hidden="true"
16
+ >
17
+ <path d="M8 3H5a2 2 0 0 0-2 2v3" />
18
+ <path d="M16 3h3a2 2 0 0 1 2 2v3" />
19
+ <path d="M21 16v3a2 2 0 0 1-2 2h-3" />
20
+ <path d="M8 21H5a2 2 0 0 1-2-2v-3" />
21
+ <rect x="7" y="7" width="3" height="3" />
22
+ <rect x="14" y="7" width="3" height="3" />
23
+ <rect x="7" y="14" width="3" height="3" />
24
+ <path d="M14 14h1v1h2v2h-3v-3Z" />
25
+ </svg>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ size?: number | string;
5
+ strokeWidth?: number;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type QrCodeScannerIconProps = typeof __propDef.props;
15
+ export type QrCodeScannerIconEvents = typeof __propDef.events;
16
+ export type QrCodeScannerIconSlots = typeof __propDef.slots;
17
+ export default class QrCodeScannerIcon extends SvelteComponent<QrCodeScannerIconProps, QrCodeScannerIconEvents, QrCodeScannerIconSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,21 @@
1
+ <script>export let size = 16;
2
+ export let strokeWidth = 2;
3
+ </script>
4
+
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width={size}
8
+ height={size}
9
+ viewBox="0 0 24 24"
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width={strokeWidth}
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ aria-hidden="true"
16
+ >
17
+ <rect x="3" y="4" width="18" height="14" rx="2" />
18
+ <path d="M8 22h8" />
19
+ <path d="M12 18v4" />
20
+ <circle cx="12" cy="11" r="3" />
21
+ </svg>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ size?: number | string;
5
+ strokeWidth?: number;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type ScreenRecordingIconProps = typeof __propDef.props;
15
+ export type ScreenRecordingIconEvents = typeof __propDef.events;
16
+ export type ScreenRecordingIconSlots = typeof __propDef.slots;
17
+ export default class ScreenRecordingIcon extends SvelteComponent<ScreenRecordingIconProps, ScreenRecordingIconEvents, ScreenRecordingIconSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,22 @@
1
+ <script>export let size = 16;
2
+ export let strokeWidth = 2;
3
+ </script>
4
+
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width={size}
8
+ height={size}
9
+ viewBox="0 0 24 24"
10
+ fill="none"
11
+ stroke="currentColor"
12
+ stroke-width={strokeWidth}
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ aria-hidden="true"
16
+ >
17
+ <path d="M4 8V6a2 2 0 0 1 2-2h2" />
18
+ <path d="M16 4h2a2 2 0 0 1 2 2v2" />
19
+ <path d="M20 16v2a2 2 0 0 1-2 2h-2" />
20
+ <path d="M8 20H6a2 2 0 0 1-2-2v-2" />
21
+ <circle cx="12" cy="12" r="3" />
22
+ </svg>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ size?: number | string;
5
+ strokeWidth?: number;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {};
11
+ exports?: {} | undefined;
12
+ bindings?: string | undefined;
13
+ };
14
+ export type ScreenshotIconProps = typeof __propDef.props;
15
+ export type ScreenshotIconEvents = typeof __propDef.events;
16
+ export type ScreenshotIconSlots = typeof __propDef.slots;
17
+ export default class ScreenshotIcon extends SvelteComponent<ScreenshotIconProps, ScreenshotIconEvents, ScreenshotIconSlots> {
18
+ }
19
+ export {};
@@ -1,3 +1,7 @@
1
1
  import Form from "./Form.svelte";
2
- export { Form };
2
+ import Autocomplete from "./Autocomplete.svelte";
3
+ import ChevronDownIcon from "./icons/ChevronDownIcon.svelte";
4
+ export { Autocomplete, ChevronDownIcon, Form };
5
+ export type { AutocompleteOption } from "./Autocomplete.svelte";
3
6
  export type { IFormDependencies, IInitialForm } from "./interfaces";
7
+ export type { FormFieldStyles } from "./styles";
@@ -1,2 +1,4 @@
1
1
  import Form from "./Form.svelte";
2
- export { Form };
2
+ import Autocomplete from "./Autocomplete.svelte";
3
+ import ChevronDownIcon from "./icons/ChevronDownIcon.svelte";
4
+ export { Autocomplete, ChevronDownIcon, Form };
@@ -1,69 +1,69 @@
1
1
  import type { Socket } from "socket.io-client";
2
2
  import type { Writable } from "svelte/store";
3
3
  import type { UploadedFile } from "./fileserver";
4
- import type { IArrayBuilderField } from "./sub/array-builder-field.svelte";
5
- import ArrayBuilderField from "./sub/array-builder-field.svelte";
6
- import type { ICheckboxAutocompleteField } from "./sub/checkbox-autocomplete.svelte";
7
- import CheckboxAutocomplete from "./sub/checkbox-autocomplete.svelte";
8
- import type { ICheckboxField } from "./sub/checkbox-field.svelte";
9
- import CheckboxField from "./sub/checkbox-field.svelte";
10
- import type { ICodeField } from "./sub/code-field.svelte";
11
- import CodeField from "./sub/code-field.svelte";
12
- import type { IContactSelectorField } from "./sub/contact-selector-field.svelte";
13
- import ContactSelectorField from "./sub/contact-selector-field.svelte";
14
- import type { ICurrencyField } from "./sub/currency-field.svelte";
15
- import CurrencyField from "./sub/currency-field.svelte";
16
- import DataIndicationField, { type IDataIndicationField } from "./sub/data-indication-field.svelte";
17
- import type { IDateField } from "./sub/date-field.svelte";
18
- import DateField from "./sub/date-field.svelte";
19
- import type { IDateTimeField } from "./sub/date-time-field.svelte";
20
- import DateTimeField from "./sub/date-time-field.svelte";
21
- import type { IEmailField } from "./sub/email-field.svelte";
22
- import EmailField from "./sub/email-field.svelte";
23
- import FieldBuilderField, { type IFieldBuilderField } from "./sub/field-builder-field.svelte";
24
- import FileField, { type IFileField } from "./sub/file-field.svelte";
25
- import type { IGridField } from "./sub/grid-field.svelte";
26
- import GridField from "./sub/grid-field.svelte";
27
- import HeadingField, { type IHeadingField } from "./sub/heading-field.svelte";
28
- import HiddenField, { type IHiddenField } from "./sub/hidden-field.svelte";
29
- import type { IHiddenLocationField } from "./sub/hidden-location-field.svelte";
30
- import HiddenLocationField from "./sub/hidden-location-field.svelte";
31
- import HtmlField, { type IHTMLField } from "./sub/html-field.svelte";
32
- import JSONEditorField, { type IJSONEditorField } from "./sub/jsoneditor-field.svelte";
33
- import type { IMapField } from "./sub/map-field.svelte";
34
- import MapField from "./sub/map-field.svelte";
35
- import type { IMultiCheckboxField } from "./sub/multi-checkbox-field.svelte";
36
- import MultiCheckboxField from "./sub/multi-checkbox-field.svelte";
37
- import type { IMultistepField } from "./sub/multistep-field.svelte";
38
- import MultistepField from "./sub/multistep-field.svelte";
39
- import NoteField, { type INoteField } from "./sub/note-field.svelte";
40
- import type { INumberField } from "./sub/number-field.svelte";
41
- import NumberField from "./sub/number-field.svelte";
42
- import ObjectBuilderField, { type IObjectBuilderField } from "./sub/object-builder-field.svelte";
43
- import QrCodeScannerField, { type IQRCodeScannerField } from "./sub/qr-code-scanner-field.svelte";
44
- import type { IRadioField } from "./sub/radio-field.svelte";
45
- import RadioField from "./sub/radio-field.svelte";
46
- import type { IScreenRecorderField } from "./sub/screenrecorder-field.svelte";
47
- import ScreenrecorderField from "./sub/screenrecorder-field.svelte";
48
- import type { IScreenshotField } from "./sub/screenshot-field.svelte";
49
- import ScreenshotField from "./sub/screenshot-field.svelte";
50
- import ScrollAndReadDisplayField, { type IScrollAndReadDisplayField } from "./sub/scroll-and-read-display-field.svelte";
51
- import type { ISectionField } from "./sub/section-field.svelte";
52
- import SectionField from "./sub/section-field.svelte";
53
- import type { ISelectField } from "./sub/select-field.svelte";
54
- import SelectField from "./sub/select-field.svelte";
55
- import SelectresourceField, { type ISelectResourceField } from "./sub/selectresource-field.svelte";
56
- import SignatureField, { type ISignatureField } from "./sub/signature-field.svelte";
57
- import type { ISliderField } from "./sub/slider-field.svelte";
58
- import SliderField from "./sub/slider-field.svelte";
59
- import type { ISmartTextField } from "./sub/smart-text-field.svelte";
60
- import SmartTextField from "./sub/smart-text-field.svelte";
61
- import type { ITelephoneField } from "./sub/telephone-field.svelte";
62
- import TelephoneField from "./sub/telephone-field.svelte";
63
- import type { ITextField } from "./sub/text-field.svelte";
64
- import TextField from "./sub/text-field.svelte";
65
- import type { IVoicenoteField } from "./sub/voicenote-field.svelte";
66
- import VoicenoteField from "./sub/voicenote-field.svelte";
4
+ import type { IArrayBuilderField } from "./fields/array-builder-field.svelte";
5
+ import ArrayBuilderField from "./fields/array-builder-field.svelte";
6
+ import type { ICheckboxAutocompleteField } from "./fields/checkbox-autocomplete.svelte";
7
+ import CheckboxAutocomplete from "./fields/checkbox-autocomplete.svelte";
8
+ import type { ICheckboxField } from "./fields/checkbox-field.svelte";
9
+ import CheckboxField from "./fields/checkbox-field.svelte";
10
+ import type { ICodeField } from "./fields/code-field.svelte";
11
+ import CodeField from "./fields/code-field.svelte";
12
+ import type { IContactSelectorField } from "./fields/contact-selector-field.svelte";
13
+ import ContactSelectorField from "./fields/contact-selector-field.svelte";
14
+ import type { ICurrencyField } from "./fields/currency-field.svelte";
15
+ import CurrencyField from "./fields/currency-field.svelte";
16
+ import DataIndicationField, { type IDataIndicationField } from "./fields/data-indication-field.svelte";
17
+ import type { IDateField } from "./fields/date-field.svelte";
18
+ import DateField from "./fields/date-field.svelte";
19
+ import type { IDateTimeField } from "./fields/date-time-field.svelte";
20
+ import DateTimeField from "./fields/date-time-field.svelte";
21
+ import type { IEmailField } from "./fields/email-field.svelte";
22
+ import EmailField from "./fields/email-field.svelte";
23
+ import FieldBuilderField, { type IFieldBuilderField } from "./fields/field-builder-field.svelte";
24
+ import FileField, { type IFileField } from "./fields/file-field.svelte";
25
+ import type { IGridField } from "./fields/grid-field.svelte";
26
+ import GridField from "./fields/grid-field.svelte";
27
+ import HeadingField, { type IHeadingField } from "./fields/heading-field.svelte";
28
+ import HiddenField, { type IHiddenField } from "./fields/hidden-field.svelte";
29
+ import type { IHiddenLocationField } from "./fields/hidden-location-field.svelte";
30
+ import HiddenLocationField from "./fields/hidden-location-field.svelte";
31
+ import HtmlField, { type IHTMLField } from "./fields/html-field.svelte";
32
+ import JSONEditorField, { type IJSONEditorField } from "./fields/jsoneditor-field.svelte";
33
+ import type { IMapField } from "./fields/map-field.svelte";
34
+ import MapField from "./fields/map-field.svelte";
35
+ import type { IMultiCheckboxField } from "./fields/multi-checkbox-field.svelte";
36
+ import MultiCheckboxField from "./fields/multi-checkbox-field.svelte";
37
+ import type { IMultistepField } from "./fields/multistep-field.svelte";
38
+ import MultistepField from "./fields/multistep-field.svelte";
39
+ import NoteField, { type INoteField } from "./fields/note-field.svelte";
40
+ import type { INumberField } from "./fields/number-field.svelte";
41
+ import NumberField from "./fields/number-field.svelte";
42
+ import ObjectBuilderField, { type IObjectBuilderField } from "./fields/object-builder-field.svelte";
43
+ import QrCodeScannerField, { type IQRCodeScannerField } from "./fields/qr-code-scanner-field.svelte";
44
+ import type { IRadioField } from "./fields/radio-field.svelte";
45
+ import RadioField from "./fields/radio-field.svelte";
46
+ import type { IScreenRecorderField } from "./fields/screenrecorder-field.svelte";
47
+ import ScreenrecorderField from "./fields/screenrecorder-field.svelte";
48
+ import type { IScreenshotField } from "./fields/screenshot-field.svelte";
49
+ import ScreenshotField from "./fields/screenshot-field.svelte";
50
+ import ScrollAndReadDisplayField, { type IScrollAndReadDisplayField } from "./fields/scroll-and-read-display-field.svelte";
51
+ import type { ISectionField } from "./fields/section-field.svelte";
52
+ import SectionField from "./fields/section-field.svelte";
53
+ import type { ISelectField } from "./fields/select-field.svelte";
54
+ import SelectField from "./fields/select-field.svelte";
55
+ import SelectresourceField, { type ISelectResourceField } from "./fields/selectresource-field.svelte";
56
+ import SignatureField, { type ISignatureField } from "./fields/signature-field.svelte";
57
+ import type { ISliderField } from "./fields/slider-field.svelte";
58
+ import SliderField from "./fields/slider-field.svelte";
59
+ import type { ISmartTextField } from "./fields/smart-text-field.svelte";
60
+ import SmartTextField from "./fields/smart-text-field.svelte";
61
+ import type { ITelephoneField } from "./fields/telephone-field.svelte";
62
+ import TelephoneField from "./fields/telephone-field.svelte";
63
+ import type { ITextField } from "./fields/text-field.svelte";
64
+ import TextField from "./fields/text-field.svelte";
65
+ import type { IVoicenoteField } from "./fields/voicenote-field.svelte";
66
+ import VoicenoteField from "./fields/voicenote-field.svelte";
67
67
  export interface IBaseField<TParams> {
68
68
  __key?: string;
69
69
  name?: string;