@middag-io/react 0.29.0 → 0.30.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/dist-lib/{DateField-BCCidKwl.js → DateField-CcRD2r-Z.js} +5 -5
- package/dist-lib/{DateRangeField-CvU7wiyr.js → DateRangeField-DKZMfKB2.js} +199 -198
- package/dist-lib/{DocumentField-5uXJyXlL.js → DocumentField-DjnK9T7o.js} +3 -3
- package/dist-lib/{FormPanelBlock-DJ0T69X7.js → FormPanelBlock-BW2oi2_O.js} +635 -556
- package/dist-lib/{MarkdownContent-aIIUC0Fl.js → MarkdownContent-C-X2QGA2.js} +18 -17
- package/dist-lib/MarkdownContent-D5FIjx_W.js +2 -0
- package/dist-lib/{PhoneField-DpHb6FQE.js → PhoneField-D_djeYhK.js} +38 -37
- package/dist-lib/base/blocks/ActionGridBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/CardGridBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/MetricCardBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/StatusStripBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/TabbedPanelBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/WorkflowProgressBlock.d.ts.map +1 -1
- package/dist-lib/base/form/FormField.d.ts +2 -1
- package/dist-lib/base/form/FormField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/DateRangeField.d.ts +1 -1
- package/dist-lib/base/form/fields/DateRangeField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/FileUploadField.d.ts +2 -2
- package/dist-lib/base/form/fields/FileUploadField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/NativeSelectField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/RatingField.d.ts +1 -1
- package/dist-lib/base/form/fields/RatingField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/SlugField.d.ts.map +1 -1
- package/dist-lib/base/form/form-schema-builder.d.ts.map +1 -1
- package/dist-lib/base/form/form-utils.d.ts +15 -0
- package/dist-lib/base/form/form-utils.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
- package/dist-lib/base/partials/StatusBar/index.d.ts.map +1 -1
- package/dist-lib/base/partials/StatusIndicator/index.d.ts.map +1 -1
- package/dist-lib/base/utils/time.d.ts.map +1 -1
- package/dist-lib/{button-Ba1PcsOx.js → button-Bm0X9WO5.js} +1 -1
- package/dist-lib/{calendar-DnlbmjNu.js → calendar-CucaItjm.js} +51 -50
- package/dist-lib/{chevron-right-Casn6MFU.js → chevron-right-DY3SdwdB.js} +1 -1
- package/dist-lib/chunk-DeC0fbbY.js +22 -0
- package/dist-lib/{combobox-DZ_qm1VH.js → combobox-yfHHEi6f.js} +65 -64
- package/dist-lib/contracts/block-data/form.d.ts +64 -197
- package/dist-lib/contracts/block-data/form.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/shared.d.ts +1 -16
- package/dist-lib/contracts/block-data/shared.d.ts.map +1 -1
- package/dist-lib/contracts/generated/contract-schema.d.ts +2 -1
- package/dist-lib/contracts/generated/contract-schema.d.ts.map +1 -1
- package/dist-lib/contracts/generated/contract-types.d.ts +239 -4
- package/dist-lib/contracts/generated/contract-types.d.ts.map +1 -1
- package/dist-lib/contracts/generated/index.d.ts +1 -1
- package/dist-lib/contracts/page-contract-schema.d.ts +1 -0
- package/dist-lib/contracts/page-contract-schema.d.ts.map +1 -1
- package/dist-lib/contracts/page-contract.d.ts +0 -2
- package/dist-lib/contracts/page-contract.d.ts.map +1 -1
- package/dist-lib/contracts/shared-props.d.ts +4 -0
- package/dist-lib/contracts/shared-props.d.ts.map +1 -1
- package/dist-lib/{dist-B-MyAb3x.js → dist-B7gC4peV.js} +1 -1
- package/dist-lib/{dist-7c0PXlrb.js → dist-Bbnbom8g.js} +2 -2
- package/dist-lib/{dist-DuO9WodV.js → dist-DdgpZG8v.js} +3 -3
- package/dist-lib/{document-validation-YgxIqb8k.js → document-validation-DX0fB9cu.js} +2 -2
- package/dist-lib/i18n/resolve-field-error.d.ts +2 -2
- package/dist-lib/i18n/resolve-field-error.d.ts.map +1 -1
- package/dist-lib/index.d.ts +1 -1
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/{input-CdUVNe54.js → input-BC9whKEm.js} +1 -1
- package/dist-lib/middag-react.js +3274 -3217
- package/dist-lib/{popover-Bxsp1hlN.js → popover-BaiQ-JSz.js} +29 -29
- package/dist-lib/{resolve-field-error-bG2_dMOY.js → resolve-field-error-dbUy6DeX.js} +2155 -2069
- package/dist-lib/{scroll-area-B9TZ05bl.js → scroll-area-D94_a2-1.js} +57 -57
- package/dist-lib/{skeleton-HpnbVVji.js → skeleton-xL_Hzxj-.js} +1 -1
- package/dist-lib/{use-mobile-Kp3Dy8mh.js → use-mobile-CBJJLRL8.js} +36 -36
- package/dist-lib/{useTranslation-CHN-BFba.js → useTranslation-BuyMWJ9T.js} +1 -1
- package/dist-lib/{utils-Yj2czlvU.js → utils-CpaZ5_iF.js} +517 -538
- package/package.json +1 -1
- package/dist-lib/MarkdownContent-CN-ZN_69.js +0 -2
- /package/dist-lib/{dist-CmB86BdM.js → dist-3F0-lo64.js} +0 -0
- /package/dist-lib/{dist-axU0pUop.js → dist-DdfRh_k3.js} +0 -0
- /package/dist-lib/{floating-ui.react-dom-BnOzLaz1.js → floating-ui.react-dom-CNntavPo.js} +0 -0
|
@@ -1,252 +1,119 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Form panel types — schema-driven form field definitions.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The form field union, the field-props hierarchy and the schema-node wrappers
|
|
5
|
+
* (field, section, group, header) are GENERATED from middag-php-ui — the
|
|
6
|
+
* canonical wire contract (PHP value objects → JSON Schema → these types). This
|
|
7
|
+
* module re-exports them under the stable public names and derives the
|
|
8
|
+
* per-component variant aliases via `Extract`.
|
|
9
|
+
*
|
|
10
|
+
* Only the FormPanelBlockData envelope and the client error shapes stay
|
|
11
|
+
* hand-authored: the rich client `FieldError` ({message, key, domain, params})
|
|
12
|
+
* is intentionally NOT on the wire yet, so it is not generated.
|
|
6
13
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
export type
|
|
9
|
-
/**
|
|
10
|
-
export
|
|
11
|
-
label: string;
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
helpText?: string;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
readOnly?: boolean;
|
|
17
|
-
/** Client-side validation rules (additive to type-based defaults). */
|
|
18
|
-
validation?: FormFieldValidation;
|
|
19
|
-
/** Conditional visibility/state rules. */
|
|
20
|
-
visible_when?: FormCondition;
|
|
21
|
-
hidden_when?: FormCondition;
|
|
22
|
-
disabled_when?: FormCondition;
|
|
23
|
-
required_when?: FormCondition;
|
|
24
|
-
}
|
|
25
|
-
/** Props for fields that render a list of options. */
|
|
26
|
-
export interface OptionFieldProps extends FieldPropsBase {
|
|
27
|
-
options?: Array<{
|
|
28
|
-
value: string;
|
|
29
|
-
label: string;
|
|
30
|
-
}>;
|
|
31
|
-
}
|
|
32
|
-
interface FieldNodeBase {
|
|
33
|
-
kind: "field";
|
|
34
|
-
key: string;
|
|
35
|
-
}
|
|
14
|
+
import type { FormComponent, FormFieldNode, FormSchemaNode } from "../../contracts/generated";
|
|
15
|
+
export type { FieldPropsBase, FormFieldNode, FormGroupNode, FormHeaderNode, FormSchemaNode, FormSectionNode, OptionFieldProps, } from "../../contracts/generated";
|
|
16
|
+
/** The full catalog of renderable form field components. */
|
|
17
|
+
export type FormFieldType = FormComponent;
|
|
36
18
|
/** Simple text-based fields: text, email, url, password, color. */
|
|
37
|
-
export
|
|
19
|
+
export type SimpleFormField = Extract<FormFieldNode, {
|
|
38
20
|
component: "text" | "email" | "url" | "password" | "color";
|
|
39
|
-
|
|
40
|
-
}
|
|
21
|
+
}>;
|
|
41
22
|
/** Textarea field with configurable row count. */
|
|
42
|
-
export
|
|
23
|
+
export type TextareaFormField = Extract<FormFieldNode, {
|
|
43
24
|
component: "textarea";
|
|
44
|
-
|
|
45
|
-
rows?: number;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
25
|
+
}>;
|
|
48
26
|
/** One-time-password / verification code input (segmented slots). */
|
|
49
|
-
export
|
|
27
|
+
export type OtpFormField = Extract<FormFieldNode, {
|
|
50
28
|
component: "otp";
|
|
51
|
-
|
|
52
|
-
/** Number of slots (default: 6). */
|
|
53
|
-
maxLength?: number;
|
|
54
|
-
/** Allowed characters: "digits" (default) or "alphanumeric". */
|
|
55
|
-
pattern?: "digits" | "alphanumeric";
|
|
56
|
-
/** Insert a visual separator every N slots (e.g. 3 → "123-456"). */
|
|
57
|
-
groupSize?: number;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
29
|
+
}>;
|
|
60
30
|
/** Numeric input fields: int, float. */
|
|
61
|
-
export
|
|
31
|
+
export type NumericFormField = Extract<FormFieldNode, {
|
|
62
32
|
component: "int" | "float";
|
|
63
|
-
|
|
64
|
-
min?: number;
|
|
65
|
-
max?: number;
|
|
66
|
-
step?: number;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
33
|
+
}>;
|
|
69
34
|
/** Numeric range slider (single value or multi-thumb range). */
|
|
70
|
-
export
|
|
35
|
+
export type SliderFormField = Extract<FormFieldNode, {
|
|
71
36
|
component: "slider";
|
|
72
|
-
|
|
73
|
-
min?: number;
|
|
74
|
-
max?: number;
|
|
75
|
-
step?: number;
|
|
76
|
-
/** Render two thumbs for a range; the value becomes a [from, to] tuple. */
|
|
77
|
-
multiple?: boolean;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
37
|
+
}>;
|
|
80
38
|
/** Fields that select from a list of options: select, radio. */
|
|
81
|
-
export
|
|
39
|
+
export type SelectFormField = Extract<FormFieldNode, {
|
|
82
40
|
component: "select" | "radio";
|
|
83
|
-
|
|
84
|
-
}
|
|
41
|
+
}>;
|
|
85
42
|
/** Multi-select field. */
|
|
86
|
-
export
|
|
43
|
+
export type MultiSelectFormField = Extract<FormFieldNode, {
|
|
87
44
|
component: "multiselect";
|
|
88
|
-
|
|
89
|
-
}
|
|
45
|
+
}>;
|
|
90
46
|
/** Native HTML <select> — fallback for iframe/portal-hostile contexts (e.g. Moodle). */
|
|
91
|
-
export
|
|
47
|
+
export type NativeSelectFormField = Extract<FormFieldNode, {
|
|
92
48
|
component: "native_select";
|
|
93
|
-
|
|
94
|
-
}
|
|
49
|
+
}>;
|
|
95
50
|
/** Boolean toggle fields: checkbox, switch. */
|
|
96
|
-
export
|
|
51
|
+
export type BooleanFormField = Extract<FormFieldNode, {
|
|
97
52
|
component: "checkbox" | "switch";
|
|
98
|
-
|
|
99
|
-
}
|
|
53
|
+
}>;
|
|
100
54
|
/** Date and datetime pickers. */
|
|
101
|
-
export
|
|
55
|
+
export type DateFormField = Extract<FormFieldNode, {
|
|
102
56
|
component: "date" | "datetime";
|
|
103
|
-
|
|
104
|
-
}
|
|
57
|
+
}>;
|
|
105
58
|
/** Duration input. */
|
|
106
|
-
export
|
|
59
|
+
export type DurationFormField = Extract<FormFieldNode, {
|
|
107
60
|
component: "duration";
|
|
108
|
-
|
|
109
|
-
}
|
|
61
|
+
}>;
|
|
110
62
|
/** File upload field with drag-drop support. */
|
|
111
|
-
export
|
|
63
|
+
export type FileFormField = Extract<FormFieldNode, {
|
|
112
64
|
component: "file";
|
|
113
|
-
|
|
114
|
-
/** MIME types or extensions (e.g. "image/*", ".pdf,.docx"). */
|
|
115
|
-
accept?: string;
|
|
116
|
-
/** Allow multiple files. */
|
|
117
|
-
multiple?: boolean;
|
|
118
|
-
/** Maximum number of files (when multiple). */
|
|
119
|
-
maxFiles?: number;
|
|
120
|
-
/** Maximum file size in bytes. */
|
|
121
|
-
maxSize?: number;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
65
|
+
}>;
|
|
124
66
|
/** Async entity picker with search autocomplete. */
|
|
125
|
-
export
|
|
67
|
+
export type EntityPickerFormField = Extract<FormFieldNode, {
|
|
126
68
|
component: "entity_picker";
|
|
127
|
-
|
|
128
|
-
/** Async search endpoint URL. */
|
|
129
|
-
autocompleteHref?: string;
|
|
130
|
-
/** Minimum characters before search triggers. */
|
|
131
|
-
autocompleteMinChars?: number;
|
|
132
|
-
/** Field name for primary display label. */
|
|
133
|
-
entityDisplayField?: string;
|
|
134
|
-
/** Field name for subtitle line. */
|
|
135
|
-
entitySubtitleField?: string;
|
|
136
|
-
/** Field name for avatar URL. */
|
|
137
|
-
entityAvatarField?: string;
|
|
138
|
-
};
|
|
139
|
-
}
|
|
69
|
+
}>;
|
|
140
70
|
/** International phone number input. */
|
|
141
|
-
export
|
|
71
|
+
export type PhoneFormField = Extract<FormFieldNode, {
|
|
142
72
|
component: "phone";
|
|
143
|
-
|
|
144
|
-
/** Default country code (ISO 3166-1 alpha-2, e.g. "BR"). */
|
|
145
|
-
defaultCountry?: string;
|
|
146
|
-
/** Hide country selector, lock to defaultCountry. */
|
|
147
|
-
fixedCountry?: boolean;
|
|
148
|
-
};
|
|
149
|
-
}
|
|
73
|
+
}>;
|
|
150
74
|
/** National document field (CPF, CNPJ, SSN, etc.) with locale-aware validation. */
|
|
151
|
-
export
|
|
75
|
+
export type DocumentFormField = Extract<FormFieldNode, {
|
|
152
76
|
component: "document";
|
|
153
|
-
|
|
154
|
-
/** Validator.js locale ("pt-BR", "en-US", etc.), "generic", or custom key. */
|
|
155
|
-
documentType?: string;
|
|
156
|
-
/** Restrict to person, company, or both (default: "any"). */
|
|
157
|
-
documentScope?: "person" | "company" | "any";
|
|
158
|
-
/** Host-defined custom masks (merged with built-in). */
|
|
159
|
-
documentMasks?: Record<string, FormFieldDocumentMask>;
|
|
160
|
-
};
|
|
161
|
-
}
|
|
77
|
+
}>;
|
|
162
78
|
/** Currency input with locale formatting. */
|
|
163
|
-
export
|
|
79
|
+
export type CurrencyFormField = Extract<FormFieldNode, {
|
|
164
80
|
component: "currency";
|
|
165
|
-
|
|
166
|
-
/** ISO 4217 currency code (e.g. "BRL", "USD"). */
|
|
167
|
-
currency?: string;
|
|
168
|
-
/** Override locale for formatting (e.g. "pt-BR"). */
|
|
169
|
-
currencyLocale?: string;
|
|
170
|
-
};
|
|
171
|
-
}
|
|
81
|
+
}>;
|
|
172
82
|
/** Auto-generated slug from another field. */
|
|
173
|
-
export
|
|
83
|
+
export type SlugFormField = Extract<FormFieldNode, {
|
|
174
84
|
component: "slug";
|
|
175
|
-
|
|
176
|
-
/** Source field key for auto-generation. */
|
|
177
|
-
sourceField?: string;
|
|
178
|
-
/** URL prefix display (e.g. "site.com/"). */
|
|
179
|
-
prefix?: string;
|
|
180
|
-
};
|
|
181
|
-
}
|
|
85
|
+
}>;
|
|
182
86
|
/** Tag input with optional max limit. */
|
|
183
|
-
export
|
|
87
|
+
export type TagsFormField = Extract<FormFieldNode, {
|
|
184
88
|
component: "tags";
|
|
185
|
-
|
|
186
|
-
/** Maximum number of tags allowed. */
|
|
187
|
-
maxTags?: number;
|
|
188
|
-
};
|
|
189
|
-
}
|
|
89
|
+
}>;
|
|
190
90
|
/** Star rating input. */
|
|
191
|
-
export
|
|
91
|
+
export type RatingFormField = Extract<FormFieldNode, {
|
|
192
92
|
component: "rating";
|
|
193
|
-
|
|
194
|
-
/** Maximum rating value (default: 5). */
|
|
195
|
-
maxRating?: number;
|
|
196
|
-
};
|
|
197
|
-
}
|
|
93
|
+
}>;
|
|
198
94
|
/** Date range selector with filter operators and presets. */
|
|
199
|
-
export
|
|
95
|
+
export type DateRangeFormField = Extract<FormFieldNode, {
|
|
200
96
|
component: "date_range";
|
|
201
|
-
|
|
202
|
-
/** Filter operator preset ("is" | "before" | "after" | "between"). */
|
|
203
|
-
operator?: string;
|
|
204
|
-
};
|
|
205
|
-
}
|
|
97
|
+
}>;
|
|
206
98
|
/** Hidden field — not rendered, carries data. */
|
|
207
|
-
export
|
|
99
|
+
export type HiddenFormField = Extract<FormFieldNode, {
|
|
208
100
|
component: "hidden";
|
|
209
|
-
|
|
210
|
-
}
|
|
101
|
+
}>;
|
|
211
102
|
/** Static display-only field. */
|
|
212
|
-
export
|
|
103
|
+
export type StaticFormField = Extract<FormFieldNode, {
|
|
213
104
|
component: "static";
|
|
214
|
-
|
|
215
|
-
}
|
|
105
|
+
}>;
|
|
216
106
|
/** Visual header separator (non-interactive). */
|
|
217
|
-
export
|
|
107
|
+
export type HeaderFormField = Extract<FormFieldNode, {
|
|
218
108
|
component: "header";
|
|
219
|
-
|
|
220
|
-
label: string;
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Discriminated union of all form field types.
|
|
225
|
-
* Narrow by `component` to access type-specific props.
|
|
226
|
-
*/
|
|
227
|
-
export type FormFieldNode = SimpleFormField | TextareaFormField | OtpFormField | NumericFormField | SliderFormField | SelectFormField | NativeSelectFormField | MultiSelectFormField | BooleanFormField | DateFormField | DurationFormField | FileFormField | EntityPickerFormField | PhoneFormField | DocumentFormField | CurrencyFormField | SlugFormField | TagsFormField | RatingFormField | DateRangeFormField | HiddenFormField | StaticFormField | HeaderFormField;
|
|
228
|
-
export interface FormSectionNode {
|
|
229
|
-
kind: "section";
|
|
230
|
-
id: string;
|
|
231
|
-
label: string;
|
|
232
|
-
defaultCollapsed?: boolean;
|
|
233
|
-
children: FormSchemaNode[];
|
|
234
|
-
}
|
|
235
|
-
export interface FormGroupNode {
|
|
236
|
-
kind: "group";
|
|
237
|
-
id: string;
|
|
238
|
-
columns?: 1 | 2;
|
|
239
|
-
children: FormSchemaNode[];
|
|
240
|
-
}
|
|
241
|
-
export interface FormHeaderNode {
|
|
242
|
-
kind: "header";
|
|
243
|
-
label: string;
|
|
244
|
-
}
|
|
245
|
-
export type FormSchemaNode = FormFieldNode | FormSectionNode | FormGroupNode | FormHeaderNode;
|
|
109
|
+
}>;
|
|
246
110
|
/**
|
|
247
111
|
* A single server validation error. v0.11.0 wire shape: `message` is the
|
|
248
112
|
* server-resolved (default-locale) string; key/domain/params are the machine
|
|
249
113
|
* channel for client-side re-translation.
|
|
114
|
+
*
|
|
115
|
+
* Hand-authored on purpose: the wire `FieldError` ($def in middag-php-ui) is the
|
|
116
|
+
* leaner `string | string[]`; unifying the two is a deferred breaking change.
|
|
250
117
|
*/
|
|
251
118
|
export interface FieldError {
|
|
252
119
|
message: string;
|
|
@@ -254,8 +121,9 @@ export interface FieldError {
|
|
|
254
121
|
domain: string;
|
|
255
122
|
params?: Record<string, unknown>;
|
|
256
123
|
}
|
|
124
|
+
export type FormErrorValue = FieldError | FieldError[] | string;
|
|
257
125
|
/** Server validation errors keyed by field key. */
|
|
258
|
-
export type FormErrors = Record<string,
|
|
126
|
+
export type FormErrors = Record<string, FormErrorValue>;
|
|
259
127
|
/** HTTP method the form submits with. */
|
|
260
128
|
export type FormMethod = "post" | "put" | "patch";
|
|
261
129
|
/** Client/server validation strategy for the form panel. */
|
|
@@ -287,5 +155,4 @@ export interface FormPanelBlockData {
|
|
|
287
155
|
validation?: FormValidationMode;
|
|
288
156
|
};
|
|
289
157
|
}
|
|
290
|
-
export {};
|
|
291
158
|
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/contracts/block-data/form.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/contracts/block-data/form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI1F,YAAY,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,4DAA4D;AAC5D,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAQ1C,mEAAmE;AACnE,MAAM,MAAM,eAAe,GAAG,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ACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,kBAAkB,CAAC;KACjC,CAAC;CACH"}
|
|
@@ -12,22 +12,7 @@ export interface EntityRef {
|
|
|
12
12
|
/** Field name in the row/record that contains the entity's ID value. */
|
|
13
13
|
id: string;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
field: string;
|
|
17
|
-
operator: "equals" | "not_equals" | "in" | "not_in";
|
|
18
|
-
value: string | string[];
|
|
19
|
-
}
|
|
20
|
-
export interface FormFieldValidation {
|
|
21
|
-
minLength?: number;
|
|
22
|
-
maxLength?: number;
|
|
23
|
-
pattern?: string;
|
|
24
|
-
patternMessage?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface FormFieldDocumentMask {
|
|
27
|
-
pattern: string;
|
|
28
|
-
maxLength: number;
|
|
29
|
-
placeholder?: string;
|
|
30
|
-
}
|
|
15
|
+
export type { FormCondition, FormFieldDocumentMask, FormFieldValidation, } from "../../contracts/generated";
|
|
31
16
|
export interface FormFieldEntityOption {
|
|
32
17
|
value: string;
|
|
33
18
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/contracts/block-data/shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACxB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;CACZ;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/contracts/block-data/shared.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACxB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACvC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @source middag-php-ui/schema/{page-contract,fragment}.json
|
|
11
11
|
* @contract-version 1
|
|
12
|
-
* @hash
|
|
12
|
+
* @hash f84f88b8bbb7e582
|
|
13
13
|
*/
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
/** Zod schema for a full PageContract wire payload. Validates known canonical
|
|
@@ -123,6 +123,7 @@ export declare const pageContractSchemaCore: z.ZodObject<{
|
|
|
123
123
|
loading: z.ZodOptional<z.ZodLiteral<true>>;
|
|
124
124
|
}, z.core.$strip>>;
|
|
125
125
|
}, z.core.$strip>>>;
|
|
126
|
+
entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
126
127
|
}, z.core.$strip>;
|
|
127
128
|
/** Zod schema for a Fragment (partial update) wire payload. Lenient on unknown keys. */
|
|
128
129
|
export declare const fragmentSchemaCore: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-schema.d.ts","sourceRoot":"","sources":["../../../src/contracts/generated/contract-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;2EAC2E;AAC3E,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"contract-schema.d.ts","sourceRoot":"","sources":["../../../src/contracts/generated/contract-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;2EAC2E;AAC3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAg6BuM,CAAC;AAE3O,wFAAwF;AACxF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgSwB,CAAC"}
|