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,208 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateSwiper = void 0;
4
- var utils_1 = require("./utils.js");
5
- function updateSwiper(_a) {
6
- var swiper = _a.swiper, slides = _a.slides, passedParams = _a.passedParams, changedParams = _a.changedParams, nextEl = _a.nextEl, prevEl = _a.prevEl, scrollbarEl = _a.scrollbarEl, paginationEl = _a.paginationEl;
7
- var updateParams = changedParams.filter(function (key) { return key !== 'children' && key !== 'direction' && key !== 'wrapperClass'; });
8
- var currentParams = swiper.params, pagination = swiper.pagination, navigation = swiper.navigation, scrollbar = swiper.scrollbar, virtual = swiper.virtual, thumbs = swiper.thumbs;
9
- var needThumbsInit;
10
- var needControllerInit;
11
- var needPaginationInit;
12
- var needScrollbarInit;
13
- var needNavigationInit;
14
- var loopNeedDestroy;
15
- var loopNeedEnable;
16
- var loopNeedReloop;
17
- if (changedParams.includes('thumbs') &&
18
- passedParams.thumbs &&
19
- passedParams.thumbs.swiper &&
20
- currentParams.thumbs &&
21
- !currentParams.thumbs.swiper) {
22
- needThumbsInit = true;
23
- }
24
- if (changedParams.includes('controller') &&
25
- passedParams.controller &&
26
- passedParams.controller.control &&
27
- currentParams.controller &&
28
- !currentParams.controller.control) {
29
- needControllerInit = true;
30
- }
31
- if (changedParams.includes('pagination') &&
32
- passedParams.pagination &&
33
- (passedParams.pagination.el || paginationEl) &&
34
- (currentParams.pagination || currentParams.pagination === false) &&
35
- pagination &&
36
- !pagination.el) {
37
- needPaginationInit = true;
38
- }
39
- if (changedParams.includes('scrollbar') &&
40
- passedParams.scrollbar &&
41
- (passedParams.scrollbar.el || scrollbarEl) &&
42
- (currentParams.scrollbar || currentParams.scrollbar === false) &&
43
- scrollbar &&
44
- !scrollbar.el) {
45
- needScrollbarInit = true;
46
- }
47
- if (changedParams.includes('navigation') &&
48
- passedParams.navigation &&
49
- (passedParams.navigation.prevEl || prevEl) &&
50
- (passedParams.navigation.nextEl || nextEl) &&
51
- (currentParams.navigation || currentParams.navigation === false) &&
52
- navigation &&
53
- !navigation.prevEl &&
54
- !navigation.nextEl) {
55
- needNavigationInit = true;
56
- }
57
- var destroyModule = function (mod) {
58
- if (!swiper[mod])
59
- return;
60
- swiper[mod].destroy();
61
- if (mod === 'navigation') {
62
- if (swiper.isElement) {
63
- swiper[mod].prevEl.remove();
64
- swiper[mod].nextEl.remove();
65
- }
66
- currentParams[mod].prevEl = undefined;
67
- currentParams[mod].nextEl = undefined;
68
- swiper[mod].prevEl = undefined;
69
- swiper[mod].nextEl = undefined;
70
- }
71
- else {
72
- if (swiper.isElement) {
73
- swiper[mod].el.remove();
74
- }
75
- currentParams[mod].el = undefined;
76
- swiper[mod].el = undefined;
77
- }
78
- };
79
- if (changedParams.includes('loop') && swiper.isElement) {
80
- if (currentParams.loop && !passedParams.loop) {
81
- loopNeedDestroy = true;
82
- }
83
- else if (!currentParams.loop && passedParams.loop) {
84
- loopNeedEnable = true;
85
- }
86
- else {
87
- loopNeedReloop = true;
88
- }
89
- }
90
- updateParams.forEach(function (key) {
91
- if ((0, utils_1.isObject)(currentParams[key]) && (0, utils_1.isObject)(passedParams[key])) {
92
- Object.assign(currentParams[key], passedParams[key]);
93
- if ((key === 'navigation' || key === 'pagination' || key === 'scrollbar') &&
94
- 'enabled' in passedParams[key] &&
95
- !passedParams[key].enabled) {
96
- destroyModule(key);
97
- }
98
- }
99
- else {
100
- var newValue = passedParams[key];
101
- if ((newValue === true || newValue === false) &&
102
- (key === 'navigation' || key === 'pagination' || key === 'scrollbar')) {
103
- if (newValue === false) {
104
- destroyModule(key);
105
- }
106
- }
107
- else {
108
- currentParams[key] = passedParams[key];
109
- }
110
- }
111
- });
112
- if (updateParams.includes('controller') &&
113
- !needControllerInit &&
114
- swiper.controller &&
115
- swiper.controller.control &&
116
- currentParams.controller &&
117
- currentParams.controller.control) {
118
- swiper.controller.control = currentParams.controller.control;
119
- }
120
- if (changedParams.includes('children') && slides && virtual && currentParams.virtual.enabled) {
121
- virtual.slides = slides;
122
- virtual.update(true);
123
- }
124
- else if (changedParams.includes('virtual') && virtual && currentParams.virtual.enabled) {
125
- if (slides)
126
- virtual.slides = slides;
127
- virtual.update(true);
128
- }
129
- if (changedParams.includes('children') && slides && currentParams.loop) {
130
- loopNeedReloop = true;
131
- }
132
- if (needThumbsInit) {
133
- var initialized = thumbs.init();
134
- if (initialized)
135
- thumbs.update(true);
136
- }
137
- if (needControllerInit) {
138
- swiper.controller.control = currentParams.controller.control;
139
- }
140
- if (needPaginationInit) {
141
- if (swiper.isElement && (!paginationEl || typeof paginationEl === 'string')) {
142
- paginationEl = document.createElement('div');
143
- paginationEl.classList.add('swiper-pagination');
144
- paginationEl.part.add('pagination');
145
- swiper.el.appendChild(paginationEl);
146
- }
147
- if (paginationEl)
148
- currentParams.pagination.el = paginationEl;
149
- pagination.init();
150
- pagination.render();
151
- pagination.update();
152
- }
153
- if (needScrollbarInit) {
154
- if (swiper.isElement && (!scrollbarEl || typeof scrollbarEl === 'string')) {
155
- scrollbarEl = document.createElement('div');
156
- scrollbarEl.classList.add('swiper-scrollbar');
157
- scrollbarEl.part.add('scrollbar');
158
- swiper.el.appendChild(scrollbarEl);
159
- }
160
- if (scrollbarEl)
161
- currentParams.scrollbar.el = scrollbarEl;
162
- scrollbar.init();
163
- scrollbar.updateSize();
164
- scrollbar.setTranslate();
165
- }
166
- if (needNavigationInit) {
167
- if (swiper.isElement) {
168
- if (!nextEl || typeof nextEl === 'string') {
169
- nextEl = document.createElement('div');
170
- nextEl.classList.add('swiper-button-next');
171
- nextEl.innerHTML = swiper.hostEl.constructor.nextButtonSvg;
172
- nextEl.part.add('button-next');
173
- swiper.el.appendChild(nextEl);
174
- }
175
- if (!prevEl || typeof prevEl === 'string') {
176
- prevEl = document.createElement('div');
177
- prevEl.classList.add('swiper-button-prev');
178
- prevEl.innerHTML = swiper.hostEl.constructor.prevButtonSvg;
179
- prevEl.part.add('button-prev');
180
- swiper.el.appendChild(prevEl);
181
- }
182
- }
183
- if (nextEl)
184
- currentParams.navigation.nextEl = nextEl;
185
- if (prevEl)
186
- currentParams.navigation.prevEl = prevEl;
187
- navigation.init();
188
- navigation.update();
189
- }
190
- if (changedParams.includes('allowSlideNext')) {
191
- swiper.allowSlideNext = passedParams.allowSlideNext;
192
- }
193
- if (changedParams.includes('allowSlidePrev')) {
194
- swiper.allowSlidePrev = passedParams.allowSlidePrev;
195
- }
196
- if (changedParams.includes('direction')) {
197
- swiper.changeDirection(passedParams.direction, false);
198
- }
199
- if (loopNeedDestroy || loopNeedReloop) {
200
- swiper.loopDestroy();
201
- }
202
- if (loopNeedEnable || loopNeedReloop) {
203
- swiper.loopCreate();
204
- }
205
- swiper.update();
206
- }
207
- exports.updateSwiper = updateSwiper;
208
- //# sourceMappingURL=update-swiper.js.map
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ //@ts-nocheck
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ var window_1 = require("../../ssr-window/window");
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
@@ -0,0 +1,7 @@
1
+ import setBreakpoint from './setBreakpoint';
2
+ import getBreakpoint from './getBreakpoint';
3
+ declare const _default: {
4
+ setBreakpoint: typeof setBreakpoint;
5
+ getBreakpoint: typeof getBreakpoint;
6
+ };
7
+ export default _default;
@@ -0,0 +1,9 @@
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"));
7
+ var getBreakpoint_1 = __importDefault(require("./getBreakpoint"));
8
+ exports.default = { setBreakpoint: setBreakpoint_1.default, getBreakpoint: getBreakpoint_1.default };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var utils_1 = require("../../shared/utils");
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
@@ -0,0 +1,7 @@
1
+ import addClasses from './addClasses';
2
+ import removeClasses from './removeClasses';
3
+ declare const _default: {
4
+ addClasses: typeof addClasses;
5
+ removeClasses: typeof removeClasses;
6
+ };
7
+ export default _default;
@@ -0,0 +1,9 @@
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"));
7
+ var removeClasses_1 = __importDefault(require("./removeClasses"));
8
+ exports.default = { addClasses: addClasses_1.default, removeClasses: removeClasses_1.default };
9
+ //# sourceMappingURL=index.js.map