index.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*!
  2. * (C) Ionic http://ionicframework.com - MIT License
  3. */
  4. export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
  5. export { c as createAnimation } from './animation.js';
  6. export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index2.js';
  7. export { iosTransitionAnimation } from './ios.transition.js';
  8. export { mdTransitionAnimation } from './md.transition.js';
  9. export { g as getTimeGivenProgression } from './cubic-bezier.js';
  10. export { createGesture } from './index3.js';
  11. export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global.js';
  12. export { c as componentOnReady } from './helpers.js';
  13. export { L as LogLevel } from './index4.js';
  14. export { I as IonicSafeString, g as getMode, s as setupConfig } from './config.js';
  15. export { o as openURL } from './theme.js';
  16. export { m as menuController } from './index5.js';
  17. export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays.js';
  18. const IonicSlides = (opts) => {
  19. const { swiper, extendParams } = opts;
  20. const slidesParams = {
  21. effect: undefined,
  22. direction: 'horizontal',
  23. initialSlide: 0,
  24. loop: false,
  25. parallax: false,
  26. slidesPerView: 1,
  27. spaceBetween: 0,
  28. speed: 300,
  29. slidesPerColumn: 1,
  30. slidesPerColumnFill: 'column',
  31. slidesPerGroup: 1,
  32. centeredSlides: false,
  33. slidesOffsetBefore: 0,
  34. slidesOffsetAfter: 0,
  35. touchEventsTarget: 'container',
  36. freeMode: false,
  37. freeModeMomentum: true,
  38. freeModeMomentumRatio: 1,
  39. freeModeMomentumBounce: true,
  40. freeModeMomentumBounceRatio: 1,
  41. freeModeMomentumVelocityRatio: 1,
  42. freeModeSticky: false,
  43. freeModeMinimumVelocity: 0.02,
  44. autoHeight: false,
  45. setWrapperSize: false,
  46. zoom: {
  47. maxRatio: 3,
  48. minRatio: 1,
  49. toggle: false,
  50. },
  51. touchRatio: 1,
  52. touchAngle: 45,
  53. simulateTouch: true,
  54. touchStartPreventDefault: false,
  55. shortSwipes: true,
  56. longSwipes: true,
  57. longSwipesRatio: 0.5,
  58. longSwipesMs: 300,
  59. followFinger: true,
  60. threshold: 0,
  61. touchMoveStopPropagation: true,
  62. touchReleaseOnEdges: false,
  63. iOSEdgeSwipeDetection: false,
  64. iOSEdgeSwipeThreshold: 20,
  65. resistance: true,
  66. resistanceRatio: 0.85,
  67. watchSlidesProgress: false,
  68. watchSlidesVisibility: false,
  69. preventClicks: true,
  70. preventClicksPropagation: true,
  71. slideToClickedSlide: false,
  72. loopAdditionalSlides: 0,
  73. noSwiping: true,
  74. runCallbacksOnInit: true,
  75. coverflowEffect: {
  76. rotate: 50,
  77. stretch: 0,
  78. depth: 100,
  79. modifier: 1,
  80. slideShadows: true,
  81. },
  82. flipEffect: {
  83. slideShadows: true,
  84. limitRotation: true,
  85. },
  86. cubeEffect: {
  87. slideShadows: true,
  88. shadow: true,
  89. shadowOffset: 20,
  90. shadowScale: 0.94,
  91. },
  92. fadeEffect: {
  93. crossFade: false,
  94. },
  95. a11y: {
  96. prevSlideMessage: 'Previous slide',
  97. nextSlideMessage: 'Next slide',
  98. firstSlideMessage: 'This is the first slide',
  99. lastSlideMessage: 'This is the last slide',
  100. },
  101. };
  102. if (swiper.pagination) {
  103. slidesParams.pagination = {
  104. type: 'bullets',
  105. clickable: false,
  106. hideOnClick: false,
  107. };
  108. }
  109. if (swiper.scrollbar) {
  110. slidesParams.scrollbar = {
  111. hide: true,
  112. };
  113. }
  114. extendParams(slidesParams);
  115. };
  116. export { IonicSlides };