@egjs/flicking 4.12.0-beta.3 → 4.12.0-beta.5

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 (78) hide show
  1. package/declaration/Flicking.d.ts +244 -244
  2. package/declaration/camera/Camera.d.ts +90 -89
  3. package/declaration/camera/index.d.ts +4 -4
  4. package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
  5. package/declaration/camera/mode/CameraMode.d.ts +20 -20
  6. package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
  7. package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
  8. package/declaration/camera/mode/index.d.ts +6 -6
  9. package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
  10. package/declaration/cfc/getRenderingPanels.d.ts +4 -4
  11. package/declaration/cfc/index.d.ts +5 -5
  12. package/declaration/cfc/sync.d.ts +4 -4
  13. package/declaration/cfc/withFlickingMethods.d.ts +2 -2
  14. package/declaration/const/axes.d.ts +8 -8
  15. package/declaration/const/error.d.ts +34 -34
  16. package/declaration/const/external.d.ts +48 -54
  17. package/declaration/control/AxesController.d.ts +44 -44
  18. package/declaration/control/Control.d.ts +45 -45
  19. package/declaration/control/FreeControl.d.ts +14 -14
  20. package/declaration/control/SnapControl.d.ts +16 -16
  21. package/declaration/control/StateMachine.d.ts +14 -14
  22. package/declaration/control/StrictControl.d.ts +20 -20
  23. package/declaration/control/index.d.ts +14 -14
  24. package/declaration/control/states/AnimatingState.d.ts +9 -9
  25. package/declaration/control/states/DisabledState.d.ts +9 -9
  26. package/declaration/control/states/DraggingState.d.ts +8 -8
  27. package/declaration/control/states/HoldingState.d.ts +10 -10
  28. package/declaration/control/states/IdleState.d.ts +9 -9
  29. package/declaration/control/states/State.d.ts +47 -47
  30. package/declaration/core/AnchorPoint.d.ts +15 -15
  31. package/declaration/core/AutoResizer.d.ts +16 -16
  32. package/declaration/core/FlickingError.d.ts +5 -5
  33. package/declaration/core/ResizeWatcher.d.ts +33 -33
  34. package/declaration/core/Viewport.d.ts +25 -25
  35. package/declaration/core/VirtualManager.d.ts +37 -37
  36. package/declaration/core/index.d.ts +6 -6
  37. package/declaration/core/panel/Panel.d.ts +89 -89
  38. package/declaration/core/panel/VirtualPanel.d.ts +19 -19
  39. package/declaration/core/panel/index.d.ts +5 -5
  40. package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
  41. package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
  42. package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
  43. package/declaration/core/panel/provider/index.d.ts +5 -5
  44. package/declaration/index.cjs.d.ts +3 -3
  45. package/declaration/index.d.ts +13 -14
  46. package/declaration/index.umd.d.ts +2 -2
  47. package/declaration/renderer/ExternalRenderer.d.ts +7 -7
  48. package/declaration/renderer/Renderer.d.ts +59 -59
  49. package/declaration/renderer/VanillaRenderer.d.ts +10 -10
  50. package/declaration/renderer/index.d.ts +6 -6
  51. package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
  52. package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
  53. package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
  54. package/declaration/renderer/strategy/index.d.ts +5 -5
  55. package/declaration/type/event.d.ts +88 -88
  56. package/declaration/type/external.d.ts +31 -31
  57. package/declaration/type/internal.d.ts +13 -13
  58. package/declaration/utils.d.ts +45 -47
  59. package/dist/flicking.cjs.js +27 -328
  60. package/dist/flicking.cjs.js.map +1 -1
  61. package/dist/flicking.esm.js +27 -320
  62. package/dist/flicking.esm.js.map +1 -1
  63. package/dist/flicking.js +27 -329
  64. package/dist/flicking.js.map +1 -1
  65. package/dist/flicking.min.js +2 -2
  66. package/dist/flicking.min.js.map +1 -1
  67. package/dist/flicking.pkgd.js +785 -1094
  68. package/dist/flicking.pkgd.js.map +1 -1
  69. package/dist/flicking.pkgd.min.js +2 -2
  70. package/dist/flicking.pkgd.min.js.map +1 -1
  71. package/package.json +2 -2
  72. package/src/camera/Camera.ts +24 -4
  73. package/src/const/external.ts +0 -14
  74. package/src/index.ts +0 -2
  75. package/src/index.umd.ts +0 -2
  76. package/src/utils.ts +0 -21
  77. package/declaration/CrossFlicking.d.ts +0 -35
  78. package/src/CrossFlicking.ts +0 -356
