@envisiongroup/porygon 1.0.0-rc.37 → 1.0.0-rc.38
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as l, Fragment as
|
|
2
|
-
import { EFWField as
|
|
3
|
-
import { EFWDatePicker as
|
|
4
|
-
import { mapToValidDates as
|
|
5
|
-
import { EFWInput as
|
|
6
|
-
import { useMemo as x, useState as
|
|
7
|
-
import { makeStyles as
|
|
8
|
-
import { normalizeArrayValue as
|
|
1
|
+
import { jsx as l, Fragment as ce, jsxs as me } from "react/jsx-runtime";
|
|
2
|
+
import { EFWField as ue } from "../_shared/EFWField/EFWField.js";
|
|
3
|
+
import { EFWDatePicker as Z } from "./EFWDatePicker.js";
|
|
4
|
+
import { mapToValidDates as q, getDatePickerFormattedValue as fe } from "./EFWDatePicker.utils.js";
|
|
5
|
+
import { EFWInput as he } from "../Input/EFWInput.js";
|
|
6
|
+
import { useMemo as x, useState as De, useRef as Se, useEffect as U, useCallback as J } from "react";
|
|
7
|
+
import { makeStyles as ge, mergeClasses as w, Text as K } from "@fluentui/react-components";
|
|
8
|
+
import { normalizeArrayValue as Q } from "../../commons/valueNormalization.js";
|
|
9
9
|
import { useFieldsLocaleText as Te } from "../../i18n/PorygonI18nProvider.js";
|
|
10
|
-
const be =
|
|
10
|
+
const be = ge({
|
|
11
11
|
dateTimeContainer: {
|
|
12
12
|
display: "flex",
|
|
13
13
|
gap: "8px",
|
|
@@ -37,7 +37,7 @@ const be = Se({
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}), ye = {}, Ce = [];
|
|
40
|
-
function
|
|
40
|
+
function X(e, t) {
|
|
41
41
|
const a = new Date(e.getTime());
|
|
42
42
|
if (t && t.length === 4) {
|
|
43
43
|
const n = parseInt(t.substring(0, 2), 10), o = parseInt(t.substring(2, 4), 10);
|
|
@@ -56,7 +56,7 @@ const we = (e) => {
|
|
|
56
56
|
[e.timePlaceholder]
|
|
57
57
|
);
|
|
58
58
|
if (!e.editable) {
|
|
59
|
-
const n =
|
|
59
|
+
const n = fe(e.currentDate, {
|
|
60
60
|
includeTime: !0,
|
|
61
61
|
timeValue: e.currentTime
|
|
62
62
|
}), o = n || e.labels?.emptyState || "", D = e.selectedDates ?? e.defaultSelectedDates ?? [], c = e.readOnlyRenderer?.(
|
|
@@ -65,11 +65,11 @@ const we = (e) => {
|
|
|
65
65
|
!0,
|
|
66
66
|
e.currentTime
|
|
67
67
|
);
|
|
68
|
-
return c != null ? /* @__PURE__ */ l(
|
|
68
|
+
return c != null ? /* @__PURE__ */ l(ce, { children: c }) : n ? /* @__PURE__ */ l(K, { children: n }) : /* @__PURE__ */ l(K, { style: { opacity: 0.7 }, children: e.labels?.emptyState ?? "" });
|
|
69
69
|
}
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */ l("div", { className: t.datePickerWrapper, children: /* @__PURE__ */ l(
|
|
72
|
-
|
|
70
|
+
return /* @__PURE__ */ me("div", { className: t.dateTimeContainer, children: [
|
|
71
|
+
/* @__PURE__ */ l("div", { className: w("efw-date-picker", t.datePickerWrapper), children: /* @__PURE__ */ l(
|
|
72
|
+
Z,
|
|
73
73
|
{
|
|
74
74
|
editable: e.editable,
|
|
75
75
|
selectedDates: e.selectedDates,
|
|
@@ -92,8 +92,8 @@ const we = (e) => {
|
|
|
92
92
|
validationState: e.validationState
|
|
93
93
|
}
|
|
94
94
|
) }),
|
|
95
|
-
/* @__PURE__ */ l("div", { className: t.timeInputWrapper, children: /* @__PURE__ */ l(
|
|
96
|
-
|
|
95
|
+
/* @__PURE__ */ l("div", { className: w("efw-time-input", t.timeInputWrapper), children: /* @__PURE__ */ l(
|
|
96
|
+
he,
|
|
97
97
|
{
|
|
98
98
|
value: e.currentTime,
|
|
99
99
|
formatType: "time",
|
|
@@ -114,133 +114,133 @@ const we = (e) => {
|
|
|
114
114
|
className: o,
|
|
115
115
|
style: D = ye,
|
|
116
116
|
required: c = !1,
|
|
117
|
-
validationState:
|
|
118
|
-
validationMessage:
|
|
119
|
-
validationMessageIcon:
|
|
120
|
-
disabled:
|
|
117
|
+
validationState: p,
|
|
118
|
+
validationMessage: ee,
|
|
119
|
+
validationMessageIcon: te,
|
|
120
|
+
disabled: P = !1,
|
|
121
121
|
editable: S = !0,
|
|
122
|
-
hidden:
|
|
122
|
+
hidden: ae = !1,
|
|
123
123
|
onChange: m,
|
|
124
124
|
selectedDates: r,
|
|
125
125
|
defaultSelectedDates: h,
|
|
126
|
-
allowRangeSelection:
|
|
127
|
-
restrictedDates:
|
|
128
|
-
allowTextInput:
|
|
129
|
-
minDate:
|
|
130
|
-
maxDate:
|
|
131
|
-
showGoToToday:
|
|
132
|
-
showCloseButton:
|
|
133
|
-
localizedStrings:
|
|
134
|
-
friendlyDateFormat:
|
|
135
|
-
onSelectDate:
|
|
136
|
-
onFormatDate:
|
|
137
|
-
labels:
|
|
138
|
-
readOnlyRenderer:
|
|
139
|
-
onValidationChange:
|
|
126
|
+
allowRangeSelection: I = !1,
|
|
127
|
+
restrictedDates: v = Ce,
|
|
128
|
+
allowTextInput: F = !0,
|
|
129
|
+
minDate: E,
|
|
130
|
+
maxDate: N,
|
|
131
|
+
showGoToToday: W,
|
|
132
|
+
showCloseButton: k,
|
|
133
|
+
localizedStrings: V,
|
|
134
|
+
friendlyDateFormat: L = !1,
|
|
135
|
+
onSelectDate: R,
|
|
136
|
+
onFormatDate: M,
|
|
137
|
+
labels: O,
|
|
138
|
+
readOnlyRenderer: H,
|
|
139
|
+
onValidationChange: ne,
|
|
140
140
|
// Props de tiempo
|
|
141
141
|
includeTime: u = !1,
|
|
142
|
-
timeValue:
|
|
143
|
-
defaultTimeValue:
|
|
144
|
-
timePlaceholder:
|
|
145
|
-
...
|
|
146
|
-
} = e,
|
|
147
|
-
placeholder:
|
|
148
|
-
emptyState:
|
|
142
|
+
timeValue: z,
|
|
143
|
+
defaultTimeValue: le = "",
|
|
144
|
+
timePlaceholder: ie = "HH:MM",
|
|
145
|
+
...oe
|
|
146
|
+
} = e, j = Te().datePicker.labels, A = j.placeholder, B = j.emptyState, G = O?.placeholder, Y = O?.emptyState, _ = x(() => ({
|
|
147
|
+
placeholder: G ?? A,
|
|
148
|
+
emptyState: Y ?? B
|
|
149
149
|
}), [
|
|
150
|
-
B,
|
|
151
150
|
G,
|
|
152
|
-
|
|
153
|
-
A
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
Y,
|
|
152
|
+
A,
|
|
153
|
+
B
|
|
154
|
+
]), d = z !== void 0, [re, g] = De(le), T = d ? z : re, b = Se(null), y = x(() => q(Q(r ?? h))[0] ?? null, [r, h]);
|
|
155
|
+
U(() => {
|
|
156
156
|
b.current = y;
|
|
157
|
-
}, [y]),
|
|
157
|
+
}, [y]), U(() => {
|
|
158
158
|
if (!u) return;
|
|
159
159
|
if (!r || r.length === 0) {
|
|
160
160
|
d || g("");
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
const i =
|
|
163
|
+
const i = q(Q(r))[0];
|
|
164
164
|
i && (isNaN(i.getTime()) || d || g(xe(i)));
|
|
165
165
|
}, [r, u, d]);
|
|
166
|
-
const
|
|
166
|
+
const $ = J((i) => {
|
|
167
167
|
const f = (s) => s instanceof Date ? s.toISOString() : s;
|
|
168
168
|
if (!u) {
|
|
169
169
|
m?.(i.map(f));
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
const C = i.map((s) => s instanceof Date ?
|
|
172
|
+
const C = i.map((s) => s instanceof Date ? X(s, T).toISOString() : s);
|
|
173
173
|
m?.(C);
|
|
174
|
-
}, [u, T, m]),
|
|
174
|
+
}, [u, T, m]), se = J((i) => {
|
|
175
175
|
const f = i ?? "";
|
|
176
176
|
if (d || g(f), b.current && f.length === 4) {
|
|
177
|
-
const C =
|
|
177
|
+
const C = X(b.current, f);
|
|
178
178
|
m?.([C.toISOString()]);
|
|
179
179
|
}
|
|
180
|
-
}, [d, m]),
|
|
180
|
+
}, [d, m]), de = w(o, "efw-datePicker-field");
|
|
181
181
|
return /* @__PURE__ */ l(
|
|
182
|
-
|
|
182
|
+
ue,
|
|
183
183
|
{
|
|
184
|
-
className:
|
|
184
|
+
className: de,
|
|
185
185
|
style: D,
|
|
186
186
|
title: t,
|
|
187
187
|
infoLabel: a,
|
|
188
188
|
weightLabel: S ? "regular" : "semibold",
|
|
189
189
|
hint: n,
|
|
190
|
-
hidden:
|
|
190
|
+
hidden: ae,
|
|
191
191
|
required: c,
|
|
192
|
-
validationState:
|
|
193
|
-
validationMessage:
|
|
194
|
-
validationMessageIcon:
|
|
195
|
-
onValidationChange:
|
|
196
|
-
...
|
|
192
|
+
validationState: p,
|
|
193
|
+
validationMessage: ee,
|
|
194
|
+
validationMessageIcon: te,
|
|
195
|
+
onValidationChange: ne,
|
|
196
|
+
...oe,
|
|
197
197
|
children: u ? /* @__PURE__ */ l(
|
|
198
198
|
we,
|
|
199
199
|
{
|
|
200
200
|
editable: S,
|
|
201
|
-
disabled:
|
|
201
|
+
disabled: P,
|
|
202
202
|
selectedDates: r,
|
|
203
203
|
defaultSelectedDates: h,
|
|
204
|
-
minDate:
|
|
205
|
-
maxDate:
|
|
206
|
-
onDateChange:
|
|
207
|
-
allowTextInput:
|
|
208
|
-
restrictedDates:
|
|
209
|
-
allowRangeSelection:
|
|
210
|
-
showGoToToday:
|
|
211
|
-
showCloseButton:
|
|
212
|
-
localizedStrings:
|
|
213
|
-
friendlyDateFormat:
|
|
214
|
-
onSelectDate:
|
|
215
|
-
onFormatDate:
|
|
216
|
-
labels:
|
|
204
|
+
minDate: E,
|
|
205
|
+
maxDate: N,
|
|
206
|
+
onDateChange: $,
|
|
207
|
+
allowTextInput: F,
|
|
208
|
+
restrictedDates: v,
|
|
209
|
+
allowRangeSelection: I,
|
|
210
|
+
showGoToToday: W,
|
|
211
|
+
showCloseButton: k,
|
|
212
|
+
localizedStrings: V,
|
|
213
|
+
friendlyDateFormat: L,
|
|
214
|
+
onSelectDate: R,
|
|
215
|
+
onFormatDate: M,
|
|
216
|
+
labels: _,
|
|
217
217
|
currentTime: T,
|
|
218
|
-
onTimeChange:
|
|
219
|
-
timePlaceholder:
|
|
218
|
+
onTimeChange: se,
|
|
219
|
+
timePlaceholder: ie,
|
|
220
220
|
currentDate: y,
|
|
221
|
-
readOnlyRenderer:
|
|
221
|
+
readOnlyRenderer: H
|
|
222
222
|
}
|
|
223
223
|
) : /* @__PURE__ */ l(
|
|
224
|
-
|
|
224
|
+
Z,
|
|
225
225
|
{
|
|
226
226
|
editable: S,
|
|
227
|
-
readOnlyRenderer:
|
|
227
|
+
readOnlyRenderer: H,
|
|
228
228
|
selectedDates: r,
|
|
229
229
|
defaultSelectedDates: h,
|
|
230
|
-
minDate:
|
|
231
|
-
maxDate:
|
|
232
|
-
onChange:
|
|
233
|
-
allowTextInput:
|
|
234
|
-
disabled:
|
|
235
|
-
restrictedDates:
|
|
236
|
-
allowRangeSelection:
|
|
237
|
-
showGoToToday:
|
|
238
|
-
showCloseButton:
|
|
239
|
-
localizedStrings:
|
|
240
|
-
friendlyDateFormat:
|
|
241
|
-
onSelectDate:
|
|
242
|
-
onFormatDate:
|
|
243
|
-
labels:
|
|
230
|
+
minDate: E,
|
|
231
|
+
maxDate: N,
|
|
232
|
+
onChange: $,
|
|
233
|
+
allowTextInput: F,
|
|
234
|
+
disabled: P,
|
|
235
|
+
restrictedDates: v,
|
|
236
|
+
allowRangeSelection: I,
|
|
237
|
+
showGoToToday: W,
|
|
238
|
+
showCloseButton: k,
|
|
239
|
+
localizedStrings: V,
|
|
240
|
+
friendlyDateFormat: L,
|
|
241
|
+
onSelectDate: R,
|
|
242
|
+
onFormatDate: M,
|
|
243
|
+
labels: _
|
|
244
244
|
}
|
|
245
245
|
)
|
|
246
246
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { memo as B, useRef as N, useState as w, useCallback as O, useEffect as E, useMemo as z } from "react";
|
|
3
3
|
import { useIsomorphicLayoutEffect as j } from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js";
|
|
4
|
-
import { normalizeArrayValue as
|
|
4
|
+
import { normalizeArrayValue as R } from "../../commons/valueNormalization.js";
|
|
5
5
|
import { EFWInputField as G } from "../../fields/Input/EFWInputField.js";
|
|
6
6
|
import { EFWNumberInputField as $ } from "../../fields/NumberInput/EFWNumberInputField.js";
|
|
7
7
|
import { EFWTextAreaField as V } from "../../fields/TextArea/EFWTextAreaField.js";
|
|
@@ -25,61 +25,61 @@ const be = (t) => {
|
|
|
25
25
|
onValueChange: n,
|
|
26
26
|
registerUpdateProps: i,
|
|
27
27
|
getFieldLogicByName: l,
|
|
28
|
-
isControlled:
|
|
29
|
-
getAllValues:
|
|
30
|
-
updateFieldProps:
|
|
28
|
+
isControlled: r,
|
|
29
|
+
getAllValues: x,
|
|
30
|
+
updateFieldProps: D,
|
|
31
31
|
localeText: W,
|
|
32
|
-
onValidationChange:
|
|
32
|
+
onValidationChange: T
|
|
33
33
|
}) => {
|
|
34
|
-
const o = t.internalName,
|
|
34
|
+
const o = t.internalName, f = N(e), [c, L] = w(() => f.current), M = !!r, [I, P] = w({}), C = N({
|
|
35
35
|
editable: t.editable,
|
|
36
36
|
disabled: t.disabled
|
|
37
37
|
}), m = O((a) => {
|
|
38
|
-
|
|
38
|
+
L(a), f.current = a;
|
|
39
39
|
}, []);
|
|
40
40
|
E(() => {
|
|
41
|
-
M || (
|
|
41
|
+
M || (L(e), f.current = e);
|
|
42
42
|
}, [e, M]);
|
|
43
43
|
const u = O(
|
|
44
44
|
(a) => {
|
|
45
|
-
const
|
|
45
|
+
const y = f.current;
|
|
46
46
|
m(a);
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
allValues:
|
|
47
|
+
const h = l?.(o);
|
|
48
|
+
if (h) {
|
|
49
|
+
const S = x();
|
|
50
|
+
S[o] = a, h(a, D, {
|
|
51
|
+
allValues: S,
|
|
52
52
|
trigger: "change",
|
|
53
53
|
fieldName: o,
|
|
54
|
-
previousValue:
|
|
54
|
+
previousValue: y,
|
|
55
55
|
isControlled: M
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
n(o, a);
|
|
59
59
|
},
|
|
60
|
-
[m, l,
|
|
60
|
+
[m, l, x, o, M, n, D]
|
|
61
61
|
), b = O(
|
|
62
62
|
(a) => {
|
|
63
|
-
|
|
63
|
+
T?.(o, a);
|
|
64
64
|
},
|
|
65
|
-
[o,
|
|
65
|
+
[o, T]
|
|
66
66
|
), q = O((a) => {
|
|
67
|
-
P((
|
|
67
|
+
P((y) => ({ ...y, ...a })), "value" in a ? m(a.value) : "selectedOptions" in a && a.selectedOptions !== void 0 ? m(a.selectedOptions) : "selectedDates" in a ? m(a.selectedDates) : "files" in a && a.files !== void 0 && m(a.files);
|
|
68
68
|
}, [m]);
|
|
69
69
|
j(() => {
|
|
70
70
|
i(o, q);
|
|
71
71
|
}, [o, i, q]), E(() => {
|
|
72
|
-
const a = C.current,
|
|
73
|
-
!
|
|
74
|
-
let
|
|
75
|
-
const
|
|
76
|
-
return
|
|
72
|
+
const a = C.current, y = a.editable !== t.editable, h = a.disabled !== t.disabled;
|
|
73
|
+
!y && !h || (P((S) => {
|
|
74
|
+
let A = !1;
|
|
75
|
+
const F = { ...S };
|
|
76
|
+
return y && "editable" in F && (delete F.editable, A = !0), h && "disabled" in F && (delete F.disabled, A = !0), A ? F : S;
|
|
77
77
|
}), C.current = {
|
|
78
78
|
editable: t.editable,
|
|
79
79
|
disabled: t.disabled
|
|
80
80
|
});
|
|
81
81
|
}, [t.editable, t.disabled]);
|
|
82
|
-
const
|
|
82
|
+
const g = z(
|
|
83
83
|
() => ({
|
|
84
84
|
...t,
|
|
85
85
|
...I
|
|
@@ -90,10 +90,11 @@ const be = (t) => {
|
|
|
90
90
|
return /* @__PURE__ */ s(
|
|
91
91
|
G,
|
|
92
92
|
{
|
|
93
|
-
"data-field-
|
|
93
|
+
"data-field-internalname": t.internalName,
|
|
94
|
+
"data-field-typeAsString": t.typeAsString,
|
|
94
95
|
...Y(
|
|
95
96
|
t,
|
|
96
|
-
|
|
97
|
+
g,
|
|
97
98
|
c,
|
|
98
99
|
u,
|
|
99
100
|
b
|
|
@@ -104,10 +105,11 @@ const be = (t) => {
|
|
|
104
105
|
return /* @__PURE__ */ s(
|
|
105
106
|
$,
|
|
106
107
|
{
|
|
107
|
-
"data-field-
|
|
108
|
+
"data-field-internalname": t.internalName,
|
|
109
|
+
"data-field-typeAsString": t.typeAsString,
|
|
108
110
|
...Z(
|
|
109
111
|
t,
|
|
110
|
-
|
|
112
|
+
g,
|
|
111
113
|
c,
|
|
112
114
|
u,
|
|
113
115
|
b
|
|
@@ -118,10 +120,11 @@ const be = (t) => {
|
|
|
118
120
|
return /* @__PURE__ */ s(
|
|
119
121
|
V,
|
|
120
122
|
{
|
|
121
|
-
"data-field-
|
|
123
|
+
"data-field-internalname": t.internalName,
|
|
124
|
+
"data-field-typeAsString": t.typeAsString,
|
|
122
125
|
..._(
|
|
123
126
|
t,
|
|
124
|
-
|
|
127
|
+
g,
|
|
125
128
|
c,
|
|
126
129
|
u,
|
|
127
130
|
b
|
|
@@ -132,10 +135,11 @@ const be = (t) => {
|
|
|
132
135
|
return /* @__PURE__ */ s(
|
|
133
136
|
H,
|
|
134
137
|
{
|
|
135
|
-
"data-field-
|
|
138
|
+
"data-field-internalname": t.internalName,
|
|
139
|
+
"data-field-typeAsString": t.typeAsString,
|
|
136
140
|
...te(
|
|
137
141
|
t,
|
|
138
|
-
|
|
142
|
+
g,
|
|
139
143
|
c,
|
|
140
144
|
u,
|
|
141
145
|
b
|
|
@@ -146,10 +150,11 @@ const be = (t) => {
|
|
|
146
150
|
return /* @__PURE__ */ s(
|
|
147
151
|
J,
|
|
148
152
|
{
|
|
149
|
-
"data-field-
|
|
153
|
+
"data-field-internalname": t.internalName,
|
|
154
|
+
"data-field-typeAsString": t.typeAsString,
|
|
150
155
|
...U(
|
|
151
156
|
t,
|
|
152
|
-
|
|
157
|
+
g,
|
|
153
158
|
c,
|
|
154
159
|
u,
|
|
155
160
|
b
|
|
@@ -160,10 +165,11 @@ const be = (t) => {
|
|
|
160
165
|
return /* @__PURE__ */ s(
|
|
161
166
|
K,
|
|
162
167
|
{
|
|
163
|
-
"data-field-
|
|
168
|
+
"data-field-internalname": t.internalName,
|
|
169
|
+
"data-field-typeAsString": t.typeAsString,
|
|
164
170
|
...p(
|
|
165
171
|
t,
|
|
166
|
-
|
|
172
|
+
g,
|
|
167
173
|
c,
|
|
168
174
|
u,
|
|
169
175
|
b
|
|
@@ -174,10 +180,11 @@ const be = (t) => {
|
|
|
174
180
|
return /* @__PURE__ */ s(
|
|
175
181
|
Q,
|
|
176
182
|
{
|
|
177
|
-
"data-field-
|
|
183
|
+
"data-field-internalname": t.internalName,
|
|
184
|
+
"data-field-typeAsString": t.typeAsString,
|
|
178
185
|
...ee(
|
|
179
186
|
t,
|
|
180
|
-
|
|
187
|
+
g,
|
|
181
188
|
c,
|
|
182
189
|
u,
|
|
183
190
|
b
|
|
@@ -186,19 +193,19 @@ const be = (t) => {
|
|
|
186
193
|
);
|
|
187
194
|
const k = t.typeAsString ?? "unknown";
|
|
188
195
|
return /* @__PURE__ */ s("div", { children: W.unsupportedFieldType(String(k)) });
|
|
189
|
-
},
|
|
196
|
+
}, ge = B(X), d = (t, e) => {
|
|
190
197
|
if (!t) return e;
|
|
191
198
|
if (!e) return t;
|
|
192
199
|
const n = Object.entries(e);
|
|
193
200
|
if (n.length === 0) return t;
|
|
194
201
|
let i = !1;
|
|
195
|
-
for (const [l,
|
|
196
|
-
if (!Object.is(t[l],
|
|
202
|
+
for (const [l, r] of n)
|
|
203
|
+
if (!Object.is(t[l], r)) {
|
|
197
204
|
i = !0;
|
|
198
205
|
break;
|
|
199
206
|
}
|
|
200
207
|
return i ? { ...t, ...e } : t;
|
|
201
|
-
},
|
|
208
|
+
}, v = (t, e) => Object.prototype.hasOwnProperty.call(e, "validationMessageIcon") ? e.validationMessageIcon : t.validationMessageIcon, Y = (t, e, n, i, l) => ({
|
|
202
209
|
title: e.title || t.title,
|
|
203
210
|
type: "text",
|
|
204
211
|
formatType: e.formatType,
|
|
@@ -218,11 +225,11 @@ const be = (t) => {
|
|
|
218
225
|
disabled: e.disabled || !1,
|
|
219
226
|
validationState: e.validationState || "none",
|
|
220
227
|
validationMessage: e.validationMessage || "",
|
|
221
|
-
validationMessageIcon:
|
|
228
|
+
validationMessageIcon: v(t, e),
|
|
222
229
|
formatFunction: e.formatFunction,
|
|
223
|
-
labels:
|
|
230
|
+
labels: d(t.labels, e.labels),
|
|
224
231
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer,
|
|
225
|
-
validationMessages:
|
|
232
|
+
validationMessages: d(t.validationMessages, e.validationMessages)
|
|
226
233
|
}), Z = (t, e, n, i, l) => ({
|
|
227
234
|
title: e.title || t.title,
|
|
228
235
|
contentAfter: e.contentAfter,
|
|
@@ -246,12 +253,12 @@ const be = (t) => {
|
|
|
246
253
|
disabled: e.disabled || !1,
|
|
247
254
|
validationState: e.validationState || "none",
|
|
248
255
|
validationMessage: e.validationMessage || "",
|
|
249
|
-
validationMessageIcon:
|
|
250
|
-
labels:
|
|
256
|
+
validationMessageIcon: v(t, e),
|
|
257
|
+
labels: d(t.labels, e.labels),
|
|
251
258
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer,
|
|
252
|
-
validationMessages:
|
|
259
|
+
validationMessages: d(t.validationMessages, e.validationMessages)
|
|
253
260
|
}), _ = (t, e, n, i, l) => {
|
|
254
|
-
const
|
|
261
|
+
const r = e.maxLength ?? t.maxLength ?? 3e3;
|
|
255
262
|
return {
|
|
256
263
|
title: e.title || t.title,
|
|
257
264
|
value: n,
|
|
@@ -259,43 +266,43 @@ const be = (t) => {
|
|
|
259
266
|
onValidationChange: l,
|
|
260
267
|
infoLabel: e.infoLabel,
|
|
261
268
|
hint: e.hint,
|
|
262
|
-
maxLength:
|
|
269
|
+
maxLength: r,
|
|
263
270
|
hidden: e.hidden || !1,
|
|
264
271
|
required: e.required || !1,
|
|
265
272
|
editable: e.editable !== void 0 ? e.editable : !0,
|
|
266
273
|
disabled: e.disabled || !1,
|
|
267
274
|
validationState: e.validationState || "none",
|
|
268
275
|
validationMessage: e.validationMessage || "",
|
|
269
|
-
validationMessageIcon:
|
|
276
|
+
validationMessageIcon: v(t, e),
|
|
270
277
|
formatFunction: e.formatFunction,
|
|
271
|
-
labels:
|
|
278
|
+
labels: d(t.labels, e.labels),
|
|
272
279
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer,
|
|
273
|
-
validationMessages:
|
|
280
|
+
validationMessages: d(t.validationMessages, e.validationMessages)
|
|
274
281
|
};
|
|
275
282
|
}, U = (t, e, n, i, l) => {
|
|
276
|
-
const
|
|
283
|
+
const r = R(n ?? e.selectedOptions ?? t.selectedOptions);
|
|
277
284
|
return {
|
|
278
285
|
title: e.title || t.title,
|
|
279
286
|
onChange: i,
|
|
280
287
|
onValidationChange: l,
|
|
281
288
|
infoLabel: e.infoLabel,
|
|
282
289
|
hint: e.hint,
|
|
283
|
-
labels:
|
|
290
|
+
labels: d(t.labels, e.labels),
|
|
284
291
|
hidden: e.hidden || !1,
|
|
285
292
|
required: e.required || !1,
|
|
286
293
|
editable: e.editable !== void 0 ? e.editable : !0,
|
|
287
294
|
disabled: e.disabled || !1,
|
|
288
295
|
validationState: e.validationState || "none",
|
|
289
296
|
validationMessage: e.validationMessage || "",
|
|
290
|
-
validationMessageIcon:
|
|
297
|
+
validationMessageIcon: v(t, e),
|
|
291
298
|
multiple: e.multiple ?? t.multiple,
|
|
292
299
|
options: e.options ?? t.options ?? [],
|
|
293
|
-
selectedOptions:
|
|
300
|
+
selectedOptions: r,
|
|
294
301
|
beforeRenderOptions: e.beforeRenderOptions ?? t.beforeRenderOptions,
|
|
295
302
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
296
303
|
};
|
|
297
304
|
}, p = (t, e, n, i, l) => {
|
|
298
|
-
const
|
|
305
|
+
const r = R(n ?? e.selectedDates ?? t.selectedDates);
|
|
299
306
|
return {
|
|
300
307
|
title: e.title || t.title,
|
|
301
308
|
onChange: i,
|
|
@@ -309,8 +316,8 @@ const be = (t) => {
|
|
|
309
316
|
disabled: e.disabled || !1,
|
|
310
317
|
validationState: e.validationState || "none",
|
|
311
318
|
validationMessage: e.validationMessage || "",
|
|
312
|
-
validationMessageIcon:
|
|
313
|
-
selectedDates:
|
|
319
|
+
validationMessageIcon: v(t, e),
|
|
320
|
+
selectedDates: r,
|
|
314
321
|
localizedStrings: e.localizedStrings ?? t.localizedStrings,
|
|
315
322
|
allowTextInput: e.allowTextInput ?? t.allowTextInput,
|
|
316
323
|
allowRangeSelection: e.allowRangeSelection ?? t.allowRangeSelection,
|
|
@@ -319,7 +326,7 @@ const be = (t) => {
|
|
|
319
326
|
maxDate: e.maxDate ?? t.maxDate,
|
|
320
327
|
friendlyDateFormat: e.friendlyDateFormat ?? t.friendlyDateFormat,
|
|
321
328
|
onFormatDate: e.onFormatDate ?? t.onFormatDate,
|
|
322
|
-
labels:
|
|
329
|
+
labels: d(t.labels, e.labels),
|
|
323
330
|
showGoToToday: e.showGoToToday ?? t.showGoToToday,
|
|
324
331
|
showCloseButton: e.showCloseButton ?? t.showCloseButton,
|
|
325
332
|
includeTime: e.includeTime ?? t.includeTime ?? !1,
|
|
@@ -327,7 +334,7 @@ const be = (t) => {
|
|
|
327
334
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
328
335
|
};
|
|
329
336
|
}, ee = (t, e, n, i, l) => {
|
|
330
|
-
const
|
|
337
|
+
const r = R(n ?? e.files);
|
|
331
338
|
return {
|
|
332
339
|
title: e.title || t.title,
|
|
333
340
|
onChange: i,
|
|
@@ -340,12 +347,12 @@ const be = (t) => {
|
|
|
340
347
|
disabled: e.disabled || !1,
|
|
341
348
|
validationState: e.validationState || "none",
|
|
342
349
|
validationMessage: e.validationMessage || "",
|
|
343
|
-
validationMessageIcon:
|
|
344
|
-
files:
|
|
350
|
+
validationMessageIcon: v(t, e),
|
|
351
|
+
files: r,
|
|
345
352
|
multiple: e.multiple ?? t.multiple,
|
|
346
353
|
acceptedTypes: e.acceptedTypes ?? t.acceptedTypes,
|
|
347
354
|
maxFileSize: e.maxFileSize ?? t.maxFileSize,
|
|
348
|
-
labels:
|
|
355
|
+
labels: d(t.labels, e.labels),
|
|
349
356
|
onRemoveAttachment: e.onRemoveAttachment ?? t.onRemoveAttachment,
|
|
350
357
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
351
358
|
};
|
|
@@ -353,7 +360,7 @@ const be = (t) => {
|
|
|
353
360
|
title: e.title || t.title,
|
|
354
361
|
value: n,
|
|
355
362
|
onChange: i,
|
|
356
|
-
labels:
|
|
363
|
+
labels: d(t.labels, e.labels),
|
|
357
364
|
onValidationChange: l,
|
|
358
365
|
infoLabel: e.infoLabel,
|
|
359
366
|
hint: e.hint,
|
|
@@ -363,10 +370,10 @@ const be = (t) => {
|
|
|
363
370
|
disabled: e.disabled || !1,
|
|
364
371
|
validationState: e.validationState || "none",
|
|
365
372
|
validationMessage: e.validationMessage || "",
|
|
366
|
-
validationMessageIcon:
|
|
373
|
+
validationMessageIcon: v(t, e),
|
|
367
374
|
readOnlyRenderer: e.readOnlyRenderer ?? t.readOnlyRenderer
|
|
368
375
|
});
|
|
369
376
|
export {
|
|
370
|
-
|
|
377
|
+
ge as EFWFormFieldWrapper,
|
|
371
378
|
be as generateGridTemplateColumns
|
|
372
379
|
};
|