framework7 7.0.0-beta.6 → 7.0.0

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.
Files changed (209) hide show
  1. package/components/accordion/accordion.lazy.js +1 -1
  2. package/components/actions/actions-class.js +6 -1
  3. package/components/actions/actions-rtl.css +1 -1
  4. package/components/actions/actions.css +1 -1
  5. package/components/actions/actions.d.ts +2 -0
  6. package/components/actions/actions.js +11 -2
  7. package/components/actions/actions.lazy.js +1 -1
  8. package/components/actions/actions.less +3 -0
  9. package/components/app/app-class.js +15 -9
  10. package/components/area-chart/area-chart-class.js +34 -18
  11. package/components/area-chart/area-chart.lazy.js +1 -1
  12. package/components/autocomplete/autocomplete-class.js +5 -1
  13. package/components/autocomplete/autocomplete.lazy.js +1 -1
  14. package/components/breadcrumbs/breadcrumbs-aurora.less +2 -0
  15. package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
  16. package/components/breadcrumbs/breadcrumbs-md.less +2 -0
  17. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
  18. package/components/breadcrumbs/breadcrumbs-vars.less +36 -0
  19. package/components/breadcrumbs/breadcrumbs.css +1 -0
  20. package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
  21. package/components/breadcrumbs/breadcrumbs.js +13 -0
  22. package/components/breadcrumbs/breadcrumbs.lazy.js +1 -0
  23. package/components/breadcrumbs/breadcrumbs.less +100 -0
  24. package/components/calendar/calendar-class.js +216 -124
  25. package/components/calendar/calendar-rtl.css +1 -1
  26. package/components/calendar/calendar-vars.less +6 -10
  27. package/components/calendar/calendar.css +1 -1
  28. package/components/calendar/calendar.d.ts +2 -0
  29. package/components/calendar/calendar.js +6 -1
  30. package/components/calendar/calendar.lazy.js +1 -1
  31. package/components/calendar/calendar.less +20 -16
  32. package/components/card/card.js +23 -3
  33. package/components/card/card.lazy.js +1 -1
  34. package/components/color-picker/color-picker-class.js +19 -3
  35. package/components/color-picker/color-picker.js +5 -1
  36. package/components/color-picker/color-picker.lazy.js +1 -1
  37. package/components/data-table/data-table-class.js +5 -1
  38. package/components/data-table/data-table.lazy.js +1 -1
  39. package/components/dialog/dialog.js +30 -6
  40. package/components/dialog/dialog.lazy.js +1 -1
  41. package/components/fab/fab-rtl.css +1 -1
  42. package/components/fab/fab.css +1 -1
  43. package/components/fab/fab.js +15 -3
  44. package/components/fab/fab.lazy.js +1 -1
  45. package/components/form/form.lazy.js +1 -1
  46. package/components/gauge/gauge-class.js +10 -2
  47. package/components/gauge/gauge.d.ts +2 -2
  48. package/components/gauge/gauge.lazy.js +1 -1
  49. package/components/input/input.js +5 -1
  50. package/components/input/input.lazy.js +1 -1
  51. package/components/list-index/list-index-class.js +5 -1
  52. package/components/list-index/list-index.d.ts +1 -1
  53. package/components/list-index/list-index.lazy.js +1 -1
  54. package/components/login-screen/login-screen.js +10 -2
  55. package/components/login-screen/login-screen.lazy.js +1 -1
  56. package/components/menu/menu.js +10 -2
  57. package/components/menu/menu.lazy.js +1 -1
  58. package/components/messagebar/messagebar-class.js +25 -5
  59. package/components/messagebar/messagebar.lazy.js +1 -1
  60. package/components/messages/messages-class.js +60 -24
  61. package/components/messages/messages-rtl.css +1 -1
  62. package/components/messages/messages.css +1 -1
  63. package/components/messages/messages.lazy.js +1 -1
  64. package/components/modal/modal-class.js +10 -0
  65. package/components/navbar/navbar.js +26 -2
  66. package/components/notification/notification.d.ts +4 -4
  67. package/components/panel/panel-class.js +35 -7
  68. package/components/panel/panel.js +40 -8
  69. package/components/panel/panel.lazy.js +1 -1
  70. package/components/photo-browser/photo-browser-class.js +42 -8
  71. package/components/photo-browser/photo-browser.lazy.js +1 -1
  72. package/components/picker/picker-class.js +11 -7
  73. package/components/picker/picker-column.js +34 -270
  74. package/components/picker/picker-rtl.css +1 -1
  75. package/components/picker/picker.css +1 -1
  76. package/components/picker/picker.d.ts +2 -13
  77. package/components/picker/picker.js +5 -6
  78. package/components/picker/picker.lazy.js +1 -1
  79. package/components/picker/picker.less +28 -10
  80. package/components/pie-chart/pie-chart-class.js +16 -7
  81. package/components/pie-chart/pie-chart.lazy.js +1 -1
  82. package/components/popover/popover-class.js +20 -3
  83. package/components/popover/popover-rtl.css +1 -1
  84. package/components/popover/popover.css +1 -1
  85. package/components/popover/popover.d.ts +2 -0
  86. package/components/popover/popover.js +11 -2
  87. package/components/popover/popover.lazy.js +1 -1
  88. package/components/popover/popover.less +3 -0
  89. package/components/popup/popup-class.js +6 -1
  90. package/components/popup/popup-rtl.css +1 -1
  91. package/components/popup/popup.css +1 -1
  92. package/components/popup/popup.d.ts +4 -0
  93. package/components/popup/popup.js +11 -2
  94. package/components/popup/popup.lazy.js +1 -1
  95. package/components/popup/popup.less +4 -0
  96. package/components/preloader/preloader-ios.less +3 -0
  97. package/components/preloader/preloader-rtl.css +1 -1
  98. package/components/preloader/preloader.css +1 -1
  99. package/components/preloader/preloader.d.ts +4 -0
  100. package/components/preloader/preloader.js +10 -2
  101. package/components/preloader/preloader.lazy.js +1 -1
  102. package/components/progressbar/progressbar-aurora.less +32 -13
  103. package/components/progressbar/progressbar-ios.less +19 -7
  104. package/components/progressbar/progressbar-md.less +64 -28
  105. package/components/progressbar/progressbar-rtl.css +1 -1
  106. package/components/progressbar/progressbar.css +1 -1
  107. package/components/progressbar/progressbar.js +17 -4
  108. package/components/progressbar/progressbar.lazy.js +1 -1
  109. package/components/progressbar/progressbar.less +16 -4
  110. package/components/pull-to-refresh/pull-to-refresh-class.js +5 -1
  111. package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
  112. package/components/range/range.d.ts +23 -5
  113. package/components/range/range.js +10 -2
  114. package/components/range/range.lazy.js +1 -1
  115. package/components/searchbar/searchbar-class.js +6 -2
  116. package/components/searchbar/searchbar.js +20 -4
  117. package/components/searchbar/searchbar.lazy.js +1 -1
  118. package/components/sheet/sheet-class.js +21 -2
  119. package/components/sheet/sheet-rtl.css +1 -1
  120. package/components/sheet/sheet.css +1 -1
  121. package/components/sheet/sheet.d.ts +2 -0
  122. package/components/sheet/sheet.js +11 -2
  123. package/components/sheet/sheet.lazy.js +1 -1
  124. package/components/sheet/sheet.less +3 -0
  125. package/components/smart-select/smart-select-class.js +15 -3
  126. package/components/smart-select/smart-select.lazy.js +1 -1
  127. package/components/sortable/sortable.d.ts +5 -1
  128. package/components/sortable/sortable.js +45 -8
  129. package/components/sortable/sortable.lazy.js +1 -1
  130. package/components/statusbar/statusbar.d.ts +9 -9
  131. package/components/statusbar/statusbar.js +5 -1
  132. package/components/stepper/stepper.js +10 -2
  133. package/components/stepper/stepper.lazy.js +1 -1
  134. package/components/swipeout/swipeout.js +16 -3
  135. package/components/swipeout/swipeout.lazy.js +1 -1
  136. package/components/swiper/swiper-rtl.css +1 -1
  137. package/components/swiper/swiper.css +1 -1
  138. package/components/swiper/swiper.lazy.js +1 -1
  139. package/components/tabs/tabs.js +14 -7
  140. package/components/tabs/tabs.lazy.js +1 -1
  141. package/components/toast/toast.d.ts +2 -2
  142. package/components/toggle/toggle-class.js +5 -1
  143. package/components/toggle/toggle.lazy.js +1 -1
  144. package/components/toolbar/toolbar-aurora.less +0 -13
  145. package/components/toolbar/toolbar-md.less +0 -13
  146. package/components/toolbar/toolbar.js +11 -3
  147. package/components/toolbar/toolbar.less +13 -0
  148. package/components/tooltip/tooltip-class.js +5 -1
  149. package/components/tooltip/tooltip.lazy.js +1 -1
  150. package/components/touch-ripple/touch-ripple.js +5 -1
  151. package/components/treeview/treeview.lazy.js +1 -1
  152. package/components/view/view-class.js +13 -2
  153. package/components/view/view.d.ts +5 -1
  154. package/components/view/view.js +2 -0
  155. package/components/virtual-list/virtual-list-class.js +54 -9
  156. package/components/virtual-list/virtual-list.d.ts +2 -2
  157. package/components/virtual-list/virtual-list.lazy.js +1 -1
  158. package/framework7-bundle-rtl.css +252 -150
  159. package/framework7-bundle-rtl.min.css +4 -4
  160. package/framework7-bundle.css +237 -134
  161. package/framework7-bundle.esm.js +5 -4
  162. package/framework7-bundle.js +2661 -1190
  163. package/framework7-bundle.js.map +1 -1
  164. package/framework7-bundle.less +4 -3
  165. package/framework7-bundle.min.css +4 -4
  166. package/framework7-bundle.min.js +4 -4
  167. package/framework7-bundle.min.js.map +1 -1
  168. package/framework7-lite-bundle.esm.js +5 -4
  169. package/framework7-lite.esm.js +3 -3
  170. package/framework7-rtl.css +12 -21
  171. package/framework7-rtl.min.css +4 -4
  172. package/framework7-types.d.ts +5 -1
  173. package/framework7.css +11 -19
  174. package/framework7.d.ts +4 -0
  175. package/framework7.esm.js +3 -3
  176. package/framework7.js +609 -189
  177. package/framework7.js.map +1 -1
  178. package/framework7.less +3 -3
  179. package/framework7.min.css +4 -4
  180. package/framework7.min.js +4 -4
  181. package/framework7.min.js.map +1 -1
  182. package/modules/component/$h.js +5 -1
  183. package/modules/component/$jsx.js +5 -1
  184. package/modules/component/component-class.js +35 -22
  185. package/modules/component/component.d.ts +2 -2
  186. package/modules/component/component.js +7 -6
  187. package/modules/component/eventslisteners.js +5 -1
  188. package/modules/component/snabbdom/h.js +1 -1
  189. package/modules/component/vdom.js +32 -17
  190. package/modules/device/device.js +1 -1
  191. package/modules/router/back.js +16 -6
  192. package/modules/router/component-loader.js +34 -23
  193. package/modules/router/modal.js +5 -1
  194. package/modules/router/navigate.js +19 -3
  195. package/modules/router/redirect.js +5 -1
  196. package/modules/router/router-class.js +39 -10
  197. package/modules/router/swipe-back.js +7 -6
  198. package/modules/router/tab.js +6 -2
  199. package/modules/store/create-store.js +10 -2
  200. package/package.json +12 -6
  201. package/shared/$jsx.js +6 -1
  202. package/shared/class.js +33 -5
  203. package/shared/constructor-methods.js +25 -4
  204. package/shared/events-class.js +15 -3
  205. package/shared/get-device.d.ts +0 -2
  206. package/shared/get-device.js +10 -6
  207. package/shared/modal-methods.js +10 -2
  208. package/shared/request.js +45 -7
  209. package/shared/utils.js +47 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework7",
