linear-react-components-ui 2.0.0-beta.4 → 2.0.0-rc.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/lib/assets/styles/radio.css +1 -1
- package/lib/assets/styles/selectfield.css +1 -1
- package/lib/assets/styles/split.css +1 -1
- package/lib/form2/useForm/index.js +74 -63
- package/lib/form2/useForm/index.js.map +1 -1
- package/lib/inputs/base/types.d.ts +2 -2
- package/lib/inputs/date/helpers.js +11 -22
- package/lib/inputs/date/helpers.js.map +1 -1
- package/lib/inputs/mask/BaseMask.js +55 -65
- package/lib/inputs/mask/BaseMask.js.map +1 -1
- package/lib/inputs/mask/types.d.ts +2 -1
- package/lib/inputs/number/Currency.js +35 -45
- package/lib/inputs/number/Currency.js.map +1 -1
- package/lib/inputs/number/Decimal.js +38 -48
- package/lib/inputs/number/Decimal.js.map +1 -1
- package/lib/inputs/number/index.js +38 -48
- package/lib/inputs/number/index.js.map +1 -1
- package/lib/inputs/period/helper.d.ts +1 -0
- package/lib/inputs/period/helper.js +27 -19
- package/lib/inputs/period/helper.js.map +1 -1
- package/lib/inputs/period/index.js +143 -139
- package/lib/inputs/period/index.js.map +1 -1
- package/lib/inputs2/date/datefield/base.js +60 -70
- package/lib/inputs2/date/datefield/base.js.map +1 -1
- package/lib/inputs2/date/dateperiodfield/base.js +79 -89
- package/lib/inputs2/date/dateperiodfield/base.js.map +1 -1
- package/lib/inputs2/mask/Cnpj.js +58 -68
- package/lib/inputs2/mask/Cnpj.js.map +1 -1
- package/lib/inputs2/mask/Cpf.js +38 -48
- package/lib/inputs2/mask/Cpf.js.map +1 -1
- package/lib/inputs2/mask/index.js +50 -60
- package/lib/inputs2/mask/index.js.map +1 -1
- package/lib/inputs2/numberfield/currency.js +51 -61
- package/lib/inputs2/numberfield/currency.js.map +1 -1
- package/lib/inputs2/numberfield/decimal.js +25 -35
- package/lib/inputs2/numberfield/decimal.js.map +1 -1
- package/lib/inputs2/numberfield/index.js +46 -56
- package/lib/inputs2/numberfield/index.js.map +1 -1
- package/lib/inputs2/selectfield/base.d.ts +1 -2
- package/lib/inputs2/selectfield/base.js +260 -382
- package/lib/inputs2/selectfield/base.js.map +1 -1
- package/lib/inputs2/selectfield/context.d.ts +1 -1
- package/lib/inputs2/selectfield/context.js.map +1 -1
- package/lib/inputs2/selectfield/helpers.d.ts +5 -0
- package/lib/inputs2/selectfield/helpers.js +22 -13
- package/lib/inputs2/selectfield/helpers.js.map +1 -1
- package/lib/inputs2/selectfield/index.js.map +1 -1
- package/lib/inputs2/selectfield/listbox.js +17 -18
- package/lib/inputs2/selectfield/listbox.js.map +1 -1
- package/lib/inputs2/selectfield/selections.d.ts +1 -1
- package/lib/inputs2/selectfield/selections.js +11 -11
- package/lib/inputs2/selectfield/selections.js.map +1 -1
- package/lib/inputs2/selectfield/triggers.js +15 -15
- package/lib/inputs2/selectfield/triggers.js.map +1 -1
- package/lib/radio/index.js +74 -84
- package/lib/radio/index.js.map +1 -1
- package/lib/table/Row.js +57 -46
- package/lib/table/Row.js.map +1 -1
- package/lib/table/types.d.ts +2 -1
- package/package.json +9 -6
- package/lib/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +0 -35
- package/lib/node_modules/imask/esm/controls/html-contenteditable-mask-element.js.map +0 -1
- package/lib/node_modules/imask/esm/controls/html-input-mask-element.js +0 -32
- package/lib/node_modules/imask/esm/controls/html-input-mask-element.js.map +0 -1
- package/lib/node_modules/imask/esm/controls/html-mask-element.js +0 -49
- package/lib/node_modules/imask/esm/controls/html-mask-element.js.map +0 -1
- package/lib/node_modules/imask/esm/controls/input-history.js +0 -31
- package/lib/node_modules/imask/esm/controls/input-history.js.map +0 -1
- package/lib/node_modules/imask/esm/controls/input.js +0 -223
- package/lib/node_modules/imask/esm/controls/input.js.map +0 -1
- package/lib/node_modules/imask/esm/controls/mask-element.js +0 -44
- package/lib/node_modules/imask/esm/controls/mask-element.js.map +0 -1
- package/lib/node_modules/imask/esm/core/action-details.js +0 -52
- package/lib/node_modules/imask/esm/core/action-details.js.map +0 -1
- package/lib/node_modules/imask/esm/core/change-details.js +0 -37
- package/lib/node_modules/imask/esm/core/change-details.js.map +0 -1
- package/lib/node_modules/imask/esm/core/continuous-tail-details.js +0 -43
- package/lib/node_modules/imask/esm/core/continuous-tail-details.js.map +0 -1
- package/lib/node_modules/imask/esm/core/holder.js +0 -7
- package/lib/node_modules/imask/esm/core/holder.js.map +0 -1
- package/lib/node_modules/imask/esm/core/utils.js +0 -68
- package/lib/node_modules/imask/esm/core/utils.js.map +0 -1
- package/lib/node_modules/imask/esm/index.js +0 -51
- package/lib/node_modules/imask/esm/index.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/base.js +0 -253
- package/lib/node_modules/imask/esm/masked/base.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/date.js +0 -118
- package/lib/node_modules/imask/esm/masked/date.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/dynamic.js +0 -223
- package/lib/node_modules/imask/esm/masked/dynamic.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/enum.js +0 -70
- package/lib/node_modules/imask/esm/masked/enum.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/factory.js +0 -47
- package/lib/node_modules/imask/esm/masked/factory.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/function.js +0 -24
- package/lib/node_modules/imask/esm/masked/function.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/number.js +0 -213
- package/lib/node_modules/imask/esm/masked/number.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +0 -104
- package/lib/node_modules/imask/esm/masked/pattern/chunk-tail-details.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/pattern/cursor.js +0 -101
- package/lib/node_modules/imask/esm/masked/pattern/cursor.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/pattern/fixed-definition.js +0 -103
- package/lib/node_modules/imask/esm/masked/pattern/fixed-definition.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/pattern/input-definition.js +0 -134
- package/lib/node_modules/imask/esm/masked/pattern/input-definition.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/pattern.js +0 -323
- package/lib/node_modules/imask/esm/masked/pattern.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/pipe.js +0 -24
- package/lib/node_modules/imask/esm/masked/pipe.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/range.js +0 -79
- package/lib/node_modules/imask/esm/masked/range.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/regexp.js +0 -22
- package/lib/node_modules/imask/esm/masked/regexp.js.map +0 -1
- package/lib/node_modules/imask/esm/masked/repeat.js +0 -105
- package/lib/node_modules/imask/esm/masked/repeat.js.map +0 -1
- package/lib/node_modules/react-imask/esm/hook.js +0 -76
- package/lib/node_modules/react-imask/esm/hook.js.map +0 -1
- package/lib/node_modules/react-imask/esm/input.js +0 -24
- package/lib/node_modules/react-imask/esm/input.js.map +0 -1
- package/lib/node_modules/react-imask/esm/mixin.js +0 -132
- package/lib/node_modules/react-imask/esm/mixin.js.map +0 -1
|
@@ -2,17 +2,7 @@ import { jsx as C, jsxs as Je } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as ua } from "../../../_virtual/compiler-runtime.js";
|
|
3
3
|
import S from "react";
|
|
4
4
|
import w from "../../../_virtual/lodash.js";
|
|
5
|
-
import "
|
|
6
|
-
import "../../../node_modules/imask/esm/controls/input.js";
|
|
7
|
-
import "../../../node_modules/imask/esm/masked/factory.js";
|
|
8
|
-
import "../../../node_modules/imask/esm/controls/mask-element.js";
|
|
9
|
-
import "../../../node_modules/imask/esm/controls/html-input-mask-element.js";
|
|
10
|
-
import "../../../node_modules/imask/esm/controls/html-mask-element.js";
|
|
11
|
-
import "../../../node_modules/imask/esm/controls/html-contenteditable-mask-element.js";
|
|
12
|
-
import "../../../node_modules/imask/esm/controls/input-history.js";
|
|
13
|
-
import "../../../node_modules/react-imask/esm/input.js";
|
|
14
|
-
import Zt from "../../../node_modules/react-imask/esm/hook.js";
|
|
15
|
-
import "../../../node_modules/react-imask/esm/mixin.js";
|
|
5
|
+
import { useIMask as Zt } from "react-imask";
|
|
16
6
|
import { createPortal as ma } from "react-dom";
|
|
17
7
|
import o from "../../../node_modules/moment/dist/moment.js";
|
|
18
8
|
import ha from "../../../hint/index.js";
|
|
@@ -22,18 +12,18 @@ import { mergeRefs as ea } from "../../../form2/helpers.js";
|
|
|
22
12
|
import { Keys as V } from "../types.js";
|
|
23
13
|
import * as ga from "../base/index.js";
|
|
24
14
|
import { Label as ka, Root as Sa, Container as Oa, Input as _a } from "../base/index.js";
|
|
25
|
-
import { TOKEN_ISO_FORMAT as d, TOKEN_PTBR_FORMAT as
|
|
15
|
+
import { TOKEN_ISO_FORMAT as d, TOKEN_PTBR_FORMAT as B, TOKEN_MASK as ta, NAVIGATION_KEYS as Ca } from "../helpers.js";
|
|
26
16
|
import { Triggers as va } from "./triggers.js";
|
|
27
17
|
import { CalendarBox as Ia } from "./calendarbox.js";
|
|
28
18
|
import { DatePeriodFieldContext as wa } from "./context.js";
|
|
29
19
|
const Va = S.forwardRef((t, M) => {
|
|
30
20
|
const e = ua.c(193), {
|
|
31
|
-
label:
|
|
21
|
+
label: P,
|
|
32
22
|
errors: Z,
|
|
33
|
-
initialName:
|
|
34
|
-
finalName:
|
|
35
|
-
customClass:
|
|
36
|
-
customClassLabel:
|
|
23
|
+
initialName: Bt,
|
|
24
|
+
finalName: Pt,
|
|
25
|
+
customClass: xt,
|
|
26
|
+
customClassLabel: pt,
|
|
37
27
|
customClassWrapper: Mt,
|
|
38
28
|
customClassInputContainer: Ft,
|
|
39
29
|
labelUppercase: Nt,
|
|
@@ -56,7 +46,7 @@ const Va = S.forwardRef((t, M) => {
|
|
|
56
46
|
disabled: y,
|
|
57
47
|
readOnly: c,
|
|
58
48
|
...Yt
|
|
59
|
-
} = t, f =
|
|
49
|
+
} = t, f = Bt === void 0 ? "inicial" : Bt, u = Pt === void 0 ? "final" : Pt, ee = xt === void 0 ? "" : xt, et = pt === void 0 ? "" : pt, aa = Mt === void 0 ? "" : Mt, na = Ft === void 0 ? "" : Ft, tt = Nt === void 0 ? !1 : Nt, g = Kt === void 0 ? !1 : Kt, r = Tt === void 0 ? !1 : Tt, N = At === void 0 ? "below" : At, at = Wt === void 0 ? "light" : Wt, nt = zt === void 0 ? "left" : zt, it = Et === void 0 ? !0 : Et, te = Lt === void 0 ? "left" : Lt, K = Ut === void 0 ? !0 : Ut, ae = qt === void 0 ? !0 : qt, lt = jt === void 0 ? !0 : jt, ot = $t === void 0 ? !0 : $t, ne = Ht === void 0 ? B : Ht, x = Gt === void 0 ? "default" : Gt;
|
|
60
50
|
let ie;
|
|
61
51
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (ie = {
|
|
62
52
|
inicial: null,
|
|
@@ -82,17 +72,17 @@ const Va = S.forwardRef((t, M) => {
|
|
|
82
72
|
placeholderChar: "_"
|
|
83
73
|
}, e[9] = re) : re = e[9];
|
|
84
74
|
let de;
|
|
85
|
-
e[10] !== l.inicial ? (de = l.inicial?.format(
|
|
75
|
+
e[10] !== l.inicial ? (de = l.inicial?.format(B), e[10] = l.inicial, e[11] = de) : de = e[11];
|
|
86
76
|
const {
|
|
87
77
|
value: oa,
|
|
88
|
-
setValue:
|
|
78
|
+
setValue: R,
|
|
89
79
|
unmaskedValue: rt
|
|
90
80
|
} = Zt(re, {
|
|
91
81
|
ref: ct,
|
|
92
82
|
defaultValue: de,
|
|
93
83
|
onComplete: (a) => {
|
|
94
|
-
const i = o(a,
|
|
95
|
-
i.isValid() &&
|
|
84
|
+
const i = o(a, B);
|
|
85
|
+
i.isValid() && p({
|
|
96
86
|
date: i,
|
|
97
87
|
inputType: "initial",
|
|
98
88
|
typing: !0
|
|
@@ -106,17 +96,17 @@ const Va = S.forwardRef((t, M) => {
|
|
|
106
96
|
placeholderChar: "_"
|
|
107
97
|
}, e[12] = fe) : fe = e[12];
|
|
108
98
|
let ue;
|
|
109
|
-
e[13] !== l.final ? (ue = l.final?.format(
|
|
99
|
+
e[13] !== l.final ? (ue = l.final?.format(B), e[13] = l.final, e[14] = ue) : ue = e[14];
|
|
110
100
|
const {
|
|
111
101
|
value: dt,
|
|
112
|
-
setValue:
|
|
102
|
+
setValue: D,
|
|
113
103
|
unmaskedValue: ft
|
|
114
104
|
} = Zt(fe, {
|
|
115
105
|
ref: Y,
|
|
116
106
|
defaultValue: ue,
|
|
117
107
|
onComplete: (a) => {
|
|
118
|
-
const i = o(a,
|
|
119
|
-
i.isValid() &&
|
|
108
|
+
const i = o(a, B);
|
|
109
|
+
i.isValid() && p({
|
|
120
110
|
date: i,
|
|
121
111
|
inputType: "final",
|
|
122
112
|
typing: !0
|
|
@@ -139,10 +129,10 @@ const Va = S.forwardRef((t, M) => {
|
|
|
139
129
|
e[20] === Symbol.for("react.memo_cache_sentinel") ? (ge = (a) => I(a), e[20] = ge) : ge = e[20];
|
|
140
130
|
const ht = ge;
|
|
141
131
|
let ke;
|
|
142
|
-
e[21] === Symbol.for("react.memo_cache_sentinel") ? (ke = () => I(
|
|
132
|
+
e[21] === Symbol.for("react.memo_cache_sentinel") ? (ke = () => I(Ra), e[21] = ke) : ke = e[21];
|
|
143
133
|
const W = ke;
|
|
144
134
|
let Se;
|
|
145
|
-
e[22] === Symbol.for("react.memo_cache_sentinel") ? (Se = () => I(
|
|
135
|
+
e[22] === Symbol.for("react.memo_cache_sentinel") ? (Se = () => I(Da), e[22] = Se) : Se = e[22];
|
|
146
136
|
const z = Se;
|
|
147
137
|
let Oe;
|
|
148
138
|
e[23] !== h ? (Oe = (a) => {
|
|
@@ -167,7 +157,7 @@ const Va = S.forwardRef((t, M) => {
|
|
|
167
157
|
}, e[27] = u, e[28] = f, e[29] = t.value, e[30] = ve) : ve = e[30];
|
|
168
158
|
const sa = ve;
|
|
169
159
|
let Ie;
|
|
170
|
-
e[31] !== u || e[32] !== m || e[33] !== f || e[34] !== t || e[35] !==
|
|
160
|
+
e[31] !== u || e[32] !== m || e[33] !== f || e[34] !== t || e[35] !== D || e[36] !== R ? (Ie = () => {
|
|
171
161
|
t.onChange?.({
|
|
172
162
|
target: {
|
|
173
163
|
name: t.name,
|
|
@@ -176,24 +166,24 @@ const Va = S.forwardRef((t, M) => {
|
|
|
176
166
|
[u]: ""
|
|
177
167
|
}
|
|
178
168
|
}
|
|
179
|
-
}), T(
|
|
180
|
-
}, e[31] = u, e[32] = m, e[33] = f, e[34] = t, e[35] =
|
|
181
|
-
const bt = Ie,
|
|
169
|
+
}), T(Ba), R(""), D(""), m(!1);
|
|
170
|
+
}, e[31] = u, e[32] = m, e[33] = f, e[34] = t, e[35] = D, e[36] = R, e[37] = Ie) : Ie = e[37];
|
|
171
|
+
const bt = Ie, p = (a) => {
|
|
182
172
|
const {
|
|
183
173
|
date: i,
|
|
184
174
|
inputType: n,
|
|
185
175
|
typing: b
|
|
186
|
-
} = a, F = i.clone(), J =
|
|
176
|
+
} = a, F = i.clone(), J = Pa;
|
|
187
177
|
e: switch (n) {
|
|
188
178
|
case "initial": {
|
|
189
179
|
T((Vt) => {
|
|
190
180
|
const {
|
|
191
|
-
inicial:
|
|
192
|
-
final:
|
|
181
|
+
inicial: Rt,
|
|
182
|
+
final: Dt
|
|
193
183
|
} = J(F, Vt.final);
|
|
194
184
|
return {
|
|
195
|
-
inicial:
|
|
196
|
-
final:
|
|
185
|
+
inicial: Rt,
|
|
186
|
+
final: Dt
|
|
197
187
|
};
|
|
198
188
|
});
|
|
199
189
|
const {
|
|
@@ -204,8 +194,8 @@ const Va = S.forwardRef((t, M) => {
|
|
|
204
194
|
target: {
|
|
205
195
|
name: t.name,
|
|
206
196
|
value: {
|
|
207
|
-
[f]:
|
|
208
|
-
[u]:
|
|
197
|
+
[f]: x === "default" ? Q?.format(d) : Q?.toISOString(),
|
|
198
|
+
[u]: x === "default" ? X?.format(d) : X?.toISOString()
|
|
209
199
|
}
|
|
210
200
|
}
|
|
211
201
|
}), requestAnimationFrame(() => {
|
|
@@ -216,12 +206,12 @@ const Va = S.forwardRef((t, M) => {
|
|
|
216
206
|
case "final": {
|
|
217
207
|
T((Vt) => {
|
|
218
208
|
const {
|
|
219
|
-
inicial:
|
|
220
|
-
final:
|
|
209
|
+
inicial: Rt,
|
|
210
|
+
final: Dt
|
|
221
211
|
} = J(Vt.inicial, F);
|
|
222
212
|
return {
|
|
223
|
-
inicial:
|
|
224
|
-
final:
|
|
213
|
+
inicial: Rt,
|
|
214
|
+
final: Dt
|
|
225
215
|
};
|
|
226
216
|
});
|
|
227
217
|
const {
|
|
@@ -232,8 +222,8 @@ const Va = S.forwardRef((t, M) => {
|
|
|
232
222
|
target: {
|
|
233
223
|
name: t.name,
|
|
234
224
|
value: {
|
|
235
|
-
[f]:
|
|
236
|
-
[u]:
|
|
225
|
+
[f]: x === "default" ? Q?.format(d) : Q?.toISOString(),
|
|
226
|
+
[u]: x === "default" ? X?.format(d) : X?.toISOString()
|
|
237
227
|
}
|
|
238
228
|
}
|
|
239
229
|
}), ae && m(!1);
|
|
@@ -243,11 +233,11 @@ const Va = S.forwardRef((t, M) => {
|
|
|
243
233
|
I(F.clone());
|
|
244
234
|
};
|
|
245
235
|
let we;
|
|
246
|
-
e[38] !== u || e[39] !== m || e[40] !== f || e[41] !== t || e[42] !==
|
|
236
|
+
e[38] !== u || e[39] !== m || e[40] !== f || e[41] !== t || e[42] !== x || e[43] !== ae ? (we = (a) => {
|
|
247
237
|
const i = (n, b) => {
|
|
248
238
|
const F = {
|
|
249
|
-
[f]:
|
|
250
|
-
[u]:
|
|
239
|
+
[f]: x === "default" ? n.format(d) : n.toISOString(),
|
|
240
|
+
[u]: x === "default" ? b.format(d) : b.toISOString()
|
|
251
241
|
};
|
|
252
242
|
T(() => ({
|
|
253
243
|
inicial: n.clone(),
|
|
@@ -292,47 +282,47 @@ const Va = S.forwardRef((t, M) => {
|
|
|
292
282
|
}
|
|
293
283
|
}
|
|
294
284
|
Y?.current?.focus?.(), ae && m(!1);
|
|
295
|
-
}, e[38] = u, e[39] = m, e[40] = f, e[41] = t, e[42] =
|
|
285
|
+
}, e[38] = u, e[39] = m, e[40] = f, e[41] = t, e[42] = x, e[43] = ae, e[44] = we) : we = e[44];
|
|
296
286
|
const yt = we;
|
|
297
287
|
let Ve;
|
|
298
|
-
e[45] !== s || e[46] !== O || e[47] !== ft || e[48] !== h || e[49] !== m || e[50] !== k || e[51] !== rt || e[52] !== t || e[53] !== l.final || e[54] !== l.inicial || e[55] !==
|
|
288
|
+
e[45] !== s || e[46] !== O || e[47] !== ft || e[48] !== h || e[49] !== m || e[50] !== k || e[51] !== rt || e[52] !== t || e[53] !== l.final || e[54] !== l.inicial || e[55] !== D || e[56] !== R ? (Ve = (a, i) => {
|
|
299
289
|
if (t?.onBlur?.(a), i === "initial" && (a.relatedTarget?.id !== O && m(!1), s && (h((l.inicial ?? o()).format(d)), I(l.inicial ?? o())), w.size(rt) !== 8)) {
|
|
300
290
|
const n = o(l.inicial, d);
|
|
301
|
-
n.isValid() &&
|
|
291
|
+
n.isValid() && R(n.format(B));
|
|
302
292
|
}
|
|
303
293
|
if (i === "final" && (a.relatedTarget?.id !== k && m(!1), s && (h((l.final ?? o()).format(d)), I(l.final ?? o())), w.size(ft) !== 8)) {
|
|
304
294
|
const n = o(l.final, d);
|
|
305
|
-
n.isValid() &&
|
|
295
|
+
n.isValid() && D(n.format(B));
|
|
306
296
|
}
|
|
307
|
-
}, e[45] = s, e[46] = O, e[47] = ft, e[48] = h, e[49] = m, e[50] = k, e[51] = rt, e[52] = t, e[53] = l.final, e[54] = l.inicial, e[55] =
|
|
297
|
+
}, e[45] = s, e[46] = O, e[47] = ft, e[48] = h, e[49] = m, e[50] = k, e[51] = rt, e[52] = t, e[53] = l.final, e[54] = l.inicial, e[55] = D, e[56] = R, e[57] = Ve) : Ve = e[57];
|
|
308
298
|
const L = Ve;
|
|
309
|
-
let pe;
|
|
310
|
-
e[58] !== s || e[59] !== h || e[60] !== K || e[61] !== t || e[62] !== c || e[63] !== l.final || e[64] !== l.inicial ? (pe = (a, i) => {
|
|
311
|
-
t?.onFocus?.(a), !c && !s && K && Jt(!0), i === "initial" && (h((l.inicial ?? o()).format(d)), I(l.inicial ?? o())), i === "final" && (h((l.final ?? o()).format(d)), I(l.final ?? o()));
|
|
312
|
-
}, e[58] = s, e[59] = h, e[60] = K, e[61] = t, e[62] = c, e[63] = l.final, e[64] = l.inicial, e[65] = pe) : pe = e[65];
|
|
313
|
-
const U = pe;
|
|
314
299
|
let Re;
|
|
315
|
-
e[
|
|
300
|
+
e[58] !== s || e[59] !== h || e[60] !== K || e[61] !== t || e[62] !== c || e[63] !== l.final || e[64] !== l.inicial ? (Re = (a, i) => {
|
|
301
|
+
t?.onFocus?.(a), !c && !s && K && Jt(!0), i === "initial" && (h((l.inicial ?? o()).format(d)), I(l.inicial ?? o())), i === "final" && (h((l.final ?? o()).format(d)), I(l.final ?? o()));
|
|
302
|
+
}, e[58] = s, e[59] = h, e[60] = K, e[61] = t, e[62] = c, e[63] = l.final, e[64] = l.inicial, e[65] = Re) : Re = e[65];
|
|
303
|
+
const U = Re;
|
|
304
|
+
let De;
|
|
305
|
+
e[66] !== v || e[67] !== s || e[68] !== p || e[69] !== t ? (De = (a, i) => {
|
|
316
306
|
if (t?.onKeyDown?.(a), s && a.key && !a.shiftKey && !a.altKey && a.key === V.enter) {
|
|
317
307
|
a.preventDefault();
|
|
318
308
|
const n = o(w.toString(v), d);
|
|
319
|
-
|
|
309
|
+
p({
|
|
320
310
|
date: n,
|
|
321
311
|
inputType: i
|
|
322
312
|
});
|
|
323
313
|
}
|
|
324
|
-
}, e[66] = v, e[67] = s, e[68] =
|
|
325
|
-
const q =
|
|
326
|
-
let
|
|
327
|
-
e[71] !== t || e[72] !== g ? (
|
|
314
|
+
}, e[66] = v, e[67] = s, e[68] = p, e[69] = t, e[70] = De) : De = e[70];
|
|
315
|
+
const q = De;
|
|
316
|
+
let Be;
|
|
317
|
+
e[71] !== t || e[72] !== g ? (Be = (a) => {
|
|
328
318
|
g ? a.preventDefault() : t.onPaste?.(a);
|
|
329
|
-
}, e[71] = t, e[72] = g, e[73] =
|
|
330
|
-
const
|
|
331
|
-
let
|
|
332
|
-
e[74] !== t || e[75] !== g ? (
|
|
319
|
+
}, e[71] = t, e[72] = g, e[73] = Be) : Be = e[73];
|
|
320
|
+
const Pe = Be;
|
|
321
|
+
let xe;
|
|
322
|
+
e[74] !== t || e[75] !== g ? (xe = (a) => {
|
|
333
323
|
g ? a.preventDefault() : t.onBeforeInput?.(a);
|
|
334
|
-
}, e[74] = t, e[75] = g, e[76] =
|
|
335
|
-
const
|
|
324
|
+
}, e[74] = t, e[75] = g, e[76] = xe) : xe = e[76];
|
|
325
|
+
const pe = xe;
|
|
336
326
|
let Me;
|
|
337
327
|
e[77] !== s || e[78] !== m || e[79] !== z || e[80] !== W || e[81] !== E || e[82] !== Ce ? (Me = (a) => {
|
|
338
328
|
if (s && a.key && !a.shiftKey && !a.altKey && Ca.includes(a.key)) {
|
|
@@ -379,21 +369,21 @@ const Va = S.forwardRef((t, M) => {
|
|
|
379
369
|
}, e[77] = s, e[78] = m, e[79] = z, e[80] = W, e[81] = E, e[82] = Ce, e[83] = Me) : Me = e[83];
|
|
380
370
|
const ca = Me;
|
|
381
371
|
let Fe;
|
|
382
|
-
e[84] !== u || e[85] !== f || e[86] !== t.value || e[87] !==
|
|
372
|
+
e[84] !== u || e[85] !== f || e[86] !== t.value || e[87] !== D || e[88] !== R ? (Fe = () => {
|
|
383
373
|
if (t?.value) {
|
|
384
374
|
const a = t.value, i = o(w.toString(a[f]), d), n = o(w.toString(a[u]), d);
|
|
385
375
|
T(() => ({
|
|
386
376
|
inicial: i.isValid() ? i : null,
|
|
387
377
|
final: n.isValid() ? n : null
|
|
388
|
-
})),
|
|
378
|
+
})), R(i.format(B)), D(n.format(B));
|
|
389
379
|
}
|
|
390
|
-
}, e[84] = u, e[85] = f, e[86] = t.value, e[87] =
|
|
380
|
+
}, e[84] = u, e[85] = f, e[86] = t.value, e[87] = D, e[88] = R, e[89] = Fe) : Fe = e[89];
|
|
391
381
|
const gt = t?.value;
|
|
392
382
|
let Ne;
|
|
393
383
|
e[90] !== gt ? (Ne = [gt], e[90] = gt, e[91] = Ne) : Ne = e[91], S.useEffect(Fe, Ne);
|
|
394
384
|
const kt = !!c, St = !!c, Ot = sa();
|
|
395
385
|
let Ke;
|
|
396
|
-
e[92] !== v || e[93] !== s || e[94] !== st || e[95] !== O || e[96] !== h || e[97] !== m || e[98] !== ht || e[99] !== z || e[100] !== W || e[101] !== mt || e[102] !==
|
|
386
|
+
e[92] !== v || e[93] !== s || e[94] !== st || e[95] !== O || e[96] !== h || e[97] !== m || e[98] !== ht || e[99] !== z || e[100] !== W || e[101] !== mt || e[102] !== p || e[103] !== yt || e[104] !== bt || e[105] !== _ || e[106] !== k || e[107] !== K || e[108] !== l || e[109] !== it || e[110] !== ot || e[111] !== lt || e[112] !== r || e[113] !== kt || e[114] !== St || e[115] !== Ot || e[116] !== g ? (Ke = {
|
|
397
387
|
isReadOnly: kt,
|
|
398
388
|
isDisabled: St,
|
|
399
389
|
undigitable: g,
|
|
@@ -418,14 +408,14 @@ const Va = S.forwardRef((t, M) => {
|
|
|
418
408
|
handleChangeCalendarBoxState: m,
|
|
419
409
|
handleChangeActiveDescendant: h,
|
|
420
410
|
handleChangeCalendarDisplayDate: ht,
|
|
421
|
-
handleChangeUpdateDateState:
|
|
411
|
+
handleChangeUpdateDateState: p,
|
|
422
412
|
handleOnClickClearSelectedPeriod: bt,
|
|
423
413
|
handleChangeUpdateDateStateWithPredefinedPeriod: yt,
|
|
424
414
|
hasValidPeriodSelected: Ot
|
|
425
|
-
}, e[92] = v, e[93] = s, e[94] = st, e[95] = O, e[96] = h, e[97] = m, e[98] = ht, e[99] = z, e[100] = W, e[101] = mt, e[102] =
|
|
415
|
+
}, e[92] = v, e[93] = s, e[94] = st, e[95] = O, e[96] = h, e[97] = m, e[98] = ht, e[99] = z, e[100] = W, e[101] = mt, e[102] = p, e[103] = yt, e[104] = bt, e[105] = _, e[106] = k, e[107] = K, e[108] = l, e[109] = it, e[110] = ot, e[111] = lt, e[112] = r, e[113] = kt, e[114] = St, e[115] = Ot, e[116] = g, e[117] = Ke) : Ke = e[117];
|
|
426
416
|
const ra = Ke;
|
|
427
417
|
let Te;
|
|
428
|
-
e[118] !== et || e[119] !== y || e[120] !== A || e[121] !== ut || e[122] !== N || e[123] !== k || e[124] !==
|
|
418
|
+
e[118] !== et || e[119] !== y || e[120] !== A || e[121] !== ut || e[122] !== N || e[123] !== k || e[124] !== P || e[125] !== tt || e[126] !== nt || e[127] !== t.hint || e[128] !== t.required || e[129] !== c || e[130] !== r || e[131] !== at ? (Te = ut && /* @__PURE__ */ C(ka, { "data-testid": "test-date-period-field-label", label: P, inputId: k, hint: t?.hint, isDisabled: y, isReadOnly: c, skeletonize: r, required: t?.required, hintPosition: N, themePopover: at, popoverAlign: nt, labelUppercase: tt, hasHintMessages: A, customClassLabel: et }), e[118] = et, e[119] = y, e[120] = A, e[121] = ut, e[122] = N, e[123] = k, e[124] = P, e[125] = tt, e[126] = nt, e[127] = t.hint, e[128] = t.required, e[129] = c, e[130] = r, e[131] = at, e[132] = Te) : Te = e[132];
|
|
429
419
|
const da = w.omit(Yt, ["initialRef", "finalRef"]), _t = t?.initialRef;
|
|
430
420
|
let Ae;
|
|
431
421
|
e[133] !== _t ? (Ae = ea(ct, _t), e[133] = _t, e[134] = Ae) : Ae = e[134];
|
|
@@ -438,7 +428,7 @@ const Va = S.forwardRef((t, M) => {
|
|
|
438
428
|
let Le;
|
|
439
429
|
e[141] === Symbol.for("react.memo_cache_sentinel") ? (Le = /* @__PURE__ */ C(ba, { name: "arrow_right", size: 10 }), e[141] = Le) : Le = e[141];
|
|
440
430
|
let Ue;
|
|
441
|
-
e[142] !== y || e[143] !== c ? (Ue = /* @__PURE__ */ C("span", { className: "separator", "data-state-disabled": y, "data-state-read-only": c, onMouseDown:
|
|
431
|
+
e[142] !== y || e[143] !== c ? (Ue = /* @__PURE__ */ C("span", { className: "separator", "data-state-disabled": y, "data-state-read-only": c, onMouseDown: xa, children: Le }), e[142] = y, e[143] = c, e[144] = Ue) : Ue = e[144];
|
|
442
432
|
const Ct = ga, vt = w.omit(Yt, ["initialRef", "finalRef"]), It = t?.finalRef;
|
|
443
433
|
let j;
|
|
444
434
|
e[145] !== It ? (j = ea(Y, It), e[145] = It, e[146] = j) : j = e[146];
|
|
@@ -450,7 +440,7 @@ const Va = S.forwardRef((t, M) => {
|
|
|
450
440
|
let G;
|
|
451
441
|
e[151] !== q ? (G = (a) => q(a, "final"), e[151] = q, e[152] = G) : G = e[152];
|
|
452
442
|
let qe;
|
|
453
|
-
e[153] !== v || e[154] !== s || e[155] !== ee || e[156] !== y || e[157] !== O || e[158] !== dt || e[159] !==
|
|
443
|
+
e[153] !== v || e[154] !== s || e[155] !== ee || e[156] !== y || e[157] !== O || e[158] !== dt || e[159] !== pe || e[160] !== Pe || e[161] !== _ || e[162] !== ne || e[163] !== c || e[164] !== r || e[165] !== Ct.Input || e[166] !== vt || e[167] !== j || e[168] !== wt || e[169] !== $ || e[170] !== H || e[171] !== G || e[172] !== te || e[173] !== g ? (qe = /* @__PURE__ */ C(Ct.Input, { ...vt, ref: j, id: O, name: O, value: dt, readOnly: c, disabled: y, customClass: ee, tabIndex: wt, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": O, "aria-labelledby": O, "data-testid": "test-date-period-field-final-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste: Pe, onBeforeInput: pe, onBlur: $, onFocus: H, onKeyDown: G }), e[153] = v, e[154] = s, e[155] = ee, e[156] = y, e[157] = O, e[158] = dt, e[159] = pe, e[160] = Pe, e[161] = _, e[162] = ne, e[163] = c, e[164] = r, e[165] = Ct.Input, e[166] = vt, e[167] = j, e[168] = wt, e[169] = $, e[170] = H, e[171] = G, e[172] = te, e[173] = g, e[174] = qe) : qe = e[174];
|
|
454
444
|
let je;
|
|
455
445
|
e[175] === Symbol.for("react.memo_cache_sentinel") ? (je = /* @__PURE__ */ C(va, {}), e[175] = je) : je = e[175];
|
|
456
446
|
let $e;
|
|
@@ -458,13 +448,13 @@ const Va = S.forwardRef((t, M) => {
|
|
|
458
448
|
let He;
|
|
459
449
|
e[178] !== y || e[179] !== A || e[180] !== N || e[181] !== t.hint || e[182] !== r ? (He = N === "below" && /* @__PURE__ */ C(ha, { customClass: "hint", description: t.hint, disabled: y, skeletonize: r, visible: A }), e[178] = y, e[179] = A, e[180] = N, e[181] = t.hint, e[182] = r, e[183] = He) : He = e[183];
|
|
460
450
|
let Ge;
|
|
461
|
-
e[184] !== Z || e[185] !== _ || e[186] !==
|
|
451
|
+
e[184] !== Z || e[185] !== _ || e[186] !== P || e[187] !== r ? (Ge = _ && /* @__PURE__ */ C("span", { "data-testid": "test-date-period-field-list-errors", className: "error", "data-state-skeletonize": r, "aria-describedby": String(P).concat("-errors"), children: Z?.map(pa) }), e[184] = Z, e[185] = _, e[186] = P, e[187] = r, e[188] = Ge) : Ge = e[188];
|
|
462
452
|
let Ye;
|
|
463
453
|
return e[189] !== Qe || e[190] !== Xe || e[191] !== Ze ? (Ye = /* @__PURE__ */ C(ya, { targetRef: Qt, text: Qe, width: Ze, position: Xe }), e[189] = Qe, e[190] = Xe, e[191] = Ze, e[192] = Ye) : Ye = e[192], /* @__PURE__ */ Je(S.Fragment, { children: [
|
|
464
454
|
/* @__PURE__ */ C(wa.Provider, { value: ra, children: /* @__PURE__ */ Je(Sa, { ref: Qt, "data-testid": "test-date-period-field-root", "data-state-error": _, customClassWrapper: aa, children: [
|
|
465
455
|
Te,
|
|
466
456
|
/* @__PURE__ */ Je(Oa, { ref: Xt, "data-testid": "test-date-period-field-container", onKeyDown: ca, skeletonize: r, customClassInputContainer: na, children: [
|
|
467
|
-
/* @__PURE__ */ C(_a, { ...da, ref: Ae, id: k, name: k, value: oa, disabled: y, readOnly: c, customClass: ee, tabIndex: !c && !r ? 0 : -1, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": k, "aria-labelledby": k, "data-testid": "test-date-period-field-initial-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste:
|
|
457
|
+
/* @__PURE__ */ C(_a, { ...da, ref: Ae, id: k, name: k, value: oa, disabled: y, readOnly: c, customClass: ee, tabIndex: !c && !r ? 0 : -1, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": k, "aria-labelledby": k, "data-testid": "test-date-period-field-initial-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste: Pe, onBeforeInput: pe, onBlur: We, onFocus: ze, onKeyDown: Ee }),
|
|
468
458
|
Ue,
|
|
469
459
|
qe,
|
|
470
460
|
je
|
|
@@ -477,29 +467,29 @@ const Va = S.forwardRef((t, M) => {
|
|
|
477
467
|
] });
|
|
478
468
|
});
|
|
479
469
|
Va.displayName = "DatePeriodFieldInputBase";
|
|
480
|
-
function
|
|
470
|
+
function Ra(t) {
|
|
481
471
|
return t.clone().subtract(1, "month");
|
|
482
472
|
}
|
|
483
|
-
function
|
|
473
|
+
function Da(t) {
|
|
484
474
|
return t.clone().add(1, "month");
|
|
485
475
|
}
|
|
486
|
-
function
|
|
476
|
+
function Ba() {
|
|
487
477
|
return {
|
|
488
478
|
inicial: null,
|
|
489
479
|
final: null
|
|
490
480
|
};
|
|
491
481
|
}
|
|
492
|
-
function
|
|
493
|
-
const e = t?.isAfter(M) ? M : t,
|
|
482
|
+
function Pa(t, M) {
|
|
483
|
+
const e = t?.isAfter(M) ? M : t, P = t?.isAfter(M) ? t : M;
|
|
494
484
|
return {
|
|
495
485
|
inicial: e,
|
|
496
|
-
final:
|
|
486
|
+
final: P
|
|
497
487
|
};
|
|
498
488
|
}
|
|
499
|
-
function
|
|
489
|
+
function xa(t) {
|
|
500
490
|
t.preventDefault();
|
|
501
491
|
}
|
|
502
|
-
function
|
|
492
|
+
function pa(t, M) {
|
|
503
493
|
return /* @__PURE__ */ Je(S.Fragment, { children: [
|
|
504
494
|
t,
|
|
505
495
|
" "
|