@egjs/react-flicking 4.11.3-beta.3 → 4.11.3-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.
@@ -4,7 +4,7 @@ name: @egjs/react-flicking
4
4
  license: MIT
5
5
  author: NAVER Corp.
6
6
  repository: https://github.com/naver/egjs-flicking/tree/master/packages/react-flicking
7
- version: 4.10.3-beta.0
7
+ version: 4.11.3-beta.5
8
8
  */
9
9
  import * as React from 'react';
10
10
  import React__default from 'react';
@@ -14,7 +14,7 @@ import VanillaFlicking__default, { getFlickingAttached, ExternalRenderer, Virtua
14
14
  export * from '@egjs/flicking';
15
15
  import { findDOMNode } from 'react-dom';
16
16
 
17
- /*! *****************************************************************************
17
+ /******************************************************************************
18
18
  Copyright (c) Microsoft Corporation.
19
19
 
20
20
  Permission to use, copy, modify, and/or distribute this software for any
@@ -28,8 +28,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
28
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
29
  PERFORMANCE OF THIS SOFTWARE.
30
30
  ***************************************************************************** */
31
-
32
31
  /* global Reflect, Promise */
32
+
33
33
  var extendStatics = function (d, b) {
34
34
  extendStatics = Object.setPrototypeOf || {
35
35
  __proto__: []
@@ -38,38 +38,29 @@ var extendStatics = function (d, b) {
38
38
  } || function (d, b) {
39
39
  for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
40
40
  };
41
-
42
41
  return extendStatics(d, b);
43
42
  };
44
-
45
43
  function __extends(d, b) {
46
44
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
47
45
  extendStatics(d, b);
48
-
49
46
  function __() {
50
47
  this.constructor = d;
51
48
  }
52
-
53
49
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54
50
  }
55
51
  var __assign = function () {
56
52
  __assign = Object.assign || function __assign(t) {
57
53
  for (var s, i = 1, n = arguments.length; i < n; i++) {
58
54
  s = arguments[i];
59
-
60
55
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
61
56
  }
62
-
63
57
  return t;
64
58
  };
65
-
66
59
  return __assign.apply(this, arguments);
67
60
  };
68
61
  function __rest(s, e) {
69
62
  var t = {};
70
-
71
63
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
72
-
73
64
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
74
65
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
75
66
  }
@@ -77,8 +68,8 @@ function __rest(s, e) {
77
68
  }
78
69
  function __decorate(decorators, target, key, desc) {
79
70
  var c = arguments.length,
80
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
81
- d;
71
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
72
+ d;
82
73
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
83
74
  return c > 3 && r && Object.defineProperty(target, key, r), r;
84
75
  }
@@ -88,7 +79,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
88
79
  resolve(value);
89
80
  });
90
81
  }
91
-
92
82
  return new (P || (P = Promise))(function (resolve, reject) {
93
83
  function fulfilled(value) {
94
84
  try {
@@ -97,7 +87,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
97
87
  reject(e);
98
88
  }
99
89
  }
100
-
101
90
  function rejected(value) {
102
91
  try {
103
92
  step(generator["throw"](value));
@@ -105,28 +94,26 @@ function __awaiter(thisArg, _arguments, P, generator) {
105
94
  reject(e);
106
95
  }
107
96
  }
108
-
109
97
  function step(result) {
110
98
  result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
111
99
  }
112
-
113
100
  step((generator = generator.apply(thisArg, _arguments || [])).next());
114
101
  });
115
102
  }