3
- "version": "7.0.0-beta.6",
3
+ "version": "7.0.0",
4
4
  "description": "Full featured mobile HTML framework for building iOS & Android apps",
5
5
  "type": "module",
6
6
  "exports": {
@@ -16,6 +16,7 @@
16
16
  "./css/bundle": "./framework7-bundle.css",
17
17
  "./css/bundle/rtl": "./framework7-bundle-rtl.css",
18
18
  "./types": "./framework7-types.d.ts",
19
+ "./shared/*": "./shared/*",
19
20
  "./components/appbar": "./components/appbar/appbar.js",
20
21
  "./components/appbar/less": "./components/appbar/appbar.less",
21
22
  "./components/appbar/css": "./components/appbar/appbar.css",
@@ -235,7 +236,11 @@
235
236
  "./components/typography": "./components/typography/typography.js",
236
237
  "./components/typography/less": "./components/typography/typography.less",
237
238
  "./components/typography/css": "./components/typography/typography.css",
238
- "./components/typography/css/rtl": "./components/typography/typography-rtl.css"
239
+ "./components/typography/css/rtl": "./components/typography/typography-rtl.css",
240
+ "./components/breadcrumbs": "./components/breadcrumbs/breadcrumbs.js",
241
+ "./components/breadcrumbs/less": "./components/breadcrumbs/breadcrumbs.less",
242
+ "./components/breadcrumbs/css": "./components/breadcrumbs/breadcrumbs.css",
243
+ "./components/breadcrumbs/css/rtl": "./components/breadcrumbs/breadcrumbs-rtl.css"
239
244
  },
