infinity-forge 2.3.8 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sites/components/default-pages/blog/components/blog-item/share/index.js +2 -2
- package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.d.ts +1 -1
- package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.js +2 -2
- package/dist/system/presentation/components/data/menu/components/menu-item/index.js +3 -3
- package/dist/system/presentation/components/data/menu/modes/collapsed-menu/index.js +5 -5
- package/dist/system/presentation/components/data/menu/modes/collapsed-menu/styles.js +1 -1
- package/dist/system/presentation/components/data/menu/modes/opened/index.js +3 -3
- package/dist/system/presentation/components/data/menu/modes/opened/styles.js +1 -1
- package/dist/system/presentation/components/data/tab/tab-item/index.d.ts +0 -5
- package/dist/system/presentation/components/data/tab/tab-item/index.js +0 -46
- package/dist/system/presentation/components/data/tab/tab-item/styles.d.ts +0 -8
- package/dist/system/presentation/components/layout/header/components/index.d.ts +0 -2
- package/dist/system/presentation/components/layout/header/components/index.js +0 -19
- package/dist/system/presentation/components/layout/header/components/menu-right/index.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.js +5 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/interfaces.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js +5 -5
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/content/index.js +5 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +6 -5
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/search-modal/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/search-modal/search-list/index.js +5 -4
- package/dist/system/presentation/components/layout/header/components/search-modal/trigger/index.js +3 -3
- package/dist/system/presentation/components/layout/header/version-01/index.d.ts +0 -2
- package/dist/system/presentation/components/layout/header/version-01/index.js +0 -45
- package/dist/system/presentation/components/pages/menus/table/columns.d.ts +0 -3
- package/dist/system/presentation/components/pages/menus/table/columns.js +0 -21
- package/dist/system/presentation/components/pages/menus/table/create.d.ts +0 -3
- package/dist/system/presentation/components/pages/menus/table/create.js +0 -72
- package/dist/system/presentation/components/pages/menus/table/delete.js +0 -71
- package/dist/system/presentation/components/pages/menus/table/edit.d.ts +0 -3
- package/dist/system/presentation/components/pages/menus/table/edit.js +0 -78
- package/dist/system/presentation/components/pages/menus/table/icon/index.js +1 -1
- package/dist/system/presentation/components/pages/menus/table/index.d.ts +0 -4
- package/dist/system/presentation/components/pages/menus/table/index.js +0 -21
- package/dist/system/presentation/components/pages/users/table/columns.d.ts +0 -3
- package/dist/system/presentation/components/pages/users/table/create.d.ts +0 -3
- package/dist/system/presentation/components/pages/users/table/create.js +0 -75
- package/dist/system/presentation/components/pages/users/table/delete.js +0 -74
- package/dist/system/presentation/components/pages/users/table/edit.d.ts +0 -3
- package/dist/system/presentation/components/pages/users/table/edit.js +0 -83
- package/dist/system/presentation/components/pages/users/table/index.d.ts +0 -4
- package/dist/system/presentation/components/pages/users/table/index.js +0 -21
- package/dist/system/presentation/context/auth/components/login/form-login/index.js +2 -2
- package/dist/system/presentation/context/auth/components/login/index.js +0 -38
- package/dist/system/presentation/context/auth/components/private-page/index.d.ts +0 -2
- package/dist/system/presentation/context/auth/components/private-page/index.js +0 -141
- package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +0 -1
- package/dist/system/presentation/hooks/ui/use-table/components/index.js +0 -18
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/actions/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/active-filters/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/active-filters/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.d.ts +2 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js +5 -4
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/index.js +10 -10
- package/dist/system/presentation/hooks/ui/use-table/components/table/interfaces.d.ts +2 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.d.ts +2 -2
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.js +4 -4
- package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.js +3 -3
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/interfaces.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/query/get-query-arguments-table.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +0 -5
- package/dist/system/presentation/hooks/ui/use-table/query/hook.js +0 -52
- package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +0 -2
- package/dist/system/presentation/hooks/ui/use-table/query/index.js +0 -19
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/getBreakpoint.js +0 -35
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.d.ts +0 -7
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.js +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/breakpoints/setBreakpoint.js +0 -94
- package/dist/ui/components/carousel/carousel-lib/core/classes/index.d.ts +0 -7
- package/dist/ui/components/carousel/carousel-lib/core/classes/index.js +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/events/index.js +0 -77
- package/dist/ui/components/carousel/carousel-lib/core/events/onLoad.js +0 -14
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchEnd.js +0 -194
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchMove.js +0 -314
- package/dist/ui/components/carousel/carousel-lib/core/events/onTouchStart.js +0 -154
- package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.d.ts +0 -7
- package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.js +0 -12
- package/dist/ui/components/carousel/carousel-lib/core/loop/index.d.ts +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/loop/index.js +0 -14
- package/dist/ui/components/carousel/carousel-lib/core/loop/loopCreate.js +0 -57
- package/dist/ui/components/carousel/carousel-lib/core/loop/loopFix.js +0 -230
- 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/carousel/carousel-lib/core/slide/index.d.ts +0 -17
- package/dist/ui/components/carousel/carousel-lib/core/slide/index.js +0 -22
- package/dist/ui/components/carousel/carousel-lib/core/slide/slideTo.js +0 -160
- package/dist/ui/components/carousel/carousel-lib/core/slide/slideToClickedSlide.js +0 -46
- package/dist/ui/components/carousel/carousel-lib/core/transition/index.d.ts +0 -9
- package/dist/ui/components/carousel/carousel-lib/core/transition/index.js +0 -14
- package/dist/ui/components/carousel/carousel-lib/core/transition/transitionEnd.js +0 -18
- package/dist/ui/components/carousel/carousel-lib/core/transition/transitionStart.js +0 -19
- package/dist/ui/components/carousel/carousel-lib/core/translate/getTranslate.js +0 -21
- package/dist/ui/components/carousel/carousel-lib/core/translate/index.d.ts +0 -13
- package/dist/ui/components/carousel/carousel-lib/core/translate/index.js +0 -18
- package/dist/ui/components/carousel/carousel-lib/core/translate/translateTo.js +0 -81
- package/dist/ui/components/carousel/carousel-lib/core/update/index.d.ts +0 -21
- package/dist/ui/components/carousel/carousel-lib/core/update/index.js +0 -26
- package/dist/ui/components/carousel/carousel-lib/core/update/updateActiveIndex.js +0 -125
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSize.js +0 -45
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSlides.js +0 -306
- package/dist/ui/components/carousel/carousel-lib/core/update/updateSlidesClasses.js +0 -69
- package/dist/ui/components/form/handler/i18n/capture-i18n-errors/index.d.ts +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-cep/use-cep/providers/index.d.ts +1 -1
- package/dist/ui/components/form/input-cep/use-cep/providers/index.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/cleanValue.d.ts +1 -1
- package/dist/ui/components/form/input-currency/components/utils/cleanValue.js +4 -4
- package/dist/ui/components/form/input-currency/components/utils/formatValue.d.ts +1 -1
- package/dist/ui/components/form/input-currency/components/utils/formatValue.js +2 -2
- package/dist/ui/components/form/input-currency/components/utils/getLocaleConfig.d.ts +1 -1
- package/dist/ui/components/form/input-currency/components/utils/getSuffix.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/index.d.ts +8 -8
- package/dist/ui/components/form/input-currency/components/utils/index.js +8 -8
- package/dist/ui/components/form/input-currency/components/utils/parseAbbrValue.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/removeInvalidChars.js +1 -1
- package/dist/ui/components/form/input-currency/components/utils/removeSeparators.js +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.js +3 -3
- package/dist/ui/components/form/input-date-picker/calendar/days/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/days/index.js +2 -2
- package/dist/ui/components/form/input-date-picker/calendar/months/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/months/index.js +2 -2
- package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.d.ts +1 -1
- package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.js +1 -1
- package/dist/ui/components/form/input-file/render-files/file-item/index.d.ts +2 -2
- package/dist/ui/components/form/input-file/render-files/file-item/index.js +3 -3
- package/dist/ui/components/form/input-mask/lib/core/errors/SyntheticChangeError.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.js +2 -2
- package/dist/ui/components/form/input-mask/lib/core/index.d.ts +5 -5
- package/dist/ui/components/form/input-mask/lib/core/index.js +4 -4
- package/dist/ui/components/form/input-mask/lib/core/utils/setInputAttributes.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/InputMask.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/mask/InputMask.js +2 -2
- package/dist/ui/components/form/input-mask/lib/mask/index.d.ts +5 -5
- package/dist/ui/components/form/input-mask/lib/mask/index.js +3 -3
- package/dist/ui/components/form/input-mask/lib/mask/types.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/useMask.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/useMask.js +7 -7
- package/dist/ui/components/form/input-mask/lib/mask/utils/filter.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/format.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/formatToParts.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/formatToReplacementObject.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.js +3 -3
- package/dist/ui/components/form/input-mask/lib/mask/utils/resolveSelection.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/mask/utils/unformat.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils/validate.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/mask/utils.js +5 -5
- package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.js +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/index.d.ts +4 -4
- package/dist/ui/components/form/input-mask/lib/number-format/index.js +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/types.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.js +6 -6
- package/dist/ui/components/form/input-mask/lib/number-format/utils/localizeValues.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.d.ts +2 -2
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.js +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveMinimumFractionDigits.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveOptions.d.ts +1 -1
- package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveSelection.d.ts +2 -2
- package/package.json +75 -75
|
@@ -1,141 +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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
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;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
exports.PrivatePage = void 0;
|
|
63
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
64
|
-
var react_1 = require("react");
|
|
65
|
-
var router_1 = require("next/router");
|
|
66
|
-
var axios_1 = __importStar(require("axios"));
|
|
67
|
-
var ui_1 = require("../../../../../../ui/index.js");
|
|
68
|
-
var login_1 = require("../login/index.js");
|
|
69
|
-
var context_1 = require("../../context.js");
|
|
70
|
-
function PrivatePage(_a) {
|
|
71
|
-
var children = _a.children, roles = _a.roles, signInRole = _a.signInRole;
|
|
72
|
-
var _b = (0, react_1.useState)(false), interceptorIsReady = _b[0], setInterceptorIsReady = _b[1];
|
|
73
|
-
var router = (0, router_1.useRouter)();
|
|
74
|
-
var _c = (0, context_1.useAuthAdmin)(), user = _c.user, roleUser = _c.roleUser, signOut = _c.signOut, ForbiddenCompoent = _c.ForbiddenCompoent;
|
|
75
|
-
var hasAccess = roles && roles.length > 0 ? roles.includes(roleUser) : true;
|
|
76
|
-
(0, react_1.useEffect)(function () {
|
|
77
|
-
var _a, _b;
|
|
78
|
-
var interceptorId;
|
|
79
|
-
if (user && !((_b = (_a = user[roleUser]) === null || _a === void 0 ? void 0 : _a.interceptor) === null || _b === void 0 ? void 0 : _b.disableInterceptor)) {
|
|
80
|
-
interceptorId = axios_1.default.interceptors.response.use(function (r) { return r; }, function (err) {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
if (err instanceof axios_1.AxiosError) {
|
|
83
|
-
if (err.code === 'ERR_NETWORK') {
|
|
84
|
-
signOut();
|
|
85
|
-
}
|
|
86
|
-
if (((_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
|
|
87
|
-
signOut();
|
|
88
|
-
}
|
|
89
|
-
if (((_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
|
|
90
|
-
router.push('/403');
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
throw err;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
setInterceptorIsReady(true);
|
|
97
|
-
return function () {
|
|
98
|
-
if (interceptorId !== undefined) {
|
|
99
|
-
axios_1.default.interceptors.response.eject(interceptorId);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}, []);
|
|
103
|
-
return ((0, jsx_runtime_1.jsxs)(ui_1.Error, { name: 'private-page', children: [user && hasAccess && (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'private-page', children: children }), user && !hasAccess && (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'private-page_danied', children: ForbiddenCompoent ? (0, jsx_runtime_1.jsx)(ForbiddenCompoent, {}) : (0, jsx_runtime_1.jsx)("div", { children: "Negado" }) }), !user && (0, jsx_runtime_1.jsx)(LoginControl, { interceptorIsReady: interceptorIsReady, signInRole: signInRole })] }));
|
|
104
|
-
}
|
|
105
|
-
exports.PrivatePage = PrivatePage;
|
|
106
|
-
function LoginControl(_a) {
|
|
107
|
-
var _this = this;
|
|
108
|
-
var _b, _c, _d, _e;
|
|
109
|
-
var interceptorIsReady = _a.interceptorIsReady, signInRole = _a.signInRole;
|
|
110
|
-
var _f = (0, react_1.useState)(false), loading = _f[0], setLoading = _f[1];
|
|
111
|
-
var _g = (0, context_1.useAuthAdmin)(), user = _g.user, roles = _g.roles, loadUser = _g.loadUser;
|
|
112
|
-
var router = (0, router_1.useRouter)();
|
|
113
|
-
(0, react_1.useEffect)(function () {
|
|
114
|
-
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
115
|
-
var _a;
|
|
116
|
-
return __generator(this, function (_b) {
|
|
117
|
-
switch (_b.label) {
|
|
118
|
-
case 0:
|
|
119
|
-
_b.trys.push([0, 2, 3, 4]);
|
|
120
|
-
setLoading(true);
|
|
121
|
-
return [4 /*yield*/, loadUser()];
|
|
122
|
-
case 1:
|
|
123
|
-
_b.sent();
|
|
124
|
-
return [3 /*break*/, 4];
|
|
125
|
-
case 2:
|
|
126
|
-
_a = _b.sent();
|
|
127
|
-
return [3 /*break*/, 4];
|
|
128
|
-
case 3:
|
|
129
|
-
setLoading(false);
|
|
130
|
-
return [7 /*endfinally*/];
|
|
131
|
-
case 4: return [2 /*return*/];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}); })();
|
|
135
|
-
}, [user]);
|
|
136
|
-
var LoginComponent = roles && ((_c = (_b = roles[signInRole]) === null || _b === void 0 ? void 0 : _b.signInConfig) === null || _c === void 0 ? void 0 : _c.Component) ? (_e = (_d = roles[signInRole]) === null || _d === void 0 ? void 0 : _d.signInConfig) === null || _e === void 0 ? void 0 : _e.Component : login_1.Login;
|
|
137
|
-
var Loading = (!user && !interceptorIsReady && !router.isReady) || loading;
|
|
138
|
-
var noHaveUser = !user && router.isReady && interceptorIsReady && !loading;
|
|
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
|
-
}
|
|
141
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./table/index.js";
|
|
@@ -1,18 +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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./table/index.js"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -77,8 +77,8 @@ exports.Actions = void 0;
|
|
|
77
77
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
78
78
|
var react_1 = require("react");
|
|
79
79
|
var link_1 = __importDefault(require("next/link"));
|
|
80
|
-
var ui_1 = require("../../../../../../../../ui
|
|
81
|
-
var S = __importStar(require("./styles
|
|
80
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
81
|
+
var S = __importStar(require("./styles"));
|
|
82
82
|
function Actions(_a) {
|
|
83
83
|
var _this = this;
|
|
84
84
|
var _b;
|
|
@@ -103,4 +103,4 @@ function Actions(_a) {
|
|
|
103
103
|
actions.custom.map(function (Component, index) { return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Component, __assign({}, table)) }, 'custom' + index + Component.name)); })] }) }));
|
|
104
104
|
}
|
|
105
105
|
exports.Actions = Actions;
|
|
106
|
-
//#
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
package/dist/system/presentation/hooks/ui/use-table/components/table/active-filters/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ITableProps } from '../interfaces
|
|
1
|
+
import { ITableProps } from '../interfaces';
|
|
2
2
|
export declare function ActiveFilters({ configs, tableInformations }: ITableProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/system/presentation/hooks/ui/use-table/components/table/active-filters/index.js
CHANGED
|
@@ -35,8 +35,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
exports.ActiveFilters = void 0;
|
|
36
36
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
37
|
var router_1 = require("next/router");
|
|
38
|
-
var ui_1 = require("../../../../../../../../ui
|
|
39
|
-
var S = __importStar(require("./styles
|
|
38
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
39
|
+
var S = __importStar(require("./styles"));
|
|
40
40
|
function ActiveFilters(_a) {
|
|
41
41
|
var _b, _c, _d;
|
|
42
42
|
var configs = _a.configs, tableInformations = _a.tableInformations;
|
|
@@ -75,4 +75,4 @@ function ActiveFilters(_a) {
|
|
|
75
75
|
}, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'CloseIcon' }) })] }))] }));
|
|
76
76
|
}
|
|
77
77
|
exports.ActiveFilters = ActiveFilters;
|
|
78
|
-
//#
|
|
78
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -41,8 +41,8 @@ exports.CreateAction = void 0;
|
|
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
42
|
var react_1 = require("react");
|
|
43
43
|
var link_1 = __importDefault(require("next/link"));
|
|
44
|
-
var ui_1 = require("../../../../../../../../ui
|
|
45
|
-
var S = __importStar(require("./styles
|
|
44
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
45
|
+
var S = __importStar(require("./styles"));
|
|
46
46
|
function CreateAction(_a) {
|
|
47
47
|
var _b, _c;
|
|
48
48
|
var actions = _a.actions;
|
|
@@ -53,4 +53,4 @@ function CreateAction(_a) {
|
|
|
53
53
|
return ((0, jsx_runtime_1.jsx)(S.Create, { children: ((_b = actions.create) === null || _b === void 0 ? void 0 : _b.link) ? ((0, jsx_runtime_1.jsxs)(link_1.default, { className: 'create-button font-14-regular', href: actions.create.link.href, children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: ((_c = actions === null || actions === void 0 ? void 0 : actions.create) === null || _c === void 0 ? void 0 : _c.icon) || 'IconPlusSharp' }) }), actions.create.text] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ui_1.Modal, { styles: __assign({ width: '100vw', maxWidth: '512px', borderRadius: 10 }, ((actions === null || actions === void 0 ? void 0 : actions.modalStyles) || {})), open: open, onClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(ui_1.DynamicFormHandler, __assign({}, actions.create, { onSucess: actions.create.onSucess, onFinish: function () { return setOpen(false); } })) }), (0, jsx_runtime_1.jsxs)("button", { className: 'create-button font-14-regular', type: 'button', onClick: function () { return setOpen(true); }, children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: (actions === null || actions === void 0 ? void 0 : actions.create.icon) || 'IconPlusSharp' }) }), actions.create.text] })] })) }));
|
|
54
54
|
}
|
|
55
55
|
exports.CreateAction = CreateAction;
|
|
56
|
-
//#
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExportTable } from '../../../../../../../../system/domain
|
|
1
|
+
import { ExportTable } from '../../../../../../../../system/domain';
|
|
2
2
|
export declare function Export({ exports }: {
|
|
3
3
|
exports: ExportTable[];
|
|
4
|
-
}): import("react/jsx-
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,11 +25,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Export = void 0;
|
|
27
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
var ui_1 = require("../../../../../../../../ui
|
|
29
|
-
var S = __importStar(require("./styles
|
|
28
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
29
|
+
var S = __importStar(require("./styles"));
|
|
30
30
|
function Export(_a) {
|
|
31
31
|
var exports = _a.exports;
|
|
32
32
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Export', children: (0, jsx_runtime_1.jsxs)(S.Export, { className: 'font-14-regular', children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconUpload' }) }), "Exportar"] }) }));
|
|
33
33
|
}
|
|
34
34
|
exports.Export = Export;
|
|
35
|
-
//#
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ITableProps } from '../interfaces
|
|
1
|
+
import { ITableProps } from '../interfaces';
|
|
2
2
|
export declare function Filters({ configs, tableInformations }: ITableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -82,9 +82,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
82
82
|
exports.Filters = void 0;
|
|
83
83
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
84
84
|
var router_1 = require("next/router");
|
|
85
|
-
var system_1 = require("../../../../../../../../system
|
|
86
|
-
var ui_1 = require("../../../../../../../../ui
|
|
87
|
-
var S = __importStar(require("./styles
|
|
85
|
+
var system_1 = require("../../../../../../../../system");
|
|
86
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
87
|
+
var S = __importStar(require("./styles"));
|
|
88
88
|
function Filters(_a) {
|
|
89
89
|
var _this = this;
|
|
90
90
|
var _b;
|
|
@@ -135,4 +135,5 @@ function Filters(_a) {
|
|
|
135
135
|
});
|
|
136
136
|
}); }, options: filter.options.map(function (op) { return ({ label: op.text, value: op.value }); }) }, filter.data)); }), (0, jsx_runtime_1.jsx)(system_1.InputSearch, { onChange: function (value) { return (0, ui_1.updateRoute)({ params: { search: value, page: 1 }, router: router }); } })] }) }) }) }));
|
|
137
137
|
}
|
|
138
|
-
exports.Filters
|
|
138
|
+
exports.Filters = Filters;
|
|
139
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ITableProps } from './interfaces
|
|
1
|
+
import { ITableProps } from './interfaces';
|
|
2
2
|
export declare function Table(props: ITableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -38,16 +38,16 @@ exports.Table = void 0;
|
|
|
38
38
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
39
|
var react_1 = require("react");
|
|
40
40
|
var router_1 = require("next/router");
|
|
41
|
-
var ui_1 = require("../../../../../../../ui
|
|
42
|
-
var export_1 = require("./export
|
|
43
|
-
var actions_1 = require("./actions
|
|
44
|
-
var filters_1 = require("./filters
|
|
45
|
-
var create_1 = require("./create
|
|
46
|
-
var thead_item_1 = require("./thead-item
|
|
47
|
-
var pagination_1 = require("./pagination
|
|
48
|
-
var skeleton_table_1 = require("./skeleton-table
|
|
49
|
-
var active_filters_1 = require("./active-filters
|
|
50
|
-
var S = __importStar(require("./styles
|
|
41
|
+
var ui_1 = require("../../../../../../../ui");
|
|
42
|
+
var export_1 = require("./export");
|
|
43
|
+
var actions_1 = require("./actions");
|
|
44
|
+
var filters_1 = require("./filters");
|
|
45
|
+
var create_1 = require("./create");
|
|
46
|
+
var thead_item_1 = require("./thead-item");
|
|
47
|
+
var pagination_1 = require("./pagination");
|
|
48
|
+
var skeleton_table_1 = require("./skeleton-table");
|
|
49
|
+
var active_filters_1 = require("./active-filters");
|
|
50
|
+
var S = __importStar(require("./styles"));
|
|
51
51
|
function Table(props) {
|
|
52
52
|
var _a, _b, _c, _d;
|
|
53
53
|
var configs = props.configs, isFetching = props.isFetching, columnsConfiguration = props.columnsConfiguration, tableInformations = props.tableInformations;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { List, Pagination, TableConfiguration } from '../../../../../../../system
|
|
2
|
-
import { IUseTableProps } from '../../interfaces
|
|
1
|
+
import { List, Pagination, TableConfiguration } from '../../../../../../../system';
|
|
2
|
+
import { IUseTableProps } from '../../interfaces';
|
|
3
3
|
type colunm = keyof any;
|
|
4
4
|
interface IShowHiden {
|
|
5
5
|
text: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PaginationModel } from '../../../../../../../../system
|
|
2
|
-
export declare function PaginationTable({ page, endPage, pages, pageSize, totalItems, hasNextPage, hasPreviousPage }: PaginationModel): import("react/jsx-
|
|
1
|
+
import { PaginationModel } from '../../../../../../../../system';
|
|
2
|
+
export declare function PaginationTable({ page, endPage, pages, pageSize, totalItems, hasNextPage, hasPreviousPage }: PaginationModel): import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,9 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.PaginationTable = void 0;
|
|
27
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
var router_1 = require("next/router");
|
|
29
|
-
var ui_1 = require("../../../../../../../../ui
|
|
30
|
-
var service_1 = require("./service
|
|
31
|
-
var S = __importStar(require("./styles
|
|
29
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
30
|
+
var service_1 = require("./service");
|
|
31
|
+
var S = __importStar(require("./styles"));
|
|
32
32
|
function PaginationTable(_a) {
|
|
33
33
|
var page = _a.page, endPage = _a.endPage, pages = _a.pages, pageSize = _a.pageSize, totalItems = _a.totalItems, hasNextPage = _a.hasNextPage, hasPreviousPage = _a.hasPreviousPage;
|
|
34
34
|
var router = (0, router_1.useRouter)();
|
|
@@ -53,4 +53,4 @@ function PaginationTable(_a) {
|
|
|
53
53
|
}, onClick: function () { return onSelect(pagination.page + 1); }, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconKeyboardRightArrow' }) }))] }));
|
|
54
54
|
}
|
|
55
55
|
exports.PaginationTable = PaginationTable;
|
|
56
|
-
//#
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/index.js
CHANGED
|
@@ -25,10 +25,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.SkeletonTable = void 0;
|
|
27
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
var ui_1 = require("../../../../../../../../ui
|
|
29
|
-
var S = __importStar(require("./styles
|
|
28
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
29
|
+
var S = __importStar(require("./styles"));
|
|
30
30
|
function SkeletonTable() {
|
|
31
31
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'skeleton', children: (0, jsx_runtime_1.jsxs)(S.SkeletonCustom, { "data-testid": 'skeleton', children: [(0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } })] }) }));
|
|
32
32
|
}
|
|
33
33
|
exports.SkeletonTable = SkeletonTable;
|
|
34
|
-
//#
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ITHeadItemProps } from './interfaces
|
|
1
|
+
import { ITHeadItemProps } from './interfaces';
|
|
2
2
|
export declare function THeadItem({ colunm, disableOrdenationTable }: ITHeadItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.THeadItem = void 0;
|
|
27
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
var router_1 = require("next/router");
|
|
29
|
-
var ui_1 = require("../../../../../../../../ui
|
|
30
|
-
var S = __importStar(require("./styles
|
|
29
|
+
var ui_1 = require("../../../../../../../../ui");
|
|
30
|
+
var S = __importStar(require("./styles"));
|
|
31
31
|
function THeadItem(_a) {
|
|
32
32
|
var colunm = _a.colunm, disableOrdenationTable = _a.disableOrdenationTable;
|
|
33
33
|
var router = (0, router_1.useRouter)();
|
|
@@ -47,4 +47,4 @@ function THeadItem(_a) {
|
|
|
47
47
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'thead-item', children: (0, jsx_runtime_1.jsx)("th", { style: { width: colunm.width + 'px' }, children: (0, jsx_runtime_1.jsxs)(S.THeadItem, { style: { width: colunm.width + 'px' }, onClick: handleOrd, children: [(0, jsx_runtime_1.jsx)("span", { className: 'font-12-bold uppercase', children: colunm.label }), !disableOrdenationTable && colunm.hasAsc && ((0, jsx_runtime_1.jsx)("div", { className: 'ord-actions', children: (0, jsx_runtime_1.jsx)("button", { type: 'button', children: (0, jsx_runtime_1.jsx)("svg", { style: { transform: rotateArrow ? 'rotate(180deg)' : 'rotate(0deg)' }, xmlns: 'http://www.w3.org/2000/svg', width: '11', height: '6', viewBox: '0 0 11 6', fill: 'none', children: (0, jsx_runtime_1.jsx)("path", { d: 'M5.75 5.5L0.75 0.5H10.75L5.75 5.5Z', fill: ascIsActive ? '#1ABB64' : '#828282' }) }) }) }))] }) }) }));
|
|
48
48
|
}
|
|
49
49
|
exports.THeadItem = THeadItem;
|
|
50
|
-
//#
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,52 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.useQueryTable = void 0;
|
|
15
|
-
var router_1 = require("next/router");
|
|
16
|
-
var ui_1 = require("../../../../../../ui/index.js");
|
|
17
|
-
function useQueryTable(props) {
|
|
18
|
-
var _a;
|
|
19
|
-
var _b = (0, router_1.useRouter)(), query = _b.query, isReady = _b.isReady;
|
|
20
|
-
var queryKEY = props.queryKey.customKey || props.queryKey.remoteName;
|
|
21
|
-
var enabled = props.requireUser ? props.user : true;
|
|
22
|
-
var REMOTE = props.container && ((_a = props.container) === null || _a === void 0 ? void 0 : _a.get(props.Types[queryKEY]));
|
|
23
|
-
var queryFiltersBase64 = (0, ui_1.fromBase64ToString)(query.filters);
|
|
24
|
-
var params = __assign(__assign({}, query), { orderColumn: undefined, asc: undefined, order: query.orderColumn && { column: query.orderColumn, asc: !!(query.asc === 'true') }, filters: queryFiltersBase64.filters });
|
|
25
|
-
var tableResponse = (0, ui_1.useQuery)(__assign(__assign({ queryKey: props.queryKeyParams || queryKEY, queryFn: function () { return props.customRemote ? props.customRemote(params) : REMOTE.loadAll(params); } }, props.options), { enabled: !!((REMOTE || queryKEY) && isReady) }));
|
|
26
|
-
var configurations = (0, ui_1.useQuery)({
|
|
27
|
-
queryFn: function () { return REMOTE.loadTable(); },
|
|
28
|
-
queryKey: "".concat(queryKEY, "/Table"),
|
|
29
|
-
enableCache: true,
|
|
30
|
-
enabled: !!(REMOTE && props.dynamicFiltersFromApi && isReady)
|
|
31
|
-
});
|
|
32
|
-
if (props.debugMode) {
|
|
33
|
-
console.log({
|
|
34
|
-
enabled: enabled,
|
|
35
|
-
REMOTE: REMOTE,
|
|
36
|
-
KEY_TABLE: queryKEY,
|
|
37
|
-
queryFiltersBase64: queryFiltersBase64,
|
|
38
|
-
params: params,
|
|
39
|
-
data: tableResponse.data,
|
|
40
|
-
isLoading: tableResponse.isLoading,
|
|
41
|
-
error: tableResponse.error,
|
|
42
|
-
loadAll: REMOTE.loadAll,
|
|
43
|
-
configurations: configurations,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
data: __assign(__assign({}, tableResponse.data), configurations === null || configurations === void 0 ? void 0 : configurations.data),
|
|
48
|
-
isLoading: (configurations === null || configurations === void 0 ? void 0 : configurations.isLoading) || tableResponse.isLoading || tableResponse.isFetching,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
exports.useQueryTable = useQueryTable;
|
|
52
|
-
//# sourceMappingURL=hook.js.map
|
|
@@ -1,19 +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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./hook.js"), exports);
|
|
18
|
-
__exportStar(require("./get-query-arguments-table.js"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//@ts-nocheck
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var window_1 = require("../../ssr-window/window.js");
|
|
5
|
-
function getBreakpoint(breakpoints, base, containerEl) {
|
|
6
|
-
if (base === void 0) { base = 'window'; }
|
|
7
|
-
if (!breakpoints || (base === 'container' && !containerEl))
|
|
8
|
-
return undefined;
|
|
9
|
-
var breakpoint = false;
|
|
10
|
-
var window = (0, window_1.getWindow)();
|
|
11
|
-
var currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;
|
|
12
|
-
var points = Object.keys(breakpoints).map(function (point) {
|
|
13
|
-
if (typeof point === 'string' && point.indexOf('@') === 0) {
|
|
14
|
-
var minRatio = parseFloat(point.substr(1));
|
|
15
|
-
var value = currentHeight * minRatio;
|
|
16
|
-
return { value: value, point: point };
|
|
17
|
-
}
|
|
18
|
-
return { value: point, point: point };
|
|
19
|
-
});
|
|
20
|
-
points.sort(function (a, b) { return parseInt(a.value, 10) - parseInt(b.value, 10); });
|
|
21
|
-
for (var i = 0; i < points.length; i += 1) {
|
|
22
|
-
var _a = points[i], point = _a.point, value = _a.value;
|
|
23
|
-
if (base === 'window') {
|
|
24
|
-
if (window.matchMedia("(min-width: ".concat(value, "px)")).matches) {
|
|
25
|
-
breakpoint = point;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else if (value <= containerEl.clientWidth) {
|
|
29
|
-
breakpoint = point;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return breakpoint || 'max';
|
|
33
|
-
}
|
|
34
|
-
exports.default = getBreakpoint;
|
|
35
|
-
//# sourceMappingURL=getBreakpoint.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var setBreakpoint_1 = __importDefault(require("./setBreakpoint.js"));
|
|
7
|
-
var getBreakpoint_1 = __importDefault(require("./getBreakpoint.js"));
|
|
8
|
-
exports.default = { setBreakpoint: setBreakpoint_1.default, getBreakpoint: getBreakpoint_1.default };
|
|
9
|
-
//# sourceMappingURL=index.js.map
|