infinity-forge 2.4.0 → 2.4.2

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 (239) hide show
  1. package/dist/sites/components/default-pages/blog/components/blog-item/index.d.ts +1 -1
  2. package/dist/sites/components/default-pages/blog/components/blog-item/index.js +3 -3
  3. package/dist/sites/components/default-pages/blog/components/blog-item/intefaces.d.ts +1 -1
  4. package/dist/sites/components/default-pages/blog/components/featured-blog/index.d.ts +1 -1
  5. package/dist/sites/components/default-pages/blog/components/featured-blog/index.js +2 -2
  6. package/dist/sites/components/default-pages/blog/components/featured-blog/interfaces.d.ts +2 -2
  7. package/dist/sites/components/default-pages/blog/components/side-box-categories/index.d.ts +2 -2
  8. package/dist/sites/components/default-pages/blog/components/side-box-categories/index.js +2 -2
  9. package/dist/sites/components/default-pages/blog/components/side-box-categories/interfaces.d.ts +1 -1
  10. package/dist/sites/components/default-pages/blog/components/side-box-newsletter/index.d.ts +1 -1
  11. package/dist/sites/components/default-pages/blog/components/side-box-newsletter/index.js +3 -3
  12. package/dist/sites/components/default-pages/blog/components/title-blog/index.js +2 -2
  13. package/dist/system/domain/protocols/http/errors/http-errors/index.d.ts +7 -7
  14. package/dist/system/domain/protocols/http/errors/http-errors/index.js +7 -7
  15. package/dist/system/domain/protocols/http/errors/system-errors-model/index.d.ts +1 -1
  16. package/dist/system/domain/protocols/http/errors/system-errors-model/index.js +1 -1
  17. package/dist/system/domain/use-cases/auth/admin/index.js +0 -18
  18. package/dist/system/presentation/components/data/avatar/index.js +0 -59
  19. package/dist/system/presentation/components/data/buttons/index.d.ts +0 -1
  20. package/dist/system/presentation/components/data/buttons/index.js +0 -18
  21. package/dist/system/presentation/components/data/buttons/sidebar-button/index.js +3 -3
  22. package/dist/system/presentation/components/data/chat/card-message/index.d.ts +1 -1
  23. package/dist/system/presentation/components/data/chat/card-message/index.js +3 -3
  24. package/dist/system/presentation/components/data/chat/index.d.ts +0 -2
  25. package/dist/system/presentation/components/data/chat/index.js +0 -38
  26. package/dist/system/presentation/components/data/chat/interfaces.d.ts +0 -8
  27. package/dist/system/presentation/components/data/chat/loader/index.js +1 -1
  28. package/dist/system/presentation/components/data/detail-card/component.d.ts +0 -2
  29. package/dist/system/presentation/components/data/detail-card/component.js +0 -42
  30. package/dist/system/presentation/components/data/detail-card/index.d.ts +0 -2
  31. package/dist/system/presentation/components/data/detail-card/index.js +0 -19
  32. package/dist/system/presentation/components/data/detail-card/interfaces.d.ts +0 -19
  33. package/dist/system/presentation/components/data/highlight-icon/index.d.ts +0 -2
  34. package/dist/system/presentation/components/data/highlight-icon/index.js +0 -40
  35. package/dist/system/presentation/components/data/highlight-icon/interfaces.d.ts +0 -8
  36. package/dist/system/presentation/components/data/highlight-text/index.d.ts +0 -2
  37. package/dist/system/presentation/components/data/highlight-text/index.js +0 -43
  38. package/dist/system/presentation/components/data/input-search/index.d.ts +0 -2
  39. package/dist/system/presentation/components/data/input-search/index.js +0 -39
  40. package/dist/system/presentation/components/data/logo/index.js +0 -34
  41. package/dist/system/presentation/components/data/menu/component.js +0 -17
  42. package/dist/system/presentation/components/data/menu/components/index.d.ts +1 -1
  43. package/dist/system/presentation/components/data/menu/components/index.js +1 -1
  44. package/dist/system/presentation/components/data/menu/index.d.ts +0 -2
  45. package/dist/system/presentation/components/data/menu/index.js +0 -19
  46. package/dist/system/presentation/components/data/menu/modes/index.d.ts +2 -2
  47. package/dist/system/presentation/components/data/menu/modes/index.js +2 -2
  48. package/dist/system/presentation/components/data/notifications/card/index.d.ts +1 -1
  49. package/dist/system/presentation/components/data/notifications/card/index.js +2 -2
  50. package/dist/system/presentation/components/data/notifications/index.js +0 -155
  51. package/dist/system/presentation/components/data/page-wrapper/index.d.ts +0 -2
  52. package/dist/system/presentation/components/data/page-wrapper/index.js +0 -35
  53. package/dist/system/presentation/components/data/page-wrapper/interfaces.d.ts +0 -7
  54. package/dist/system/presentation/components/data/popover/index.d.ts +0 -2
  55. package/dist/system/presentation/components/data/profile-infos/index.d.ts +0 -2
  56. package/dist/system/presentation/components/data/profile-infos/index.js +0 -48
  57. package/dist/system/presentation/components/data/profile-infos/interfaces.d.ts +0 -6
  58. package/dist/system/presentation/components/data/profile-infos/profile/index.d.ts +1 -1
  59. package/dist/system/presentation/components/data/profile-infos/profile/index.js +3 -3
  60. package/dist/system/presentation/components/data/select-workspace/index.d.ts +0 -4
  61. package/dist/system/presentation/components/data/select-workspace/index.js +0 -69
  62. package/dist/system/presentation/components/data/tab/component.d.ts +0 -2
  63. package/dist/system/presentation/components/data/tab/component.js +0 -67
  64. package/dist/system/presentation/components/data/tab/index.d.ts +0 -2
  65. package/dist/system/presentation/components/data/tab/index.js +0 -19
  66. package/dist/system/presentation/components/data/tab/interfaces.d.ts +0 -29
  67. package/dist/system/presentation/components/data/tab/tab-item/index.d.ts +5 -0
  68. package/dist/system/presentation/components/data/tab/tab-item/index.js +46 -0
  69. package/dist/system/presentation/components/data/tab/tab-item/styles.d.ts +8 -0
  70. package/dist/system/presentation/components/layout/header/components/index.d.ts +2 -0
  71. package/dist/system/presentation/components/layout/header/components/index.js +19 -0
  72. package/dist/system/presentation/components/layout/header/index.d.ts +0 -2
  73. package/dist/system/presentation/components/layout/header/index.js +0 -25
  74. package/dist/system/presentation/components/layout/header/version-01/index.d.ts +2 -0
  75. package/dist/system/presentation/components/layout/header/version-01/index.js +45 -0
  76. package/dist/system/presentation/components/pages/menus/index.d.ts +0 -1
  77. package/dist/system/presentation/components/pages/menus/index.js +0 -18
  78. package/dist/system/presentation/components/pages/menus/page.js +0 -40
  79. package/dist/system/presentation/components/pages/menus/table/columns.d.ts +3 -0
  80. package/dist/system/presentation/components/pages/menus/table/columns.js +21 -0
  81. package/dist/system/presentation/components/pages/menus/table/create.d.ts +3 -0
  82. package/dist/system/presentation/components/pages/menus/table/create.js +72 -0
  83. package/dist/system/presentation/components/pages/menus/table/delete.js +71 -0
  84. package/dist/system/presentation/components/pages/menus/table/edit.d.ts +3 -0
  85. package/dist/system/presentation/components/pages/menus/table/edit.js +78 -0
  86. package/dist/system/presentation/components/pages/menus/table/index.d.ts +4 -0
  87. package/dist/system/presentation/components/pages/menus/table/index.js +21 -0
  88. package/dist/system/presentation/components/pages/users/index.d.ts +0 -1
  89. package/dist/system/presentation/components/pages/users/index.js +0 -18
  90. package/dist/system/presentation/components/pages/users/page.js +0 -40
  91. package/dist/system/presentation/components/pages/users/table/columns.d.ts +3 -0
  92. package/dist/system/presentation/components/pages/users/table/create.d.ts +3 -0
  93. package/dist/system/presentation/components/pages/users/table/create.js +75 -0
  94. package/dist/system/presentation/components/pages/users/table/delete.js +74 -0
  95. package/dist/system/presentation/components/pages/users/table/edit.d.ts +3 -0
  96. package/dist/system/presentation/components/pages/users/table/edit.js +83 -0
  97. package/dist/system/presentation/components/pages/users/table/index.d.ts +4 -0
  98. package/dist/system/presentation/components/pages/users/table/index.js +21 -0
  99. package/dist/system/presentation/context/auth/components/index.d.ts +0 -2
  100. package/dist/system/presentation/context/auth/components/index.js +0 -19
  101. package/dist/system/presentation/context/auth/components/login/index.js +38 -0
  102. package/dist/system/presentation/context/auth/components/private-page/index.d.ts +2 -0
  103. package/dist/system/presentation/context/auth/components/private-page/index.js +141 -0
  104. package/dist/system/presentation/hooks/notifications/use-load-all/index.d.ts +0 -1
  105. package/dist/system/presentation/hooks/notifications/use-load-all/index.js +0 -63
  106. package/dist/system/presentation/hooks/notifications/use-load-no-read/index.d.ts +0 -2
  107. package/dist/system/presentation/hooks/notifications/use-load-no-read/index.js +0 -60
  108. package/dist/system/presentation/hooks/ui/use-table/component.d.ts +0 -8
  109. package/dist/system/presentation/hooks/ui/use-table/component.js +0 -26
  110. package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +1 -0
  111. package/dist/system/presentation/hooks/ui/use-table/components/index.js +18 -0
  112. package/dist/system/presentation/hooks/ui/use-table/index.d.ts +0 -4
  113. package/dist/system/presentation/hooks/ui/use-table/index.js +0 -21
  114. package/dist/system/presentation/hooks/ui/use-table/interfaces.d.ts +0 -92
  115. package/dist/system/presentation/hooks/ui/use-table/query/get-query-arguments-table.d.ts +2 -0
  116. package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +5 -0
  117. package/dist/system/presentation/hooks/ui/use-table/query/hook.js +52 -0
  118. package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +2 -0
  119. package/dist/system/presentation/hooks/ui/use-table/query/index.js +19 -0
  120. package/dist/ui/components/carousel/carousel-lib/components-shared/get-changed-params.js +0 -51
  121. package/dist/ui/components/carousel/carousel-lib/components-shared/get-element-params.js +0 -148
  122. package/dist/ui/components/carousel/carousel-lib/components-shared/get-params.js +0 -61
  123. package/dist/ui/components/carousel/carousel-lib/components-shared/mount-swiper.js +0 -24
  124. package/dist/ui/components/carousel/carousel-lib/components-shared/update-swiper.js +0 -208
  125. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/getBreakpoint.js +35 -0
  126. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.d.ts +7 -0
  127. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.js +9 -0
  128. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/setBreakpoint.js +94 -0
  129. package/dist/ui/components/carousel/carousel-lib/core/classes/index.d.ts +7 -0
  130. package/dist/ui/components/carousel/carousel-lib/core/classes/index.js +9 -0
  131. package/dist/ui/components/carousel/carousel-lib/core/core.js +0 -654
  132. package/dist/ui/components/carousel/carousel-lib/core/events/index.js +77 -0
  133. package/dist/ui/components/carousel/carousel-lib/core/events/onLoad.js +14 -0
  134. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchEnd.js +194 -0
  135. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchMove.js +314 -0
  136. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchStart.js +154 -0
  137. package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.d.ts +7 -0
  138. package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.js +12 -0
  139. package/dist/ui/components/carousel/carousel-lib/core/loop/index.d.ts +9 -0
  140. package/dist/ui/components/carousel/carousel-lib/core/loop/index.js +14 -0
  141. package/dist/ui/components/carousel/carousel-lib/core/loop/loopCreate.js +57 -0
  142. package/dist/ui/components/carousel/carousel-lib/core/loop/loopFix.js +230 -0
  143. package/dist/ui/components/carousel/carousel-lib/core/moduleExtendParams.js +0 -42
  144. package/dist/ui/components/carousel/carousel-lib/core/slide/index.d.ts +17 -0
  145. package/dist/ui/components/carousel/carousel-lib/core/slide/index.js +22 -0
  146. package/dist/ui/components/carousel/carousel-lib/core/slide/slideTo.js +160 -0
  147. package/dist/ui/components/carousel/carousel-lib/core/slide/slideToClickedSlide.js +46 -0
  148. package/dist/ui/components/carousel/carousel-lib/core/transition/index.d.ts +9 -0
  149. package/dist/ui/components/carousel/carousel-lib/core/transition/index.js +14 -0
  150. package/dist/ui/components/carousel/carousel-lib/core/transition/transitionEnd.js +18 -0
  151. package/dist/ui/components/carousel/carousel-lib/core/transition/transitionStart.js +19 -0
  152. package/dist/ui/components/carousel/carousel-lib/core/translate/getTranslate.js +21 -0
  153. package/dist/ui/components/carousel/carousel-lib/core/translate/index.d.ts +13 -0
  154. package/dist/ui/components/carousel/carousel-lib/core/translate/index.js +18 -0
  155. package/dist/ui/components/carousel/carousel-lib/core/translate/translateTo.js +81 -0
  156. package/dist/ui/components/carousel/carousel-lib/core/update/index.d.ts +21 -0
  157. package/dist/ui/components/carousel/carousel-lib/core/update/index.js +26 -0
  158. package/dist/ui/components/carousel/carousel-lib/core/update/updateActiveIndex.js +125 -0
  159. package/dist/ui/components/carousel/carousel-lib/core/update/updateSize.js +45 -0
  160. package/dist/ui/components/carousel/carousel-lib/core/update/updateSlides.js +306 -0
  161. package/dist/ui/components/carousel/carousel-lib/core/update/updateSlidesClasses.js +69 -0
  162. package/dist/ui/components/carousel/carousel-lib/modules/autoplay.js +0 -336
  163. package/dist/ui/components/carousel/carousel-lib/modules/effect-fade.js +0 -63
  164. package/dist/ui/components/carousel/carousel-lib/modules/free-mode.js +0 -247
  165. package/dist/ui/components/carousel/carousel-lib/modules/index.d.ts +0 -6
  166. package/dist/ui/components/carousel/carousel-lib/modules/index.js +0 -23
  167. package/dist/ui/components/carousel/carousel-lib/modules/navigation.js +0 -223
  168. package/dist/ui/components/carousel/carousel-lib/modules/pagination.js +0 -514
  169. package/dist/ui/components/carousel/carousel-lib/modules/virtual.js +0 -379
  170. package/dist/ui/components/carousel/carousel-lib/react/swiper-slide.js +0 -88
  171. package/dist/ui/components/carousel/carousel-lib/react/swiper.js +0 -210
  172. package/dist/ui/components/carousel/carousel-lib/shared/create-element-if-not-defined.js +0 -22
  173. package/dist/ui/components/carousel/carousel-lib/shared/create-shadow.js +0 -15
  174. package/dist/ui/components/carousel/carousel-lib/shared/effect-target.js +0 -13
  175. package/dist/ui/components/carousel/carousel-lib/shared/effect-virtual-transition-end.js +0 -47
  176. package/dist/ui/components/carousel/carousel-lib/shared/get-browser.js +0 -43
  177. package/dist/ui/components/carousel/carousel-lib/shared/get-device.js +0 -69
  178. package/dist/ui/components/carousel/carousel-lib/shared/get-support.js +0 -25
  179. package/dist/ui/components/carousel/carousel-lib/shared/utils.js +0 -372
  180. package/dist/ui/components/carousel/carousel-lib/ssr-window/document.js +0 -65
  181. package/dist/ui/components/carousel/carousel-lib/ssr-window/ssr-window.d.ts +0 -4
  182. package/dist/ui/components/carousel/carousel-lib/ssr-window/ssr-window.js +0 -15
  183. package/dist/ui/components/carousel/carousel-lib/ssr-window/window.js +0 -71
  184. package/dist/ui/components/carousel/carousel-lib/types/index.d.ts +0 -5
  185. package/dist/ui/components/carousel/carousel-lib/types/index.js +0 -27
  186. package/dist/ui/components/carousel/carousel-lib/types/swiper-events.d.ts +0 -162
  187. package/dist/ui/components/form/handler/custom-submit/index.d.ts +0 -17
  188. package/dist/ui/components/form/handler/custom-submit/index.js +0 -25
  189. package/dist/ui/components/form/handler/dynamic_form_handler/component.d.ts +0 -2
  190. package/dist/ui/components/form/handler/dynamic_form_handler/component.js +0 -117
  191. package/dist/ui/components/form/handler/dynamic_form_handler/index.d.ts +0 -2
  192. package/dist/ui/components/form/handler/dynamic_form_handler/index.js +0 -19
  193. package/dist/ui/components/form/handler/dynamic_form_handler/interfaces.d.ts +0 -28
  194. package/dist/ui/components/form/handler/form-handler/generate-schemas.js +0 -111
  195. package/dist/ui/components/form/handler/form-handler/index.d.ts +0 -2
  196. package/dist/ui/components/form/handler/form-handler/index.js +0 -241
  197. package/dist/ui/components/form/handler/form-handler/use-schemas.d.ts +0 -2
  198. package/dist/ui/components/form/handler/form-handler/use-schemas.js +0 -115
  199. package/dist/ui/components/form/handler/form-handler/use-send-file.d.ts +0 -5
  200. package/dist/ui/components/form/handler/form-handler/use-send-file.js +0 -209
  201. package/dist/ui/components/form/handler/i18n/index.d.ts +0 -2
  202. package/dist/ui/components/form/handler/i18n/index.js +4 -4
  203. package/dist/ui/components/form/input-cep/use-cep/hook.d.ts +2 -2
  204. package/dist/ui/components/form/input-cep/use-cep/hook.js +1 -1
  205. package/dist/ui/components/form/input-cep/use-cep/index.d.ts +2 -2
  206. package/dist/ui/components/form/input-cep/use-cep/index.js +2 -2
  207. package/dist/ui/components/form/input-control/error/index.js +1 -1
  208. package/dist/ui/components/form/input-control/label/index.js +1 -1
  209. package/dist/ui/components/form/input-control/loader-input/index.js +2 -2
  210. package/dist/ui/components/form/input-currency/components/CurrencyInput.js +1 -1
  211. package/dist/ui/components/form/input-currency/components/index.d.ts +1 -1
  212. package/dist/ui/components/form/input-currency/components/index.js +1 -1
  213. package/dist/ui/components/form/input-date-picker/calendar/index.d.ts +1 -1
  214. package/dist/ui/components/form/input-date-picker/calendar/index.js +4 -4
  215. package/dist/ui/components/form/input-date-picker/calendar/interface.d.ts +2 -2
  216. package/dist/ui/components/form/input-date-picker/calendar/styles.d.ts +1 -1
  217. package/dist/ui/components/form/input-date-picker/mock/index.d.ts +1 -1
  218. package/dist/ui/components/form/input-date-picker/mock/index.js +1 -1
  219. package/dist/ui/components/form/input-file/hooks/index.d.ts +4 -4
  220. package/dist/ui/components/form/input-file/hooks/index.js +4 -4
  221. package/dist/ui/components/form/input-file/hooks/use-components-file.d.ts +2 -2
  222. package/dist/ui/components/form/input-file/hooks/use-components-file.js +2 -2
  223. package/dist/ui/components/form/input-file/hooks/use-file-elements.d.ts +1 -1
  224. package/dist/ui/components/form/input-file/hooks/use-file-elements.js +2 -2
  225. package/dist/ui/components/form/input-file/hooks/use-file.d.ts +2 -2
  226. package/dist/ui/components/form/input-file/hooks/use-file.js +2 -2
  227. package/dist/ui/components/form/input-file/hooks/use-rendered-file.d.ts +1 -1
  228. package/dist/ui/components/form/input-file/hooks/use-rendered-file.js +1 -1
  229. package/dist/ui/components/form/input-file/render-files/component.d.ts +1 -1
  230. package/dist/ui/components/form/input-file/render-files/component.js +2 -2
  231. package/dist/ui/components/form/input-file/render-files/index.d.ts +3 -3
  232. package/dist/ui/components/form/input-file/render-files/index.js +3 -3
  233. package/dist/ui/components/form/input-file/render-files/interfaces.d.ts +2 -2
  234. package/dist/ui/components/form/input-seo/input-meta-image/index.d.ts +1 -1
  235. package/dist/ui/components/form/input-seo/input-meta-image/index.js +2 -2
  236. package/dist/ui/components/menu-mobile/components/nav-links/index.d.ts +1 -1
  237. package/dist/ui/components/menu-mobile/components/nav-links/index.js +3 -3
  238. package/dist/ui/components/menu-mobile/components/nav-links/interfaces.d.ts +1 -1
  239. package/package.json +1 -1