240
245
  "typings": "framework7.d.ts",
241
246
  "typesVersions": {
@@ -270,6 +275,7 @@
270
275
  "ipad",
271
276
  "apple",
272
277
  "phonegap",
278
+ "capacitor",
273
279
  "native",
274
280
  "touch",
275
281
  "appstore",
@@ -291,11 +297,11 @@
291
297
  "url": "https://www.patreon.com/framework7"
292
298
  },
293
299
  "dependencies": {
294
- "dom7": "^4.0.0",
300
+ "dom7": "^4.0.4",
295
301
  "htm": "^3.1.0",
296
302
  "path-to-regexp": "^6.2.0",
297
- "skeleton-elements": "^4.0.0-beta.2",
298
- "ssr-window": "^4.0.0",
299
- "swiper": "^7.0.8"
303
+ "skeleton-elements": "^4.0.0",
304
+ "ssr-window": "^4.0.2",
305
+ "swiper": "^8.1.0"
300
306
  }
301
307
  }
package/shared/$jsx.js CHANGED
@@ -1,6 +1,11 @@
1
1
  /* eslint-disable prefer-rest-params */
2
- const $jsx = (tag, props, ...args) => {
2
+ const $jsx = function (tag, props) {
3
3
  const attrs = props || {};
4
+
5
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
6
+ args[_key - 2] = arguments[_key];
7
+ }
8
+
4
9
  const children = args || [];
5
10
  const attrsString = Object.keys(attrs).map(attr => {
6
11
  if (attr[0] === '_') {
package/shared/class.js CHANGED
@@ -2,7 +2,15 @@ import { extend, now } from './utils.js';
2
2
  import EventsClass from './events-class.js';
3
3
 
4
4
  class Framework7Class extends EventsClass {
5
- constructor(params = {}, parents = []) {
5
+ constructor(params, parents) {
6
+ if (params === void 0) {
7
+ params = {};
8
+ }
9
+
10
+ if (parents === void 0) {
11
+ parents = [];
12
+ }
13
+
6
14
  super(parents);
7
15
  const self = this;
8
16
  self.params = params;
@@ -41,7 +49,15 @@ class Framework7Class extends EventsClass {
41
49
  });
42
50
  }
43
51
 
44
- useModule(moduleName = '', moduleParams = {}) {
52
+ useModule(moduleName, moduleParams) {
53
+ if (moduleName === void 0) {
54
+ moduleName = '';
55
+ }
56
+
57
+ if (moduleParams === void 0) {
58
+ moduleParams = {};
59
+ }
60
+
45
61
  const instance = this;
46
62
  if (!instance.modules) return;
47
63
  const module = typeof moduleName === 'string' ? instance.modules[moduleName] : moduleName;
@@ -85,7 +101,11 @@ class Framework7Class extends EventsClass {
85
101
  }
86
102
  }
87
103
 
88
- useModules(modulesParams = {}) {
104
+ useModules(modulesParams) {
105
+ if (modulesParams === void 0) {
106
+ modulesParams = {};
107
+ }
108
+
89
109
  const instance = this;
90
110
  if (!instance.modules) return;
91
111
  Object.keys(instance.modules).forEach(moduleName => {
@@ -100,7 +120,7 @@ class Framework7Class extends EventsClass {
100
120
  Class.use(components);
101
121
  }
102
122
 
103
- static installModule(module, ...params) {
123
+ static installModule(module) {
104
124
  const Class = this;
105
125
  if (!Class.prototype.modules) Class.prototype.modules = {};
106
126
  const name = module.name || `${Object.keys(Class.prototype.modules).length}_${now()}`;
@@ -121,13 +141,17 @@ class Framework7Class extends EventsClass {
121
141
 
122
142
 
123
143
  if (module.install) {
144
+ for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
145
+ params[_key - 1] = arguments[_key];
146
+ }
147
+
124
148
  module.install.apply(Class, params);
125
149
  }
126
150
 
127
151
  return Class;
128
152
  }
129
153
 
130
- static use(module, ...params) {
154
+ static use(module) {
131
155
  const Class = this;
132
156
 
133
157
  if (Array.isArray(module)) {
@@ -135,6 +159,10 @@ class Framework7Class extends EventsClass {
135
159
  return Class;
136
160
  }
137
161
 
162
+ for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
163
+ params[_key2 - 1] = arguments[_key2];
164
+ }
165
+
138
166
  return Class.installModule(module, ...params);
139
167
  }
140
168
 
@@ -1,5 +1,9 @@
1
1
  import $ from './dom7.js';
2
- export default function ConstructorMethods(parameters = {}) {
2
+ export default function ConstructorMethods(parameters) {
3
+ if (parameters === void 0) {
4
+ parameters = {};
5
+ }
6
+
3
7
  const {
4
8
  defaultSelector,
5
9
  constructor: Constructor,
@@ -8,12 +12,20 @@ export default function ConstructorMethods(parameters = {}) {
8
12
  addMethods
9
13
  } = parameters;
10
14
  const methods = {
11
- create(...args) {
15
+ create() {
16
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
17
+ args[_key] = arguments[_key];
18
+ }
19
+
12
20
  if (app) return new Constructor(app, ...args);
13
21
  return new Constructor(...args);
14
22
  },
15
23
 
16
- get(el = defaultSelector) {
24
+ get(el) {
25
+ if (el === void 0) {
26
+ el = defaultSelector;
27
+ }
28
+
17
29
  if (el instanceof Constructor) return el;
18
30
  const $el = $(el);
19
31
  if ($el.length === 0) return undefined;
@@ -30,8 +42,17 @@ export default function ConstructorMethods(parameters = {}) {
30
42
 
31
43
  if (addMethods && Array.isArray(addMethods)) {
32
44
  addMethods.forEach(methodName => {
33
- methods[methodName] = (el = defaultSelector, ...args) => {
45
+ methods[methodName] = function (el) {
46
+ if (el === void 0) {
47
+ el = defaultSelector;
48
+ }
49
+
34
50
  const instance = methods.get(el);
51
+
52
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
53
+ args[_key2 - 1] = arguments[_key2];
54
+ }
55
+
35
56
  if (instance && instance[methodName]) return instance[methodName](...args);
36
57
  return undefined;
37
58
  };
@@ -1,5 +1,9 @@
1
1
  class EventsClass {
2
- constructor(parents = []) {
2
+ constructor(parents) {
3
+ if (parents === void 0) {
4
+ parents = [];
5
+ }
6
+
3
7
  const self = this;
4
8
  self.eventsParents = parents;
5
9
  self.eventsListeners = {};
@@ -20,13 +24,17 @@ class EventsClass {
20
24
  const self = this;
21
25
  if (typeof handler !== 'function') return self;
22
26
 
23
- function onceHandler(...args) {
27
+ function onceHandler() {
24
28
  self.off(events, onceHandler);
25
29
 
26
30
  if (onceHandler.f7proxy) {
27
31
  delete onceHandler.f7proxy;
28
32
  }
29
33
 
34
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
+ args[_key] = arguments[_key];
36
+ }
37
+
30
38
  handler.apply(self, args);
31
39
  }
32
40
 
@@ -51,7 +59,7 @@ class EventsClass {
51
59
  return self;
52
60
  }
53
61
 
54
- emit(...args) {
62
+ emit() {
55
63
  const self = this;
56
64
  if (!self.eventsListeners) return self;
57
65
  let events;
@@ -59,6 +67,10 @@ class EventsClass {
59
67
  let context;
60
68
  let eventsParents;
61
69
 
70
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
71
+ args[_key2] = arguments[_key2];
72
+ }
73
+
62
74
  if (typeof args[0] === 'string' || Array.isArray(args[0])) {
63
75
  events = args[0];
64
76
  data = args.slice(1, args.length);
@@ -31,8 +31,6 @@ export interface Device {
31
31
  electron: boolean;
32
32
  /** true when app is running under NW.js environment */
33
33
  nwjs: boolean;
34
- /** true when app running in cordova environment */
35
- phonegap: boolean;
36
34
  /** true if app runs in web view - webapp installed to home screen */
37
35
  webView: boolean;
38
36
  /** true if app runs in web view - webapp installed to home screen */
@@ -2,9 +2,10 @@ import { getWindow } from 'ssr-window';
2
2
  import { getSupport } from './get-support.js';
3
3
  let deviceCalculated;
4
4
 
5
- function calcDevice({
6
- userAgent
7
- } = {}) {
5
+ function calcDevice(_temp) {
6
+ let {
7
+ userAgent
8
+ } = _temp === void 0 ? {} : _temp;
8
9
  const support = getSupport();
9
10
  const window = getWindow();
10
11
  const platform = window.navigator.platform;
@@ -22,8 +23,7 @@ function calcDevice({
22
23
  firefox: false,
23
24
  macos: false,
24
25
  windows: false,
25
- cordova: !!(window.cordova || window.phonegap),
26
- phonegap: !!(window.cordova || window.phonegap),
26
+ cordova: !!window.cordova,
27
27
  electron: false,
28
28
  capacitor: !!window.Capacitor,
29
29
  nwjs: false
@@ -136,7 +136,11 @@ function calcDevice({
136
136
  return device;
137
137
  }
138
138
 
139
- function getDevice(overrides = {}, reset) {
139
+ function getDevice(overrides, reset) {
140
+ if (overrides === void 0) {
141
+ overrides = {};
142
+ }
143
+
140
144
  if (!deviceCalculated || reset) {
141
145
  deviceCalculated = calcDevice(overrides);
142
146
  }
@@ -1,7 +1,11 @@
1
1
  import $ from './dom7.js';
2
2
  import { extend } from './utils.js';
3
3
  import ConstructorMethods from './constructor-methods.js';
4
- export default function ModalMethods(parameters = {}) {
4
+ export default function ModalMethods(parameters) {
5
+ if (parameters === void 0) {
6
+ parameters = {};
7
+ }
8
+
5
9
  const {
6
10
  defaultSelector,
7
11
  constructor: Constructor,
@@ -49,7 +53,11 @@ export default function ModalMethods(parameters = {}) {
49
53
  return instance.open(animate);
50
54
  },
51
55
 
52
- close(el = defaultSelector, animate, targetEl) {
56
+ close(el, animate, targetEl) {
57
+ if (el === void 0) {
58
+ el = defaultSelector;
59
+ }
60
+
53
61
  let $el = $(el);
54
62
  if (!$el.length) return undefined;
55
63
 
package/shared/request.js CHANGED
@@ -59,7 +59,7 @@ const request = requestOptions => new Promise((resolve, reject) => {
59
59
  } // Function to run XHR callbacks and events
60
60
 
61
61
 
62
- function fireCallback(callbackName, ...data) {
62
+ function fireCallback(callbackName) {
63
63
  /*
64
64
  Callbacks:
65
65
  beforeCreate (options),
@@ -73,6 +73,10 @@ const request = requestOptions => new Promise((resolve, reject) => {
73
73
  let globalCallbackValue;
74
74
  let optionCallbackValue;
75
75
 
76
+ for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
77
+ data[_key - 1] = arguments[_key];
78
+ }
79
+
76
80
  if (globals[callbackName]) {
77
81
  globalCallbackValue = globals[callbackName](...data);
78
82
  }
@@ -402,9 +406,13 @@ const request = requestOptions => new Promise((resolve, reject) => {
402
406
  xhr.send(postData);
403
407
  });
404
408
 
405
- function requestShortcut(method, ...args) {
409
+ function requestShortcut(method) {
406
410
  let [url, data, success, error, dataType] = [];
407
411
 
412
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
413
+ args[_key2 - 1] = arguments[_key2];
414
+ }
415
+
408
416
  if (typeof args[1] === 'function') {
409
417
  [url, success, error, dataType] = args;
410
418
  } else {
@@ -440,11 +448,41 @@ function requestShortcut(method, ...args) {
440
448
  }
441
449
 
442
450
  Object.assign(request, {
443
- get: (...args) => requestShortcut('get', ...args),
444
- post: (...args) => requestShortcut('post', ...args),
445
- json: (...args) => requestShortcut('json', ...args),
446
- getJSON: (...args) => requestShortcut('json', ...args),
447
- postJSON: (...args) => requestShortcut('postJSON', ...args)
451
+ get: function () {
452
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
453
+ args[_key3] = arguments[_key3];
454
+ }
455
+
456
+ return requestShortcut('get', ...args);
457
+ },
458
+ post: function () {
459
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
460
+ args[_key4] = arguments[_key4];
461
+ }
462
+
463
+ return requestShortcut('post', ...args);
464
+ },
465
+ json: function () {
466
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
467
+ args[_key5] = arguments[_key5];
468
+ }
469
+
470
+ return requestShortcut('json', ...args);
471
+ },
472
+ getJSON: function () {
473
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
474
+ args[_key6] = arguments[_key6];
475
+ }
476
+
477
+ return requestShortcut('json', ...args);
478
+ },
479
+ postJSON: function () {
480
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
481
+ args[_key7] = arguments[_key7];
482
+ }
483
+
484
+ return requestShortcut('postJSON', ...args);
485
+ }
448
486
  });
449
487
 
450
488
  request.abortController = () => {
package/shared/utils.js CHANGED
@@ -4,7 +4,15 @@ export function uniqueNumber() {
4
4
  uniqueNum += 1;
5
5
  return uniqueNum;
6
6
  }
7
- export function id(mask = 'xxxxxxxxxx', map = '0123456789abcdef') {
7
+ export function id(mask, map) {
8
+ if (mask === void 0) {
9
+ mask = 'xxxxxxxxxx';
10
+ }
11
+
12
+ if (map === void 0) {
13
+ map = '0123456789abcdef';
14
+ }
15
+
8
16
  const length = map.length;
9
17
  return mask.replace(/x/g, () => map[Math.floor(Math.random() * length)]);
10
18
  }
@@ -58,7 +66,11 @@ export function cancelAnimationFrame(frameId) {
58
66
  const window = getWindow();
59
67
  return window.cancelAnimationFrame(frameId);
60
68
  }
61
- export function nextTick(callback, delay = 0) {
69
+ export function nextTick(callback, delay) {
70
+ if (delay === void 0) {
71
+ delay = 0;
72
+ }
73
+
62
74
  return setTimeout(callback, delay);
63
75
  }
64
76
  export function nextFrame(callback) {
@@ -91,7 +103,11 @@ export function parseUrlQuery(url) {
91
103
 
92
104
  return query;
93
105
  }
94
- export function getTranslate(el, axis = 'x') {
106
+ export function getTranslate(el, axis) {
107
+ if (axis === void 0) {
108
+ axis = 'x';
109
+ }
110
+
95
111
  const window = getWindow();
96
112
  let matrix;
97
113
  let curTransform;
@@ -117,19 +133,23 @@ export function getTranslate(el, axis = 'x') {
117
133
  // Latest Chrome and webkits Fix
118
134
  if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix
119
135
  else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers
120
- else curTransform = parseFloat(matrix[4]);
136
+ else curTransform = parseFloat(matrix[4]);
121
137
  }
122
138
 
123
139
  if (axis === 'y') {
124
140
  // Latest Chrome and webkits Fix
125
141
  if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix
126
142
  else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers
127
- else curTransform = parseFloat(matrix[5]);
143
+ else curTransform = parseFloat(matrix[5]);
128
144
  }
129
145
 
130
146
  return curTransform || 0;
131
147
  }
132
- export function serializeObject(obj, parents = []) {
148
+ export function serializeObject(obj, parents) {
149
+ if (parents === void 0) {
150
+ parents = [];
151
+ }
152
+
133
153
  if (typeof obj === 'string') return obj;
134
154
  const resultArray = [];
135
155
  const separator = '&';
@@ -189,7 +209,11 @@ export function serializeObject(obj, parents = []) {
189
209
  export function isObject(o) {
190
210
  return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
191
211
  }
192
- export function merge(...args) {
212
+ export function merge() {
213
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
214
+ args[_key] = arguments[_key];
215
+ }
216
+
193
217
  const to = args[0];
194
218
  args.splice(0, 1);
195
219
  const from = args;
@@ -213,11 +237,15 @@ export function merge(...args) {
213
237
 
214
238
  return to;
215
239
  }
216
- export function extend(...args) {
240
+ export function extend() {
217
241
  let deep = true;
218
242
  let to;
219
243
  let from;
220
244
 
245
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
246
+ args[_key2] = arguments[_key2];
247
+ }
248
+
221
249
  if (typeof args[0] === 'boolean') {
222
250
  deep = args[0];
223
251
  to = args[1];
@@ -330,10 +358,14 @@ export function colorHslToHsb(h, s, l) {
330
358
  HSB.s = HSL.l > 0 ? 2 * t / HSB.b : HSB.s;
331
359
  return [HSB.h, HSB.s, HSB.b];
332
360
  }
333
- export function colorThemeCSSProperties(...args) {
361
+ export function colorThemeCSSProperties() {
334
362
  let hex;
335
363
  let rgb;
336
364
 
365
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
366
+ args[_key3] = arguments[_key3];
367
+ }
368
+
337
369
  if (args.length === 1) {
338
370
  hex = args[0];
339
371
  rgb = colorHexToRgb(hex);
@@ -368,8 +400,13 @@ export function bindMethods(instance, obj) {
368
400
  instance[key] = obj[key];
369
401
  });
370
402
  }
371
- export function flattenArray(...args) {
403
+ export function flattenArray() {
372
404
  const arr = [];
405
+
406
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
407
+ args[_key4] = arguments[_key4];
408
+ }
409
+
373
410
  args.forEach(arg => {
374
411
  if (Array.isArray(arg)) arr.push(...flattenArray(...arg));else arr.push(arg);
375
412
  });