@medyll/idae-machine 0.87.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 (48) hide show
  1. package/README.md +230 -0
  2. package/dist/db/dataModel.d.ts +23 -0
  3. package/dist/db/dataModel.js +40 -0
  4. package/dist/db/dbFields.d.ts +130 -0
  5. package/dist/db/dbFields.js +606 -0
  6. package/dist/db/dbSchema.d.ts +456 -0
  7. package/dist/db/dbSchema.js +456 -0
  8. package/dist/form/CollectionButton.svelte +26 -0
  9. package/dist/form/CollectionButton.svelte.d.ts +22 -0
  10. package/dist/form/CollectionFieldGuess.svelte +29 -0
  11. package/dist/form/CollectionFieldGuess.svelte.d.ts +11 -0
  12. package/dist/form/CollectionFks.svelte +24 -0
  13. package/dist/form/CollectionFks.svelte.d.ts +9 -0
  14. package/dist/form/CollectionList.svelte +93 -0
  15. package/dist/form/CollectionList.svelte.d.ts +30 -0
  16. package/dist/form/CollectionListMenu.svelte +46 -0
  17. package/dist/form/CollectionListMenu.svelte.d.ts +27 -0
  18. package/dist/form/CollectionReverseFks.svelte +56 -0
  19. package/dist/form/CollectionReverseFks.svelte.d.ts +18 -0
  20. package/dist/form/CreateUpdate.svelte +191 -0
  21. package/dist/form/CreateUpdate.svelte.d.ts +20 -0
  22. package/dist/form/CrudZone.svelte +23 -0
  23. package/dist/form/CrudZone.svelte.d.ts +22 -0
  24. package/dist/form/DataProvider.svelte +20 -0
  25. package/dist/form/DataProvider.svelte.d.ts +9 -0
  26. package/dist/form/FieldInPlace.svelte +49 -0
  27. package/dist/form/FieldInPlace.svelte.d.ts +11 -0
  28. package/dist/form/FieldValue.svelte +213 -0
  29. package/dist/form/FieldValue.svelte.d.ts +28 -0
  30. package/dist/form/types.d.ts +17 -0
  31. package/dist/form/types.js +1 -0
  32. package/dist/fragments/Confirm.svelte +58 -0
  33. package/dist/fragments/Confirm.svelte.d.ts +11 -0
  34. package/dist/fragments/Frame.svelte +19 -0
  35. package/dist/fragments/Frame.svelte.d.ts +32 -0
  36. package/dist/fragments/InfoLine.svelte +21 -0
  37. package/dist/fragments/InfoLine.svelte.d.ts +35 -0
  38. package/dist/fragments/List.svelte +21 -0
  39. package/dist/fragments/List.svelte.d.ts +38 -0
  40. package/dist/fragments/Selector.svelte +26 -0
  41. package/dist/fragments/Selector.svelte.d.ts +38 -0
  42. package/dist/fragments/Skeleton.svelte +21 -0
  43. package/dist/fragments/Skeleton.svelte.d.ts +20 -0
  44. package/dist/index.d.ts +22 -0
  45. package/dist/index.js +23 -0
  46. package/dist/types/appschemeTypes.d.ts +71 -0
  47. package/dist/types/appschemeTypes.js +83 -0
  48. package/package.json +63 -0