package/dist/flicking.js CHANGED
@@ -4,7 +4,7 @@ name: @egjs/flicking
4
4
  license: MIT
5
5
  author: NAVER Corp.
6
6
  repository: https://github.com/naver/egjs-flicking
7
- version: 4.12.0-beta.3
7
+ version: 4.12.0-beta.5
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
@@ -12,7 +12,7 @@ version: 4.12.0-beta.3
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory(global.eg.Component, global.eg.Axes, global.eg.ImReady));
13
13
  })(this, (function (Component, Axes, ImReady) { 'use strict';
14
14
 
15
- /******************************************************************************
15
+ /*! *****************************************************************************
16
16
  Copyright (c) Microsoft Corporation.
17
17
 
18
18
  Permission to use, copy, modify, and/or distribute this software for any
@@ -26,7 +26,7 @@ version: 4.12.0-beta.3
26
26
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
27
  PERFORMANCE OF THIS SOFTWARE.
28
28
  ***************************************************************************** */
29
- /* global Reflect, Promise, SuppressedError, Symbol */
29
+ /* global Reflect, Promise */
30
30
 
31
31
  var extendStatics = function (d, b) {
32
32
  extendStatics = Object.setPrototypeOf || {
@@ -111,7 +111,7 @@ version: 4.12.0-beta.3
111
111
  }
112
112
  function step(op) {
113
113
  if (f) throw new TypeError("Generator is already executing.");
114
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
114
+ while (_) try {
115
115
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
116
116
  if (y = 0, t) op = [op[0] & 2, t.value];
117
117
  switch (op[0]) {
@@ -215,10 +215,6 @@ version: 4.12.0-beta.3
215
215
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
216
216
  return ar;
217
217
  }
218
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
219
- var e = new Error(message);
220
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
221
- };
222
218
 
223
219
  /*
224
220
  * Copyright (c) 2015 NAVER Corp.
@@ -387,8 +383,6 @@ version: 4.12.0-beta.3
387
383
  STRICT: "strict"
388
384
  };
389
385
  var CLASS = {
390
- VIEWPORT: "flicking-viewport",
391
- CAMERA: "flicking-camera",
392
386
  VERTICAL: "vertical",
393
387
  HIDDEN: "flicking-hidden",
394
388
  DEFAULT_VIRTUAL: "flicking-panel"
@@ -415,17 +409,6 @@ version: 4.12.0-beta.3
415
409
  LTR: "ltr",
416
410
  RTL: "rtl"
417
411
  };
418
- /**
419
- * An object that contains the direction that {@link Flicking} is moving
420
- * @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
421
- * @type {object}
422
- * @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
423
- * @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
424
- */
425
- var MOVE_DIRECTION = {
426
- HORIZONTAL: "horizontal",
427
- VERTICAL: "vertical"
428
- };
429
412
 
430
413
  var Constants = {
431
414
  __proto__: null,
@@ -436,7 +419,6 @@ version: 4.12.0-beta.3
436
419
  CLASS: CLASS,
437
420
  CIRCULAR_FALLBACK: CIRCULAR_FALLBACK,
438
421
  ORDER: ORDER,
439
- MOVE_DIRECTION: MOVE_DIRECTION,
440
422
  ERROR_CODE: CODE
441
423
  };
442
424
 
@@ -753,26 +735,6 @@ version: 4.12.0-beta.3
753
735
  obj.__proto__ = proto;
754
736
  return obj;
755
737
  };
756
- var camelize = function (str) {
757
- return str.replace(/[\s-_]([a-z])/g, function (all, letter) {
758
- return letter.toUpperCase();
759
- });
760
- };
761
- var getDataAttributes = function (element, attributePrefix) {
762
- var dataAttributes = {};
763
- var attributes = element.attributes;
764
- var length = attributes.length;
765
- for (var i = 0; i < length; ++i) {
766
- var attribute = attributes[i];
767
- var name_1 = attribute.name,
768
- value = attribute.value;
769
- if (name_1.indexOf(attributePrefix) === -1) {
770
- continue;
771
- }
772
- dataAttributes[camelize(name_1.replace(attributePrefix, ""))] = value;
773
- }
774
- return dataAttributes;
775
- };
776
738
 
777
739
  var Utils = {
778
740
  __proto__: null,
@@ -804,9 +766,7 @@ version: 4.12.0-beta.3
804
766
  circulateIndex: circulateIndex,
805
767
  range: range,
806
768
  getElementSize: getElementSize,
807
- setPrototypeOf: setPrototypeOf,
808
- camelize: camelize,
809
- getDataAttributes: getDataAttributes
769
+ setPrototypeOf: setPrototypeOf
810
770
  };
811
771
 
812
772
  /*
@@ -3815,6 +3775,7 @@ version: 4.12.0-beta.3
3815
3775
  var _this = this;
3816
3776
  var _b = (_a === void 0 ? {} : _a).align,
3817
3777
  align = _b === void 0 ? ALIGN.CENTER : _b;
3778
+ this._lookedOffset = 0;
3818
3779
  this._checkTranslateSupport = function () {
3819
3780
  var e_1, _a;
3820
3781
  var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
@@ -4174,6 +4135,8 @@ version: 4.12.0-beta.3
4174
4135
  */
4175
4136
  __proto.lookAt = function (pos) {
4176
4137
  var _this = this;
4138
+ var prevOffset = this._offset;
4139
+ var isChangedOffset = this._lookedOffset !== prevOffset;
4177
4140
  var flicking = getFlickingAttached(this._flicking);
4178
4141
  var prevPos = this._position;
4179
4142
  this._position = pos;
@@ -4184,7 +4147,12 @@ version: 4.12.0-beta.3
4184
4147
  if (toggled) {
4185
4148
  void flicking.renderer.render().then(function () {
4186
4149
  _this.updateOffset();
4150
+ _this._lookedOffset = _this._offset;
4187
4151
  });
4152
+ } else if (isChangedOffset) {
4153
+ // sync offset for renderOnlyVisible on resize
4154
+ this.updateOffset();
4155
+ this._lookedOffset = this._offset;
4188
4156
  } else {
4189
4157
  this.applyTransform();
4190
4158
  }
@@ -4359,8 +4327,8 @@ version: 4.12.0-beta.3
4359
4327
  return this;
4360
4328
  };
4361
4329
  /**
4362
- * Update Viewport's height to active panel's height
4363
- * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4330
+ * Update Viewport's height to visible panel's max height
4331
+ * @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4364
4332
  * @throws {FlickingError}
4365
4333
  * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
4366
4334
  * <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
@@ -4370,9 +4338,17 @@ version: 4.12.0-beta.3
4370
4338
  __proto.updateAdaptiveHeight = function () {
4371
4339
  var flicking = getFlickingAttached(this._flicking);
4372
4340
  var activePanel = flicking.control.activePanel;
4373
- if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;
4341
+ var visiblePanels = flicking.visiblePanels;
4342
+ var selectedPanels = __spread(visiblePanels);
4343
+ if (activePanel) {
4344
+ selectedPanels.push(activePanel);
4345
+ }
4346
+ if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
4347
+ var maxHeight = Math.max.apply(Math, __spread(selectedPanels.map(function (panel) {
4348
+ return panel.height;
4349
+ })));
4374
4350
  flicking.viewport.setSize({
4375
- height: activePanel.height
4351
+ height: maxHeight
4376
4352
  });
4377
4353
  };
4378
4354
  /**
@@ -4443,6 +4419,7 @@ version: 4.12.0-beta.3
4443
4419
  };
4444
4420
  __proto._resetInternalValues = function () {
4445
4421
  this._position = 0;
4422
+ this._lookedOffset = 0;
4446
4423
  this._alignPos = 0;
4447
4424
  this._offset = 0;
4448
4425
  this._circularOffset = 0;
@@ -7991,288 +7968,10 @@ version: 4.12.0-beta.3
7991
7968
  * Flicking.VERSION; // ex) 4.0.0
7992
7969
  * ```
7993
7970
  */
7994
- Flicking.VERSION = "4.12.0-beta.3";
7971
+ Flicking.VERSION = "4.12.0-beta.5";
7995
7972
  return Flicking;
7996
7973
  }(Component);
7997
7974
 
7998
- /*
7999
- * Copyright (c) 2015 NAVER Corp.
8000
- * egjs projects are licensed under the MIT license
8001
- */
8002
- /**
8003
- * @extends Component
8004
- * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
8005
- * @requires {@link https://github.com/naver/egjs-component|@egjs/component}
8006
- * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
8007
- */
8008
- var CrossFlicking = /*#__PURE__*/function (_super) {
8009
- __extends(CrossFlicking, _super);
8010
- // Options Setter
8011
- // public set align(val: FlickingOptions["align"]) {
8012
- // this._align = val;
8013
- // }
8014
- function CrossFlicking(root, _a) {
8015
- var _b = (_a === void 0 ? {} : _a).verticalOptions,
8016
- verticalOptions = _b === void 0 ? undefined : _b;
8017
- var _this = _super.call(this, root) || this;
8018
- _this._onHorizontalHoldStart = function () {
8019
- _this.dragThreshold = 10;
8020
- _this._moveDirection = null;
8021
- };
8022
- _this._onHorizontalMove = function (e) {
8023
- if (e.isTrusted && !_this._moveDirection) {
8024
- _this._verticalFlicking.forEach(function (child) {
8025
- child.dragThreshold = Infinity;
8026
- });
8027
- _this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
8028
- }
8029
- };
8030
- _this._onHorizontalMoveEnd = function (e) {
8031
- var visiblePanels = _this.visiblePanels;
8032
- _this._verticalFlicking.forEach(function (child) {
8033
- child.dragThreshold = 10;
8034
- });
8035
- _this._moveDirection = null;
8036
- if (visiblePanels.length > 1) {
8037
- _this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
8038
- } else {
8039
- _this._nextIndex = visiblePanels[0].index;
8040
- }
8041
- _this._verticalFlicking.forEach(function (child, i) {
8042
- if (_this._nextIndex !== i) {
8043
- var _a = _this._verticalState[i],
8044
- start = _a.start,
8045
- end = _a.end;
8046
- if (child.index < start) {
8047
- child.stopAnimation();
8048
- void child.moveTo(start, 0);
8049
- } else if (child.index > end) {
8050
- child.stopAnimation();
8051
- void child.moveTo(end, 0);
8052
- }
8053
- }
8054
- });
8055
- if (e.isTrusted) {
8056
- _this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
8057
- }
8058
- };
8059
- _this._onVerticalHoldStart = function () {
8060
- _this._verticalFlicking.forEach(function (child) {
8061
- child.dragThreshold = 10;
8062
- });
8063
- _this._moveDirection = null;
8064
- };
8065
- _this._onVerticalMove = function (e) {
8066
- if (e.isTrusted && !_this._moveDirection) {
8067
- _this.dragThreshold = Infinity;
8068
- _this._moveDirection = MOVE_DIRECTION.VERTICAL;
8069
- }
8070
- };
8071
- _this._onVerticalMoveEnd = function () {
8072
- _this.dragThreshold = 10;
8073
- _this._moveDirection = null;
8074
- };
8075
- _this._onVerticalChanged = function (e) {
8076
- // this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
8077
- // 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
8078
- if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
8079
- _this._syncToCategory(e.index, _this.index);
8080
- }
8081
- };
8082
- // Internal states
8083
- _this._verticalState = _this._createVerticalState();
8084
- _this._moveDirection = null;
8085
- _this._nextIndex = 0;
8086
- // Bind options
8087
- _this._verticalOptions = verticalOptions;
8088
- // Create core components
8089
- _this._verticalFlicking = _this._createVerticalFlicking();
8090
- return _this;
8091
- }
8092
- var __proto = CrossFlicking.prototype;
8093
- Object.defineProperty(__proto, "verticalFlicking", {
8094
- // Components
8095
- /**
8096
- * {@link Control} instance of the Flicking
8097
- * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스
8098
- * @type {Control}
8099
- * @default SnapControl
8100
- * @readonly
8101
- * @see Control
8102
- * @see SnapControl
8103
- * @see FreeControl
8104
- */
8105
- get: function () {
8106
- return this._verticalFlicking;
8107
- },
8108
- enumerable: false,
8109
- configurable: true
8110
- });
8111
- Object.defineProperty(__proto, "verticalState", {
8112
- // Internal States
8113
- /**
8114
- * Whether Flicking's {@link Flicking#init init()} is called.
8115
- * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.
8116
- * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.
8117
- * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.
8118
- * @type {boolean}
8119
- * @default false
8120
- * @readonly
8121
- */
8122
- get: function () {
8123
- return this._verticalState;
8124
- },
8125
- enumerable: false,
8126
- configurable: true
8127
- });
8128
- Object.defineProperty(__proto, "verticalOptions", {
8129
- // Options Getter
8130
- /**
8131
- * Change active panel index on mouse/touch hold while animating.
8132
- * `index` of the `willChange`/`willRestore` event will be used as new index.
8133
- * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
8134
- * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
8135
- * @type {FlickingOptions}
8136
- * @default undefined
8137
- * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
8138
- */
8139
- get: function () {
8140
- return this._verticalOptions;
8141
- },
8142
- enumerable: false,
8143
- configurable: true
8144
- });
8145
- /**
8146
- * Initialize Flicking and move to the default index
8147
- * This is automatically called on Flicking's constructor when `autoInit` is true(default)
8148
- * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
8149
- * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
8150
- * @fires Flicking#ready
8151
- * @return {Promise<void>}
8152
- */
8153
- __proto.init = function () {
8154
- var _this = this;
8155
- return _super.prototype.init.call(this).then(function () {
8156
- return _this._addComponentEvents();
8157
- });
8158
- };
8159
- __proto._addComponentEvents = function () {
8160
- var _this = this;
8161
- this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
8162
- this.on(EVENTS.MOVE, this._onHorizontalMove);
8163
- this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
8164
- this._verticalFlicking.forEach(function (flicking) {
8165
- flicking.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
8166
- flicking.on(EVENTS.MOVE, _this._onVerticalMove);
8167
- flicking.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
8168
- flicking.on(EVENTS.CHANGED, _this._onVerticalChanged);
8169
- });
8170
- };
8171
- __proto._createVerticalState = function () {
8172
- var _this = this;
8173
- // data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
8174
- // panels에 data-attributes가 붙어있을 때와 안 붙어있을 때를 다르게 처리
8175
- // 붙어있다면 가상의 viewport들을 index 갯수만큼 만들어줘야 한다
8176
- var cameraEl = this.camera.element;
8177
- var panels = toArray(cameraEl.children);
8178
- var verticalState;
8179
- var verticalPanels = "";
8180
- // check data attribute exists
8181
- var groupKeys = [];
8182
- var groupPanels = {};
8183
- var verticalCamera = document.createElement("div");
8184
- verticalCamera.classList.add(CLASS.CAMERA);
8185
- panels.forEach(function (panel) {
8186
- var groupKey = getDataAttributes(panel, "data-flicking-").groupkey;
8187
- if (groupKey && !includes(groupKeys, groupKey)) {
8188
- groupKeys.push(groupKey);
8189
- groupPanels[groupKey] = [panel];
8190
- } else if (groupKey) {
8191
- groupPanels[groupKey].push(panel);
8192
- }
8193
- return groupKey;
8194
- });
8195
- if (groupKeys.length) {
8196
- panels.forEach(function () {
8197
- return _this.remove(0);
8198
- });
8199
- verticalState = groupKeys.reduce(function (state, key) {
8200
- var start = state.length ? +state[state.length - 1].end + 1 : 0;
8201
- var element = groupPanels[key].reduce(function (el, panel) {
8202
- verticalPanels += panel.outerHTML;
8203
- el.appendChild(panel);
8204
- return el;
8205
- }, document.createElement("div"));
8206
- return __spread(state, [{
8207
- key: key,
8208
- start: start,
8209
- end: start + groupPanels[key].length - 1,
8210
- element: element
8211
- }]);
8212
- }, []);
8213
- verticalCamera.innerHTML = verticalPanels;
8214
- cameraEl.innerHTML = "";
8215
- groupKeys.forEach(function () {
8216
- var panel = document.createElement("div");
8217
- panel.classList.add(CLASS.VIEWPORT, CLASS.VERTICAL);
8218
- panel.innerHTML = verticalCamera.outerHTML;
8219
- _this.append(panel);
8220
- });
8221
- } else {
8222
- verticalState = panels.reduce(function (state, panel, i) {
8223
- var start = state.length ? +state[state.length - 1].end + 1 : 0;
8224
- verticalPanels += panel.innerHTML;
8225
- return __spread(state, [{
8226
- key: i.toString(),
8227
- start: start,
8228
- end: start + panel.children.length - 1,
8229
- element: panel
8230
- }]);
8231
- }, []);
8232
- verticalCamera.innerHTML = verticalPanels;
8233
- panels.forEach(function (panel) {
8234
- [CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
8235
- if (!panel.classList.contains(className)) {
8236
- panel.classList.add(className);
8237
- }
8238
- });
8239
- panel.innerHTML = verticalCamera.outerHTML;
8240
- });
8241
- }
8242
- return verticalState;
8243
- };
8244
- __proto._createVerticalFlicking = function () {
8245
- var _this = this;
8246
- return this.camera.children.map(function (panel, i) {
8247
- return new Flicking(panel, __assign(__assign({}, _this.verticalOptions), {
8248
- horizontal: false,
8249
- panelsPerView: 1,
8250
- defaultIndex: _this._verticalState[i].start
8251
- }));
8252
- });
8253
- };
8254
- __proto._syncToCategory = function (index, outerIndex) {
8255
- var _this = this;
8256
- this.stopAnimation();
8257
- this._verticalFlicking.forEach(function (child, i) {
8258
- var _a = _this._verticalState[i],
8259
- start = _a.start,
8260
- end = _a.end;
8261
- if (start <= index && end >= index && outerIndex !== i) {
8262
- child.stopAnimation();
8263
- void child.moveTo(index, 0);
8264
- void _this.moveTo(i, 0);
8265
- }
8266
- });
8267
- };
8268
- return CrossFlicking;
8269
- }(Flicking);
8270
-
8271
- var CrossFlicking$1 = {
8272
- __proto__: null,
8273
- CrossFlicking: CrossFlicking
8274
- };
8275
-
8276
7975
  /*
8277
7976
  * Copyright (c) 2015 NAVER Corp.
8278
7977
  * egjs projects are licensed under the MIT license
@@ -8518,7 +8217,6 @@ version: 4.12.0-beta.3
8518
8217
  merge(Flicking, Constants);
8519
8218
  merge(Flicking, CFC);
8520
8219
  merge(Flicking, Utils);
8521
- merge(Flicking, CrossFlicking$1);
8522
8220
 
8523
8221
  return Flicking;
8524
8222