@data-c/ui 0.2.81 → 0.2.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +118 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2350,7 +2350,7 @@ function Editable(props) {
|
|
|
2350
2350
|
error
|
|
2351
2351
|
} = props;
|
|
2352
2352
|
const {
|
|
2353
|
-
InputProps:
|
|
2353
|
+
InputProps: _,
|
|
2354
2354
|
value: __,
|
|
2355
2355
|
onKeyDown: ___,
|
|
2356
2356
|
onChange: ____,
|
|
@@ -2453,11 +2453,11 @@ function Editable(props) {
|
|
|
2453
2453
|
// src/SearchTextField/index.tsx
|
|
2454
2454
|
|
|
2455
2455
|
|
|
2456
|
-
var
|
|
2456
|
+
var _debounce = require('lodash/debounce'); var _debounce2 = _interopRequireDefault(_debounce);
|
|
2457
2457
|
|
|
2458
2458
|
function SearchTextField(props) {
|
|
2459
2459
|
const { onSearch, ...rest } = props;
|
|
2460
|
-
const debouncedHandleChange =
|
|
2460
|
+
const debouncedHandleChange = _debounce2.default.call(void 0, (query) => onSearch(query), 500);
|
|
2461
2461
|
function handleChange(event) {
|
|
2462
2462
|
const value = event.target.value;
|
|
2463
2463
|
debouncedHandleChange(value);
|
|
@@ -2741,7 +2741,7 @@ var ValidationError = class extends Error {
|
|
|
2741
2741
|
originalPath: params.path
|
|
2742
2742
|
});
|
|
2743
2743
|
if (typeof message === "string")
|
|
2744
|
-
return message.replace(strReg, (
|
|
2744
|
+
return message.replace(strReg, (_, key2) => printValue(params[key2]));
|
|
2745
2745
|
if (typeof message === "function")
|
|
2746
2746
|
return message(params);
|
|
2747
2747
|
return message;
|
|
@@ -3505,7 +3505,7 @@ attempted value: ${formattedValue}
|
|
|
3505
3505
|
[isIndex ? "index" : "key"]: k,
|
|
3506
3506
|
path: isIndex || k.includes(".") ? `${parentPath || ""}[${isIndex ? k : `"${k}"`}]` : (parentPath ? `${parentPath}.` : "") + key2
|
|
3507
3507
|
});
|
|
3508
|
-
return (
|
|
3508
|
+
return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);
|
|
3509
3509
|
}
|
|
3510
3510
|
validate(value, options) {
|
|
3511
3511
|
var _options$disableStack2;
|
|
@@ -4434,7 +4434,7 @@ function sortByKeyOrder(keys) {
|
|
|
4434
4434
|
return findIndex(keys, a) - findIndex(keys, b);
|
|
4435
4435
|
};
|
|
4436
4436
|
}
|
|
4437
|
-
var parseJson = (value,
|
|
4437
|
+
var parseJson = (value, _, schema6) => {
|
|
4438
4438
|
if (typeof value !== "string") {
|
|
4439
4439
|
return value;
|
|
4440
4440
|
}
|
|
@@ -5256,7 +5256,7 @@ function DialogRoot({
|
|
|
5256
5256
|
"& .MuiBackdrop-root": {
|
|
5257
5257
|
backgroundColor: "#6464648F"
|
|
5258
5258
|
},
|
|
5259
|
-
..._optionalChain([rest, 'optionalAccess',
|
|
5259
|
+
..._optionalChain([rest, 'optionalAccess', _2 => _2.sx])
|
|
5260
5260
|
},
|
|
5261
5261
|
PaperProps: {
|
|
5262
5262
|
style: {
|
|
@@ -5493,7 +5493,7 @@ function AlterarSenha(props) {
|
|
|
5493
5493
|
if (onFailed)
|
|
5494
5494
|
onFailed(error2);
|
|
5495
5495
|
if (_axios.isAxiosError.call(void 0, error2)) {
|
|
5496
|
-
setError(_optionalChain([error2, 'access',
|
|
5496
|
+
setError(_optionalChain([error2, 'access', _3 => _3.response, 'optionalAccess', _4 => _4.data, 'access', _5 => _5.message]));
|
|
5497
5497
|
return;
|
|
5498
5498
|
}
|
|
5499
5499
|
setError("Ocorreu um erro ao tentar alterar a senha");
|
|
@@ -5503,37 +5503,37 @@ function AlterarSenha(props) {
|
|
|
5503
5503
|
});
|
|
5504
5504
|
}
|
|
5505
5505
|
function tem8caracteres() {
|
|
5506
|
-
return _optionalChain([data, 'optionalAccess',
|
|
5506
|
+
return _optionalChain([data, 'optionalAccess', _6 => _6.senhaNova, 'access', _7 => _7.length]) >= 8;
|
|
5507
5507
|
}
|
|
5508
5508
|
function temLetraMinuscula() {
|
|
5509
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5510
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5509
|
+
if (_optionalChain([data, 'optionalAccess', _8 => _8.senhaNova])) {
|
|
5510
|
+
const result = _optionalChain([data, 'optionalAccess', _9 => _9.senhaNova, 'access', _10 => _10.match, 'call', _11 => _11(/[a-z]/g)]);
|
|
5511
5511
|
return Array.isArray(result) && result.length > 0;
|
|
5512
5512
|
}
|
|
5513
5513
|
return false;
|
|
5514
5514
|
}
|
|
5515
5515
|
function temLetraMaisucula() {
|
|
5516
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5517
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5516
|
+
if (_optionalChain([data, 'optionalAccess', _12 => _12.senhaNova])) {
|
|
5517
|
+
const result = _optionalChain([data, 'optionalAccess', _13 => _13.senhaNova, 'access', _14 => _14.match, 'call', _15 => _15(/[A-Z]/g)]);
|
|
5518
5518
|
return Array.isArray(result) && result.length > 0;
|
|
5519
5519
|
}
|
|
5520
5520
|
return false;
|
|
5521
5521
|
}
|
|
5522
5522
|
function temNumero() {
|
|
5523
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5524
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5523
|
+
if (_optionalChain([data, 'optionalAccess', _16 => _16.senhaNova])) {
|
|
5524
|
+
const result = _optionalChain([data, 'optionalAccess', _17 => _17.senhaNova, 'access', _18 => _18.match, 'call', _19 => _19(/\d/g)]);
|
|
5525
5525
|
return Array.isArray(result) && result.length > 0;
|
|
5526
5526
|
}
|
|
5527
5527
|
return false;
|
|
5528
5528
|
}
|
|
5529
5529
|
function temCaracterEspecial() {
|
|
5530
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5531
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5530
|
+
if (_optionalChain([data, 'optionalAccess', _20 => _20.senhaNova])) {
|
|
5531
|
+
const result = _optionalChain([data, 'optionalAccess', _21 => _21.senhaNova, 'access', _22 => _22.match, 'call', _23 => _23(/\W/g)]);
|
|
5532
5532
|
return Array.isArray(result) && result.length > 0;
|
|
5533
5533
|
}
|
|
5534
5534
|
return false;
|
|
5535
5535
|
}
|
|
5536
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open: isOpen, onClose: (
|
|
5536
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open: isOpen, onClose: (_) => onClose(), maxWidth: "md", children: [
|
|
5537
5537
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Header, { children: [
|
|
5538
5538
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.Title, { children: "Alterar Senha" }),
|
|
5539
5539
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.ActionClose, { onClose })
|
|
@@ -5549,7 +5549,7 @@ function AlterarSenha(props) {
|
|
|
5549
5549
|
{
|
|
5550
5550
|
name: "senhaAtual",
|
|
5551
5551
|
label: "Senha Atual",
|
|
5552
|
-
value: _optionalChain([data, 'optionalAccess',
|
|
5552
|
+
value: _optionalChain([data, 'optionalAccess', _24 => _24.senhaAtual]) || "",
|
|
5553
5553
|
onChange: handleChange,
|
|
5554
5554
|
...validationProps("senhaAtual")
|
|
5555
5555
|
}
|
|
@@ -5559,7 +5559,7 @@ function AlterarSenha(props) {
|
|
|
5559
5559
|
{
|
|
5560
5560
|
name: "senhaNova",
|
|
5561
5561
|
label: "Nova Senha",
|
|
5562
|
-
value: _optionalChain([data, 'optionalAccess',
|
|
5562
|
+
value: _optionalChain([data, 'optionalAccess', _25 => _25.senhaNova]) || "",
|
|
5563
5563
|
onChange: handleChange,
|
|
5564
5564
|
...validationProps("senhaNova")
|
|
5565
5565
|
}
|
|
@@ -5647,11 +5647,11 @@ function LoginForm(props) {
|
|
|
5647
5647
|
} catch (err) {
|
|
5648
5648
|
if (_axios.isAxiosError.call(void 0, err)) {
|
|
5649
5649
|
const axiosError = err;
|
|
5650
|
-
if (_optionalChain([axiosError, 'access',
|
|
5650
|
+
if (_optionalChain([axiosError, 'access', _26 => _26.response, 'optionalAccess', _27 => _27.data, 'access', _28 => _28.code]) === "E_FIRST_ACCESS") {
|
|
5651
5651
|
setExibirAlterarSenha(true);
|
|
5652
5652
|
return;
|
|
5653
5653
|
}
|
|
5654
|
-
setError(_optionalChain([err, 'access',
|
|
5654
|
+
setError(_optionalChain([err, 'access', _29 => _29.response, 'optionalAccess', _30 => _30.data, 'access', _31 => _31.message]));
|
|
5655
5655
|
}
|
|
5656
5656
|
onLoginFailed(err);
|
|
5657
5657
|
}
|
|
@@ -5813,7 +5813,7 @@ function EsqueciSenhaForm(props) {
|
|
|
5813
5813
|
await recuperarSenha(email);
|
|
5814
5814
|
setSucessoRecuperarSenha(true);
|
|
5815
5815
|
} catch (error2) {
|
|
5816
|
-
setError(_optionalChain([error2, 'access',
|
|
5816
|
+
setError(_optionalChain([error2, 'access', _32 => _32.response, 'optionalAccess', _33 => _33.data, 'access', _34 => _34.message]));
|
|
5817
5817
|
} finally {
|
|
5818
5818
|
setSubmitting(false);
|
|
5819
5819
|
}
|
|
@@ -5905,14 +5905,14 @@ function LicencaForm(props) {
|
|
|
5905
5905
|
const [empresaId, setEmpresaId] = _react.useState.call(void 0, "");
|
|
5906
5906
|
const { selecionarLicenca, isSubmitting } = _hooks.useCredentials.call(void 0, credentialsConfig);
|
|
5907
5907
|
_react.useEffect.call(void 0, () => {
|
|
5908
|
-
if (Array.isArray(_optionalChain([loginData, 'optionalAccess',
|
|
5909
|
-
const empresa = _optionalChain([loginData, 'optionalAccess',
|
|
5910
|
-
setEmpresaId(_optionalChain([empresa, 'optionalAccess',
|
|
5908
|
+
if (Array.isArray(_optionalChain([loginData, 'optionalAccess', _35 => _35.empresas]))) {
|
|
5909
|
+
const empresa = _optionalChain([loginData, 'optionalAccess', _36 => _36.empresas, 'access', _37 => _37[0]]);
|
|
5910
|
+
setEmpresaId(_optionalChain([empresa, 'optionalAccess', _38 => _38.uuid]));
|
|
5911
5911
|
}
|
|
5912
5912
|
}, [loginData]);
|
|
5913
5913
|
async function handleSelecionarLicenca() {
|
|
5914
5914
|
try {
|
|
5915
|
-
const tokens = await selecionarLicenca(_optionalChain([loginData, 'optionalAccess',
|
|
5915
|
+
const tokens = await selecionarLicenca(_optionalChain([loginData, 'optionalAccess', _39 => _39.token]), empresaId);
|
|
5916
5916
|
if (tokens) {
|
|
5917
5917
|
onLoginSuccess(tokens);
|
|
5918
5918
|
} else {
|
|
@@ -5934,7 +5934,7 @@ function LicencaForm(props) {
|
|
|
5934
5934
|
onChange: (e) => {
|
|
5935
5935
|
setEmpresaId(e.target.value);
|
|
5936
5936
|
},
|
|
5937
|
-
children: _optionalChain([loginData, 'optionalAccess',
|
|
5937
|
+
children: _optionalChain([loginData, 'optionalAccess', _40 => _40.empresas, 'optionalAccess', _41 => _41.map, 'call', _42 => _42((empresa) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.MenuItem, { value: empresa.uuid, children: empresa.nome }, empresa.uuid))])
|
|
5938
5938
|
}
|
|
5939
5939
|
),
|
|
5940
5940
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -6042,15 +6042,15 @@ function VerificationCodeInput({
|
|
|
6042
6042
|
const updatedValue = nextValue.join("");
|
|
6043
6043
|
onChange(updatedValue);
|
|
6044
6044
|
if (cleanDigit && index < length - 1) {
|
|
6045
|
-
_optionalChain([inputsRef, 'access',
|
|
6045
|
+
_optionalChain([inputsRef, 'access', _43 => _43.current, 'access', _44 => _44[index + 1], 'optionalAccess', _45 => _45.focus, 'call', _46 => _46()]);
|
|
6046
6046
|
}
|
|
6047
6047
|
};
|
|
6048
6048
|
const handleKeyDown = (index, event) => {
|
|
6049
6049
|
if (event.key === "Backspace" && !value[index] && index > 0) {
|
|
6050
|
-
_optionalChain([inputsRef, 'access',
|
|
6050
|
+
_optionalChain([inputsRef, 'access', _47 => _47.current, 'access', _48 => _48[index - 1], 'optionalAccess', _49 => _49.focus, 'call', _50 => _50()]);
|
|
6051
6051
|
}
|
|
6052
6052
|
};
|
|
6053
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { display: "flex", gap: 1, children: Array.from({ length }).map((
|
|
6053
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { display: "flex", gap: 1, children: Array.from({ length }).map((_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6054
6054
|
_material.TextField,
|
|
6055
6055
|
{
|
|
6056
6056
|
autoFocus: i === 0,
|
|
@@ -6107,7 +6107,7 @@ function DialogVerificarOtp(props) {
|
|
|
6107
6107
|
setLoading(false);
|
|
6108
6108
|
}
|
|
6109
6109
|
}
|
|
6110
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (
|
|
6110
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
|
|
6111
6111
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Header, { children: [
|
|
6112
6112
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.Title, { children: "Entrar com senha tempor\xE1ria" }),
|
|
6113
6113
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.ActionClose, { onClose })
|
|
@@ -6282,7 +6282,7 @@ function OtpForm(props) {
|
|
|
6282
6282
|
{
|
|
6283
6283
|
onLoginSuccess,
|
|
6284
6284
|
open: isOpenVerificar,
|
|
6285
|
-
onClose: async (
|
|
6285
|
+
onClose: async (_) => {
|
|
6286
6286
|
setOpenVerificar(false);
|
|
6287
6287
|
},
|
|
6288
6288
|
payload: {
|
|
@@ -6324,10 +6324,10 @@ function LoginSection(props) {
|
|
|
6324
6324
|
}, [isAuthenticated]);
|
|
6325
6325
|
async function handleLoginSuccess(_loginData) {
|
|
6326
6326
|
try {
|
|
6327
|
-
if (Array.isArray(_optionalChain([_loginData, 'optionalAccess',
|
|
6328
|
-
if (_optionalChain([_loginData, 'optionalAccess',
|
|
6327
|
+
if (Array.isArray(_optionalChain([_loginData, 'optionalAccess', _51 => _51.empresas]))) {
|
|
6328
|
+
if (_optionalChain([_loginData, 'optionalAccess', _52 => _52.empresas, 'access', _53 => _53.length]) === 1) {
|
|
6329
6329
|
const tokens = await selecionarLicenca(
|
|
6330
|
-
_optionalChain([_loginData, 'optionalAccess',
|
|
6330
|
+
_optionalChain([_loginData, 'optionalAccess', _54 => _54.token]),
|
|
6331
6331
|
_loginData.empresas[0].uuid
|
|
6332
6332
|
);
|
|
6333
6333
|
if (tokens) {
|
|
@@ -7831,7 +7831,7 @@ function FullMenuItem({
|
|
|
7831
7831
|
|
|
7832
7832
|
|
|
7833
7833
|
|
|
7834
|
-
|
|
7834
|
+
var _truncate = require('lodash/truncate'); var _truncate2 = _interopRequireDefault(_truncate);
|
|
7835
7835
|
|
|
7836
7836
|
|
|
7837
7837
|
// src/Surface/index.tsx
|
|
@@ -7893,7 +7893,7 @@ function cloneMenuItems(childrenProp, open) {
|
|
|
7893
7893
|
if (!_react2.default.isValidElement(child)) {
|
|
7894
7894
|
return child;
|
|
7895
7895
|
}
|
|
7896
|
-
const newChildren = _optionalChain([child, 'access',
|
|
7896
|
+
const newChildren = _optionalChain([child, 'access', _55 => _55.props, 'optionalAccess', _56 => _56.children]) ? cloneMenuItems(child.props.children, open) : null;
|
|
7897
7897
|
return _react2.default.cloneElement(child, {
|
|
7898
7898
|
open,
|
|
7899
7899
|
children: newChildren
|
|
@@ -7953,15 +7953,15 @@ function MinMenuItem(props) {
|
|
|
7953
7953
|
},
|
|
7954
7954
|
children: [
|
|
7955
7955
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemIcon, { children: renderIcon(icon) }),
|
|
7956
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary:
|
|
7957
|
-
_optionalChain([opened, 'optionalAccess',
|
|
7956
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary: _truncate2.default.call(void 0, label, { length: 12 }) }),
|
|
7957
|
+
_optionalChain([opened, 'optionalAccess', _57 => _57.id]) === id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7958
7958
|
_material.Popper,
|
|
7959
7959
|
{
|
|
7960
7960
|
sx: {
|
|
7961
7961
|
zIndex: 999999
|
|
7962
7962
|
},
|
|
7963
|
-
anchorEl: _optionalChain([opened, 'optionalAccess',
|
|
7964
|
-
open: Boolean(_optionalChain([opened, 'optionalAccess',
|
|
7963
|
+
anchorEl: _optionalChain([opened, 'optionalAccess', _58 => _58.element]),
|
|
7964
|
+
open: Boolean(_optionalChain([opened, 'optionalAccess', _59 => _59.element])),
|
|
7965
7965
|
placement: "right-start",
|
|
7966
7966
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7967
7967
|
Surface,
|
|
@@ -7986,7 +7986,7 @@ function MinMenuItem(props) {
|
|
|
7986
7986
|
transition: "transform 0.2s ease-in-out"
|
|
7987
7987
|
},
|
|
7988
7988
|
p: 1,
|
|
7989
|
-
width: (theme2) => _optionalChain([theme2, 'access',
|
|
7989
|
+
width: (theme2) => _optionalChain([theme2, 'access', _60 => _60.mixins, 'access', _61 => _61.menu, 'optionalAccess', _62 => _62.width])
|
|
7990
7990
|
// borderTop: (theme) => `1px solid ${theme.palette.grey[400]}`,
|
|
7991
7991
|
// borderRight: (theme) => `1px solid ${theme.palette.grey[400]}`,
|
|
7992
7992
|
// borderBottom: (theme) => `1px solid ${theme.palette.grey[400]}`,
|
|
@@ -8054,7 +8054,7 @@ function useMenu() {
|
|
|
8054
8054
|
|
|
8055
8055
|
|
|
8056
8056
|
var openedMixin = (theme2) => ({
|
|
8057
|
-
width: _optionalChain([theme2, 'optionalAccess',
|
|
8057
|
+
width: _optionalChain([theme2, 'optionalAccess', _63 => _63.mixins, 'optionalAccess', _64 => _64.menu, 'optionalAccess', _65 => _65.width]) || 64,
|
|
8058
8058
|
background: "#FFFFFF",
|
|
8059
8059
|
transition: theme2.transitions.create("width", {
|
|
8060
8060
|
easing: theme2.transitions.easing.sharp,
|
|
@@ -8078,7 +8078,7 @@ var closedMixin = (theme2) => ({
|
|
|
8078
8078
|
var Drawer = _styles.styled.call(void 0, _material.Drawer, {
|
|
8079
8079
|
shouldForwardProp: (prop) => prop !== "open"
|
|
8080
8080
|
})(({ theme: theme2, open }) => ({
|
|
8081
|
-
width: _optionalChain([theme2, 'optionalAccess',
|
|
8081
|
+
width: _optionalChain([theme2, 'optionalAccess', _66 => _66.mixins, 'optionalAccess', _67 => _67.menu, 'optionalAccess', _68 => _68.width]) || 64,
|
|
8082
8082
|
// boxShadow: '2px 3px 20px -16px rgb(32 32 36 / 30%)',
|
|
8083
8083
|
borderRightStyle: "none",
|
|
8084
8084
|
whiteSpace: "nowrap",
|
|
@@ -8098,12 +8098,12 @@ function cloneMenuItems2(childrenProp, pathName, open, onClickItem) {
|
|
|
8098
8098
|
if (!_react2.default.isValidElement(child)) {
|
|
8099
8099
|
return child;
|
|
8100
8100
|
}
|
|
8101
|
-
const splittedLink = _optionalChain([child, 'access',
|
|
8101
|
+
const splittedLink = _optionalChain([child, 'access', _69 => _69.props, 'access', _70 => _70.link, 'optionalAccess', _71 => _71.split, 'call', _72 => _72("/"), 'access', _73 => _73.filter, 'call', _74 => _74(Boolean)]) || [];
|
|
8102
8102
|
const linkName = child.props.link || "";
|
|
8103
|
-
const splittedPath = _optionalChain([pathName, 'optionalAccess',
|
|
8103
|
+
const splittedPath = _optionalChain([pathName, 'optionalAccess', _75 => _75.split, 'call', _76 => _76("/"), 'access', _77 => _77.filter, 'call', _78 => _78(Boolean)]) || [];
|
|
8104
8104
|
const slicedPathName = splittedPath.slice(0, splittedLink.length);
|
|
8105
8105
|
const reconstructedPath = "/" + slicedPathName.join("/");
|
|
8106
|
-
const newChildren = _optionalChain([child, 'access',
|
|
8106
|
+
const newChildren = _optionalChain([child, 'access', _79 => _79.props, 'optionalAccess', _80 => _80.children]) ? cloneMenuItems2(child.props.children, pathName, open, onClickItem) : null;
|
|
8107
8107
|
return _react2.default.cloneElement(child, {
|
|
8108
8108
|
open,
|
|
8109
8109
|
selected: reconstructedPath === linkName,
|
|
@@ -8294,8 +8294,8 @@ function reducer(state, action) {
|
|
|
8294
8294
|
case "loadFiltersFromStorage":
|
|
8295
8295
|
return {
|
|
8296
8296
|
...state,
|
|
8297
|
-
filterValues: _optionalChain([action, 'optionalAccess',
|
|
8298
|
-
appliedValues: _optionalChain([action, 'optionalAccess',
|
|
8297
|
+
filterValues: _optionalChain([action, 'optionalAccess', _81 => _81.storageValues, 'optionalAccess', _82 => _82.filterValues]),
|
|
8298
|
+
appliedValues: _optionalChain([action, 'optionalAccess', _83 => _83.storageValues, 'optionalAccess', _84 => _84.appliedValues])
|
|
8299
8299
|
};
|
|
8300
8300
|
case "updateFilterValues":
|
|
8301
8301
|
return { ...state, filterValues: action.filterValues };
|
|
@@ -8314,7 +8314,7 @@ function reducer(state, action) {
|
|
|
8314
8314
|
const [key2] = Object.keys(filters);
|
|
8315
8315
|
asArray = [{ [key2]: filters[key2] }];
|
|
8316
8316
|
}
|
|
8317
|
-
if (_optionalChain([action, 'optionalAccess',
|
|
8317
|
+
if (_optionalChain([action, 'optionalAccess', _85 => _85.storagePath])) {
|
|
8318
8318
|
localStorage.setItem(
|
|
8319
8319
|
action.storagePath,
|
|
8320
8320
|
JSON.stringify({
|
|
@@ -8341,9 +8341,9 @@ function reducer(state, action) {
|
|
|
8341
8341
|
case "toggleIsOpen":
|
|
8342
8342
|
return { ...state, isOpen: !state.isOpen };
|
|
8343
8343
|
case "deleteAppliedValue":
|
|
8344
|
-
const { [action.filterName]:
|
|
8344
|
+
const { [action.filterName]: _, ...rest } = state.appliedValues || {};
|
|
8345
8345
|
const { [action.filterName]: __, ...restFilterValues } = state.filterValues || {};
|
|
8346
|
-
if (_optionalChain([action, 'optionalAccess',
|
|
8346
|
+
if (_optionalChain([action, 'optionalAccess', _86 => _86.storagePath])) {
|
|
8347
8347
|
const storage = JSON.parse(
|
|
8348
8348
|
localStorage.getItem(action.storagePath) || "{}"
|
|
8349
8349
|
);
|
|
@@ -8404,7 +8404,7 @@ function FilterProvider(props) {
|
|
|
8404
8404
|
dispatch({
|
|
8405
8405
|
type: "updateIsOpen",
|
|
8406
8406
|
isOpen: true,
|
|
8407
|
-
target: _optionalChain([event, 'optionalAccess',
|
|
8407
|
+
target: _optionalChain([event, 'optionalAccess', _87 => _87.target]) || void 0
|
|
8408
8408
|
});
|
|
8409
8409
|
}
|
|
8410
8410
|
function closeFilter() {
|
|
@@ -8598,7 +8598,7 @@ function FilterChips({
|
|
|
8598
8598
|
if (!containsInAppliedValues)
|
|
8599
8599
|
return null;
|
|
8600
8600
|
return _react2.default.cloneElement(child, {
|
|
8601
|
-
onDelete: !child.props.disabledDelete ? (
|
|
8601
|
+
onDelete: !child.props.disabledDelete ? (_) => {
|
|
8602
8602
|
if (deleteFilterValue)
|
|
8603
8603
|
deleteFilterValue(child.props.name || "");
|
|
8604
8604
|
close();
|
|
@@ -8639,7 +8639,7 @@ function FilterChips({
|
|
|
8639
8639
|
},
|
|
8640
8640
|
children: [
|
|
8641
8641
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { pt: 2, pl: 1, pr: 1, pb: 2, children: _react2.default.Children.map(childrenProp, (child) => {
|
|
8642
|
-
if (_react2.default.isValidElement(child) && child.props.name === _optionalChain([popoverData, 'optionalAccess',
|
|
8642
|
+
if (_react2.default.isValidElement(child) && child.props.name === _optionalChain([popoverData, 'optionalAccess', _88 => _88.name])) {
|
|
8643
8643
|
return child.props.children;
|
|
8644
8644
|
}
|
|
8645
8645
|
return null;
|
|
@@ -8656,13 +8656,13 @@ function FilterChips({
|
|
|
8656
8656
|
justifyContent: "flex-end",
|
|
8657
8657
|
spacing: 1,
|
|
8658
8658
|
children: [
|
|
8659
|
-
!_optionalChain([popoverData, 'optionalAccess',
|
|
8659
|
+
!_optionalChain([popoverData, 'optionalAccess', _89 => _89.disabledDelete]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8660
8660
|
_material.Button,
|
|
8661
8661
|
{
|
|
8662
8662
|
color: "error",
|
|
8663
8663
|
onClick: () => {
|
|
8664
8664
|
if (deleteFilterValue)
|
|
8665
|
-
deleteFilterValue(_optionalChain([popoverData, 'optionalAccess',
|
|
8665
|
+
deleteFilterValue(_optionalChain([popoverData, 'optionalAccess', _90 => _90.name]) || "");
|
|
8666
8666
|
close();
|
|
8667
8667
|
},
|
|
8668
8668
|
children: "Apagar"
|
|
@@ -8778,7 +8778,7 @@ function FilterRoot(props) {
|
|
|
8778
8778
|
|
|
8779
8779
|
function FilterSearchTextField(props) {
|
|
8780
8780
|
const { onChange, ...rest } = props;
|
|
8781
|
-
const debouncedHandleChange =
|
|
8781
|
+
const debouncedHandleChange = _debounce2.default.call(void 0, (query) => onChange(query), 500);
|
|
8782
8782
|
function handleChange(event) {
|
|
8783
8783
|
const value = event.target.value;
|
|
8784
8784
|
debouncedHandleChange(value);
|
|
@@ -8997,8 +8997,8 @@ function Table(props) {
|
|
|
8997
8997
|
...col,
|
|
8998
8998
|
flex: col.flex || 1,
|
|
8999
8999
|
minWidth: col.minWidth || 100,
|
|
9000
|
-
headerClassName: _optionalChain([col, 'optionalAccess',
|
|
9001
|
-
cellClassName: _optionalChain([col, 'optionalAccess',
|
|
9000
|
+
headerClassName: _optionalChain([col, 'optionalAccess', _91 => _91.enableStickyColumns]) ? "sticky-header" : "",
|
|
9001
|
+
cellClassName: _optionalChain([col, 'optionalAccess', _92 => _92.enableStickyColumns]) ? "sticky-cell" : ""
|
|
9002
9002
|
};
|
|
9003
9003
|
});
|
|
9004
9004
|
};
|
|
@@ -9038,7 +9038,7 @@ function Table(props) {
|
|
|
9038
9038
|
case "ctrl+e":
|
|
9039
9039
|
event.preventDefault();
|
|
9040
9040
|
const handleExport = (options) => {
|
|
9041
|
-
if (_optionalChain([apiRef, 'optionalAccess',
|
|
9041
|
+
if (_optionalChain([apiRef, 'optionalAccess', _93 => _93.current])) {
|
|
9042
9042
|
apiRef.current.exportDataAsCsv(options);
|
|
9043
9043
|
}
|
|
9044
9044
|
};
|
|
@@ -9048,7 +9048,7 @@ function Table(props) {
|
|
|
9048
9048
|
break;
|
|
9049
9049
|
}
|
|
9050
9050
|
}
|
|
9051
|
-
function handleRowDoubleClick(params,
|
|
9051
|
+
function handleRowDoubleClick(params, _, details) {
|
|
9052
9052
|
if (onRowDoubleClick)
|
|
9053
9053
|
onRowDoubleClick("edit", params.id);
|
|
9054
9054
|
}
|
|
@@ -9464,7 +9464,7 @@ var getFilteredRows2 = ({ apiRef }) => _xdatagrid.gridFilteredSortedRowIdsSelect
|
|
|
9464
9464
|
function ExportCsvButton() {
|
|
9465
9465
|
const { apiRef } = useTableRootContext();
|
|
9466
9466
|
const handleExport = (options) => {
|
|
9467
|
-
if (_optionalChain([apiRef, 'optionalAccess',
|
|
9467
|
+
if (_optionalChain([apiRef, 'optionalAccess', _94 => _94.current])) {
|
|
9468
9468
|
apiRef.current.exportDataAsCsv(options);
|
|
9469
9469
|
}
|
|
9470
9470
|
};
|
|
@@ -9523,7 +9523,7 @@ function Pagination(props) {
|
|
|
9523
9523
|
} = props;
|
|
9524
9524
|
const { page, pageSize = 15, totalRecords } = pagination || {};
|
|
9525
9525
|
const pages = _react.useMemo.call(void 0, () => {
|
|
9526
|
-
if (_optionalChain([pagination, 'optionalAccess',
|
|
9526
|
+
if (_optionalChain([pagination, 'optionalAccess', _95 => _95.lastPage]))
|
|
9527
9527
|
return pagination.lastPage;
|
|
9528
9528
|
if ((totalRecords || 0) < pageSize)
|
|
9529
9529
|
return 1;
|
|
@@ -9596,7 +9596,7 @@ function Pagination(props) {
|
|
|
9596
9596
|
count: pages || 0,
|
|
9597
9597
|
showFirstButton: true,
|
|
9598
9598
|
showLastButton: true,
|
|
9599
|
-
onChange: (
|
|
9599
|
+
onChange: (_, _page) => {
|
|
9600
9600
|
if (onChangePage)
|
|
9601
9601
|
onChangePage(_page);
|
|
9602
9602
|
},
|
|
@@ -9655,7 +9655,7 @@ function Root({ children, height, ...rest }) {
|
|
|
9655
9655
|
function SelectionCounter(props) {
|
|
9656
9656
|
const { countTitle, gender } = props;
|
|
9657
9657
|
const { rowsSelectedId } = useTableRootContext();
|
|
9658
|
-
const countQuantidade = _optionalChain([rowsSelectedId, 'optionalAccess',
|
|
9658
|
+
const countQuantidade = _optionalChain([rowsSelectedId, 'optionalAccess', _96 => _96.ids, 'access', _97 => _97.size]) || 0;
|
|
9659
9659
|
const flexSufixCountTitle = _react.useMemo.call(void 0, () => {
|
|
9660
9660
|
if (!countTitle)
|
|
9661
9661
|
return "";
|
|
@@ -9810,12 +9810,12 @@ var PopoverProvider = ({
|
|
|
9810
9810
|
const open = _react.useCallback.call(void 0, (anchor) => {
|
|
9811
9811
|
setAnchorEl(anchor);
|
|
9812
9812
|
setIsOpen(true);
|
|
9813
|
-
_optionalChain([onOpenChange, 'optionalCall',
|
|
9813
|
+
_optionalChain([onOpenChange, 'optionalCall', _98 => _98(true)]);
|
|
9814
9814
|
}, []);
|
|
9815
9815
|
const close = _react.useCallback.call(void 0, () => {
|
|
9816
9816
|
setIsOpen(false);
|
|
9817
9817
|
setAnchorEl(null);
|
|
9818
|
-
_optionalChain([onOpenChange, 'optionalCall',
|
|
9818
|
+
_optionalChain([onOpenChange, 'optionalCall', _99 => _99(false)]);
|
|
9819
9819
|
}, []);
|
|
9820
9820
|
_react.useEffect.call(void 0, () => {
|
|
9821
9821
|
setIsOpen(Boolean(_open));
|
|
@@ -9957,12 +9957,12 @@ function ButtonGroupRoot(props) {
|
|
|
9957
9957
|
const children = _react.Children.map(childrenProp, (child, index) => {
|
|
9958
9958
|
options.push({
|
|
9959
9959
|
label: child.props.children,
|
|
9960
|
-
value: _optionalChain([child, 'access',
|
|
9960
|
+
value: _optionalChain([child, 'access', _100 => _100.props, 'optionalAccess', _101 => _101.value]) || index
|
|
9961
9961
|
});
|
|
9962
9962
|
const clonedChild = _react2.default.cloneElement(child, {
|
|
9963
9963
|
isLoading,
|
|
9964
9964
|
sx: { maxWidth: "300px", width: "120px" },
|
|
9965
|
-
value: _optionalChain([child, 'access',
|
|
9965
|
+
value: _optionalChain([child, 'access', _102 => _102.props, 'optionalAccess', _103 => _103.value]) || index
|
|
9966
9966
|
});
|
|
9967
9967
|
if (!Boolean(value) && index === 0)
|
|
9968
9968
|
return clonedChild;
|
|
@@ -10295,7 +10295,7 @@ function Autocomplete(props) {
|
|
|
10295
10295
|
function resetEndAdornment(endAdornment, isLoading2 = false, disabled2 = false) {
|
|
10296
10296
|
if (endAdornment) {
|
|
10297
10297
|
const children = _react2.default.Children.toArray(
|
|
10298
|
-
_optionalChain([endAdornment, 'access',
|
|
10298
|
+
_optionalChain([endAdornment, 'access', _104 => _104.props, 'optionalAccess', _105 => _105.children])
|
|
10299
10299
|
);
|
|
10300
10300
|
const pos = children.length === 1 ? 0 : 1;
|
|
10301
10301
|
children.splice(
|
|
@@ -10325,14 +10325,14 @@ function Autocomplete(props) {
|
|
|
10325
10325
|
}
|
|
10326
10326
|
return endAdornment;
|
|
10327
10327
|
}
|
|
10328
|
-
const debouncedHandleSearch =
|
|
10328
|
+
const debouncedHandleSearch = _debounce2.default.call(void 0, (query, reason) => {
|
|
10329
10329
|
if (reason === "selectOption")
|
|
10330
10330
|
return;
|
|
10331
10331
|
if (onSearchChange)
|
|
10332
10332
|
onSearchChange(query, reason);
|
|
10333
10333
|
}, 500);
|
|
10334
10334
|
const handleSearch = _react.useCallback.call(void 0,
|
|
10335
|
-
(
|
|
10335
|
+
(_, v, reason) => {
|
|
10336
10336
|
debouncedHandleSearch(v, reason);
|
|
10337
10337
|
},
|
|
10338
10338
|
[debouncedHandleSearch]
|
|
@@ -10353,7 +10353,7 @@ function Autocomplete(props) {
|
|
|
10353
10353
|
loading: isLoading,
|
|
10354
10354
|
loadingText: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Loading, {}),
|
|
10355
10355
|
value,
|
|
10356
|
-
onChange: (
|
|
10356
|
+
onChange: (_, v) => handleChange(v),
|
|
10357
10357
|
options,
|
|
10358
10358
|
onInputChange: handleSearch,
|
|
10359
10359
|
getOptionLabel: renderValue,
|
|
@@ -10427,7 +10427,7 @@ function createTransporterScope(id) {
|
|
|
10427
10427
|
}
|
|
10428
10428
|
const current = get().value;
|
|
10429
10429
|
const exists = current.find(
|
|
10430
|
-
(item) => _optionalChain([item, 'optionalAccess',
|
|
10430
|
+
(item) => _optionalChain([item, 'optionalAccess', _106 => _106.id]) === result.id
|
|
10431
10431
|
);
|
|
10432
10432
|
const updated = exists ? current.filter((item) => item !== result) : [...current, result];
|
|
10433
10433
|
get().triggerOnChange(updated);
|
|
@@ -10439,7 +10439,7 @@ function createTransporterScope(id) {
|
|
|
10439
10439
|
onChange: void 0,
|
|
10440
10440
|
setOnChange: (fn) => set({ onChange: fn }),
|
|
10441
10441
|
triggerOnChange: (item) => {
|
|
10442
|
-
_optionalChain([get, 'call',
|
|
10442
|
+
_optionalChain([get, 'call', _107 => _107(), 'access', _108 => _108.onChange, 'optionalCall', _109 => _109(item)]);
|
|
10443
10443
|
}
|
|
10444
10444
|
}));
|
|
10445
10445
|
transporterStores.set(id, store);
|
|
@@ -10549,7 +10549,7 @@ function TextField12(props) {
|
|
|
10549
10549
|
{
|
|
10550
10550
|
...props,
|
|
10551
10551
|
slotProps: {
|
|
10552
|
-
input: { readOnly: props.readonly, ..._optionalChain([props, 'access',
|
|
10552
|
+
input: { readOnly: props.readonly, ..._optionalChain([props, 'access', _110 => _110.slotProps, 'optionalAccess', _111 => _111.input]) },
|
|
10553
10553
|
...props.slotProps
|
|
10554
10554
|
}
|
|
10555
10555
|
}
|
|
@@ -10633,7 +10633,7 @@ function DocumentoTextField(props) {
|
|
|
10633
10633
|
slotProps: {
|
|
10634
10634
|
htmlInput: {
|
|
10635
10635
|
maxLength: maxLen,
|
|
10636
|
-
..._optionalChain([slotProps, 'optionalAccess',
|
|
10636
|
+
..._optionalChain([slotProps, 'optionalAccess', _112 => _112.htmlInput])
|
|
10637
10637
|
},
|
|
10638
10638
|
...slotProps
|
|
10639
10639
|
// Allow additional slotProps to be passed
|
|
@@ -10681,7 +10681,7 @@ function CEPTextField(props) {
|
|
|
10681
10681
|
slotProps: {
|
|
10682
10682
|
htmlInput: {
|
|
10683
10683
|
maxLength: 9,
|
|
10684
|
-
..._optionalChain([slotProps, 'optionalAccess',
|
|
10684
|
+
..._optionalChain([slotProps, 'optionalAccess', _113 => _113.htmlInput])
|
|
10685
10685
|
},
|
|
10686
10686
|
...slotProps
|
|
10687
10687
|
// Allow additional slotProps to be passed
|
|
@@ -10848,7 +10848,7 @@ function NotaVersaoItem(props) {
|
|
|
10848
10848
|
"div",
|
|
10849
10849
|
{
|
|
10850
10850
|
dangerouslySetInnerHTML: {
|
|
10851
|
-
__html: _optionalChain([article, 'optionalAccess',
|
|
10851
|
+
__html: _optionalChain([article, 'optionalAccess', _114 => _114.body, 'optionalAccess', _115 => _115.replace, 'call', _116 => _116('width="560"', 'width="412px"'), 'access', _117 => _117.replace, 'call', _118 => _118('height="315"', 'height="240px"'), 'access', _119 => _119.replace, 'call', _120 => _120("h2", "h3")]) || ""
|
|
10852
10852
|
}
|
|
10853
10853
|
}
|
|
10854
10854
|
) })
|
|
@@ -10965,7 +10965,7 @@ function NotaVersao(props) {
|
|
|
10965
10965
|
") est\xE1 dispon\xEDvel!"
|
|
10966
10966
|
] }),
|
|
10967
10967
|
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Alert, { severity: "error", children: "N\xE3o foi poss\xEDvel carregar o conte\xFAdo" }),
|
|
10968
|
-
_optionalChain([articles, 'optionalAccess',
|
|
10968
|
+
_optionalChain([articles, 'optionalAccess', _121 => _121.map, 'call', _122 => _122((a, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NotaVersaoItem, { isOpen: index === 0, article: a }, a.id))])
|
|
10969
10969
|
] })
|
|
10970
10970
|
]
|
|
10971
10971
|
}
|
|
@@ -10982,8 +10982,8 @@ var _luxon = require('luxon');
|
|
|
10982
10982
|
function DatePicker(props) {
|
|
10983
10983
|
const { value, error, onChange, fromFormat, format: format2, ...rest } = props;
|
|
10984
10984
|
function handleChange(date2) {
|
|
10985
|
-
if (_optionalChain([date2, 'optionalAccess',
|
|
10986
|
-
onChange(_optionalChain([date2, 'optionalAccess',
|
|
10985
|
+
if (_optionalChain([date2, 'optionalAccess', _123 => _123.isValid])) {
|
|
10986
|
+
onChange(_optionalChain([date2, 'optionalAccess', _124 => _124.toFormat, 'call', _125 => _125("yyyy-MM-dd")]));
|
|
10987
10987
|
return;
|
|
10988
10988
|
}
|
|
10989
10989
|
if (date2 === null) {
|
|
@@ -11231,14 +11231,14 @@ function DateRangePicker(props) {
|
|
|
11231
11231
|
value: dates.tipo,
|
|
11232
11232
|
onChange: (e) => {
|
|
11233
11233
|
const _periodo = e.target.value;
|
|
11234
|
-
definirPeriodo(_periodo, _optionalChain([dates, 'optionalAccess',
|
|
11234
|
+
definirPeriodo(_periodo, _optionalChain([dates, 'optionalAccess', _126 => _126.firstDate]) || null);
|
|
11235
11235
|
},
|
|
11236
11236
|
select: true,
|
|
11237
11237
|
fullWidth: true,
|
|
11238
11238
|
size: "small",
|
|
11239
11239
|
variant: "outlined",
|
|
11240
11240
|
InputProps: {
|
|
11241
|
-
startAdornment: _optionalChain([dates, 'optionalAccess',
|
|
11241
|
+
startAdornment: _optionalChain([dates, 'optionalAccess', _127 => _127.tipo]) !== "livre" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.InputAdornment, { position: "start", children: [
|
|
11242
11242
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { size: "small", onClick: handleBackToPrevious, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _xdatepickers.ArrowLeftIcon, { fontSize: "small" }) }),
|
|
11243
11243
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { size: "small", onClick: handleGoToNext, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _xdatepickers.ArrowRightIcon, { fontSize: "small" }) })
|
|
11244
11244
|
] })
|
|
@@ -11264,7 +11264,7 @@ function DateRangePicker(props) {
|
|
|
11264
11264
|
slots: dates.tipo === "week" ? { day: Day } : void 0,
|
|
11265
11265
|
slotProps: dates.tipo === "week" ? {
|
|
11266
11266
|
day: (ownerState) => ({
|
|
11267
|
-
selectedDay: _optionalChain([dates, 'optionalAccess',
|
|
11267
|
+
selectedDay: _optionalChain([dates, 'optionalAccess', _128 => _128.firstDate]) ? _luxon.DateTime.fromFormat(
|
|
11268
11268
|
dates.firstDate,
|
|
11269
11269
|
"yyyy-MM-dd"
|
|
11270
11270
|
).startOf("week") : _luxon.DateTime.now(),
|
|
@@ -11279,8 +11279,8 @@ function DateRangePicker(props) {
|
|
|
11279
11279
|
dates.tipo !== "day" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11280
11280
|
DatePicker,
|
|
11281
11281
|
{
|
|
11282
|
-
disabled: dates.tipo !== "livre" || !Boolean(_optionalChain([dates, 'optionalAccess',
|
|
11283
|
-
minDate: _optionalChain([dates, 'optionalAccess',
|
|
11282
|
+
disabled: dates.tipo !== "livre" || !Boolean(_optionalChain([dates, 'optionalAccess', _129 => _129.firstDate])),
|
|
11283
|
+
minDate: _optionalChain([dates, 'optionalAccess', _130 => _130.firstDate]) ? _luxon.DateTime.fromFormat(dates.firstDate, "yyyy-MM-dd") : void 0,
|
|
11284
11284
|
showDaysOutsideCurrentMonth: true,
|
|
11285
11285
|
label: "Fim",
|
|
11286
11286
|
onChange: handleChangeSecondDate,
|
|
@@ -11300,14 +11300,14 @@ function DateRangePicker(props) {
|
|
|
11300
11300
|
value: dates.tipo,
|
|
11301
11301
|
onChange: (e) => {
|
|
11302
11302
|
const _periodo = e.target.value;
|
|
11303
|
-
definirPeriodo(_periodo, _optionalChain([dates, 'optionalAccess',
|
|
11303
|
+
definirPeriodo(_periodo, _optionalChain([dates, 'optionalAccess', _131 => _131.firstDate]) || null);
|
|
11304
11304
|
},
|
|
11305
11305
|
select: true,
|
|
11306
11306
|
fullWidth: true,
|
|
11307
11307
|
size: "small",
|
|
11308
11308
|
variant: "outlined",
|
|
11309
11309
|
InputProps: {
|
|
11310
|
-
startAdornment: _optionalChain([dates, 'optionalAccess',
|
|
11310
|
+
startAdornment: _optionalChain([dates, 'optionalAccess', _132 => _132.tipo]) !== "livre" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.InputAdornment, { position: "start", children: [
|
|
11311
11311
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { size: "small", onClick: handleBackToPrevious, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _xdatepickers.ArrowLeftIcon, { fontSize: "small" }) }),
|
|
11312
11312
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { size: "small", onClick: handleGoToNext, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _xdatepickers.ArrowRightIcon, { fontSize: "small" }) })
|
|
11313
11313
|
] })
|
|
@@ -11333,7 +11333,7 @@ function DateRangePicker(props) {
|
|
|
11333
11333
|
slots: dates.tipo === "week" ? { day: Day } : void 0,
|
|
11334
11334
|
slotProps: dates.tipo === "week" ? {
|
|
11335
11335
|
day: (ownerState) => ({
|
|
11336
|
-
selectedDay: _optionalChain([dates, 'optionalAccess',
|
|
11336
|
+
selectedDay: _optionalChain([dates, 'optionalAccess', _133 => _133.firstDate]) ? _luxon.DateTime.fromFormat(
|
|
11337
11337
|
dates.firstDate,
|
|
11338
11338
|
"yyyy-MM-dd"
|
|
11339
11339
|
).startOf("week") : _luxon.DateTime.now(),
|
|
@@ -11348,8 +11348,8 @@ function DateRangePicker(props) {
|
|
|
11348
11348
|
dates.tipo !== "day" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11349
11349
|
DatePicker,
|
|
11350
11350
|
{
|
|
11351
|
-
disabled: dates.tipo !== "livre" || !Boolean(_optionalChain([dates, 'optionalAccess',
|
|
11352
|
-
minDate: _optionalChain([dates, 'optionalAccess',
|
|
11351
|
+
disabled: dates.tipo !== "livre" || !Boolean(_optionalChain([dates, 'optionalAccess', _134 => _134.firstDate])),
|
|
11352
|
+
minDate: _optionalChain([dates, 'optionalAccess', _135 => _135.firstDate]) ? _luxon.DateTime.fromFormat(dates.firstDate, "yyyy-MM-dd") : void 0,
|
|
11353
11353
|
showDaysOutsideCurrentMonth: true,
|
|
11354
11354
|
label: "Fim",
|
|
11355
11355
|
onChange: (date2) => {
|
|
@@ -11582,7 +11582,7 @@ function FullMenuItem2(props) {
|
|
|
11582
11582
|
if (!menuItem.visible)
|
|
11583
11583
|
return null;
|
|
11584
11584
|
const isExpandable = Boolean(
|
|
11585
|
-
_optionalChain([menuItem, 'optionalAccess',
|
|
11585
|
+
_optionalChain([menuItem, 'optionalAccess', _136 => _136.items]) && _optionalChain([menuItem, 'optionalAccess', _137 => _137.items, 'access', _138 => _138.length]) > 0
|
|
11586
11586
|
);
|
|
11587
11587
|
function toggleExpand() {
|
|
11588
11588
|
setExpanded(!expanded);
|
|
@@ -11592,7 +11592,7 @@ function FullMenuItem2(props) {
|
|
|
11592
11592
|
MenuItem_default,
|
|
11593
11593
|
{
|
|
11594
11594
|
onClick: () => {
|
|
11595
|
-
if (_optionalChain([menuItem, 'optionalAccess',
|
|
11595
|
+
if (_optionalChain([menuItem, 'optionalAccess', _139 => _139.link])) {
|
|
11596
11596
|
onMenuClick(menuItem.link);
|
|
11597
11597
|
return;
|
|
11598
11598
|
}
|
|
@@ -11607,14 +11607,14 @@ function FullMenuItem2(props) {
|
|
|
11607
11607
|
]
|
|
11608
11608
|
}
|
|
11609
11609
|
),
|
|
11610
|
-
_optionalChain([menuItem, 'optionalAccess',
|
|
11610
|
+
_optionalChain([menuItem, 'optionalAccess', _140 => _140.items]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Collapse, { in: expanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11611
11611
|
FullMenu,
|
|
11612
11612
|
{
|
|
11613
11613
|
activeMenu,
|
|
11614
11614
|
sx: {
|
|
11615
11615
|
pl: (theme2) => theme2.spacing(1.5)
|
|
11616
11616
|
},
|
|
11617
|
-
menus: _optionalChain([menuItem, 'optionalAccess',
|
|
11617
|
+
menus: _optionalChain([menuItem, 'optionalAccess', _141 => _141.items]) || [],
|
|
11618
11618
|
onMenuClick
|
|
11619
11619
|
}
|
|
11620
11620
|
) })
|
|
@@ -11662,38 +11662,38 @@ function MinMenu(props) {
|
|
|
11662
11662
|
MenuItem_default,
|
|
11663
11663
|
{
|
|
11664
11664
|
onMouseEnter: (e) => {
|
|
11665
|
-
if (!_optionalChain([menuItem, 'optionalAccess',
|
|
11665
|
+
if (!_optionalChain([menuItem, 'optionalAccess', _142 => _142.link])) {
|
|
11666
11666
|
handleOpen(e, menuItem.id, menuItem.items);
|
|
11667
11667
|
}
|
|
11668
11668
|
},
|
|
11669
11669
|
onMouseLeave: () => {
|
|
11670
|
-
if (!_optionalChain([menuItem, 'optionalAccess',
|
|
11670
|
+
if (!_optionalChain([menuItem, 'optionalAccess', _143 => _143.link])) {
|
|
11671
11671
|
handleClose();
|
|
11672
11672
|
}
|
|
11673
11673
|
},
|
|
11674
11674
|
onClick: () => {
|
|
11675
|
-
if (_optionalChain([menuItem, 'optionalAccess',
|
|
11675
|
+
if (_optionalChain([menuItem, 'optionalAccess', _144 => _144.link])) {
|
|
11676
11676
|
onMenuClick(menuItem.link);
|
|
11677
11677
|
}
|
|
11678
11678
|
},
|
|
11679
11679
|
selected: activeMenu === menuItem.link,
|
|
11680
11680
|
children: [
|
|
11681
11681
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemIcon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Icon, { children: menuItem.icon }) }),
|
|
11682
|
-
_optionalChain([opened, 'optionalAccess',
|
|
11682
|
+
_optionalChain([opened, 'optionalAccess', _145 => _145.id]) === menuItem.id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11683
11683
|
_material.Popper,
|
|
11684
11684
|
{
|
|
11685
11685
|
sx: {
|
|
11686
11686
|
zIndex: 999999
|
|
11687
11687
|
},
|
|
11688
|
-
anchorEl: _optionalChain([opened, 'optionalAccess',
|
|
11689
|
-
open: Boolean(_optionalChain([opened, 'optionalAccess',
|
|
11688
|
+
anchorEl: _optionalChain([opened, 'optionalAccess', _146 => _146.element]),
|
|
11689
|
+
open: Boolean(_optionalChain([opened, 'optionalAccess', _147 => _147.element])),
|
|
11690
11690
|
placement: "right-start",
|
|
11691
11691
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11692
11692
|
FullMenu,
|
|
11693
11693
|
{
|
|
11694
11694
|
activeMenu,
|
|
11695
11695
|
onMenuClick,
|
|
11696
|
-
menus: _optionalChain([menuItem, 'optionalAccess',
|
|
11696
|
+
menus: _optionalChain([menuItem, 'optionalAccess', _148 => _148.items]) || [],
|
|
11697
11697
|
sx: {
|
|
11698
11698
|
minWidth: "240px",
|
|
11699
11699
|
backgroundColor: theme_default.palette.background.paper,
|
|
@@ -11810,7 +11810,7 @@ function Avatar(props) {
|
|
|
11810
11810
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11811
11811
|
_Avatar2.default,
|
|
11812
11812
|
{
|
|
11813
|
-
src: _optionalChain([user, 'optionalAccess',
|
|
11813
|
+
src: _optionalChain([user, 'optionalAccess', _149 => _149.avatarUrl]),
|
|
11814
11814
|
sx: { width: 64, height: 64, margin: "auto", mb: 2 },
|
|
11815
11815
|
...props
|
|
11816
11816
|
}
|
|
@@ -11907,7 +11907,7 @@ var AvatarUploader = ({ onSave, src }) => {
|
|
|
11907
11907
|
const [zoom, setZoom] = _react.useState.call(void 0, 1);
|
|
11908
11908
|
const [croppedAreaPixels, setCroppedAreaPixels] = _react.useState.call(void 0, null);
|
|
11909
11909
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
11910
|
-
const onCropComplete = _react.useCallback.call(void 0, (
|
|
11910
|
+
const onCropComplete = _react.useCallback.call(void 0, (_, croppedAreaPixels2) => {
|
|
11911
11911
|
setCroppedAreaPixels(croppedAreaPixels2);
|
|
11912
11912
|
}, []);
|
|
11913
11913
|
const handleSave = async () => {
|
|
@@ -11921,7 +11921,7 @@ var AvatarUploader = ({ onSave, src }) => {
|
|
|
11921
11921
|
}
|
|
11922
11922
|
};
|
|
11923
11923
|
const handleFileChange = (event) => {
|
|
11924
|
-
const file = _optionalChain([event, 'access',
|
|
11924
|
+
const file = _optionalChain([event, 'access', _150 => _150.target, 'access', _151 => _151.files, 'optionalAccess', _152 => _152[0]]);
|
|
11925
11925
|
if (!file)
|
|
11926
11926
|
return;
|
|
11927
11927
|
const reader = new FileReader();
|
|
@@ -11988,7 +11988,7 @@ var AvatarUploader = ({ onSave, src }) => {
|
|
|
11988
11988
|
min: 1,
|
|
11989
11989
|
max: 3,
|
|
11990
11990
|
step: 0.1,
|
|
11991
|
-
onChange: (
|
|
11991
|
+
onChange: (_, value) => setZoom(value)
|
|
11992
11992
|
}
|
|
11993
11993
|
),
|
|
11994
11994
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ButtonContainer, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Button2.default, { variant: "contained", onClick: handleSave, children: "Salvar" }) })
|
|
@@ -12050,7 +12050,7 @@ function MinhaConta(props) {
|
|
|
12050
12050
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12051
12051
|
AvatarUploader_default,
|
|
12052
12052
|
{
|
|
12053
|
-
src: _optionalChain([data, 'optionalAccess',
|
|
12053
|
+
src: _optionalChain([data, 'optionalAccess', _153 => _153.avatarUrl]),
|
|
12054
12054
|
onSave: (croppedImage) => {
|
|
12055
12055
|
try {
|
|
12056
12056
|
uploadAvatar(croppedImage);
|
|
@@ -12076,7 +12076,7 @@ function MinhaConta(props) {
|
|
|
12076
12076
|
disabled: true,
|
|
12077
12077
|
fullWidth: true,
|
|
12078
12078
|
label: "E-mail",
|
|
12079
|
-
value: _optionalChain([data, 'optionalAccess',
|
|
12079
|
+
value: _optionalChain([data, 'optionalAccess', _154 => _154.email]) || ""
|
|
12080
12080
|
}
|
|
12081
12081
|
) }),
|
|
12082
12082
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12085,7 +12085,7 @@ function MinhaConta(props) {
|
|
|
12085
12085
|
name: "name",
|
|
12086
12086
|
fullWidth: true,
|
|
12087
12087
|
label: "Nome",
|
|
12088
|
-
value: _optionalChain([data, 'optionalAccess',
|
|
12088
|
+
value: _optionalChain([data, 'optionalAccess', _155 => _155.name]) || "",
|
|
12089
12089
|
onChange: handleChange,
|
|
12090
12090
|
...validationErrors("name")
|
|
12091
12091
|
}
|
|
@@ -12096,7 +12096,7 @@ function MinhaConta(props) {
|
|
|
12096
12096
|
name: "surname",
|
|
12097
12097
|
fullWidth: true,
|
|
12098
12098
|
label: "Sobrenome",
|
|
12099
|
-
value: _optionalChain([data, 'optionalAccess',
|
|
12099
|
+
value: _optionalChain([data, 'optionalAccess', _156 => _156.surname]) || "",
|
|
12100
12100
|
onChange: handleChange
|
|
12101
12101
|
}
|
|
12102
12102
|
) })
|
|
@@ -12155,7 +12155,7 @@ function DialogVerificarWhastapp(props) {
|
|
|
12155
12155
|
setLoading(false);
|
|
12156
12156
|
}
|
|
12157
12157
|
}
|
|
12158
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (
|
|
12158
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
|
|
12159
12159
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Header, { children: [
|
|
12160
12160
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.Title, { children: "Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp" }),
|
|
12161
12161
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.ActionClose, { onClose })
|
|
@@ -12179,7 +12179,7 @@ function DialogVerificarWhastapp(props) {
|
|
|
12179
12179
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Typography, { variant: "body1", sx: { fontSize: "10pt" }, children: [
|
|
12180
12180
|
"Enviamos um c\xF3digo via WhatsApp para +55",
|
|
12181
12181
|
" ",
|
|
12182
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "b", { children: `(${_optionalChain([payload, 'optionalAccess',
|
|
12182
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "b", { children: `(${_optionalChain([payload, 'optionalAccess', _157 => _157.whatsappNumber, 'optionalAccess', _158 => _158.slice, 'call', _159 => _159(0, 2)])}) ${_optionalChain([payload, 'optionalAccess', _160 => _160.whatsappNumber, 'optionalAccess', _161 => _161.slice, 'call', _162 => _162(2, 7)])}-${_optionalChain([payload, 'optionalAccess', _163 => _163.whatsappNumber, 'optionalAccess', _164 => _164.slice, 'call', _165 => _165(7)])}` }),
|
|
12183
12183
|
". ",
|
|
12184
12184
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "br", {}),
|
|
12185
12185
|
"Digite o c\xF3digo abaixo para confirmar que este n\xFAmero \xE9 seu."
|
|
@@ -12279,7 +12279,7 @@ function LoginSeguranca(props) {
|
|
|
12279
12279
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12280
12280
|
WhatsAppTextField,
|
|
12281
12281
|
{
|
|
12282
|
-
disabled: Boolean(_optionalChain([data, 'optionalAccess',
|
|
12282
|
+
disabled: Boolean(_optionalChain([data, 'optionalAccess', _166 => _166.whatsappVerifiedAt])),
|
|
12283
12283
|
fullWidth: false,
|
|
12284
12284
|
name: "whatsappNumber",
|
|
12285
12285
|
label: "Whastapp",
|
|
@@ -12323,7 +12323,7 @@ function LoginSeguranca(props) {
|
|
|
12323
12323
|
DialogVerificarWhastapp,
|
|
12324
12324
|
{
|
|
12325
12325
|
open: isOpenVerificarWhastapp,
|
|
12326
|
-
onClose: async (
|
|
12326
|
+
onClose: async (_) => {
|
|
12327
12327
|
setOpenVerificarWhatsapp(false);
|
|
12328
12328
|
},
|
|
12329
12329
|
payload: usuario,
|
|
@@ -12353,7 +12353,7 @@ function Profile(props) {
|
|
|
12353
12353
|
{
|
|
12354
12354
|
orientation: "vertical",
|
|
12355
12355
|
value: tabValue,
|
|
12356
|
-
onChange: (
|
|
12356
|
+
onChange: (_, value) => {
|
|
12357
12357
|
setTabValue(value);
|
|
12358
12358
|
},
|
|
12359
12359
|
sx: {
|