@bluemarble/bm-components 2.4.6 → 2.4.7
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.cjs +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4541,6 +4541,7 @@ var BaseDialogHeader = ({
|
|
|
4541
4541
|
// src/components/BaseDialog/BaseDialog.tsx
|
|
4542
4542
|
var BaseDialogContainer = ({
|
|
4543
4543
|
children,
|
|
4544
|
+
BoxProps: BoxProps3 = {},
|
|
4544
4545
|
...rest
|
|
4545
4546
|
}) => {
|
|
4546
4547
|
const { name } = useBaseDialogInstance();
|
|
@@ -4548,7 +4549,7 @@ var BaseDialogContainer = ({
|
|
|
4548
4549
|
return /* @__PURE__ */ React2.default.createElement(_material.Modal, { open: isOpened(name), onClose: () => closeDialog(name), ...rest }, /* @__PURE__ */ React2.default.createElement(
|
|
4549
4550
|
_material.Box,
|
|
4550
4551
|
{
|
|
4551
|
-
...
|
|
4552
|
+
...BoxProps3,
|
|
4552
4553
|
sx: {
|
|
4553
4554
|
outline: "none",
|
|
4554
4555
|
backgroundColor: "background.paper",
|
|
@@ -4557,7 +4558,7 @@ var BaseDialogContainer = ({
|
|
|
4557
4558
|
left: "50%",
|
|
4558
4559
|
transform: "translate(-50%, -50%)",
|
|
4559
4560
|
borderRadius: 1,
|
|
4560
|
-
..._optionalChain([
|
|
4561
|
+
..._optionalChain([BoxProps3, 'optionalAccess', _90 => _90.sx])
|
|
4561
4562
|
}
|
|
4562
4563
|
},
|
|
4563
4564
|
children
|
|
@@ -4711,7 +4712,7 @@ function useFilter(props = { defaultFilters: [] }) {
|
|
|
4711
4712
|
return defaultFilters || [];
|
|
4712
4713
|
});
|
|
4713
4714
|
const filterBy = _react.useCallback.call(void 0, (newFilter) => {
|
|
4714
|
-
const propToCompare = _optionalChain([newFilter, 'optionalAccess',
|
|
4715
|
+
const propToCompare = _optionalChain([newFilter, 'optionalAccess', _91 => _91.id]) ? "id" : "prop";
|
|
4715
4716
|
function removeRepeatedFilters(filter) {
|
|
4716
4717
|
return filter[propToCompare] !== newFilter[propToCompare];
|
|
4717
4718
|
}
|
|
@@ -5064,7 +5065,7 @@ function useAsyncGrid({
|
|
|
5064
5065
|
const params = new URLSearchParams({
|
|
5065
5066
|
page: String(page),
|
|
5066
5067
|
rowsPerPage: String(rowsPerPage2),
|
|
5067
|
-
searchText: _optionalChain([search2, 'optionalAccess',
|
|
5068
|
+
searchText: _optionalChain([search2, 'optionalAccess', _92 => _92.value]) || "",
|
|
5068
5069
|
sort: sortedBy2.map(({ prop, direction }) => `${prop}:${direction}`).join(","),
|
|
5069
5070
|
filters: filters2.map(
|
|
5070
5071
|
(filter) => `${filter.prop}:${filter.compareType}:${filter.value}`
|
|
@@ -5240,7 +5241,7 @@ function useFormHelper() {
|
|
|
5240
5241
|
);
|
|
5241
5242
|
const errorHandler = _react.useCallback.call(void 0,
|
|
5242
5243
|
(error, callback) => {
|
|
5243
|
-
if (_optionalChain([error, 'optionalAccess',
|
|
5244
|
+
if (_optionalChain([error, 'optionalAccess', _93 => _93.message]) === "cancel.navigation") return;
|
|
5244
5245
|
if (callback) {
|
|
5245
5246
|
if (error.response.data.code === "invalid.body") {
|
|
5246
5247
|
const errors = error.response.data.details.issues;
|
|
@@ -5297,7 +5298,7 @@ function CreateAuthProvider({
|
|
|
5297
5298
|
setStatus("autenticated");
|
|
5298
5299
|
return true;
|
|
5299
5300
|
} catch (error) {
|
|
5300
|
-
createAlert(_optionalChain([error, 'optionalAccess',
|
|
5301
|
+
createAlert(_optionalChain([error, 'optionalAccess', _94 => _94.response, 'optionalAccess', _95 => _95.data, 'optionalAccess', _96 => _96.error]), "error");
|
|
5301
5302
|
setStatus("unauthenticated");
|
|
5302
5303
|
throw error;
|
|
5303
5304
|
}
|
|
@@ -5371,11 +5372,11 @@ var _ApiHelper = class _ApiHelper {
|
|
|
5371
5372
|
async onError(_req, _res, _error) {
|
|
5372
5373
|
}
|
|
5373
5374
|
constructor(props) {
|
|
5374
|
-
this.public = _nullishCoalesce(_optionalChain([props, 'optionalAccess',
|
|
5375
|
-
this.middlewares = (_optionalChain([props, 'optionalAccess',
|
|
5376
|
-
this.onFinally = _optionalChain([props, 'optionalAccess',
|
|
5375
|
+
this.public = _nullishCoalesce(_optionalChain([props, 'optionalAccess', _97 => _97.public]), () => ( false));
|
|
5376
|
+
this.middlewares = (_optionalChain([props, 'optionalAccess', _98 => _98.middlewares]) || []).reverse();
|
|
5377
|
+
this.onFinally = _optionalChain([props, 'optionalAccess', _99 => _99.onFinally]) || (async () => {
|
|
5377
5378
|
});
|
|
5378
|
-
this.onError = _optionalChain([props, 'optionalAccess',
|
|
5379
|
+
this.onError = _optionalChain([props, 'optionalAccess', _100 => _100.onError]) || (async () => {
|
|
5379
5380
|
});
|
|
5380
5381
|
}
|
|
5381
5382
|
createMethods(methods) {
|
|
@@ -5456,7 +5457,7 @@ function decodeSessionToken({
|
|
|
5456
5457
|
sessionTokenName,
|
|
5457
5458
|
validate
|
|
5458
5459
|
}) {
|
|
5459
|
-
const token = _optionalChain([req, 'access',
|
|
5460
|
+
const token = _optionalChain([req, 'access', _101 => _101.headers, 'access', _102 => _102.authorization, 'optionalAccess', _103 => _103.split, 'call', _104 => _104(" "), 'access', _105 => _105[1]]) || req.cookies[sessionTokenName];
|
|
5460
5461
|
if (!token) {
|
|
5461
5462
|
res.status(401).json({ error: "Token inv\xE1lido", code: "token.invalid" });
|
|
5462
5463
|
return true;
|
|
@@ -5651,7 +5652,7 @@ var AuthHelper = class {
|
|
|
5651
5652
|
const data = await response.json();
|
|
5652
5653
|
const decodedToken = _jsonwebtoken2.default.decode(data.access_token);
|
|
5653
5654
|
const email = decodedToken.upn;
|
|
5654
|
-
const fullName = `${_optionalChain([decodedToken, 'optionalAccess',
|
|
5655
|
+
const fullName = `${_optionalChain([decodedToken, 'optionalAccess', _106 => _106.given_name])} ${_optionalChain([decodedToken, 'optionalAccess', _107 => _107.family_name])}`;
|
|
5655
5656
|
return { decodedToken, email, fullName };
|
|
5656
5657
|
}
|
|
5657
5658
|
createOauthCallbackGetServerSideProps({
|