framework7 7.0.0-beta.2 → 7.0.0-beta.20

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 (384) hide show
  1. package/components/accordion/accordion.js +2 -2
  2. package/components/accordion/{accordion.umd.js → accordion.lazy.js} +1 -1
  3. package/components/actions/actions-class.js +11 -6
  4. package/components/actions/actions-rtl.css +1 -1
  5. package/components/actions/actions.css +1 -1
  6. package/components/actions/actions.d.ts +2 -0
  7. package/components/actions/actions.js +13 -4
  8. package/components/actions/actions.lazy.js +1 -0
  9. package/components/actions/actions.less +3 -0
  10. package/components/app/app-class.d.ts +10 -10
  11. package/components/app/app-class.js +43 -37
  12. package/components/app/app.less +3 -3
  13. package/components/app/load-module.js +4 -4
  14. package/components/appbar/{appbar.umd.js → appbar.lazy.js} +0 -0
  15. package/components/area-chart/area-chart-class.js +38 -22
  16. package/components/area-chart/area-chart-rtl.css +1 -1
  17. package/components/area-chart/area-chart.css +1 -1
  18. package/components/area-chart/area-chart.js +3 -3
  19. package/components/area-chart/area-chart.lazy.js +1 -0
  20. package/components/autocomplete/autocomplete-class.js +10 -6
  21. package/components/autocomplete/autocomplete-rtl.css +1 -1
  22. package/components/autocomplete/autocomplete.css +1 -1
  23. package/components/autocomplete/autocomplete.js +3 -3
  24. package/components/autocomplete/autocomplete.lazy.js +1 -0
  25. package/components/breadcrumbs/breadcrumbs-aurora.less +2 -0
  26. package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
  27. package/components/breadcrumbs/breadcrumbs-md.less +2 -0
  28. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
  29. package/components/breadcrumbs/breadcrumbs-vars.less +36 -0
  30. package/components/breadcrumbs/breadcrumbs.css +1 -0
  31. package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
  32. package/components/breadcrumbs/breadcrumbs.js +13 -0
  33. package/components/breadcrumbs/breadcrumbs.lazy.js +1 -0
  34. package/components/breadcrumbs/breadcrumbs.less +100 -0
  35. package/components/calendar/calendar-class.js +222 -130
  36. package/components/calendar/calendar-rtl.css +1 -1
  37. package/components/calendar/calendar-vars.less +6 -10
  38. package/components/calendar/calendar.css +1 -1
  39. package/components/calendar/calendar.d.ts +2 -0
  40. package/components/calendar/calendar.js +9 -4
  41. package/components/calendar/calendar.lazy.js +1 -0
  42. package/components/calendar/calendar.less +20 -16
  43. package/components/card/card-rtl.css +1 -1
  44. package/components/card/card.css +1 -1
  45. package/components/card/card.js +27 -7
  46. package/components/card/card.lazy.js +1 -0
  47. package/components/checkbox/checkbox-rtl.css +1 -1
  48. package/components/checkbox/checkbox.css +1 -1
  49. package/components/checkbox/{checkbox.umd.js → checkbox.lazy.js} +0 -0
  50. package/components/chip/chip-rtl.css +1 -1
  51. package/components/chip/chip.css +1 -1
  52. package/components/chip/{chip.umd.js → chip.lazy.js} +0 -0
  53. package/components/color-picker/color-picker-class.js +37 -21
  54. package/components/color-picker/color-picker-rtl.css +1 -1
  55. package/components/color-picker/color-picker.css +1 -1
  56. package/components/color-picker/color-picker.js +8 -4
  57. package/components/color-picker/{color-picker.umd.js → color-picker.lazy.js} +1 -1
  58. package/components/color-picker/modules/alpha-slider.js +1 -1
  59. package/components/color-picker/modules/brightness-slider.js +2 -2
  60. package/components/color-picker/modules/current-color.js +1 -1
  61. package/components/color-picker/modules/hex.js +1 -1
  62. package/components/color-picker/modules/hs-spectrum.js +4 -4
  63. package/components/color-picker/modules/hsb-sliders.js +3 -3
  64. package/components/color-picker/modules/hue-slider.js +1 -1
  65. package/components/color-picker/modules/initial-current-colors.js +1 -1
  66. package/components/color-picker/modules/palette.js +2 -2
  67. package/components/color-picker/modules/rgb-bars.js +2 -2
  68. package/components/color-picker/modules/rgb-sliders.js +2 -2
  69. package/components/color-picker/modules/sb-spectrum.js +3 -3
  70. package/components/color-picker/modules/wheel.js +3 -3
  71. package/components/contacts-list/contacts-list-rtl.css +1 -1
  72. package/components/contacts-list/contacts-list.css +1 -1
  73. package/components/contacts-list/{contacts-list.umd.js → contacts-list.lazy.js} +0 -0
  74. package/components/data-table/data-table-class.js +8 -4
  75. package/components/data-table/data-table-rtl.css +1 -1
  76. package/components/data-table/data-table.css +1 -1
  77. package/components/data-table/data-table.js +3 -3
  78. package/components/data-table/data-table.lazy.js +1 -0
  79. package/components/dialog/dialog-class.js +5 -5
  80. package/components/dialog/dialog-rtl.css +1 -1
  81. package/components/dialog/dialog.css +1 -1
  82. package/components/dialog/dialog.js +33 -9
  83. package/components/dialog/dialog.lazy.js +1 -0
  84. package/components/elevation/{elevation.umd.js → elevation.lazy.js} +0 -0
  85. package/components/fab/fab-rtl.css +1 -1
  86. package/components/fab/fab.css +1 -1
  87. package/components/fab/fab.js +17 -5
  88. package/components/fab/fab.lazy.js +1 -0
  89. package/components/form/form.js +2 -2
  90. package/components/form/{form.umd.js → form.lazy.js} +1 -1
  91. package/components/gauge/gauge-class.js +14 -6
  92. package/components/gauge/gauge.d.ts +2 -2
  93. package/components/gauge/gauge.js +4 -4
  94. package/components/gauge/gauge.lazy.js +1 -0
  95. package/components/grid/grid-rtl.css +1 -1
  96. package/components/grid/grid.css +1 -1
  97. package/components/grid/grid.js +2 -2
  98. package/components/grid/{grid.umd.js → grid.lazy.js} +0 -0
  99. package/components/infinite-scroll/infinite-scroll.js +2 -2
  100. package/components/infinite-scroll/{infinite-scroll.umd.js → infinite-scroll.lazy.js} +0 -0
  101. package/components/input/input-rtl.css +1 -1
  102. package/components/input/input.css +1 -1
  103. package/components/input/input.js +8 -4
  104. package/components/input/input.lazy.js +1 -0
  105. package/components/input/input.less +1 -1
  106. package/components/lazy/lazy.js +3 -3
  107. package/components/lazy/{lazy.umd.js → lazy.lazy.js} +0 -0
  108. package/components/list-index/list-index-class.js +9 -5
  109. package/components/list-index/list-index.d.ts +1 -1
  110. package/components/list-index/list-index.js +4 -4
  111. package/components/list-index/list-index.lazy.js +1 -0
  112. package/components/login-screen/login-screen-class.js +3 -3
  113. package/components/login-screen/login-screen-rtl.css +1 -1
  114. package/components/login-screen/login-screen.css +1 -1
  115. package/components/login-screen/login-screen.js +12 -4
  116. package/components/login-screen/login-screen.lazy.js +1 -0
  117. package/components/login-screen/login-screen.less +1 -1
  118. package/components/menu/menu.js +12 -4
  119. package/components/menu/menu.lazy.js +1 -0
  120. package/components/messagebar/messagebar-class.js +28 -8
  121. package/components/messagebar/messagebar-rtl.css +1 -1
  122. package/components/messagebar/messagebar.css +1 -1
  123. package/components/messagebar/messagebar.js +4 -4
  124. package/components/messagebar/messagebar.lazy.js +1 -0
  125. package/components/messages/messages-class.js +64 -28
  126. package/components/messages/messages-rtl.css +1 -1
  127. package/components/messages/messages.css +1 -1
  128. package/components/messages/messages.js +3 -3
  129. package/components/messages/messages.lazy.js +1 -0
  130. package/components/modal/custom-modal-class.js +3 -3
  131. package/components/modal/modal-class.js +13 -3
  132. package/components/modal/modal.js +2 -2
  133. package/components/navbar/navbar.js +29 -5
  134. package/components/notification/notification-aurora.less +1 -1
  135. package/components/notification/notification-class.js +4 -4
  136. package/components/notification/notification-ios.less +1 -1
  137. package/components/notification/notification-rtl.css +1 -1
  138. package/components/notification/notification.css +1 -1
  139. package/components/notification/notification.d.ts +4 -4
  140. package/components/notification/notification.js +3 -3
  141. package/components/notification/{notification.umd.js → notification.lazy.js} +0 -0
  142. package/components/page/page-vars.less +1 -1
  143. package/components/panel/panel-class.js +40 -12
  144. package/components/panel/panel.js +43 -11
  145. package/components/panel/panel.lazy.js +1 -0
  146. package/components/panel/resizable-panel.js +3 -3
  147. package/components/panel/swipe-panel.js +2 -2
  148. package/components/photo-browser/photo-browser-class.js +46 -12
  149. package/components/photo-browser/photo-browser.js +2 -2
  150. package/components/photo-browser/photo-browser.lazy.js +1 -0
  151. package/components/picker/picker-class.js +17 -13
  152. package/components/picker/picker-column.js +35 -271
  153. package/components/picker/picker-rtl.css +1 -1
  154. package/components/picker/picker.css +1 -1
  155. package/components/picker/picker.d.ts +2 -13
  156. package/components/picker/picker.js +8 -9
  157. package/components/picker/picker.lazy.js +1 -0
  158. package/components/picker/picker.less +28 -10
  159. package/components/pie-chart/pie-chart-class.js +20 -11
  160. package/components/pie-chart/pie-chart.js +3 -3
  161. package/components/pie-chart/pie-chart.lazy.js +1 -0
  162. package/components/popover/popover-class.js +24 -7
  163. package/components/popover/popover-rtl.css +1 -1
  164. package/components/popover/popover.css +1 -1
  165. package/components/popover/popover.d.ts +2 -0
  166. package/components/popover/popover.js +15 -6
  167. package/components/popover/popover.lazy.js +1 -0
  168. package/components/popover/popover.less +3 -0
  169. package/components/popup/popup-class.js +11 -6
  170. package/components/popup/popup-rtl.css +1 -1
  171. package/components/popup/popup.css +1 -1
  172. package/components/popup/popup.d.ts +4 -0
  173. package/components/popup/popup.js +13 -4
  174. package/components/popup/popup.lazy.js +1 -0
  175. package/components/popup/popup.less +25 -21
  176. package/components/preloader/preloader-ios.less +3 -0
  177. package/components/preloader/preloader-rtl.css +1 -1
  178. package/components/preloader/preloader.css +1 -1
  179. package/components/preloader/preloader.d.ts +4 -0
  180. package/components/preloader/preloader.js +12 -4
  181. package/components/preloader/preloader.lazy.js +1 -0
  182. package/components/progressbar/progressbar-aurora.less +32 -13
  183. package/components/progressbar/progressbar-ios.less +19 -7
  184. package/components/progressbar/progressbar-md.less +64 -28
  185. package/components/progressbar/progressbar-rtl.css +1 -1
  186. package/components/progressbar/progressbar.css +1 -1
  187. package/components/progressbar/progressbar.js +19 -6
  188. package/components/progressbar/progressbar.lazy.js +1 -0
  189. package/components/progressbar/progressbar.less +16 -4
  190. package/components/pull-to-refresh/pull-to-refresh-class.js +10 -6
  191. package/components/pull-to-refresh/pull-to-refresh.js +4 -4
  192. package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -0
  193. package/components/radio/radio-rtl.css +1 -1
  194. package/components/radio/radio.css +1 -1
  195. package/components/radio/{radio.umd.js → radio.lazy.js} +0 -0
  196. package/components/range/range-class.js +4 -4
  197. package/components/range/range.d.ts +23 -5
  198. package/components/range/range.js +14 -6
  199. package/components/range/{range.umd.js → range.lazy.js} +1 -1
  200. package/components/searchbar/searchbar-class.js +11 -7
  201. package/components/searchbar/searchbar-rtl.css +1 -1
  202. package/components/searchbar/searchbar.css +1 -1
  203. package/components/searchbar/searchbar.js +24 -8
  204. package/components/searchbar/searchbar.lazy.js +1 -0
  205. package/components/searchbar/searchbar.less +1 -1
  206. package/components/sheet/sheet-class.js +26 -7
  207. package/components/sheet/sheet-rtl.css +1 -1
  208. package/components/sheet/sheet.css +1 -1
  209. package/components/sheet/sheet.d.ts +2 -0
  210. package/components/sheet/sheet.js +15 -6
  211. package/components/sheet/sheet.lazy.js +1 -0
  212. package/components/sheet/sheet.less +19 -16
  213. package/components/skeleton/skeleton-rtl.css +1 -1
  214. package/components/skeleton/skeleton-vars.less +1 -1
  215. package/components/skeleton/skeleton.css +1 -1
  216. package/components/skeleton/{skeleton.umd.js → skeleton.lazy.js} +0 -0
  217. package/components/smart-select/smart-select-class.js +19 -7
  218. package/components/smart-select/smart-select.js +4 -4
  219. package/components/smart-select/smart-select.lazy.js +1 -0
  220. package/components/sortable/sortable-rtl.css +1 -1
  221. package/components/sortable/sortable.css +1 -1
  222. package/components/sortable/sortable.d.ts +5 -1
  223. package/components/sortable/sortable.js +48 -11
  224. package/components/sortable/sortable.lazy.js +1 -0
  225. package/components/statusbar/statusbar.d.ts +9 -9
  226. package/components/statusbar/statusbar.js +8 -4
  227. package/components/stepper/stepper-class.js +3 -3
  228. package/components/stepper/stepper.js +14 -6
  229. package/components/stepper/{stepper.umd.js → stepper.lazy.js} +1 -1
  230. package/components/subnavbar/subnavbar.js +1 -1
  231. package/components/swipeout/swipeout-rtl.css +1 -1
  232. package/components/swipeout/swipeout.css +1 -1
  233. package/components/swipeout/swipeout.js +19 -6
  234. package/components/swipeout/{swipeout.umd.js → swipeout.lazy.js} +1 -1
  235. package/components/swiper/swiper-rtl.css +1 -1
  236. package/components/swiper/swiper.css +1 -1
  237. package/components/swiper/swiper.js +2 -2
  238. package/components/swiper/swiper.lazy.js +1 -0
  239. package/components/tabs/tabs.js +16 -9
  240. package/components/tabs/tabs.lazy.js +1 -0
  241. package/components/text-editor/text-editor-class.js +5 -5
  242. package/components/text-editor/text-editor-rtl.css +1 -1
  243. package/components/text-editor/text-editor.css +1 -1
  244. package/components/text-editor/text-editor.js +4 -4
  245. package/components/text-editor/{text-editor.umd.js → text-editor.lazy.js} +1 -1
  246. package/components/timeline/timeline-rtl.css +1 -1
  247. package/components/timeline/timeline.css +1 -1
  248. package/components/timeline/{timeline.umd.js → timeline.lazy.js} +0 -0
  249. package/components/toast/toast-class.js +4 -4
  250. package/components/toast/toast.d.ts +2 -2
  251. package/components/toast/toast.js +3 -3
  252. package/components/toast/{toast.umd.js → toast.lazy.js} +0 -0
  253. package/components/toggle/toggle-class.js +9 -5
  254. package/components/toggle/toggle-rtl.css +1 -1
  255. package/components/toggle/toggle.css +1 -1
  256. package/components/toggle/toggle.js +3 -3
  257. package/components/toggle/toggle.lazy.js +1 -0
  258. package/components/toolbar/toolbar-aurora.less +0 -13
  259. package/components/toolbar/toolbar-md.less +0 -13
  260. package/components/toolbar/toolbar.js +13 -5
  261. package/components/toolbar/toolbar.less +13 -0
  262. package/components/tooltip/tooltip-class.js +9 -5
  263. package/components/tooltip/tooltip.js +3 -3
  264. package/components/tooltip/tooltip.lazy.js +1 -0
  265. package/components/touch-ripple/touch-ripple-class.js +1 -1
  266. package/components/touch-ripple/touch-ripple-vars.less +1 -1
  267. package/components/touch-ripple/touch-ripple.js +6 -2
  268. package/components/treeview/treeview-rtl.css +1 -1
  269. package/components/treeview/treeview.css +1 -1
  270. package/components/treeview/treeview.js +2 -2
  271. package/components/treeview/{treeview.umd.js → treeview.lazy.js} +1 -1
  272. package/components/typography/{typography.umd.js → typography.lazy.js} +0 -0
  273. package/components/view/resizable-view.js +3 -3
  274. package/components/view/view-class.js +18 -7
  275. package/components/view/view.d.ts +5 -1
  276. package/components/view/view.js +5 -3
  277. package/components/virtual-list/virtual-list-class.js +58 -13
  278. package/components/virtual-list/virtual-list.d.ts +2 -2
  279. package/components/virtual-list/virtual-list.js +2 -2
  280. package/components/virtual-list/virtual-list.lazy.js +1 -0
  281. package/framework7-bundle-rtl.css +513 -411
  282. package/framework7-bundle-rtl.min.css +4 -4
  283. package/framework7-bundle.css +498 -395
  284. package/framework7-bundle.esm.js +87 -86
  285. package/framework7-bundle.js +2728 -1257
  286. package/framework7-bundle.js.map +1 -1
  287. package/framework7-bundle.less +4 -3
  288. package/framework7-bundle.min.css +4 -4
  289. package/framework7-bundle.min.js +4 -4
  290. package/framework7-bundle.min.js.map +1 -1
  291. package/framework7-lite-bundle.esm.js +81 -80
  292. package/framework7-lite.esm.js +27 -27
  293. package/framework7-rtl.css +61 -70
  294. package/framework7-rtl.min.css +4 -4
  295. package/framework7-types.d.ts +5 -1
  296. package/framework7.css +60 -68
  297. package/framework7.d.ts +4 -0
  298. package/framework7.esm.js +30 -30
  299. package/framework7.js +675 -255
  300. package/framework7.js.map +1 -1
  301. package/framework7.less +3 -3
  302. package/framework7.min.css +4 -4
  303. package/framework7.min.js +4 -4
  304. package/framework7.min.js.map +1 -1
  305. package/less/mixins.less +2 -2
  306. package/modules/clicks/clicks.js +2 -2
  307. package/modules/component/$h.js +6 -2
  308. package/modules/component/$jsx.js +6 -2
  309. package/modules/component/component-class.js +40 -27
  310. package/modules/component/component.d.ts +2 -2
  311. package/modules/component/component.js +11 -10
  312. package/modules/component/eventslisteners.js +6 -2
  313. package/modules/component/parse-component.js +2 -2
  314. package/modules/component/patch.js +5 -5
  315. package/modules/component/snabbdom/h.js +2 -2
  316. package/modules/component/snabbdom/snabbdom.bundle.js +7 -7
  317. package/modules/component/snabbdom/snabbdom.js +3 -3
  318. package/modules/component/snabbdom/thunk.js +1 -1
  319. package/modules/component/snabbdom/tovnode.js +2 -2
  320. package/modules/component/vdom.js +35 -20
  321. package/modules/device/device.js +2 -2
  322. package/modules/history/history.js +1 -1
  323. package/modules/request/request.js +1 -1
  324. package/modules/resize/resize.js +1 -1
  325. package/modules/router/back.js +24 -14
  326. package/modules/router/clear-previous-history.js +2 -2
  327. package/modules/router/component-loader.js +81 -24
  328. package/modules/router/modal.js +8 -4
  329. package/modules/router/navigate.js +25 -55
  330. package/modules/router/redirect.js +6 -2
  331. package/modules/router/router-class.js +50 -21
  332. package/modules/router/router.js +1 -1
  333. package/modules/router/swipe-back.js +12 -11
  334. package/modules/router/tab.js +10 -6
  335. package/modules/service-worker/service-worker.js +1 -1
  336. package/modules/store/create-store.js +11 -3
  337. package/modules/store/store.js +1 -1
  338. package/modules/support/support.js +1 -1
  339. package/modules/touch/touch.js +4 -4
  340. package/modules/utils/utils.js +1 -1
  341. package/package.json +12 -6
  342. package/shared/$jsx.js +6 -1
  343. package/shared/class.js +35 -7
  344. package/shared/constructor-methods.js +26 -5
  345. package/shared/events-class.js +15 -3
  346. package/shared/get-device.d.ts +0 -2
  347. package/shared/get-device.js +11 -7
  348. package/shared/history.js +2 -2
  349. package/shared/modal-methods.js +13 -5
  350. package/shared/request.js +46 -8
  351. package/shared/utils.js +47 -10
  352. package/components/actions/actions.umd.js +0 -1
  353. package/components/area-chart/area-chart.umd.js +0 -1
  354. package/components/autocomplete/autocomplete.umd.js +0 -1
  355. package/components/calendar/calendar.umd.js +0 -1
  356. package/components/card/card.umd.js +0 -1
  357. package/components/data-table/data-table.umd.js +0 -1
  358. package/components/dialog/dialog.umd.js +0 -1
  359. package/components/fab/fab.umd.js +0 -1
  360. package/components/gauge/gauge.umd.js +0 -1
  361. package/components/input/input.umd.js +0 -1
  362. package/components/list-index/list-index.umd.js +0 -1
  363. package/components/login-screen/login-screen.umd.js +0 -1
  364. package/components/menu/menu.umd.js +0 -1
  365. package/components/messagebar/messagebar.umd.js +0 -1
  366. package/components/messages/messages.umd.js +0 -1
  367. package/components/panel/panel.umd.js +0 -1
  368. package/components/photo-browser/photo-browser.umd.js +0 -1
  369. package/components/picker/picker.umd.js +0 -1
  370. package/components/pie-chart/pie-chart.umd.js +0 -1
  371. package/components/popover/popover.umd.js +0 -1
  372. package/components/popup/popup.umd.js +0 -1
  373. package/components/preloader/preloader.umd.js +0 -1
  374. package/components/progressbar/progressbar.umd.js +0 -1
  375. package/components/pull-to-refresh/pull-to-refresh.umd.js +0 -1
  376. package/components/searchbar/searchbar.umd.js +0 -1
  377. package/components/sheet/sheet.umd.js +0 -1
  378. package/components/smart-select/smart-select.umd.js +0 -1
  379. package/components/sortable/sortable.umd.js +0 -1
  380. package/components/swiper/swiper.umd.js +0 -1
  381. package/components/tabs/tabs.umd.js +0 -1
  382. package/components/toggle/toggle.umd.js +0 -1
  383. package/components/tooltip/tooltip.umd.js +0 -1
  384. package/components/virtual-list/virtual-list.umd.js +0 -1
