infinity-forge 3.4.7 → 3.4.8
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/sites/components/default-pages/blog/components/blog-item/index.d.ts +1 -1
- package/dist/sites/components/default-pages/blog/components/blog-item/index.js +1 -1
- package/dist/sites/components/default-pages/blog/components/categorias/index.js +1 -1
- package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.d.ts +4 -0
- package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.js +42 -0
- package/dist/sites/components/default-pages/blog/components/featured-blog/index.js +1 -1
- package/dist/sites/components/default-pages/blog/components/side-box-newsletter/index.js +1 -1
- package/dist/sites/components/default-pages/blog/components/side-box-search/index.js +1 -1
- package/dist/sites/components/default-pages/blog/components/title-blog/index.js +1 -1
- package/dist/system/presentation/components/data/buttons/sidebar-button/index.js +1 -1
- package/dist/system/presentation/components/data/chat/card-message/index.d.ts +1 -1
- package/dist/system/presentation/components/data/chat/card-message/index.js +1 -1
- package/dist/system/presentation/components/data/chat/loader/index.js +1 -1
- package/dist/system/presentation/components/data/menu/components/menu-item/index.js +78 -0
- package/dist/system/presentation/components/data/menu/modes/collapsed-menu/index.js +43 -0
- package/dist/system/presentation/components/data/menu/modes/collapsed-menu/styles.js +15 -0
- package/dist/system/presentation/components/data/menu/modes/opened/index.js +50 -0
- package/dist/system/presentation/components/data/menu/modes/opened/styles.js +15 -0
- package/dist/system/presentation/components/data/notifications/card/index.d.ts +1 -1
- package/dist/system/presentation/components/data/notifications/card/index.js +1 -1
- package/dist/system/presentation/components/data/profile-infos/profile/index.js +1 -1
- package/dist/system/presentation/components/data/tab/tab-item/index.js +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/component.d.ts +5 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/component.js +34 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/index.d.ts +3 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/index.js +20 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.d.ts +0 -2
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.js +0 -47
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/index.js +0 -92
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/interfaces.d.ts +0 -6
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js +0 -36
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/content/index.js +0 -36
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +0 -38
- package/dist/system/presentation/components/layout/header/components/search-modal/index.js +40 -0
- package/dist/system/presentation/components/layout/header/components/search-modal/search-list/index.js +0 -52
- package/dist/system/presentation/components/layout/header/components/search-modal/trigger/index.js +0 -45
- package/dist/system/presentation/components/layout/header/version-01/index.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/columns.d.ts +1 -1
- package/dist/system/presentation/components/pages/menus/table/create.d.ts +1 -1
- package/dist/system/presentation/components/pages/menus/table/create.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/delete.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/edit.d.ts +1 -1
- package/dist/system/presentation/components/pages/menus/table/edit.js +1 -0
- package/dist/system/presentation/components/pages/menus/table/icon/index.js +34 -0
- package/dist/system/presentation/components/pages/users/table/columns.d.ts +1 -1
- package/dist/system/presentation/components/pages/users/table/create.d.ts +1 -1
- package/dist/system/presentation/components/pages/users/table/create.js +1 -1
- package/dist/system/presentation/components/pages/users/table/delete.js +1 -1
- package/dist/system/presentation/components/pages/users/table/edit.d.ts +1 -1
- package/dist/system/presentation/components/pages/users/table/edit.js +1 -0
- package/dist/system/presentation/context/auth/components/login/form-login/index.js +12 -0
- package/dist/system/presentation/context/auth/components/login/index.js +1 -1
- package/dist/system/presentation/context/auth/components/private-page/index.js +1 -1
- package/dist/system/presentation/hooks/locales/ibge/use-load-cities-by-uf/index.d.ts +1 -1
- package/dist/system/presentation/hooks/locales/ibge/use-load-cities-by-uf/index.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/delete/index.d.ts +0 -5
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/delete/index.js +0 -80
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/index.d.ts +0 -5
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/index.js +0 -111
- package/dist/system/presentation/hooks/ui/use-table/components/table/active-filters/index.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/active-filters/index.js +0 -78
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.d.ts +0 -4
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.js +0 -60
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.d.ts +0 -4
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.js +0 -35
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js +0 -144
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.d.ts +2 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.js +105 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/interfaces.d.ts +14 -0
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.js +0 -56
- package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/index.js +0 -34
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.js +0 -50
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/interfaces.d.ts +0 -6
- package/dist/system/presentation/hooks/ui/use-table/query/hook.js +1 -1
- package/dist/ui/components/carousel/carousel-lib/core/modules/observer/observer.js +2 -2
- package/dist/ui/components/carousel/carousel-lib/core/modules/resize/resize.js +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/hook.d.ts +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/hook.js +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/index.d.ts +3 -3
- package/dist/ui/components/form/input-cep/use-cep/providers/ibge/index.js +3 -3
- package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.js +62 -0
- package/dist/ui/components/form/input-date-picker/calendar/days/index.d.ts +2 -0
- package/dist/ui/components/form/input-date-picker/calendar/days/index.js +87 -0
- package/dist/ui/components/form/input-date-picker/calendar/months/index.d.ts +2 -0
- package/dist/ui/components/form/input-date-picker/calendar/months/index.js +66 -0
- package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.d.ts +0 -13
- package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.js +0 -18
- package/dist/ui/components/form/input-file/render-files/file-item/index.d.ts +3 -0
- package/dist/ui/components/form/input-file/render-files/file-item/index.js +49 -0
- package/dist/ui/components/form/input-mask/lib/core/errors/SyntheticChangeError.d.ts +0 -14
- package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.d.ts +0 -10
- package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.js +0 -204
- package/dist/ui/components/form/input-mask/lib/core/index.d.ts +5 -0
- package/dist/ui/components/form/input-mask/lib/core/index.js +15 -0
- package/dist/ui/components/form/input-mask/lib/core/utils/setInputAttributes.d.ts +0 -2
- package/dist/ui/components/form/input-mask/lib/mask/InputMask.d.ts +6 -0
- package/dist/ui/components/form/input-mask/lib/mask/InputMask.js +44 -0
- package/dist/ui/components/form/input-mask/lib/mask/index.d.ts +5 -0
- package/dist/ui/components/form/input-mask/lib/mask/index.js +26 -0
- package/dist/ui/components/form/input-mask/lib/mask/types.d.ts +61 -0
- package/dist/ui/components/form/input-mask/lib/mask/useMask.d.ts +3 -0
- package/dist/ui/components/form/input-mask/lib/mask/useMask.js +150 -0
- package/dist/ui/components/form/input-mask/lib/mask/utils/filter.d.ts +0 -14
- package/dist/ui/components/form/input-mask/lib/mask/utils/format.d.ts +0 -14
- package/dist/ui/components/form/input-mask/lib/mask/utils/formatToParts.d.ts +0 -17
- package/dist/ui/components/form/input-mask/lib/mask/utils/formatToReplacementObject.d.ts +0 -2
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.d.ts +0 -14
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.js +0 -25
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveSelection.d.ts +0 -18
- package/dist/ui/components/form/input-mask/lib/mask/utils/unformat.d.ts +0 -16
- package/dist/ui/components/form/input-mask/lib/mask/utils/validate.d.ts +0 -13
- package/dist/ui/components/form/input-mask/lib/mask/utils.d.ts +63 -0
- package/dist/ui/components/form/input-mask/lib/mask/utils.js +114 -0
- package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.d.ts +6 -0
- package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.js +58 -0
- package/dist/ui/components/form/input-mask/lib/number-format/index.d.ts +4 -0
- package/dist/ui/components/form/input-mask/lib/number-format/index.js +11 -0
- package/dist/ui/components/form/input-mask/lib/number-format/types.d.ts +26 -0
- package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.d.ts +3 -0
- package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.js +208 -0
- package/dist/ui/components/form/input-mask/lib/number-format/utils/localizeValues.d.ts +0 -7
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.d.ts +0 -20
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.js +0 -123
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveMinimumFractionDigits.d.ts +0 -11
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveOptions.d.ts +0 -5
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveSelection.d.ts +0 -24
- package/dist/ui/components/form/input-seo/input-meta-image/index.d.ts +1 -1
- package/dist/ui/components/form/input-seo/input-meta-image/index.js +1 -1
- package/dist/ui/components/menu-mobile/components/nav-links/index.js +1 -1
- package/package.json +1 -1
package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js
CHANGED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Messages = void 0;
|
|
27
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
var ui_1 = require("../../../../../../../../ui");
|
|
29
|
-
var content_1 = require("./content");
|
|
30
|
-
var S = __importStar(require("./styles"));
|
|
31
|
-
var styles_1 = require("../styles");
|
|
32
|
-
function Messages() {
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Messages', children: (0, jsx_runtime_1.jsx)(S.Messages, { id: 'messages-btn', children: (0, jsx_runtime_1.jsx)(ui_1.Tooltip, { idTooltip: 'Messages', enableArrow: true, bgColor: '#fff', enableHover: true, content: (0, jsx_runtime_1.jsx)(content_1.Content, {}), trigger: (0, jsx_runtime_1.jsx)(styles_1.ActionBox, { children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconFullFieldChat' }) }) }) }) }));
|
|
34
|
-
}
|
|
35
|
-
exports.Messages = Messages;
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Content = void 0;
|
|
27
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
var ui_1 = require("../../../../../../../../../ui");
|
|
29
|
-
var system_1 = require("../../../../../../../../../system");
|
|
30
|
-
var S = __importStar(require("./styles"));
|
|
31
|
-
function Content() {
|
|
32
|
-
var _a = (0, system_1.useAuthAdmin)(), user = _a.user, signOut = _a.signOut;
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Content', children: (0, jsx_runtime_1.jsxs)(S.Content, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'user-profile', children: (0, jsx_runtime_1.jsxs)("div", { className: 'user-info', children: [(0, jsx_runtime_1.jsx)("h6", { className: 'font-16-semibold', children: user === null || user === void 0 ? void 0 : user.firstName }), (0, jsx_runtime_1.jsx)("p", { className: 'font-14-regular email', children: user === null || user === void 0 ? void 0 : user.emailAddress })] }) }), (0, jsx_runtime_1.jsx)("div", { className: 'divider', children: (0, jsx_runtime_1.jsx)("button", { className: 'sign-out-button font-14-regular', type: 'button', onClick: function () { return signOut(); }, children: "Sair" }) })] }) }));
|
|
34
|
-
}
|
|
35
|
-
exports.Content = Content;
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Profile = void 0;
|
|
27
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
var ui_1 = require("../../../../../../../../ui");
|
|
29
|
-
var system_1 = require("../../../../../../../../system");
|
|
30
|
-
var content_1 = require("./content");
|
|
31
|
-
var S = __importStar(require("./styles"));
|
|
32
|
-
function Profile() {
|
|
33
|
-
var user = (0, system_1.useAuthAdmin)().user;
|
|
34
|
-
var avatarImage = (user === null || user === void 0 ? void 0 : user.avatar) || '/images/default-profile.png';
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Profile', children: (0, jsx_runtime_1.jsx)(S.Profile, { id: 'profile-btn', children: (0, jsx_runtime_1.jsx)(ui_1.Tooltip, { idTooltip: 'Profile', bgColor: '#fff', trigger: (0, jsx_runtime_1.jsx)(system_1.Avatar, { image: avatarImage }), enableArrow: true, content: (0, jsx_runtime_1.jsx)(content_1.Content, {}) }) }) }));
|
|
36
|
-
}
|
|
37
|
-
exports.Profile = Profile;
|
|
38
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SearchModal = void 0;
|
|
27
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
var react_1 = require("react");
|
|
29
|
+
var ui_1 = require("../../../../../../../ui/index.js");
|
|
30
|
+
var trigger_1 = require("./trigger/index.js");
|
|
31
|
+
var search_list_1 = require("./search-list/index.js");
|
|
32
|
+
var S = __importStar(require("./styles.js"));
|
|
33
|
+
function SearchModal() {
|
|
34
|
+
var _a = (0, react_1.useState)(false), open = _a[0], setOpen = _a[1];
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'SearchModal', children: (0, jsx_runtime_1.jsxs)(S.SearchModal, { children: [(0, jsx_runtime_1.jsx)(ui_1.Modal, { open: open, onClose: function () { return setOpen(false); }, stylesContent: {
|
|
36
|
+
padding: 0,
|
|
37
|
+
}, hideCloseButton: true, styles: { width: '100vw', maxWidth: '512px', borderRadius: 10, padding: 0, overflow: 'hidden' }, children: (0, jsx_runtime_1.jsx)(search_list_1.SearchList, { setOpen: setOpen }) }), (0, jsx_runtime_1.jsx)(trigger_1.SearchTrigger, { onClick: function () { return setOpen(true); } })] }) }));
|
|
38
|
+
}
|
|
39
|
+
exports.SearchModal = SearchModal;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.SearchList = void 0;
|
|
30
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
-
var react_1 = require("react");
|
|
32
|
-
var link_1 = __importDefault(require("next/link"));
|
|
33
|
-
var system_1 = require("../../../../../../../../system");
|
|
34
|
-
var ui_1 = require("../../../../../../../../ui");
|
|
35
|
-
var S = __importStar(require("./styles"));
|
|
36
|
-
function SearchList(_a) {
|
|
37
|
-
var _b;
|
|
38
|
-
var setOpen = _a.setOpen;
|
|
39
|
-
var _c = (0, react_1.useState)(''), searchText = _c[0], setSearchText = _c[1];
|
|
40
|
-
var data = (0, system_1.useLoadMenu)().data;
|
|
41
|
-
var filteredList = (_b = data.items) === null || _b === void 0 ? void 0 : _b.filter(function (list) {
|
|
42
|
-
return JSON.stringify(list).toLowerCase().includes(searchText.toLowerCase());
|
|
43
|
-
});
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'SearchList', children: (0, jsx_runtime_1.jsxs)(S.SearchList, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'header', children: [(0, jsx_runtime_1.jsx)(ui_1.FormHandler, { children: (0, jsx_runtime_1.jsx)(system_1.InputSearch, { onChange: function (value) { return setSearchText(value); } }) }), (0, jsx_runtime_1.jsx)("button", { className: 'close', type: 'button', onClick: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'CloseIcon' }) })] }), (0, jsx_runtime_1.jsx)("div", { className: 'list', children: (filteredList === null || filteredList === void 0 ? void 0 : filteredList.length) === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: 'not-found', children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconNotFound' }) }), (0, jsx_runtime_1.jsx)("p", { className: 'font-20-regular', children: "Nenhum resultado encontrado" })] })) : (filteredList === null || filteredList === void 0 ? void 0 : filteredList.map(function (item, index) {
|
|
45
|
-
var _a;
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h6", { className: "font-12-bold uppercase ".concat(index !== 0 && 'last'), children: item.title }), filteredList[index].route && ((0, jsx_runtime_1.jsxs)(link_1.default, { href: filteredList[index].route, className: 'item', children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: filteredList[index].icon }) }), (0, jsx_runtime_1.jsxs)("span", { className: 'text-box font-14-regular', children: [(0, jsx_runtime_1.jsx)("span", { className: 'name', children: filteredList[index].title }), (0, jsx_runtime_1.jsx)("span", { className: 'href', children: filteredList[index].route })] })] }, filteredList[index].title)), (_a = item.items) === null || _a === void 0 ? void 0 : _a.map(function (subItem) {
|
|
47
|
-
return subItem.route ? ((0, jsx_runtime_1.jsxs)(link_1.default, { href: subItem.route, className: 'item', children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: subItem.icon }) }), (0, jsx_runtime_1.jsxs)("span", { className: 'text-box font-14-regular', children: [(0, jsx_runtime_1.jsx)("span", { className: 'name', children: subItem.title }), (0, jsx_runtime_1.jsx)("span", { className: 'href', children: subItem.route })] })] }, subItem.title)) : null;
|
|
48
|
-
})] }, item.title + '-' + index));
|
|
49
|
-
})) })] }) }));
|
|
50
|
-
}
|
|
51
|
-
exports.SearchList = SearchList;
|
|
52
|
-
//# sourceMappingURL=index.js.map
|
package/dist/system/presentation/components/layout/header/components/search-modal/trigger/index.js
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.SearchTrigger = void 0;
|
|
38
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
-
var ui_1 = require("../../../../../../../../ui");
|
|
40
|
-
var S = __importStar(require("./styles"));
|
|
41
|
-
function SearchTrigger(props) {
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'SearchTrigger', children: (0, jsx_runtime_1.jsxs)(S.SearchTrigger, __assign({ "aria-label": 'Search' }, props, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'LupaIcon' }) }), (0, jsx_runtime_1.jsx)("span", { className: 'placeholder font-14-regular', children: "Pesquisar..." })] })) }));
|
|
43
|
-
}
|
|
44
|
-
exports.SearchTrigger = SearchTrigger;
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -41,4 +41,4 @@ function HeaderVersion01(_a) {
|
|
|
41
41
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'HeaderCarbon', children: (0, jsx_runtime_1.jsx)(S.HeaderVersion01, { id: 'header', children: (0, jsx_runtime_1.jsxs)(ui_1.Container, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'left', children: (0, jsx_runtime_1.jsx)("div", { className: 'logo-wrapper', children: (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'logo', children: (0, jsx_runtime_1.jsx)(link_1.default, { className: 'logo', href: (logo === null || logo === void 0 ? void 0 : logo.href) || '/', children: (0, jsx_runtime_1.jsx)("img", { src: (logo === null || logo === void 0 ? void 0 : logo.src) || '/images/logo.png', alt: 'header-logo' }) }) }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'right', children: [showHamburger && ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'open_menu_button', children: (0, jsx_runtime_1.jsx)("button", { className: 'open_menu', onClick: function () { return setOpenMenu(true); }, type: 'button', children: (0, jsx_runtime_1.jsx)("svg", { xmlns: 'http://www.w3.org/2000/svg', fill: 'none', viewBox: '0 0 24 24', "stroke-width": '2', stroke: 'currentColor', children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M3.75 6.75h16.5M3.75 12H12m-8.25 5.25h16.5' }) }) }) })), (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'search_modal', children: (0, jsx_runtime_1.jsx)(system_1.SearchModal, {}) }), (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'menu-right', children: (0, jsx_runtime_1.jsx)(system_1.MenuRight, { workspaces: workspaces }) })] })] }) }) }));
|
|
42
42
|
}
|
|
43
43
|
exports.HeaderVersion01 = HeaderVersion01;
|
|
44
|
-
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DynamicFormHandlerProps } from '../../../../../../ui/index.js';
|
|
2
2
|
import { Menu } from '../../../../../../system/index.js';
|
|
3
|
-
export declare function useCreateTable(queryKey: string):
|
|
3
|
+
export declare function useCreateTable(queryKey: string): DynamicFormHandlerProps<Menu>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DynamicFormHandlerProps } from '../../../../../../ui/index.js';
|
|
2
2
|
import { Menu } from '../../../../../../system/index.js';
|
|
3
|
-
export declare function useEditTable(queryKey: string):
|
|
3
|
+
export declare function useEditTable(queryKey: string): DynamicFormHandlerProps<Menu>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.IconMenu = void 0;
|
|
27
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
var S = __importStar(require("./style.js"));
|
|
29
|
+
function IconMenu(_a) {
|
|
30
|
+
var icon = _a.icon;
|
|
31
|
+
return (0, jsx_runtime_1.jsx)(S.IconMenu, { dangerouslySetInnerHTML: { __html: icon || "" } });
|
|
32
|
+
}
|
|
33
|
+
exports.IconMenu = IconMenu;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DynamicFormHandlerProps } from '../../../../../../ui/index.js';
|
|
2
2
|
import { User } from '../../../../../../system/index.js';
|
|
3
|
-
export declare function useCreateTable(queryKey: string):
|
|
3
|
+
export declare function useCreateTable(queryKey: string): DynamicFormHandlerProps<User>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DynamicFormHandlerProps } from '../../../../../../ui/index.js';
|
|
2
2
|
import { User } from '../../../../../../system/index.js';
|
|
3
|
-
export declare function useEditTable(queryKey: string):
|
|
3
|
+
export declare function useEditTable(queryKey: string): DynamicFormHandlerProps<User>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormLogin = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var ui_1 = require("../../../../../../../ui/index.js");
|
|
6
|
+
var context_1 = require("../../../context.js");
|
|
7
|
+
function FormLogin() {
|
|
8
|
+
var signIn = (0, context_1.useAuthAdmin)().signIn;
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)(ui_1.FormHandler, { button: { text: 'Entrar' }, initialData: { emailAddress: '', password: '' }, onSucess: signIn, debugMode: true, children: [(0, jsx_runtime_1.jsx)(ui_1.Input, { type: 'email', label: 'Email', name: 'emailAddress', placeholder: 'Digite seu usu\u00E1rio' }), (0, jsx_runtime_1.jsx)(ui_1.InputPassword, { name: 'password', label: 'Senha', placeholder: 'Digite sua senha' })] }));
|
|
10
|
+
}
|
|
11
|
+
exports.FormLogin = FormLogin;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -35,4 +35,4 @@ function Login() {
|
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'login', children: (0, jsx_runtime_1.jsxs)(S.Login, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'content', children: [(0, jsx_runtime_1.jsx)("div", { className: 'empty' }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: 'logo', children: (0, jsx_runtime_1.jsx)(ui_1.NextImage, { src: '/images/login-logo.png', alt: ' ' }) }), (0, jsx_runtime_1.jsx)("div", { className: 'text', children: (0, jsx_runtime_1.jsx)("h5", { className: 'font-20-bold', children: "Seja bem vindo!" }) }), (0, jsx_runtime_1.jsx)(form_login_1.FormLogin, {})] }), (0, jsx_runtime_1.jsx)("div", { className: 'contact-footer', children: (0, jsx_runtime_1.jsxs)("span", { children: ["Powered by", ' ', (0, jsx_runtime_1.jsxs)("a", { target: '_blank', href: (_a = Configurations === null || Configurations === void 0 ? void 0 : Configurations.poweredBy) === null || _a === void 0 ? void 0 : _a.link, children: [(_b = Configurations === null || Configurations === void 0 ? void 0 : Configurations.poweredBy) === null || _b === void 0 ? void 0 : _b.name, "."] }), ' ', "Todos os direitos reservados."] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: 'image', children: (0, jsx_runtime_1.jsx)(ui_1.NextImage, { src: '/images/login-left.png', alt: 'Imagem de login' }) })] }) }));
|
|
36
36
|
}
|
|
37
37
|
exports.Login = Login;
|
|
38
|
-
//#
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -138,4 +138,4 @@ function LoginControl(_a) {
|
|
|
138
138
|
var noHaveUser = !user && router.isReady && interceptorIsReady && !loading;
|
|
139
139
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Loading && (0, jsx_runtime_1.jsx)(ui_1.LoadingScreen, { size: 30, color: '#000' }), noHaveUser && (0, jsx_runtime_1.jsx)(LoginComponent, {})] }));
|
|
140
140
|
}
|
|
141
|
-
//#
|
|
141
|
+
//# sourceMappingURL=index.js.map
|
package/dist/system/presentation/hooks/ui/use-table/components/table/actions/delete/index.js
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ActionDelete = void 0;
|
|
40
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
-
var react_1 = require("react");
|
|
42
|
-
var ui_1 = require("../../../../../../../../../ui");
|
|
43
|
-
var system_1 = require("../../../../../../../../../system");
|
|
44
|
-
function ActionDelete(_a) {
|
|
45
|
-
var _b, _c;
|
|
46
|
-
var action = _a.action, table = _a.table;
|
|
47
|
-
var _d = (0, react_1.useState)(false), loading = _d[0], setLoading = _d[1];
|
|
48
|
-
var roleUser = (0, system_1.useAuthAdmin)().roleUser;
|
|
49
|
-
var Configurations = (0, system_1.useInfraInjection)().Configurations;
|
|
50
|
-
var enableToDelete = !((_c = (_b = Configurations === null || Configurations === void 0 ? void 0 : Configurations.table) === null || _b === void 0 ? void 0 : _b.accessControl) === null || _c === void 0 ? void 0 : _c.delete) ? true : Configurations.table.accessControl.delete.includes(roleUser);
|
|
51
|
-
if (!enableToDelete) {
|
|
52
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
53
|
-
}
|
|
54
|
-
function deleteItem() {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
56
|
-
var _a;
|
|
57
|
-
return __generator(this, function (_b) {
|
|
58
|
-
switch (_b.label) {
|
|
59
|
-
case 0:
|
|
60
|
-
_b.trys.push([0, 2, 3, 4]);
|
|
61
|
-
setLoading(true);
|
|
62
|
-
return [4 /*yield*/, action(table)];
|
|
63
|
-
case 1:
|
|
64
|
-
_b.sent();
|
|
65
|
-
return [3 /*break*/, 4];
|
|
66
|
-
case 2:
|
|
67
|
-
_a = _b.sent();
|
|
68
|
-
return [3 /*break*/, 4];
|
|
69
|
-
case 3:
|
|
70
|
-
setLoading(false);
|
|
71
|
-
return [7 /*endfinally*/];
|
|
72
|
-
case 4: return [2 /*return*/];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Tooltip, { idTooltip: 'Actions', bgColor: '#fff', enableHover: true, content: 'Excluir', trigger: (0, jsx_runtime_1.jsx)("button", { className: 'action-button', onClick: deleteItem, type: 'button', children: loading ? (0, jsx_runtime_1.jsx)(ui_1.LoaderCircle, { size: 13 }) : (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconDelete' }) }) }));
|
|
78
|
-
}
|
|
79
|
-
exports.ActionDelete = ActionDelete;
|
|
80
|
-
//# sourceMappingURL=index.js.map
|