infinity-forge 2.3.9 → 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/data/use-cases/menu/remote-get-menu.d.ts +2 -1
- package/dist/system/data/use-cases/menu/remote-get-menu.js +1 -1
- package/dist/system/data/use-cases/notifications/remote-notifications.d.ts +2 -1
- package/dist/system/data/use-cases/notifications/remote-notifications.js +1 -1
- package/dist/system/data/use-cases/users/remote-load-user-admin.d.ts +2 -1
- package/dist/system/data/use-cases/users/remote-load-user-admin.js +1 -1
- package/dist/system/data/use-cases/users/remote-users.d.ts +2 -1
- package/dist/system/data/use-cases/users/remote-users.js +1 -1
- package/dist/system/domain/use-cases/dynamic-section/dynamic-section.d.ts +2 -1
- package/dist/system/domain/use-cases/menu/detail.d.ts +2 -1
- package/dist/system/domain/use-cases/menu/load-all.d.ts +2 -1
- package/dist/system/domain/use-cases/users/load-all-users.d.ts +2 -1
- package/dist/system/domain/use-cases/users/load-user-admin.d.ts +2 -1
- 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/index.js +36 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +38 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js +42 -0
- package/dist/system/presentation/components/layout/header/components/search-modal/index.js +4 -4
- 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/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/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 +24 -0
- 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
|
|
@@ -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,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
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var utils_1 = require("../../shared/utils.js");
|
|
4
|
-
var isGridEnabled = function (swiper, params) {
|
|
5
|
-
return swiper.grid && params.grid && params.grid.rows > 1;
|
|
6
|
-
};
|
|
7
|
-
function setBreakpoint() {
|
|
8
|
-
var swiper = this;
|
|
9
|
-
var realIndex = swiper.realIndex, initialized = swiper.initialized, params = swiper.params, el = swiper.el;
|
|
10
|
-
var breakpoints = params.breakpoints;
|
|
11
|
-
if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0))
|
|
12
|
-
return;
|
|
13
|
-
// Get breakpoint for window width and update parameters
|
|
14
|
-
var breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);
|
|
15
|
-
if (!breakpoint || swiper.currentBreakpoint === breakpoint)
|
|
16
|
-
return;
|
|
17
|
-
var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
|
18
|
-
var breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
|
19
|
-
var wasMultiRow = isGridEnabled(swiper, params);
|
|
20
|
-
var isMultiRow = isGridEnabled(swiper, breakpointParams);
|
|
21
|
-
var wasGrabCursor = swiper.params.grabCursor;
|
|
22
|
-
var isGrabCursor = breakpointParams.grabCursor;
|
|
23
|
-
var wasEnabled = params.enabled;
|
|
24
|
-
if (wasMultiRow && !isMultiRow) {
|
|
25
|
-
el.classList.remove("".concat(params.containerModifierClass, "grid"), "".concat(params.containerModifierClass, "grid-column"));
|
|
26
|
-
swiper.emitContainerClasses();
|
|
27
|
-
}
|
|
28
|
-
else if (!wasMultiRow && isMultiRow) {
|
|
29
|
-
el.classList.add("".concat(params.containerModifierClass, "grid"));
|
|
30
|
-
if ((breakpointParams.grid.fill && breakpointParams.grid.fill === 'column') ||
|
|
31
|
-
(!breakpointParams.grid.fill && params.grid.fill === 'column')) {
|
|
32
|
-
el.classList.add("".concat(params.containerModifierClass, "grid-column"));
|
|
33
|
-
}
|
|
34
|
-
swiper.emitContainerClasses();
|
|
35
|
-
}
|
|
36
|
-
if (wasGrabCursor && !isGrabCursor) {
|
|
37
|
-
swiper.unsetGrabCursor();
|
|
38
|
-
}
|
|
39
|
-
else if (!wasGrabCursor && isGrabCursor) {
|
|
40
|
-
swiper.setGrabCursor();
|
|
41
|
-
}
|
|
42
|
-
// Toggle navigation, pagination, scrollbar
|
|
43
|
-
['navigation', 'pagination', 'scrollbar'].forEach(function (prop) {
|
|
44
|
-
if (typeof breakpointParams[prop] === 'undefined')
|
|
45
|
-
return;
|
|
46
|
-
var wasModuleEnabled = params[prop] && params[prop].enabled;
|
|
47
|
-
var isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
|
|
48
|
-
if (wasModuleEnabled && !isModuleEnabled) {
|
|
49
|
-
swiper[prop].disable();
|
|
50
|
-
}
|
|
51
|
-
if (!wasModuleEnabled && isModuleEnabled) {
|
|
52
|
-
swiper[prop].enable();
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
var directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
|
|
56
|
-
var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
|
|
57
|
-
var wasLoop = params.loop;
|
|
58
|
-
if (directionChanged && initialized) {
|
|
59
|
-
swiper.changeDirection();
|
|
60
|
-
}
|
|
61
|
-
(0, utils_1.extend)(swiper.params, breakpointParams);
|
|
62
|
-
var isEnabled = swiper.params.enabled;
|
|
63
|
-
var hasLoop = swiper.params.loop;
|
|
64
|
-
Object.assign(swiper, {
|
|
65
|
-
allowTouchMove: swiper.params.allowTouchMove,
|
|
66
|
-
allowSlideNext: swiper.params.allowSlideNext,
|
|
67
|
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
|
68
|
-
});
|
|
69
|
-
if (wasEnabled && !isEnabled) {
|
|
70
|
-
swiper.disable();
|
|
71
|
-
}
|
|
72
|
-
else if (!wasEnabled && isEnabled) {
|
|
73
|
-
swiper.enable();
|
|
74
|
-
}
|
|
75
|
-
swiper.currentBreakpoint = breakpoint;
|
|
76
|
-
swiper.emit('_beforeBreakpoint', breakpointParams);
|
|
77
|
-
if (initialized) {
|
|
78
|
-
if (needsReLoop) {
|
|
79
|
-
swiper.loopDestroy();
|
|
80
|
-
swiper.loopCreate(realIndex);
|
|
81
|
-
swiper.updateSlides();
|
|
82
|
-
}
|
|
83
|
-
else if (!wasLoop && hasLoop) {
|
|
84
|
-
swiper.loopCreate(realIndex);
|
|
85
|
-
swiper.updateSlides();
|
|
86
|
-
}
|
|
87
|
-
else if (wasLoop && !hasLoop) {
|
|
88
|
-
swiper.loopDestroy();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
swiper.emit('breakpoint', breakpointParams);
|
|
92
|
-
}
|
|
93
|
-
exports.default = setBreakpoint;
|
|
94
|
-
//# sourceMappingURL=setBreakpoint.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 addClasses_1 = __importDefault(require("./addClasses.js"));
|
|
7
|
-
var removeClasses_1 = __importDefault(require("./removeClasses.js"));
|
|
8
|
-
exports.default = { addClasses: addClasses_1.default, removeClasses: removeClasses_1.default };
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,77 +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 onTouchStart_1 = __importDefault(require("./onTouchStart.js"));
|
|
7
|
-
var onTouchMove_1 = __importDefault(require("./onTouchMove.js"));
|
|
8
|
-
var onTouchEnd_1 = __importDefault(require("./onTouchEnd.js"));
|
|
9
|
-
var onResize_1 = __importDefault(require("./onResize.js"));
|
|
10
|
-
var onClick_1 = __importDefault(require("./onClick.js"));
|
|
11
|
-
var onScroll_1 = __importDefault(require("./onScroll.js"));
|
|
12
|
-
var onLoad_1 = __importDefault(require("./onLoad.js"));
|
|
13
|
-
var onDocumentTouchStart_1 = __importDefault(require("./onDocumentTouchStart.js"));
|
|
14
|
-
var document_1 = require("../../ssr-window/document.js");
|
|
15
|
-
var events = function (swiper, method) {
|
|
16
|
-
var document = (0, document_1.getDocument)();
|
|
17
|
-
var params = swiper.params, el = swiper.el, wrapperEl = swiper.wrapperEl, device = swiper.device;
|
|
18
|
-
var capture = !!params.nested;
|
|
19
|
-
var domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
|
|
20
|
-
var swiperMethod = method;
|
|
21
|
-
if (!el || typeof el === 'string')
|
|
22
|
-
return;
|
|
23
|
-
// Touch Events
|
|
24
|
-
document[domMethod]('touchstart', swiper.onDocumentTouchStart, { passive: false, capture: capture });
|
|
25
|
-
el[domMethod]('touchstart', swiper.onTouchStart, { passive: false });
|
|
26
|
-
el[domMethod]('pointerdown', swiper.onTouchStart, { passive: false });
|
|
27
|
-
document[domMethod]('touchmove', swiper.onTouchMove, { passive: false, capture: capture });
|
|
28
|
-
document[domMethod]('pointermove', swiper.onTouchMove, { passive: false, capture: capture });
|
|
29
|
-
document[domMethod]('touchend', swiper.onTouchEnd, { passive: true });
|
|
30
|
-
document[domMethod]('pointerup', swiper.onTouchEnd, { passive: true });
|
|
31
|
-
document[domMethod]('pointercancel', swiper.onTouchEnd, { passive: true });
|
|
32
|
-
document[domMethod]('touchcancel', swiper.onTouchEnd, { passive: true });
|
|
33
|
-
document[domMethod]('pointerout', swiper.onTouchEnd, { passive: true });
|
|
34
|
-
document[domMethod]('pointerleave', swiper.onTouchEnd, { passive: true });
|
|
35
|
-
document[domMethod]('contextmenu', swiper.onTouchEnd, { passive: true });
|
|
36
|
-
// Prevent Links Clicks
|
|
37
|
-
if (params.preventClicks || params.preventClicksPropagation) {
|
|
38
|
-
el[domMethod]('click', swiper.onClick, true);
|
|
39
|
-
}
|
|
40
|
-
if (params.cssMode) {
|
|
41
|
-
wrapperEl[domMethod]('scroll', swiper.onScroll);
|
|
42
|
-
}
|
|
43
|
-
// Resize handler
|
|
44
|
-
if (params.updateOnWindowResize) {
|
|
45
|
-
swiper[swiperMethod](device.ios || device.android
|
|
46
|
-
? 'resize orientationchange observerUpdate'
|
|
47
|
-
: 'resize observerUpdate', onResize_1.default, true);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
swiper[swiperMethod]('observerUpdate', onResize_1.default, true);
|
|
51
|
-
}
|
|
52
|
-
// Images loader
|
|
53
|
-
el[domMethod]('load', swiper.onLoad, { capture: true });
|
|
54
|
-
};
|
|
55
|
-
function attachEvents() {
|
|
56
|
-
var swiper = this;
|
|
57
|
-
var params = swiper.params;
|
|
58
|
-
swiper.onTouchStart = onTouchStart_1.default.bind(swiper);
|
|
59
|
-
swiper.onTouchMove = onTouchMove_1.default.bind(swiper);
|
|
60
|
-
swiper.onTouchEnd = onTouchEnd_1.default.bind(swiper);
|
|
61
|
-
swiper.onDocumentTouchStart = onDocumentTouchStart_1.default.bind(swiper);
|
|
62
|
-
if (params.cssMode) {
|
|
63
|
-
swiper.onScroll = onScroll_1.default.bind(swiper);
|
|
64
|
-
}
|
|
65
|
-
swiper.onClick = onClick_1.default.bind(swiper);
|
|
66
|
-
swiper.onLoad = onLoad_1.default.bind(swiper);
|
|
67
|
-
events(swiper, 'on');
|
|
68
|
-
}
|
|
69
|
-
function detachEvents() {
|
|
70
|
-
var swiper = this;
|
|
71
|
-
events(swiper, 'off');
|
|
72
|
-
}
|
|
73
|
-
exports.default = {
|
|
74
|
-
attachEvents: attachEvents,
|
|
75
|
-
detachEvents: detachEvents,
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var process_lazy_preloader_1 = require("../../shared/process-lazy-preloader.js");
|
|
4
|
-
function onLoad(e) {
|
|
5
|
-
var swiper = this;
|
|
6
|
-
(0, process_lazy_preloader_1.processLazyPreloader)(swiper, e.target);
|
|
7
|
-
if (swiper.params.cssMode ||
|
|
8
|
-
(swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
swiper.update();
|
|
12
|
-
}
|
|
13
|
-
exports.default = onLoad;
|
|
14
|
-
//# sourceMappingURL=onLoad.js.map
|