@@ -0,0 +1,213 @@
1
+ <!-- Component: CollectionFieldValue.svelte (ancien nom CollectionFieldInput.svelte) -->
2
+ <script lang="ts" generics="COL = Record<string,any>">
3
+ // Importation des types et composants nécessaires
4
+ import { IDbCollectionFieldForge, IDbCollectionValues } from '../db/dbFields';
5
+ import type { TplCollectionName } from '@medyll/idae-idbql';
6
+ import { IconButton } from '@medyll/idae-slotui-svelte';
7
+ import { getAllContexts, getContext } from 'svelte';
8
+
9
+ interface FieldValueProps {
10
+ collection?: TplCollectionName;
11
+ collectionId?: any;
12
+ fieldName: keyof COL;
13
+ data?: COL;
14
+ mode?: 'show' | 'create' | 'update';
15
+ editInPlace?: boolean;
16
+ inputForm?: string;
17
+ showLabel?: LabelPosition;
18
+ showAiGuess?: boolean;
19
+ }
20
+
21
+ // Déclaration des propriétés du composant avec leurs valeurs par défaut
22
+ let {
23
+ collection = getContext('collection'),
24
+ collectionId,
25
+ fieldName,
26
+ data = $bindable(),
27
+ mode = 'show',
28
+ editInPlace = false,
29
+ inputForm,
30
+ showLabel = true,
31
+ showAiGuess = false
32
+ }: FieldValueProps = $props();
33
+
34
+ let _data = getContext('data');
35
+
36
+ data = data ?? ({} as COL);
37
+
38
+ // Initialisation des valeurs de champ de collection
39
+ let collectionFieldValues = new IDbCollectionValues(collection);
40
+ let inputDataset = collectionFieldValues.getInputDataSet(fieldName, data);
41
+
42
+ // Création d'une instance de forge de champ de collection
43
+ const fieldForge = $derived(new IDbCollectionFieldForge(collection, fieldName, data));
44
+
45
+ // Effet déclenché lorsque collectionId ou editInPlace change
46
+ $effect(() => {
47
+ collectionId;
48
+ if (editInPlace && mode === 'show') {
49
+ console.log('Edit in place activated for', fieldName);
50
+ }
51
+ });
52
+
53
+ // Détermination si le champ est privé
54
+ const isPrivate = $derived(fieldForge.fieldArgs?.includes('private'));
55
+
56
+ // Arguments de forge pour le champ
57
+ let forgeArgs = {
58
+ required: fieldForge.fieldArgs?.includes('required'),
59
+ readonly: fieldForge.fieldArgs?.includes('readonly')
60
+ };
61
+
62
+ // Arguments finaux pour l'élément de formulaire
63
+ let finalArgs = {
64
+ id: fieldName,
65
+ name: fieldName,
66
+ form: inputForm,
67
+ placeholder: `${fieldName} ${fieldForge.htmlInputType}`,
68
+ ...forgeArgs,
69
+ ...fieldForge.inputDataSet
70
+ };
71
+
72
+ /**
73
+ * Fonction pour obtenir la position de l'étiquette
74
+ * @param {LabelPosition} position - Position de l'étiquette
75
+ * @returns {string} - Position de l'étiquette sous forme de chaîne
76
+ */
77
+ function getLabelPosition(position: LabelPosition): string {
78
+ if (position === true) return 'above';
79
+ if (position === false) return '';
80
+ return position;
81
+ }
82
+
83
+ // Position de l'étiquette dérivée
84
+ const labelPosition = $derived(getLabelPosition(showLabel));
85
+
86
+ /**
87
+ * Fonction pour gérer la suggestion de valeur
88
+ * @param {string} fieldName - Nom du champ
89
+ * @param {string} value - Valeur suggérée
90
+ */
91
+ function handleGuess(fieldName: string, value: string) {
92
+ data[fieldName] = value;
93
+ }
94
+
95
+ /**
96
+ * Fonction pour itérer sur un tableau de données
97
+ * @param {any[]} data - Tableau de données
98
+ * @returns {any[]} - Tableau de données itéré
99
+ */
100
+ function iterateArray(data: any[]): any[] {
101
+ return fieldForge.iterateArrayField(fieldForge.collection, fieldForge.fieldName, data);
102
+ }
103
+
104
+ /**
105
+ * Fonction pour itérer sur un objet de données
106
+ * @param {Record<string, any>} data - Objet de données
107
+ * @returns {Record<string, any>} - Objet de données itéré
108
+ */
109
+ function iterateObject(data: Record<string, any>): Record<string, any> {
110
+ return dbFields.iterateObjectField(fieldForge.collection, fieldForge.fieldName, data);
111
+ }
112
+ </script>
113
+
114
+ {#if !isPrivate}
115
+ <div class="cell relative flex flex-col gap-2 wrapper-{fieldForge.fieldType}">
116
+ {#if fieldForge.fieldType !== 'id' && (labelPosition === 'before' || labelPosition === 'above')}
117
+ <label form={inputForm} for={fieldName} class="field-label {labelPosition}">{fieldName} </label>
118
+ {/if}
119
+
120
+ <div class="field-input flex">
121
+ {#if mode === 'show'}
122
+ <div class="flex w-48 gap-2">
123
+ <div class="flex-1" {...inputDataset}>{fieldForge.format}</div>
124
+ <!-- <IconButton width="tiny" onclick={() => console.log('Edit in place for', fieldName)} icon="mdi:pencil" /> -->
125
+ </div>
126
+ {:else if fieldForge.fieldType === 'id'}
127
+ {#if mode !== 'create'}
128
+ <input type="hidden" bind:value={data[fieldName]} {...inputDataset} {...finalArgs} />
129
+ {/if}
130
+ {:else if fieldForge.fieldType === 'boolean'}
131
+ <input type="checkbox" bind:checked={data[fieldName]} {...inputDataset} {...finalArgs} />
132
+ {:else if fieldForge.fieldType?.includes('area')}
133
+ <textarea
134
+ style="width:100%;max-width:100%;"
135
+ bind:value={data[fieldName]}
136
+ rows="3"
137
+ class="input h-24"
138
+ {...inputDataset}
139
+ {...finalArgs}>{data[fieldName]}</textarea
140
+ >
141
+ {:else if fieldForge.fieldType === 'text'}
142
+ <input
143
+ style="width: 100%"
144
+ class="input"
145
+ bind:value={data[fieldName]}
146
+ type={fieldForge.htmlInputType}
147
+ {...inputDataset}
148
+ {...finalArgs}
149
+ />
150
+ {:else}
151
+ <input
152
+ style="width: 100%"
153
+ class="input"
154
+ bind:value={data[fieldName]}
155
+ type={fieldForge.htmlInputType}
156
+ {...inputDataset}
157
+ {...finalArgs}
158
+ />
159
+ {/if}
160
+ <!-- <div><CollectionFieldGuess {collection} {collectionId} fieldNames={fieldName} formData={data} onGuess={handleGuess} /></div> -->
161
+ </div>
162
+
163
+ {#if labelPosition === 'after' || labelPosition === 'below'}
164
+ <label form={inputForm} for={fieldName} class="field-label {labelPosition}">{fieldName}</label>
165
+ {/if}
166
+ </div>
167
+ {/if}
168
+
169
+ <style>
170
+ @reference "../../styles/references.css";
171
+ .field-label {
172
+ display: block;
173
+ font-weight: bold;
174
+ padding: 0.5rem;
175
+ }
176
+
177
+ .field-label.before,
178
+ .field-label.after {
179
+ display: block;
180
+ margin-right: 0.5em;
181
+ }
182
+
183
+ .field-label.above {
184
+ margin-bottom: 0.25em;
185
+ }
186
+
187
+ .field-label.below {
188
+ margin-top: 0.25em;
189
+ }
190
+
191
+ .field-input {
192
+ }
193
+
194
+ .wrapper-text-tiny {
195
+ width: 110px;
196
+ }
197
+
198
+ .wrapper-text-medium {
199
+ width: 370px;
200
+ }
201
+
202
+ .wrapper-text-area {
203
+ flex-basis: 100%;
204
+ flex-grow: 1;
205
+ max-width: 100%;
206
+ }
207
+
208
+ .wrapper-text-long {
209
+ flex-basis: 100%;
210
+ flex-grow: 1;
211
+ max-width: 100%;
212
+ }
213
+ </style>
@@ -0,0 +1,28 @@
1
+ import type { TplCollectionName } from '@medyll/idae-idbql';
2
+ declare class __sveltets_Render<COL = Record<string, any>> {
3
+ props(): {
4
+ collection?: TplCollectionName;
5
+ collectionId?: any;
6
+ fieldName: keyof COL;
7
+ data?: COL | undefined;
8
+ mode?: "show" | "create" | "update";
9
+ editInPlace?: boolean;
10
+ inputForm?: string;
11
+ showLabel?: LabelPosition;
12
+ showAiGuess?: boolean;
13
+ };
14
+ events(): {};
15
+ slots(): {};
16
+ bindings(): "data";
17
+ exports(): {};
18
+ }
19
+ interface $$IsomorphicComponent {
20
+ new <COL = Record<string, any>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<COL>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<COL>['props']>, ReturnType<__sveltets_Render<COL>['events']>, ReturnType<__sveltets_Render<COL>['slots']>> & {
21
+ $$bindings?: ReturnType<__sveltets_Render<COL>['bindings']>;
22
+ } & ReturnType<__sveltets_Render<COL>['exports']>;
23
+ <COL = Record<string, any>>(internal: unknown, props: ReturnType<__sveltets_Render<COL>['props']> & {}): ReturnType<__sveltets_Render<COL>['exports']>;
24
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
25
+ }
26
+ declare const FieldValue: $$IsomorphicComponent;
27
+ type FieldValue<COL = Record<string, any>> = InstanceType<typeof FieldValue<COL>>;
28
+ export default FieldValue;
@@ -0,0 +1,17 @@
1
+ export interface CreateUpdateProps<T = string> {
2
+ mode: 'create' | 'update' | 'show';
3
+ collection: string;
4
+ data?: Record<string, any>;
5
+ withData?: Record<string, any>;
6
+ dataId?: any;
7
+ /** fields to show in the collection */
8
+ showFields?: T[];
9
+ /**
10
+ allow in place edition, for all fields, or some
11
+ only available in show mode
12
+ */
13
+ inPlaceEdit?: boolean | T[];
14
+ /** display mode for the fields */
15
+ displayMode?: 'vertical' | 'wrap';
16
+ showFks?: boolean;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,58 @@
1
+ <script lang="ts">
2
+ import { Icon } from '@medyll/idae-slotui-svelte';
3
+
4
+ interface ConfirmProps {
5
+ collection: string;
6
+ field: string;
7
+ validate: Function;
8
+ message?: string | undefined;
9
+ initial?: import('svelte').Snippet;
10
+ children?: import('svelte').Snippet;
11
+ }
12
+
13
+ let { validate, message = undefined, initial, children }: ConfirmProps = $props();
14
+
15
+ let status = $state('default');
16
+ </script>
17
+
18
+ <div class="line-gap-2 w-full">
19
+ {@render initial?.()}
20
+ {#if status === 'default'}
21
+ <button
22
+ class="line-gap-2"
23
+ hidden={status !== 'default'}
24
+ onclick={() => {
25
+ status = 'show_confirm';
26
+ }}
27
+ >
28
+ {@render children?.()}
29
+ </button>
30
+ {/if}
31
+ {#if status === 'show_confirm'}
32
+ <button
33
+ onclick={() => {
34
+ validate?.();
35
+ status = 'default';
36
+ }}
37
+ >
38
+ {message ?? ''}
39
+ <Icon class="color-success md text-green-800" icon="mdi:done" />
40
+ </button>
41
+ <button
42
+ onclick={() => {
43
+ status = 'default';
44
+ }}
45
+ >
46
+ <Icon icon="typcn:cancel" style="color: red" class="md fill-red-800 " />
47
+ </button>
48
+ {/if}
49
+ </div>
50
+
51
+ <style>
52
+ @reference "../../styles/references.css";
53
+ svg {
54
+ > path {
55
+ color: red !important;
56
+ }
57
+ }
58
+ </style>
@@ -0,0 +1,11 @@
1
+ interface ConfirmProps {
2
+ collection: string;
3
+ field: string;
4
+ validate: Function;
5
+ message?: string | undefined;
6
+ initial?: import('svelte').Snippet;
7
+ children?: import('svelte').Snippet;
8
+ }
9
+ declare const Confirm: import("svelte").Component<ConfirmProps, {}, "">;
10
+ type Confirm = ReturnType<typeof Confirm>;
11
+ export default Confirm;
@@ -0,0 +1,19 @@
1
+ <script lang="ts">
2
+ import { slide } from 'svelte/transition';
3
+
4
+ export let showPanel: boolean = true;
5
+ export let panelMode: 'expanded' | 'reduced' = 'expanded';
6
+ </script>
7
+
8
+ <div class="relative flex h-full gap-4">
9
+ {#if showPanel}
10
+ <div transition:slide={{ axis: 'x' }} class="paper h-64 w-64 overflow-auto overflow-x-hidden">
11
+ <slot name="leftNav" />
12
+ </div>
13
+ {/if}
14
+ <div class="flex-1">
15
+ <div class="flex h-full w-96 flex-col gap-1">
16
+ <slot />
17
+ </div>
18
+ </div>
19
+ </div>
@@ -0,0 +1,32 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const Frame: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ showPanel?: boolean;
21
+ panelMode?: "expanded" | "reduced";
22
+ }, {
23
+ leftNav: {};
24
+ default: {};
25
+ }>, {
26
+ [evt: string]: CustomEvent<any>;
27
+ }, {
28
+ leftNav: {};
29
+ default: {};
30
+ }, {}, string>;
31
+ type Frame = InstanceType<typeof Frame>;
32
+ export default Frame;
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ let className = '';
3
+ export let title: string | undefined = undefined;
4
+ export let vertical: boolean = false;
5
+ export { className as class };
6
+ </script>
7
+
8
+ {#if $$slots.input && !title}
9
+ <div class="w-full py-2 text-sm font-semibold">
10
+ {title}
11
+ </div>
12
+ {/if}
13
+ <div class="{vertical ? 'flex-v' : 'flex-align-middle'} gap-4 py-4">
14
+ <div class="flex flex-1 text-sm">
15
+ <div class="flex-1 font-semibold"><slot name="input">- {title}</slot></div>
16
+ <slot name="titleButton" />
17
+ </div>
18
+ <div class="{vertical ? 'px-2' : ''} {className}">
19
+ <slot />
20
+ </div>
21
+ </div>
@@ -0,0 +1,35 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const InfoLine: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ title?: string | undefined;
21
+ vertical?: boolean;
22
+ class?: string;
23
+ }, {
24
+ input: {};
25
+ titleButton: {};
26
+ default: {};
27
+ }>, {
28
+ [evt: string]: CustomEvent<any>;
29
+ }, {
30
+ input: {};
31
+ titleButton: {};
32
+ default: {};
33
+ }, {}, string>;
34
+ type InfoLine = InstanceType<typeof InfoLine>;
35
+ export default InfoLine;
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ let className: string = '';
3
+ export let data: any[];
4
+ export { className as class };
5
+ export let naked = false;
6
+ export let title: string = '';
7
+ </script>
8
+
9
+ {#if naked}
10
+ {title}
11
+ {#each data ?? [] as item}
12
+ <slot {item} />
13
+ {/each}
14
+ {:else}
15
+ {title}
16
+ <div class={className}>
17
+ {#each data ?? [] as item, idx}
18
+ <slot {item} {idx} />
19
+ {/each}
20
+ </div>
21
+ {/if}
@@ -0,0 +1,38 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const List: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ data: any[];
21
+ class?: string;
22
+ naked?: boolean;
23
+ title?: string;
24
+ }, {
25
+ default: {
26
+ item: any;
27
+ idx: any;
28
+ };
29
+ }>, {
30
+ [evt: string]: CustomEvent<any>;
31
+ }, {
32
+ default: {
33
+ item: any;
34
+ idx: any;
35
+ };
36
+ }, {}, string>;
37
+ type List = InstanceType<typeof List>;
38
+ export default List;
@@ -0,0 +1,26 @@
1
+ <script lang="ts">
2
+ let className = '';
3
+ export let values: any = [];
4
+ export let value: any | undefined = undefined;
5
+ </script>
6
+
7
+ {#each values as valueO}
8
+ <div class={' ' + (valueO == value ? 'active ' : 'inactive')}>
9
+ <slot item={valueO} active={valueO === value} />
10
+ </div>
11
+ {/each}
12
+ {#if !values.length}
13
+ <slot name="selectorFallback" />
14
+ {/if}
15
+
16
+ <style>
17
+ @reference "../../styles/references.css";
18
+ .active {
19
+ @apply border border-b-2 border-neutral-500; /* active */
20
+ }
21
+ .inactive {
22
+ @apply border border-b-2 border-transparent opacity-60; /* inactive */
23
+ }
24
+ /* @apply border border-b-2 border-neutral-500;
25
+ @apply opacity-60 border border-b-2 border-transparent; */
26
+ </style>
@@ -0,0 +1,38 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const Selector: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ values?: any;
21
+ value?: any | undefined;
22
+ }, {
23
+ default: {
24
+ item: unknown;
25
+ active: boolean;
26
+ };
27
+ selectorFallback: {};
28
+ }>, {
29
+ [evt: string]: CustomEvent<any>;
30
+ }, {
31
+ default: {
32
+ item: unknown;
33
+ active: boolean;
34
+ };
35
+ selectorFallback: {};
36
+ }, {}, string>;
37
+ type Selector = InstanceType<typeof Selector>;
38
+ export default Selector;
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ import List from '$components/fragments/List.svelte';
3
+
4
+ let className = '';
5
+ export { className as class };
6
+
7
+ function skeletonLine() {
8
+ return [...Array(Math.ceil(Math.random() * 5))]
9
+ .map(
10
+ () =>
11
+ '<div class="h-2 bg-gray-200 dark:bg-gray-600 rounded-md p-1 col-span-2 animate-pulse flex-auto" ></div>'
12
+ )
13
+ .join('');
14
+ }
15
+ </script>
16
+
17
+ <div class={className}>
18
+ <List class="flex flex-col gap-2" data={[...Array(4)]}>
19
+ <div class="flex gap-2">{@html skeletonLine()}</div>
20
+ </List>
21
+ </div>
@@ -0,0 +1,20 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Skeleton: $$__sveltets_2_IsomorphicComponent<{
15
+ class?: string;
16
+ }, {
17
+ [evt: string]: CustomEvent<any>;
18
+ }, {}, {}, string>;
19
+ type Skeleton = InstanceType<typeof Skeleton>;
20
+ export default Skeleton;
@@ -0,0 +1,22 @@
1
+ export * from './types/appschemeTypes.js';
2
+ export { default as Skeleton } from './fragments/Skeleton.svelte';
3
+ export { default as Selector } from './fragments/Selector.svelte';
4
+ export { default as List } from './fragments/List.svelte';
5
+ export { default as InfoLine } from './fragments/InfoLine.svelte';
6
+ export { default as Frame } from './fragments/Frame.svelte';
7
+ export { default as Confirm } from './fragments/Confirm.svelte';
8
+ export * from './form/types.js';
9
+ export { default as FieldValue } from './form/FieldValue.svelte';
10
+ export { default as FieldInPlace } from './form/FieldInPlace.svelte';
11
+ export { default as DataProvider } from './form/DataProvider.svelte';
12
+ export { default as CrudZone } from './form/CrudZone.svelte';
13
+ export { default as CreateUpdate } from './form/CreateUpdate.svelte';
14
+ export { default as CollectionReverseFks } from './form/CollectionReverseFks.svelte';
15
+ export { default as CollectionListMenu } from './form/CollectionListMenu.svelte';
16
+ export { default as CollectionList } from './form/CollectionList.svelte';
17
+ export { default as CollectionFks } from './form/CollectionFks.svelte';
18
+ export { default as CollectionFieldGuess } from './form/CollectionFieldGuess.svelte';
19
+ export { default as CollectionButton } from './form/CollectionButton.svelte';
20
+ export * from './db/dbSchema.js';
21
+ export * from './db/dbFields.js';
22
+ export * from './db/dataModel.js';
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ // auto exports of entry components
2
+ export * from './types/appschemeTypes.js';
3
+ export { default as Skeleton } from './fragments/Skeleton.svelte';
4
+ export { default as Selector } from './fragments/Selector.svelte';
5
+ export { default as List } from './fragments/List.svelte';
6
+ export { default as InfoLine } from './fragments/InfoLine.svelte';
7
+ export { default as Frame } from './fragments/Frame.svelte';
8
+ export { default as Confirm } from './fragments/Confirm.svelte';
9
+ export * from './form/types.js';
10
+ export { default as FieldValue } from './form/FieldValue.svelte';
11
+ export { default as FieldInPlace } from './form/FieldInPlace.svelte';
12
+ export { default as DataProvider } from './form/DataProvider.svelte';
13
+ export { default as CrudZone } from './form/CrudZone.svelte';
14
+ export { default as CreateUpdate } from './form/CreateUpdate.svelte';
15
+ export { default as CollectionReverseFks } from './form/CollectionReverseFks.svelte';
16
+ export { default as CollectionListMenu } from './form/CollectionListMenu.svelte';
17
+ export { default as CollectionList } from './form/CollectionList.svelte';
18
+ export { default as CollectionFks } from './form/CollectionFks.svelte';
19
+ export { default as CollectionFieldGuess } from './form/CollectionFieldGuess.svelte';
20
+ export { default as CollectionButton } from './form/CollectionButton.svelte';
21
+ export * from './db/dbSchema.js';
22
+ export * from './db/dbFields.js';
23
+ export * from './db/dataModel.js';