@egjs/react-flicking 4.10.8 → 4.10.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.
@@ -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.8
7
+ version: 4.10.9
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.8
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.8
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.8
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.8
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.8
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.8
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.8
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.8
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.8
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.8
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,14 +243,10 @@ version: 4.10.8
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;
292
-
293
249
  _this._afterRender();
294
-
295
250
  resolve();
296
251
  });
297
252
  reactFlicking.forceUpdate();
@@ -299,28 +254,19 @@ version: 4.10.8
299
254
  });
300
255
  });
301
256
  };
302
-
303
257
  __proto.forceRenderAllPanels = function () {
304
258
  return __awaiter(this, void 0, void 0, function () {
305
259
  var reactFlicking;
306
-
307
260
  var _this = this;
308
-
309
261
  return __generator(this, function (_a) {
310
262
  switch (_a.label) {
311
263
  case 0:
312
264
  reactFlicking = this._reactFlicking;
313
265
  this._rendering = true;
314
- return [4
315
- /*yield*/
316
- , _super.prototype.forceRenderAllPanels.call(this)];
317
-
266
+ return [4 /*yield*/, _super.prototype.forceRenderAllPanels.call(this)];
318
267
  case 1:
319
268
  _a.sent();
320
-
321
- return [2
322
- /*return*/
323
- , new Promise(function (resolve) {
269
+ return [2 /*return*/, new Promise(function (resolve) {
324
270
  reactFlicking.renderEmitter.once("render", function () {
325
271
  _this._rendering = false;
326
272
  resolve();
@@ -331,40 +277,30 @@ version: 4.10.8
331
277
  });
332
278
  });
333
279
  };
334
-
335
280
  __proto.destroy = function () {
336
281
  _super.prototype.destroy.call(this);
337
-
338
282
  this._reactFlicking.renderEmitter.off("render");
339
283
  };
340
-
341
284
  __proto._collectPanels = function () {
342
285
  var flicking = VanillaFlicking.getFlickingAttached(this._flicking);
343
286
  var reactFlicking = this._reactFlicking;
344
287
  var reactPanels = reactFlicking.reactPanels;
345
288
  this._panels = this._strategy.collectPanels(flicking, reactPanels);
346
289
  };
347
-
348
290
  __proto._createPanel = function (externalComponent, options) {
349
291
  return this._strategy.createPanel(externalComponent, options);
350
292
  };
351
-
352
293
  return ReactRenderer;
353
294
  }(VanillaFlicking.ExternalRenderer);
354
295
 
355
- var StrictPanel =
356
- /*#__PURE__*/
357
- function (_super) {
296
+ var StrictPanel = /*#__PURE__*/function (_super) {
358
297
  __extends(StrictPanel, _super);
359
-
360
298
  function StrictPanel() {
361
299
  var _this = _super !== null && _super.apply(this, arguments) || this;
362
-
363
300
  _this._hide = false;
364
301
  _this._elRef = React.createRef();
365
302
  return _this;
366
303
  }
367
-
368
304
  var __proto = StrictPanel.prototype;
369
305
  Object.defineProperty(__proto, "nativeElement", {
370
306
  get: function () {
@@ -380,40 +316,30 @@ version: 4.10.8
380
316
  enumerable: false,
381
317
  configurable: true
382
318
  });
383
-
384
319
  __proto.render = function () {
385
320
  return this._hide ? React.createElement(React.Fragment, null) : this._getElement();
386
321
  };
387
-
388
322
  __proto.show = function () {
389
323
  this._hide = false;
390
324
  };
391
-
392
325
  __proto.hide = function () {
393
326
  this._hide = true;
394
327
  };
395
-
396
328
  __proto._getElement = function () {
397
329
  return React.cloneElement(React.Children.only(this.props.children), {
398
330
  ref: this._elRef
399
331
  });
400
332
  };
401
-
402
333
  return StrictPanel;
403
334
  }(React.Component);
404
335
 
405
- var NonStrictPanel =
406
- /*#__PURE__*/
407
- function (_super) {
336
+ var NonStrictPanel = /*#__PURE__*/function (_super) {
408
337
  __extends(NonStrictPanel, _super);
409
-
410
338
  function NonStrictPanel() {
411
339
  var _this = _super !== null && _super.apply(this, arguments) || this;
412
-
413
340
  _this._hide = false;
414
341
  return _this;
415
342
  }
416
-
417
343
  var __proto = NonStrictPanel.prototype;
418
344
  Object.defineProperty(__proto, "nativeElement", {
419
345
  get: function () {
@@ -429,19 +355,15 @@ version: 4.10.8
429
355
  enumerable: false,
430
356
  configurable: true
431
357
  });
432
-
433
358
  __proto.render = function () {
434
359
  return this._hide ? React.createElement(React.Fragment, null) : this.props.children;
435
360
  };
436
-
437
361
  __proto.show = function () {
438
362
  this._hide = false;
439
363
  };
440
-
441
364
  __proto.hide = function () {
442
365
  this._hide = true;
443
366
  };
444
-
445
367
  return NonStrictPanel;
446
368
  }(React.Component);
447
369
 
@@ -453,13 +375,10 @@ version: 4.10.8
453
375
  return React.createElement(React.Fragment, null, props.children);
454
376
  });
455
377
 
456
- var ReactElementProvider =
457
- /*#__PURE__*/
458
- function () {
378
+ var ReactElementProvider = /*#__PURE__*/function () {
459
379
  function ReactElementProvider(el) {
460
380
  this._el = el;
461
381
  }
462
-
463
382
  var __proto = ReactElementProvider.prototype;
464
383
  Object.defineProperty(__proto, "element", {
465
384
  get: function () {
@@ -475,36 +394,26 @@ version: 4.10.8
475
394
  enumerable: false,
476
395
  configurable: true
477
396
  });
478
-
479
397
  __proto.show = function () {
480
398
  this._el.show();
481
399
  };
482
-
483
400
  __proto.hide = function () {
484
401
  this._el.hide();
485
402
  };
486
-
487
403
  return ReactElementProvider;
488
404
  }();
489
405
 
490
- var Flicking =
491
- /*#__PURE__*/
492
- function (_super) {
406
+ var Flicking = /*#__PURE__*/function (_super) {
493
407
  __extends(Flicking, _super);
494
-
495
408
  function Flicking(props) {
496
409
  var _this = _super.call(this, props) || this;
497
-
498
410
  _this._panels = [];
499
411
  _this._renderEmitter = new Component();
500
-
501
412
  var children = _this._getChildren();
502
-
503
413
  _this._panels = _this._createPanelRefs(props, children);
504
414
  _this._prevChildren = children;
505
415
  return _this;
506
416
  }
507
-
508
417
  var __proto = Flicking.prototype;
509
418
  Object.defineProperty(__proto, "reactPanels", {
510
419
  get: function () {
@@ -522,7 +431,6 @@ version: 4.10.8
522
431
  enumerable: false,
523
432
  configurable: true
524
433
  });
525
-
526
434
  __proto.componentDidMount = function () {
527
435
  var props = this.props;
528
436
  var rendererOptions = {
@@ -536,134 +444,103 @@ version: 4.10.8
536
444
  externalRenderer: new ReactRenderer(rendererOptions)
537
445
  }));
538
446
  this._vanillaFlicking = flicking;
539
-
540
447
  var children = this._getChildren();
541
-
542
448
  this._jsxDiffer = new ListDiffer(children, function (panel) {
543
449
  return panel.key;
544
450
  });
545
451
  this._pluginsDiffer = new ListDiffer();
546
452
  this._prevChildren = children;
547
-
548
453
  this._bindEvents();
549
-
550
454
  this._checkPlugins();
551
-
552
455
  if (props.status) {
553
456
  flicking.setStatus(props.status);
554
457
  }
555
458
  };
556
-
557
459
  __proto.componentWillUnmount = function () {
558
460
  var _a;
559
-
560
461
  (_a = this._vanillaFlicking) === null || _a === void 0 ? void 0 : _a.destroy();
561
462
  };
562
-
563
463
  __proto.shouldComponentUpdate = function (nextProps) {
564
464
  var vanillaFlicking = this._vanillaFlicking;
565
465
  var prevProps = this.props;
566
466
  if (!vanillaFlicking || !vanillaFlicking.initialized) return false;
567
-
568
467
  var children = nextProps.children,
569
- restProps = __rest(nextProps, ["children"]);
570
-
468
+ restProps = __rest(nextProps, ["children"]);
571
469
  for (var key in restProps) {
572
470
  if (prevProps[key] !== nextProps[key]) {
573
471
  return true;
574
472
  }
575
473
  }
576
-
577
474
  var prevChildren = this._prevChildren;
578
-
579
475
  var nextChildren = this._getChildren(children);
580
-
581
476
  if (nextProps.renderOnSameKey || !this._hasSameChildren(prevChildren, nextChildren)) return true;
582
477
  return false;
583
478
  };
584
-
585
479
  __proto.beforeRender = function () {
586
480
  var vanillaFlicking = this._vanillaFlicking;
587
481
  var props = this.props;
588
- 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
589
484
  // Also, prevent updates when another update is already queued.
590
485
  // This usually happens when render() called twice without calling componentDidMount, like in the case of React.StrictMode.
591
-
592
486
  if (!vanillaFlicking || !vanillaFlicking.initialized || this._diffResult) return;
593
-
594
487
  var nextChildren = this._getChildren(props.children);
595
-
596
488
  if (props.renderOnSameKey || !this._hasSameChildren(prevChildren, nextChildren)) {
597
489
  this._panels = this._createPanelRefs(props, nextChildren);
598
490
  this._diffResult = this._jsxDiffer.update(nextChildren);
599
491
  this._prevChildren = nextChildren;
600
492
  }
601
493
  };
602
-
603
494
  __proto.componentDidUpdate = function () {
604
495
  var flicking = this._vanillaFlicking;
605
496
  var renderEmitter = this._renderEmitter;
606
497
  var diffResult = this._diffResult;
607
-
608
498
  this._checkPlugins();
609
-
610
499
  renderEmitter.trigger("render");
611
- flicking.camera.updateOffset(); // Omit 'virtual', as it can't have any setter
612
-
500
+ flicking.camera.updateOffset();
501
+ // Omit 'virtual', as it can't have any setter
613
502
  var _a = this.props;
614
- _a.virtual;
615
- var props = __rest(_a, ["virtual"]);
616
-
503
+ _a.virtual;
504
+ var props = __rest(_a, ["virtual"]);
617
505
  for (var key in props) {
618
506
  if (key in flicking && flicking[key] !== props[key]) {
619
507
  flicking[key] = props[key];
620
508
  }
621
509
  }
622
-
623
510
  if (!diffResult || !flicking.initialized) return;
624
511
  VanillaFlicking.sync(flicking, diffResult, this.reactPanels);
625
512
  this._diffResult = null;
626
513
  };
627
-
628
514
  __proto.render = function () {
629
515
  var _this = this;
630
-
631
516
  var _a, _b;
632
-
633
517
  var props = this.props;
634
518
  var Viewport = props.viewportTag;
635
519
  var Camera = props.cameraTag;
636
520
  var attributes = {};
637
521
  var flicking = this._vanillaFlicking;
638
522
  this.beforeRender();
639
-
640
523
  for (var name in props) {
641
524
  if (!(name in DEFAULT_PROPS) && !(name in VanillaFlicking.prototype)) {
642
525
  attributes[name] = props[name];
643
526
  }
644
527
  }
645
-
646
528
  var initialized = flicking && flicking.initialized;
647
529
  var viewportClasses = ["flicking-viewport"];
648
530
  var cameraClasses = ["flicking-camera"];
649
531
  var isHorizontal = flicking ? flicking.horizontal : (_a = props.horizontal) !== null && _a !== void 0 ? _a : true;
650
-
651
532
  if (!isHorizontal) {
652
533
  viewportClasses.push("vertical");
653
534
  }
654
-
655
535
  if (props.hideBeforeInit && !initialized) {
656
536
  viewportClasses.push("flicking-hidden");
657
537
  }
658
-
659
538
  if (attributes.className) {
660
539
  viewportClasses.push(attributes.className);
661
540
  }
662
-
663
541
  if (props.cameraClass) {
664
542
  cameraClasses.push(props.cameraClass);
665
543
  }
666
-
667
544
  var cameraProps = !initialized && props.firstPanelSize ? {
668
545
  style: {
669
546
  transform: VanillaFlicking.getDefaultCameraTransform(this.props.align, this.props.horizontal, this.props.firstPanelSize)
@@ -679,10 +556,8 @@ version: 4.10.8
679
556
  className: cameraClasses.join(" ")
680
557
  }, cameraProps), panels), this._getViewportSlot());
681
558
  };
682
-
683
559
  __proto._createPanelRefs = function (props, children) {
684
560
  var _a;
685
-
686
561
  var panelsPerView = (_a = props.panelsPerView) !== null && _a !== void 0 ? _a : -1;
687
562
  return panelsPerView > 0 && !!props.virtual ? VanillaFlicking.range(panelsPerView + 1).map(function () {
688
563
  return React.createRef();
@@ -690,10 +565,8 @@ version: 4.10.8
690
565
  return React.createRef();
691
566
  });
692
567
  };
693
-
694
568
  __proto._bindEvents = function () {
695
569
  var _this = this;
696
-
697
570
  var flicking = this._vanillaFlicking;
698
571
  Object.keys(VanillaFlicking.EVENTS).forEach(function (eventKey) {
699
572
  var eventName = VanillaFlicking.EVENTS[eventKey];
@@ -708,16 +581,13 @@ version: 4.10.8
708
581
  _this.forceUpdate();
709
582
  });
710
583
  };
711
-
712
584
  __proto._checkPlugins = function () {
713
585
  var flicking = this._vanillaFlicking;
714
-
715
586
  var _a = this._pluginsDiffer.update(this.props.plugins),
716
- list = _a.list,
717
- added = _a.added,
718
- removed = _a.removed,
719
- prevList = _a.prevList;
720
-
587
+ list = _a.list,
588
+ added = _a.added,
589
+ removed = _a.removed,
590
+ prevList = _a.prevList;
721
591
  flicking.addPlugins.apply(flicking, added.map(function (index) {
722
592
  return list[index];
723
593
  }));
@@ -725,12 +595,10 @@ version: 4.10.8
725
595
  return prevList[index];
726
596
  }));
727
597
  };
728
-
729
598
  __proto._hasSameChildren = function (prevChildren, nextChildren) {
730
599
  if (prevChildren.length !== nextChildren.length || prevChildren.length === 0) return false;
731
600
  var same = prevChildren.every(function (child, idx) {
732
601
  var nextChild = nextChildren[idx];
733
-
734
602
  if (child.key && nextChild.key) {
735
603
  return child.key === nextChild.key;
736
604
  } else {
@@ -739,40 +607,32 @@ version: 4.10.8
739
607
  });
740
608
  return same;
741
609
  };
742
-
743
610
  __proto._getChildren = function (children) {
744
611
  var _this = this;
745
-
746
612
  if (children === void 0) {
747
613
  children = this.props.children;
748
614
  }
749
-
750
615
  return React.Children.toArray(children).filter(function (child) {
751
616
  return child.type !== ViewportSlot;
752
617
  }).reduce(function (all, child) {
753
618
  return __spreadArray(__spreadArray([], all, true), _this._unpackFragment(child), true);
754
619
  }, []);
755
620
  };
756
-
757
621
  __proto._getViewportSlot = function () {
758
622
  return React.Children.toArray(this.props.children).filter(function (child) {
759
623
  return child.type === ViewportSlot;
760
624
  });
761
625
  };
762
-
763
626
  __proto._unpackFragment = function (child) {
764
627
  var _this = this;
765
-
766
628
  return this._isFragment(child) ? React.Children.toArray(child.props.children).reduce(function (allChilds, fragChild) {
767
629
  return __spreadArray(__spreadArray([], allChilds, true), _this._unpackFragment(fragChild), true);
768
630
  }, []) : [child];
769
631
  };
770
-
771
632
  __proto._getVirtualPanels = function () {
772
633
  var _this = this;
773
-
774
634
  var _a = this.props.virtual.panelClass,
775
- panelClass = _a === void 0 ? "flicking-panel" : _a;
635
+ panelClass = _a === void 0 ? "flicking-panel" : _a;
776
636
  var panelsPerView = this.props.panelsPerView;
777
637
  var flicking = this._vanillaFlicking;
778
638
  var initialized = flicking && flicking.initialized;
@@ -793,12 +653,9 @@ version: 4.10.8
793
653
  });
794
654
  });
795
655
  };
796
-
797
656
  __proto._getPanels = function () {
798
657
  var _this = this;
799
-
800
658
  var origChildren = this._getChildren();
801
-
802
659
  var vanillaFlicking = this._vanillaFlicking;
803
660
  var diffResult = this._diffResult;
804
661
  var children = vanillaFlicking && vanillaFlicking.initialized ? diffResult ? VanillaFlicking.getRenderingPanels(vanillaFlicking, diffResult) : VanillaFlicking.getRenderingPanels(vanillaFlicking, ListDiffer.diff(origChildren, origChildren)) : origChildren;
@@ -814,19 +671,14 @@ version: 4.10.8
814
671
  }, child);
815
672
  });
816
673
  };
817
-
818
674
  __proto._isFragment = function (child) {
819
675
  if (child.type) {
820
676
  return child.type === React.Fragment;
821
677
  }
822
-
823
678
  return child === React.Fragment;
824
679
  };
825
-
826
680
  Flicking.defaultProps = DEFAULT_PROPS;
827
-
828
681
  __decorate([VanillaFlicking.withFlickingMethods], Flicking.prototype, "_vanillaFlicking", void 0);
829
-
830
682
  return Flicking;
831
683
  }(React.Component);
832
684