116
103
  function __generator(thisArg, body) {
117
104
  var _ = {
118
- label: 0,
119
- sent: function () {
120
- if (t[0] & 1) throw t[1];
121
- return t[1];
105
+ label: 0,
106
+ sent: function () {
107
+ if (t[0] & 1) throw t[1];
108
+ return t[1];
109
+ },
110
+ trys: [],
111
+ ops: []
122
112
  },
123
- trys: [],
124
- ops: []
125
- },
126
- f,
127
- y,
128
- t,
129
- g;
113
+ f,
114
+ y,
115
+ t,
116
+ g;
130
117
  return g = {
131
118
  next: verb(0),
132
119
  "throw": verb(1),
@@ -134,78 +121,59 @@ function __generator(thisArg, body) {
134
121
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
135
122
  return this;
136
123
  }), g;
137
-
138
124
  function verb(n) {
139
125
  return function (v) {
140
126
  return step([n, v]);
141
127
  };
142
128
  }
143
-
144
129
  function step(op) {
145
130
  if (f) throw new TypeError("Generator is already executing.");
146
-
147
- while (_) try {
131
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
148
132
  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;
149
133
  if (y = 0, t) op = [op[0] & 2, t.value];
150
-
151
134
  switch (op[0]) {
152
135
  case 0:
153
136
  case 1:
154
137
  t = op;
155
138
  break;
156
-
157
139
  case 4:
158
140
  _.label++;
159
141
  return {
160
142
  value: op[1],
161
143
  done: false
162
144
  };
163
-
164
145
  case 5:
165
146
  _.label++;
166
147
  y = op[1];
167
148
  op = [0];
168
149
  continue;
169
-
170
150
  case 7:
171
151
  op = _.ops.pop();
172
-
173
152
  _.trys.pop();
174
-
175
153
  continue;
176
-
177
154
  default:
178
155
  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
179
156
  _ = 0;
180
157
  continue;
181
158
  }
182
-
183
159
  if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
184
160
  _.label = op[1];
185
161
  break;
186
162
  }
187
-
188
163
  if (op[0] === 6 && _.label < t[1]) {
189
164
  _.label = t[1];
190
165
  t = op;
191
166
  break;
192
167
  }
193
-
194
168
  if (t && _.label < t[2]) {
195
169
  _.label = t[2];
196
-
197
170
  _.ops.push(op);
198
-
199
171
  break;
200
172
  }
201
-
202
173
  if (t[2]) _.ops.pop();
203
-
204
174
  _.trys.pop();
205
-
206
175
  continue;
207
176
  }
208
-
209
177
  op = body.call(thisArg, _);
210
178
  } catch (e) {
211
179
  op = [6, e];
@@ -213,7 +181,6 @@ function __generator(thisArg, body) {
213
181
  } finally {
214
182
  f = t = 0;
215
183
  }
216
-
217
184
  if (op[0] & 5) throw op[1];
218
185
  return {
219
186
  value: op[0] ? op[1] : void 0,
@@ -258,27 +225,19 @@ var DEFAULT_PROPS = {
258
225
  onPanelChange: function (e) {}
259
226
  };
260
227
 
261
- var ReactRenderer =
262
- /*#__PURE__*/
263
- function (_super) {
228
+ var ReactRenderer = /*#__PURE__*/function (_super) {
264
229
  __extends(ReactRenderer, _super);
265
-
266
230
  function ReactRenderer(options) {
267
231
  var _this = _super.call(this, options) || this;
268
-
269
232
  _this._reactFlicking = options.reactFlicking;
270
233
  return _this;
271
- } // eslint-disable-next-line @typescript-eslint/require-await
272
-
273
-
234
+ }
235
+ // eslint-disable-next-line @typescript-eslint/require-await
274
236
  var __proto = ReactRenderer.prototype;
275
-
276
237
  __proto.render = function () {
277
238
  return __awaiter(this, void 0, void 0, function () {
278
239
  var flicking, reactFlicking, strategy;
279
-
280
240
  var _this = this;
281
-
282
241
  return __generator(this, function (_a) {
283
242
  flicking = getFlickingAttached(this._flicking);
284
243
  reactFlicking = this._reactFlicking;
@@ -286,11 +245,10 @@ function (_super) {
286
245
  this._rendering = true;
287
246
  strategy.updateRenderingPanels(flicking);
288
247
  strategy.renderPanels(flicking);
289
- return [2
290
- /*return*/
291
- , new Promise(function (resolve) {
248
+ return [2 /*return*/, new Promise(function (resolve) {
292
249
  reactFlicking.renderEmitter.once("render", function () {
293
250
  _this._rendering = false;
251
+ _this._afterRender();
294
252
  resolve();
295
253
  });
296
254
  reactFlicking.forceUpdate();
@@ -298,28 +256,19 @@ function (_super) {
298
256
  });
299
257
  });
300
258
  };
301
-
302
259
  __proto.forceRenderAllPanels = function () {
303
260
  return __awaiter(this, void 0, void 0, function () {
304
261
  var reactFlicking;
305
-
306
262
  var _this = this;
307
-
308
263
  return __generator(this, function (_a) {
309
264
  switch (_a.label) {
310
265
  case 0:
311
266
  reactFlicking = this._reactFlicking;
312
267
  this._rendering = true;
313
- return [4
314
- /*yield*/
315
- , _super.prototype.forceRenderAllPanels.call(this)];
316
-
268
+ return [4 /*yield*/, _super.prototype.forceRenderAllPanels.call(this)];
317
269
  case 1:
318
270
  _a.sent();
319
-
320
- return [2
321
- /*return*/
322
- , new Promise(function (resolve) {
271
+ return [2 /*return*/, new Promise(function (resolve) {
323
272
  reactFlicking.renderEmitter.once("render", function () {
324
273
  _this._rendering = false;
325
274
  resolve();
@@ -330,34 +279,30 @@ function (_super) {
330
279
  });
331
280
  });
332
281
  };
333
-
282
+ __proto.destroy = function () {
283
+ _super.prototype.destroy.call(this);
284
+ this._reactFlicking.renderEmitter.off("render");
285
+ };
334
286
  __proto._collectPanels = function () {
335
287
  var flicking = getFlickingAttached(this._flicking);
336
288
  var reactFlicking = this._reactFlicking;
337
289
  var reactPanels = reactFlicking.reactPanels;
338
290
  this._panels = this._strategy.collectPanels(flicking, reactPanels);
339
291
  };
340
-
341
292
  __proto._createPanel = function (externalComponent, options) {
342
293
  return this._strategy.createPanel(externalComponent, options);
343
294
  };
344
-
345
295
  return ReactRenderer;
346
296
  }(ExternalRenderer);
347
297
 
348
- var StrictPanel =
349
- /*#__PURE__*/
350
- function (_super) {
298
+ var StrictPanel = /*#__PURE__*/function (_super) {
351
299
  __extends(StrictPanel, _super);
352
-
353
300
  function StrictPanel() {
354
301
  var _this = _super !== null && _super.apply(this, arguments) || this;
355
-
356
302
  _this._hide = false;
357
303
  _this._elRef = React.createRef();
358
304
  return _this;
359
305
  }
360
-
361
306
  var __proto = StrictPanel.prototype;
362
307
  Object.defineProperty(__proto, "nativeElement", {
363
308
  get: function () {
@@ -373,40 +318,30 @@ function (_super) {
373
318
  enumerable: false,
374
319
  configurable: true
375
320
  });
376
-
377
321
  __proto.render = function () {
378
322
  return this._hide ? React.createElement(React.Fragment, null) : this._getElement();
379
323
  };
380
-
381
324
  __proto.show = function () {
382
325
  this._hide = false;
383
326
  };
384
-
385
327
  __proto.hide = function () {
386
328
  this._hide = true;
387
329
  };
388
-
389
330
  __proto._getElement = function () {
390
331
  return React.cloneElement(React.Children.only(this.props.children), {
391
332
  ref: this._elRef
392
333
  });
393
334
  };
394
-
395
335
  return StrictPanel;
396
336
  }(React.Component);
397
337
 
398
- var NonStrictPanel =
399
- /*#__PURE__*/
400
- function (_super) {
338
+ var NonStrictPanel = /*#__PURE__*/function (_super) {
401
339
  __extends(NonStrictPanel, _super);
402
-
403
340
  function NonStrictPanel() {
404
341
  var _this = _super !== null && _super.apply(this, arguments) || this;
405
-
406
342
  _this._hide = false;
407
343
  return _this;
408
344
  }
409
-
410
345
  var __proto = NonStrictPanel.prototype;
411
346
  Object.defineProperty(__proto, "nativeElement", {
412
347
  get: function () {
@@ -422,19 +357,15 @@ function (_super) {
422
357
  enumerable: false,
423
358
  configurable: true
424
359
  });
425
-
426
360
  __proto.render = function () {
427
361
  return this._hide ? React.createElement(React.Fragment, null) : this.props.children;
428
362
  };
429
-
430
363
  __proto.show = function () {
431
364
  this._hide = false;
432
365
  };
433
-
434
366
  __proto.hide = function () {
435
367
  this._hide = true;
436
368
  };
437
-
438
369
  return NonStrictPanel;
439
370
  }(React.Component);
440
371
 
@@ -446,13 +377,10 @@ var ViewportSlot = React__default.memo(function (props) {
446
377
  return React__default.createElement(React__default.Fragment, null, props.children);
447
378
  });
448
379
 
449
- var ReactElementProvider =
450
- /*#__PURE__*/
451
- function () {
380
+ var ReactElementProvider = /*#__PURE__*/function () {
452
381
  function ReactElementProvider(el) {
453
382
  this._el = el;
454
383
  }
455
-
456
384
  var __proto = ReactElementProvider.prototype;
457
385
  Object.defineProperty(__proto, "element", {
458
386
  get: function () {
@@ -468,36 +396,26 @@ function () {
468
396
  enumerable: false,
469
397
  configurable: true
470
398
  });
471
-
472
399
  __proto.show = function () {
473
400
  this._el.show();
474
401
  };
475
-
476
402
  __proto.hide = function () {
477
403
  this._el.hide();
478
404
  };
479
-
480
405
  return ReactElementProvider;
481
406
  }();
482
407
 
483
- var Flicking =
484
- /*#__PURE__*/
485
- function (_super) {
408
+ var Flicking = /*#__PURE__*/function (_super) {
486
409
  __extends(Flicking, _super);
487
-
488
410
  function Flicking(props) {
489
411
  var _this = _super.call(this, props) || this;
490
-
491
412
  _this._panels = [];
492
413
  _this._renderEmitter = new Component();
493
-
494
414
  var children = _this._getChildren();
495
-
496
415
  _this._panels = _this._createPanelRefs(props, children);
497
416
  _this._prevChildren = children;
498
417
  return _this;
499
418
  }
500
-
501
419
  var __proto = Flicking.prototype;
502
420
  Object.defineProperty(__proto, "reactPanels", {
503
421
  get: function () {
@@ -515,7 +433,6 @@ function (_super) {
515
433
  enumerable: false,
516
434
  configurable: true
517
435
  });
518
-
519
436
  __proto.componentDidMount = function () {
520
437
  var props = this.props;
521
438
  var rendererOptions = {
@@ -529,123 +446,105 @@ function (_super) {
529
446
  externalRenderer: new ReactRenderer(rendererOptions)
530
447
  }));
531
448
  this._vanillaFlicking = flicking;
532
-
533
449
  var children = this._getChildren();
534
-
535
450
  this._jsxDiffer = new ListDiffer(children, function (panel) {
536
451
  return panel.key;
537
452
  });
538
453
  this._pluginsDiffer = new ListDiffer();
539
454
  this._prevChildren = children;
540
-
541
455
  this._bindEvents();
542
-
543
456
  this._checkPlugins();
544
-
545
457
  if (props.status) {
546
458
  flicking.setStatus(props.status);
547
459
  }
548
460
  };
549
-
550
461
  __proto.componentWillUnmount = function () {
551
462
  var _a;
552
-
553
463
  (_a = this._vanillaFlicking) === null || _a === void 0 ? void 0 : _a.destroy();
554
464
  };
555
-
556
465
  __proto.shouldComponentUpdate = function (nextProps) {
557
466
  var vanillaFlicking = this._vanillaFlicking;
558
467
  var prevProps = this.props;
559
468
  if (!vanillaFlicking || !vanillaFlicking.initialized) return false;
560
-
561
469
  var children = nextProps.children,
562
- restProps = __rest(nextProps, ["children"]);
563
-
470
+ restProps = __rest(nextProps, ["children"]);
564
471
  for (var key in restProps) {
565
472
  if (prevProps[key] !== nextProps[key]) {
566
473
  return true;
567
474
  }
568
475
  }
569
-
570
476
  var prevChildren = this._prevChildren;
571
-
572
477
  var nextChildren = this._getChildren(children);
573
-
574
478
  if (nextProps.renderOnSameKey || !this._hasSameChildren(prevChildren, nextChildren)) return true;
575
479
  return false;
576
480
  };
577
-
578
481
  __proto.beforeRender = function () {
579
482
  var vanillaFlicking = this._vanillaFlicking;
580
483
  var props = this.props;
581
- var prevChildren = this._prevChildren; // Ignore updates before init, they will be updated after "ready" event's force update
484
+ var prevChildren = this._prevChildren;
485
+ // Ignore updates before init, they will be updated after "ready" event's force update
582
486
  // Also, prevent updates when another update is already queued.
583
487
  // This usually happens when render() called twice without calling componentDidMount, like in the case of React.StrictMode.
584
-
585
488
  if (!vanillaFlicking || !vanillaFlicking.initialized || this._diffResult) return;
586
-
587
489
  var nextChildren = this._getChildren(props.children);
588
-
589
490
  if (props.renderOnSameKey || !this._hasSameChildren(prevChildren, nextChildren)) {
590
491
  this._panels = this._createPanelRefs(props, nextChildren);
591
492
  this._diffResult = this._jsxDiffer.update(nextChildren);
592
493
  this._prevChildren = nextChildren;
593
494
  }
594
495
  };
595
-
596
496
  __proto.componentDidUpdate = function () {
597
497
  var flicking = this._vanillaFlicking;
598
498
  var renderEmitter = this._renderEmitter;
599
499
  var diffResult = this._diffResult;
600
-
601
500
  this._checkPlugins();
602
-
603
501
  renderEmitter.trigger("render");
604
502
  flicking.camera.updateOffset();
503
+ // Omit 'virtual', as it can't have any setter
504
+ var _a = this.props;
505
+ _a.virtual;
506
+ var props = __rest(_a, ["virtual"]);
507
+ for (var key in props) {
508
+ if (key in flicking && flicking[key] !== props[key]) {
509
+ try {
510
+ flicking[key] = props[key];
511
+ } catch (e) {}
512
+ }
513
+ }
605
514
  if (!diffResult || !flicking.initialized) return;
606
515
  sync(flicking, diffResult, this.reactPanels);
607
516
  this._diffResult = null;
608
517
  };
609
-
610
518
  __proto.render = function () {
611
519
  var _this = this;
612
-
613
520
  var _a, _b;
614
-
615
521
  var props = this.props;
616
522
  var Viewport = props.viewportTag;
617
523
  var Camera = props.cameraTag;
618
524
  var attributes = {};
619
525
  var flicking = this._vanillaFlicking;
620
526
  this.beforeRender();
621
-
622
527
  for (var name in props) {
623
528
  if (!(name in DEFAULT_PROPS) && !(name in VanillaFlicking__default.prototype)) {
624
529
  attributes[name] = props[name];
625
530
  }
626
531
  }
627
-
628
532
  var initialized = flicking && flicking.initialized;
629
533
  var viewportClasses = ["flicking-viewport"];
630
534
  var cameraClasses = ["flicking-camera"];
631
535
  var isHorizontal = flicking ? flicking.horizontal : (_a = props.horizontal) !== null && _a !== void 0 ? _a : true;
632
-
633
536
  if (!isHorizontal) {
634
537
  viewportClasses.push("vertical");
635
538
  }
636
-
637
539
  if (props.hideBeforeInit && !initialized) {
638
540
  viewportClasses.push("flicking-hidden");
639
541
  }
640
-
641
542
  if (attributes.className) {
642
543
  viewportClasses.push(attributes.className);
643
544
  }
644
-
645
545
  if (props.cameraClass) {
646
546
  cameraClasses.push(props.cameraClass);
647
547
  }
648
-
649
548
  var cameraProps = !initialized && props.firstPanelSize ? {
650
549
  style: {
651
550
  transform: getDefaultCameraTransform(this.props.align, this.props.horizontal, this.props.firstPanelSize)
@@ -661,10 +560,8 @@ function (_super) {
661
560
  className: cameraClasses.join(" ")
662
561
  }, cameraProps), panels), this._getViewportSlot());
663
562
  };
664
-
665
563
  __proto._createPanelRefs = function (props, children) {
666
564
  var _a;
667
-
668
565
  var panelsPerView = (_a = props.panelsPerView) !== null && _a !== void 0 ? _a : -1;
669
566
  return panelsPerView > 0 && !!props.virtual ? range(panelsPerView + 1).map(function () {
670
567
  return React.createRef();
@@ -672,10 +569,8 @@ function (_super) {
672
569
  return React.createRef();
673
570
  });
674
571
  };
675
-
676
572
  __proto._bindEvents = function () {
677
573
  var _this = this;
678
-
679
574
  var flicking = this._vanillaFlicking;
680
575
  Object.keys(EVENTS).forEach(function (eventKey) {
681
576
  var eventName = EVENTS[eventKey];
@@ -690,16 +585,13 @@ function (_super) {
690
585
  _this.forceUpdate();
691
586
  });
692
587
  };
693
-
694
588
  __proto._checkPlugins = function () {
695
589
  var flicking = this._vanillaFlicking;
696
-
697
590
  var _a = this._pluginsDiffer.update(this.props.plugins),
698
- list = _a.list,
699
- added = _a.added,
700
- removed = _a.removed,
701
- prevList = _a.prevList;
702
-
591
+ list = _a.list,
592
+ added = _a.added,
593
+ removed = _a.removed,
594
+ prevList = _a.prevList;
703
595
  flicking.addPlugins.apply(flicking, added.map(function (index) {
704
596
  return list[index];
705
597
  }));
@@ -707,12 +599,10 @@ function (_super) {
707
599
  return prevList[index];
708
600
  }));
709
601
  };
710
-
711
602
  __proto._hasSameChildren = function (prevChildren, nextChildren) {
712
603
  if (prevChildren.length !== nextChildren.length || prevChildren.length === 0) return false;
713
604
  var same = prevChildren.every(function (child, idx) {
714
605
  var nextChild = nextChildren[idx];
715
-
716
606
  if (child.key && nextChild.key) {
717
607
  return child.key === nextChild.key;
718
608
  } else {
@@ -721,40 +611,32 @@ function (_super) {
721
611
  });
722
612
  return same;
723
613
  };
724
-
725
614
  __proto._getChildren = function (children) {
726
615
  var _this = this;
727
-
728
616
  if (children === void 0) {
729
617
  children = this.props.children;
730
618
  }
731
-
732
619
  return React.Children.toArray(children).filter(function (child) {
733
620
  return child.type !== ViewportSlot;
734
621
  }).reduce(function (all, child) {
735
622
  return __spreadArray(__spreadArray([], all, true), _this._unpackFragment(child), true);
736
623
  }, []);
737
624
  };
738
-
739
625
  __proto._getViewportSlot = function () {
740
626
  return React.Children.toArray(this.props.children).filter(function (child) {
741
627
  return child.type === ViewportSlot;
742
628
  });
743
629
  };
744
-
745
630
  __proto._unpackFragment = function (child) {
746
631
  var _this = this;
747
-
748
632
  return this._isFragment(child) ? React.Children.toArray(child.props.children).reduce(function (allChilds, fragChild) {
749
633
  return __spreadArray(__spreadArray([], allChilds, true), _this._unpackFragment(fragChild), true);
750
634
  }, []) : [child];
751
635
  };
752
-
753
636
  __proto._getVirtualPanels = function () {
754
637
  var _this = this;
755
-
756
638
  var _a = this.props.virtual.panelClass,
757
- panelClass = _a === void 0 ? "flicking-panel" : _a;
639
+ panelClass = _a === void 0 ? "flicking-panel" : _a;
758
640
  var panelsPerView = this.props.panelsPerView;
759
641
  var flicking = this._vanillaFlicking;
760
642
  var initialized = flicking && flicking.initialized;
@@ -775,12 +657,9 @@ function (_super) {
775
657
  });
776
658
  });
777
659
  };
778
-
779
660
  __proto._getPanels = function () {
780
661
  var _this = this;
781
-
782
662
  var origChildren = this._getChildren();
783
-
784
663
  var vanillaFlicking = this._vanillaFlicking;
785
664
  var diffResult = this._diffResult;
786
665
  var children = vanillaFlicking && vanillaFlicking.initialized ? diffResult ? getRenderingPanels(vanillaFlicking, diffResult) : getRenderingPanels(vanillaFlicking, diff(origChildren, origChildren)) : origChildren;
@@ -796,19 +675,14 @@ function (_super) {
796
675
  }, child);
797
676
  });
798
677
  };
799
-
800
678
  __proto._isFragment = function (child) {
801
679
  if (child.type) {
802
680
  return child.type === React.Fragment;
803
681
  }
804
-
805
682
  return child === React.Fragment;
806
683
  };
807
-
808
684
  Flicking.defaultProps = DEFAULT_PROPS;
809
-
810
685
  __decorate([withFlickingMethods], Flicking.prototype, "_vanillaFlicking", void 0);
811
-
812
686
  return Flicking;
813
687
  }(React.Component);
814
688