@envisiongroup/porygon 1.0.2 → 1.0.4
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/index.js +72 -69
- package/dist/react-components/fields/TagPicker/EFWTagPicker.js +130 -126
- package/dist/react-components/fields/TagPicker/EFWTagPicker.types.d.ts +11 -6
- package/dist/react-components/forms/EFWForm/EFWForm.js +284 -290
- package/dist/react-components/forms/EFWForm/EFWForm.utils.d.ts +26 -1
- package/dist/react-components/forms/EFWForm/EFWForm.utils.js +94 -65
- package/dist/react-components/forms/EFWForm/index.d.ts +4 -3
- package/dist/react-components/forms/EFWForm/index.js +10 -7
- package/dist/react-components/tables/EFWTable/EFWTable.js +767 -747
- package/dist/react-components/tables/EFWTable/EFWTable.types.d.ts +10 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.js +31 -9
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.types.d.ts +39 -4
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.utils.d.ts +8 -3
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.utils.js +4 -1
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.js +47 -15
- package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.js +52 -21
- package/dist/react-components/tables/EFWTable/utils/index.d.ts +2 -1
- package/dist/react-components/tables/EFWTable/utils/index.js +19 -17
- package/dist/react-components/tables/EFWTable/utils/itemCompletion.d.ts +32 -0
- package/dist/react-components/tables/EFWTable/utils/itemCompletion.js +23 -0
- package/package.json +2 -2
|
@@ -1,8 +1,33 @@
|
|
|
1
|
-
import { EFWFormFieldUpdate, EFWFormFieldProps, GetFieldValue, ExtractFieldNames, EFWFormValues, EFWUpdateFieldFunction, EFWFieldLogicContext, GridTemplateColumnsType } from './EFWForm.types';
|
|
1
|
+
import { EFWFormFieldUpdate, EFWFormFieldProps, GetFieldValue, ExtractFieldNames, EFWFormValues, EFWUpdateFieldFunction, EFWFieldLogicContext, EFWFormFieldType, EFWFormFieldValue, GridTemplateColumnsType } from './EFWForm.types';
|
|
2
2
|
import { ValidationMessage, ValidationState } from '../../fields/_shared/EFWField/EFWField.types';
|
|
3
3
|
import { EFWFormLocaleText } from '../../i18n';
|
|
4
4
|
|
|
5
5
|
export declare const generateGridTemplateColumns: (config: GridTemplateColumnsType) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Devuelve un valor "vacío" normalizado FRESCO para un tipo de campo.
|
|
8
|
+
*
|
|
9
|
+
* Es la fuente única de verdad para el valor por defecto de un campo sin valor,
|
|
10
|
+
* compartida entre `EFWForm` (valor inicial de campos) y `EFWTable` (completado
|
|
11
|
+
* de items creados desde un formulario con un subconjunto de fields).
|
|
12
|
+
*
|
|
13
|
+
* Los tipos array (`Choice`, `MultiChoice`, `Date`, `Attachments`) devuelven
|
|
14
|
+
* SIEMPRE un array nuevo, de modo que dos llamadas (y por tanto dos items
|
|
15
|
+
* completados) no compartan la misma referencia. Esto evita que una mutación
|
|
16
|
+
* accidental en un item contamine a los demás.
|
|
17
|
+
*
|
|
18
|
+
* Coherente con `commons/valueNormalization`: texto vacío es `''`, arrays
|
|
19
|
+
* vacíos son `[]`, numérico es `null` y booleano es `false`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getEmptyValueForFieldType: (typeAsString: EFWFormFieldType) => EFWFormFieldValue;
|
|
22
|
+
/**
|
|
23
|
+
* Snapshot congelado de los valores vacíos por tipo, solo de referencia/inspección.
|
|
24
|
+
*
|
|
25
|
+
* Los arrays internos están congelados para que mutarlos falle (modo estricto)
|
|
26
|
+
* o sea no-op (modo sloppy). **No usar este mapa como fuente de valores
|
|
27
|
+
* consumibles**: para obtener valores vacíos sin identidad compartida usar
|
|
28
|
+
* `getEmptyValueForFieldType`, que devuelve arrays frescos en cada llamada.
|
|
29
|
+
*/
|
|
30
|
+
export declare const EMPTY_VALUE_BY_FIELD_TYPE: Readonly<Record<EFWFormFieldType, EFWFormFieldValue>>;
|
|
6
31
|
declare const EFWFormFieldWrapperInner: <T extends readonly EFWFormFieldProps[]>({ field, initialValue, onValueChange, registerUpdateProps, unregisterUpdateProps, getFieldLogicByName, isControlled, getAllValues, updateFieldProps, localeText, onValidationChange, }: {
|
|
7
32
|
field: T[number];
|
|
8
33
|
initialValue: GetFieldValue<T, T[number]["internalName"]>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useIsomorphicLayoutEffect as
|
|
4
|
-
import { normalizeArrayValue as
|
|
5
|
-
import { EFWInputField as
|
|
6
|
-
import { EFWNumberInputField as
|
|
7
|
-
import { EFWTextAreaField as
|
|
8
|
-
import { EFWSwitchField as
|
|
9
|
-
import { EFWTagPickerField as
|
|
2
|
+
import { memo as $, useRef as W, useState as B, useCallback as R, useEffect as j, useMemo as Y } from "react";
|
|
3
|
+
import { useIsomorphicLayoutEffect as H } from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
|
4
|
+
import { normalizeArrayValue as D } from "../../commons/valueNormalization.js";
|
|
5
|
+
import { EFWInputField as J } from "../../fields/Input/EFWInputField.js";
|
|
6
|
+
import { EFWNumberInputField as K } from "../../fields/NumberInput/EFWNumberInputField.js";
|
|
7
|
+
import { EFWTextAreaField as Q } from "../../fields/TextArea/EFWTextAreaField.js";
|
|
8
|
+
import { EFWSwitchField as X } from "../../fields/Switch/EFWSwitchField.js";
|
|
9
|
+
import { EFWTagPickerField as Z } from "../../fields/TagPicker/EFWTagPickerField.js";
|
|
10
10
|
import { EFWDatePickerField as U } from "../../fields/DatePicker/EFWDatePickerField.js";
|
|
11
11
|
import { EFWAttachmentsField as p } from "../../fields/Attachments/EFWAttachmentsField.js";
|
|
12
|
-
const
|
|
12
|
+
const Se = (t) => {
|
|
13
13
|
if (typeof t == "number")
|
|
14
14
|
return t > 1 ? `repeat(${t}, 1fr)` : "1fr";
|
|
15
15
|
if (typeof t == "string")
|
|
@@ -19,68 +19,94 @@ const Fe = (t) => {
|
|
|
19
19
|
return n ? `repeat(auto-fit, minmax(clamp(${e}, 100% / ${n + 1}, 100% / 1), 1fr))` : `repeat(auto-fit, minmax(${e}, 1fr))`;
|
|
20
20
|
}
|
|
21
21
|
return "1fr";
|
|
22
|
-
},
|
|
22
|
+
}, fe = (t) => {
|
|
23
|
+
switch (t) {
|
|
24
|
+
case "Text":
|
|
25
|
+
case "Note":
|
|
26
|
+
return "";
|
|
27
|
+
case "Number":
|
|
28
|
+
return null;
|
|
29
|
+
case "Boolean":
|
|
30
|
+
return !1;
|
|
31
|
+
case "Choice":
|
|
32
|
+
case "MultiChoice":
|
|
33
|
+
case "Date":
|
|
34
|
+
case "Attachments":
|
|
35
|
+
return [];
|
|
36
|
+
default:
|
|
37
|
+
return "";
|
|
38
|
+
}
|
|
39
|
+
}, Me = Object.freeze({
|
|
40
|
+
Text: "",
|
|
41
|
+
Number: null,
|
|
42
|
+
Note: "",
|
|
43
|
+
Choice: Object.freeze([]),
|
|
44
|
+
Date: Object.freeze([]),
|
|
45
|
+
Boolean: !1,
|
|
46
|
+
Attachments: Object.freeze([]),
|
|
47
|
+
MultiChoice: Object.freeze([])
|
|
48
|
+
}), ee = ({
|
|
23
49
|
field: t,
|
|
24
50
|
initialValue: e,
|
|
25
51
|
onValueChange: n,
|
|
26
52
|
registerUpdateProps: i,
|
|
27
53
|
unregisterUpdateProps: l,
|
|
28
54
|
getFieldLogicByName: r,
|
|
29
|
-
isControlled:
|
|
30
|
-
getAllValues:
|
|
31
|
-
updateFieldProps:
|
|
55
|
+
isControlled: k,
|
|
56
|
+
getAllValues: T,
|
|
57
|
+
updateFieldProps: C,
|
|
32
58
|
localeText: G,
|
|
33
59
|
onValidationChange: L
|
|
34
60
|
}) => {
|
|
35
|
-
const d = t.internalName,
|
|
61
|
+
const d = t.internalName, S = W(e), [c, q] = B(() => S.current), f = !!k, [I, P] = B(
|
|
36
62
|
{}
|
|
37
|
-
), N =
|
|
63
|
+
), N = W({
|
|
38
64
|
editable: t.editable,
|
|
39
65
|
disabled: t.disabled,
|
|
40
66
|
hidden: t.hidden,
|
|
41
67
|
required: t.required
|
|
42
68
|
}), m = R(
|
|
43
69
|
(a) => {
|
|
44
|
-
|
|
70
|
+
q(a), S.current = a;
|
|
45
71
|
},
|
|
46
72
|
[]
|
|
47
73
|
);
|
|
48
|
-
|
|
49
|
-
f || (
|
|
74
|
+
j(() => {
|
|
75
|
+
f || (q(e), S.current = e);
|
|
50
76
|
}, [e, f]);
|
|
51
77
|
const u = R(
|
|
52
78
|
(a) => {
|
|
53
|
-
const v =
|
|
79
|
+
const v = S.current;
|
|
54
80
|
m(a), n(d, a, { silent: !0 });
|
|
55
81
|
const y = r?.(d);
|
|
56
|
-
let
|
|
82
|
+
let F = a;
|
|
57
83
|
if (y) {
|
|
58
|
-
const M =
|
|
59
|
-
y(a,
|
|
84
|
+
const M = T();
|
|
85
|
+
y(a, C, {
|
|
60
86
|
allValues: M,
|
|
61
87
|
trigger: "change",
|
|
62
88
|
fieldName: d,
|
|
63
89
|
previousValue: v,
|
|
64
90
|
isControlled: f
|
|
65
|
-
}),
|
|
91
|
+
}), F = T()[d];
|
|
66
92
|
}
|
|
67
|
-
n(d,
|
|
93
|
+
n(d, F);
|
|
68
94
|
},
|
|
69
95
|
[
|
|
70
96
|
m,
|
|
71
97
|
r,
|
|
72
|
-
|
|
98
|
+
T,
|
|
73
99
|
d,
|
|
74
100
|
f,
|
|
75
101
|
n,
|
|
76
|
-
|
|
102
|
+
C
|
|
77
103
|
]
|
|
78
104
|
), b = R(
|
|
79
105
|
(a) => {
|
|
80
106
|
L?.(d, a);
|
|
81
107
|
},
|
|
82
108
|
[d, L]
|
|
83
|
-
),
|
|
109
|
+
), x = R(
|
|
84
110
|
(a) => {
|
|
85
111
|
P((v) => ({ ...v, ...a })), "value" in a ? m(
|
|
86
112
|
a.value
|
|
@@ -94,16 +120,16 @@ const Fe = (t) => {
|
|
|
94
120
|
},
|
|
95
121
|
[m]
|
|
96
122
|
);
|
|
97
|
-
|
|
98
|
-
l(d,
|
|
99
|
-
}), [d, i, l,
|
|
100
|
-
const a = N.current, v = a.editable !== t.editable, y = a.disabled !== t.disabled,
|
|
101
|
-
!v && !y && !
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
|
|
123
|
+
H(() => (i(d, x), () => {
|
|
124
|
+
l(d, x);
|
|
125
|
+
}), [d, i, l, x]), j(() => {
|
|
126
|
+
const a = N.current, v = a.editable !== t.editable, y = a.disabled !== t.disabled, F = a.hidden !== t.hidden, M = a.required !== t.required;
|
|
127
|
+
!v && !y && !F && !M || (P((E) => {
|
|
128
|
+
let w = !1;
|
|
129
|
+
const A = { ...E }, O = (_, z) => {
|
|
130
|
+
_ && z in A && (delete A[z], w = !0);
|
|
105
131
|
};
|
|
106
|
-
return O(v, "editable"), O(y, "disabled"), O(
|
|
132
|
+
return O(v, "editable"), O(y, "disabled"), O(F, "hidden"), O(M, "required"), w ? A : E;
|
|
107
133
|
}), N.current = {
|
|
108
134
|
editable: t.editable,
|
|
109
135
|
disabled: t.disabled,
|
|
@@ -111,7 +137,7 @@ const Fe = (t) => {
|
|
|
111
137
|
required: t.required
|
|
112
138
|
});
|
|
113
139
|
}, [t.editable, t.disabled, t.hidden, t.required]);
|
|
114
|
-
const
|
|
140
|
+
const h = Y(
|
|
115
141
|
() => ({
|
|
116
142
|
...t,
|
|
117
143
|
...I
|
|
@@ -120,13 +146,13 @@ const Fe = (t) => {
|
|
|
120
146
|
);
|
|
121
147
|
if (t.typeAsString === "Text")
|
|
122
148
|
return /* @__PURE__ */ s(
|
|
123
|
-
|
|
149
|
+
J,
|
|
124
150
|
{
|
|
125
151
|
"data-field-internalname": t.internalName,
|
|
126
152
|
"data-field-typeasstring": t.typeAsString,
|
|
127
153
|
...te(
|
|
128
154
|
t,
|
|
129
|
-
|
|
155
|
+
h,
|
|
130
156
|
c,
|
|
131
157
|
u,
|
|
132
158
|
b
|
|
@@ -135,13 +161,13 @@ const Fe = (t) => {
|
|
|
135
161
|
);
|
|
136
162
|
if (t.typeAsString === "Number")
|
|
137
163
|
return /* @__PURE__ */ s(
|
|
138
|
-
|
|
164
|
+
K,
|
|
139
165
|
{
|
|
140
166
|
"data-field-internalname": t.internalName,
|
|
141
167
|
"data-field-typeasstring": t.typeAsString,
|
|
142
168
|
...ae(
|
|
143
169
|
t,
|
|
144
|
-
|
|
170
|
+
h,
|
|
145
171
|
c,
|
|
146
172
|
u,
|
|
147
173
|
b
|
|
@@ -150,13 +176,13 @@ const Fe = (t) => {
|
|
|
150
176
|
);
|
|
151
177
|
if (t.typeAsString === "Note")
|
|
152
178
|
return /* @__PURE__ */ s(
|
|
153
|
-
|
|
179
|
+
Q,
|
|
154
180
|
{
|
|
155
181
|
"data-field-internalname": t.internalName,
|
|
156
182
|
"data-field-typeasstring": t.typeAsString,
|
|
157
183
|
...ne(
|
|
158
184
|
t,
|
|
159
|
-
|
|
185
|
+
h,
|
|
160
186
|
c,
|
|
161
187
|
u,
|
|
162
188
|
b
|
|
@@ -165,13 +191,13 @@ const Fe = (t) => {
|
|
|
165
191
|
);
|
|
166
192
|
if (t.typeAsString === "Boolean")
|
|
167
193
|
return /* @__PURE__ */ s(
|
|
168
|
-
|
|
194
|
+
X,
|
|
169
195
|
{
|
|
170
196
|
"data-field-internalname": t.internalName,
|
|
171
197
|
"data-field-typeasstring": t.typeAsString,
|
|
172
198
|
...de(
|
|
173
199
|
t,
|
|
174
|
-
|
|
200
|
+
h,
|
|
175
201
|
c,
|
|
176
202
|
u,
|
|
177
203
|
b
|
|
@@ -180,13 +206,13 @@ const Fe = (t) => {
|
|
|
180
206
|
);
|
|
181
207
|
if (t.typeAsString === "Choice" || t.typeAsString === "MultiChoice")
|
|
182
208
|
return /* @__PURE__ */ s(
|
|
183
|
-
|
|
209
|
+
Z,
|
|
184
210
|
{
|
|
185
211
|
"data-field-internalname": t.internalName,
|
|
186
212
|
"data-field-typeasstring": t.typeAsString,
|
|
187
213
|
...ie(
|
|
188
214
|
t,
|
|
189
|
-
|
|
215
|
+
h,
|
|
190
216
|
c,
|
|
191
217
|
u,
|
|
192
218
|
b
|
|
@@ -201,7 +227,7 @@ const Fe = (t) => {
|
|
|
201
227
|
"data-field-typeasstring": t.typeAsString,
|
|
202
228
|
...le(
|
|
203
229
|
t,
|
|
204
|
-
|
|
230
|
+
h,
|
|
205
231
|
c,
|
|
206
232
|
u,
|
|
207
233
|
b
|
|
@@ -216,16 +242,16 @@ const Fe = (t) => {
|
|
|
216
242
|
"data-field-typeasstring": t.typeAsString,
|
|
217
243
|
...re(
|
|
218
244
|
t,
|
|
219
|
-
|
|
245
|
+
h,
|
|
220
246
|
c,
|
|
221
247
|
u,
|
|
222
248
|
b
|
|
223
249
|
)
|
|
224
250
|
}
|
|
225
251
|
);
|
|
226
|
-
const
|
|
227
|
-
return /* @__PURE__ */ s("div", { children: G.unsupportedFieldType(String(
|
|
228
|
-
},
|
|
252
|
+
const V = t.typeAsString ?? "unknown";
|
|
253
|
+
return /* @__PURE__ */ s("div", { children: G.unsupportedFieldType(String(V)) });
|
|
254
|
+
}, Oe = $(
|
|
229
255
|
ee
|
|
230
256
|
), o = (t, e) => {
|
|
231
257
|
if (!t) return e;
|
|
@@ -239,7 +265,7 @@ const Fe = (t) => {
|
|
|
239
265
|
break;
|
|
240
266
|
}
|
|
241
267
|
return i ? { ...t, ...e } : t;
|
|
242
|
-
},
|
|
268
|
+
}, g = (t, e) => "validationMessageIcon" in e ? e.validationMessageIcon : t.validationMessageIcon, te = (t, e, n, i, l) => ({
|
|
243
269
|
title: e.title || t.title,
|
|
244
270
|
type: e.type ?? "text",
|
|
245
271
|
formatType: e.formatType,
|
|
@@ -260,7 +286,7 @@ const Fe = (t) => {
|
|
|
260
286
|
disabled: e.disabled || !1,
|
|
261
287
|
validationState: e.validationState || "none",
|
|
262
288
|
validationMessage: e.validationMessage || "",
|
|
263
|
-
validationMessageIcon:
|
|
289
|
+
validationMessageIcon: g(t, e),
|
|
264
290
|
formatFunction: e.formatFunction,
|
|
265
291
|
labels: o(t.labels, e.labels),
|
|
266
292
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer,
|
|
@@ -291,7 +317,7 @@ const Fe = (t) => {
|
|
|
291
317
|
disabled: e.disabled || !1,
|
|
292
318
|
validationState: e.validationState || "none",
|
|
293
319
|
validationMessage: e.validationMessage || "",
|
|
294
|
-
validationMessageIcon:
|
|
320
|
+
validationMessageIcon: g(t, e),
|
|
295
321
|
labels: o(t.labels, e.labels),
|
|
296
322
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer,
|
|
297
323
|
validationMessages: o(
|
|
@@ -314,7 +340,7 @@ const Fe = (t) => {
|
|
|
314
340
|
disabled: e.disabled || !1,
|
|
315
341
|
validationState: e.validationState || "none",
|
|
316
342
|
validationMessage: e.validationMessage || "",
|
|
317
|
-
validationMessageIcon:
|
|
343
|
+
validationMessageIcon: g(t, e),
|
|
318
344
|
formatFunction: e.formatFunction,
|
|
319
345
|
labels: o(t.labels, e.labels),
|
|
320
346
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer,
|
|
@@ -324,7 +350,7 @@ const Fe = (t) => {
|
|
|
324
350
|
)
|
|
325
351
|
};
|
|
326
352
|
}, ie = (t, e, n, i, l) => {
|
|
327
|
-
const r =
|
|
353
|
+
const r = D(
|
|
328
354
|
n ?? e.selectedOptions ?? t.selectedOptions
|
|
329
355
|
);
|
|
330
356
|
return {
|
|
@@ -340,15 +366,16 @@ const Fe = (t) => {
|
|
|
340
366
|
disabled: e.disabled || !1,
|
|
341
367
|
validationState: e.validationState || "none",
|
|
342
368
|
validationMessage: e.validationMessage || "",
|
|
343
|
-
validationMessageIcon:
|
|
369
|
+
validationMessageIcon: g(t, e),
|
|
344
370
|
multiple: e.multiple ?? t.multiple,
|
|
345
371
|
options: e.options ?? t.options ?? [],
|
|
372
|
+
renderOptionMedia: e.renderOptionMedia !== void 0 ? e.renderOptionMedia : t.renderOptionMedia,
|
|
346
373
|
selectedOptions: r,
|
|
347
374
|
beforeRenderOptions: e.beforeRenderOptions ?? t.beforeRenderOptions,
|
|
348
375
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
349
376
|
};
|
|
350
377
|
}, le = (t, e, n, i, l) => {
|
|
351
|
-
const r =
|
|
378
|
+
const r = D(
|
|
352
379
|
n ?? e.selectedDates ?? t.selectedDates
|
|
353
380
|
);
|
|
354
381
|
return {
|
|
@@ -364,7 +391,7 @@ const Fe = (t) => {
|
|
|
364
391
|
disabled: e.disabled || !1,
|
|
365
392
|
validationState: e.validationState || "none",
|
|
366
393
|
validationMessage: e.validationMessage || "",
|
|
367
|
-
validationMessageIcon:
|
|
394
|
+
validationMessageIcon: g(t, e),
|
|
368
395
|
selectedDates: r,
|
|
369
396
|
localizedStrings: e.localizedStrings ?? t.localizedStrings,
|
|
370
397
|
allowTextInput: e.allowTextInput ?? t.allowTextInput,
|
|
@@ -382,7 +409,7 @@ const Fe = (t) => {
|
|
|
382
409
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
383
410
|
};
|
|
384
411
|
}, re = (t, e, n, i, l) => {
|
|
385
|
-
const r =
|
|
412
|
+
const r = D(n ?? e.files);
|
|
386
413
|
return {
|
|
387
414
|
title: e.title || t.title,
|
|
388
415
|
onChange: i,
|
|
@@ -395,7 +422,7 @@ const Fe = (t) => {
|
|
|
395
422
|
disabled: e.disabled || !1,
|
|
396
423
|
validationState: e.validationState || "none",
|
|
397
424
|
validationMessage: e.validationMessage || "",
|
|
398
|
-
validationMessageIcon:
|
|
425
|
+
validationMessageIcon: g(t, e),
|
|
399
426
|
files: r,
|
|
400
427
|
multiple: e.multiple ?? t.multiple,
|
|
401
428
|
acceptedTypes: e.acceptedTypes ?? t.acceptedTypes,
|
|
@@ -418,10 +445,12 @@ const Fe = (t) => {
|
|
|
418
445
|
disabled: e.disabled || !1,
|
|
419
446
|
validationState: e.validationState || "none",
|
|
420
447
|
validationMessage: e.validationMessage || "",
|
|
421
|
-
validationMessageIcon:
|
|
448
|
+
validationMessageIcon: g(t, e),
|
|
422
449
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
423
450
|
});
|
|
424
451
|
export {
|
|
425
|
-
|
|
426
|
-
|
|
452
|
+
Oe as EFWFormFieldWrapper,
|
|
453
|
+
Me as EMPTY_VALUE_BY_FIELD_TYPE,
|
|
454
|
+
Se as generateGridTemplateColumns,
|
|
455
|
+
fe as getEmptyValueForFieldType
|
|
427
456
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export type { EFWFieldLogic, EFWFormProps, EFWFormValues, EFWFormFieldValue, EFWFormFieldProps, EFWFormMethods, EFWFormRef, EFWFormFieldUpdate, EFWFormFieldType, EFWFieldLogicContext, EFWFieldLogicTrigger, EFWUpdateFieldFunction, EFWFormFieldAnimationConfig } from './EFWForm.types';
|
|
1
|
+
export type { EFWFieldLogic, EFWFormProps, EFWFormValues, EFWFormFieldValue, EFWFormFieldProps, EFWFormMethods, EFWFormRef, EFWFormFieldUpdate, EFWFormFieldType, EFWFieldLogicContext, EFWFieldLogicTrigger, EFWUpdateFieldFunction, EFWFormFieldAnimationConfig, } from './EFWForm.types';
|
|
2
2
|
export type { EFWFormLocaleText } from '../../i18n';
|
|
3
3
|
export { getFormFieldDisplayText } from './EFWForm.converter';
|
|
4
|
+
export { getEmptyValueForFieldType, EMPTY_VALUE_BY_FIELD_TYPE, } from './EFWForm.utils';
|
|
4
5
|
export { useFormController } from './EFWForm.hooks';
|
|
5
6
|
export { EFWForm } from './EFWForm';
|
|
6
|
-
export { flatToEFWValues, EFWValuesToFlat, EFWConversionError } from './EFWForm.flatConverter';
|
|
7
|
-
export type { FlatValues, FlatValueOfField, FlatToEFWOptions, EFWToFlatOptions, EFWConversionErrorCode, DateSerializeFunction } from './EFWForm.flatConverter';
|
|
7
|
+
export { flatToEFWValues, EFWValuesToFlat, EFWConversionError, } from './EFWForm.flatConverter';
|
|
8
|
+
export type { FlatValues, FlatValueOfField, FlatToEFWOptions, EFWToFlatOptions, EFWConversionErrorCode, DateSerializeFunction, } from './EFWForm.flatConverter';
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { getFormFieldDisplayText as e } from "./EFWForm.converter.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { EMPTY_VALUE_BY_FIELD_TYPE as F, getEmptyValueForFieldType as l } from "./EFWForm.utils.js";
|
|
3
|
+
import { useFormController as m } from "./EFWForm.hooks.js";
|
|
4
|
+
import { EFWForm as a } from "./EFWForm.js";
|
|
5
|
+
import { EFWConversionError as x, EFWValuesToFlat as T, flatToEFWValues as s } from "./EFWForm.flatConverter.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
x as EFWConversionError,
|
|
8
|
+
a as EFWForm,
|
|
9
|
+
T as EFWValuesToFlat,
|
|
10
|
+
F as EMPTY_VALUE_BY_FIELD_TYPE,
|
|
9
11
|
s as flatToEFWValues,
|
|
12
|
+
l as getEmptyValueForFieldType,
|
|
10
13
|
e as getFormFieldDisplayText,
|
|
11
|
-
|
|
14
|
+
m as useFormController
|
|
12
15
|
};
|