@fieldia/vue 0.11.0 → 0.13.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fieldia/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Vue binding for Fieldia: <FieldiaForm> over the plain-DOM viewer, with custom fields as Vue components and slots as Vue slots.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://fieldia.dev",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@fieldia/core": "0.
|
|
25
|
-
"@fieldia/viewer": "0.
|
|
26
|
-
"@fieldia/widgets": "0.
|
|
24
|
+
"@fieldia/core": "0.13.0",
|
|
25
|
+
"@fieldia/viewer": "0.13.0",
|
|
26
|
+
"@fieldia/widgets": "0.13.0",
|
|
27
27
|
"tslib": "^2.8.1"
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DataSource, DraftStore, Field, FieldNode, Form, FormEvents, FormState, Locale, OnAction, Page, RecordId, Scheduler, Value, Values } from '@fieldia/core';
|
|
2
|
-
import { type Skin, type ViewerHandle, type ViewerLabels, type ViewerOptions } from '@fieldia/viewer';
|
|
1
|
+
import type { DataSource, DraftStore, Field, FieldNode, Form, FormEvents, FormState, FormUser, Locale, OnAction, Page, RecordId, Scheduler, Theme, Value, Values } from '@fieldia/core';
|
|
2
|
+
import { type Skin, type Tokens, type ViewerHandle, type ViewerLabels, type ViewerOptions } from '@fieldia/viewer';
|
|
3
3
|
import type { PreferenceStore, WidgetFactory, WidgetState } from '@fieldia/widgets';
|
|
4
4
|
import { type Component, type PropType, type ShallowRef } from 'vue';
|
|
5
5
|
/**
|
|
@@ -40,13 +40,34 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
40
40
|
type: PropType<RecordId | null>;
|
|
41
41
|
default: null;
|
|
42
42
|
};
|
|
43
|
+
/** The person using the form: what `user` reads, and the roles that show parts. */
|
|
44
|
+
user: {
|
|
45
|
+
type: PropType<FormUser>;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
/** Values the app passes in, as Flectra's context: what conditions and filters read as `context`. */
|
|
49
|
+
context: {
|
|
50
|
+
type: PropType<ViewerOptions["context"]>;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
43
53
|
values: {
|
|
44
54
|
type: PropType<Values>;
|
|
45
55
|
default: undefined;
|
|
46
56
|
};
|
|
57
|
+
/** The skin: the theme's own when left out, else underline. */
|
|
47
58
|
skin: {
|
|
48
59
|
type: PropType<Skin>;
|
|
49
|
-
default:
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
/** A theme in the style of a known design system, over the page's own. */
|
|
63
|
+
theme: {
|
|
64
|
+
type: PropType<Theme>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
/** The host's own colours, corners and font, over everything else (`TOKEN_NAMES`). */
|
|
68
|
+
tokens: {
|
|
69
|
+
type: PropType<Tokens>;
|
|
70
|
+
default: undefined;
|
|
50
71
|
};
|
|
51
72
|
dir: {
|
|
52
73
|
type: PropType<"ltr" | "rtl">;
|
|
@@ -150,6 +171,16 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
150
171
|
type: PropType<ViewerOptions["host"]>;
|
|
151
172
|
default: undefined;
|
|
152
173
|
};
|
|
174
|
+
/** The records round this one, for the pager over it: their ids, or how many, where this one is, and the id at a place. */
|
|
175
|
+
records: {
|
|
176
|
+
type: PropType<ViewerOptions["records"]>;
|
|
177
|
+
default: undefined;
|
|
178
|
+
};
|
|
179
|
+
/** The trail to this record, for the breadcrumbs over it. */
|
|
180
|
+
breadcrumbs: {
|
|
181
|
+
type: PropType<ViewerOptions["breadcrumbs"]>;
|
|
182
|
+
default: undefined;
|
|
183
|
+
};
|
|
153
184
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
154
185
|
[key: string]: any;
|
|
155
186
|
}>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -166,6 +197,12 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
166
197
|
step: (_event: FormEvents["step"]) => true;
|
|
167
198
|
/** A run of steps ended — a button's, a moment's — and how. */
|
|
168
199
|
run: (_event: FormEvents["run"]) => true;
|
|
200
|
+
/** The form has its values: a record loaded — the pager moved on, a copy shown — or a new one. */
|
|
201
|
+
record: (_event: FormEvents["open"]) => true;
|
|
202
|
+
/** The record was archived or brought back, copied, or deleted, by a step such as the gear menu's. */
|
|
203
|
+
archive: (_event: FormEvents["archive"]) => true;
|
|
204
|
+
duplicate: (_event: FormEvents["duplicate"]) => true;
|
|
205
|
+
delete: (_event: FormEvents["delete"]) => true;
|
|
169
206
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
170
207
|
page: {
|
|
171
208
|
type: PropType<Page>;
|
|
@@ -183,13 +220,34 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
183
220
|
type: PropType<RecordId | null>;
|
|
184
221
|
default: null;
|
|
185
222
|
};
|
|
223
|
+
/** The person using the form: what `user` reads, and the roles that show parts. */
|
|
224
|
+
user: {
|
|
225
|
+
type: PropType<FormUser>;
|
|
226
|
+
default: undefined;
|
|
227
|
+
};
|
|
228
|
+
/** Values the app passes in, as Flectra's context: what conditions and filters read as `context`. */
|
|
229
|
+
context: {
|
|
230
|
+
type: PropType<ViewerOptions["context"]>;
|
|
231
|
+
default: undefined;
|
|
232
|
+
};
|
|
186
233
|
values: {
|
|
187
234
|
type: PropType<Values>;
|
|
188
235
|
default: undefined;
|
|
189
236
|
};
|
|
237
|
+
/** The skin: the theme's own when left out, else underline. */
|
|
190
238
|
skin: {
|
|
191
239
|
type: PropType<Skin>;
|
|
192
|
-
default:
|
|
240
|
+
default: undefined;
|
|
241
|
+
};
|
|
242
|
+
/** A theme in the style of a known design system, over the page's own. */
|
|
243
|
+
theme: {
|
|
244
|
+
type: PropType<Theme>;
|
|
245
|
+
default: undefined;
|
|
246
|
+
};
|
|
247
|
+
/** The host's own colours, corners and font, over everything else (`TOKEN_NAMES`). */
|
|
248
|
+
tokens: {
|
|
249
|
+
type: PropType<Tokens>;
|
|
250
|
+
default: undefined;
|
|
193
251
|
};
|
|
194
252
|
dir: {
|
|
195
253
|
type: PropType<"ltr" | "rtl">;
|
|
@@ -293,7 +351,21 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
293
351
|
type: PropType<ViewerOptions["host"]>;
|
|
294
352
|
default: undefined;
|
|
295
353
|
};
|
|
354
|
+
/** The records round this one, for the pager over it: their ids, or how many, where this one is, and the id at a place. */
|
|
355
|
+
records: {
|
|
356
|
+
type: PropType<ViewerOptions["records"]>;
|
|
357
|
+
default: undefined;
|
|
358
|
+
};
|
|
359
|
+
/** The trail to this record, for the breadcrumbs over it. */
|
|
360
|
+
breadcrumbs: {
|
|
361
|
+
type: PropType<ViewerOptions["breadcrumbs"]>;
|
|
362
|
+
default: undefined;
|
|
363
|
+
};
|
|
296
364
|
}>> & Readonly<{
|
|
365
|
+
onRecord?: ((_event: {
|
|
366
|
+
recordId: RecordId | null;
|
|
367
|
+
values: Readonly<Values>;
|
|
368
|
+
}) => any) | undefined;
|
|
297
369
|
onChange?: ((_event: {
|
|
298
370
|
field: string;
|
|
299
371
|
value: Value;
|
|
@@ -315,12 +387,23 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
315
387
|
steps: readonly import("@fieldia/core").ActionStep[];
|
|
316
388
|
result: import("@fieldia/core").RunResult;
|
|
317
389
|
}) => any) | undefined;
|
|
390
|
+
onArchive?: ((_event: {
|
|
391
|
+
recordId: RecordId;
|
|
392
|
+
archived: boolean;
|
|
393
|
+
}) => any) | undefined;
|
|
394
|
+
onDuplicate?: ((_event: {
|
|
395
|
+
from: RecordId;
|
|
396
|
+
recordId: RecordId;
|
|
397
|
+
}) => any) | undefined;
|
|
398
|
+
onDelete?: ((_event: {
|
|
399
|
+
recordId: RecordId;
|
|
400
|
+
}) => any) | undefined;
|
|
318
401
|
onReady?: ((_handle: ViewerHandle) => any) | undefined;
|
|
319
402
|
onOpenRecord?: ((_id: RecordId) => any) | undefined;
|
|
320
403
|
}>, {
|
|
321
404
|
values: Values;
|
|
322
405
|
readonly: boolean;
|
|
323
|
-
|
|
406
|
+
context: Readonly<Record<string, import("@fieldia/core").JsonValue>> | undefined;
|
|
324
407
|
host: Partial<import("@fieldia/core").ActionHost> | undefined;
|
|
325
408
|
dataSource: DataSource;
|
|
326
409
|
recordId: RecordId | null;
|
|
@@ -335,6 +418,8 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
335
418
|
delayMs: number;
|
|
336
419
|
};
|
|
337
420
|
scheduler: Scheduler;
|
|
421
|
+
user: FormUser;
|
|
422
|
+
pages: import("@fieldia/viewer").PageFinder | undefined;
|
|
338
423
|
relatedPages: Record<string, Page> | ((model: string) => Page | null | undefined) | undefined;
|
|
339
424
|
icons: Readonly<Record<string, string>> | undefined;
|
|
340
425
|
keys: {
|
|
@@ -344,8 +429,12 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
344
429
|
saveStatus: "inline" | "toast" | "bar" | undefined;
|
|
345
430
|
translate: ((text: string) => string) | undefined;
|
|
346
431
|
onOpen: ((request: import("@fieldia/core").OpenRequest) => Promise<import("@fieldia/core").OpenResult> | undefined) | undefined;
|
|
432
|
+
records: readonly RecordId[] | import("@fieldia/viewer").RecordPager | undefined;
|
|
433
|
+
breadcrumbs: readonly import("@fieldia/viewer").Breadcrumb[] | undefined;
|
|
347
434
|
form: Form;
|
|
348
435
|
skin: Skin;
|
|
436
|
+
theme: "material" | "fluent" | "apple" | "bootstrap" | "shadcn" | "ant" | "odoo" | "google-forms";
|
|
437
|
+
tokens: Partial<Record<"text" | "success" | "page" | "muted" | "surface" | "fill" | "border" | "border-strong" | "edge" | "accent" | "accent-text" | "accent-soft" | "accent-hover" | "focus" | "focus-ring" | "error" | "error-soft" | "success-soft" | "warning" | "warning-soft" | "info" | "info-soft" | "radius" | "control-radius" | "font" | "label-weight", string>>;
|
|
349
438
|
dir: "ltr" | "rtl";
|
|
350
439
|
locale: Locale;
|
|
351
440
|
labels: Partial<ViewerLabels>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DataSource, DraftStore, Field, FieldNode, Form, FormEvents, FormState, Locale, OnAction, Page, RecordId, Scheduler, Value, Values } from '@fieldia/core';
|
|
2
|
-
import { type Skin, type ViewerHandle, type ViewerLabels, type ViewerOptions } from '@fieldia/viewer';
|
|
1
|
+
import type { DataSource, DraftStore, Field, FieldNode, Form, FormEvents, FormState, FormUser, Locale, OnAction, Page, RecordId, Scheduler, Theme, Value, Values } from '@fieldia/core';
|
|
2
|
+
import { type Skin, type Tokens, type ViewerHandle, type ViewerLabels, type ViewerOptions } from '@fieldia/viewer';
|
|
3
3
|
import type { PreferenceStore, WidgetFactory, WidgetState } from '@fieldia/widgets';
|
|
4
4
|
import { type Component, type PropType, type ShallowRef } from 'vue';
|
|
5
5
|
/**
|
|
@@ -40,13 +40,34 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
40
40
|
type: PropType<RecordId | null>;
|
|
41
41
|
default: null;
|
|
42
42
|
};
|
|
43
|
+
/** The person using the form: what `user` reads, and the roles that show parts. */
|
|
44
|
+
user: {
|
|
45
|
+
type: PropType<FormUser>;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
/** Values the app passes in, as Flectra's context: what conditions and filters read as `context`. */
|
|
49
|
+
context: {
|
|
50
|
+
type: PropType<ViewerOptions["context"]>;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
43
53
|
values: {
|
|
44
54
|
type: PropType<Values>;
|
|
45
55
|
default: undefined;
|
|
46
56
|
};
|
|
57
|
+
/** The skin: the theme's own when left out, else underline. */
|
|
47
58
|
skin: {
|
|
48
59
|
type: PropType<Skin>;
|
|
49
|
-
default:
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
/** A theme in the style of a known design system, over the page's own. */
|
|
63
|
+
theme: {
|
|
64
|
+
type: PropType<Theme>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
/** The host's own colours, corners and font, over everything else (`TOKEN_NAMES`). */
|
|
68
|
+
tokens: {
|
|
69
|
+
type: PropType<Tokens>;
|
|
70
|
+
default: undefined;
|
|
50
71
|
};
|
|
51
72
|
dir: {
|
|
52
73
|
type: PropType<"ltr" | "rtl">;
|
|
@@ -150,6 +171,16 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
150
171
|
type: PropType<ViewerOptions["host"]>;
|
|
151
172
|
default: undefined;
|
|
152
173
|
};
|
|
174
|
+
/** The records round this one, for the pager over it: their ids, or how many, where this one is, and the id at a place. */
|
|
175
|
+
records: {
|
|
176
|
+
type: PropType<ViewerOptions["records"]>;
|
|
177
|
+
default: undefined;
|
|
178
|
+
};
|
|
179
|
+
/** The trail to this record, for the breadcrumbs over it. */
|
|
180
|
+
breadcrumbs: {
|
|
181
|
+
type: PropType<ViewerOptions["breadcrumbs"]>;
|
|
182
|
+
default: undefined;
|
|
183
|
+
};
|
|
153
184
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
154
185
|
[key: string]: any;
|
|
155
186
|
}>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -166,6 +197,12 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
166
197
|
step: (_event: FormEvents["step"]) => true;
|
|
167
198
|
/** A run of steps ended — a button's, a moment's — and how. */
|
|
168
199
|
run: (_event: FormEvents["run"]) => true;
|
|
200
|
+
/** The form has its values: a record loaded — the pager moved on, a copy shown — or a new one. */
|
|
201
|
+
record: (_event: FormEvents["open"]) => true;
|
|
202
|
+
/** The record was archived or brought back, copied, or deleted, by a step such as the gear menu's. */
|
|
203
|
+
archive: (_event: FormEvents["archive"]) => true;
|
|
204
|
+
duplicate: (_event: FormEvents["duplicate"]) => true;
|
|
205
|
+
delete: (_event: FormEvents["delete"]) => true;
|
|
169
206
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
170
207
|
page: {
|
|
171
208
|
type: PropType<Page>;
|
|
@@ -183,13 +220,34 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
183
220
|
type: PropType<RecordId | null>;
|
|
184
221
|
default: null;
|
|
185
222
|
};
|
|
223
|
+
/** The person using the form: what `user` reads, and the roles that show parts. */
|
|
224
|
+
user: {
|
|
225
|
+
type: PropType<FormUser>;
|
|
226
|
+
default: undefined;
|
|
227
|
+
};
|
|
228
|
+
/** Values the app passes in, as Flectra's context: what conditions and filters read as `context`. */
|
|
229
|
+
context: {
|
|
230
|
+
type: PropType<ViewerOptions["context"]>;
|
|
231
|
+
default: undefined;
|
|
232
|
+
};
|
|
186
233
|
values: {
|
|
187
234
|
type: PropType<Values>;
|
|
188
235
|
default: undefined;
|
|
189
236
|
};
|
|
237
|
+
/** The skin: the theme's own when left out, else underline. */
|
|
190
238
|
skin: {
|
|
191
239
|
type: PropType<Skin>;
|
|
192
|
-
default:
|
|
240
|
+
default: undefined;
|
|
241
|
+
};
|
|
242
|
+
/** A theme in the style of a known design system, over the page's own. */
|
|
243
|
+
theme: {
|
|
244
|
+
type: PropType<Theme>;
|
|
245
|
+
default: undefined;
|
|
246
|
+
};
|
|
247
|
+
/** The host's own colours, corners and font, over everything else (`TOKEN_NAMES`). */
|
|
248
|
+
tokens: {
|
|
249
|
+
type: PropType<Tokens>;
|
|
250
|
+
default: undefined;
|
|
193
251
|
};
|
|
194
252
|
dir: {
|
|
195
253
|
type: PropType<"ltr" | "rtl">;
|
|
@@ -293,7 +351,21 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
293
351
|
type: PropType<ViewerOptions["host"]>;
|
|
294
352
|
default: undefined;
|
|
295
353
|
};
|
|
354
|
+
/** The records round this one, for the pager over it: their ids, or how many, where this one is, and the id at a place. */
|
|
355
|
+
records: {
|
|
356
|
+
type: PropType<ViewerOptions["records"]>;
|
|
357
|
+
default: undefined;
|
|
358
|
+
};
|
|
359
|
+
/** The trail to this record, for the breadcrumbs over it. */
|
|
360
|
+
breadcrumbs: {
|
|
361
|
+
type: PropType<ViewerOptions["breadcrumbs"]>;
|
|
362
|
+
default: undefined;
|
|
363
|
+
};
|
|
296
364
|
}>> & Readonly<{
|
|
365
|
+
onRecord?: ((_event: {
|
|
366
|
+
recordId: RecordId | null;
|
|
367
|
+
values: Readonly<Values>;
|
|
368
|
+
}) => any) | undefined;
|
|
297
369
|
onChange?: ((_event: {
|
|
298
370
|
field: string;
|
|
299
371
|
value: Value;
|
|
@@ -315,12 +387,23 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
315
387
|
steps: readonly import("@fieldia/core").ActionStep[];
|
|
316
388
|
result: import("@fieldia/core").RunResult;
|
|
317
389
|
}) => any) | undefined;
|
|
390
|
+
onArchive?: ((_event: {
|
|
391
|
+
recordId: RecordId;
|
|
392
|
+
archived: boolean;
|
|
393
|
+
}) => any) | undefined;
|
|
394
|
+
onDuplicate?: ((_event: {
|
|
395
|
+
from: RecordId;
|
|
396
|
+
recordId: RecordId;
|
|
397
|
+
}) => any) | undefined;
|
|
398
|
+
onDelete?: ((_event: {
|
|
399
|
+
recordId: RecordId;
|
|
400
|
+
}) => any) | undefined;
|
|
318
401
|
onReady?: ((_handle: ViewerHandle) => any) | undefined;
|
|
319
402
|
onOpenRecord?: ((_id: RecordId) => any) | undefined;
|
|
320
403
|
}>, {
|
|
321
404
|
values: Values;
|
|
322
405
|
readonly: boolean;
|
|
323
|
-
|
|
406
|
+
context: Readonly<Record<string, import("@fieldia/core").JsonValue>> | undefined;
|
|
324
407
|
host: Partial<import("@fieldia/core").ActionHost> | undefined;
|
|
325
408
|
dataSource: DataSource;
|
|
326
409
|
recordId: RecordId | null;
|
|
@@ -335,6 +418,8 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
335
418
|
delayMs: number;
|
|
336
419
|
};
|
|
337
420
|
scheduler: Scheduler;
|
|
421
|
+
user: FormUser;
|
|
422
|
+
pages: import("@fieldia/viewer").PageFinder | undefined;
|
|
338
423
|
relatedPages: Record<string, Page> | ((model: string) => Page | null | undefined) | undefined;
|
|
339
424
|
icons: Readonly<Record<string, string>> | undefined;
|
|
340
425
|
keys: {
|
|
@@ -344,8 +429,12 @@ export declare const FieldiaForm: import("vue").DefineComponent<import("vue").Ex
|
|
|
344
429
|
saveStatus: "inline" | "toast" | "bar" | undefined;
|
|
345
430
|
translate: ((text: string) => string) | undefined;
|
|
346
431
|
onOpen: ((request: import("@fieldia/core").OpenRequest) => Promise<import("@fieldia/core").OpenResult> | undefined) | undefined;
|
|
432
|
+
records: readonly RecordId[] | import("@fieldia/viewer").RecordPager | undefined;
|
|
433
|
+
breadcrumbs: readonly import("@fieldia/viewer").Breadcrumb[] | undefined;
|
|
347
434
|
form: Form;
|
|
348
435
|
skin: Skin;
|
|
436
|
+
theme: "material" | "fluent" | "apple" | "bootstrap" | "shadcn" | "ant" | "odoo" | "google-forms";
|
|
437
|
+
tokens: Partial<Record<"text" | "success" | "page" | "muted" | "surface" | "fill" | "border" | "border-strong" | "edge" | "accent" | "accent-text" | "accent-soft" | "accent-hover" | "focus" | "focus-ring" | "error" | "error-soft" | "success-soft" | "warning" | "warning-soft" | "info" | "info-soft" | "radius" | "control-radius" | "font" | "label-weight", string>>;
|
|
349
438
|
dir: "ltr" | "rtl";
|
|
350
439
|
locale: Locale;
|
|
351
440
|
labels: Partial<ViewerLabels>;
|
package/src/lib/fieldia-form.js
CHANGED
|
@@ -13,7 +13,7 @@ function useFormState(form) {
|
|
|
13
13
|
return state;
|
|
14
14
|
}
|
|
15
15
|
/** The form's events, each emitted under its own name. */
|
|
16
|
-
const EVENTS = ['change', 'save', 'send', 'step', 'run'];
|
|
16
|
+
const EVENTS = ['change', 'save', 'send', 'step', 'run', 'archive', 'duplicate', 'delete'];
|
|
17
17
|
const EMPTY_STATE = { value: undefined, values: {}, readonly: false, required: false, invalid: false };
|
|
18
18
|
exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
19
19
|
name: 'FieldiaForm',
|
|
@@ -22,8 +22,17 @@ exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
|
22
22
|
form: { type: Object, default: undefined },
|
|
23
23
|
dataSource: { type: Object, default: undefined },
|
|
24
24
|
recordId: { type: [String, Number], default: null },
|
|
25
|
+
/** The person using the form: what `user` reads, and the roles that show parts. */
|
|
26
|
+
user: { type: Object, default: undefined },
|
|
27
|
+
/** Values the app passes in, as Flectra's context: what conditions and filters read as `context`. */
|
|
28
|
+
context: { type: Object, default: undefined },
|
|
25
29
|
values: { type: Object, default: undefined },
|
|
26
|
-
skin:
|
|
30
|
+
/** The skin: the theme's own when left out, else underline. */
|
|
31
|
+
skin: { type: String, default: undefined },
|
|
32
|
+
/** A theme in the style of a known design system, over the page's own. */
|
|
33
|
+
theme: { type: String, default: undefined },
|
|
34
|
+
/** The host's own colours, corners and font, over everything else (`TOKEN_NAMES`). */
|
|
35
|
+
tokens: { type: Object, default: undefined },
|
|
27
36
|
dir: { type: String, default: undefined },
|
|
28
37
|
locale: { type: String, default: undefined },
|
|
29
38
|
labels: { type: Object, default: undefined },
|
|
@@ -54,6 +63,10 @@ exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
|
54
63
|
onOpen: { type: Function, default: undefined },
|
|
55
64
|
/** Any of the viewer's host done your own way: words said, a question asked, a page opened, a tab shown. */
|
|
56
65
|
host: { type: Object, default: undefined },
|
|
66
|
+
/** The records round this one, for the pager over it: their ids, or how many, where this one is, and the id at a place. */
|
|
67
|
+
records: { type: [Array, Object], default: undefined },
|
|
68
|
+
/** The trail to this record, for the breadcrumbs over it. */
|
|
69
|
+
breadcrumbs: { type: Array, default: undefined },
|
|
57
70
|
},
|
|
58
71
|
emits: {
|
|
59
72
|
ready: (_handle) => true,
|
|
@@ -69,6 +82,12 @@ exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
|
69
82
|
step: (_event) => true,
|
|
70
83
|
/** A run of steps ended — a button's, a moment's — and how. */
|
|
71
84
|
run: (_event) => true,
|
|
85
|
+
/** The form has its values: a record loaded — the pager moved on, a copy shown — or a new one. */
|
|
86
|
+
record: (_event) => true,
|
|
87
|
+
/** The record was archived or brought back, copied, or deleted, by a step such as the gear menu's. */
|
|
88
|
+
archive: (_event) => true,
|
|
89
|
+
duplicate: (_event) => true,
|
|
90
|
+
delete: (_event) => true,
|
|
72
91
|
},
|
|
73
92
|
setup(props, { slots, emit, expose }) {
|
|
74
93
|
const host = (0, vue_1.ref)();
|
|
@@ -123,8 +142,12 @@ exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
|
123
142
|
form: props.form,
|
|
124
143
|
dataSource: props.dataSource,
|
|
125
144
|
recordId: props.recordId,
|
|
145
|
+
user: props.user,
|
|
146
|
+
context: props.context ? (0, vue_1.toRaw)(props.context) : undefined,
|
|
126
147
|
values: props.values,
|
|
127
148
|
skin: props.skin,
|
|
149
|
+
theme: props.theme,
|
|
150
|
+
tokens: props.tokens,
|
|
128
151
|
dir: props.dir,
|
|
129
152
|
locale: props.locale,
|
|
130
153
|
labels: props.labels,
|
|
@@ -149,9 +172,12 @@ exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
|
149
172
|
onOpen: props.onOpen,
|
|
150
173
|
host: props.host ? (0, vue_1.toRaw)(props.host) : undefined,
|
|
151
174
|
onOpenRecord: (id) => emit('openRecord', id),
|
|
175
|
+
records: props.records ? (0, vue_1.toRaw)(props.records) : undefined,
|
|
176
|
+
breadcrumbs: props.breadcrumbs ? (0, vue_1.toRaw)(props.breadcrumbs) : undefined,
|
|
152
177
|
});
|
|
153
178
|
for (const event of EVENTS)
|
|
154
179
|
handle.on(event, (payload) => emit(event, payload));
|
|
180
|
+
handle.on('open', (payload) => emit('record', payload));
|
|
155
181
|
portals.value = found;
|
|
156
182
|
emit('ready', handle);
|
|
157
183
|
}
|
|
@@ -162,11 +188,20 @@ exports.FieldiaForm = (0, vue_1.defineComponent)({
|
|
|
162
188
|
}
|
|
163
189
|
(0, vue_1.onMounted)(mount);
|
|
164
190
|
(0, vue_1.onBeforeUnmount)(unmount);
|
|
165
|
-
(0, vue_1.watch)(() => [props.page, props.form, props.dataSource, props.recordId, props.dir, props.locale, JSON.stringify(props.labels ?? {})], () => {
|
|
191
|
+
(0, vue_1.watch)(() => [props.page, props.form, props.dataSource, props.recordId, JSON.stringify(props.user ?? null), JSON.stringify(props.context ?? null), props.dir, props.locale, JSON.stringify(props.labels ?? {})], () => {
|
|
166
192
|
unmount();
|
|
167
193
|
mount();
|
|
168
194
|
});
|
|
169
|
-
|
|
195
|
+
// The host's tokens, worn in place as its app changes them.
|
|
196
|
+
(0, vue_1.watch)(() => props.tokens, (tokens) => handle?.setTokens(tokens ?? null), { deep: true });
|
|
197
|
+
// A theme and a skin switch in place: the theme brings its skin, unless one is given.
|
|
198
|
+
(0, vue_1.watch)(() => [props.skin, props.theme], () => {
|
|
199
|
+
if (!handle)
|
|
200
|
+
return;
|
|
201
|
+
const theme = props.theme ?? props.page.look?.theme;
|
|
202
|
+
handle.setTheme(theme ?? null);
|
|
203
|
+
handle.setSkin((0, viewer_1.skinFor)(props.skin, theme));
|
|
204
|
+
});
|
|
170
205
|
(0, vue_1.watch)(() => props.readonly, (readonly) => handle?.setReadonly(readonly));
|
|
171
206
|
expose({
|
|
172
207
|
get handle() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldia-form.js","sourceRoot":"","sources":["../../../../../libs/vue/src/lib/fieldia-form.ts"],"names":[],"mappings":";;;AA2CA,oCAKC;AA/CD,
|
|
1
|
+
{"version":3,"file":"fieldia-form.js","sourceRoot":"","sources":["../../../../../libs/vue/src/lib/fieldia-form.ts"],"names":[],"mappings":";;;AA2CA,oCAKC;AA/CD,4CAA4J;AAE5J,6BAgBa;AAuBb,4DAA4D;AAC5D,SAAgB,YAAY,CAAC,IAAU;IACrC,MAAM,KAAK,GAAG,IAAA,gBAAU,EAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7D,IAAI,IAAA,qBAAe,GAAE;QAAE,IAAA,oBAAc,EAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC;AACf,CAAC;AAQD,0DAA0D;AAC1D,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAEpG,MAAM,WAAW,GAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAEvG,QAAA,WAAW,GAAG,IAAA,qBAAe,EAAC;IACzC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,MAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAw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,MAAM,CAAC;YAChB,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE,CAAC;YACX,IAAA,OAAC,EAAC,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;YACvB,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,OAAC,EAAC,cAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;SAC1G,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/src/lib/fieldia-form.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mountViewer } from '@fieldia/viewer';
|
|
1
|
+
import { mountViewer, skinFor } from '@fieldia/viewer';
|
|
2
2
|
import { defineComponent, getCurrentScope, h, onBeforeUnmount, onMounted, onScopeDispose, ref, shallowRef, Teleport, toRaw, watch, } from 'vue';
|
|
3
3
|
/** A form's state as a Vue ref, current on every change. */
|
|
4
4
|
export function useFormState(form) {
|
|
@@ -9,7 +9,7 @@ export function useFormState(form) {
|
|
|
9
9
|
return state;
|
|
10
10
|
}
|
|
11
11
|
/** The form's events, each emitted under its own name. */
|
|
12
|
-
const EVENTS = ['change', 'save', 'send', 'step', 'run'];
|
|
12
|
+
const EVENTS = ['change', 'save', 'send', 'step', 'run', 'archive', 'duplicate', 'delete'];
|
|
13
13
|
const EMPTY_STATE = { value: undefined, values: {}, readonly: false, required: false, invalid: false };
|
|
14
14
|
export const FieldiaForm = defineComponent({
|
|
15
15
|
name: 'FieldiaForm',
|
|
@@ -18,8 +18,17 @@ export const FieldiaForm = defineComponent({
|
|
|
18
18
|
form: { type: Object, default: undefined },
|
|
19
19
|
dataSource: { type: Object, default: undefined },
|
|
20
20
|
recordId: { type: [String, Number], default: null },
|
|
21
|
+
/** The person using the form: what `user` reads, and the roles that show parts. */
|
|
22
|
+
user: { type: Object, default: undefined },
|
|
23
|
+
/** Values the app passes in, as Flectra's context: what conditions and filters read as `context`. */
|
|
24
|
+
context: { type: Object, default: undefined },
|
|
21
25
|
values: { type: Object, default: undefined },
|
|
22
|
-
skin:
|
|
26
|
+
/** The skin: the theme's own when left out, else underline. */
|
|
27
|
+
skin: { type: String, default: undefined },
|
|
28
|
+
/** A theme in the style of a known design system, over the page's own. */
|
|
29
|
+
theme: { type: String, default: undefined },
|
|
30
|
+
/** The host's own colours, corners and font, over everything else (`TOKEN_NAMES`). */
|
|
31
|
+
tokens: { type: Object, default: undefined },
|
|
23
32
|
dir: { type: String, default: undefined },
|
|
24
33
|
locale: { type: String, default: undefined },
|
|
25
34
|
labels: { type: Object, default: undefined },
|
|
@@ -50,6 +59,10 @@ export const FieldiaForm = defineComponent({
|
|
|
50
59
|
onOpen: { type: Function, default: undefined },
|
|
51
60
|
/** Any of the viewer's host done your own way: words said, a question asked, a page opened, a tab shown. */
|
|
52
61
|
host: { type: Object, default: undefined },
|
|
62
|
+
/** The records round this one, for the pager over it: their ids, or how many, where this one is, and the id at a place. */
|
|
63
|
+
records: { type: [Array, Object], default: undefined },
|
|
64
|
+
/** The trail to this record, for the breadcrumbs over it. */
|
|
65
|
+
breadcrumbs: { type: Array, default: undefined },
|
|
53
66
|
},
|
|
54
67
|
emits: {
|
|
55
68
|
ready: (_handle) => true,
|
|
@@ -65,6 +78,12 @@ export const FieldiaForm = defineComponent({
|
|
|
65
78
|
step: (_event) => true,
|
|
66
79
|
/** A run of steps ended — a button's, a moment's — and how. */
|
|
67
80
|
run: (_event) => true,
|
|
81
|
+
/** The form has its values: a record loaded — the pager moved on, a copy shown — or a new one. */
|
|
82
|
+
record: (_event) => true,
|
|
83
|
+
/** The record was archived or brought back, copied, or deleted, by a step such as the gear menu's. */
|
|
84
|
+
archive: (_event) => true,
|
|
85
|
+
duplicate: (_event) => true,
|
|
86
|
+
delete: (_event) => true,
|
|
68
87
|
},
|
|
69
88
|
setup(props, { slots, emit, expose }) {
|
|
70
89
|
const host = ref();
|
|
@@ -119,8 +138,12 @@ export const FieldiaForm = defineComponent({
|
|
|
119
138
|
form: props.form,
|
|
120
139
|
dataSource: props.dataSource,
|
|
121
140
|
recordId: props.recordId,
|
|
141
|
+
user: props.user,
|
|
142
|
+
context: props.context ? toRaw(props.context) : undefined,
|
|
122
143
|
values: props.values,
|
|
123
144
|
skin: props.skin,
|
|
145
|
+
theme: props.theme,
|
|
146
|
+
tokens: props.tokens,
|
|
124
147
|
dir: props.dir,
|
|
125
148
|
locale: props.locale,
|
|
126
149
|
labels: props.labels,
|
|
@@ -145,9 +168,12 @@ export const FieldiaForm = defineComponent({
|
|
|
145
168
|
onOpen: props.onOpen,
|
|
146
169
|
host: props.host ? toRaw(props.host) : undefined,
|
|
147
170
|
onOpenRecord: (id) => emit('openRecord', id),
|
|
171
|
+
records: props.records ? toRaw(props.records) : undefined,
|
|
172
|
+
breadcrumbs: props.breadcrumbs ? toRaw(props.breadcrumbs) : undefined,
|
|
148
173
|
});
|
|
149
174
|
for (const event of EVENTS)
|
|
150
175
|
handle.on(event, (payload) => emit(event, payload));
|
|
176
|
+
handle.on('open', (payload) => emit('record', payload));
|
|
151
177
|
portals.value = found;
|
|
152
178
|
emit('ready', handle);
|
|
153
179
|
}
|
|
@@ -158,11 +184,20 @@ export const FieldiaForm = defineComponent({
|
|
|
158
184
|
}
|
|
159
185
|
onMounted(mount);
|
|
160
186
|
onBeforeUnmount(unmount);
|
|
161
|
-
watch(() => [props.page, props.form, props.dataSource, props.recordId, props.dir, props.locale, JSON.stringify(props.labels ?? {})], () => {
|
|
187
|
+
watch(() => [props.page, props.form, props.dataSource, props.recordId, JSON.stringify(props.user ?? null), JSON.stringify(props.context ?? null), props.dir, props.locale, JSON.stringify(props.labels ?? {})], () => {
|
|
162
188
|
unmount();
|
|
163
189
|
mount();
|
|
164
190
|
});
|
|
165
|
-
|
|
191
|
+
// The host's tokens, worn in place as its app changes them.
|
|
192
|
+
watch(() => props.tokens, (tokens) => handle?.setTokens(tokens ?? null), { deep: true });
|
|
193
|
+
// A theme and a skin switch in place: the theme brings its skin, unless one is given.
|
|
194
|
+
watch(() => [props.skin, props.theme], () => {
|
|
195
|
+
if (!handle)
|
|
196
|
+
return;
|
|
197
|
+
const theme = props.theme ?? props.page.look?.theme;
|
|
198
|
+
handle.setTheme(theme ?? null);
|
|
199
|
+
handle.setSkin(skinFor(props.skin, theme));
|
|
200
|
+
});
|
|
166
201
|
watch(() => props.readonly, (readonly) => handle?.setReadonly(readonly));
|
|
167
202
|
expose({
|
|
168
203
|
get handle() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldia-form.mjs","sourceRoot":"","sources":["../../../../../libs/vue/src/lib/fieldia-form.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"fieldia-form.mjs","sourceRoot":"","sources":["../../../../../libs/vue/src/lib/fieldia-form.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAuG,MAAM,iBAAiB,CAAC;AAE5J,OAAO,EACL,eAAe,EACf,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,cAAc,EACd,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,GAKN,MAAM,KAAK,CAAC;AAuBb,4DAA4D;AAC5D,MAAM,UAAU,YAAY,CAAC,IAAU;IACrC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7D,IAAI,eAAe,EAAE;QAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC;AACf,CAAC;AAQ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