@egjs/flicking 4.12.0-beta.8 → 4.12.0-beta.9

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.
@@ -1,5 +1,25 @@
1
- import Flicking, { FlickingOptions } from "./Flicking";
2
- export interface CrossFlickingEvents {
1
+ import Flicking, { FlickingEvents, FlickingOptions } from "./Flicking";
2
+ import { ChangedEvent, HoldEndEvent, HoldStartEvent, MoveEndEvent, MoveEvent, MoveStartEvent, WillChangeEvent } from "./type/event";
3
+ export declare const SIDE_EVENTS: {
4
+ readonly HOLD_START: "sideHoldStart";
5
+ readonly HOLD_END: "sideHoldEnd";
6
+ readonly MOVE_START: "sideMoveStart";
7
+ readonly MOVE: "sideMove";
8
+ readonly MOVE_END: "sideMoveEnd";
9
+ readonly WILL_CHANGE: "sideWillChange";
10
+ readonly CHANGED: "sideChanged";
11
+ };
12
+ export declare type CrossFlickingEvent<T> = {
13
+ mainIndex: number;
14
+ } & T;
15
+ export interface CrossFlickingEvents extends FlickingEvents {
16
+ [SIDE_EVENTS.HOLD_START]: CrossFlickingEvent<HoldStartEvent>;
17
+ [SIDE_EVENTS.HOLD_END]: CrossFlickingEvent<HoldEndEvent>;
18
+ [SIDE_EVENTS.MOVE_START]: CrossFlickingEvent<MoveStartEvent>;
19
+ [SIDE_EVENTS.MOVE]: CrossFlickingEvent<MoveEvent>;
20
+ [SIDE_EVENTS.MOVE_END]: CrossFlickingEvent<MoveEndEvent>;
21
+ [SIDE_EVENTS.WILL_CHANGE]: CrossFlickingEvent<WillChangeEvent>;
22
+ [SIDE_EVENTS.CHANGED]: CrossFlickingEvent<ChangedEvent>;
3
23
  }
4
24
  export interface CrossFlickingOptions extends FlickingOptions {
5
25
  sideOptions: Partial<FlickingOptions> | undefined;
@@ -32,16 +52,20 @@ export declare class CrossFlicking extends Flicking {
32
52
  set preserveIndex(val: CrossFlickingOptions["preserveIndex"]);
33
53
  set disableSlideOnHold(val: CrossFlickingOptions["disableSlideOnHold"]);
34
54
  set disableIndexSync(val: CrossFlickingOptions["disableIndexSync"]);
35
- constructor(root: HTMLElement | string, options?: Partial<CrossFlickingOptions>);
55
+ constructor(root: HTMLElement | string, options: Partial<CrossFlickingOptions>);
36
56
  init(): Promise<void>;
37
57
  destroy(): void;
38
58
  private _addComponentEvents;
39
- private _getGroupFromAttribute;
40
59
  private _createSideState;
60
+ private _createCrossStructure;
61
+ private _getGroupFromAttribute;
41
62
  private _getSideStateFromGroup;
42
63
  private _getSideStateFromPanels;
64
+ private _getSideStateFromCrossStructure;
43
65
  private _createSideFlicking;
44
66
  private _syncToCategory;
67
+ private _setDraggable;
68
+ private _setPreviousSideIndex;
45
69
  private _onHorizontalHoldStart;
46
70
  private _onHorizontalMove;
47
71
  private _onHorizontalMoveEnd;
@@ -12,6 +12,7 @@ declare class Camera {
12
12
  private _mode;
13
13
  private _el;
14
14
  private _transform;
15
+ private _lookedOffset;
15
16
  private _position;
16
17
  private _alignPos;
17
18
  private _offset;
@@ -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.8
7
+ version: 4.12.0-beta.9
8
8
  */
9
9
  'use strict';
10
10
 
@@ -3746,6 +3746,7 @@ var Camera = /*#__PURE__*/function () {
3746
3746
  var _this = this;
3747
3747
  var _b = (_a === void 0 ? {} : _a).align,
3748
3748
  align = _b === void 0 ? ALIGN.CENTER : _b;
3749
+ this._lookedOffset = 0;
3749
3750
  this._checkTranslateSupport = function () {
3750
3751
  var e_1, _a;
3751
3752
  var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
@@ -4105,6 +4106,8 @@ var Camera = /*#__PURE__*/function () {
4105
4106
  */
4106
4107
  __proto.lookAt = function (pos) {
4107
4108
  var _this = this;
4109
+ var prevOffset = this._offset;
4110
+ var isChangedOffset = this._lookedOffset !== prevOffset;
4108
4111
  var flicking = getFlickingAttached(this._flicking);
4109
4112
  var prevPos = this._position;
4110
4113
  this._position = pos;
@@ -4115,7 +4118,12 @@ var Camera = /*#__PURE__*/function () {
4115
4118
  if (toggled) {
4116
4119
  void flicking.renderer.render().then(function () {
4117
4120
  _this.updateOffset();
4121
+ _this._lookedOffset = _this._offset;
4118
4122
  });
4123
+ } else if (isChangedOffset) {
4124
+ // sync offset for renderOnlyVisible on resize
4125
+ this.updateOffset();
4126
+ this._lookedOffset = this._offset;
4119
4127
  } else {
4120
4128
  this.applyTransform();
4121
4129
  }
@@ -4290,8 +4298,8 @@ var Camera = /*#__PURE__*/function () {
4290
4298
  return this;
4291
4299
  };
4292
4300
  /**
4293
- * Update Viewport's height to active panel's height
4294
- * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4301
+ * Update Viewport's height to visible panel's max height
4302
+ * @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4295
4303
  * @throws {FlickingError}
4296
4304
  * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
4297
4305
  * <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
@@ -4301,9 +4309,17 @@ var Camera = /*#__PURE__*/function () {
4301
4309
  __proto.updateAdaptiveHeight = function () {
4302
4310
  var flicking = getFlickingAttached(this._flicking);
4303
4311
  var activePanel = flicking.control.activePanel;
4304
- if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;
4312
+ var visiblePanels = flicking.visiblePanels;
4313
+ var selectedPanels = __spread(visiblePanels);
4314
+ if (activePanel) {
4315
+ selectedPanels.push(activePanel);
4316
+ }
4317
+ if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
4318
+ var maxHeight = Math.max.apply(Math, __spread(selectedPanels.map(function (panel) {
4319
+ return panel.height;
4320
+ })));
4305
4321
  flicking.viewport.setSize({
4306
- height: activePanel.height
4322
+ height: maxHeight
4307
4323
  });
4308
4324
  };
4309
4325
  /**
@@ -4374,6 +4390,7 @@ var Camera = /*#__PURE__*/function () {
4374
4390
  };
4375
4391
  __proto._resetInternalValues = function () {
4376
4392
  this._position = 0;
4393
+ this._lookedOffset = 0;
4377
4394
  this._alignPos = 0;
4378
4395
  this._offset = 0;
4379
4396
  this._circularOffset = 0;
@@ -7895,103 +7912,139 @@ var Flicking = /*#__PURE__*/function (_super) {
7895
7912
  * Flicking.VERSION; // ex) 4.0.0
7896
7913
  * ```
7897
7914
  */
7898
- Flicking.VERSION = "4.12.0-beta.8";
7915
+ Flicking.VERSION = "4.12.0-beta.9";
7899
7916
  return Flicking;
7900
7917
  }(Component);
7901
7918
 
7902
- /*
7903
- * Copyright (c) 2015 NAVER Corp.
7904
- * egjs projects are licensed under the MIT license
7905
- */
7919
+ var SIDE_EVENTS = {
7920
+ HOLD_START: "sideHoldStart",
7921
+ HOLD_END: "sideHoldEnd",
7922
+ MOVE_START: "sideMoveStart",
7923
+ MOVE: "sideMove",
7924
+ MOVE_END: "sideMoveEnd",
7925
+ WILL_CHANGE: "sideWillChange",
7926
+ CHANGED: "sideChanged"
7927
+ };
7906
7928
  var CrossFlicking = /*#__PURE__*/function (_super) {
7907
7929
  __extends(CrossFlicking, _super);
7908
7930
  function CrossFlicking(root, options) {
7909
- if (options === void 0) {
7910
- options = {
7911
- sideOptions: {},
7912
- preserveIndex: false,
7913
- disableSlideOnHold: false,
7914
- disableIndexSync: false
7915
- };
7916
- }
7917
7931
  var _this = _super.call(this, root, options) || this;
7932
+ _this._syncToCategory = function (index, outerIndex) {
7933
+ if (_this._disableIndexSync) {
7934
+ return;
7935
+ }
7936
+ _this.stopAnimation();
7937
+ _this._sideFlicking.forEach(function (child, i) {
7938
+ var _a = _this._sideState[i],
7939
+ start = _a.start,
7940
+ end = _a.end;
7941
+ if (start <= index && end >= index && outerIndex !== i) {
7942
+ child.stopAnimation();
7943
+ void child.moveTo(index, 0);
7944
+ void _this.moveTo(i, 0);
7945
+ }
7946
+ });
7947
+ };
7948
+ _this._setDraggable = function (direction, draggable) {
7949
+ if (!_this._disableSlideOnHold) {
7950
+ return;
7951
+ }
7952
+ var threshold = draggable ? _this.dragThreshold && _this.dragThreshold >= 10 ? _this.dragThreshold : 10 : Infinity;
7953
+ if (direction === MOVE_DIRECTION.HORIZONTAL === _this.horizontal) {
7954
+ _this.dragThreshold = threshold;
7955
+ } else if (direction === MOVE_DIRECTION.VERTICAL === _this.horizontal) {
7956
+ _this._sideFlicking.forEach(function (child) {
7957
+ child.dragThreshold = threshold;
7958
+ });
7959
+ }
7960
+ };
7961
+ _this._setPreviousSideIndex = function () {
7962
+ _this._sideFlicking.forEach(function (child, i) {
7963
+ var _a = _this._sideState[i],
7964
+ start = _a.start,
7965
+ end = _a.end;
7966
+ if (_this._preserveIndex) {
7967
+ if (_this._nextIndex !== i) {
7968
+ if (child.index < start) {
7969
+ child.stopAnimation();
7970
+ void child.moveTo(start, 0);
7971
+ } else if (child.index > end) {
7972
+ child.stopAnimation();
7973
+ void child.moveTo(end, 0);
7974
+ }
7975
+ }
7976
+ } else {
7977
+ if (_this._nextIndex !== i) {
7978
+ void child.moveTo(start, 0);
7979
+ }
7980
+ }
7981
+ });
7982
+ };
7918
7983
  _this._onHorizontalHoldStart = function () {
7919
- _this.dragThreshold = 10;
7984
+ _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
7920
7985
  _this._moveDirection = null;
7921
7986
  };
7922
7987
  _this._onHorizontalMove = function (e) {
7923
7988
  if (e.isTrusted && !_this._moveDirection) {
7924
- _this._sideFlicking.forEach(function (child) {
7925
- child.dragThreshold = Infinity;
7926
- });
7989
+ _this._setDraggable(MOVE_DIRECTION.VERTICAL, false);
7927
7990
  _this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
7928
7991
  }
7929
7992
  };
7930
7993
  _this._onHorizontalMoveEnd = function (e) {
7931
7994
  var visiblePanels = _this.visiblePanels;
7932
- _this._sideFlicking.forEach(function (child) {
7933
- child.dragThreshold = 10;
7934
- });
7935
- _this._moveDirection = null;
7936
7995
  if (visiblePanels.length > 1) {
7937
7996
  _this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
7938
7997
  } else {
7939
7998
  _this._nextIndex = visiblePanels[0].index;
7940
7999
  }
8000
+ _this._setDraggable(MOVE_DIRECTION.VERTICAL, true);
8001
+ _this._moveDirection = null;
7941
8002
  // _syncToCategory에서 완전히 가로 이동이 이루어지기 전에 세로 방향 index가 변하는 경우가 있어 requestAnimationFrame 처리
7942
8003
  requestAnimationFrame(function () {
7943
- _this._sideFlicking.forEach(function (child, i) {
7944
- if (_this._nextIndex !== i) {
7945
- var _a = _this._sideState[i],
7946
- start = _a.start,
7947
- end = _a.end;
7948
- if (child.index < start) {
7949
- child.stopAnimation();
7950
- void child.moveTo(start, 0);
7951
- } else if (child.index > end) {
7952
- child.stopAnimation();
7953
- void child.moveTo(end, 0);
7954
- }
7955
- }
7956
- });
8004
+ return _this._setPreviousSideIndex();
7957
8005
  });
7958
8006
  if (e.isTrusted) {
7959
8007
  _this._syncToCategory(_this._sideFlicking[_this._nextIndex].index, _this._nextIndex);
7960
8008
  }
7961
8009
  };
7962
8010
  _this._onSideHoldStart = function () {
7963
- _this._sideFlicking.forEach(function (child) {
7964
- child.dragThreshold = 10;
7965
- });
8011
+ _this._setDraggable(MOVE_DIRECTION.VERTICAL, true);
7966
8012
  _this._moveDirection = null;
7967
8013
  };
7968
8014
  _this._onSideMove = function (e) {
7969
8015
  if (e.isTrusted && !_this._moveDirection) {
7970
- _this.dragThreshold = Infinity;
8016
+ _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, false);
7971
8017
  _this._moveDirection = MOVE_DIRECTION.VERTICAL;
7972
8018
  }
7973
8019
  };
7974
8020
  _this._onSideMoveEnd = function () {
7975
- _this.dragThreshold = 10;
8021
+ _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
7976
8022
  _this._moveDirection = null;
7977
8023
  };
7978
8024
  _this._onSideChanged = function (e) {
7979
- // this.visiblePanels.length 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
7980
- // 경우 가로 방향 Flicking의 이동이 완전히 끝난 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
8025
+ // If this.visiblePanels.length >= 2, it means that horizontal flicking is being dragged.
8026
+ // In this case, syncToCategory in _onHorizontalMoveEnd will fire after moving finishes, so we don't fire it here.
7981
8027
  if (_this.visiblePanels.length < 2 && _this._sideFlicking[_this.index] === e.currentTarget) {
7982
8028
  _this._syncToCategory(e.index, _this.index);
7983
8029
  }
7984
8030
  };
8031
+ var _a = options.sideOptions,
8032
+ sideOptions = _a === void 0 ? {} : _a,
8033
+ _b = options.preserveIndex,
8034
+ preserveIndex = _b === void 0 ? true : _b,
8035
+ _c = options.disableSlideOnHold,
8036
+ disableSlideOnHold = _c === void 0 ? true : _c,
8037
+ _d = options.disableIndexSync,
8038
+ disableIndexSync = _d === void 0 ? false : _d;
7985
8039
  // Internal states
7986
8040
  _this._moveDirection = null;
7987
8041
  _this._nextIndex = 0;
7988
8042
  // Bind options
7989
- _this._sideOptions = options.sideOptions;
7990
- _this._preserveIndex = options.preserveIndex;
7991
- _this._disableSlideOnHold = options.disableSlideOnHold;
7992
- _this._disableIndexSync = options.disableIndexSync;
8043
+ _this._sideOptions = sideOptions;
8044
+ _this._preserveIndex = preserveIndex;
8045
+ _this._disableSlideOnHold = disableSlideOnHold;
8046
+ _this._disableIndexSync = disableIndexSync;
7993
8047
  return _this;
7994
- // Create core components
7995
8048
  }
7996
8049
  var __proto = CrossFlicking.prototype;
7997
8050
  Object.defineProperty(__proto, "sideFlicking", {
@@ -8060,7 +8113,9 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
8060
8113
  });
8061
8114
  };
8062
8115
  __proto.destroy = function () {
8063
- // TODO 모든 child flicking destroy
8116
+ this._sideFlicking.forEach(function (flicking) {
8117
+ flicking.destroy();
8118
+ });
8064
8119
  _super.prototype.destroy.call(this);
8065
8120
  };
8066
8121
  __proto._addComponentEvents = function () {
@@ -8068,80 +8123,80 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
8068
8123
  this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
8069
8124
  this.on(EVENTS.MOVE, this._onHorizontalMove);
8070
8125
  this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
8071
- this._sideFlicking.forEach(function (flicking) {
8126
+ this._sideFlicking.forEach(function (flicking, mainIndex) {
8072
8127
  flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
8073
8128
  flicking.on(EVENTS.MOVE, _this._onSideMove);
8074
8129
  flicking.on(EVENTS.MOVE_END, _this._onSideMoveEnd);
8075
8130
  flicking.on(EVENTS.CHANGED, _this._onSideChanged);
8131
+ Object.keys(SIDE_EVENTS).forEach(function (name) {
8132
+ flicking.on(EVENTS[name], function (event) {
8133
+ _this.trigger(new Component.ComponentEvent(SIDE_EVENTS[name], __assign({
8134
+ mainIndex: mainIndex
8135
+ }, event)));
8136
+ });
8137
+ });
8076
8138
  });
8077
8139
  };
8078
- __proto._getGroupFromAttribute = function (panels) {
8079
- var groupKeys = [];
8080
- var groupPanels = {};
8081
- panels.forEach(function (panel) {
8082
- var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
8083
- if (groupKey && !includes(groupKeys, groupKey)) {
8084
- groupKeys.push(groupKey);
8085
- groupPanels[groupKey] = [panel];
8086
- } else if (groupKey) {
8087
- groupPanels[groupKey].push(panel);
8088
- }
8089
- });
8090
- return groupPanels;
8091
- };
8092
8140
  __proto._createSideState = function () {
8093
- var _this = this;
8094
8141
  var viewportEl = this.element;
8095
8142
  var cameraEl = this.camera.element;
8096
8143
  var panels = toArray(cameraEl.children);
8097
- var sideState = [];
8098
- var sidePanels = "";
8099
- // check data attribute exists
8100
- var sideCamera = document.createElement("div");
8101
- sideCamera.classList.add(CLASS.CAMERA);
8102
8144
  var isCrossStructure = getDataAttributes(viewportEl, "data-cross-").structure;
8145
+ var sideState = [];
8103
8146
  if (!isCrossStructure) {
8104
- viewportEl.setAttribute("data-cross-structure", "true");
8105
8147
  var groupPanels = this._getGroupFromAttribute(panels);
8106
8148
  var groupKeys = Object.keys(groupPanels);
8107
8149
  if (groupKeys.length) {
8108
8150
  sideState = this._getSideStateFromGroup(groupPanels);
8109
8151
  this.remove(0, this.panelCount - groupKeys.length);
8110
- sideState.forEach(function (state, i) {
8111
- var panel = _this.camera.children[i];
8112
- sidePanels += state.element.innerHTML;
8113
- Array.from(panel.attributes).forEach(function (attribute) {
8114
- return panel.removeAttribute(attribute.name);
8115
- });
8116
- });
8117
8152
  } else {
8118
- sideState = panels.reduce(function (state, panel, i) {
8119
- var start = state.length ? +state[state.length - 1].end + 1 : 0;
8120
- sidePanels += panel.innerHTML;
8121
- return __spread(state, [{
8122
- key: i.toString(),
8123
- start: start,
8124
- end: start + panel.children.length - 1,
8125
- element: panel
8126
- }]);
8127
- }, []);
8153
+ sideState = this._getSideStateFromPanels(panels);
8128
8154
  }
8129
- sideCamera.innerHTML = sidePanels;
8130
- sideState.forEach(function (_, i) {
8131
- var panel = _this.camera.children[i];
8132
- [CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
8133
- if (!panel.classList.contains(className)) {
8134
- panel.classList.add(className);
8135
- }
8136
- });
8137
- panel.innerHTML = sideCamera.outerHTML;
8138
- });
8155
+ this._createCrossStructure(sideState);
8139
8156
  } else {
8140
- sideState = this._getSideStateFromPanels(panels);
8157
+ sideState = this._getSideStateFromCrossStructure(panels);
8141
8158
  }
8142
8159
  void this.resize();
8143
8160
  return sideState;
8144
8161
  };
8162
+ __proto._createCrossStructure = function (sideState) {
8163
+ var _this = this;
8164
+ var sideCamera = document.createElement("div");
8165
+ var sidePanels = "";
8166
+ sideCamera.classList.add(CLASS.CAMERA);
8167
+ sideState.forEach(function (state, i) {
8168
+ var panel = _this.camera.children[i];
8169
+ sidePanels += state.element.innerHTML;
8170
+ Array.from(panel.attributes).forEach(function (attribute) {
8171
+ return panel.removeAttribute(attribute.name);
8172
+ });
8173
+ });
8174
+ sideCamera.innerHTML = sidePanels;
8175
+ sideState.forEach(function (_, i) {
8176
+ var panel = _this.camera.children[i];
8177
+ [CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
8178
+ if (!panel.classList.contains(className)) {
8179
+ panel.classList.add(className);
8180
+ }
8181
+ });
8182
+ panel.innerHTML = sideCamera.outerHTML;
8183
+ });
8184
+ this.element.setAttribute("data-cross-structure", "true");
8185
+ };
8186
+ __proto._getGroupFromAttribute = function (panels) {
8187
+ var groupKeys = [];
8188
+ var groupPanels = {};
8189
+ panels.forEach(function (panel) {
8190
+ var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
8191
+ if (groupKey && !includes(groupKeys, groupKey)) {
8192
+ groupKeys.push(groupKey);
8193
+ groupPanels[groupKey] = [panel];
8194
+ } else if (groupKey) {
8195
+ groupPanels[groupKey].push(panel);
8196
+ }
8197
+ });
8198
+ return groupPanels;
8199
+ };
8145
8200
  __proto._getSideStateFromGroup = function (groupPanels) {
8146
8201
  return Object.keys(groupPanels).reduce(function (state, key) {
8147
8202
  var start = state.length ? +state[state.length - 1].end + 1 : 0;
@@ -8158,6 +8213,17 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
8158
8213
  }, []);
8159
8214
  };
8160
8215
  __proto._getSideStateFromPanels = function (panels) {
8216
+ return panels.reduce(function (state, panel, i) {
8217
+ var start = state.length ? +state[state.length - 1].end + 1 : 0;
8218
+ return __spread(state, [{
8219
+ key: i.toString(),
8220
+ start: start,
8221
+ end: start + panel.children.length - 1,
8222
+ element: panel
8223
+ }]);
8224
+ }, []);
8225
+ };
8226
+ __proto._getSideStateFromCrossStructure = function (panels) {
8161
8227
  var groupPanels = this._getGroupFromAttribute(panels);
8162
8228
  return this._getSideStateFromGroup(groupPanels);
8163
8229
  };
@@ -8167,25 +8233,10 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
8167
8233
  return new Flicking(_this.camera.children[i], __assign(__assign({}, _this.sideOptions), {
8168
8234
  horizontal: false,
8169
8235
  panelsPerView: 1,
8170
- defaultIndex: state.start,
8171
- moveType: "strict"
8236
+ defaultIndex: state.start
8172
8237
  }));
8173
8238
  });
8174
8239
  };
8175
- __proto._syncToCategory = function (index, outerIndex) {
8176
- var _this = this;
8177
- this.stopAnimation();
8178
- this._sideFlicking.forEach(function (child, i) {
8179
- var _a = _this._sideState[i],
8180
- start = _a.start,
8181
- end = _a.end;
8182
- if (start <= index && end >= index && outerIndex !== i) {
8183
- child.stopAnimation();
8184
- void child.moveTo(index, 0);
8185
- void _this.moveTo(i, 0);
8186
- }
8187
- });
8188
- };
8189
8240
  return CrossFlicking;
8190
8241
  }(Flicking);
8191
8242
 
@@ -8406,6 +8457,7 @@ var parseAlign = function (alignVal) {
8406
8457
  var modules = {
8407
8458
  __proto__: null,
8408
8459
  'default': Flicking,
8460
+ SIDE_EVENTS: SIDE_EVENTS,
8409
8461
  CrossFlicking: CrossFlicking,
8410
8462
  VanillaElementProvider: VanillaElementProvider,
8411
8463
  VirtualElementProvider: VirtualElementProvider,
@@ -8519,6 +8571,7 @@ exports.NormalRenderingStrategy = NormalRenderingStrategy;
8519
8571
  exports.ORDER = ORDER;
8520
8572
  exports.Panel = Panel;
8521
8573
  exports.Renderer = Renderer;
8574
+ exports.SIDE_EVENTS = SIDE_EVENTS;
8522
8575
  exports.SnapControl = SnapControl;
8523
8576
  exports.State = State;
8524
8577
  exports.StateMachine = StateMachine;