@data-c/ui 0.2.81 → 0.2.84
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 +127 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +207 -144
- 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;
|
|
@@ -2903,6 +2903,9 @@ var prefixes = {
|
|
|
2903
2903
|
context: "$",
|
|
2904
2904
|
value: "."
|
|
2905
2905
|
};
|
|
2906
|
+
function create$9(key2, options) {
|
|
2907
|
+
return new Reference(key2, options);
|
|
2908
|
+
}
|
|
2906
2909
|
var Reference = class {
|
|
2907
2910
|
constructor(key2, options = {}) {
|
|
2908
2911
|
this.key = void 0;
|
|
@@ -3505,7 +3508,7 @@ attempted value: ${formattedValue}
|
|
|
3505
3508
|
[isIndex ? "index" : "key"]: k,
|
|
3506
3509
|
path: isIndex || k.includes(".") ? `${parentPath || ""}[${isIndex ? k : `"${k}"`}]` : (parentPath ? `${parentPath}.` : "") + key2
|
|
3507
3510
|
});
|
|
3508
|
-
return (
|
|
3511
|
+
return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);
|
|
3509
3512
|
}
|
|
3510
3513
|
validate(value, options) {
|
|
3511
3514
|
var _options$disableStack2;
|
|
@@ -4434,7 +4437,7 @@ function sortByKeyOrder(keys) {
|
|
|
4434
4437
|
return findIndex(keys, a) - findIndex(keys, b);
|
|
4435
4438
|
};
|
|
4436
4439
|
}
|
|
4437
|
-
var parseJson = (value,
|
|
4440
|
+
var parseJson = (value, _, schema6) => {
|
|
4438
4441
|
if (typeof value !== "string") {
|
|
4439
4442
|
return value;
|
|
4440
4443
|
}
|
|
@@ -5051,6 +5054,7 @@ var TupleSchema = class extends Schema {
|
|
|
5051
5054
|
create$1.prototype = TupleSchema.prototype;
|
|
5052
5055
|
|
|
5053
5056
|
// src/AlterarSenha/index.tsx
|
|
5057
|
+
var _iconsmaterial = require('@mui/icons-material');
|
|
5054
5058
|
|
|
5055
5059
|
|
|
5056
5060
|
|
|
@@ -5073,7 +5077,7 @@ var _VisibilityOff = require('@mui/icons-material/VisibilityOff'); var _Visibili
|
|
|
5073
5077
|
|
|
5074
5078
|
|
|
5075
5079
|
function PasswordTextField(props) {
|
|
5076
|
-
const { name, label, value, onChange, onKeyDown } = props;
|
|
5080
|
+
const { name, label, value, onChange, onKeyDown, ...rest } = props;
|
|
5077
5081
|
const [showPassword, setShowPassword] = _react.useState.call(void 0, false);
|
|
5078
5082
|
function handleClickShowPassword() {
|
|
5079
5083
|
setShowPassword(!showPassword);
|
|
@@ -5087,17 +5091,20 @@ function PasswordTextField(props) {
|
|
|
5087
5091
|
onChange,
|
|
5088
5092
|
onKeyDown,
|
|
5089
5093
|
type: showPassword ? "text" : "password",
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
_material.
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5094
|
+
slotProps: {
|
|
5095
|
+
input: {
|
|
5096
|
+
endAdornment: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.InputAdornment, { position: "end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5097
|
+
_material.IconButton,
|
|
5098
|
+
{
|
|
5099
|
+
tabIndex: -1,
|
|
5100
|
+
onClick: handleClickShowPassword,
|
|
5101
|
+
edge: "end",
|
|
5102
|
+
children: showPassword ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _VisibilityOff2.default, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Visibility2.default, {})
|
|
5103
|
+
}
|
|
5104
|
+
) })
|
|
5105
|
+
}
|
|
5106
|
+
},
|
|
5107
|
+
...rest
|
|
5101
5108
|
}
|
|
5102
5109
|
);
|
|
5103
5110
|
}
|
|
@@ -5256,7 +5263,7 @@ function DialogRoot({
|
|
|
5256
5263
|
"& .MuiBackdrop-root": {
|
|
5257
5264
|
backgroundColor: "#6464648F"
|
|
5258
5265
|
},
|
|
5259
|
-
..._optionalChain([rest, 'optionalAccess',
|
|
5266
|
+
..._optionalChain([rest, 'optionalAccess', _2 => _2.sx])
|
|
5260
5267
|
},
|
|
5261
5268
|
PaperProps: {
|
|
5262
5269
|
style: {
|
|
@@ -5437,11 +5444,13 @@ function ValidatorMessage(props) {
|
|
|
5437
5444
|
|
|
5438
5445
|
var defaultData = {
|
|
5439
5446
|
senhaAtual: "",
|
|
5440
|
-
senhaNova: ""
|
|
5447
|
+
senhaNova: "",
|
|
5448
|
+
senhaNovaConfirmar: ""
|
|
5441
5449
|
};
|
|
5442
5450
|
var schema = create$3().shape({
|
|
5443
5451
|
senhaAtual: create$6().required("Informe a Senha Atual."),
|
|
5444
|
-
senhaNova: create$6().required("Informe a Nova Senha.")
|
|
5452
|
+
senhaNova: create$6().required("Informe a Nova Senha."),
|
|
5453
|
+
senhaNovaConfirmar: create$6().required("Informe a Nova Senha.").oneOf([create$9("senhaNova")], "As senhas devem ser iguais.")
|
|
5445
5454
|
});
|
|
5446
5455
|
function AlterarSenha(props) {
|
|
5447
5456
|
const {
|
|
@@ -5493,47 +5502,54 @@ function AlterarSenha(props) {
|
|
|
5493
5502
|
if (onFailed)
|
|
5494
5503
|
onFailed(error2);
|
|
5495
5504
|
if (_axios.isAxiosError.call(void 0, error2)) {
|
|
5496
|
-
setError(_optionalChain([error2, 'access',
|
|
5505
|
+
setError(_optionalChain([error2, 'access', _3 => _3.response, 'optionalAccess', _4 => _4.data, 'access', _5 => _5.message]));
|
|
5497
5506
|
return;
|
|
5498
5507
|
}
|
|
5499
5508
|
setError("Ocorreu um erro ao tentar alterar a senha");
|
|
5500
5509
|
}
|
|
5501
5510
|
}).catch((error2) => {
|
|
5511
|
+
console.log("Erros por campo:", error2.inner);
|
|
5512
|
+
console.log("Primeiro erro:", error2.errors);
|
|
5502
5513
|
setValidationErrors(error2);
|
|
5503
5514
|
});
|
|
5504
5515
|
}
|
|
5505
5516
|
function tem8caracteres() {
|
|
5506
|
-
return _optionalChain([data, 'optionalAccess',
|
|
5517
|
+
return _optionalChain([data, 'optionalAccess', _6 => _6.senhaNova, 'access', _7 => _7.length]) >= 8;
|
|
5507
5518
|
}
|
|
5508
5519
|
function temLetraMinuscula() {
|
|
5509
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5510
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5520
|
+
if (_optionalChain([data, 'optionalAccess', _8 => _8.senhaNova])) {
|
|
5521
|
+
const result = _optionalChain([data, 'optionalAccess', _9 => _9.senhaNova, 'access', _10 => _10.match, 'call', _11 => _11(/[a-z]/g)]);
|
|
5511
5522
|
return Array.isArray(result) && result.length > 0;
|
|
5512
5523
|
}
|
|
5513
5524
|
return false;
|
|
5514
5525
|
}
|
|
5515
5526
|
function temLetraMaisucula() {
|
|
5516
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5517
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5527
|
+
if (_optionalChain([data, 'optionalAccess', _12 => _12.senhaNova])) {
|
|
5528
|
+
const result = _optionalChain([data, 'optionalAccess', _13 => _13.senhaNova, 'access', _14 => _14.match, 'call', _15 => _15(/[A-Z]/g)]);
|
|
5518
5529
|
return Array.isArray(result) && result.length > 0;
|
|
5519
5530
|
}
|
|
5520
5531
|
return false;
|
|
5521
5532
|
}
|
|
5522
5533
|
function temNumero() {
|
|
5523
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5524
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5534
|
+
if (_optionalChain([data, 'optionalAccess', _16 => _16.senhaNova])) {
|
|
5535
|
+
const result = _optionalChain([data, 'optionalAccess', _17 => _17.senhaNova, 'access', _18 => _18.match, 'call', _19 => _19(/\d/g)]);
|
|
5525
5536
|
return Array.isArray(result) && result.length > 0;
|
|
5526
5537
|
}
|
|
5527
5538
|
return false;
|
|
5528
5539
|
}
|
|
5529
5540
|
function temCaracterEspecial() {
|
|
5530
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
5531
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
5541
|
+
if (_optionalChain([data, 'optionalAccess', _20 => _20.senhaNova])) {
|
|
5542
|
+
const result = _optionalChain([data, 'optionalAccess', _21 => _21.senhaNova, 'access', _22 => _22.match, 'call', _23 => _23(/\W/g)]);
|
|
5532
5543
|
return Array.isArray(result) && result.length > 0;
|
|
5533
5544
|
}
|
|
5534
5545
|
return false;
|
|
5535
5546
|
}
|
|
5536
|
-
|
|
5547
|
+
function asSenhasSaoIguais() {
|
|
5548
|
+
if (_optionalChain([data, 'optionalAccess', _24 => _24.senhaNova]) === "")
|
|
5549
|
+
return false;
|
|
5550
|
+
return _optionalChain([data, 'optionalAccess', _25 => _25.senhaNova]) === _optionalChain([data, 'optionalAccess', _26 => _26.senhaNovaConfirmar]);
|
|
5551
|
+
}
|
|
5552
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open: isOpen, onClose: (_) => onClose(), maxWidth: "md", children: [
|
|
5537
5553
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Header, { children: [
|
|
5538
5554
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.Title, { children: "Alterar Senha" }),
|
|
5539
5555
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.ActionClose, { onClose })
|
|
@@ -5544,26 +5560,61 @@ function AlterarSenha(props) {
|
|
|
5544
5560
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "br", {}),
|
|
5545
5561
|
"Cadastre uma senha segura para deixar sua conta mais protegida."
|
|
5546
5562
|
] }) }),
|
|
5547
|
-
/* @__PURE__ */ _jsxruntime.
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5563
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Grid, { size: 12, children: [
|
|
5564
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5565
|
+
PasswordTextField,
|
|
5566
|
+
{
|
|
5567
|
+
name: "senhaAtual",
|
|
5568
|
+
label: "Senha Atual",
|
|
5569
|
+
value: _optionalChain([data, 'optionalAccess', _27 => _27.senhaAtual]) || "",
|
|
5570
|
+
onChange: handleChange,
|
|
5571
|
+
...validationProps("senhaAtual")
|
|
5572
|
+
}
|
|
5573
|
+
),
|
|
5574
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5575
|
+
_material.Box,
|
|
5576
|
+
{
|
|
5577
|
+
sx: { display: "flex", alignItems: "center", gap: 0.5, mt: 0.5 },
|
|
5578
|
+
children: [
|
|
5579
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.InfoOutlined, { sx: { fontSize: 14, color: "text.secondary" } }),
|
|
5580
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "caption", color: "text.secondary", children: "Essa \xE9 a senha que voc\xEA utiliza para acessar o sistema atualmente." })
|
|
5581
|
+
]
|
|
5582
|
+
}
|
|
5583
|
+
)
|
|
5584
|
+
] }),
|
|
5585
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid, { size: 12, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, {}) }),
|
|
5557
5586
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid, { size: 12, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5558
5587
|
PasswordTextField,
|
|
5559
5588
|
{
|
|
5560
5589
|
name: "senhaNova",
|
|
5561
5590
|
label: "Nova Senha",
|
|
5562
|
-
value: _optionalChain([data, 'optionalAccess',
|
|
5591
|
+
value: _optionalChain([data, 'optionalAccess', _28 => _28.senhaNova]) || "",
|
|
5563
5592
|
onChange: handleChange,
|
|
5564
5593
|
...validationProps("senhaNova")
|
|
5565
5594
|
}
|
|
5566
5595
|
) }),
|
|
5596
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Grid, { size: 12, children: [
|
|
5597
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5598
|
+
PasswordTextField,
|
|
5599
|
+
{
|
|
5600
|
+
name: "senhaNovaConfirmar",
|
|
5601
|
+
label: "Confirmar Nova Senha",
|
|
5602
|
+
value: _optionalChain([data, 'optionalAccess', _29 => _29.senhaNovaConfirmar]) || "",
|
|
5603
|
+
onChange: handleChange,
|
|
5604
|
+
...validationProps("senhaNovaConfirmar")
|
|
5605
|
+
}
|
|
5606
|
+
),
|
|
5607
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5608
|
+
_material.Box,
|
|
5609
|
+
{
|
|
5610
|
+
sx: { display: "flex", alignItems: "center", gap: 0.5, mt: 0.5 },
|
|
5611
|
+
children: [
|
|
5612
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.InfoOutlined, { sx: { fontSize: 14, color: "text.secondary" } }),
|
|
5613
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "caption", color: "text.secondary", children: "Informe nos campos acima a nova senha que deseja utilizar." })
|
|
5614
|
+
]
|
|
5615
|
+
}
|
|
5616
|
+
)
|
|
5617
|
+
] }),
|
|
5567
5618
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Grid, { size: 12, children: [
|
|
5568
5619
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5569
5620
|
ValidatorMessage,
|
|
@@ -5599,6 +5650,13 @@ function AlterarSenha(props) {
|
|
|
5599
5650
|
isValid: temCaracterEspecial(),
|
|
5600
5651
|
message: "A nova senha deve ter ao menos um caracter especial"
|
|
5601
5652
|
}
|
|
5653
|
+
),
|
|
5654
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5655
|
+
ValidatorMessage,
|
|
5656
|
+
{
|
|
5657
|
+
isValid: asSenhasSaoIguais(),
|
|
5658
|
+
message: "A confirma\xE7\xE3o da nova senha deve ser igual \xE0 nova senha"
|
|
5659
|
+
}
|
|
5602
5660
|
)
|
|
5603
5661
|
] }),
|
|
5604
5662
|
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid, { size: 12, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Alert, { severity: "error", children: error }) })
|
|
@@ -6050,7 +6108,7 @@ function VerificationCodeInput({
|
|
|
6050
6108
|
_optionalChain([inputsRef, 'access', _51 => _51.current, 'access', _52 => _52[index - 1], 'optionalAccess', _53 => _53.focus, 'call', _54 => _54()]);
|
|
6051
6109
|
}
|
|
6052
6110
|
};
|
|
6053
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { display: "flex", gap: 1, children: Array.from({ length }).map((
|
|
6111
|
+
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
6112
|
_material.TextField,
|
|
6055
6113
|
{
|
|
6056
6114
|
autoFocus: i === 0,
|
|
@@ -6107,7 +6165,7 @@ function DialogVerificarOtp(props) {
|
|
|
6107
6165
|
setLoading(false);
|
|
6108
6166
|
}
|
|
6109
6167
|
}
|
|
6110
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (
|
|
6168
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
|
|
6111
6169
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Header, { children: [
|
|
6112
6170
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.Title, { children: "Entrar com senha tempor\xE1ria" }),
|
|
6113
6171
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.ActionClose, { onClose })
|
|
@@ -6282,7 +6340,7 @@ function OtpForm(props) {
|
|
|
6282
6340
|
{
|
|
6283
6341
|
onLoginSuccess,
|
|
6284
6342
|
open: isOpenVerificar,
|
|
6285
|
-
onClose: async (
|
|
6343
|
+
onClose: async (_) => {
|
|
6286
6344
|
setOpenVerificar(false);
|
|
6287
6345
|
},
|
|
6288
6346
|
payload: {
|
|
@@ -7831,7 +7889,7 @@ function FullMenuItem({
|
|
|
7831
7889
|
|
|
7832
7890
|
|
|
7833
7891
|
|
|
7834
|
-
|
|
7892
|
+
var _truncate = require('lodash/truncate'); var _truncate2 = _interopRequireDefault(_truncate);
|
|
7835
7893
|
|
|
7836
7894
|
|
|
7837
7895
|
// src/Surface/index.tsx
|
|
@@ -7953,7 +8011,7 @@ function MinMenuItem(props) {
|
|
|
7953
8011
|
},
|
|
7954
8012
|
children: [
|
|
7955
8013
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemIcon, { children: renderIcon(icon) }),
|
|
7956
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary:
|
|
8014
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary: _truncate2.default.call(void 0, label, { length: 12 }) }),
|
|
7957
8015
|
_optionalChain([opened, 'optionalAccess', _61 => _61.id]) === id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7958
8016
|
_material.Popper,
|
|
7959
8017
|
{
|
|
@@ -8341,7 +8399,7 @@ function reducer(state, action) {
|
|
|
8341
8399
|
case "toggleIsOpen":
|
|
8342
8400
|
return { ...state, isOpen: !state.isOpen };
|
|
8343
8401
|
case "deleteAppliedValue":
|
|
8344
|
-
const { [action.filterName]:
|
|
8402
|
+
const { [action.filterName]: _, ...rest } = state.appliedValues || {};
|
|
8345
8403
|
const { [action.filterName]: __, ...restFilterValues } = state.filterValues || {};
|
|
8346
8404
|
if (_optionalChain([action, 'optionalAccess', _90 => _90.storagePath])) {
|
|
8347
8405
|
const storage = JSON.parse(
|
|
@@ -8598,7 +8656,7 @@ function FilterChips({
|
|
|
8598
8656
|
if (!containsInAppliedValues)
|
|
8599
8657
|
return null;
|
|
8600
8658
|
return _react2.default.cloneElement(child, {
|
|
8601
|
-
onDelete: !child.props.disabledDelete ? (
|
|
8659
|
+
onDelete: !child.props.disabledDelete ? (_) => {
|
|
8602
8660
|
if (deleteFilterValue)
|
|
8603
8661
|
deleteFilterValue(child.props.name || "");
|
|
8604
8662
|
close();
|
|
@@ -8778,7 +8836,7 @@ function FilterRoot(props) {
|
|
|
8778
8836
|
|
|
8779
8837
|
function FilterSearchTextField(props) {
|
|
8780
8838
|
const { onChange, ...rest } = props;
|
|
8781
|
-
const debouncedHandleChange =
|
|
8839
|
+
const debouncedHandleChange = _debounce2.default.call(void 0, (query) => onChange(query), 500);
|
|
8782
8840
|
function handleChange(event) {
|
|
8783
8841
|
const value = event.target.value;
|
|
8784
8842
|
debouncedHandleChange(value);
|
|
@@ -9048,7 +9106,7 @@ function Table(props) {
|
|
|
9048
9106
|
break;
|
|
9049
9107
|
}
|
|
9050
9108
|
}
|
|
9051
|
-
function handleRowDoubleClick(params,
|
|
9109
|
+
function handleRowDoubleClick(params, _, details) {
|
|
9052
9110
|
if (onRowDoubleClick)
|
|
9053
9111
|
onRowDoubleClick("edit", params.id);
|
|
9054
9112
|
}
|
|
@@ -9596,7 +9654,7 @@ function Pagination(props) {
|
|
|
9596
9654
|
count: pages || 0,
|
|
9597
9655
|
showFirstButton: true,
|
|
9598
9656
|
showLastButton: true,
|
|
9599
|
-
onChange: (
|
|
9657
|
+
onChange: (_, _page) => {
|
|
9600
9658
|
if (onChangePage)
|
|
9601
9659
|
onChangePage(_page);
|
|
9602
9660
|
},
|
|
@@ -10325,14 +10383,14 @@ function Autocomplete(props) {
|
|
|
10325
10383
|
}
|
|
10326
10384
|
return endAdornment;
|
|
10327
10385
|
}
|
|
10328
|
-
const debouncedHandleSearch =
|
|
10386
|
+
const debouncedHandleSearch = _debounce2.default.call(void 0, (query, reason) => {
|
|
10329
10387
|
if (reason === "selectOption")
|
|
10330
10388
|
return;
|
|
10331
10389
|
if (onSearchChange)
|
|
10332
10390
|
onSearchChange(query, reason);
|
|
10333
10391
|
}, 500);
|
|
10334
10392
|
const handleSearch = _react.useCallback.call(void 0,
|
|
10335
|
-
(
|
|
10393
|
+
(_, v, reason) => {
|
|
10336
10394
|
debouncedHandleSearch(v, reason);
|
|
10337
10395
|
},
|
|
10338
10396
|
[debouncedHandleSearch]
|
|
@@ -10353,7 +10411,7 @@ function Autocomplete(props) {
|
|
|
10353
10411
|
loading: isLoading,
|
|
10354
10412
|
loadingText: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Loading, {}),
|
|
10355
10413
|
value,
|
|
10356
|
-
onChange: (
|
|
10414
|
+
onChange: (_, v) => handleChange(v),
|
|
10357
10415
|
options,
|
|
10358
10416
|
onInputChange: handleSearch,
|
|
10359
10417
|
getOptionLabel: renderValue,
|
|
@@ -10370,7 +10428,10 @@ function Autocomplete(props) {
|
|
|
10370
10428
|
inputLabel: { shrink: true },
|
|
10371
10429
|
input: {
|
|
10372
10430
|
...params.InputProps,
|
|
10373
|
-
startAdornment:
|
|
10431
|
+
startAdornment: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10432
|
+
_endAdornment,
|
|
10433
|
+
params.InputProps.startAdornment
|
|
10434
|
+
] })
|
|
10374
10435
|
}
|
|
10375
10436
|
},
|
|
10376
10437
|
...params,
|
|
@@ -10495,13 +10556,15 @@ function TransporterContainer(props) {
|
|
|
10495
10556
|
function TransporterRoot(props) {
|
|
10496
10557
|
const { scope, onChange, value, children } = props;
|
|
10497
10558
|
const store = createTransporterScope(scope);
|
|
10498
|
-
|
|
10559
|
+
_react.useEffect.call(void 0, () => {
|
|
10560
|
+
store.getState().setValue(value);
|
|
10561
|
+
}, [value, store]);
|
|
10499
10562
|
_react.useEffect.call(void 0, () => {
|
|
10500
10563
|
store.getState().setOnChange(onChange);
|
|
10501
10564
|
return () => {
|
|
10502
10565
|
store.getState().setOnChange(void 0);
|
|
10503
10566
|
};
|
|
10504
|
-
}, [scope, onChange]);
|
|
10567
|
+
}, [scope, onChange, store]);
|
|
10505
10568
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TransporterScopeProvider, { value: scope, children });
|
|
10506
10569
|
}
|
|
10507
10570
|
|
|
@@ -11907,7 +11970,7 @@ var AvatarUploader = ({ onSave, src }) => {
|
|
|
11907
11970
|
const [zoom, setZoom] = _react.useState.call(void 0, 1);
|
|
11908
11971
|
const [croppedAreaPixels, setCroppedAreaPixels] = _react.useState.call(void 0, null);
|
|
11909
11972
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
11910
|
-
const onCropComplete = _react.useCallback.call(void 0, (
|
|
11973
|
+
const onCropComplete = _react.useCallback.call(void 0, (_, croppedAreaPixels2) => {
|
|
11911
11974
|
setCroppedAreaPixels(croppedAreaPixels2);
|
|
11912
11975
|
}, []);
|
|
11913
11976
|
const handleSave = async () => {
|
|
@@ -11988,7 +12051,7 @@ var AvatarUploader = ({ onSave, src }) => {
|
|
|
11988
12051
|
min: 1,
|
|
11989
12052
|
max: 3,
|
|
11990
12053
|
step: 0.1,
|
|
11991
|
-
onChange: (
|
|
12054
|
+
onChange: (_, value) => setZoom(value)
|
|
11992
12055
|
}
|
|
11993
12056
|
),
|
|
11994
12057
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ButtonContainer, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Button2.default, { variant: "contained", onClick: handleSave, children: "Salvar" }) })
|
|
@@ -12155,7 +12218,7 @@ function DialogVerificarWhastapp(props) {
|
|
|
12155
12218
|
setLoading(false);
|
|
12156
12219
|
}
|
|
12157
12220
|
}
|
|
12158
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (
|
|
12221
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
|
|
12159
12222
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog_default.Header, { children: [
|
|
12160
12223
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.Title, { children: "Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp" }),
|
|
12161
12224
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Dialog_default.ActionClose, { onClose })
|
|
@@ -12323,7 +12386,7 @@ function LoginSeguranca(props) {
|
|
|
12323
12386
|
DialogVerificarWhastapp,
|
|
12324
12387
|
{
|
|
12325
12388
|
open: isOpenVerificarWhastapp,
|
|
12326
|
-
onClose: async (
|
|
12389
|
+
onClose: async (_) => {
|
|
12327
12390
|
setOpenVerificarWhatsapp(false);
|
|
12328
12391
|
},
|
|
12329
12392
|
payload: usuario,
|
|
@@ -12353,7 +12416,7 @@ function Profile(props) {
|
|
|
12353
12416
|
{
|
|
12354
12417
|
orientation: "vertical",
|
|
12355
12418
|
value: tabValue,
|
|
12356
|
-
onChange: (
|
|
12419
|
+
onChange: (_, value) => {
|
|
12357
12420
|
setTabValue(value);
|
|
12358
12421
|
},
|
|
12359
12422
|
sx: {
|