Browse code

Refactor and rewrite as contao bundle

Benjamin Roth authored on04/11/2022 22:32:32
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,41 +0,0 @@
1
-"use strict";
2
-
3
-exports.__esModule = true;
4
-exports.getChildren = getChildren;
5
-
6
-var _react = _interopRequireDefault(require("react"));
7
-
8
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
-
10
-function getChildren(children) {
11
-  var slides = [];
12
-  var slots = {
13
-    'container-start': [],
14
-    'container-end': [],
15
-    'wrapper-start': [],
16
-    'wrapper-end': []
17
-  };
18
-
19
-  function processChildren(c) {
20
-    _react.default.Children.toArray(c).forEach(function (child) {
21
-      if (child.type === _react.default.Fragment && child.props.children) {
22
-        processChildren(child.props.children);
23
-        return;
24
-      }
25
-
26
-      if (child.type && child.type.displayName === 'SwiperSlide') {
27
-        slides.push(child);
28
-      } else if (child.props && child.props.slot && slots[child.props.slot]) {
29
-        slots[child.props.slot].push(child);
30
-      } else {
31
-        slots['container-end'].push(child);
32
-      }
33
-    });
34
-  }
35
-
36
-  processChildren(children);
37
-  return {
38
-    slides: slides,
39
-    slots: slots
40
-  };
41
-}
42 0
\ No newline at end of file
Browse code

swiper.js version 6.3.3

Benjamin Roth authored on13/10/2020 19:31:56
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+"use strict";
2
+
3
+exports.__esModule = true;
4
+exports.getChildren = getChildren;
5
+
6
+var _react = _interopRequireDefault(require("react"));
7
+
8
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+
10
+function getChildren(children) {
11
+  var slides = [];
12
+  var slots = {
13
+    'container-start': [],
14
+    'container-end': [],
15
+    'wrapper-start': [],
16
+    'wrapper-end': []
17
+  };
18
+
19
+  function processChildren(c) {
20
+    _react.default.Children.toArray(c).forEach(function (child) {
21
+      if (child.type === _react.default.Fragment && child.props.children) {
22
+        processChildren(child.props.children);
23
+        return;
24
+      }
25
+
26
+      if (child.type && child.type.displayName === 'SwiperSlide') {
27
+        slides.push(child);
28
+      } else if (child.props && child.props.slot && slots[child.props.slot]) {
29
+        slots[child.props.slot].push(child);
30
+      } else {
31
+        slots['container-end'].push(child);
32
+      }
33
+    });
34
+  }
35
+
36
+  processChildren(children);
37
+  return {
38
+    slides: slides,
39
+    slots: slots
40
+  };
41
+}
0 42
\ No newline at end of file