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
@@ -2,7 +2,11 @@ import htm from 'htm';
2
2
  import { flattenArray } from '../../shared/utils.js';
3
3
  const ignoreChildren = [false, null, '', undefined];
4
4
 
5
- const h = (type, props, ...children) => {
5
+ const h = function (type, props) {
6
+ for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
7
+ children[_key - 2] = arguments[_key];
8
+ }
9
+
6
10
  return {
7
11
  type,
8
12
  props: props || {},
@@ -1,7 +1,11 @@
1
1
  import { flattenArray } from '../../shared/utils.js';
2
2
  const ignoreChildren = [false, null, '', undefined];
3
3
 
4
- const $jsx = (type, props, ...children) => {
4
+ const $jsx = function (type, props) {
5
+ for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
6
+ children[_key - 2] = arguments[_key];
7
+ }
8
+
5
9
  const flatChildren = flattenArray((children || []).filter(child => ignoreChildren.indexOf(child) < 0));
6
10
 
7
11
  if (type === 'Fragment') {
@@ -7,11 +7,16 @@ import vdom from './vdom.js';
7
7
  import patch from './patch.js';
8
8
 
9
9
  class Component {
10
- constructor(app, component, props = {}, {
11
- el,
12
- context,
13
- children
14
- } = {}) {
10
+ constructor(app, component, props, _temp) {
11
+ if (props === void 0) {
12
+ props = {};
13
+ }
14
+
15
+ let {
16
+ el,
17
+ context,
18
+ children
19
+ } = _temp === void 0 ? {} : _temp;
15
20
  const document = getDocument();
16
21
  merge(this, {
17
22
  f7: app,
@@ -219,17 +224,19 @@ class Component {
219
224
  } = this;
220
225
  if (!this.__eventHandlers) return;
221
226
 
222
- this.__eventHandlers.forEach(({
223
- eventName,
224
- handler
225
- }) => {
227
+ this.__eventHandlers.forEach(_ref => {
228
+ let {
229
+ eventName,
230
+ handler
231
+ } = _ref;
226
232
  $el.on(eventNameToColonCase(eventName), handler);
227
233
  });
228
234
 
229
- this.__onceEventHandlers.forEach(({
230
- eventName,
231
- handler
232
- }) => {
235
+ this.__onceEventHandlers.forEach(_ref2 => {
236
+ let {
237
+ eventName,
238
+ handler
239
+ } = _ref2;
233
240
  $el.once(eventNameToColonCase(eventName), handler);
234
241
  });
235
242
  }
@@ -240,17 +247,19 @@ class Component {
240
247
  } = this;
241
248
  if (!this.__eventHandlers) return;
242
249
 
243
- this.__eventHandlers.forEach(({
244
- eventName,
245
- handler
246
- }) => {
250
+ this.__eventHandlers.forEach(_ref3 => {
251
+ let {
252
+ eventName,
253
+ handler
254
+ } = _ref3;
247
255
  $el.on(eventNameToColonCase(eventName), handler);
248
256
  });
249
257
 
250
- this.__onceEventHandlers.forEach(({
251
- eventName,
252
- handler
253
- }) => {
258
+ this.__onceEventHandlers.forEach(_ref4 => {
259
+ let {
260
+ eventName,
261
+ handler
262
+ } = _ref4;
254
263
  $el.once(eventNameToColonCase(eventName), handler);
255
264
  });
256
265
  }
@@ -370,7 +379,11 @@ class Component {
370
379
  this.__destroyed = true;
371
380
  }
372
381
 
373
- hook(name, ...args) {
382
+ hook(name) {
383
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
384
+ args[_key - 1] = arguments[_key];
385
+ }
386
+
374
387
  if (this.__destroyed) return;
375
388
  this[`__${name}`].forEach(handler => {
376
389
  handler(...args);
@@ -46,9 +46,9 @@ export interface ComponentContext {
46
46
  /** Render function */
47
47
  $render: ComponentRender;
48
48
  /** Attach event handler to component root DOM element */
49
- $on: (eventName, handler: () => void) => void;
49
+ $on: (eventName: string, handler: () => void) => void;
50
50
  /** Attach event handler to component root DOM element that will be executed only once */
51
- $once: (eventName, handler: () => void) => void;
51
+ $once: (eventName: string, handler: () => void) => void;
52
52
  /** Hook called right before component will be added to DOM */
53
53
  $onBeforeMount: (callback: () => void) => void;
54
54
  /** Hook called right after component has been added to DOM */
@@ -30,12 +30,13 @@ export default {
30
30
  return parseComponent(componentString);
31
31
  },
32
32
 
33
- create(component, props, {
34
- root,
35
- el,
36
- context,
37
- children
38
- }) {
33
+ create(component, props, _ref) {
34
+ let {
35
+ root,
36
+ el,
37
+ context,
38
+ children
39
+ } = _ref;
39
40
  return new Component(app, component, props, {
40
41
  root,
41
42
  el,
@@ -17,7 +17,11 @@ function handleEvent(event, args, vnode) {
17
17
  }
18
18
 
19
19
  function createListener() {
20
- return function handler(event, ...args) {
20
+ return function handler(event) {
21
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
22
+ args[_key - 1] = arguments[_key];
23
+ }
24
+
21
25
  handleEvent(event, args, handler.vnode);
22
26
  };
23
27
  }
@@ -1,5 +1,5 @@
1
1
  import { vnode } from './vnode.js';
2
- import * as is from './is';
2
+ import * as is from './is.js';
3
3
 
4
4
  function addNS(data, children, sel) {
5
5
  data.ns = 'http://www.w3.org/2000/svg';
@@ -19,9 +19,18 @@ const toCamelCase = name => {
19
19
  }).join('');
20
20
  };
21
21
 
22
- const propsFromAttrs = (...args) => {
22
+ const propsFromAttrs = function () {
23
23
  const context = {};
24
- args.forEach((obj = {}) => {
24
+
25
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
+ args[_key] = arguments[_key];
27
+ }
28
+
29
+ args.forEach(function (obj) {
30
+ if (obj === void 0) {
31
+ obj = {};
32
+ }
33
+
25
34
  Object.keys(obj).forEach(key => {
26
35
  context[toCamelCase(key)] = obj[key];
27
36
  });
@@ -29,12 +38,13 @@ const propsFromAttrs = (...args) => {
29
38
  return context;
30
39
  };
31
40
 
32
- const createCustomComponent = ({
33
- f7,
34
- treeNode,
35
- vnode,
36
- data
37
- }) => {
41
+ const createCustomComponent = _ref => {
42
+ let {
43
+ f7,
44
+ treeNode,
45
+ vnode,
46
+ data
47
+ } = _ref;
38
48
  const component = typeof treeNode.type === 'function' ? treeNode.type : customComponents[treeNode.type];
39
49
  f7.component.create(component, propsFromAttrs(data.attrs || {}, data.props || {}), {
40
50
  el: vnode.elm,
@@ -178,20 +188,21 @@ function getHooks(treeNode, data, f7, initial, isRoot) {
178
188
  return hooks;
179
189
  }
180
190
 
181
- const getEventHandler = (eventHandler, {
182
- stop,
183
- prevent,
184
- once
185
- } = {}) => {
191
+ const getEventHandler = function (eventHandler, _temp) {
192
+ let {
193
+ stop,
194
+ prevent,
195
+ once
196
+ } = _temp === void 0 ? {} : _temp;
186
197
  let fired = false;
187
198
 
188
- function handler(...args) {
189
- const e = args[0];
199
+ function handler() {
200
+ const e = arguments.length <= 0 ? undefined : arguments[0];
190
201
  if (once && fired) return;
191
202
  if (stop) e.stopPropagation();
192
203
  if (prevent) e.preventDefault();
193
204
  fired = true;
194
- eventHandler(...args);
205
+ eventHandler(...arguments);
195
206
  }
196
207
 
197
208
  return handler;
@@ -357,6 +368,10 @@ const treeNodeToVNode = (treeNode, component, f7, initial, isRoot) => {
357
368
  return h(getTagName(treeNode), data, children);
358
369
  };
359
370
 
360
- export default function vdom(tree = {}, component, initial) {
371
+ export default function vdom(tree, component, initial) {
372
+ if (tree === void 0) {
373
+ tree = {};
374
+ }
375
+
361
376
  return treeNodeToVNode(tree, component, component.f7, initial, true);
362
377
  }
@@ -31,7 +31,7 @@ export default {
31
31
  }
32
32
  }
33
33
 
34
- if (device.cordova || device.phonegap) {
34
+ if (device.cordova) {
35
35
  classNames.push('device-cordova');
36
36
  }
37
37
 
@@ -14,7 +14,7 @@ function backward(router, el, backwardOptions) {
14
14
  const $el = $(el);
15
15
  const app = router.app;
16
16
  const view = router.view;
17
- const options = extend({
17
+ const options = extend(false, {
18
18
  animate: router.params.animate,
19
19
  browserHistory: true,
20
20
  replaceState: false
@@ -558,7 +558,7 @@ function loadBack(router, backParams, backOptions, ignorePageChange) {
558
558
  return router;
559
559
  }
560
560
 
561
- function back(...args) {
561
+ function back() {
562
562
  const router = this;
563
563
  const device = getDevice();
564
564
  if (router.swipeBackActive) return router;
@@ -566,11 +566,11 @@ function back(...args) {
566
566
  let navigateOptions;
567
567
  let route;
568
568
 
569
- if (typeof args[0] === 'object') {
570
- navigateOptions = args[0] || {};
569
+ if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {
570
+ navigateOptions = (arguments.length <= 0 ? undefined : arguments[0]) || {};
571
571
  } else {
572
- navigateUrl = args[0];
573
- navigateOptions = args[1] || {};
572
+ navigateUrl = arguments.length <= 0 ? undefined : arguments[0];
573
+ navigateOptions = (arguments.length <= 1 ? undefined : arguments[1]) || {};
574
574
  }
575
575
 
576
576
  const {
@@ -722,6 +722,16 @@ function back(...args) {
722
722
  }
723
723
 
724
724
  const previousPageRoute = $previousPage[0].f7Page.route;
725
+
726
+ if (navigateOptions.preload && $previousPage.hasClass('stacked')) {
727
+ loadBack(router, {
728
+ el: $previousPage
729
+ }, extend(navigateOptions, {
730
+ route: previousPageRoute
731
+ }));
732
+ return router;
733
+ }
734
+
725
735
  processRouteQueue.call(router, previousPageRoute, router.currentRoute, () => {
726
736
  loadBack(router, {
727
737
  el: $previousPage
@@ -48,7 +48,11 @@ export default {
48
48
  return router.navigate(navigateOptions);
49
49
  },
50
50
 
51
- componentLoader(component, componentUrl, options = {}, resolve, reject) {
51
+ componentLoader(component, componentUrl, options, resolve, reject) {
52
+ if (options === void 0) {
53
+ options = {};
54
+ }
55
+
52
56
  const router = this;
53
57
  const {
54
58
  app
@@ -131,41 +135,48 @@ export default {
131
135
  }
132
136
  },
133
137
 
134
- modalComponentLoader({
135
- component,
136
- componentUrl,
137
- options,
138
- resolve,
139
- reject
140
- } = {}) {
138
+ modalComponentLoader(_temp) {
139
+ let {
140
+ component,
141
+ componentUrl,
142
+ options,
143
+ resolve,
144
+ reject
145
+ } = _temp === void 0 ? {} : _temp;
141
146
  const router = this;
142
147
  router.componentLoader(component, componentUrl, options, el => {
143
148
  resolve(el);
144
149
  }, reject);
145
150
  },
146
151
 
147
- tabComponentLoader({
148
- component,
149
- componentUrl,
150
- options,
151
- resolve,
152
- reject
153
- } = {}) {
152
+ tabComponentLoader(_temp2) {
153
+ let {
154
+ component,
155
+ componentUrl,
156
+ options,
157
+ resolve,
158
+ reject
159
+ } = _temp2 === void 0 ? {} : _temp2;
154
160
  const router = this;
155
161
  router.componentLoader(component, componentUrl, options, el => {
156
162
  resolve(el);
157
163
  }, reject);
158
164
  },
159
165
 
160
- pageComponentLoader({
161
- component,
162
- componentUrl,
163
- options,
164
- resolve,
165
- reject
166
- } = {}) {
166
+ pageComponentLoader(_temp3) {
167
+ let {
168
+ component,
169
+ componentUrl,
170
+ options,
171
+ resolve,
172
+ reject
173
+ } = _temp3 === void 0 ? {} : _temp3;
167
174
  const router = this;
168
- router.componentLoader(component, componentUrl, options, (el, newOptions = {}) => {
175
+ router.componentLoader(component, componentUrl, options, function (el, newOptions) {
176
+ if (newOptions === void 0) {
177
+ newOptions = {};
178
+ }
179
+
169
180
  resolve(el, newOptions);
170
181
  }, reject);
171
182
  }
@@ -2,7 +2,11 @@ import { extend, nextTick } from '../../shared/utils.js';
2
2
  import History from '../../shared/history.js';
3
3
  import asyncComponent from './async-component.js';
4
4
 
5
- function modalLoad(modalType, route, loadOptions = {}, direction) {
5
+ function modalLoad(modalType, route, loadOptions, direction) {
6
+ if (loadOptions === void 0) {
7
+ loadOptions = {};
8
+ }
9
+
6
10
  const router = this;
7
11
  const app = router.app;
8
12
  const isPanel = modalType === 'panel';
@@ -16,7 +16,11 @@ function refreshPage() {
16
16
  });
17
17
  }
18
18
 
19
- function forward(router, el, forwardOptions = {}) {
19
+ function forward(router, el, forwardOptions) {
20
+ if (forwardOptions === void 0) {
21
+ forwardOptions = {};
22
+ }
23
+
20
24
  const document = getDocument();
21
25
  const $el = $(el);
22
26
  const app = router.app;
@@ -615,7 +619,15 @@ function forward(router, el, forwardOptions = {}) {
615
619
  return router;
616
620
  }
617
621
 
618
- function load(router, loadParams = {}, loadOptions = {}, ignorePageChange) {
622
+ function load(router, loadParams, loadOptions, ignorePageChange) {
623
+ if (loadParams === void 0) {
624
+ loadParams = {};
625
+ }
626
+
627
+ if (loadOptions === void 0) {
628
+ loadOptions = {};
629
+ }
630
+
619
631
  if (!router.allowPageChange && !ignorePageChange) return router;
620
632
  const params = loadParams;
621
633
  const options = loadOptions;
@@ -730,7 +742,11 @@ function load(router, loadParams = {}, loadOptions = {}, ignorePageChange) {
730
742
  return router;
731
743
  }
732
744
 
733
- function navigate(navigateParams, navigateOptions = {}) {
745
+ function navigate(navigateParams, navigateOptions) {
746
+ if (navigateOptions === void 0) {
747
+ navigateOptions = {};
748
+ }
749
+
734
750
  const router = this;
735
751
  if (router.swipeBackActive) return router;
736
752
  let url;
@@ -10,7 +10,11 @@ export default function redirect(direction, route, options) {
10
10
  options.history = true; // eslint-disable-line
11
11
  }
12
12
 
13
- function redirectResolve(redirectUrl, redirectOptions = {}) {
13
+ function redirectResolve(redirectUrl, redirectOptions) {
14
+ if (redirectOptions === void 0) {
15
+ redirectOptions = {};
16
+ }
17
+
14
18
  router.allowPageChange = true;
15
19
  router[method](redirectUrl, extend({}, options, redirectOptions));
16
20
  }
@@ -56,7 +56,11 @@ class Router extends Framework7Class {
56
56
  enumerable: true,
57
57
  configurable: true,
58
58
 
59
- set(newRoute = {}) {
59
+ set(newRoute) {
60
+ if (newRoute === void 0) {
61
+ newRoute = {};
62
+ }
63
+
60
64
  previousRoute = extend({}, currentRoute);
61
65
  currentRoute = newRoute;
62
66
  if (!currentRoute) return;
@@ -461,7 +465,11 @@ class Router extends Framework7Class {
461
465
  return undefined;
462
466
  }
463
467
 
464
- flattenRoutes(routes = this.routes) {
468
+ flattenRoutes(routes) {
469
+ if (routes === void 0) {
470
+ routes = this.routes;
471
+ }
472
+
465
473
  const router = this;
466
474
  let flattenedRoutes = [];
467
475
  routes.forEach(route => {
@@ -529,7 +537,11 @@ class Router extends Framework7Class {
529
537
  };
530
538
  }
531
539
 
532
- generateUrl(parameters = {}) {
540
+ generateUrl(parameters) {
541
+ if (parameters === void 0) {
542
+ parameters = {};
543
+ }
544
+
533
545
  if (typeof parameters === 'string') {
534
546
  return parameters;
535
547
  }
@@ -569,10 +581,11 @@ class Router extends Framework7Class {
569
581
  } // eslint-disable-next-line
570
582
 
571
583
 
572
- constructRouteUrl(route, {
573
- params,
574
- query
575
- } = {}) {
584
+ constructRouteUrl(route, _temp) {
585
+ let {
586
+ params,
587
+ query
588
+ } = _temp === void 0 ? {} : _temp;
576
589
  const {
577
590
  path
578
591
  } = route;
@@ -693,7 +706,15 @@ class Router extends Framework7Class {
693
706
  } // eslint-disable-next-line
694
707
 
695
708
 
696
- replaceRequestUrlParams(url = '', options = {}) {
709
+ replaceRequestUrlParams(url, options) {
710
+ if (url === void 0) {
711
+ url = '';
712
+ }
713
+
714
+ if (options === void 0) {
715
+ options = {};
716
+ }
717
+
697
718
  let compiledUrl = url;
698
719
 
699
720
  if (typeof compiledUrl === 'string' && compiledUrl.indexOf('{{') >= 0 && options && options.route && options.route.params && Object.keys(options.route.params).length) {
@@ -856,7 +877,11 @@ class Router extends Framework7Class {
856
877
  $(el).find(toRemove).remove();
857
878
  }
858
879
 
859
- getPageData(pageEl, navbarEl, from, to, route = {}, pageFromEl) {
880
+ getPageData(pageEl, navbarEl, from, to, route, pageFromEl) {
881
+ if (route === void 0) {
882
+ route = {};
883
+ }
884
+
860
885
  const router = this;
861
886
  const $pageEl = $(pageEl).eq(0);
862
887
  const $navbarEl = $(navbarEl).eq(0);
@@ -903,7 +928,11 @@ class Router extends Framework7Class {
903
928
  } // Callbacks
904
929
 
905
930
 
906
- pageCallback(callback, pageEl, navbarEl, from, to, options = {}, pageFromEl) {
931
+ pageCallback(callback, pageEl, navbarEl, from, to, options, pageFromEl) {
932
+ if (options === void 0) {
933
+ options = {};
934
+ }
935
+
907
936
  if (!pageEl) return;
908
937
  const router = this;
909
938
  const $pageEl = $(pageEl);
@@ -287,12 +287,13 @@ function SwipeBack(r) {
287
287
  return els;
288
288
  }
289
289
 
290
- function setAnimatableNavElements({
291
- progress,
292
- reset,
293
- transition,
294
- reflow
295
- } = {}) {
290
+ function setAnimatableNavElements(_temp) {
291
+ let {
292
+ progress,
293
+ reset,
294
+ transition,
295
+ reflow
296
+ } = _temp === void 0 ? {} : _temp;
296
297
  const styles = ['overflow', 'transform', 'transform-origin', 'opacity'];
297
298
 
298
299
  if (transition === true || transition === false) {
@@ -3,7 +3,11 @@ import { extend } from '../../shared/utils.js';
3
3
  import History from '../../shared/history.js';
4
4
  import asyncComponent from './async-component.js';
5
5
 
6
- function tabLoad(tabRoute, loadOptions = {}) {
6
+ function tabLoad(tabRoute, loadOptions) {
7
+ if (loadOptions === void 0) {
8
+ loadOptions = {};
9
+ }
10
+
7
11
  const router = this;
8
12
  const options = extend({
9
13
  animate: router.params.animate,
@@ -33,7 +37,7 @@ function tabLoad(tabRoute, loadOptions = {}) {
33
37
 
34
38
 
35
39
  if (router.params.browserHistory && options.browserHistory && !options.reloadPrevious) {
36
- History.replace(router.view.id, {
40
+ History[router.params.browserHistoryTabs](router.view.id, {
37
41
  url: options.route.url
38
42
  }, (router.params.browserHistoryRoot || '') + router.params.browserHistorySeparator + options.route.url);
39
43
  } // Update Router History
@@ -1,7 +1,11 @@
1
1
  /* eslint-disable no-underscore-dangle */
2
2
  import { extend } from '../../shared/utils.js';
3
3
 
4
- function createStore(storeParams = {}) {
4
+ function createStore(storeParams) {
5
+ if (storeParams === void 0) {
6
+ storeParams = {};
7
+ }
8
+
5
9
  const store = {
6
10
  __store: true
7
11
  };
@@ -67,7 +71,11 @@ function createStore(storeParams = {}) {
67
71
  removeGetterCallback(callback);
68
72
  };
69
73
 
70
- const getterValue = (getterKey, addCallback = true) => {
74
+ const getterValue = function (getterKey, addCallback) {
75
+ if (addCallback === void 0) {
76
+ addCallback = true;
77
+ }
78
+
71
79
  if (getterKey === 'constructor') return undefined;
72
80
  propsQueue = [];
73
81
  const value = getGetterValue(getterKey);