@enviabybus/react-utility-belt 2.4.3 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/http.error.0pMVpraj.js +2 -0
- package/dist/chunks/http.error.a7ylLT2G.js +75 -0
- package/dist/chunks/parser.helper.BHm3KRPh.js +42 -0
- package/dist/chunks/parser.helper.BKRe6p7c.js +1 -0
- package/dist/chunks/services.helper.-kkjd_CH.js +1 -0
- package/dist/chunks/services.helper.DjoudiHA.js +74 -0
- package/dist/components.cjs.js +1 -0
- package/dist/components.d.ts +1 -0
- package/dist/components.es.js +614 -0
- package/dist/errors.cjs.js +1 -2
- package/dist/errors.es.js +15 -72
- package/dist/helpers.cjs.js +3 -1
- package/dist/helpers.es.js +1469 -63
- package/dist/services.cjs.js +1 -10
- package/dist/services.es.js +310 -2176
- package/dist/src/components/form/AutocompleteField.d.ts +35 -0
- package/dist/src/components/form/AutocompleteField.d.ts.map +1 -0
- package/dist/src/components/form/BooleanSelectField.d.ts +10 -0
- package/dist/src/components/form/BooleanSelectField.d.ts.map +1 -0
- package/dist/src/components/form/CheckboxField.d.ts +40 -0
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -0
- package/dist/src/components/form/DateTimeField.d.ts +33 -0
- package/dist/src/components/form/DateTimeField.d.ts.map +1 -0
- package/dist/src/components/form/EmailField.d.ts +8 -0
- package/dist/src/components/form/EmailField.d.ts.map +1 -0
- package/dist/src/components/form/NumberField.d.ts +10 -0
- package/dist/src/components/form/NumberField.d.ts.map +1 -0
- package/dist/src/components/form/PasswordField.d.ts +8 -0
- package/dist/src/components/form/PasswordField.d.ts.map +1 -0
- package/dist/src/components/form/RadioField.d.ts +37 -0
- package/dist/src/components/form/RadioField.d.ts.map +1 -0
- package/dist/src/components/form/SelectField.d.ts +33 -0
- package/dist/src/components/form/SelectField.d.ts.map +1 -0
- package/dist/src/components/form/SubmitButton.d.ts +20 -0
- package/dist/src/components/form/SubmitButton.d.ts.map +1 -0
- package/dist/src/components/form/TextField.d.ts +23 -0
- package/dist/src/components/form/TextField.d.ts.map +1 -0
- package/dist/src/components/form/index.d.ts +12 -0
- package/dist/src/components/form/index.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/errors/http.error.d.ts +1 -0
- package/dist/src/errors/http.error.d.ts.map +1 -1
- package/dist/src/helpers/audio.helper.d.ts +7 -0
- package/dist/src/helpers/audio.helper.d.ts.map +1 -0
- package/dist/src/helpers/currency.helper.d.ts +2 -0
- package/dist/src/helpers/currency.helper.d.ts.map +1 -0
- package/dist/src/helpers/date.helper.d.ts +12 -0
- package/dist/src/helpers/date.helper.d.ts.map +1 -0
- package/dist/src/helpers/external-storage.helper.d.ts +7 -0
- package/dist/src/helpers/external-storage.helper.d.ts.map +1 -0
- package/dist/src/helpers/file.helper.d.ts +8 -0
- package/dist/src/helpers/file.helper.d.ts.map +1 -0
- package/dist/src/helpers/graphql.helper.d.ts +5 -0
- package/dist/src/helpers/graphql.helper.d.ts.map +1 -0
- package/dist/src/helpers/http.helper.d.ts +23 -1
- package/dist/src/helpers/http.helper.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +14 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/interaction.helper.d.ts +7 -0
- package/dist/src/helpers/interaction.helper.d.ts.map +1 -0
- package/dist/src/helpers/mask.helper.d.ts +6 -0
- package/dist/src/helpers/mask.helper.d.ts.map +1 -0
- package/dist/src/helpers/measurement.helper.d.ts +10 -0
- package/dist/src/helpers/measurement.helper.d.ts.map +1 -0
- package/dist/src/helpers/navigation.helper.d.ts +5 -0
- package/dist/src/helpers/navigation.helper.d.ts.map +1 -0
- package/dist/src/helpers/object.helper.d.ts +4 -0
- package/dist/src/helpers/object.helper.d.ts.map +1 -0
- package/dist/src/helpers/pagination.helper.d.ts +2 -0
- package/dist/src/helpers/pagination.helper.d.ts.map +1 -0
- package/dist/src/helpers/parser.helper.d.ts +7 -0
- package/dist/src/helpers/parser.helper.d.ts.map +1 -0
- package/dist/src/helpers/version.helper.d.ts +7 -0
- package/dist/src/helpers/version.helper.d.ts.map +1 -0
- package/dist/src/types/form.d.ts +12 -0
- package/dist/src/types/form.d.ts.map +1 -0
- package/dist/src/types/graphql.d.ts +16 -0
- package/dist/src/types/graphql.d.ts.map +1 -0
- package/dist/src/types/helpers.d.ts +1 -0
- package/dist/src/types/helpers.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +4 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/measurements.d.ts +10 -0
- package/dist/src/types/measurements.d.ts.map +1 -0
- package/dist/types.cjs.js +1 -1
- package/dist/types.es.js +5 -1
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +16 -2
- package/dist/chunks/services.helper.BhBSTY1M.js +0 -3741
- package/dist/chunks/services.helper.DolZWkEs.js +0 -47
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
import { jsx as P, jsxs as Q } from "react/jsx-runtime";
|
|
2
|
+
import { c as R } from "react/compiler-runtime";
|
|
3
|
+
import { Autocomplete as ue, TextField as oe, Select as fe, InputLabel as pe, MenuItem as me, FormHelperText as U, FormControl as X, Checkbox as he, FormControlLabel as le, FormLabel as ne, FormGroup as se, InputAdornment as ve, IconButton as be, Radio as Ce, Button as ge } from "@mui/material";
|
|
4
|
+
import { identity as N } from "lodash";
|
|
5
|
+
import { useFormContext as E, useController as V, useFieldArray as xe, useWatch as ke } from "react-hook-form";
|
|
6
|
+
import { useId as Pe } from "react";
|
|
7
|
+
import "react-router-dom";
|
|
8
|
+
import { b as _, n as ee, u as ye } from "./chunks/parser.helper.BHm3KRPh.js";
|
|
9
|
+
import { DateTimePicker as Te } from "@mui/x-date-pickers/DateTimePicker";
|
|
10
|
+
import { Visibility as $e, VisibilityOff as Me } from "@mui/icons-material";
|
|
11
|
+
const re = ue, Se = (d) => typeof d == "string" ? d : d.label, Fe = (d) => d.enabled === !1, Ae = (d) => {
|
|
12
|
+
const e = R(30), {
|
|
13
|
+
Autocomplete: t,
|
|
14
|
+
AutocompleteProps: o,
|
|
15
|
+
name: l,
|
|
16
|
+
options: n,
|
|
17
|
+
label: i,
|
|
18
|
+
sx: r,
|
|
19
|
+
getOptionLabel: s,
|
|
20
|
+
getOptionDisabled: f,
|
|
21
|
+
transform: u,
|
|
22
|
+
serialize: c,
|
|
23
|
+
allowAnyText: a,
|
|
24
|
+
multiple: p,
|
|
25
|
+
fullWidth: m,
|
|
26
|
+
helperText: b
|
|
27
|
+
} = d, h = t === void 0 ? re : t, y = s === void 0 ? Se : s, g = f === void 0 ? Fe : f, k = u === void 0 ? N : u, C = c === void 0 ? String : c, x = a === void 0 ? !1 : a, v = p === void 0 ? !1 : p, T = m === void 0 ? !0 : m, A = E();
|
|
28
|
+
let M;
|
|
29
|
+
e[0] !== A.control || e[1] !== l ? (M = {
|
|
30
|
+
control: A.control,
|
|
31
|
+
name: l
|
|
32
|
+
}, e[0] = A.control, e[1] = l, e[2] = M) : M = e[2];
|
|
33
|
+
const {
|
|
34
|
+
field: O,
|
|
35
|
+
fieldState: S
|
|
36
|
+
} = V(M);
|
|
37
|
+
let $;
|
|
38
|
+
e[3] !== x || e[4] !== O || e[5] !== v || e[6] !== k ? ($ = (G, W) => {
|
|
39
|
+
if (!x && typeof W == "string")
|
|
40
|
+
return;
|
|
41
|
+
const j = (() => {
|
|
42
|
+
const H = (Array.isArray(W) ? W : [W]).map((q) => q === null ? null : k(typeof q == "string" ? q : q.value)).filter(Oe);
|
|
43
|
+
return v ? H : H[0] ?? null;
|
|
44
|
+
})();
|
|
45
|
+
O.onChange(j);
|
|
46
|
+
}, e[3] = x, e[4] = O, e[5] = v, e[6] = k, e[7] = $) : $ = e[7];
|
|
47
|
+
const z = $;
|
|
48
|
+
let F;
|
|
49
|
+
if (e[8] !== O || e[9] !== v || e[10] !== n || e[11] !== C) {
|
|
50
|
+
e: {
|
|
51
|
+
const {
|
|
52
|
+
value: G
|
|
53
|
+
} = O, W = v && Array.isArray(G) ? G.map(C) : C(G), j = ze;
|
|
54
|
+
if (v && Array.isArray(W)) {
|
|
55
|
+
F = n.filter((H) => j(W, H));
|
|
56
|
+
break e;
|
|
57
|
+
}
|
|
58
|
+
F = n.find((H) => j(W, H)) ?? null;
|
|
59
|
+
}
|
|
60
|
+
e[8] = O, e[9] = v, e[10] = n, e[11] = C, e[12] = F;
|
|
61
|
+
} else
|
|
62
|
+
F = e[12];
|
|
63
|
+
const w = F;
|
|
64
|
+
let B;
|
|
65
|
+
e[13] !== S.error || e[14] !== b || e[15] !== i ? (B = (G) => {
|
|
66
|
+
var W;
|
|
67
|
+
return /* @__PURE__ */ P(oe, { ...G, label: i, error: S.error !== void 0, helperText: ((W = S.error) == null ? void 0 : W.message) ?? b });
|
|
68
|
+
}, e[13] = S.error, e[14] = b, e[15] = i, e[16] = B) : B = e[16];
|
|
69
|
+
const D = z, I = y, L = g;
|
|
70
|
+
let K;
|
|
71
|
+
return e[17] !== h || e[18] !== o || e[19] !== x || e[20] !== T || e[21] !== v || e[22] !== n || e[23] !== r || e[24] !== B || e[25] !== D || e[26] !== I || e[27] !== L || e[28] !== w ? (K = /* @__PURE__ */ P(h, { options: n, value: w, freeSolo: x, multiple: v, renderInput: B, fullWidth: T, sx: r, ...o, onChange: D, getOptionLabel: I, getOptionDisabled: L }), e[17] = h, e[18] = o, e[19] = x, e[20] = T, e[21] = v, e[22] = n, e[23] = r, e[24] = B, e[25] = D, e[26] = I, e[27] = L, e[28] = w, e[29] = K) : K = e[29], K;
|
|
72
|
+
}, Ze = {
|
|
73
|
+
Autocomplete: re,
|
|
74
|
+
Main: Ae
|
|
75
|
+
};
|
|
76
|
+
function Oe(d) {
|
|
77
|
+
return d !== null;
|
|
78
|
+
}
|
|
79
|
+
function ze(d, e) {
|
|
80
|
+
return d === e.value;
|
|
81
|
+
}
|
|
82
|
+
const ie = fe, De = (d) => d.value, we = (d) => {
|
|
83
|
+
var D;
|
|
84
|
+
const e = R(34), {
|
|
85
|
+
Select: t,
|
|
86
|
+
SelectProps: o,
|
|
87
|
+
name: l,
|
|
88
|
+
sx: n,
|
|
89
|
+
options: i,
|
|
90
|
+
label: r,
|
|
91
|
+
getKey: s,
|
|
92
|
+
transform: f,
|
|
93
|
+
serialize: u,
|
|
94
|
+
helperText: c
|
|
95
|
+
} = d, a = t === void 0 ? ie : t, p = s === void 0 ? De : s, m = f === void 0 ? N : f, b = u === void 0 ? String : u, h = E();
|
|
96
|
+
let y;
|
|
97
|
+
e[0] !== h.control || e[1] !== l ? (y = {
|
|
98
|
+
control: h.control,
|
|
99
|
+
name: l
|
|
100
|
+
}, e[0] = h.control, e[1] = l, e[2] = y) : y = e[2];
|
|
101
|
+
const {
|
|
102
|
+
field: g,
|
|
103
|
+
fieldState: k
|
|
104
|
+
} = V(y), C = Pe();
|
|
105
|
+
let x;
|
|
106
|
+
e[3] !== g || e[4] !== m ? (x = (I) => {
|
|
107
|
+
const L = m(I.target.value);
|
|
108
|
+
g.onChange(L);
|
|
109
|
+
}, e[3] = g, e[4] = m, e[5] = x) : x = e[5];
|
|
110
|
+
const v = x;
|
|
111
|
+
let T;
|
|
112
|
+
e[6] !== g.value || e[7] !== b ? (T = b(g.value), e[6] = g.value, e[7] = b, e[8] = T) : T = e[8];
|
|
113
|
+
const A = T, M = k.error !== void 0, O = ((D = k.error) == null ? void 0 : D.message) ?? c;
|
|
114
|
+
let S;
|
|
115
|
+
e[9] !== r || e[10] !== C ? (S = r ? /* @__PURE__ */ P(pe, { id: C, children: r }) : null, e[9] = r, e[10] = C, e[11] = S) : S = e[11];
|
|
116
|
+
const $ = r ? C : void 0;
|
|
117
|
+
let z;
|
|
118
|
+
if (e[12] !== p || e[13] !== i) {
|
|
119
|
+
let I;
|
|
120
|
+
e[15] !== p ? (I = (L) => /* @__PURE__ */ P(me, { value: L.value, children: L.label }, p(L)), e[15] = p, e[16] = I) : I = e[16], z = i.map(I), e[12] = p, e[13] = i, e[14] = z;
|
|
121
|
+
} else
|
|
122
|
+
z = e[14];
|
|
123
|
+
let F;
|
|
124
|
+
e[17] !== a || e[18] !== o || e[19] !== M || e[20] !== r || e[21] !== v || e[22] !== n || e[23] !== z || e[24] !== $ || e[25] !== A ? (F = /* @__PURE__ */ P(a, { labelId: $, value: A, label: r, onChange: v, fullWidth: !0, sx: n, error: M, ...o, children: z }), e[17] = a, e[18] = o, e[19] = M, e[20] = r, e[21] = v, e[22] = n, e[23] = z, e[24] = $, e[25] = A, e[26] = F) : F = e[26];
|
|
125
|
+
let w;
|
|
126
|
+
e[27] !== O ? (w = O ? /* @__PURE__ */ P(U, { children: O }) : null, e[27] = O, e[28] = w) : w = e[28];
|
|
127
|
+
let B;
|
|
128
|
+
return e[29] !== M || e[30] !== F || e[31] !== w || e[32] !== S ? (B = /* @__PURE__ */ Q(X, { fullWidth: !0, error: M, children: [
|
|
129
|
+
S,
|
|
130
|
+
F,
|
|
131
|
+
w
|
|
132
|
+
] }), e[29] = M, e[30] = F, e[31] = w, e[32] = S, e[33] = B) : B = e[33], B;
|
|
133
|
+
}, Be = {
|
|
134
|
+
Main: we,
|
|
135
|
+
Select: ie
|
|
136
|
+
}, te = [{
|
|
137
|
+
label: "---",
|
|
138
|
+
value: _.serialize(null)
|
|
139
|
+
}, {
|
|
140
|
+
label: "Sim",
|
|
141
|
+
value: _.serialize(!0)
|
|
142
|
+
}, {
|
|
143
|
+
label: "Não",
|
|
144
|
+
value: _.serialize(!1)
|
|
145
|
+
}], et = (d) => {
|
|
146
|
+
const e = R(8);
|
|
147
|
+
let t, o;
|
|
148
|
+
e[0] !== d ? ({
|
|
149
|
+
isOptional: o,
|
|
150
|
+
...t
|
|
151
|
+
} = d, e[0] = d, e[1] = t, e[2] = o) : (t = e[1], o = e[2]);
|
|
152
|
+
const l = o === void 0 ? !1 : o;
|
|
153
|
+
let n;
|
|
154
|
+
e[3] !== l ? (n = l ? te : te.slice(1), e[3] = l, e[4] = n) : n = e[4];
|
|
155
|
+
const i = n;
|
|
156
|
+
let r;
|
|
157
|
+
return e[5] !== i || e[6] !== t ? (r = /* @__PURE__ */ P(Be.Main, { ...t, options: i, transform: _.parse, serialize: _.serialize }), e[5] = i, e[6] = t, e[7] = r) : r = e[7], r;
|
|
158
|
+
}, Y = (d) => {
|
|
159
|
+
const e = R(12), {
|
|
160
|
+
value: t,
|
|
161
|
+
label: o,
|
|
162
|
+
checked: l,
|
|
163
|
+
onChange: n,
|
|
164
|
+
CheckboxProps: i,
|
|
165
|
+
Checkbox: r
|
|
166
|
+
} = d, s = r === void 0 ? he : r;
|
|
167
|
+
let f;
|
|
168
|
+
e[0] !== n || e[1] !== t ? (f = () => {
|
|
169
|
+
n == null || n(t);
|
|
170
|
+
}, e[0] = n, e[1] = t, e[2] = f) : f = e[2];
|
|
171
|
+
const u = f;
|
|
172
|
+
let c;
|
|
173
|
+
e[3] !== s || e[4] !== i || e[5] !== l || e[6] !== u || e[7] !== t ? (c = /* @__PURE__ */ P(s, { value: t, checked: l, onChange: u, ...i }), e[3] = s, e[4] = i, e[5] = l, e[6] = u, e[7] = t, e[8] = c) : c = e[8];
|
|
174
|
+
let a;
|
|
175
|
+
return e[9] !== o || e[10] !== c ? (a = /* @__PURE__ */ P(le, { control: c, label: o }), e[9] = o, e[10] = c, e[11] = a) : a = e[11], a;
|
|
176
|
+
}, Re = (d) => {
|
|
177
|
+
var B;
|
|
178
|
+
const e = R(35), {
|
|
179
|
+
CheckboxProps: t,
|
|
180
|
+
Checkbox: o,
|
|
181
|
+
name: l,
|
|
182
|
+
disabled: n,
|
|
183
|
+
sx: i,
|
|
184
|
+
options: r,
|
|
185
|
+
label: s,
|
|
186
|
+
children: f,
|
|
187
|
+
helperText: u
|
|
188
|
+
} = d, c = o === void 0 ? Y : o, a = E();
|
|
189
|
+
let p;
|
|
190
|
+
e[0] !== a.control || e[1] !== l ? (p = {
|
|
191
|
+
control: a.control,
|
|
192
|
+
name: l
|
|
193
|
+
}, e[0] = a.control, e[1] = l, e[2] = p) : p = e[2];
|
|
194
|
+
const {
|
|
195
|
+
field: m,
|
|
196
|
+
fieldState: b
|
|
197
|
+
} = V(p);
|
|
198
|
+
let h;
|
|
199
|
+
e[3] !== a.control || e[4] !== l ? (h = {
|
|
200
|
+
control: a.control,
|
|
201
|
+
name: l
|
|
202
|
+
}, e[3] = a.control, e[4] = l, e[5] = h) : h = e[5];
|
|
203
|
+
const {
|
|
204
|
+
append: y,
|
|
205
|
+
remove: g
|
|
206
|
+
} = xe(h);
|
|
207
|
+
let k;
|
|
208
|
+
e[6] !== a.control || e[7] !== l ? (k = {
|
|
209
|
+
control: a.control,
|
|
210
|
+
name: l
|
|
211
|
+
}, e[6] = a.control, e[7] = l, e[8] = k) : k = e[8];
|
|
212
|
+
const C = ke(k);
|
|
213
|
+
let x;
|
|
214
|
+
e[9] !== y || e[10] !== C || e[11] !== g ? (x = (D) => {
|
|
215
|
+
C.includes(D) ? g(C.indexOf(D)) : y(D);
|
|
216
|
+
}, e[9] = y, e[10] = C, e[11] = g, e[12] = x) : x = e[12];
|
|
217
|
+
const v = x;
|
|
218
|
+
let T;
|
|
219
|
+
e[13] !== t || e[14] !== n || e[15] !== m || e[16] !== v || e[17] !== i ? (T = (D) => {
|
|
220
|
+
const I = m.value || [];
|
|
221
|
+
return {
|
|
222
|
+
CheckboxProps: t,
|
|
223
|
+
checked: I.includes(D.value),
|
|
224
|
+
disabled: D.disabled || n,
|
|
225
|
+
label: D.label,
|
|
226
|
+
onChange: v,
|
|
227
|
+
sx: i,
|
|
228
|
+
value: D.value
|
|
229
|
+
};
|
|
230
|
+
}, e[13] = t, e[14] = n, e[15] = m, e[16] = v, e[17] = i, e[18] = T) : T = e[18];
|
|
231
|
+
const A = T, M = b.error !== void 0, O = ((B = b.error) == null ? void 0 : B.message) ?? u;
|
|
232
|
+
let S;
|
|
233
|
+
e[19] !== s ? (S = s && typeof s == "string" ? /* @__PURE__ */ P(ne, { component: "legend", children: s }) : s ?? null, e[19] = s, e[20] = S) : S = e[20];
|
|
234
|
+
let $;
|
|
235
|
+
e[21] !== c || e[22] !== A || e[23] !== f || e[24] !== r ? ($ = f ? f({
|
|
236
|
+
buildProps: A,
|
|
237
|
+
options: r
|
|
238
|
+
}) : r.map((D, I) => /* @__PURE__ */ P(c, { ...A(D) }, `${D.value}-${I}`)), e[21] = c, e[22] = A, e[23] = f, e[24] = r, e[25] = $) : $ = e[25];
|
|
239
|
+
let z;
|
|
240
|
+
e[26] !== $ ? (z = /* @__PURE__ */ P(se, { children: $ }), e[26] = $, e[27] = z) : z = e[27];
|
|
241
|
+
let F;
|
|
242
|
+
e[28] !== O ? (F = O ? /* @__PURE__ */ P(U, { children: O }) : null, e[28] = O, e[29] = F) : F = e[29];
|
|
243
|
+
let w;
|
|
244
|
+
return e[30] !== M || e[31] !== F || e[32] !== S || e[33] !== z ? (w = /* @__PURE__ */ Q(X, { fullWidth: !0, error: M, children: [
|
|
245
|
+
S,
|
|
246
|
+
z,
|
|
247
|
+
F
|
|
248
|
+
] }), e[30] = M, e[31] = F, e[32] = S, e[33] = z, e[34] = w) : w = e[34], w;
|
|
249
|
+
}, Ie = (d) => {
|
|
250
|
+
const e = R(15), {
|
|
251
|
+
Checkbox: t,
|
|
252
|
+
CheckboxProps: o,
|
|
253
|
+
name: l,
|
|
254
|
+
label: n,
|
|
255
|
+
value: i,
|
|
256
|
+
disabled: r,
|
|
257
|
+
sx: s
|
|
258
|
+
} = d, f = t === void 0 ? Y : t, u = E();
|
|
259
|
+
let c;
|
|
260
|
+
e[0] !== u.control || e[1] !== l ? (c = {
|
|
261
|
+
control: u.control,
|
|
262
|
+
name: l
|
|
263
|
+
}, e[0] = u.control, e[1] = l, e[2] = c) : c = e[2];
|
|
264
|
+
const {
|
|
265
|
+
field: a
|
|
266
|
+
} = V(c);
|
|
267
|
+
let p;
|
|
268
|
+
e[3] !== a || e[4] !== i ? (p = () => {
|
|
269
|
+
a.onChange(a.value !== i ? i : void 0);
|
|
270
|
+
}, e[3] = a, e[4] = i, e[5] = p) : p = e[5];
|
|
271
|
+
const m = p, b = a.value === i;
|
|
272
|
+
let h;
|
|
273
|
+
return e[6] !== f || e[7] !== o || e[8] !== r || e[9] !== n || e[10] !== m || e[11] !== s || e[12] !== b || e[13] !== i ? (h = /* @__PURE__ */ P(f, { CheckboxProps: o, value: i, label: n, checked: b, onChange: m, disabled: r, sx: s }), e[6] = f, e[7] = o, e[8] = r, e[9] = n, e[10] = m, e[11] = s, e[12] = b, e[13] = i, e[14] = h) : h = e[14], h;
|
|
274
|
+
}, tt = {
|
|
275
|
+
Checkbox: Y,
|
|
276
|
+
Group: Re,
|
|
277
|
+
Main: Ie
|
|
278
|
+
}, J = (d) => {
|
|
279
|
+
const e = R(34);
|
|
280
|
+
let t, o, l, n, i, r, s, f, u, c, a, p;
|
|
281
|
+
e[0] !== d ? ({
|
|
282
|
+
hasErrors: f,
|
|
283
|
+
format: u,
|
|
284
|
+
ampm: c,
|
|
285
|
+
views: a,
|
|
286
|
+
errorMessage: o,
|
|
287
|
+
forwardRef: l,
|
|
288
|
+
value: p,
|
|
289
|
+
onChange: r,
|
|
290
|
+
fullWidth: n,
|
|
291
|
+
slotProps: s,
|
|
292
|
+
helperText: i,
|
|
293
|
+
...t
|
|
294
|
+
} = d, e[0] = d, e[1] = t, e[2] = o, e[3] = l, e[4] = n, e[5] = i, e[6] = r, e[7] = s, e[8] = f, e[9] = u, e[10] = c, e[11] = a, e[12] = p) : (t = e[1], o = e[2], l = e[3], n = e[4], i = e[5], r = e[6], s = e[7], f = e[8], u = e[9], c = e[10], a = e[11], p = e[12]);
|
|
295
|
+
const m = f === void 0 ? !1 : f, b = u === void 0 ? "dd/MM/yyyy HH:mm" : u, h = c === void 0 ? !1 : c;
|
|
296
|
+
let y;
|
|
297
|
+
e[13] !== a ? (y = a === void 0 ? ["year", "month", "day", "hours", "minutes"] : a, e[13] = a, e[14] = y) : y = e[14];
|
|
298
|
+
const g = y;
|
|
299
|
+
let k;
|
|
300
|
+
e[15] !== n || e[16] !== s ? (k = s != null && s.textField ? s.textField : {
|
|
301
|
+
fullWidth: n,
|
|
302
|
+
size: "small",
|
|
303
|
+
variant: "standard"
|
|
304
|
+
}, e[15] = n, e[16] = s, e[17] = k) : k = e[17];
|
|
305
|
+
const C = m ? o : i;
|
|
306
|
+
let x;
|
|
307
|
+
e[18] !== l || e[19] !== m || e[20] !== k || e[21] !== C ? (x = {
|
|
308
|
+
...k,
|
|
309
|
+
error: m,
|
|
310
|
+
helperText: C,
|
|
311
|
+
inputRef: l
|
|
312
|
+
}, e[18] = l, e[19] = m, e[20] = k, e[21] = C, e[22] = x) : x = e[22];
|
|
313
|
+
let v;
|
|
314
|
+
e[23] !== s || e[24] !== x ? (v = {
|
|
315
|
+
...s,
|
|
316
|
+
textField: x
|
|
317
|
+
}, e[23] = s, e[24] = x, e[25] = v) : v = e[25];
|
|
318
|
+
let T;
|
|
319
|
+
return e[26] !== h || e[27] !== t || e[28] !== b || e[29] !== r || e[30] !== v || e[31] !== p || e[32] !== g ? (T = /* @__PURE__ */ P(Te, { ...t, value: p, onChange: r, format: b, ampm: h, views: g, slotProps: v }), e[26] = h, e[27] = t, e[28] = b, e[29] = r, e[30] = v, e[31] = p, e[32] = g, e[33] = T) : T = e[33], T;
|
|
320
|
+
}, Le = (d) => {
|
|
321
|
+
const e = R(10);
|
|
322
|
+
let t, o, l;
|
|
323
|
+
e[0] !== d ? ({
|
|
324
|
+
views: o,
|
|
325
|
+
format: l,
|
|
326
|
+
...t
|
|
327
|
+
} = d, e[0] = d, e[1] = t, e[2] = o, e[3] = l) : (t = e[1], o = e[2], l = e[3]);
|
|
328
|
+
let n;
|
|
329
|
+
e[4] !== o ? (n = o === void 0 ? ["year", "month", "day"] : o, e[4] = o, e[5] = n) : n = e[5];
|
|
330
|
+
const i = n, r = l === void 0 ? "dd/MM/yyyy" : l;
|
|
331
|
+
let s;
|
|
332
|
+
return e[6] !== r || e[7] !== t || e[8] !== i ? (s = /* @__PURE__ */ P(J, { views: i, format: r, ...t }), e[6] = r, e[7] = t, e[8] = i, e[9] = s) : s = e[9], s;
|
|
333
|
+
}, We = (d) => {
|
|
334
|
+
const e = R(10);
|
|
335
|
+
let t, o, l;
|
|
336
|
+
e[0] !== d ? ({
|
|
337
|
+
views: o,
|
|
338
|
+
format: l,
|
|
339
|
+
...t
|
|
340
|
+
} = d, e[0] = d, e[1] = t, e[2] = o, e[3] = l) : (t = e[1], o = e[2], l = e[3]);
|
|
341
|
+
let n;
|
|
342
|
+
e[4] !== o ? (n = o === void 0 ? ["hours", "minutes"] : o, e[4] = o, e[5] = n) : n = e[5];
|
|
343
|
+
const i = n, r = l === void 0 ? "HH:mm" : l;
|
|
344
|
+
let s;
|
|
345
|
+
return e[6] !== r || e[7] !== t || e[8] !== i ? (s = /* @__PURE__ */ P(J, { views: i, format: r, ...t }), e[6] = r, e[7] = t, e[8] = i, e[9] = s) : s = e[9], s;
|
|
346
|
+
}, Ee = (d) => {
|
|
347
|
+
var x;
|
|
348
|
+
const e = R(18), {
|
|
349
|
+
DateTimePicker: t,
|
|
350
|
+
DateTimePickerProps: o,
|
|
351
|
+
name: l,
|
|
352
|
+
sx: n,
|
|
353
|
+
fullWidth: i,
|
|
354
|
+
label: r,
|
|
355
|
+
helperText: s
|
|
356
|
+
} = d, f = t === void 0 ? J : t;
|
|
357
|
+
let u;
|
|
358
|
+
e[0] !== o ? (u = o === void 0 ? {} : o, e[0] = o, e[1] = u) : u = e[1];
|
|
359
|
+
const c = u, a = E();
|
|
360
|
+
let p;
|
|
361
|
+
e[2] !== a.control || e[3] !== l ? (p = {
|
|
362
|
+
control: a.control,
|
|
363
|
+
name: l
|
|
364
|
+
}, e[2] = a.control, e[3] = l, e[4] = p) : p = e[4];
|
|
365
|
+
const {
|
|
366
|
+
field: m,
|
|
367
|
+
fieldState: b
|
|
368
|
+
} = V(p);
|
|
369
|
+
let h;
|
|
370
|
+
e[5] !== m ? (h = (v) => {
|
|
371
|
+
m.onChange(v);
|
|
372
|
+
}, e[5] = m, e[6] = h) : h = e[6];
|
|
373
|
+
const y = h, g = b.error !== void 0, k = (x = b.error) == null ? void 0 : x.message;
|
|
374
|
+
let C;
|
|
375
|
+
return e[7] !== f || e[8] !== c || e[9] !== m.value || e[10] !== i || e[11] !== y || e[12] !== s || e[13] !== r || e[14] !== n || e[15] !== g || e[16] !== k ? (C = /* @__PURE__ */ P(f, { ...c, value: m.value, hasErrors: g, errorMessage: k, onChange: y, sx: n, fullWidth: i, label: r, helperText: s }), e[7] = f, e[8] = c, e[9] = m.value, e[10] = i, e[11] = y, e[12] = s, e[13] = r, e[14] = n, e[15] = g, e[16] = k, e[17] = C) : C = e[17], C;
|
|
376
|
+
}, ot = {
|
|
377
|
+
DatePicker: Le,
|
|
378
|
+
DateTimePicker: J,
|
|
379
|
+
Main: Ee,
|
|
380
|
+
TimePicker: We
|
|
381
|
+
}, ae = oe, Ve = (d) => {
|
|
382
|
+
var w;
|
|
383
|
+
const e = R(22), {
|
|
384
|
+
Input: t,
|
|
385
|
+
InputProps: o,
|
|
386
|
+
name: l,
|
|
387
|
+
label: n,
|
|
388
|
+
placeholder: i,
|
|
389
|
+
helperText: r,
|
|
390
|
+
sx: s,
|
|
391
|
+
applyMask: f,
|
|
392
|
+
removeMask: u,
|
|
393
|
+
transform: c,
|
|
394
|
+
serialize: a
|
|
395
|
+
} = d, p = t === void 0 ? ae : t, m = f === void 0 ? N : f, b = u === void 0 ? N : u, h = c === void 0 ? N : c, y = a === void 0 ? String : a, g = E();
|
|
396
|
+
let k;
|
|
397
|
+
e[0] !== g.control || e[1] !== l ? (k = {
|
|
398
|
+
control: g.control,
|
|
399
|
+
name: l
|
|
400
|
+
}, e[0] = g.control, e[1] = l, e[2] = k) : k = e[2];
|
|
401
|
+
const {
|
|
402
|
+
field: C,
|
|
403
|
+
fieldState: x
|
|
404
|
+
} = V(k);
|
|
405
|
+
let v;
|
|
406
|
+
e[3] !== C || e[4] !== b || e[5] !== h ? (v = (B) => {
|
|
407
|
+
const D = B.target.value, I = b(D), L = h(I);
|
|
408
|
+
C.onChange(L);
|
|
409
|
+
}, e[3] = C, e[4] = b, e[5] = h, e[6] = v) : v = e[6];
|
|
410
|
+
const T = v, A = C.value;
|
|
411
|
+
let M;
|
|
412
|
+
if (e[7] !== m || e[8] !== y || e[9] !== A) {
|
|
413
|
+
const B = y(A);
|
|
414
|
+
M = m(B), e[7] = m, e[8] = y, e[9] = A, e[10] = M;
|
|
415
|
+
} else
|
|
416
|
+
M = e[10];
|
|
417
|
+
const S = M, $ = x.error !== void 0, z = ((w = x.error) == null ? void 0 : w.message) ?? r;
|
|
418
|
+
let F;
|
|
419
|
+
return e[11] !== p || e[12] !== o || e[13] !== C.onBlur || e[14] !== n || e[15] !== S || e[16] !== T || e[17] !== i || e[18] !== s || e[19] !== z || e[20] !== $ ? (F = /* @__PURE__ */ P(p, { value: S, onBlur: C.onBlur, fullWidth: !0, ...o, error: $, helperText: z, onChange: T, label: n, placeholder: i, sx: s }), e[11] = p, e[12] = o, e[13] = C.onBlur, e[14] = n, e[15] = S, e[16] = T, e[17] = i, e[18] = s, e[19] = z, e[20] = $, e[21] = F) : F = e[21], F;
|
|
420
|
+
}, Z = {
|
|
421
|
+
Input: ae,
|
|
422
|
+
Main: Ve
|
|
423
|
+
}, lt = (d) => {
|
|
424
|
+
const e = R(8);
|
|
425
|
+
let t, o;
|
|
426
|
+
e[0] !== d ? ({
|
|
427
|
+
InputProps: t,
|
|
428
|
+
...o
|
|
429
|
+
} = d, e[0] = d, e[1] = t, e[2] = o) : (t = e[1], o = e[2]);
|
|
430
|
+
let l;
|
|
431
|
+
e[3] !== t ? (l = {
|
|
432
|
+
...t,
|
|
433
|
+
autoCapitalize: "none",
|
|
434
|
+
autoComplete: "email"
|
|
435
|
+
}, e[3] = t, e[4] = l) : l = e[4];
|
|
436
|
+
let n;
|
|
437
|
+
return e[5] !== o || e[6] !== l ? (n = /* @__PURE__ */ P(Z.Main, { ...o, InputProps: l }), e[5] = o, e[6] = l, e[7] = n) : n = e[7], n;
|
|
438
|
+
}, nt = (d) => {
|
|
439
|
+
var p;
|
|
440
|
+
const e = R(16);
|
|
441
|
+
let t, o, l;
|
|
442
|
+
e[0] !== d ? ({
|
|
443
|
+
InputProps: t,
|
|
444
|
+
hideNumberArrows: l,
|
|
445
|
+
...o
|
|
446
|
+
} = d, e[0] = d, e[1] = t, e[2] = o, e[3] = l) : (t = e[1], o = e[2], l = e[3]);
|
|
447
|
+
const n = l === void 0 ? !1 : l, i = t == null ? void 0 : t.slotProps, r = n ? "text" : "number", s = (p = t == null ? void 0 : t.slotProps) == null ? void 0 : p.input;
|
|
448
|
+
let f;
|
|
449
|
+
e[4] !== r || e[5] !== s ? (f = {
|
|
450
|
+
type: r,
|
|
451
|
+
...s
|
|
452
|
+
}, e[4] = r, e[5] = s, e[6] = f) : f = e[6];
|
|
453
|
+
let u;
|
|
454
|
+
e[7] !== i || e[8] !== f ? (u = {
|
|
455
|
+
...i,
|
|
456
|
+
input: f
|
|
457
|
+
}, e[7] = i, e[8] = f, e[9] = u) : u = e[9];
|
|
458
|
+
let c;
|
|
459
|
+
e[10] !== t || e[11] !== u ? (c = {
|
|
460
|
+
...t,
|
|
461
|
+
slotProps: u
|
|
462
|
+
}, e[10] = t, e[11] = u, e[12] = c) : c = e[12];
|
|
463
|
+
let a;
|
|
464
|
+
return e[13] !== o || e[14] !== c ? (a = /* @__PURE__ */ P(Z.Main, { transform: ee.parse, serialize: ee.serialize, InputProps: c, ...o }), e[13] = o, e[14] = c, e[15] = a) : a = e[15], a;
|
|
465
|
+
}, st = (d) => {
|
|
466
|
+
var b;
|
|
467
|
+
const e = R(21);
|
|
468
|
+
let t, o;
|
|
469
|
+
e[0] !== d ? ({
|
|
470
|
+
InputProps: t,
|
|
471
|
+
...o
|
|
472
|
+
} = d, e[0] = d, e[1] = t, e[2] = o) : (t = e[1], o = e[2]);
|
|
473
|
+
const {
|
|
474
|
+
isOpen: l,
|
|
475
|
+
toggle: n
|
|
476
|
+
} = ye(!0), i = t == null ? void 0 : t.slotProps;
|
|
477
|
+
let r;
|
|
478
|
+
e[3] !== l ? (r = l ? /* @__PURE__ */ P($e, {}) : /* @__PURE__ */ P(Me, {}), e[3] = l, e[4] = r) : r = e[4];
|
|
479
|
+
let s;
|
|
480
|
+
e[5] !== r || e[6] !== n ? (s = /* @__PURE__ */ P(ve, { position: "end", children: /* @__PURE__ */ P(be, { onClick: n, edge: "end", children: r }) }), e[5] = r, e[6] = n, e[7] = s) : s = e[7];
|
|
481
|
+
const f = (b = t == null ? void 0 : t.slotProps) == null ? void 0 : b.input;
|
|
482
|
+
let u;
|
|
483
|
+
e[8] !== s || e[9] !== f ? (u = {
|
|
484
|
+
endAdornment: s,
|
|
485
|
+
...f
|
|
486
|
+
}, e[8] = s, e[9] = f, e[10] = u) : u = e[10];
|
|
487
|
+
let c;
|
|
488
|
+
e[11] !== i || e[12] !== u ? (c = {
|
|
489
|
+
...i,
|
|
490
|
+
input: u
|
|
491
|
+
}, e[11] = i, e[12] = u, e[13] = c) : c = e[13];
|
|
492
|
+
const a = l ? "password" : "text";
|
|
493
|
+
let p;
|
|
494
|
+
e[14] !== t || e[15] !== c || e[16] !== a ? (p = {
|
|
495
|
+
...t,
|
|
496
|
+
autoCapitalize: "none",
|
|
497
|
+
autoComplete: "current-password",
|
|
498
|
+
slotProps: c,
|
|
499
|
+
type: a
|
|
500
|
+
}, e[14] = t, e[15] = c, e[16] = a, e[17] = p) : p = e[17];
|
|
501
|
+
let m;
|
|
502
|
+
return e[18] !== o || e[19] !== p ? (m = /* @__PURE__ */ P(Z.Main, { ...o, InputProps: p }), e[18] = o, e[19] = p, e[20] = m) : m = e[20], m;
|
|
503
|
+
}, ce = (d) => {
|
|
504
|
+
const e = R(12), {
|
|
505
|
+
value: t,
|
|
506
|
+
label: o,
|
|
507
|
+
checked: l,
|
|
508
|
+
onChange: n,
|
|
509
|
+
RadioProps: i,
|
|
510
|
+
Radio: r
|
|
511
|
+
} = d, s = r === void 0 ? Ce : r;
|
|
512
|
+
let f;
|
|
513
|
+
e[0] !== n || e[1] !== t ? (f = () => {
|
|
514
|
+
n == null || n(t);
|
|
515
|
+
}, e[0] = n, e[1] = t, e[2] = f) : f = e[2];
|
|
516
|
+
const u = f;
|
|
517
|
+
let c;
|
|
518
|
+
e[3] !== s || e[4] !== i || e[5] !== l || e[6] !== u || e[7] !== t ? (c = /* @__PURE__ */ P(s, { value: t, checked: l, onChange: u, ...i }), e[3] = s, e[4] = i, e[5] = l, e[6] = u, e[7] = t, e[8] = c) : c = e[8];
|
|
519
|
+
let a;
|
|
520
|
+
return e[9] !== o || e[10] !== c ? (a = /* @__PURE__ */ P(le, { control: c, label: o }), e[9] = o, e[10] = c, e[11] = a) : a = e[11], a;
|
|
521
|
+
}, Ge = (d) => {
|
|
522
|
+
var S;
|
|
523
|
+
const e = R(27), {
|
|
524
|
+
RadioProps: t,
|
|
525
|
+
Radio: o,
|
|
526
|
+
name: l,
|
|
527
|
+
disabled: n,
|
|
528
|
+
sx: i,
|
|
529
|
+
options: r,
|
|
530
|
+
label: s,
|
|
531
|
+
helperText: f,
|
|
532
|
+
children: u
|
|
533
|
+
} = d, c = o === void 0 ? ce : o, a = E();
|
|
534
|
+
let p;
|
|
535
|
+
e[0] !== a.control || e[1] !== l ? (p = {
|
|
536
|
+
control: a.control,
|
|
537
|
+
name: l
|
|
538
|
+
}, e[0] = a.control, e[1] = l, e[2] = p) : p = e[2];
|
|
539
|
+
const {
|
|
540
|
+
field: m,
|
|
541
|
+
fieldState: b
|
|
542
|
+
} = V(p);
|
|
543
|
+
let h;
|
|
544
|
+
e[3] !== m ? (h = ($) => {
|
|
545
|
+
m.onChange($);
|
|
546
|
+
}, e[3] = m, e[4] = h) : h = e[4];
|
|
547
|
+
const y = h;
|
|
548
|
+
let g;
|
|
549
|
+
e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== y || e[9] !== i ? (g = ($) => ({
|
|
550
|
+
RadioProps: t,
|
|
551
|
+
checked: m.value === $.value,
|
|
552
|
+
disabled: $.disabled || n,
|
|
553
|
+
label: $.label,
|
|
554
|
+
onChange: y,
|
|
555
|
+
sx: i,
|
|
556
|
+
value: $.value
|
|
557
|
+
}), e[5] = t, e[6] = n, e[7] = m, e[8] = y, e[9] = i, e[10] = g) : g = e[10];
|
|
558
|
+
const k = g, C = b.error !== void 0, x = ((S = b.error) == null ? void 0 : S.message) ?? f;
|
|
559
|
+
let v;
|
|
560
|
+
e[11] !== s ? (v = s && typeof s == "string" ? /* @__PURE__ */ P(ne, { component: "legend", children: s }) : s ?? null, e[11] = s, e[12] = v) : v = e[12];
|
|
561
|
+
let T;
|
|
562
|
+
e[13] !== c || e[14] !== k || e[15] !== u || e[16] !== r ? (T = u ? u({
|
|
563
|
+
buildProps: k,
|
|
564
|
+
options: r
|
|
565
|
+
}) : r.map(($, z) => /* @__PURE__ */ P(c, { ...k($) }, `${$.value}-${z}`)), e[13] = c, e[14] = k, e[15] = u, e[16] = r, e[17] = T) : T = e[17];
|
|
566
|
+
let A;
|
|
567
|
+
e[18] !== T ? (A = /* @__PURE__ */ P(se, { children: T }), e[18] = T, e[19] = A) : A = e[19];
|
|
568
|
+
let M;
|
|
569
|
+
e[20] !== x ? (M = x ? /* @__PURE__ */ P(U, { children: x }) : null, e[20] = x, e[21] = M) : M = e[21];
|
|
570
|
+
let O;
|
|
571
|
+
return e[22] !== C || e[23] !== v || e[24] !== A || e[25] !== M ? (O = /* @__PURE__ */ Q(X, { fullWidth: !0, error: C, children: [
|
|
572
|
+
v,
|
|
573
|
+
A,
|
|
574
|
+
M
|
|
575
|
+
] }), e[22] = C, e[23] = v, e[24] = A, e[25] = M, e[26] = O) : O = e[26], O;
|
|
576
|
+
}, rt = {
|
|
577
|
+
Main: Ge,
|
|
578
|
+
Radio: ce
|
|
579
|
+
}, de = ge, He = (d) => {
|
|
580
|
+
const e = R(11), {
|
|
581
|
+
Button: t,
|
|
582
|
+
ButtonProps: o,
|
|
583
|
+
disabled: l,
|
|
584
|
+
loading: n,
|
|
585
|
+
sx: i,
|
|
586
|
+
children: r,
|
|
587
|
+
onSubmit: s,
|
|
588
|
+
showLabelOnLoading: f
|
|
589
|
+
} = d, u = t === void 0 ? de : t, c = f === void 0 ? !1 : f, {
|
|
590
|
+
formState: a,
|
|
591
|
+
handleSubmit: p
|
|
592
|
+
} = E(), m = n || a.isSubmitting, b = l || m || !a.isValid;
|
|
593
|
+
let h;
|
|
594
|
+
e[0] !== p || e[1] !== s ? (h = p(s), e[0] = p, e[1] = s, e[2] = h) : h = e[2];
|
|
595
|
+
const y = m && !c ? "" : r;
|
|
596
|
+
let g;
|
|
597
|
+
return e[3] !== u || e[4] !== o || e[5] !== b || e[6] !== m || e[7] !== i || e[8] !== h || e[9] !== y ? (g = /* @__PURE__ */ P(u, { variant: "contained", ...o, disabled: b, loading: m, onClick: h, sx: i, children: y }), e[3] = u, e[4] = o, e[5] = b, e[6] = m, e[7] = i, e[8] = h, e[9] = y, e[10] = g) : g = e[10], g;
|
|
598
|
+
}, it = {
|
|
599
|
+
Button: de,
|
|
600
|
+
Main: He
|
|
601
|
+
};
|
|
602
|
+
export {
|
|
603
|
+
Ze as AutocompleteField,
|
|
604
|
+
et as BooleanSelectField,
|
|
605
|
+
tt as CheckboxField,
|
|
606
|
+
ot as DateTimeField,
|
|
607
|
+
lt as EmailField,
|
|
608
|
+
nt as NumberField,
|
|
609
|
+
st as PasswordField,
|
|
610
|
+
rt as RadioField,
|
|
611
|
+
Be as SelectField,
|
|
612
|
+
it as SubmitButton,
|
|
613
|
+
Z as TextField
|
|
614
|
+
};
|
package/dist/errors.cjs.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
2
|
-
details: ${JSON.stringify(this.details)}`:"";return`Error: ${this.message}${e}`}}var n=(r=>(r.AuthenticationError="UNAUTHENTICATED",r.ForbiddenError="FORBIDDEN",r.PersistedQueryNotFoundError="PERSISTED_QUERY_NOT_FOUND",r.PersistedQueryNotSupportedError="PERSISTED_QUERY_NOT_SUPPORTED",r.SyntaxError="GRAPHQL_PARSE_FAILED",r.UserInputError="BAD_USER_INPUT",r.ValidationError="GRAPHQL_VALIDATION_FAILED",r))(n||{}),i=(r=>(r.Generic="graphql_service_error",r.Parsing="graphql_parsing",r))(i||{});const E=new Set(["graphql_service_error","graphql_parsing"]);class _ extends o{constructor({code:e="graphql_service_error",message:t}){super({message:t}),this.code=e}}var c=(r=>(r.Generic="http_service_error",r.NoConnection="no_connection",r.Unauthorized="unauthorized",r))(c||{});const a=new Set(["http_service_error","no_connection","unauthorized"]);class d extends o{constructor({code:e="http_service_error",details:t,message:s}){super({message:s}),this.details=t,this.code=e}}class u extends o{constructor({message:e}){super({code:"http_handling_error",message:e})}}class S extends o{constructor({message:e}){super({code:"http_client_side_error",message:e})}}exports.BaseError=o;exports.GRAPHQL_SERIVCE_ERROR_CODES=E;exports.GraphQLErrors=n;exports.GraphQLServiceError=_;exports.GraphQLServiceErrorCode=i;exports.HTTP_SERVICE_ERROR_CODES=a;exports.HttpClientSideError=S;exports.HttpResponseHandlingError=u;exports.HttpServiceError=d;exports.HttpServiceErrorCode=c;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/http.error.0pMVpraj.js");var t=(r=>(r.AuthenticationError="UNAUTHENTICATED",r.ForbiddenError="FORBIDDEN",r.PersistedQueryNotFoundError="PERSISTED_QUERY_NOT_FOUND",r.PersistedQueryNotSupportedError="PERSISTED_QUERY_NOT_SUPPORTED",r.SyntaxError="GRAPHQL_PARSE_FAILED",r.UserInputError="BAD_USER_INPUT",r.ValidationError="GRAPHQL_VALIDATION_FAILED",r))(t||{}),E=(r=>(r.Generic="graphql_service_error",r.Parsing="graphql_parsing",r))(E||{});const i=new Set(["graphql_service_error","graphql_parsing"]);class R extends e.BaseError{constructor({code:o="graphql_service_error",message:_}){super({message:_}),this.code=o}}exports.BaseError=e.BaseError;exports.HTTP_SERVICE_ERROR_CODES=e.HTTP_SERVICE_ERROR_CODES;exports.HttpClientSideError=e.HttpClientSideError;exports.HttpResponseHandlingError=e.HttpResponseHandlingError;exports.HttpServiceError=e.HttpServiceError;exports.HttpServiceErrorCode=e.HttpServiceErrorCode;exports.GRAPHQL_SERIVCE_ERROR_CODES=i;exports.GraphQLErrors=t;exports.GraphQLServiceError=R;exports.GraphQLServiceErrorCode=E;
|