@@ -1,514 +0,0 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Pagination = void 0;
16
- var classes_to_selector_1 = __importDefault(require("../shared/classes-to-selector.js"));
17
- var create_element_if_not_defined_1 = __importDefault(require("../shared/create-element-if-not-defined.js"));
18
- var utils_1 = require("../shared/utils.js");
19
- function Pagination(_a) {
20
- var swiper = _a.swiper, extendParams = _a.extendParams, on = _a.on, emit = _a.emit;
21
- var pfx = 'swiper-pagination';
22
- extendParams({
23
- pagination: {
24
- el: null,
25
- bulletElement: 'span',
26
- clickable: false,
27
- hideOnClick: false,
28
- renderBullet: null,
29
- renderProgressbar: null,
30
- renderFraction: null,
31
- renderCustom: null,
32
- progressbarOpposite: false,
33
- type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
34
- dynamicBullets: false,
35
- dynamicMainBullets: 1,
36
- formatFractionCurrent: function (number) { return number; },
37
- formatFractionTotal: function (number) { return number; },
38
- bulletClass: "".concat(pfx, "-bullet"),
39
- bulletActiveClass: "".concat(pfx, "-bullet-active"),
40
- modifierClass: "".concat(pfx, "-"),
41
- currentClass: "".concat(pfx, "-current"),
42
- totalClass: "".concat(pfx, "-total"),
43
- hiddenClass: "".concat(pfx, "-hidden"),
44
- progressbarFillClass: "".concat(pfx, "-progressbar-fill"),
45
- progressbarOppositeClass: "".concat(pfx, "-progressbar-opposite"),
46
- clickableClass: "".concat(pfx, "-clickable"),
47
- lockClass: "".concat(pfx, "-lock"),
48
- horizontalClass: "".concat(pfx, "-horizontal"),
49
- verticalClass: "".concat(pfx, "-vertical"),
50
- paginationDisabledClass: "".concat(pfx, "-disabled"),
51
- },
52
- });
53
- swiper.pagination = {
54
- el: null,
55
- bullets: [],
56
- };
57
- var bulletSize;
58
- var dynamicBulletIndex = 0;
59
- function isPaginationDisabled() {
60
- return (!swiper.params.pagination.el ||
61
- !swiper.pagination.el ||
62
- (Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0));
63
- }
64
- function setSideBullets(bulletEl, position) {
65
- var bulletActiveClass = swiper.params.pagination.bulletActiveClass;
66
- if (!bulletEl)
67
- return;
68
- bulletEl = bulletEl["".concat(position === 'prev' ? 'previous' : 'next', "ElementSibling")];
69
- if (bulletEl) {
70
- bulletEl.classList.add("".concat(bulletActiveClass, "-").concat(position));
71
- bulletEl = bulletEl["".concat(position === 'prev' ? 'previous' : 'next', "ElementSibling")];
72
- if (bulletEl) {
73
- bulletEl.classList.add("".concat(bulletActiveClass, "-").concat(position, "-").concat(position));
74
- }
75
- }
76
- }
77
- function onBulletClick(e) {
78
- var bulletEl = e.target.closest((0, classes_to_selector_1.default)(swiper.params.pagination.bulletClass));
79
- if (!bulletEl) {
80
- return;
81
- }
82
- e.preventDefault();
83
- var index = (0, utils_1.elementIndex)(bulletEl) * swiper.params.slidesPerGroup;
84
- if (swiper.params.loop) {
85
- if (swiper.realIndex === index)
86
- return;
87
- swiper.slideToLoop(index);
88
- }
89
- else {
90
- swiper.slideTo(index);
91
- }
92
- }
93
- function update() {
94
- var _a, _b;
95
- // Render || Update Pagination bullets/items
96
- var rtl = swiper.rtl;
97
- var params = swiper.params.pagination;
98
- if (isPaginationDisabled())
99
- return;
100
- var el = swiper.pagination.el;
101
- el = (0, utils_1.makeElementsArray)(el);
102
- // Current/Total
103
- var current;
104
- var previousIndex;
105
- var slidesLength = swiper.virtual && swiper.params.virtual.enabled
106
- ? swiper.virtual.slides.length
107
- : swiper.slides.length;
108
- var total = swiper.params.loop
109
- ? Math.ceil(slidesLength / swiper.params.slidesPerGroup)
110
- : swiper.snapGrid.length;
111
- if (swiper.params.loop) {
112
- previousIndex = swiper.previousRealIndex || 0;
113
- current =
114
- swiper.params.slidesPerGroup > 1
115
- ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup)
116
- : swiper.realIndex;
117
- }
118
- else if (typeof swiper.snapIndex !== 'undefined') {
119
- current = swiper.snapIndex;
120
- previousIndex = swiper.previousSnapIndex;
121
- }
122
- else {
123
- previousIndex = swiper.previousIndex || 0;
124
- current = swiper.activeIndex || 0;
125
- }
126
- // Types
127
- if (params.type === 'bullets' &&
128
- swiper.pagination.bullets &&
129
- swiper.pagination.bullets.length > 0) {
130
- var bullets = swiper.pagination.bullets;
131
- var firstIndex_1;
132
- var lastIndex_1;
133
- var midIndex = void 0;
134
- if (params.dynamicBullets) {
135
- bulletSize = (0, utils_1.elementOuterSize)(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true);
136
- el.forEach(function (subEl) {
137
- subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = "".concat(bulletSize * (params.dynamicMainBullets + 4), "px");
138
- });
139
- if (params.dynamicMainBullets > 1 && previousIndex !== undefined) {
140
- dynamicBulletIndex += current - (previousIndex || 0);
141
- if (dynamicBulletIndex > params.dynamicMainBullets - 1) {
142
- dynamicBulletIndex = params.dynamicMainBullets - 1;
143
- }
144
- else if (dynamicBulletIndex < 0) {
145
- dynamicBulletIndex = 0;
146
- }
147
- }
148
- firstIndex_1 = Math.max(current - dynamicBulletIndex, 0);
149
- lastIndex_1 = firstIndex_1 + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
150
- midIndex = (lastIndex_1 + firstIndex_1) / 2;
151
- }
152
- bullets.forEach(function (bulletEl) {
153
- var _a;
154
- var classesToRemove = __spreadArray([], ['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(function (suffix) { return "".concat(params.bulletActiveClass).concat(suffix); }), true).map(function (s) { return (typeof s === 'string' && s.includes(' ') ? s.split(' ') : s); })
155
- .flat();
156
- (_a = bulletEl.classList).remove.apply(_a, classesToRemove);
157
- });
158
- if (el.length > 1) {
159
- bullets.forEach(function (bullet) {
160
- var _a, _b;
161
- var bulletIndex = (0, utils_1.elementIndex)(bullet);
162
- if (bulletIndex === current) {
163
- (_a = bullet.classList).add.apply(_a, params.bulletActiveClass.split(' '));
164
- }
165
- else if (swiper.isElement) {
166
- bullet.setAttribute('part', 'bullet');
167
- }
168
- if (params.dynamicBullets) {
169
- if (bulletIndex >= firstIndex_1 && bulletIndex <= lastIndex_1) {
170
- (_b = bullet.classList).add.apply(_b, "".concat(params.bulletActiveClass, "-main").split(' '));
171
- }
172
- if (bulletIndex === firstIndex_1) {
173
- setSideBullets(bullet, 'prev');
174
- }
175
- if (bulletIndex === lastIndex_1) {
176
- setSideBullets(bullet, 'next');
177
- }
178
- }
179
- });
180
- }
181
- else {
182
- var bullet = bullets[current];
183
- if (bullet) {
184
- (_a = bullet.classList).add.apply(_a, params.bulletActiveClass.split(' '));
185
- }
186
- if (swiper.isElement) {
187
- bullets.forEach(function (bulletEl, bulletIndex) {
188
- bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet');
189
- });
190
- }
191
- if (params.dynamicBullets) {
192
- var firstDisplayedBullet = bullets[firstIndex_1];
193
- var lastDisplayedBullet = bullets[lastIndex_1];
194
- for (var i = firstIndex_1; i <= lastIndex_1; i += 1) {
195
- if (bullets[i]) {
196
- (_b = bullets[i].classList).add.apply(_b, "".concat(params.bulletActiveClass, "-main").split(' '));
197
- }
198
- }
199
- setSideBullets(firstDisplayedBullet, 'prev');
200
- setSideBullets(lastDisplayedBullet, 'next');
201
- }
202
- }
203
- if (params.dynamicBullets) {
204
- var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
205
- var bulletsOffset_1 = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;
206
- var offsetProp_1 = rtl ? 'right' : 'left';
207
- bullets.forEach(function (bullet) {
208
- bullet.style[swiper.isHorizontal() ? offsetProp_1 : 'top'] = "".concat(bulletsOffset_1, "px");
209
- });
210
- }
211
- }
212
- el.forEach(function (subEl, subElIndex) {
213
- if (params.type === 'fraction') {
214
- subEl.querySelectorAll((0, classes_to_selector_1.default)(params.currentClass)).forEach(function (fractionEl) {
215
- fractionEl.textContent = params.formatFractionCurrent(current + 1);
216
- });
217
- subEl.querySelectorAll((0, classes_to_selector_1.default)(params.totalClass)).forEach(function (totalEl) {
218
- totalEl.textContent = params.formatFractionTotal(total);
219
- });
220
- }
221
- if (params.type === 'progressbar') {
222
- var progressbarDirection = void 0;
223
- if (params.progressbarOpposite) {
224
- progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
225
- }
226
- else {
227
- progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
228
- }
229
- var scale = (current + 1) / total;
230
- var scaleX_1 = 1;
231
- var scaleY_1 = 1;
232
- if (progressbarDirection === 'horizontal') {
233
- scaleX_1 = scale;
234
- }
235
- else {
236
- scaleY_1 = scale;
237
- }
238
- subEl
239
- .querySelectorAll((0, classes_to_selector_1.default)(params.progressbarFillClass))
240
- .forEach(function (progressEl) {
241
- progressEl.style.transform = "translate3d(0,0,0) scaleX(".concat(scaleX_1, ") scaleY(").concat(scaleY_1, ")");
242
- progressEl.style.transitionDuration = "".concat(swiper.params.speed, "ms");
243
- });
244
- }
245
- if (params.type === 'custom' && params.renderCustom) {
246
- subEl.innerHTML = params.renderCustom(swiper, current + 1, total);
247
- if (subElIndex === 0)
248
- emit('paginationRender', subEl);
249
- }
250
- else {
251
- if (subElIndex === 0)
252
- emit('paginationRender', subEl);
253
- emit('paginationUpdate', subEl);
254
- }
255
- if (swiper.params.watchOverflow && swiper.enabled) {
256
- subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);
257
- }
258
- });
259
- }
260
- function render() {
261
- // Render Container
262
- var params = swiper.params.pagination;
263
- if (isPaginationDisabled())
264
- return;
265
- var slidesLength = swiper.virtual && swiper.params.virtual.enabled
266
- ? swiper.virtual.slides.length
267
- : swiper.grid && swiper.params.grid.rows > 1
268
- ? swiper.slides.length / Math.ceil(swiper.params.grid.rows)
269
- : swiper.slides.length;
270
- var el = swiper.pagination.el;
271
- el = (0, utils_1.makeElementsArray)(el);
272
- var paginationHTML = '';
273
- if (params.type === 'bullets') {
274
- var numberOfBullets = swiper.params.loop
275
- ? Math.ceil(slidesLength / swiper.params.slidesPerGroup)
276
- : swiper.snapGrid.length;
277
- if (swiper.params.freeMode &&
278
- swiper.params.freeMode.enabled &&
279
- numberOfBullets > slidesLength) {
280
- numberOfBullets = slidesLength;
281
- }
282
- for (var i = 0; i < numberOfBullets; i += 1) {
283
- if (params.renderBullet) {
284
- paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
285
- }
286
- else {
287
- // prettier-ignore
288
- paginationHTML += "<".concat(params.bulletElement, " ").concat(swiper.isElement ? 'part="bullet"' : '', " class=\"").concat(params.bulletClass, "\"></").concat(params.bulletElement, ">");
289
- }
290
- }
291
- }
292
- if (params.type === 'fraction') {
293
- if (params.renderFraction) {
294
- paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
295
- }
296
- else {
297
- paginationHTML =
298
- "<span class=\"".concat(params.currentClass, "\"></span>") +
299
- ' / ' +
300
- "<span class=\"".concat(params.totalClass, "\"></span>");
301
- }
302
- }
303
- if (params.type === 'progressbar') {
304
- if (params.renderProgressbar) {
305
- paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
306
- }
307
- else {
308
- paginationHTML = "<span class=\"".concat(params.progressbarFillClass, "\"></span>");
309
- }
310
- }
311
- swiper.pagination.bullets = [];
312
- el.forEach(function (subEl) {
313
- var _a;
314
- if (params.type !== 'custom') {
315
- subEl.innerHTML = paginationHTML || '';
316
- }
317
- if (params.type === 'bullets') {
318
- (_a = swiper.pagination.bullets).push.apply(_a, subEl.querySelectorAll((0, classes_to_selector_1.default)(params.bulletClass)));
319
- }
320
- });
321
- if (params.type !== 'custom') {
322
- emit('paginationRender', el[0]);
323
- }
324
- }
325
- function init() {
326
- swiper.params.pagination = (0, create_element_if_not_defined_1.default)(swiper, swiper.originalParams.pagination, swiper.params.pagination, { el: 'swiper-pagination' });
327
- var params = swiper.params.pagination;
328
- if (!params.el)
329
- return;
330
- var el;
331
- if (typeof params.el === 'string' && swiper.isElement) {
332
- el = swiper.el.querySelector(params.el);
333
- }
334
- if (!el && typeof params.el === 'string') {
335
- el = __spreadArray([], document.querySelectorAll(params.el), true);
336
- }
337
- if (!el) {
338
- el = params.el;
339
- }
340
- if (!el || el.length === 0)
341
- return;
342
- if (swiper.params.uniqueNavElements &&
343
- typeof params.el === 'string' &&
344
- Array.isArray(el) &&
345
- el.length > 1) {
346
- el = __spreadArray([], swiper.el.querySelectorAll(params.el), true);
347
- // check if it belongs to another nested Swiper
348
- if (el.length > 1) {
349
- el = el.filter(function (subEl) {
350
- if ((0, utils_1.elementParents)(subEl, '.swiper')[0] !== swiper.el)
351
- return false;
352
- return true;
353
- })[0];
354
- }
355
- }
356
- if (Array.isArray(el) && el.length === 1)
357
- el = el[0];
358
- Object.assign(swiper.pagination, {
359
- el: el,
360
- });
361
- el = (0, utils_1.makeElementsArray)(el);
362
- el.forEach(function (subEl) {
363
- var _a;
364
- if (params.type === 'bullets' && params.clickable) {
365
- (_a = subEl.classList).add.apply(_a, (params.clickableClass || '').split(' '));
366
- }
367
- subEl.classList.add(params.modifierClass + params.type);
368
- subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
369
- if (params.type === 'bullets' && params.dynamicBullets) {
370
- subEl.classList.add("".concat(params.modifierClass).concat(params.type, "-dynamic"));
371
- dynamicBulletIndex = 0;
372
- if (params.dynamicMainBullets < 1) {
373
- params.dynamicMainBullets = 1;
374
- }
375
- }
376
- if (params.type === 'progressbar' && params.progressbarOpposite) {
377
- subEl.classList.add(params.progressbarOppositeClass);
378
- }
379
- if (params.clickable) {
380
- subEl.addEventListener('click', onBulletClick);
381
- }
382
- if (!swiper.enabled) {
383
- subEl.classList.add(params.lockClass);
384
- }
385
- });
386
- }
387
- function destroy() {
388
- var params = swiper.params.pagination;
389
- if (isPaginationDisabled())
390
- return;
391
- var el = swiper.pagination.el;
392
- if (el) {
393
- el = (0, utils_1.makeElementsArray)(el);
394
- el.forEach(function (subEl) {
395
- var _a;
396
- subEl.classList.remove(params.hiddenClass);
397
- subEl.classList.remove(params.modifierClass + params.type);
398
- subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
399
- if (params.clickable) {
400
- (_a = subEl.classList).remove.apply(_a, (params.clickableClass || '').split(' '));
401
- subEl.removeEventListener('click', onBulletClick);
402
- }
403
- });
404
- }
405
- if (swiper.pagination.bullets)
406
- swiper.pagination.bullets.forEach(function (subEl) {
407
- var _a;
408
- return (_a = subEl.classList).remove.apply(_a, params.bulletActiveClass.split(' '));
409
- });
410
- }
411
- on('changeDirection', function () {
412
- if (!swiper.pagination || !swiper.pagination.el)
413
- return;
414
- var params = swiper.params.pagination;
415
- var el = swiper.pagination.el;
416
- el = (0, utils_1.makeElementsArray)(el);
417
- el.forEach(function (subEl) {
418
- subEl.classList.remove(params.horizontalClass, params.verticalClass);
419
- subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
420
- });
421
- });
422
- on('init', function () {
423
- if (swiper.params.pagination.enabled === false) {
424
- // eslint-disable-next-line
425
- disable();
426
- }
427
- else {
428
- init();
429
- render();
430
- update();
431
- }
432
- });
433
- on('activeIndexChange', function () {
434
- if (typeof swiper.snapIndex === 'undefined') {
435
- update();
436
- }
437
- });
438
- on('snapIndexChange', function () {
439
- update();
440
- });
441
- on('snapGridLengthChange', function () {
442
- render();
443
- update();
444
- });
445
- on('destroy', function () {
446
- destroy();
447
- });
448
- on('enable disable', function () {
449
- var el = swiper.pagination.el;
450
- if (el) {
451
- el = (0, utils_1.makeElementsArray)(el);
452
- el.forEach(function (subEl) {
453
- return subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass);
454
- });
455
- }
456
- });
457
- on('lock unlock', function () {
458
- update();
459
- });
460
- on('click', function (_s, e) {
461
- var targetEl = e.target;
462
- var el = (0, utils_1.makeElementsArray)(swiper.pagination.el);
463
- if (swiper.params.pagination.el &&
464
- swiper.params.pagination.hideOnClick &&
465
- el &&
466
- el.length > 0 &&
467
- !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {
468
- if (swiper.navigation &&
469
- ((swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl) ||
470
- (swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)))
471
- return;
472
- var isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);
473
- if (isHidden === true) {
474
- emit('paginationShow');
475
- }
476
- else {
477
- emit('paginationHide');
478
- }
479
- el.forEach(function (subEl) { return subEl.classList.toggle(swiper.params.pagination.hiddenClass); });
480
- }
481
- });
482
- var enable = function () {
483
- swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);
484
- var el = swiper.pagination.el;
485
- if (el) {
486
- el = (0, utils_1.makeElementsArray)(el);
487
- el.forEach(function (subEl) {
488
- return subEl.classList.remove(swiper.params.pagination.paginationDisabledClass);
489
- });
490
- }
491
- init();
492
- render();
493
- update();
494
- };
495
- var disable = function () {
496
- swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);
497
- var el = swiper.pagination.el;
498
- if (el) {
499
- el = (0, utils_1.makeElementsArray)(el);
500
- el.forEach(function (subEl) { return subEl.classList.add(swiper.params.pagination.paginationDisabledClass); });
501
- }
502
- destroy();
503
- };
504
- Object.assign(swiper.pagination, {
505
- enable: enable,
506
- disable: disable,
507
- render: render,
508
- update: update,
509
- init: init,
510
- destroy: destroy,
511
- });
512
- }
513
- exports.Pagination = Pagination;
514
- //# sourceMappingURL=pagination.js.map