@egjs/react-flicking 4.11.3-beta.3 → 4.11.3-beta.4

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