infinity-forge 2.4.0 → 2.4.1

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.
Files changed (156) hide show
  1. package/dist/sites/components/default-pages/blog/components/blog-item/share/index.js +2 -2
  2. package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.d.ts +1 -1
  3. package/dist/sites/components/default-pages/blog/components/featured-blog/featured-blog-item/index.js +2 -2
  4. package/dist/system/presentation/components/data/menu/components/menu-item/index.js +3 -3
  5. package/dist/system/presentation/components/data/menu/modes/collapsed-menu/index.js +5 -5
  6. package/dist/system/presentation/components/data/menu/modes/collapsed-menu/styles.js +1 -1
  7. package/dist/system/presentation/components/data/menu/modes/opened/index.js +3 -3
  8. package/dist/system/presentation/components/data/menu/modes/opened/styles.js +1 -1
  9. package/dist/system/presentation/components/data/tab/tab-item/index.d.ts +5 -0
  10. package/dist/system/presentation/components/data/tab/tab-item/index.js +46 -0
  11. package/dist/system/presentation/components/data/tab/tab-item/styles.d.ts +8 -0
  12. package/dist/system/presentation/components/layout/header/components/index.d.ts +2 -0
  13. package/dist/system/presentation/components/layout/header/components/index.js +19 -0
  14. package/dist/system/presentation/components/layout/header/components/menu-right/index.d.ts +1 -1
  15. package/dist/system/presentation/components/layout/header/components/menu-right/index.js +4 -4
  16. package/dist/system/presentation/components/layout/header/components/menu-right/messages/index.js +0 -36
  17. package/dist/system/presentation/components/layout/header/components/menu-right/profile/index.js +0 -38
  18. package/dist/system/presentation/components/layout/header/components/menu-right/settings/index.js +0 -42
  19. package/dist/system/presentation/components/layout/header/components/search-modal/index.js +4 -4
  20. package/dist/system/presentation/components/layout/header/version-01/index.d.ts +2 -0
  21. package/dist/system/presentation/components/layout/header/version-01/index.js +45 -0
  22. package/dist/system/presentation/components/pages/menus/table/columns.d.ts +3 -0
  23. package/dist/system/presentation/components/pages/menus/table/columns.js +21 -0
  24. package/dist/system/presentation/components/pages/menus/table/create.d.ts +3 -0
  25. package/dist/system/presentation/components/pages/menus/table/create.js +72 -0
  26. package/dist/system/presentation/components/pages/menus/table/delete.js +71 -0
  27. package/dist/system/presentation/components/pages/menus/table/edit.d.ts +3 -0
  28. package/dist/system/presentation/components/pages/menus/table/edit.js +78 -0
  29. package/dist/system/presentation/components/pages/menus/table/icon/index.js +1 -1
  30. package/dist/system/presentation/components/pages/menus/table/index.d.ts +4 -0
  31. package/dist/system/presentation/components/pages/menus/table/index.js +21 -0
  32. package/dist/system/presentation/components/pages/users/table/columns.d.ts +3 -0
  33. package/dist/system/presentation/components/pages/users/table/create.d.ts +3 -0
  34. package/dist/system/presentation/components/pages/users/table/create.js +75 -0
  35. package/dist/system/presentation/components/pages/users/table/delete.js +74 -0
  36. package/dist/system/presentation/components/pages/users/table/edit.d.ts +3 -0
  37. package/dist/system/presentation/components/pages/users/table/edit.js +83 -0
  38. package/dist/system/presentation/components/pages/users/table/index.d.ts +4 -0
  39. package/dist/system/presentation/components/pages/users/table/index.js +21 -0
  40. package/dist/system/presentation/context/auth/components/login/form-login/index.js +2 -2
  41. package/dist/system/presentation/context/auth/components/login/index.js +38 -0
  42. package/dist/system/presentation/context/auth/components/private-page/index.d.ts +2 -0
  43. package/dist/system/presentation/context/auth/components/private-page/index.js +141 -0
  44. package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +1 -0
  45. package/dist/system/presentation/hooks/ui/use-table/components/index.js +18 -0
  46. package/dist/system/presentation/hooks/ui/use-table/components/table/index.d.ts +1 -1
  47. package/dist/system/presentation/hooks/ui/use-table/components/table/index.js +10 -10
  48. package/dist/system/presentation/hooks/ui/use-table/components/table/interfaces.d.ts +2 -2
  49. package/dist/system/presentation/hooks/ui/use-table/query/get-query-arguments-table.d.ts +2 -0
  50. package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +5 -0
  51. package/dist/system/presentation/hooks/ui/use-table/query/hook.js +52 -0
  52. package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +2 -0
  53. package/dist/system/presentation/hooks/ui/use-table/query/index.js +19 -0
  54. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/getBreakpoint.js +35 -0
  55. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.d.ts +7 -0
  56. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.js +9 -0
  57. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/setBreakpoint.js +94 -0
  58. package/dist/ui/components/carousel/carousel-lib/core/classes/index.d.ts +7 -0
  59. package/dist/ui/components/carousel/carousel-lib/core/classes/index.js +9 -0
  60. package/dist/ui/components/carousel/carousel-lib/core/events/index.js +77 -0
  61. package/dist/ui/components/carousel/carousel-lib/core/events/onLoad.js +14 -0
  62. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchEnd.js +194 -0
  63. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchMove.js +314 -0
  64. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchStart.js +154 -0
  65. package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.d.ts +7 -0
  66. package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.js +12 -0
  67. package/dist/ui/components/carousel/carousel-lib/core/loop/index.d.ts +9 -0
  68. package/dist/ui/components/carousel/carousel-lib/core/loop/index.js +14 -0
  69. package/dist/ui/components/carousel/carousel-lib/core/loop/loopCreate.js +57 -0
  70. package/dist/ui/components/carousel/carousel-lib/core/loop/loopFix.js +230 -0
  71. package/dist/ui/components/carousel/carousel-lib/core/modules/observer/observer.js +2 -2
  72. package/dist/ui/components/carousel/carousel-lib/core/modules/resize/resize.js +1 -1
  73. package/dist/ui/components/carousel/carousel-lib/core/slide/index.d.ts +17 -0
  74. package/dist/ui/components/carousel/carousel-lib/core/slide/index.js +22 -0
  75. package/dist/ui/components/carousel/carousel-lib/core/slide/slideTo.js +160 -0
  76. package/dist/ui/components/carousel/carousel-lib/core/slide/slideToClickedSlide.js +46 -0
  77. package/dist/ui/components/carousel/carousel-lib/core/transition/index.d.ts +9 -0
  78. package/dist/ui/components/carousel/carousel-lib/core/transition/index.js +14 -0
  79. package/dist/ui/components/carousel/carousel-lib/core/transition/transitionEnd.js +18 -0
  80. package/dist/ui/components/carousel/carousel-lib/core/transition/transitionStart.js +19 -0
  81. package/dist/ui/components/carousel/carousel-lib/core/translate/getTranslate.js +21 -0
  82. package/dist/ui/components/carousel/carousel-lib/core/translate/index.d.ts +13 -0
  83. package/dist/ui/components/carousel/carousel-lib/core/translate/index.js +18 -0
  84. package/dist/ui/components/carousel/carousel-lib/core/translate/translateTo.js +81 -0
  85. package/dist/ui/components/carousel/carousel-lib/core/update/index.d.ts +21 -0
  86. package/dist/ui/components/carousel/carousel-lib/core/update/index.js +26 -0
  87. package/dist/ui/components/carousel/carousel-lib/core/update/updateActiveIndex.js +125 -0
  88. package/dist/ui/components/carousel/carousel-lib/core/update/updateSize.js +45 -0
  89. package/dist/ui/components/carousel/carousel-lib/core/update/updateSlides.js +306 -0
  90. package/dist/ui/components/carousel/carousel-lib/core/update/updateSlidesClasses.js +69 -0
  91. package/dist/ui/components/form/handler/i18n/capture-i18n-errors/index.d.ts +1 -1
  92. package/dist/ui/components/form/input-cep/use-cep/providers/ibge/hook.d.ts +1 -1
  93. package/dist/ui/components/form/input-cep/use-cep/providers/ibge/hook.js +1 -1
  94. package/dist/ui/components/form/input-cep/use-cep/providers/ibge/index.d.ts +3 -3
  95. package/dist/ui/components/form/input-cep/use-cep/providers/ibge/index.js +3 -3
  96. package/dist/ui/components/form/input-cep/use-cep/providers/index.d.ts +1 -1
  97. package/dist/ui/components/form/input-cep/use-cep/providers/index.js +1 -1
  98. package/dist/ui/components/form/input-currency/components/utils/cleanValue.d.ts +1 -1
  99. package/dist/ui/components/form/input-currency/components/utils/cleanValue.js +4 -4
  100. package/dist/ui/components/form/input-currency/components/utils/formatValue.d.ts +1 -1
  101. package/dist/ui/components/form/input-currency/components/utils/formatValue.js +2 -2
  102. package/dist/ui/components/form/input-currency/components/utils/getLocaleConfig.d.ts +1 -1
  103. package/dist/ui/components/form/input-currency/components/utils/getSuffix.js +1 -1
  104. package/dist/ui/components/form/input-currency/components/utils/index.d.ts +8 -8
  105. package/dist/ui/components/form/input-currency/components/utils/index.js +8 -8
  106. package/dist/ui/components/form/input-currency/components/utils/parseAbbrValue.js +1 -1
  107. package/dist/ui/components/form/input-currency/components/utils/removeInvalidChars.js +1 -1
  108. package/dist/ui/components/form/input-currency/components/utils/removeSeparators.js +1 -1
  109. package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.d.ts +1 -1
  110. package/dist/ui/components/form/input-date-picker/calendar/calendar-header/index.js +3 -3
  111. package/dist/ui/components/form/input-date-picker/calendar/days/index.d.ts +1 -1
  112. package/dist/ui/components/form/input-date-picker/calendar/days/index.js +2 -2
  113. package/dist/ui/components/form/input-date-picker/calendar/months/index.d.ts +1 -1
  114. package/dist/ui/components/form/input-date-picker/calendar/months/index.js +2 -2
  115. package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.d.ts +1 -1
  116. package/dist/ui/components/form/input-file/render-files/file-item/button-upload-image-mobile/index.js +1 -1
  117. package/dist/ui/components/form/input-file/render-files/file-item/index.d.ts +2 -2
  118. package/dist/ui/components/form/input-file/render-files/file-item/index.js +3 -3
  119. package/dist/ui/components/form/input-mask/lib/core/errors/SyntheticChangeError.d.ts +1 -1
  120. package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.d.ts +1 -1
  121. package/dist/ui/components/form/input-mask/lib/core/hooks/useInput.js +2 -2
  122. package/dist/ui/components/form/input-mask/lib/core/index.d.ts +5 -5
  123. package/dist/ui/components/form/input-mask/lib/core/index.js +4 -4
  124. package/dist/ui/components/form/input-mask/lib/core/utils/setInputAttributes.d.ts +1 -1
  125. package/dist/ui/components/form/input-mask/lib/mask/InputMask.d.ts +2 -2
  126. package/dist/ui/components/form/input-mask/lib/mask/InputMask.js +2 -2
  127. package/dist/ui/components/form/input-mask/lib/mask/index.d.ts +5 -5
  128. package/dist/ui/components/form/input-mask/lib/mask/index.js +3 -3
  129. package/dist/ui/components/form/input-mask/lib/mask/types.d.ts +1 -1
  130. package/dist/ui/components/form/input-mask/lib/mask/useMask.d.ts +1 -1
  131. package/dist/ui/components/form/input-mask/lib/mask/useMask.js +7 -7
  132. package/dist/ui/components/form/input-mask/lib/mask/utils/filter.d.ts +1 -1
  133. package/dist/ui/components/form/input-mask/lib/mask/utils/format.d.ts +1 -1
  134. package/dist/ui/components/form/input-mask/lib/mask/utils/formatToParts.d.ts +1 -1
  135. package/dist/ui/components/form/input-mask/lib/mask/utils/formatToReplacementObject.d.ts +1 -1
  136. package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.d.ts +1 -1
  137. package/dist/ui/components/form/input-mask/lib/mask/utils/resolveDetail.js +3 -3
  138. package/dist/ui/components/form/input-mask/lib/mask/utils/resolveSelection.d.ts +0 -18
  139. package/dist/ui/components/form/input-mask/lib/mask/utils/unformat.d.ts +1 -1
  140. package/dist/ui/components/form/input-mask/lib/mask/utils/validate.d.ts +0 -13
  141. package/dist/ui/components/form/input-mask/lib/mask/utils.d.ts +1 -1
  142. package/dist/ui/components/form/input-mask/lib/mask/utils.js +5 -5
  143. package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.d.ts +2 -2
  144. package/dist/ui/components/form/input-mask/lib/number-format/InputNumberFormat.js +2 -2
  145. package/dist/ui/components/form/input-mask/lib/number-format/index.d.ts +4 -4
  146. package/dist/ui/components/form/input-mask/lib/number-format/index.js +2 -2
  147. package/dist/ui/components/form/input-mask/lib/number-format/types.d.ts +1 -1
  148. package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.d.ts +1 -1
  149. package/dist/ui/components/form/input-mask/lib/number-format/useNumberFormat.js +6 -6
  150. package/dist/ui/components/form/input-mask/lib/number-format/utils/localizeValues.d.ts +1 -1
  151. package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.d.ts +2 -2
  152. package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveDetail.js +1 -1
  153. package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveMinimumFractionDigits.d.ts +1 -1
  154. package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveOptions.d.ts +1 -1
  155. package/dist/ui/components/form/input-mask/lib/number-format/utils/resolveSelection.d.ts +0 -24
  156. package/package.json +1 -1
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var utils_1 = require("../../shared/utils.js");
4
+ function translateTo(translate, speed, runCallbacks, translateBounds, internal) {
5
+ var _a;
6
+ if (translate === void 0) { translate = 0; }
7
+ if (speed === void 0) { speed = this.params.speed; }
8
+ if (runCallbacks === void 0) { runCallbacks = true; }
9
+ if (translateBounds === void 0) { translateBounds = true; }
10
+ var swiper = this;
11
+ var params = swiper.params, wrapperEl = swiper.wrapperEl;
12
+ if (swiper.animating && params.preventInteractionOnTransition) {
13
+ return false;
14
+ }
15
+ var minTranslate = swiper.minTranslate();
16
+ var maxTranslate = swiper.maxTranslate();
17
+ var newTranslate;
18
+ if (translateBounds && translate > minTranslate)
19
+ newTranslate = minTranslate;
20
+ else if (translateBounds && translate < maxTranslate)
21
+ newTranslate = maxTranslate;
22
+ else
23
+ newTranslate = translate;
24
+ // Update progress
25
+ swiper.updateProgress(newTranslate);
26
+ if (params.cssMode) {
27
+ var isH = swiper.isHorizontal();
28
+ if (speed === 0) {
29
+ wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
30
+ }
31
+ else {
32
+ if (!swiper.support.smoothScroll) {
33
+ (0, utils_1.animateCSSModeScroll)({ swiper: swiper, targetPosition: -newTranslate, side: isH ? 'left' : 'top' });
34
+ return true;
35
+ }
36
+ wrapperEl.scrollTo((_a = {},
37
+ _a[isH ? 'left' : 'top'] = -newTranslate,
38
+ _a.behavior = 'smooth',
39
+ _a));
40
+ }
41
+ return true;
42
+ }
43
+ if (speed === 0) {
44
+ swiper.setTransition(0);
45
+ swiper.setTranslate(newTranslate);
46
+ if (runCallbacks) {
47
+ swiper.emit('beforeTransitionStart', speed, internal);
48
+ swiper.emit('transitionEnd');
49
+ }
50
+ }
51
+ else {
52
+ swiper.setTransition(speed);
53
+ swiper.setTranslate(newTranslate);
54
+ if (runCallbacks) {
55
+ swiper.emit('beforeTransitionStart', speed, internal);
56
+ swiper.emit('transitionStart');
57
+ }
58
+ if (!swiper.animating) {
59
+ swiper.animating = true;
60
+ if (!swiper.onTranslateToWrapperTransitionEnd) {
61
+ swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {
62
+ if (!swiper || swiper.destroyed)
63
+ return;
64
+ if (e.target !== this)
65
+ return;
66
+ swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
67
+ swiper.onTranslateToWrapperTransitionEnd = null;
68
+ delete swiper.onTranslateToWrapperTransitionEnd;
69
+ swiper.animating = false;
70
+ if (runCallbacks) {
71
+ swiper.emit('transitionEnd');
72
+ }
73
+ };
74
+ }
75
+ swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
76
+ }
77
+ }
78
+ return true;
79
+ }
80
+ exports.default = translateTo;
81
+ //# sourceMappingURL=translateTo.js.map
@@ -0,0 +1,21 @@
1
+ import updateSize from './updateSize.js';
2
+ import updateSlides from './updateSlides.js';
3
+ import updateAutoHeight from './updateAutoHeight.js';
4
+ import updateSlidesOffset from './updateSlidesOffset.js';
5
+ import updateSlidesProgress from './updateSlidesProgress.js';
6
+ import updateProgress from './updateProgress.js';
7
+ import updateSlidesClasses from './updateSlidesClasses.js';
8
+ import updateActiveIndex from './updateActiveIndex.js';
9
+ import updateClickedSlide from './updateClickedSlide.js';
10
+ declare const _default: {
11
+ updateSize: typeof updateSize;
12
+ updateSlides: typeof updateSlides;
13
+ updateAutoHeight: typeof updateAutoHeight;
14
+ updateSlidesOffset: typeof updateSlidesOffset;
15
+ updateSlidesProgress: typeof updateSlidesProgress;
16
+ updateProgress: typeof updateProgress;
17
+ updateSlidesClasses: typeof updateSlidesClasses;
18
+ updateActiveIndex: typeof updateActiveIndex;
19
+ updateClickedSlide: typeof updateClickedSlide;
20
+ };
21
+ export default _default;
@@ -0,0 +1,26 @@
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 updateSize_1 = __importDefault(require("./updateSize.js"));
7
+ var updateSlides_1 = __importDefault(require("./updateSlides.js"));
8
+ var updateAutoHeight_1 = __importDefault(require("./updateAutoHeight.js"));
9
+ var updateSlidesOffset_1 = __importDefault(require("./updateSlidesOffset.js"));
10
+ var updateSlidesProgress_1 = __importDefault(require("./updateSlidesProgress.js"));
11
+ var updateProgress_1 = __importDefault(require("./updateProgress.js"));
12
+ var updateSlidesClasses_1 = __importDefault(require("./updateSlidesClasses.js"));
13
+ var updateActiveIndex_1 = __importDefault(require("./updateActiveIndex.js"));
14
+ var updateClickedSlide_1 = __importDefault(require("./updateClickedSlide.js"));
15
+ exports.default = {
16
+ updateSize: updateSize_1.default,
17
+ updateSlides: updateSlides_1.default,
18
+ updateAutoHeight: updateAutoHeight_1.default,
19
+ updateSlidesOffset: updateSlidesOffset_1.default,
20
+ updateSlidesProgress: updateSlidesProgress_1.default,
21
+ updateProgress: updateProgress_1.default,
22
+ updateSlidesClasses: updateSlidesClasses_1.default,
23
+ updateActiveIndex: updateActiveIndex_1.default,
24
+ updateClickedSlide: updateClickedSlide_1.default,
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getActiveIndexByTranslate = void 0;
4
+ var process_lazy_preloader_1 = require("../../shared/process-lazy-preloader.js");
5
+ function getActiveIndexByTranslate(swiper) {
6
+ var slidesGrid = swiper.slidesGrid, params = swiper.params;
7
+ var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
8
+ var activeIndex;
9
+ for (var i = 0; i < slidesGrid.length; i += 1) {
10
+ if (typeof slidesGrid[i + 1] !== 'undefined') {
11
+ if (translate >= slidesGrid[i] &&
12
+ translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {
13
+ activeIndex = i;
14
+ }
15
+ else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
16
+ activeIndex = i + 1;
17
+ }
18
+ }
19
+ else if (translate >= slidesGrid[i]) {
20
+ activeIndex = i;
21
+ }
22
+ }
23
+ // Normalize slideIndex
24
+ if (params.normalizeSlideIndex) {
25
+ if (activeIndex < 0 || typeof activeIndex === 'undefined')
26
+ activeIndex = 0;
27
+ }
28
+ return activeIndex;
29
+ }
30
+ exports.getActiveIndexByTranslate = getActiveIndexByTranslate;
31
+ function updateActiveIndex(newActiveIndex) {
32
+ var swiper = this;
33
+ var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
34
+ var snapGrid = swiper.snapGrid, params = swiper.params, previousIndex = swiper.activeIndex, previousRealIndex = swiper.realIndex, previousSnapIndex = swiper.snapIndex;
35
+ var activeIndex = newActiveIndex;
36
+ var snapIndex;
37
+ var getVirtualRealIndex = function (aIndex) {
38
+ var realIndex = aIndex - swiper.virtual.slidesBefore;
39
+ if (realIndex < 0) {
40
+ realIndex = swiper.virtual.slides.length + realIndex;
41
+ }
42
+ if (realIndex >= swiper.virtual.slides.length) {
43
+ realIndex -= swiper.virtual.slides.length;
44
+ }
45
+ return realIndex;
46
+ };
47
+ if (typeof activeIndex === 'undefined') {
48
+ activeIndex = getActiveIndexByTranslate(swiper);
49
+ }
50
+ if (snapGrid.indexOf(translate) >= 0) {
51
+ snapIndex = snapGrid.indexOf(translate);
52
+ }
53
+ else {
54
+ var skip = Math.min(params.slidesPerGroupSkip, activeIndex);
55
+ snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
56
+ }
57
+ if (snapIndex >= snapGrid.length)
58
+ snapIndex = snapGrid.length - 1;
59
+ if (activeIndex === previousIndex && !swiper.params.loop) {
60
+ if (snapIndex !== previousSnapIndex) {
61
+ swiper.snapIndex = snapIndex;
62
+ swiper.emit('snapIndexChange');
63
+ }
64
+ return;
65
+ }
66
+ if (activeIndex === previousIndex &&
67
+ swiper.params.loop &&
68
+ swiper.virtual &&
69
+ swiper.params.virtual.enabled) {
70
+ swiper.realIndex = getVirtualRealIndex(activeIndex);
71
+ return;
72
+ }
73
+ var gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
74
+ var normalizeSlideIndexToColumn = function (index) {
75
+ if (!gridEnabled)
76
+ return index;
77
+ return Math.floor(index / params.grid.rows);
78
+ };
79
+ // Get real index
80
+ var realIndex;
81
+ if (swiper.virtual && params.virtual.enabled && params.loop) {
82
+ realIndex = getVirtualRealIndex(activeIndex);
83
+ }
84
+ else if (gridEnabled) {
85
+ var firstSlideInColumn = swiper.slides.filter(function (slideEl) { return slideEl.column === activeIndex; })[0];
86
+ var activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);
87
+ if (Number.isNaN(activeSlideIndex)) {
88
+ activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);
89
+ }
90
+ realIndex = Math.floor(activeSlideIndex / params.grid.rows);
91
+ }
92
+ else if (swiper.slides[activeIndex]) {
93
+ var slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');
94
+ if (slideIndex) {
95
+ realIndex = parseInt(slideIndex, 10);
96
+ }
97
+ else {
98
+ realIndex = activeIndex;
99
+ }
100
+ }
101
+ else {
102
+ realIndex = activeIndex;
103
+ }
104
+ Object.assign(swiper, {
105
+ previousSnapIndex: previousSnapIndex,
106
+ snapIndex: snapIndex,
107
+ previousRealIndex: previousRealIndex,
108
+ realIndex: realIndex,
109
+ previousIndex: previousIndex,
110
+ activeIndex: activeIndex,
111
+ });
112
+ if (swiper.initialized) {
113
+ (0, process_lazy_preloader_1.preload)(swiper);
114
+ }
115
+ swiper.emit('activeIndexChange');
116
+ swiper.emit('snapIndexChange');
117
+ if (swiper.initialized || swiper.params.runCallbacksOnInit) {
118
+ if (previousRealIndex !== realIndex) {
119
+ swiper.emit('realIndexChange');
120
+ }
121
+ swiper.emit('slideChange');
122
+ }
123
+ }
124
+ exports.default = updateActiveIndex;
125
+ //# sourceMappingURL=updateActiveIndex.js.map
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //@ts-nocheck
4
+ var utils_1 = require("../../shared/utils.js");
5
+ function updateSize() {
6
+ var swiper = this;
7
+ var width;
8
+ var height;
9
+ var el = swiper.el;
10
+ if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {
11
+ width = swiper.params.width;
12
+ }
13
+ else {
14
+ width = el.clientWidth;
15
+ }
16
+ if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {
17
+ height = swiper.params.height;
18
+ }
19
+ else {
20
+ height = el.clientHeight;
21
+ }
22
+ if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
23
+ return;
24
+ }
25
+ // Subtract paddings
26
+ width =
27
+ width -
28
+ parseInt((0, utils_1.elementStyle)(el, 'padding-left') || 0, 10) -
29
+ parseInt((0, utils_1.elementStyle)(el, 'padding-right') || 0, 10);
30
+ height =
31
+ height -
32
+ parseInt((0, utils_1.elementStyle)(el, 'padding-top') || 0, 10) -
33
+ parseInt((0, utils_1.elementStyle)(el, 'padding-bottom') || 0, 10);
34
+ if (Number.isNaN(width))
35
+ width = 0;
36
+ if (Number.isNaN(height))
37
+ height = 0;
38
+ Object.assign(swiper, {
39
+ width: width,
40
+ height: height,
41
+ size: swiper.isHorizontal() ? width : height,
42
+ });
43
+ }
44
+ exports.default = updateSize;
45
+ //# sourceMappingURL=updateSize.js.map
@@ -0,0 +1,306 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var utils_1 = require("../../shared/utils.js");
4
+ function updateSlides() {
5
+ var swiper = this;
6
+ function getDirectionPropertyValue(node, label) {
7
+ return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);
8
+ }
9
+ var params = swiper.params;
10
+ var wrapperEl = swiper.wrapperEl, slidesEl = swiper.slidesEl, swiperSize = swiper.size, rtl = swiper.rtlTranslate, wrongRTL = swiper.wrongRTL;
11
+ var isVirtual = swiper.virtual && params.virtual.enabled;
12
+ var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
13
+ var slides = (0, utils_1.elementChildren)(slidesEl, ".".concat(swiper.params.slideClass, ", swiper-slide"));
14
+ var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
15
+ var snapGrid = [];
16
+ var slidesGrid = [];
17
+ var slidesSizesGrid = [];
18
+ var offsetBefore = params.slidesOffsetBefore;
19
+ if (typeof offsetBefore === 'function') {
20
+ offsetBefore = params.slidesOffsetBefore.call(swiper);
21
+ }
22
+ var offsetAfter = params.slidesOffsetAfter;
23
+ if (typeof offsetAfter === 'function') {
24
+ offsetAfter = params.slidesOffsetAfter.call(swiper);
25
+ }
26
+ var previousSnapGridLength = swiper.snapGrid.length;
27
+ var previousSlidesGridLength = swiper.slidesGrid.length;
28
+ var spaceBetween = params.spaceBetween;
29
+ var slidePosition = -offsetBefore;
30
+ var prevSlideSize = 0;
31
+ var index = 0;
32
+ if (typeof swiperSize === 'undefined') {
33
+ return;
34
+ }
35
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
36
+ spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
37
+ }
38
+ else if (typeof spaceBetween === 'string') {
39
+ spaceBetween = parseFloat(spaceBetween);
40
+ }
41
+ swiper.virtualSize = -spaceBetween;
42
+ // reset margins
43
+ slides.forEach(function (slideEl) {
44
+ if (rtl) {
45
+ slideEl.style.marginLeft = '';
46
+ }
47
+ else {
48
+ slideEl.style.marginRight = '';
49
+ }
50
+ slideEl.style.marginBottom = '';
51
+ slideEl.style.marginTop = '';
52
+ });
53
+ // reset cssMode offsets
54
+ if (params.centeredSlides && params.cssMode) {
55
+ (0, utils_1.setCSSProperty)(wrapperEl, '--swiper-centered-offset-before', '');
56
+ (0, utils_1.setCSSProperty)(wrapperEl, '--swiper-centered-offset-after', '');
57
+ }
58
+ var gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;
59
+ if (gridEnabled) {
60
+ swiper.grid.initSlides(slides);
61
+ }
62
+ else if (swiper.grid) {
63
+ swiper.grid.unsetSlides();
64
+ }
65
+ // Calc slides
66
+ var slideSize;
67
+ var shouldResetSlideSize = params.slidesPerView === 'auto' &&
68
+ params.breakpoints &&
69
+ Object.keys(params.breakpoints).filter(function (key) {
70
+ return typeof params.breakpoints[key].slidesPerView !== 'undefined';
71
+ }).length > 0;
72
+ for (var i = 0; i < slidesLength; i += 1) {
73
+ slideSize = 0;
74
+ var slide = void 0;
75
+ if (slides[i])
76
+ slide = slides[i];
77
+ if (gridEnabled) {
78
+ swiper.grid.updateSlide(i, slide, slides);
79
+ }
80
+ if (slides[i] && (0, utils_1.elementStyle)(slide, 'display') === 'none')
81
+ continue; // eslint-disable-line
82
+ if (params.slidesPerView === 'auto') {
83
+ if (shouldResetSlideSize) {
84
+ slides[i].style[swiper.getDirectionLabel('width')] = "";
85
+ }
86
+ var slideStyles = getComputedStyle(slide);
87
+ var currentTransform = slide.style.transform;
88
+ var currentWebKitTransform = slide.style.webkitTransform;
89
+ if (currentTransform) {
90
+ slide.style.transform = 'none';
91
+ }
92
+ if (currentWebKitTransform) {
93
+ slide.style.webkitTransform = 'none';
94
+ }
95
+ if (params.roundLengths) {
96
+ slideSize = swiper.isHorizontal()
97
+ ? (0, utils_1.elementOuterSize)(slide, 'width', true)
98
+ : (0, utils_1.elementOuterSize)(slide, 'height', true);
99
+ }
100
+ else {
101
+ // eslint-disable-next-line
102
+ var width = getDirectionPropertyValue(slideStyles, 'width');
103
+ var paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');
104
+ var paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');
105
+ var marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');
106
+ var marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');
107
+ var boxSizing = slideStyles.getPropertyValue('box-sizing');
108
+ if (boxSizing && boxSizing === 'border-box') {
109
+ slideSize = width + marginLeft + marginRight;
110
+ }
111
+ else {
112
+ var clientWidth = slide.clientWidth, offsetWidth = slide.offsetWidth;
113
+ slideSize =
114
+ width +
115
+ paddingLeft +
116
+ paddingRight +
117
+ marginLeft +
118
+ marginRight +
119
+ (offsetWidth - clientWidth);
120
+ }
121
+ }
122
+ if (currentTransform) {
123
+ slide.style.transform = currentTransform;
124
+ }
125
+ if (currentWebKitTransform) {
126
+ slide.style.webkitTransform = currentWebKitTransform;
127
+ }
128
+ if (params.roundLengths)
129
+ slideSize = Math.floor(slideSize);
130
+ }
131
+ else {
132
+ slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;
133
+ if (params.roundLengths)
134
+ slideSize = Math.floor(slideSize);
135
+ if (slides[i]) {
136
+ slides[i].style[swiper.getDirectionLabel('width')] = "".concat(slideSize, "px");
137
+ }
138
+ }
139
+ if (slides[i]) {
140
+ slides[i].swiperSlideSize = slideSize;
141
+ }
142
+ slidesSizesGrid.push(slideSize);
143
+ if (params.centeredSlides) {
144
+ slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
145
+ if (prevSlideSize === 0 && i !== 0)
146
+ slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
147
+ if (i === 0)
148
+ slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
149
+ if (Math.abs(slidePosition) < 1 / 1000)
150
+ slidePosition = 0;
151
+ if (params.roundLengths)
152
+ slidePosition = Math.floor(slidePosition);
153
+ if (index % params.slidesPerGroup === 0)
154
+ snapGrid.push(slidePosition);
155
+ slidesGrid.push(slidePosition);
156
+ }
157
+ else {
158
+ if (params.roundLengths)
159
+ slidePosition = Math.floor(slidePosition);
160
+ if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) %
161
+ swiper.params.slidesPerGroup ===
162
+ 0)
163
+ snapGrid.push(slidePosition);
164
+ slidesGrid.push(slidePosition);
165
+ slidePosition = slidePosition + slideSize + spaceBetween;
166
+ }
167
+ swiper.virtualSize += slideSize + spaceBetween;
168
+ prevSlideSize = slideSize;
169
+ index += 1;
170
+ }
171
+ swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
172
+ if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
173
+ wrapperEl.style.width = "".concat(swiper.virtualSize + spaceBetween, "px");
174
+ }
175
+ if (params.setWrapperSize) {
176
+ wrapperEl.style[swiper.getDirectionLabel('width')] = "".concat(swiper.virtualSize + spaceBetween, "px");
177
+ }
178
+ if (gridEnabled) {
179
+ swiper.grid.updateWrapperSize(slideSize, snapGrid);
180
+ }
181
+ // Remove last grid elements depending on width
182
+ if (!params.centeredSlides) {
183
+ var newSlidesGrid = [];
184
+ for (var i = 0; i < snapGrid.length; i += 1) {
185
+ var slidesGridItem = snapGrid[i];
186
+ if (params.roundLengths)
187
+ slidesGridItem = Math.floor(slidesGridItem);
188
+ if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
189
+ newSlidesGrid.push(slidesGridItem);
190
+ }
191
+ }
192
+ snapGrid = newSlidesGrid;
193
+ if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) >
194
+ 1) {
195
+ snapGrid.push(swiper.virtualSize - swiperSize);
196
+ }
197
+ }
198
+ if (isVirtual && params.loop) {
199
+ var size = slidesSizesGrid[0] + spaceBetween;
200
+ if (params.slidesPerGroup > 1) {
201
+ var groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);
202
+ var groupSize = size * params.slidesPerGroup;
203
+ for (var i = 0; i < groups; i += 1) {
204
+ snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);
205
+ }
206
+ }
207
+ for (var i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {
208
+ if (params.slidesPerGroup === 1) {
209
+ snapGrid.push(snapGrid[snapGrid.length - 1] + size);
210
+ }
211
+ slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);
212
+ swiper.virtualSize += size;
213
+ }
214
+ }
215
+ if (snapGrid.length === 0)
216
+ snapGrid = [0];
217
+ if (spaceBetween !== 0) {
218
+ var key_1 = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight');
219
+ slides
220
+ .filter(function (_, slideIndex) {
221
+ if (!params.cssMode || params.loop)
222
+ return true;
223
+ if (slideIndex === slides.length - 1) {
224
+ return false;
225
+ }
226
+ return true;
227
+ })
228
+ .forEach(function (slideEl) {
229
+ slideEl.style[key_1] = "".concat(spaceBetween, "px");
230
+ });
231
+ }
232
+ if (params.centeredSlides && params.centeredSlidesBounds) {
233
+ var allSlidesSize_1 = 0;
234
+ slidesSizesGrid.forEach(function (slideSizeValue) {
235
+ allSlidesSize_1 += slideSizeValue + (spaceBetween || 0);
236
+ });
237
+ allSlidesSize_1 -= spaceBetween;
238
+ var maxSnap_1 = allSlidesSize_1 - swiperSize;
239
+ snapGrid = snapGrid.map(function (snap) {
240
+ if (snap <= 0)
241
+ return -offsetBefore;
242
+ if (snap > maxSnap_1)
243
+ return maxSnap_1 + offsetAfter;
244
+ return snap;
245
+ });
246
+ }
247
+ if (params.centerInsufficientSlides) {
248
+ var allSlidesSize_2 = 0;
249
+ slidesSizesGrid.forEach(function (slideSizeValue) {
250
+ allSlidesSize_2 += slideSizeValue + (spaceBetween || 0);
251
+ });
252
+ allSlidesSize_2 -= spaceBetween;
253
+ var offsetSize = (params.slidesOffsetBefore || 0) + (params.slidesOffsetAfter || 0);
254
+ if (allSlidesSize_2 + offsetSize < swiperSize) {
255
+ var allSlidesOffset_1 = (swiperSize - allSlidesSize_2 - offsetSize) / 2;
256
+ snapGrid.forEach(function (snap, snapIndex) {
257
+ snapGrid[snapIndex] = snap - allSlidesOffset_1;
258
+ });
259
+ slidesGrid.forEach(function (snap, snapIndex) {
260
+ slidesGrid[snapIndex] = snap + allSlidesOffset_1;
261
+ });
262
+ }
263
+ }
264
+ Object.assign(swiper, {
265
+ slides: slides,
266
+ snapGrid: snapGrid,
267
+ slidesGrid: slidesGrid,
268
+ slidesSizesGrid: slidesSizesGrid,
269
+ });
270
+ if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {
271
+ (0, utils_1.setCSSProperty)(wrapperEl, '--swiper-centered-offset-before', "".concat(-snapGrid[0], "px"));
272
+ (0, utils_1.setCSSProperty)(wrapperEl, '--swiper-centered-offset-after', "".concat(swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2, "px"));
273
+ var addToSnapGrid_1 = -swiper.snapGrid[0];
274
+ var addToSlidesGrid_1 = -swiper.slidesGrid[0];
275
+ swiper.snapGrid = swiper.snapGrid.map(function (v) { return v + addToSnapGrid_1; });
276
+ swiper.slidesGrid = swiper.slidesGrid.map(function (v) { return v + addToSlidesGrid_1; });
277
+ }
278
+ if (slidesLength !== previousSlidesLength) {
279
+ swiper.emit('slidesLengthChange');
280
+ }
281
+ if (snapGrid.length !== previousSnapGridLength) {
282
+ if (swiper.params.watchOverflow)
283
+ swiper.checkOverflow();
284
+ swiper.emit('snapGridLengthChange');
285
+ }
286
+ if (slidesGrid.length !== previousSlidesGridLength) {
287
+ swiper.emit('slidesGridLengthChange');
288
+ }
289
+ if (params.watchSlidesProgress) {
290
+ swiper.updateSlidesOffset();
291
+ }
292
+ swiper.emit('slidesUpdated');
293
+ if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {
294
+ var backFaceHiddenClass = "".concat(params.containerModifierClass, "backface-hidden");
295
+ var hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);
296
+ if (slidesLength <= params.maxBackfaceHiddenSlides) {
297
+ if (!hasClassBackfaceClassAdded)
298
+ swiper.el.classList.add(backFaceHiddenClass);
299
+ }
300
+ else if (hasClassBackfaceClassAdded) {
301
+ swiper.el.classList.remove(backFaceHiddenClass);
302
+ }
303
+ }
304
+ }
305
+ exports.default = updateSlides;
306
+ //# sourceMappingURL=updateSlides.js.map
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //@ts-nocheck
4
+ var utils_1 = require("../../shared/utils.js");
5
+ var toggleSlideClasses = function (slideEl, condition, className) {
6
+ if (condition && !slideEl.classList.contains(className)) {
7
+ slideEl.classList.add(className);
8
+ }
9
+ else if (!condition && slideEl.classList.contains(className)) {
10
+ slideEl.classList.remove(className);
11
+ }
12
+ };
13
+ function updateSlidesClasses() {
14
+ var swiper = this;
15
+ var slides = swiper.slides, params = swiper.params, slidesEl = swiper.slidesEl, activeIndex = swiper.activeIndex;
16
+ var isVirtual = swiper.virtual && params.virtual.enabled;
17
+ var gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
18
+ var getFilteredSlide = function (selector) {
19
+ return (0, utils_1.elementChildren)(slidesEl, ".".concat(params.slideClass).concat(selector, ", swiper-slide").concat(selector))[0];
20
+ };
21
+ var activeSlide;
22
+ var prevSlide;
23
+ var nextSlide;
24
+ if (isVirtual) {
25
+ if (params.loop) {
26
+ var slideIndex = activeIndex - swiper.virtual.slidesBefore;
27
+ if (slideIndex < 0)
28
+ slideIndex = swiper.virtual.slides.length + slideIndex;
29
+ if (slideIndex >= swiper.virtual.slides.length)
30
+ slideIndex -= swiper.virtual.slides.length;
31
+ activeSlide = getFilteredSlide("[data-swiper-slide-index=\"".concat(slideIndex, "\"]"));
32
+ }
33
+ else {
34
+ activeSlide = getFilteredSlide("[data-swiper-slide-index=\"".concat(activeIndex, "\"]"));
35
+ }
36
+ }
37
+ else {
38
+ if (gridEnabled) {
39
+ activeSlide = slides.filter(function (slideEl) { return slideEl.column === activeIndex; })[0];
40
+ nextSlide = slides.filter(function (slideEl) { return slideEl.column === activeIndex + 1; })[0];
41
+ prevSlide = slides.filter(function (slideEl) { return slideEl.column === activeIndex - 1; })[0];
42
+ }
43
+ else {
44
+ activeSlide = slides[activeIndex];
45
+ }
46
+ }
47
+ if (activeSlide) {
48
+ if (!gridEnabled) {
49
+ // Next Slide
50
+ nextSlide = (0, utils_1.elementNextAll)(activeSlide, ".".concat(params.slideClass, ", swiper-slide"))[0];
51
+ if (params.loop && !nextSlide) {
52
+ nextSlide = slides[0];
53
+ }
54
+ // Prev Slide
55
+ prevSlide = (0, utils_1.elementPrevAll)(activeSlide, ".".concat(params.slideClass, ", swiper-slide"))[0];
56
+ if (params.loop && !prevSlide === 0) {
57
+ prevSlide = slides[slides.length - 1];
58
+ }
59
+ }
60
+ }
61
+ slides.forEach(function (slideEl) {
62
+ toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
63
+ toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
64
+ toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
65
+ });
66
+ swiper.emitSlidesClasses();
67
+ }
68
+ exports.default = updateSlidesClasses;
69
+ //# sourceMappingURL=updateSlidesClasses.js.map
@@ -1,4 +1,4 @@
1
- import { TabContentProps } from "../../../../../../system";
1
+ import { TabContentProps } from "../../../../../../system/index.js";
2
2
  export declare function CaptureI18nErrors({ languages, changeTab }: {
3
3
  languages: {
4
4
  symbol: string;