linear-react-components-ui 1.1.26-beta.21 → 1.1.26-beta.22
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/datepicker2.css +1 -1
- package/lib/assets/styles/dialog.css +1 -1
- package/lib/assets/styles/drawers.css +1 -1
- package/lib/assets/styles/gridlayout.css +1 -1
- package/lib/assets/styles/selectfield.css +1 -1
- package/lib/assets/styles/textfield.css +1 -1
- package/lib/assets/styles/tooltip.css +1 -1
- package/lib/dialog/base/index.js +53 -55
- package/lib/dialog/base/index.js.map +1 -1
- package/lib/dialog/form/index.js +56 -55
- package/lib/dialog/form/index.js.map +1 -1
- package/lib/drawer/Drawer.js +7 -7
- package/lib/drawer/Drawer.js.map +1 -1
- package/lib/drawer/index.js +1 -1
- package/lib/drawer/index.js.map +1 -1
- package/lib/form2/types.d.ts +9 -4
- package/lib/form2/useForm/index.js +96 -89
- package/lib/form2/useForm/index.js.map +1 -1
- package/lib/icons/helper.d.ts +12 -0
- package/lib/icons/helper.js +12 -0
- package/lib/icons/helper.js.map +1 -1
- package/lib/inputs/date/index.js +59 -61
- package/lib/inputs/date/index.js.map +1 -1
- package/lib/inputs2/checkboxfield/base.d.ts +27 -0
- package/lib/inputs2/checkboxfield/base.js +100 -0
- package/lib/inputs2/checkboxfield/base.js.map +1 -0
- package/lib/inputs2/checkboxfield/index.d.ts +4 -25
- package/lib/inputs2/checkboxfield/index.js +41 -108
- package/lib/inputs2/checkboxfield/index.js.map +1 -1
- package/lib/inputs2/date/datefield/base.d.ts +3 -0
- package/lib/inputs2/date/datefield/base.js +193 -0
- package/lib/inputs2/date/datefield/base.js.map +1 -0
- package/lib/inputs2/date/datefield/index.d.ts +2 -1
- package/lib/inputs2/date/datefield/index.js +42 -312
- package/lib/inputs2/date/datefield/index.js.map +1 -1
- package/lib/inputs2/date/datefield/types.d.ts +6 -4
- package/lib/inputs2/date/dateperiodfield/base.d.ts +3 -0
- package/lib/inputs2/date/dateperiodfield/base.js +511 -0
- package/lib/inputs2/date/dateperiodfield/base.js.map +1 -0
- package/lib/inputs2/date/dateperiodfield/index.d.ts +2 -1
- package/lib/inputs2/date/dateperiodfield/index.js +42 -517
- package/lib/inputs2/date/dateperiodfield/index.js.map +1 -1
- package/lib/inputs2/date/dateperiodfield/types.d.ts +6 -4
- package/lib/inputs2/mask/Cnpj.d.ts +1 -3
- package/lib/inputs2/mask/Cnpj.js +38 -44
- package/lib/inputs2/mask/Cnpj.js.map +1 -1
- package/lib/inputs2/mask/Cpf.d.ts +0 -1
- package/lib/inputs2/mask/Cpf.js +32 -42
- package/lib/inputs2/mask/Cpf.js.map +1 -1
- package/lib/inputs2/numberfield/index.js +85 -68
- package/lib/inputs2/numberfield/index.js.map +1 -1
- package/lib/inputs2/radiofield/base.d.ts +3 -0
- package/lib/inputs2/radiofield/base.js +115 -0
- package/lib/inputs2/radiofield/base.js.map +1 -0
- package/lib/inputs2/radiofield/index.d.ts +2 -1
- package/lib/inputs2/radiofield/index.js +41 -108
- package/lib/inputs2/radiofield/index.js.map +1 -1
- package/lib/inputs2/radiofield/types.d.ts +5 -2
- package/lib/inputs2/selectfield/base.d.ts +3 -0
- package/lib/inputs2/selectfield/base.js +411 -0
- package/lib/inputs2/selectfield/base.js.map +1 -0
- package/lib/inputs2/selectfield/index.d.ts +3 -3
- package/lib/inputs2/selectfield/index.js +49 -404
- package/lib/inputs2/selectfield/index.js.map +1 -1
- package/lib/inputs2/selectfield/listbox.d.ts +0 -1
- package/lib/inputs2/selectfield/listbox.js +33 -34
- package/lib/inputs2/selectfield/listbox.js.map +1 -1
- package/lib/inputs2/selectfield/types.d.ts +8 -7
- package/lib/inputs2/selectfield/types.js.map +1 -1
- package/lib/inputs2/textareafield/base.d.ts +23 -0
- package/lib/inputs2/textareafield/base.js +137 -0
- package/lib/inputs2/textareafield/base.js.map +1 -0
- package/lib/inputs2/textareafield/index.d.ts +4 -22
- package/lib/inputs2/textareafield/index.js +45 -130
- package/lib/inputs2/textareafield/index.js.map +1 -1
- package/lib/inputs2/textfield/base.d.ts +23 -0
- package/lib/inputs2/textfield/base.js +107 -0
- package/lib/inputs2/textfield/base.js.map +1 -0
- package/lib/inputs2/textfield/index.d.ts +4 -22
- package/lib/inputs2/textfield/index.js +45 -103
- package/lib/inputs2/textfield/index.js.map +1 -1
- package/lib/tooltip/types.d.ts +4 -1
- package/lib/tooltip/useTooltip.js +68 -86
- package/lib/tooltip/useTooltip.js.map +1 -1
- package/package.json +1 -1
- package/lib/inputs2/selectfield/simple.d.ts +0 -9
- package/lib/inputs2/selectfield/simple.js +0 -24
- package/lib/inputs2/selectfield/simple.js.map +0 -1
|
@@ -1,522 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import "../../../
|
|
5
|
-
import "../../../
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
label: P,
|
|
34
|
-
errors: M,
|
|
35
|
-
initialName: xt,
|
|
36
|
-
finalName: Mt,
|
|
37
|
-
onDeniedActions: At,
|
|
38
|
-
permissionAttr: Nt,
|
|
39
|
-
customClass: Ft,
|
|
40
|
-
customClassLabel: Kt,
|
|
41
|
-
customClassWrapper: Tt,
|
|
42
|
-
customClassInputContainer: Lt,
|
|
43
|
-
labelUppercase: Wt,
|
|
44
|
-
undigitable: zt,
|
|
45
|
-
skeletonize: Et,
|
|
46
|
-
hintPosition: Ut,
|
|
47
|
-
gridLayout: qt,
|
|
48
|
-
themePopover: jt,
|
|
49
|
-
popoverAlign: $t,
|
|
50
|
-
showCalendarButton: Gt,
|
|
51
|
-
textAlign: Ht,
|
|
52
|
-
openCalendarOnFocus: Yt,
|
|
53
|
-
shouldCloseOnSelect: Jt,
|
|
54
|
-
showPredefinedPeriodsButton: Qt,
|
|
55
|
-
showClearDateButton: Xt,
|
|
56
|
-
placeholder: Zt,
|
|
57
|
-
returnValueType: ea,
|
|
58
|
-
tooltip: Ze,
|
|
59
|
-
tooltipPosition: et,
|
|
60
|
-
tooltipWidth: tt,
|
|
61
|
-
...ta
|
|
62
|
-
} = t, f = xt === void 0 ? "inicial" : xt, m = Mt === void 0 ? "final" : Mt, at = At === void 0 ? void 0 : At, nt = Nt === void 0 ? void 0 : Nt, Z = Ft === void 0 ? "" : Ft, it = Kt === void 0 ? "" : Kt, ca = Tt === void 0 ? "" : Tt, da = Lt === void 0 ? "" : Lt, lt = Wt === void 0 ? !1 : Wt, g = zt === void 0 ? !1 : zt, c = Et === void 0 ? !1 : Et, A = Ut === void 0 ? "below" : Ut, fa = qt === void 0 ? void 0 : qt, ot = jt === void 0 ? "light" : jt, st = $t === void 0 ? "left" : $t, rt = Gt === void 0 ? !0 : Gt, ee = Ht === void 0 ? "left" : Ht, N = Yt === void 0 ? !0 : Yt, te = Jt === void 0 ? !0 : Jt, ct = Qt === void 0 ? !0 : Qt, dt = Xt === void 0 ? !0 : Xt, ae = Zt === void 0 ? V : Zt, R = ea === void 0 ? "default" : ea;
|
|
63
|
-
let ne;
|
|
64
|
-
e[0] !== at || e[1] !== nt ? (ne = at || Pa(Na, nt), e[0] = at, e[1] = nt, e[2] = ne) : ne = e[2];
|
|
65
|
-
const ft = ne, {
|
|
66
|
-
hideContent: ie,
|
|
67
|
-
unvisible: ma
|
|
68
|
-
} = ft;
|
|
69
|
-
let le;
|
|
70
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (le = {
|
|
71
|
-
inicial: null,
|
|
72
|
-
final: null
|
|
73
|
-
}, e[3] = le) : le = e[3];
|
|
74
|
-
const [l, F] = Qe(le), [s, aa] = Qe(!1);
|
|
75
|
-
let oe;
|
|
76
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (oe = o().format(d), e[4] = oe) : oe = e[4];
|
|
77
|
-
const [_, ua] = Qe(oe);
|
|
78
|
-
let se;
|
|
79
|
-
e[5] === Symbol.for("react.memo_cache_sentinel") ? (se = o(), e[5] = se) : se = e[5];
|
|
80
|
-
const [mt, C] = Qe(se), ha = X(null), na = X(null), H = X(null), ut = X(null), ia = X(null);
|
|
81
|
-
let re;
|
|
82
|
-
e[6] !== f || e[7] !== t.name ? (re = String(t.name).concat(".").concat(f), e[6] = f, e[7] = t.name, e[8] = re) : re = e[8];
|
|
83
|
-
const k = re;
|
|
84
|
-
let ce;
|
|
85
|
-
e[9] !== m || e[10] !== t.name ? (ce = String(t.name).concat(".").concat(m), e[9] = m, e[10] = t.name, e[11] = ce) : ce = e[11];
|
|
86
|
-
const O = ce;
|
|
87
|
-
let de;
|
|
88
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (de = {
|
|
89
|
-
mask: sa,
|
|
90
|
-
lazy: !1,
|
|
91
|
-
placeholderChar: "_"
|
|
92
|
-
}, e[12] = de) : de = e[12];
|
|
93
|
-
let fe;
|
|
94
|
-
e[13] !== l.inicial ? (fe = l.inicial?.format(V), e[13] = l.inicial, e[14] = fe) : fe = e[14];
|
|
95
|
-
const {
|
|
96
|
-
value: ba,
|
|
97
|
-
setValue: p,
|
|
98
|
-
unmaskedValue: ht
|
|
99
|
-
} = la(de, {
|
|
100
|
-
ref: ut,
|
|
101
|
-
defaultValue: fe,
|
|
102
|
-
onComplete: (a) => {
|
|
103
|
-
const i = o(a, V);
|
|
104
|
-
i.isValid() && B({
|
|
105
|
-
date: i,
|
|
106
|
-
inputType: "initial",
|
|
107
|
-
typing: !0
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
let me;
|
|
112
|
-
e[15] === Symbol.for("react.memo_cache_sentinel") ? (me = {
|
|
113
|
-
mask: sa,
|
|
114
|
-
lazy: !1,
|
|
115
|
-
placeholderChar: "_"
|
|
116
|
-
}, e[15] = me) : me = e[15];
|
|
117
|
-
let ue;
|
|
118
|
-
e[16] !== l.final ? (ue = l.final?.format(V), e[16] = l.final, e[17] = ue) : ue = e[17];
|
|
119
|
-
const {
|
|
120
|
-
value: bt,
|
|
121
|
-
setValue: D,
|
|
122
|
-
unmaskedValue: yt
|
|
123
|
-
} = la(me, {
|
|
124
|
-
ref: H,
|
|
125
|
-
defaultValue: ue,
|
|
126
|
-
onComplete: (a) => {
|
|
127
|
-
const i = o(a, V);
|
|
128
|
-
i.isValid() && B({
|
|
129
|
-
date: i,
|
|
130
|
-
inputType: "final",
|
|
131
|
-
typing: !0
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
let he;
|
|
136
|
-
e[18] !== t.label ? (he = I.isEmpty(t?.label), e[18] = t.label, e[19] = he) : he = e[19];
|
|
137
|
-
const gt = !he, r = !!(t.readOnly || ft.readOnly), b = !!(t.disabled || ft.disabled), K = !!t.hint?.length, v = !!M?.length;
|
|
138
|
-
let be;
|
|
139
|
-
e[20] === Symbol.for("react.memo_cache_sentinel") ? (be = (a) => F(a), e[20] = be) : be = e[20];
|
|
140
|
-
const kt = be;
|
|
141
|
-
let ye;
|
|
142
|
-
e[21] === Symbol.for("react.memo_cache_sentinel") ? (ye = (a) => aa(a), e[21] = ye) : ye = e[21];
|
|
143
|
-
const u = ye;
|
|
144
|
-
let ge;
|
|
145
|
-
e[22] === Symbol.for("react.memo_cache_sentinel") ? (ge = (a) => ua(a), e[22] = ge) : ge = e[22];
|
|
146
|
-
const h = ge;
|
|
147
|
-
let ke;
|
|
148
|
-
e[23] === Symbol.for("react.memo_cache_sentinel") ? (ke = (a) => C(a), e[23] = ke) : ke = e[23];
|
|
149
|
-
const Ot = ke;
|
|
150
|
-
let Oe;
|
|
151
|
-
e[24] === Symbol.for("react.memo_cache_sentinel") ? (Oe = () => C(za), e[24] = Oe) : Oe = e[24];
|
|
152
|
-
const T = Oe;
|
|
153
|
-
let Se;
|
|
154
|
-
e[25] === Symbol.for("react.memo_cache_sentinel") ? (Se = () => C(Ea), e[25] = Se) : Se = e[25];
|
|
155
|
-
const L = Se;
|
|
156
|
-
let ve;
|
|
157
|
-
e[26] !== h ? (ve = (a) => {
|
|
158
|
-
C((i) => {
|
|
159
|
-
const n = i.clone().add(a, "day");
|
|
160
|
-
return h(n.format(d)), n;
|
|
161
|
-
});
|
|
162
|
-
}, e[26] = h, e[27] = ve) : ve = e[27];
|
|
163
|
-
const W = ve;
|
|
164
|
-
let _e;
|
|
165
|
-
e[28] !== h ? (_e = (a) => {
|
|
166
|
-
C((i) => {
|
|
167
|
-
let n = i;
|
|
168
|
-
return a === "end" && (n = i.clone().endOf("week")), a === "start" && (n = i.clone().startOf("week")), h(n.format(d)), n;
|
|
169
|
-
});
|
|
170
|
-
}, e[28] = h, e[29] = _e) : _e = e[29];
|
|
171
|
-
const Ce = _e;
|
|
172
|
-
let Ie;
|
|
173
|
-
e[30] !== m || e[31] !== f || e[32] !== t.value ? (Ie = () => {
|
|
174
|
-
const a = t?.value, i = !I.isEmpty(a[f]), n = !I.isEmpty(a[m]);
|
|
175
|
-
return i && n;
|
|
176
|
-
}, e[30] = m, e[31] = f, e[32] = t.value, e[33] = Ie) : Ie = e[33];
|
|
177
|
-
const ya = Ie;
|
|
178
|
-
let we;
|
|
179
|
-
e[34] !== m || e[35] !== u || e[36] !== f || e[37] !== t || e[38] !== D || e[39] !== p ? (we = () => {
|
|
180
|
-
t.onChange?.({
|
|
181
|
-
target: {
|
|
182
|
-
name: t.name,
|
|
183
|
-
value: {
|
|
184
|
-
[f]: "",
|
|
185
|
-
[m]: ""
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}), F(Ua), p(""), D(""), u(!1);
|
|
189
|
-
}, e[34] = m, e[35] = u, e[36] = f, e[37] = t, e[38] = D, e[39] = p, e[40] = we) : we = e[40];
|
|
190
|
-
const St = we, B = (a) => {
|
|
191
|
-
const {
|
|
192
|
-
date: i,
|
|
193
|
-
inputType: n,
|
|
194
|
-
typing: y
|
|
195
|
-
} = a, x = i.clone(), Y = qa;
|
|
196
|
-
e: switch (n) {
|
|
197
|
-
case "initial": {
|
|
198
|
-
F((Pt) => {
|
|
199
|
-
const {
|
|
200
|
-
inicial: Rt,
|
|
201
|
-
final: Bt
|
|
202
|
-
} = Y(x, Pt.final);
|
|
203
|
-
return {
|
|
204
|
-
inicial: Rt,
|
|
205
|
-
final: Bt
|
|
206
|
-
};
|
|
207
|
-
});
|
|
208
|
-
const {
|
|
209
|
-
inicial: J,
|
|
210
|
-
final: Q
|
|
211
|
-
} = Y(x, l.final);
|
|
212
|
-
t.onChange?.({
|
|
213
|
-
target: {
|
|
214
|
-
name: t.name,
|
|
215
|
-
value: {
|
|
216
|
-
[f]: R === "default" ? J?.format(d) : J?.toISOString(),
|
|
217
|
-
[m]: R === "default" ? Q?.format(d) : Q?.toISOString()
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}), requestAnimationFrame(() => {
|
|
221
|
-
y || H.current?.focus?.();
|
|
222
|
-
});
|
|
223
|
-
break e;
|
|
224
|
-
}
|
|
225
|
-
case "final": {
|
|
226
|
-
F((Pt) => {
|
|
227
|
-
const {
|
|
228
|
-
inicial: Rt,
|
|
229
|
-
final: Bt
|
|
230
|
-
} = Y(Pt.inicial, x);
|
|
231
|
-
return {
|
|
232
|
-
inicial: Rt,
|
|
233
|
-
final: Bt
|
|
234
|
-
};
|
|
235
|
-
});
|
|
236
|
-
const {
|
|
237
|
-
inicial: J,
|
|
238
|
-
final: Q
|
|
239
|
-
} = Y(l.inicial, x);
|
|
240
|
-
t.onChange?.({
|
|
241
|
-
target: {
|
|
242
|
-
name: t.name,
|
|
243
|
-
value: {
|
|
244
|
-
[f]: R === "default" ? J?.format(d) : J?.toISOString(),
|
|
245
|
-
[m]: R === "default" ? Q?.format(d) : Q?.toISOString()
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}), te && u(!1);
|
|
249
|
-
break e;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
C(x.clone());
|
|
253
|
-
};
|
|
254
|
-
let pe;
|
|
255
|
-
e[41] !== m || e[42] !== u || e[43] !== f || e[44] !== t || e[45] !== R || e[46] !== te ? (pe = (a) => {
|
|
256
|
-
const i = (n, y) => {
|
|
257
|
-
const x = {
|
|
258
|
-
[f]: R === "default" ? n.format(d) : n.toISOString(),
|
|
259
|
-
[m]: R === "default" ? y.format(d) : y.toISOString()
|
|
260
|
-
};
|
|
261
|
-
F(() => ({
|
|
262
|
-
inicial: n.clone(),
|
|
263
|
-
final: y.clone()
|
|
264
|
-
})), t.onChange?.({
|
|
265
|
-
target: {
|
|
266
|
-
name: t.name,
|
|
267
|
-
value: x
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
e: switch (a) {
|
|
272
|
-
case "today": {
|
|
273
|
-
const n = o();
|
|
274
|
-
i(n, n);
|
|
275
|
-
break e;
|
|
276
|
-
}
|
|
277
|
-
case "week": {
|
|
278
|
-
const n = o().startOf("week"), y = o().endOf("week");
|
|
279
|
-
i(n, y);
|
|
280
|
-
break e;
|
|
281
|
-
}
|
|
282
|
-
case "lastweek": {
|
|
283
|
-
const n = o().add(-1, "week").startOf("week"), y = o().add(-1, "week").endOf("week");
|
|
284
|
-
i(n, y);
|
|
285
|
-
break e;
|
|
286
|
-
}
|
|
287
|
-
case "last15": {
|
|
288
|
-
const n = o().add(-14, "d"), y = o();
|
|
289
|
-
i(n, y);
|
|
290
|
-
break e;
|
|
291
|
-
}
|
|
292
|
-
case "month": {
|
|
293
|
-
const n = o().startOf("month"), y = o().endOf("month");
|
|
294
|
-
i(n, y);
|
|
295
|
-
break e;
|
|
296
|
-
}
|
|
297
|
-
case "lastmonth": {
|
|
298
|
-
const n = o().add(-1, "month").startOf("month"), y = o().add(-1, "month").endOf("month");
|
|
299
|
-
i(n, y);
|
|
300
|
-
break e;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
H?.current?.focus?.(), te && u(!1);
|
|
304
|
-
}, e[41] = m, e[42] = u, e[43] = f, e[44] = t, e[45] = R, e[46] = te, e[47] = pe) : pe = e[47];
|
|
305
|
-
const vt = pe;
|
|
306
|
-
let De;
|
|
307
|
-
e[48] !== s || e[49] !== O || e[50] !== yt || e[51] !== h || e[52] !== u || e[53] !== k || e[54] !== ht || e[55] !== t || e[56] !== l.final || e[57] !== l.inicial || e[58] !== D || e[59] !== p ? (De = (a, i) => {
|
|
308
|
-
if (t?.onBlur?.(a), i === "initial" && (a.relatedTarget?.id !== O && u(!1), s && (h((l.inicial ?? o()).format(d)), C(l.inicial ?? o())), I.size(ht) !== 8)) {
|
|
309
|
-
const n = o(l.inicial, d);
|
|
310
|
-
n.isValid() && p(n.format(V));
|
|
311
|
-
}
|
|
312
|
-
if (i === "final" && (a.relatedTarget?.id !== k && u(!1), s && (h((l.final ?? o()).format(d)), C(l.final ?? o())), I.size(yt) !== 8)) {
|
|
313
|
-
const n = o(l.final, d);
|
|
314
|
-
n.isValid() && D(n.format(V));
|
|
315
|
-
}
|
|
316
|
-
}, e[48] = s, e[49] = O, e[50] = yt, e[51] = h, e[52] = u, e[53] = k, e[54] = ht, e[55] = t, e[56] = l.final, e[57] = l.inicial, e[58] = D, e[59] = p, e[60] = De) : De = e[60];
|
|
317
|
-
const z = De;
|
|
318
|
-
let Ve;
|
|
319
|
-
e[61] !== s || e[62] !== h || e[63] !== r || e[64] !== N || e[65] !== t || e[66] !== l.final || e[67] !== l.inicial ? (Ve = (a, i) => {
|
|
320
|
-
t?.onFocus?.(a), !r && !s && N && aa(!0), i === "initial" && (h((l.inicial ?? o()).format(d)), C(l.inicial ?? o())), i === "final" && (h((l.final ?? o()).format(d)), C(l.final ?? o()));
|
|
321
|
-
}, e[61] = s, e[62] = h, e[63] = r, e[64] = N, e[65] = t, e[66] = l.final, e[67] = l.inicial, e[68] = Ve) : Ve = e[68];
|
|
322
|
-
const E = Ve;
|
|
323
|
-
let Pe;
|
|
324
|
-
e[69] !== _ || e[70] !== s || e[71] !== B || e[72] !== t ? (Pe = (a, i) => {
|
|
325
|
-
if (t?.onKeyDown?.(a), s && a.key && !a.shiftKey && !a.altKey && a.key === w.enter) {
|
|
326
|
-
a.preventDefault();
|
|
327
|
-
const n = o(I.toString(_), d);
|
|
328
|
-
B({
|
|
329
|
-
date: n,
|
|
330
|
-
inputType: i
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
}, e[69] = _, e[70] = s, e[71] = B, e[72] = t, e[73] = Pe) : Pe = e[73];
|
|
334
|
-
const U = Pe;
|
|
335
|
-
let Re;
|
|
336
|
-
e[74] !== t || e[75] !== g ? (Re = (a) => {
|
|
337
|
-
g ? a.preventDefault() : t.onPaste?.(a);
|
|
338
|
-
}, e[74] = t, e[75] = g, e[76] = Re) : Re = e[76];
|
|
339
|
-
const Be = Re;
|
|
340
|
-
let xe;
|
|
341
|
-
e[77] !== t || e[78] !== g ? (xe = (a) => {
|
|
342
|
-
g ? a.preventDefault() : t.onBeforeInput?.(a);
|
|
343
|
-
}, e[77] = t, e[78] = g, e[79] = xe) : xe = e[79];
|
|
344
|
-
const Me = xe;
|
|
345
|
-
let Ae;
|
|
346
|
-
e[80] !== s || e[81] !== u || e[82] !== L || e[83] !== T || e[84] !== W || e[85] !== Ce ? (Ae = (a) => {
|
|
347
|
-
if (s && a.key && !a.shiftKey && !a.altKey && Fa.includes(a.key)) {
|
|
348
|
-
a.preventDefault();
|
|
349
|
-
e: switch (a.key) {
|
|
350
|
-
case w.arrowLeft: {
|
|
351
|
-
W(-1);
|
|
352
|
-
break e;
|
|
353
|
-
}
|
|
354
|
-
case w.arrowRight: {
|
|
355
|
-
W(1);
|
|
356
|
-
break e;
|
|
357
|
-
}
|
|
358
|
-
case w.arrowUp: {
|
|
359
|
-
W(-7);
|
|
360
|
-
break e;
|
|
361
|
-
}
|
|
362
|
-
case w.arrowDown: {
|
|
363
|
-
W(7);
|
|
364
|
-
break e;
|
|
365
|
-
}
|
|
366
|
-
case w.pageUp: {
|
|
367
|
-
L();
|
|
368
|
-
break e;
|
|
369
|
-
}
|
|
370
|
-
case w.pageDown: {
|
|
371
|
-
T();
|
|
372
|
-
break e;
|
|
373
|
-
}
|
|
374
|
-
case w.home: {
|
|
375
|
-
Ce("start");
|
|
376
|
-
break e;
|
|
377
|
-
}
|
|
378
|
-
case w.end: {
|
|
379
|
-
Ce("end");
|
|
380
|
-
break e;
|
|
381
|
-
}
|
|
382
|
-
case w.escape: {
|
|
383
|
-
u(!1);
|
|
384
|
-
break e;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}, e[80] = s, e[81] = u, e[82] = L, e[83] = T, e[84] = W, e[85] = Ce, e[86] = Ae) : Ae = e[86];
|
|
389
|
-
const ga = Ae;
|
|
390
|
-
let Ne;
|
|
391
|
-
e[87] !== m || e[88] !== f || e[89] !== t.value || e[90] !== D || e[91] !== p ? (Ne = () => {
|
|
392
|
-
if (t?.value) {
|
|
393
|
-
const a = t.value, i = o(I.toString(a[f]), d), n = o(I.toString(a[m]), d);
|
|
394
|
-
F(() => ({
|
|
395
|
-
inicial: i.isValid() ? i : null,
|
|
396
|
-
final: n.isValid() ? n : null
|
|
397
|
-
})), p(i.format(V)), D(n.format(V));
|
|
398
|
-
}
|
|
399
|
-
}, e[87] = m, e[88] = f, e[89] = t.value, e[90] = D, e[91] = p, e[92] = Ne) : Ne = e[92];
|
|
400
|
-
const _t = t?.value;
|
|
401
|
-
let Fe;
|
|
402
|
-
e[93] !== _t ? (Fe = [_t], e[93] = _t, e[94] = Fe) : Fe = e[94], Ca(Ne, Fe);
|
|
403
|
-
const Ct = ya();
|
|
404
|
-
let Ke;
|
|
405
|
-
e[95] !== _ || e[96] !== s || e[97] !== mt || e[98] !== O || e[99] !== h || e[100] !== u || e[101] !== Ot || e[102] !== L || e[103] !== T || e[104] !== kt || e[105] !== B || e[106] !== vt || e[107] !== St || e[108] !== v || e[109] !== k || e[110] !== b || e[111] !== r || e[112] !== N || e[113] !== l || e[114] !== rt || e[115] !== dt || e[116] !== ct || e[117] !== c || e[118] !== Ct || e[119] !== g ? (Ke = {
|
|
406
|
-
isReadOnly: r,
|
|
407
|
-
isDisabled: b,
|
|
408
|
-
undigitable: g,
|
|
409
|
-
skeletonize: c,
|
|
410
|
-
dateContainerRef: ia,
|
|
411
|
-
calendarBoxOpen: s,
|
|
412
|
-
activeDescendant: _,
|
|
413
|
-
selectedDate: l,
|
|
414
|
-
initialInputId: k,
|
|
415
|
-
finalInputId: O,
|
|
416
|
-
initialInputRef: ut,
|
|
417
|
-
finalInputRef: H,
|
|
418
|
-
showCalendarButton: rt,
|
|
419
|
-
calendarDisplayDate: mt,
|
|
420
|
-
hasValidationErrors: v,
|
|
421
|
-
openCalendarOnFocus: N,
|
|
422
|
-
showPredefinedPeriodsButton: ct,
|
|
423
|
-
showClearDateButton: dt,
|
|
424
|
-
handleChangeSelectedDate: kt,
|
|
425
|
-
handleChangePreviousMonth: T,
|
|
426
|
-
handleChangeNextMonth: L,
|
|
427
|
-
handleChangeCalendarBoxState: u,
|
|
428
|
-
handleChangeActiveDescendant: h,
|
|
429
|
-
handleChangeCalendarDisplayDate: Ot,
|
|
430
|
-
handleChangeUpdateDateState: B,
|
|
431
|
-
handleOnClickClearSelectedPeriod: St,
|
|
432
|
-
handleChangeUpdateDateStateWithPredefinedPeriod: vt,
|
|
433
|
-
hasValidPeriodSelected: Ct
|
|
434
|
-
}, e[95] = _, e[96] = s, e[97] = mt, e[98] = O, e[99] = h, e[100] = u, e[101] = Ot, e[102] = L, e[103] = T, e[104] = kt, e[105] = B, e[106] = vt, e[107] = St, e[108] = v, e[109] = k, e[110] = b, e[111] = r, e[112] = N, e[113] = l, e[114] = rt, e[115] = dt, e[116] = ct, e[117] = c, e[118] = Ct, e[119] = g, e[120] = Ke) : Ke = e[120];
|
|
435
|
-
const ka = Ke;
|
|
436
|
-
if (ma || ie)
|
|
1
|
+
import { jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import { c as I } from "../../../_virtual/compiler-runtime.js";
|
|
3
|
+
import P from "react";
|
|
4
|
+
import h from "../../../gridlayout/GridCol.js";
|
|
5
|
+
import { actionsOnPermissionDenied as A } from "../../../permissionValidations.js";
|
|
6
|
+
import { options as C } from "../helpers.js";
|
|
7
|
+
import { InputBase as R } from "./base.js";
|
|
8
|
+
const g = P.forwardRef((u, o) => {
|
|
9
|
+
const e = I.c(23);
|
|
10
|
+
let d, t, i, n, l, p;
|
|
11
|
+
e[0] !== u ? ({
|
|
12
|
+
onDeniedActions: i,
|
|
13
|
+
permissionAttr: n,
|
|
14
|
+
disabled: d,
|
|
15
|
+
readOnly: p,
|
|
16
|
+
gridLayout: t,
|
|
17
|
+
...l
|
|
18
|
+
} = u, e[0] = u, e[1] = d, e[2] = t, e[3] = i, e[4] = n, e[5] = l, e[6] = p) : (d = e[1], t = e[2], i = e[3], n = e[4], l = e[5], p = e[6]);
|
|
19
|
+
let a;
|
|
20
|
+
e[7] !== i || e[8] !== n ? (a = i || A(C, n), e[7] = i, e[8] = n, e[9] = a) : a = e[9];
|
|
21
|
+
const y = a, {
|
|
22
|
+
hideContent: x,
|
|
23
|
+
unvisible: B
|
|
24
|
+
} = y, b = !!(p || y.readOnly), D = !!(d || y.disabled);
|
|
25
|
+
let m;
|
|
26
|
+
e[10] !== D || e[11] !== b || e[12] !== l ? (m = {
|
|
27
|
+
readOnly: b,
|
|
28
|
+
disabled: D,
|
|
29
|
+
...l
|
|
30
|
+
}, e[10] = D, e[11] = b, e[12] = l, e[13] = m) : m = e[13];
|
|
31
|
+
const s = m;
|
|
32
|
+
if (B || x)
|
|
437
33
|
return null;
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
e[140] !== E ? (ze = (a) => E(a, "initial"), e[140] = E, e[141] = ze) : ze = e[141];
|
|
447
|
-
let Ee;
|
|
448
|
-
e[142] !== U ? (Ee = (a) => U(a, "initial"), e[142] = U, e[143] = Ee) : Ee = e[143];
|
|
449
|
-
let Ue;
|
|
450
|
-
e[144] === Symbol.for("react.memo_cache_sentinel") ? (Ue = /* @__PURE__ */ S(pa, { name: "arrow_right", size: 10 }), e[144] = Ue) : Ue = e[144];
|
|
451
|
-
let qe;
|
|
452
|
-
e[145] !== b || e[146] !== r ? (qe = /* @__PURE__ */ S("span", { className: "separator", "data-state-disabled": b, "data-state-read-only": r, onMouseDown: ja, children: Ue }), e[145] = b, e[146] = r, e[147] = qe) : qe = e[147];
|
|
453
|
-
const wt = Ra, pt = I.omit(ta, ["initialRef", "finalRef"]), Dt = t?.finalRef;
|
|
454
|
-
let q;
|
|
455
|
-
e[148] !== Dt ? (q = oa(H, Dt), e[148] = Dt, e[149] = q) : q = e[149];
|
|
456
|
-
const Vt = !r && !c ? 0 : -1;
|
|
457
|
-
let j;
|
|
458
|
-
e[150] !== z ? (j = (a) => z(a, "final"), e[150] = z, e[151] = j) : j = e[151];
|
|
459
|
-
let $;
|
|
460
|
-
e[152] !== E ? ($ = (a) => E(a, "final"), e[152] = E, e[153] = $) : $ = e[153];
|
|
461
|
-
let G;
|
|
462
|
-
e[154] !== U ? (G = (a) => U(a, "final"), e[154] = U, e[155] = G) : G = e[155];
|
|
463
|
-
let je;
|
|
464
|
-
e[156] !== _ || e[157] !== s || e[158] !== Z || e[159] !== O || e[160] !== bt || e[161] !== Me || e[162] !== Be || e[163] !== v || e[164] !== b || e[165] !== r || e[166] !== ae || e[167] !== c || e[168] !== wt.Input || e[169] !== pt || e[170] !== q || e[171] !== Vt || e[172] !== j || e[173] !== $ || e[174] !== G || e[175] !== ee || e[176] !== g ? (je = /* @__PURE__ */ S(wt.Input, { ...pt, ref: q, id: O, name: O, value: bt, readOnly: r, disabled: b, customClass: Z, tabIndex: Vt, placeholder: ae, "aria-autocomplete": "list", "aria-activedescendant": _, "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": v, "data-state-read-only": r, "data-state-text-align": ee, "data-state-undigitable": g, "data-state-skeletonize": c, onPaste: Be, onBeforeInput: Me, onBlur: j, onFocus: $, onKeyDown: G }), e[156] = _, e[157] = s, e[158] = Z, e[159] = O, e[160] = bt, e[161] = Me, e[162] = Be, e[163] = v, e[164] = b, e[165] = r, e[166] = ae, e[167] = c, e[168] = wt.Input, e[169] = pt, e[170] = q, e[171] = Vt, e[172] = j, e[173] = $, e[174] = G, e[175] = ee, e[176] = g, e[177] = je) : je = e[177];
|
|
465
|
-
let $e;
|
|
466
|
-
e[178] === Symbol.for("react.memo_cache_sentinel") ? ($e = /* @__PURE__ */ S(Ka, {}), e[178] = $e) : $e = e[178];
|
|
467
|
-
let Ge;
|
|
468
|
-
e[179] !== s || e[180] !== ie ? (Ge = s && !ie && Ia(/* @__PURE__ */ S(Ta, { ref: ha }), document.body), e[179] = s, e[180] = ie, e[181] = Ge) : Ge = e[181];
|
|
469
|
-
let He;
|
|
470
|
-
e[182] !== K || e[183] !== A || e[184] !== b || e[185] !== t.hint || e[186] !== c ? (He = A === "below" && /* @__PURE__ */ S(wa, { customClass: "hint", description: t.hint, disabled: b, skeletonize: c, visible: K }), e[182] = K, e[183] = A, e[184] = b, e[185] = t.hint, e[186] = c, e[187] = He) : He = e[187];
|
|
471
|
-
let Ye;
|
|
472
|
-
e[188] !== M || e[189] !== v || e[190] !== P || e[191] !== c ? (Ye = v && /* @__PURE__ */ S("span", { "data-testid": "test-date-period-field-list-errors", className: "error", "data-state-skeletonize": c, "aria-describedby": String(P).concat("-errors"), children: M?.map($a) }), e[188] = M, e[189] = v, e[190] = P, e[191] = c, e[192] = Ye) : Ye = e[192];
|
|
473
|
-
let Je;
|
|
474
|
-
return e[193] !== Ze || e[194] !== et || e[195] !== tt ? (Je = /* @__PURE__ */ S(Va, { targetRef: na, text: Ze, width: tt, position: et }), e[193] = Ze, e[194] = et, e[195] = tt, e[196] = Je) : Je = e[196], /* @__PURE__ */ Xe(ra, { children: [
|
|
475
|
-
/* @__PURE__ */ S(Da, { cols: fa, children: /* @__PURE__ */ S(La.Provider, { value: ka, children: /* @__PURE__ */ Xe(xa, { ref: na, "data-testid": "test-date-period-field-root", "data-state-error": v, customClassWrapper: ca, children: [
|
|
476
|
-
Te,
|
|
477
|
-
/* @__PURE__ */ Xe(Ma, { ref: ia, "data-testid": "test-date-period-field-container", onKeyDown: ga, skeletonize: c, customClassInputContainer: da, children: [
|
|
478
|
-
/* @__PURE__ */ S(Aa, { ...Oa, ref: Le, id: k, name: k, value: ba, readOnly: r, disabled: b, customClass: Z, tabIndex: !r && !c ? 0 : -1, placeholder: ae, "aria-autocomplete": "list", "aria-activedescendant": _, "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": v, "data-state-read-only": r, "data-state-text-align": ee, "data-state-undigitable": g, "data-state-skeletonize": c, onPaste: Be, onBeforeInput: Me, onBlur: We, onFocus: ze, onKeyDown: Ee }),
|
|
479
|
-
qe,
|
|
480
|
-
je,
|
|
481
|
-
$e
|
|
482
|
-
] }),
|
|
483
|
-
Ge,
|
|
484
|
-
He,
|
|
485
|
-
Ye
|
|
486
|
-
] }) }) }),
|
|
487
|
-
Je
|
|
488
|
-
] });
|
|
34
|
+
if (t) {
|
|
35
|
+
let r;
|
|
36
|
+
e[14] !== s || e[15] !== o ? (r = /* @__PURE__ */ O(R, { ref: o, ...s }), e[14] = s, e[15] = o, e[16] = r) : r = e[16];
|
|
37
|
+
let f;
|
|
38
|
+
return e[17] !== t || e[18] !== r ? (f = /* @__PURE__ */ O(h, { cols: t, children: r }), e[17] = t, e[18] = r, e[19] = f) : f = e[19], f;
|
|
39
|
+
}
|
|
40
|
+
let c;
|
|
41
|
+
return e[20] !== s || e[21] !== o ? (c = /* @__PURE__ */ O(R, { ref: o, ...s }), e[20] = s, e[21] = o, e[22] = c) : c = e[22], c;
|
|
489
42
|
});
|
|
490
|
-
|
|
491
|
-
function za(t) {
|
|
492
|
-
return t.clone().subtract(1, "month");
|
|
493
|
-
}
|
|
494
|
-
function Ea(t) {
|
|
495
|
-
return t.clone().add(1, "month");
|
|
496
|
-
}
|
|
497
|
-
function Ua() {
|
|
498
|
-
return {
|
|
499
|
-
inicial: null,
|
|
500
|
-
final: null
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
function qa(t, e) {
|
|
504
|
-
const P = t?.isAfter(e) ? e : t, M = t?.isAfter(e) ? t : e;
|
|
505
|
-
return {
|
|
506
|
-
inicial: P,
|
|
507
|
-
final: M
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
function ja(t) {
|
|
511
|
-
t.preventDefault();
|
|
512
|
-
}
|
|
513
|
-
function $a(t, e) {
|
|
514
|
-
return /* @__PURE__ */ Xe(ra, { children: [
|
|
515
|
-
t,
|
|
516
|
-
" "
|
|
517
|
-
] }, `${e + 1}-${t}`);
|
|
518
|
-
}
|
|
43
|
+
g.displayName = "DatePeriodFieldInput";
|
|
519
44
|
export {
|
|
520
|
-
|
|
45
|
+
g as Input
|
|
521
46
|
};
|
|
522
47
|
//# sourceMappingURL=index.js.map
|