@vectoriox/iox-ui 5.29.0 → 5.29.1
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/fesm2022/vectoriox-iox-ui-forms-core.mjs +9 -5
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +9 -5
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/forms-core/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/forms-core/form-presets.ts +10 -6
package/forms-core/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ export interface FormPresetField {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface FormPresetDef {
|
|
28
|
-
id:
|
|
28
|
+
id: `${FormPresetId}`;
|
|
29
29
|
name: string;
|
|
30
30
|
icon: string;
|
|
31
31
|
/** One line in the panel: what it collects and where it goes. */
|
|
@@ -38,9 +38,13 @@ export interface FormPresetDef {
|
|
|
38
38
|
errorText: string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// forms-core is imported by both renderers (the field runtime), and a renderer that never reads the presets
|
|
42
|
+
// must drop them: the call is `@__PURE__`, and the ids are written as the enum's VALUES (typed by it, pinned
|
|
43
|
+
// to it by form-presets.spec) — a read of `FormPresetId.X` counts as a side effect to a bundler and kept the
|
|
44
|
+
// whole list in the engine's bundle.
|
|
45
|
+
export const FORM_PRESETS: readonly FormPresetDef[] = /* @__PURE__ */ Object.freeze([
|
|
42
46
|
{
|
|
43
|
-
id:
|
|
47
|
+
id: 'contact', name: 'Contact', icon: 'ph-thin ph-envelope-simple',
|
|
44
48
|
description: 'Name, email and a message. Stored, and emailed to you.',
|
|
45
49
|
formName: 'Contact form',
|
|
46
50
|
fields: [
|
|
@@ -53,7 +57,7 @@ export const FORM_PRESETS: readonly FormPresetDef[] = Object.freeze([
|
|
|
53
57
|
errorText: 'We couldn’t send your message. Please try again — your answers are still here.',
|
|
54
58
|
},
|
|
55
59
|
{
|
|
56
|
-
id:
|
|
60
|
+
id: 'newsletter', name: 'Newsletter', icon: 'ph-thin ph-paper-plane-tilt',
|
|
57
61
|
description: 'One email field plus consent. Stored.',
|
|
58
62
|
formName: 'Newsletter signup',
|
|
59
63
|
fields: [
|
|
@@ -67,7 +71,7 @@ export const FORM_PRESETS: readonly FormPresetDef[] = Object.freeze([
|
|
|
67
71
|
errorText: 'We couldn’t sign you up. Please try again.',
|
|
68
72
|
},
|
|
69
73
|
{
|
|
70
|
-
id:
|
|
74
|
+
id: 'application', name: 'Application', icon: 'ph-thin ph-read-cv-logo',
|
|
71
75
|
description: 'Details plus a CV upload. Stored, with an auto-reply.',
|
|
72
76
|
formName: 'Application',
|
|
73
77
|
fields: [
|
|
@@ -83,7 +87,7 @@ export const FORM_PRESETS: readonly FormPresetDef[] = Object.freeze([
|
|
|
83
87
|
errorText: 'We couldn’t submit your application. Please try again.',
|
|
84
88
|
},
|
|
85
89
|
{
|
|
86
|
-
id:
|
|
90
|
+
id: 'booking', name: 'Booking request', icon: 'ph-thin ph-calendar-check',
|
|
87
91
|
description: 'Date and party size. Stored, and it notifies you.',
|
|
88
92
|
formName: 'Booking request',
|
|
89
93
|
fields: [
|