package/less/mixins.less CHANGED
@@ -53,8 +53,8 @@
53
53
  }
54
54
  .dark-vars(@ruleset) {
55
55
  & when (@includeDarkTheme) {
56
- .theme-dark,
57
- &.theme-dark {
56
+ .dark,
57
+ &.dark {
58
58
  @ruleset();
59
59
  }
60
60
  }
@@ -1,6 +1,6 @@
1
1
  import { getWindow } from 'ssr-window';
2
- import $ from '../../shared/dom7';
3
- import ViewClass from '../../components/view/view-class';
2
+ import $ from '../../shared/dom7.js';
3
+ import ViewClass from '../../components/view/view-class.js';
4
4
 
5
5
  function initClicks(app) {
6
6
  function handleClicks(e) {
@@ -1,8 +1,12 @@
1
1
  import htm from 'htm';
2
- import { flattenArray } from '../../shared/utils';
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
- import { flattenArray } from '../../shared/utils';
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') {
@@ -1,17 +1,22 @@
1
1
  /* eslint no-underscore-dangle: "off" */
2
2
  import { getWindow, getDocument } from 'ssr-window';
3
- import $ from '../../shared/dom7';
4
- import $h from './$h';
5
- import { id as generateId, merge, eventNameToColonCase, deleteProps } from '../../shared/utils';
6
- import vdom from './vdom';
7
- import patch from './patch';
3
+ import $ from '../../shared/dom7.js';
4
+ import $h from './$h.js';
5
+ import { id as generateId, merge, eventNameToColonCase, deleteProps } from '../../shared/utils.js';
6
+ import vdom from './vdom.js';
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 */
@@ -1,7 +1,7 @@
1
- import Component from './component-class';
2
- import parseComponent from './parse-component';
3
- import customComponents from './custom-components';
4
- import $jsx from './$jsx';
1
+ import Component from './component-class.js';
2
+ import parseComponent from './parse-component.js';
3
+ import customComponents from './custom-components.js';
4
+ import $jsx from './$jsx.js';
5
5
 
6
6
  function registerComponent(tagName, component) {
7
7
  customComponents[tagName] = component;
@@ -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,
@@ -1,4 +1,4 @@
1
- import $ from '../../shared/dom7';
1
+ import $ from '../../shared/dom7.js';
2
2
 
3
3
  function invokeHandler(handler, event, args) {
4
4
  if (typeof handler === 'function') {
@@ -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,6 +1,6 @@
1
1
  import { getWindow, getDocument } from 'ssr-window';
2
- import $ from '../../shared/dom7';
3
- import { id } from '../../shared/utils';
2
+ import $ from '../../shared/dom7.js';
3
+ import { id } from '../../shared/utils.js';
4
4
 
5
5
  function parseComponent(componentString) {
6
6
  const window = getWindow();
@@ -1,8 +1,8 @@
1
1
  /* eslint import/no-named-as-default: off */
2
- import { init } from './snabbdom/snabbdom';
3
- import attributesModule from './snabbdom/modules/attributes';
4
- import propsModule from './snabbdom/modules/props';
5
- import styleModule from './snabbdom/modules/style';
6
- import eventListenersModule from './eventslisteners';
2
+ import { init } from './snabbdom/snabbdom.js';
3
+ import attributesModule from './snabbdom/modules/attributes.js';
4
+ import propsModule from './snabbdom/modules/props.js';
5
+ import styleModule from './snabbdom/modules/style.js';
6
+ import eventListenersModule from './eventslisteners.js';
7
7
  const patch = init([attributesModule, propsModule, styleModule, eventListenersModule]);
8
8
  export default patch;
@@ -1,5 +1,5 @@
1
- import { vnode } from './vnode';
2
- import * as is from './is';
1
+ import { vnode } from './vnode.js';
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';
@@ -1,15 +1,15 @@
1
- import { init } from './snabbdom';
2
- import { attributesModule } from './modules/attributes'; // for setting attributes on DOM elements
1
+ import { init } from './snabbdom.js';
2
+ import { attributesModule } from './modules/attributes.js'; // for setting attributes on DOM elements
3
3
 
4
- import { classModule } from './modules/class'; // makes it easy to toggle classes
4
+ import { classModule } from './modules/class.js'; // makes it easy to toggle classes
5
5
 
6
- import { propsModule } from './modules/props'; // for setting properties on DOM elements
6
+ import { propsModule } from './modules/props.js'; // for setting properties on DOM elements
7
7
 
8
- import { styleModule } from './modules/style'; // handles styling on elements with support for animations
8
+ import { styleModule } from './modules/style.js'; // handles styling on elements with support for animations
9
9
 
10
- import { eventListenersModule } from './modules/eventlisteners'; // attaches event listeners
10
+ import { eventListenersModule } from './modules/eventlisteners.js'; // attaches event listeners
11
11
 
12
- import { h } from './h'; // helper function for creating vnodes
12
+ import { h } from './h.js'; // helper function for creating vnodes
13
13
 
14
14
  var patch = init([attributesModule, classModule, propsModule, styleModule, eventListenersModule]);
15
15
  export var snabbdomBundle = {
@@ -1,6 +1,6 @@
1
- import vnode from './vnode';
2
- import * as is from './is';
3
- import htmlDomApi from './htmldomapi';
1
+ import vnode from './vnode.js';
2
+ import * as is from './is.js';
3
+ import htmlDomApi from './htmldomapi.js';
4
4
 
5
5
  function isUndef(s) {
6
6
  return s === undefined;
@@ -1,4 +1,4 @@
1
- import { h } from './h';
1
+ import { h } from './h.js';
2
2
 
3
3
  function copyToThunk(vnode, thunk) {
4
4
  thunk.elm = vnode.elm;
@@ -1,5 +1,5 @@
1
- import vnode from './vnode';
2
- import htmlDomApi from './htmldomapi';
1
+ import vnode from './vnode.js';
2
+ import htmlDomApi from './htmldomapi.js';
3
3
  export function toVNode(node, domApi) {
4
4
  var api = domApi !== undefined ? domApi : htmlDomApi;
5
5
  var text;
@@ -1,9 +1,9 @@
1
1
  /* eslint no-use-before-define: "off" */
2
2
 
3
3
  /* eslint import/no-named-as-default: "off" */
4
- import h from './snabbdom/h';
5
- import customComponents from './custom-components';
6
- import { isObject, eventNameToColonCase } from '../../shared/utils';
4
+ import h from './snabbdom/h.js';
5
+ import customComponents from './custom-components.js';
6
+ import { isObject, eventNameToColonCase } from '../../shared/utils.js';
7
7
  const SELF_CLOSING = 'area base br col command embed hr img input keygen link menuitem meta param source track wbr'.split(' ');
8
8
  const PROPS_ATTRS = 'hidden checked disabled readonly selected autofocus autoplay required multiple value indeterminate routeProps innerHTML'.split(' ');
9
9
  const BOOLEAN_PROPS = 'hidden checked disabled readonly selected autofocus autoplay required multiple readOnly indeterminate'.split(' ');
@@ -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
  }
@@ -1,5 +1,5 @@
1
1
  import { getDocument } from 'ssr-window';
2
- import { getDevice } from '../../shared/get-device';
2
+ import { getDevice } from '../../shared/get-device.js';
3
3
  export default {
4
4
  name: 'device',
5
5
  static: {
@@ -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
 
@@ -1,4 +1,4 @@
1
- import History from '../../shared/history';
1
+ import History from '../../shared/history.js';
2
2
  export default {
3
3
  name: 'history',
4
4
  static: {
@@ -1,5 +1,5 @@
1
1
  /* eslint no-param-reassign: "off" */
2
- import request from '../../shared/request';
2
+ import request from '../../shared/request.js';
3
3
  export default {
4
4
  name: 'request',
5
5
  proto: {
@@ -1,5 +1,5 @@
1
1
  import { getWindow, getDocument } from 'ssr-window';
2
- import { getDevice } from '../../shared/get-device';
2
+ import { getDevice } from '../../shared/get-device.js';
3
3
  export default {
4
4
  name: 'resize',
5
5
 
@@ -1,12 +1,12 @@
1
1
  import { getDocument } from 'ssr-window';
2
- import $ from '../../shared/dom7';
3
- import { extend, parseUrlQuery } from '../../shared/utils';
4
- import { getDevice } from '../../shared/get-device';
5
- import History from '../../shared/history';
6
- import redirect from './redirect';
7
- import processRouteQueue from './process-route-queue';
8
- import appRouterCheck from './app-router-check';
9
- import asyncComponent from './async-component';
2
+ import $ from '../../shared/dom7.js';
3
+ import { extend, parseUrlQuery } from '../../shared/utils.js';
4
+ import { getDevice } from '../../shared/get-device.js';
5
+ import History from '../../shared/history.js';
6
+ import redirect from './redirect.js';
7
+ import processRouteQueue from './process-route-queue.js';
8
+ import appRouterCheck from './app-router-check.js';
9
+ import asyncComponent from './async-component.js';
10
10
 
11
11
  function backward(router, el, backwardOptions) {
12
12
  const device = getDevice();
@@ -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
@@ -1,5 +1,5 @@
1
- import $ from '../../shared/dom7';
2
- import appRouterCheck from './app-router-check';
1
+ import $ from '../../shared/dom7.js';
2
+ import appRouterCheck from './app-router-check.js';
3
3
 
4
4
  function clearPreviousPages(router) {
5
5
  appRouterCheck(router, 'clearPreviousPages');
@@ -1,8 +1,58 @@
1
- import { merge } from '../../shared/utils';
1
+ import { merge } from '../../shared/utils.js';
2
2
  export default {
3
3
  name: 'routerComponentLoader',
4
4
  proto: {
5
- componentLoader(component, componentUrl, options = {}, resolve, reject) {
5
+ openIn(router, url, options) {
6
+ const navigateOptions = {
7
+ url,
8
+ route: {
9
+ path: url,
10
+ options: { ...options,
11
+ openIn: undefined
12
+ }
13
+ }
14
+ };
15
+ const params = { ...options
16
+ };
17
+
18
+ if (options.openIn === 'popup') {
19
+ params.content = `<div class="popup popup-router-open-in" data-url="${url}"><div class="view view-init" data-links-view="${router.view.selector}" data-url="${url}" data-ignore-open-in="true"></div></div>`;
20
+ navigateOptions.route.popup = params;
21
+ }
22
+
23
+ if (options.openIn === 'loginScreen') {
24
+ params.content = `<div class="login-screen login-screen-router-open-in" data-url="${url}"><div class="view view-init" data-links-view="${router.view.selector}" data-url="${url}" data-ignore-open-in="true"></div></div>`;
25
+ navigateOptions.route.loginScreen = params;
26
+ }
27
+
28
+ if (options.openIn === 'sheet') {
29
+ params.content = `<div class="sheet-modal sheet-modal-router-open-in" data-url="${url}"><div class="sheet-modal-inner"><div class="view view-init" data-links-view="${router.view.selector}" data-url="${url}" data-ignore-open-in="true"></div></div></div>`;
30
+ navigateOptions.route.sheet = params;
31
+ }
32
+
33
+ if (options.openIn === 'popover') {
34
+ params.targetEl = options.clickedEl || options.targetEl;
35
+ params.content = `<div class="popover popover-router-open-in" data-url="${url}"><div class="popover-inner"><div class="view view-init" data-links-view="${router.view.selector}" data-url="${url}" data-ignore-open-in="true"></div></div></div>`;
36
+ navigateOptions.route.popover = params;
37
+ }
38
+
39
+ if (options.openIn.indexOf('panel') >= 0) {
40
+ const parts = options.openIn.split(':');
41
+ const side = parts[1] || 'left';
42
+ const effect = parts[2] || 'cover';
43
+ params.targetEl = options.clickedEl || options.targetEl;
44
+ params.content = `<div class="panel panel-router-open-in panel-${side} panel-${effect}" data-url="${url}"><div class="view view-init" data-links-view="${router.view.selector}" data-url="${url}" data-ignore-open-in="true"></div></div>`;
45
+ navigateOptions.route.panel = params;
46
+ }
47
+
48
+ return router.navigate(navigateOptions);
49
+ },
50
+
51
+ componentLoader(component, componentUrl, options, resolve, reject) {
52
+ if (options === void 0) {
53
+ options = {};
54
+ }
55
+
6
56
  const router = this;
7
57
  const {
8
58
  app
@@ -85,41 +135,48 @@ export default {
85
135
  }
86
136
  },
87
137
 
88
- modalComponentLoader({
89
- component,
90
- componentUrl,
91
- options,
92
- resolve,
93
- reject
94
- } = {}) {
138
+ modalComponentLoader(_temp) {
139
+ let {
140
+ component,
141
+ componentUrl,
142
+ options,
143
+ resolve,
144
+ reject
145
+ } = _temp === void 0 ? {} : _temp;
95
146
  const router = this;
96
147
  router.componentLoader(component, componentUrl, options, el => {
97
148
  resolve(el);
98
149
  }, reject);
99
150
  },
100
151
 
101
- tabComponentLoader({
102
- component,
103
- componentUrl,
104
- options,
105
- resolve,
106
- reject
107
- } = {}) {
152
+ tabComponentLoader(_temp2) {
153
+ let {
154
+ component,
155
+ componentUrl,
156
+ options,
157
+ resolve,
158
+ reject
159
+ } = _temp2 === void 0 ? {} : _temp2;
108
160
  const router = this;
109
161
  router.componentLoader(component, componentUrl, options, el => {
110
162
  resolve(el);
111
163
  }, reject);
112
164
  },
113
165
 
114
- pageComponentLoader({
115
- component,
116
- componentUrl,
117
- options,
118
- resolve,
119
- reject
120
- } = {}) {
166
+ pageComponentLoader(_temp3) {
167
+ let {
168
+ component,
169
+ componentUrl,
170
+ options,
171
+ resolve,
172
+ reject
173
+ } = _temp3 === void 0 ? {} : _temp3;
121
174
  const router = this;
122
- 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
+
123
180
  resolve(el, newOptions);
124
181
  }, reject);
125
182
  }