framework7 7.0.9 → 8.0.0-beta.1

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 (579) hide show
  1. package/components/accordion/accordion.js +2 -16
  2. package/components/accordion/accordion.less +0 -3
  3. package/components/actions/actions-class.js +13 -58
  4. package/components/actions/actions-ios.less +42 -0
  5. package/components/actions/actions-md.less +12 -0
  6. package/components/actions/actions-rtl.css +1 -1
  7. package/components/actions/actions-vars.less +17 -42
  8. package/components/actions/actions.css +1 -1
  9. package/components/actions/actions.d.ts +2 -2
  10. package/components/actions/actions.js +0 -4
  11. package/components/actions/actions.lazy.js +1 -1
  12. package/components/actions/actions.less +5 -35
  13. package/components/app/app-class.d.ts +14 -12
  14. package/components/app/app-class.js +93 -75
  15. package/components/app/app-ios.less +0 -2
  16. package/components/app/app-md.less +0 -2
  17. package/components/app/app-vars.less +13 -96
  18. package/components/app/app.less +1 -4
  19. package/components/app/load-module.js +17 -36
  20. package/components/area-chart/area-chart-class.js +8 -64
  21. package/components/area-chart/area-chart.js +0 -3
  22. package/components/area-chart/area-chart.less +0 -3
  23. package/components/autocomplete/autocomplete-class.js +30 -175
  24. package/components/autocomplete/autocomplete-ios.less +0 -8
  25. package/components/autocomplete/autocomplete-rtl.css +1 -1
  26. package/components/autocomplete/autocomplete-vars.less +8 -22
  27. package/components/autocomplete/autocomplete.css +1 -1
  28. package/components/autocomplete/autocomplete.d.ts +1 -3
  29. package/components/autocomplete/autocomplete.js +1 -6
  30. package/components/autocomplete/autocomplete.lazy.js +1 -1
  31. package/components/autocomplete/autocomplete.less +6 -18
  32. package/components/badge/badge-vars.less +3 -6
  33. package/components/badge/badge.less +1 -3
  34. package/components/block/block-vars.less +25 -52
  35. package/components/block/block.less +37 -12
  36. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
  37. package/components/breadcrumbs/breadcrumbs-vars.less +31 -15
  38. package/components/breadcrumbs/breadcrumbs.css +1 -1
  39. package/components/breadcrumbs/breadcrumbs.js +0 -2
  40. package/components/breadcrumbs/breadcrumbs.less +4 -10
  41. package/components/button/button-vars.less +42 -43
  42. package/components/button/button.less +24 -26
  43. package/components/calendar/calendar-class.js +81 -401
  44. package/components/calendar/calendar-rtl.css +1 -1
  45. package/components/calendar/calendar-vars.less +32 -46
  46. package/components/calendar/calendar.css +1 -1
  47. package/components/calendar/calendar.js +6 -4
  48. package/components/calendar/calendar.lazy.js +1 -1
  49. package/components/calendar/calendar.less +10 -21
  50. package/components/card/card-rtl.css +1 -1
  51. package/components/card/card-vars.less +41 -44
  52. package/components/card/card.css +1 -1
  53. package/components/card/card.js +0 -108
  54. package/components/card/card.less +18 -24
  55. package/components/checkbox/checkbox-rtl.css +1 -1
  56. package/components/checkbox/checkbox-vars.less +0 -8
  57. package/components/checkbox/checkbox.css +1 -1
  58. package/components/checkbox/checkbox.less +10 -3
  59. package/components/chip/chip-ios.less +3 -0
  60. package/components/chip/chip-md.less +4 -3
  61. package/components/chip/chip-rtl.css +1 -1
  62. package/components/chip/chip-vars.less +17 -20
  63. package/components/chip/chip.css +1 -1
  64. package/components/chip/chip.less +16 -21
  65. package/components/color-picker/color-picker-class.js +27 -158
  66. package/components/color-picker/color-picker-rtl.css +1 -1
  67. package/components/color-picker/color-picker.css +1 -1
  68. package/components/color-picker/color-picker.js +0 -4
  69. package/components/color-picker/color-picker.lazy.js +1 -1
  70. package/components/color-picker/color-picker.less +18 -8
  71. package/components/color-picker/modules/alpha-slider.js +0 -12
  72. package/components/color-picker/modules/brightness-slider.js +0 -8
  73. package/components/color-picker/modules/current-color.js +0 -2
  74. package/components/color-picker/modules/hex.js +0 -12
  75. package/components/color-picker/modules/hs-spectrum.js +0 -20
  76. package/components/color-picker/modules/hsb-sliders.js +0 -18
  77. package/components/color-picker/modules/hue-slider.js +0 -7
  78. package/components/color-picker/modules/initial-current-colors.js +0 -7
  79. package/components/color-picker/modules/palette.js +2 -10
  80. package/components/color-picker/modules/rgb-bars.js +0 -17
  81. package/components/color-picker/modules/rgb-sliders.js +0 -17
  82. package/components/color-picker/modules/sb-spectrum.js +0 -20
  83. package/components/color-picker/modules/wheel.js +0 -28
  84. package/components/contacts-list/contacts-list-md.less +4 -3
  85. package/components/contacts-list/contacts-list-rtl.css +1 -1
  86. package/components/contacts-list/contacts-list-vars.less +3 -15
  87. package/components/contacts-list/contacts-list.css +1 -1
  88. package/components/contacts-list/contacts-list.less +0 -3
  89. package/components/data-table/data-table-class.js +10 -32
  90. package/components/data-table/data-table-rtl.css +1 -1
  91. package/components/data-table/data-table-vars.less +6 -39
  92. package/components/data-table/data-table.css +1 -1
  93. package/components/data-table/data-table.js +0 -8
  94. package/components/data-table/data-table.less +0 -3
  95. package/components/dialog/dialog-class.js +7 -41
  96. package/components/dialog/dialog-ios.less +0 -3
  97. package/components/dialog/dialog-md.less +9 -9
  98. package/components/dialog/dialog-rtl.css +1 -1
  99. package/components/dialog/dialog-vars.less +25 -70
  100. package/components/dialog/dialog.css +1 -1
  101. package/components/dialog/dialog.d.ts +2 -2
  102. package/components/dialog/dialog.js +12 -48
  103. package/components/dialog/dialog.lazy.js +1 -1
  104. package/components/dialog/dialog.less +8 -4
  105. package/components/fab/fab-rtl.css +1 -1
  106. package/components/fab/fab-vars.less +20 -14
  107. package/components/fab/fab.css +1 -1
  108. package/components/fab/fab.js +0 -21
  109. package/components/fab/fab.less +50 -53
  110. package/components/form/form.d.ts +4 -4
  111. package/components/form/form.js +58 -94
  112. package/components/form/form.lazy.js +1 -1
  113. package/components/form/form.less +0 -3
  114. package/components/gauge/gauge-class.js +4 -20
  115. package/components/gauge/gauge.js +0 -9
  116. package/components/gauge/gauge.less +0 -3
  117. package/components/grid/grid-rtl.css +1 -1
  118. package/components/grid/grid-vars.less +0 -7
  119. package/components/grid/grid.css +1 -1
  120. package/components/grid/grid.d.ts +2 -8
  121. package/components/grid/grid.js +1 -225
  122. package/components/grid/grid.lazy.js +1 -1
  123. package/components/grid/grid.less +54 -184
  124. package/components/icon/icon.less +0 -3
  125. package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
  126. package/components/infinite-scroll/infinite-scroll.css +1 -1
  127. package/components/infinite-scroll/infinite-scroll.js +0 -16
  128. package/components/infinite-scroll/infinite-scroll.less +0 -3
  129. package/components/input/input-ios.less +49 -41
  130. package/components/input/input-md.less +87 -19
  131. package/components/input/input-rtl.css +1 -1
  132. package/components/input/input-vars.less +26 -60
  133. package/components/input/input.css +1 -1
  134. package/components/input/input.js +8 -67
  135. package/components/input/input.less +67 -153
  136. package/components/link/link-vars.less +0 -5
  137. package/components/link/link.less +3 -3
  138. package/components/list/list-md.less +0 -7
  139. package/components/list/list-vars.less +59 -108
  140. package/components/list/list.less +122 -90
  141. package/components/list-index/list-index-class.js +12 -69
  142. package/components/list-index/list-index-rtl.css +1 -1
  143. package/components/list-index/list-index-vars.less +0 -7
  144. package/components/list-index/list-index.css +1 -1
  145. package/components/list-index/list-index.d.ts +1 -3
  146. package/components/list-index/list-index.js +0 -8
  147. package/components/list-index/list-index.lazy.js +1 -1
  148. package/components/list-index/list-index.less +4 -7
  149. package/components/login-screen/login-screen-class.js +4 -9
  150. package/components/login-screen/login-screen-rtl.css +1 -1
  151. package/components/login-screen/login-screen-vars.less +13 -12
  152. package/components/login-screen/login-screen.css +1 -1
  153. package/components/login-screen/login-screen.js +0 -4
  154. package/components/login-screen/login-screen.less +2 -8
  155. package/components/messagebar/messagebar-class.js +18 -79
  156. package/components/messagebar/messagebar-ios.less +36 -0
  157. package/components/messagebar/messagebar-md.less +96 -16
  158. package/components/messagebar/messagebar-rtl.css +1 -1
  159. package/components/messagebar/messagebar-vars.less +27 -50
  160. package/components/messagebar/messagebar.css +1 -1
  161. package/components/messagebar/messagebar.js +0 -8
  162. package/components/messagebar/messagebar.less +11 -42
  163. package/components/messages/messages-class.js +17 -110
  164. package/components/messages/messages-ios.less +9 -0
  165. package/components/messages/messages-md.less +63 -28
  166. package/components/messages/messages-rtl.css +1 -1
  167. package/components/messages/messages-vars.less +43 -50
  168. package/components/messages/messages.css +1 -1
  169. package/components/messages/messages.js +0 -8
  170. package/components/messages/messages.lazy.js +1 -1
  171. package/components/messages/messages.less +0 -11
  172. package/components/modal/custom-modal-class.js +4 -14
  173. package/components/modal/modal-class.js +19 -55
  174. package/components/modal/modal.js +0 -3
  175. package/components/navbar/navbar-ios.less +3 -39
  176. package/components/navbar/navbar-md.less +12 -0
  177. package/components/navbar/navbar-vars.less +20 -49
  178. package/components/navbar/navbar.d.ts +0 -2
  179. package/components/navbar/navbar.js +37 -166
  180. package/components/navbar/navbar.less +4 -26
  181. package/components/notification/notification-class.js +4 -39
  182. package/components/notification/notification-md.less +18 -8
  183. package/components/notification/notification-rtl.css +1 -1
  184. package/components/notification/notification-vars.less +15 -54
  185. package/components/notification/notification.css +1 -1
  186. package/components/notification/notification.js +0 -2
  187. package/components/notification/notification.lazy.js +1 -1
  188. package/components/notification/notification.less +0 -3
  189. package/components/page/page-md.less +40 -10
  190. package/components/page/page-transitions/circle.less +15 -9
  191. package/components/page/page-transitions/fade.less +17 -11
  192. package/components/page/page-transitions/flip.less +9 -4
  193. package/components/page/page-vars.less +3 -19
  194. package/components/page/page.less +2 -10
  195. package/components/panel/panel-class.js +23 -127
  196. package/components/panel/panel-md.less +9 -0
  197. package/components/panel/panel-rtl.css +1 -1
  198. package/components/panel/panel-vars.less +7 -21
  199. package/components/panel/panel.css +1 -1
  200. package/components/panel/panel.d.ts +2 -2
  201. package/components/panel/panel.js +0 -34
  202. package/components/panel/panel.lazy.js +1 -1
  203. package/components/panel/panel.less +56 -48
  204. package/components/panel/resizable-panel.js +2 -32
  205. package/components/panel/swipe-panel.js +16 -71
  206. package/components/photo-browser/photo-browser-class.js +41 -171
  207. package/components/photo-browser/photo-browser-rtl.css +1 -1
  208. package/components/photo-browser/photo-browser-vars.less +0 -3
  209. package/components/photo-browser/photo-browser.css +1 -1
  210. package/components/photo-browser/photo-browser.d.ts +2 -4
  211. package/components/photo-browser/photo-browser.js +1 -6
  212. package/components/photo-browser/photo-browser.lazy.js +1 -1
  213. package/components/photo-browser/photo-browser.less +0 -4
  214. package/components/picker/picker-class.js +26 -133
  215. package/components/picker/picker-column.js +11 -31
  216. package/components/picker/picker-ios.less +10 -0
  217. package/components/picker/picker-md.less +6 -0
  218. package/components/picker/picker-rtl.css +1 -1
  219. package/components/picker/picker-vars.less +9 -25
  220. package/components/picker/picker.css +1 -1
  221. package/components/picker/picker.js +0 -4
  222. package/components/picker/picker.lazy.js +1 -1
  223. package/components/picker/picker.less +0 -11
  224. package/components/pie-chart/pie-chart-class.js +8 -31
  225. package/components/pie-chart/pie-chart.js +0 -3
  226. package/components/pie-chart/pie-chart.less +0 -3
  227. package/components/popover/popover-class.js +72 -126
  228. package/components/popover/popover-ios.less +0 -50
  229. package/components/popover/popover-rtl.css +1 -1
  230. package/components/popover/popover-vars.less +6 -23
  231. package/components/popover/popover.css +1 -1
  232. package/components/popover/popover.d.ts +2 -0
  233. package/components/popover/popover.js +1 -12
  234. package/components/popover/popover.lazy.js +1 -1
  235. package/components/popover/popover.less +62 -5
  236. package/components/popup/popup-class.js +12 -78
  237. package/components/popup/popup-rtl.css +1 -1
  238. package/components/popup/popup-vars.less +7 -9
  239. package/components/popup/popup.css +1 -1
  240. package/components/popup/popup.js +0 -4
  241. package/components/popup/popup.lazy.js +1 -1
  242. package/components/popup/popup.less +4 -4
  243. package/components/preloader/preloader-ios.less +3 -1
  244. package/components/preloader/preloader-md.less +5 -1
  245. package/components/preloader/preloader-rtl.css +1 -1
  246. package/components/preloader/preloader-vars.less +0 -6
  247. package/components/preloader/preloader.css +1 -1
  248. package/components/preloader/preloader.js +8 -25
  249. package/components/preloader/preloader.lazy.js +1 -1
  250. package/components/preloader/preloader.less +6 -3
  251. package/components/progressbar/progressbar-rtl.css +1 -1
  252. package/components/progressbar/progressbar-vars.less +2 -12
  253. package/components/progressbar/progressbar.css +1 -1
  254. package/components/progressbar/progressbar.js +2 -31
  255. package/components/progressbar/progressbar.less +0 -3
  256. package/components/pull-to-refresh/pull-to-refresh-class.js +15 -107
  257. package/components/pull-to-refresh/pull-to-refresh-md.less +2 -1
  258. package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
  259. package/components/pull-to-refresh/pull-to-refresh-vars.less +0 -4
  260. package/components/pull-to-refresh/pull-to-refresh.css +1 -1
  261. package/components/pull-to-refresh/pull-to-refresh.js +0 -8
  262. package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
  263. package/components/pull-to-refresh/pull-to-refresh.less +0 -3
  264. package/components/radio/radio-rtl.css +1 -1
  265. package/components/radio/radio-vars.less +0 -7
  266. package/components/radio/radio.css +1 -1
  267. package/components/radio/radio.less +12 -5
  268. package/components/range/range-class.js +27 -112
  269. package/components/range/range-rtl.css +1 -1
  270. package/components/range/range-vars.less +10 -32
  271. package/components/range/range.css +1 -1
  272. package/components/range/range.js +0 -12
  273. package/components/range/range.less +0 -3
  274. package/components/searchbar/remove-diacritics.js +0 -4
  275. package/components/searchbar/searchbar-class.js +17 -138
  276. package/components/searchbar/searchbar-md.less +41 -16
  277. package/components/searchbar/searchbar-rtl.css +1 -1
  278. package/components/searchbar/searchbar-vars.less +25 -76
  279. package/components/searchbar/searchbar.css +1 -1
  280. package/components/searchbar/searchbar.d.ts +2 -2
  281. package/components/searchbar/searchbar.js +0 -15
  282. package/components/searchbar/searchbar.lazy.js +1 -1
  283. package/components/searchbar/searchbar.less +14 -28
  284. package/components/sheet/sheet-class.js +15 -110
  285. package/components/sheet/sheet-rtl.css +1 -1
  286. package/components/sheet/sheet-vars.less +17 -6
  287. package/components/sheet/sheet.css +1 -1
  288. package/components/sheet/sheet.js +0 -9
  289. package/components/sheet/sheet.lazy.js +1 -1
  290. package/components/sheet/sheet.less +10 -3
  291. package/components/skeleton/skeleton.less +1 -4
  292. package/components/smart-select/smart-select-class.js +36 -173
  293. package/components/smart-select/smart-select.d.ts +1 -3
  294. package/components/smart-select/smart-select.js +1 -14
  295. package/components/smart-select/smart-select.lazy.js +1 -1
  296. package/components/smart-select/smart-select.less +0 -3
  297. package/components/sortable/sortable-rtl.css +1 -1
  298. package/components/sortable/sortable-vars.less +8 -8
  299. package/components/sortable/sortable.css +1 -1
  300. package/components/sortable/sortable.js +0 -44
  301. package/components/sortable/sortable.less +0 -3
  302. package/components/statusbar/statusbar.js +0 -36
  303. package/components/statusbar/statusbar.less +0 -3
  304. package/components/stepper/stepper-class.js +10 -83
  305. package/components/stepper/stepper-rtl.css +1 -1
  306. package/components/stepper/stepper-vars.less +12 -24
  307. package/components/stepper/stepper.css +1 -1
  308. package/components/stepper/stepper.js +0 -12
  309. package/components/stepper/stepper.less +12 -23
  310. package/components/subnavbar/subnavbar-vars.less +3 -18
  311. package/components/subnavbar/subnavbar.js +0 -3
  312. package/components/subnavbar/subnavbar.less +1 -11
  313. package/components/swipeout/swipeout-rtl.css +1 -1
  314. package/components/swipeout/swipeout-vars.less +7 -6
  315. package/components/swipeout/swipeout.css +1 -1
  316. package/components/swipeout/swipeout.js +2 -99
  317. package/components/swipeout/swipeout.less +2 -7
  318. package/components/swiper/swiper-rtl.css +1 -1
  319. package/components/swiper/swiper.css +1 -1
  320. package/components/swiper/swiper.js +9 -30
  321. package/components/swiper/swiper.lazy.js +1 -1
  322. package/components/swiper/swiper.less +1 -16
  323. package/components/tabs/tabs-rtl.css +1 -1
  324. package/components/tabs/tabs.css +1 -1
  325. package/components/tabs/tabs.js +23 -60
  326. package/components/tabs/tabs.lazy.js +1 -1
  327. package/components/tabs/tabs.less +1 -3
  328. package/components/text-editor/text-editor-class.js +16 -102
  329. package/components/text-editor/text-editor-rtl.css +1 -1
  330. package/components/text-editor/text-editor-vars.less +12 -16
  331. package/components/text-editor/text-editor.css +1 -1
  332. package/components/text-editor/text-editor.js +0 -8
  333. package/components/text-editor/text-editor.lazy.js +1 -1
  334. package/components/text-editor/text-editor.less +0 -6
  335. package/components/timeline/timeline-rtl.css +1 -1
  336. package/components/timeline/timeline-vars.less +13 -47
  337. package/components/timeline/timeline.css +1 -1
  338. package/components/timeline/timeline.less +2 -9
  339. package/components/toast/toast-class.js +2 -16
  340. package/components/toast/toast-rtl.css +1 -1
  341. package/components/toast/toast-vars.less +5 -9
  342. package/components/toast/toast.css +1 -1
  343. package/components/toast/toast.js +0 -3
  344. package/components/toast/toast.less +0 -3
  345. package/components/toggle/toggle-class.js +6 -30
  346. package/components/toggle/toggle-ios.less +5 -1
  347. package/components/toggle/toggle-md.less +27 -11
  348. package/components/toggle/toggle-rtl.css +1 -1
  349. package/components/toggle/toggle-vars.less +19 -21
  350. package/components/toggle/toggle.css +1 -1
  351. package/components/toggle/toggle.js +0 -8
  352. package/components/toggle/toggle.less +0 -4
  353. package/components/toolbar/toolbar-ios.less +2 -2
  354. package/components/toolbar/toolbar-md.less +28 -4
  355. package/components/toolbar/toolbar-vars.less +17 -52
  356. package/components/toolbar/toolbar.js +5 -43
  357. package/components/toolbar/toolbar.less +27 -45
  358. package/components/tooltip/tooltip-class.js +10 -64
  359. package/components/tooltip/tooltip-rtl.css +1 -1
  360. package/components/tooltip/tooltip-vars.less +12 -3
  361. package/components/tooltip/tooltip.css +1 -1
  362. package/components/tooltip/tooltip.js +0 -15
  363. package/components/tooltip/tooltip.less +0 -3
  364. package/components/touch-ripple/touch-ripple-class.js +0 -13
  365. package/components/touch-ripple/touch-ripple.js +0 -4
  366. package/components/touch-ripple/touch-ripple.less +1 -5
  367. package/components/treeview/treeview-rtl.css +1 -1
  368. package/components/treeview/treeview-vars.less +0 -3
  369. package/components/treeview/treeview.css +1 -1
  370. package/components/treeview/treeview.js +2 -11
  371. package/components/treeview/treeview.lazy.js +1 -1
  372. package/components/treeview/treeview.less +0 -3
  373. package/components/typography/typography-rtl.css +1 -1
  374. package/components/typography/typography.css +1 -1
  375. package/components/typography/typography.less +25 -3
  376. package/components/view/resizable-view.js +2 -24
  377. package/components/view/view-class.js +28 -53
  378. package/components/view/view.d.ts +0 -14
  379. package/components/view/view.js +8 -32
  380. package/components/view/view.less +1 -4
  381. package/components/virtual-list/virtual-list-class.js +58 -146
  382. package/components/virtual-list/virtual-list.d.ts +1 -1
  383. package/components/virtual-list/virtual-list.js +0 -2
  384. package/components/virtual-list/virtual-list.lazy.js +1 -1
  385. package/components/virtual-list/virtual-list.less +0 -3
  386. package/framework7-bundle-rtl.css +3593 -5977
  387. package/framework7-bundle-rtl.min.css +3 -3
  388. package/framework7-bundle.css +3591 -5978
  389. package/framework7-bundle.esm.js +4 -10
  390. package/framework7-bundle.js +6063 -12044
  391. package/framework7-bundle.js.map +1 -1
  392. package/framework7-bundle.less +2 -27
  393. package/framework7-bundle.min.css +3 -3
  394. package/framework7-bundle.min.js +3 -3
  395. package/framework7-bundle.min.js.map +1 -1
  396. package/framework7-lite-bundle.esm.js +4 -10
  397. package/framework7-lite.esm.js +4 -6
  398. package/framework7-lite.js +31 -0
  399. package/framework7-rtl.css +803 -1591
  400. package/framework7-rtl.min.css +3 -3
  401. package/framework7-types.d.ts +1 -32
  402. package/framework7.css +803 -1594
  403. package/framework7.d.ts +1 -32
  404. package/framework7.esm.js +4 -6
  405. package/framework7.js +1770 -3407
  406. package/framework7.js.map +1 -1
  407. package/framework7.less +2 -23
  408. package/framework7.min.css +3 -3
  409. package/framework7.min.js +3 -3
  410. package/framework7.min.js.map +1 -1
  411. package/less/mixins.less +7 -88
  412. package/less/plugin.js +15 -0
  413. package/modules/clicks/clicks.js +10 -22
  414. package/modules/component/$h.js +0 -3
  415. package/modules/component/$jsx.js +0 -5
  416. package/modules/component/component-class.js +13 -66
  417. package/modules/component/component.d.ts +1 -2
  418. package/modules/component/component.js +0 -8
  419. package/modules/component/eventslisteners.js +12 -20
  420. package/modules/component/parse-component.js +18 -20
  421. package/modules/component/snabbdom/h.js +3 -12
  422. package/modules/component/snabbdom/helpers/attachto.js +9 -14
  423. package/modules/component/snabbdom/htmldomapi.js +0 -16
  424. package/modules/component/snabbdom/modules/attributes.js +7 -11
  425. package/modules/component/snabbdom/modules/class.js +4 -8
  426. package/modules/component/snabbdom/modules/dataset.js +3 -7
  427. package/modules/component/snabbdom/modules/eventlisteners.js +16 -22
  428. package/modules/component/snabbdom/modules/hero.js +4 -44
  429. package/modules/component/snabbdom/modules/props.js +5 -9
  430. package/modules/component/snabbdom/modules/style.js +13 -30
  431. package/modules/component/snabbdom/snabbdom.bundle.js +0 -6
  432. package/modules/component/snabbdom/snabbdom.js +13 -72
  433. package/modules/component/snabbdom/thunk.js +3 -11
  434. package/modules/component/snabbdom/tovnode.js +1 -6
  435. package/modules/component/vdom.js +4 -62
  436. package/modules/demo-module.js +0 -8
  437. package/modules/device/device.js +6 -11
  438. package/modules/history/history.js +0 -1
  439. package/modules/resize/resize.js +8 -11
  440. package/modules/router/async-component.js +0 -3
  441. package/modules/router/back.js +86 -275
  442. package/modules/router/clear-previous-history.js +5 -18
  443. package/modules/router/component-loader.js +4 -25
  444. package/modules/router/modal.js +16 -43
  445. package/modules/router/navigate.js +80 -249
  446. package/modules/router/process-route-queue.js +0 -12
  447. package/modules/router/redirect.js +0 -8
  448. package/modules/router/router-class.js +92 -315
  449. package/modules/router/router.d.ts +3 -5
  450. package/modules/router/router.js +0 -3
  451. package/modules/router/swipe-back.js +35 -139
  452. package/modules/router/tab.js +14 -43
  453. package/modules/service-worker/service-worker.js +0 -11
  454. package/modules/store/create-store.js +10 -29
  455. package/modules/touch/touch.d.ts +2 -4
  456. package/modules/touch/touch.js +13 -108
  457. package/package.json +4 -18
  458. package/shared/$jsx.js +0 -6
  459. package/shared/class.js +18 -43
  460. package/shared/constructor-methods.js +0 -11
  461. package/shared/events-class.js +0 -17
  462. package/shared/get-device.js +18 -34
  463. package/shared/get-support.js +2 -8
  464. package/shared/history.js +2 -30
  465. package/shared/material-color-utils.js +728 -0
  466. package/shared/material-colors.js +75 -0
  467. package/shared/modal-methods.js +0 -18
  468. package/shared/utils.d.ts +0 -4
  469. package/shared/utils.js +191 -71
  470. package/components/accordion/accordion-aurora.less +0 -2
  471. package/components/actions/actions-aurora.less +0 -9
  472. package/components/app/app-aurora.less +0 -10
  473. package/components/appbar/appbar-aurora.less +0 -2
  474. package/components/appbar/appbar-ios.less +0 -2
  475. package/components/appbar/appbar-md.less +0 -2
  476. package/components/appbar/appbar-rtl.css +0 -1
  477. package/components/appbar/appbar-vars.less +0 -28
  478. package/components/appbar/appbar.css +0 -1
  479. package/components/appbar/appbar.d.ts +0 -14
  480. package/components/appbar/appbar.js +0 -3
  481. package/components/appbar/appbar.lazy.js +0 -1
  482. package/components/appbar/appbar.less +0 -106
  483. package/components/area-chart/area-chart-aurora.less +0 -2
  484. package/components/autocomplete/autocomplete-aurora.less +0 -17
  485. package/components/badge/badge-aurora.less +0 -2
  486. package/components/block/block-aurora.less +0 -2
  487. package/components/breadcrumbs/breadcrumbs-aurora.less +0 -2
  488. package/components/button/button-aurora.less +0 -25
  489. package/components/calendar/calendar-aurora.less +0 -2
  490. package/components/card/card-aurora.less +0 -2
  491. package/components/checkbox/checkbox-aurora.less +0 -39
  492. package/components/chip/chip-aurora.less +0 -14
  493. package/components/color-picker/color-picker-aurora.less +0 -2
  494. package/components/contacts-list/contacts-list-aurora.less +0 -2
  495. package/components/data-table/data-table-aurora.less +0 -64
  496. package/components/dialog/dialog-aurora.less +0 -112
  497. package/components/elevation/elevation-aurora.less +0 -2
  498. package/components/elevation/elevation-ios.less +0 -2
  499. package/components/elevation/elevation-md.less +0 -2
  500. package/components/elevation/elevation-rtl.css +0 -1
  501. package/components/elevation/elevation-vars.less +0 -51
  502. package/components/elevation/elevation.css +0 -1
  503. package/components/elevation/elevation.d.ts +0 -14
  504. package/components/elevation/elevation.js +0 -3
  505. package/components/elevation/elevation.lazy.js +0 -1
  506. package/components/elevation/elevation.less +0 -54
  507. package/components/fab/fab-aurora.less +0 -2
  508. package/components/form/form-aurora.less +0 -0
  509. package/components/gauge/gauge-aurora.less +0 -2
  510. package/components/grid/grid-aurora.less +0 -2
  511. package/components/icon/icon-aurora.less +0 -49
  512. package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
  513. package/components/input/input-aurora.less +0 -120
  514. package/components/lazy/lazy-aurora.less +0 -2
  515. package/components/lazy/lazy-ios.less +0 -2
  516. package/components/lazy/lazy-md.less +0 -2
  517. package/components/lazy/lazy-rtl.css +0 -1
  518. package/components/lazy/lazy.css +0 -1
  519. package/components/lazy/lazy.d.ts +0 -57
  520. package/components/lazy/lazy.js +0 -283
  521. package/components/lazy/lazy.lazy.js +0 -1
  522. package/components/lazy/lazy.less +0 -23
  523. package/components/link/link-aurora.less +0 -15
  524. package/components/list/list-aurora.less +0 -25
  525. package/components/list-index/list-index-aurora.less +0 -21
  526. package/components/login-screen/login-screen-aurora.less +0 -2
  527. package/components/menu/menu-aurora.less +0 -8
  528. package/components/menu/menu-ios.less +0 -2
  529. package/components/menu/menu-md.less +0 -2
  530. package/components/menu/menu-rtl.css +0 -1
  531. package/components/menu/menu-vars.less +0 -27
  532. package/components/menu/menu.css +0 -1
  533. package/components/menu/menu.d.ts +0 -32
  534. package/components/menu/menu.js +0 -87
  535. package/components/menu/menu.lazy.js +0 -1
  536. package/components/menu/menu.less +0 -232
  537. package/components/messagebar/messagebar-aurora.less +0 -53
  538. package/components/messages/messages-aurora.less +0 -137
  539. package/components/navbar/navbar-aurora.less +0 -70
  540. package/components/notification/notification-aurora.less +0 -59
  541. package/components/page/page-aurora.less +0 -49
  542. package/components/panel/panel-aurora.less +0 -2
  543. package/components/photo-browser/photo-browser-aurora.less +0 -2
  544. package/components/picker/picker-aurora.less +0 -2
  545. package/components/pie-chart/pie-chart-aurora.less +0 -2
  546. package/components/popover/popover-aurora.less +0 -56
  547. package/components/popup/popup-aurora.less +0 -2
  548. package/components/preloader/preloader-aurora.less +0 -53
  549. package/components/progressbar/progressbar-aurora.less +0 -72
  550. package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
  551. package/components/radio/radio-aurora.less +0 -86
  552. package/components/range/range-aurora.less +0 -9
  553. package/components/searchbar/searchbar-aurora.less +0 -86
  554. package/components/sheet/sheet-aurora.less +0 -2
  555. package/components/skeleton/skeleton-aurora.less +0 -2
  556. package/components/smart-select/smart-select-aurora.less +0 -2
  557. package/components/sortable/sortable-aurora.less +0 -7
  558. package/components/statusbar/statusbar-aurora.less +0 -2
  559. package/components/stepper/stepper-aurora.less +0 -32
  560. package/components/subnavbar/subnavbar-aurora.less +0 -51
  561. package/components/swipeout/swipeout-aurora.less +0 -2
  562. package/components/swiper/swiper-aurora.less +0 -2
  563. package/components/tabs/tabs-aurora.less +0 -2
  564. package/components/text-editor/text-editor-aurora.less +0 -9
  565. package/components/timeline/timeline-aurora.less +0 -7
  566. package/components/toast/toast-aurora.less +0 -64
  567. package/components/toggle/toggle-aurora.less +0 -26
  568. package/components/toolbar/toolbar-aurora.less +0 -43
  569. package/components/tooltip/tooltip-aurora.less +0 -2
  570. package/components/touch-ripple/touch-ripple-aurora.less +0 -2
  571. package/components/treeview/treeview-aurora.less +0 -31
  572. package/components/typography/typography-aurora.less +0 -2
  573. package/components/view/view-aurora.less +0 -2
  574. package/components/virtual-list/virtual-list-aurora.less +0 -2
  575. package/modules/request/request.d.ts +0 -15
  576. package/modules/request/request.js +0 -11
  577. package/postinstall.js +0 -3
  578. package/shared/request.d.ts +0 -115
  579. package/shared/request.js +0 -512
@@ -3,7 +3,6 @@ import htmlDomApi from './htmldomapi.js';
3
3
  export function toVNode(node, domApi) {
4
4
  var api = domApi !== undefined ? domApi : htmlDomApi;
5
5
  var text;
6
-
7
6
  if (api.isElement(node)) {
8
7
  var id = node.id ? '#' + node.id : '';
9
8
  var cn = node.getAttribute('class');
@@ -13,22 +12,18 @@ export function toVNode(node, domApi) {
13
12
  var children = [];
14
13
  var name_1;
15
14
  var i = void 0,
16
- n = void 0;
15
+ n = void 0;
17
16
  var elmAttrs = node.attributes;
18
17
  var elmChildren = node.childNodes;
19
-
20
18
  for (i = 0, n = elmAttrs.length; i < n; i++) {
21
19
  name_1 = elmAttrs[i].nodeName;
22
-
23
20
  if (name_1 !== 'id' && name_1 !== 'class') {
24
21
  attrs[name_1] = elmAttrs[i].nodeValue;
25
22
  }
26
23
  }
27
-
28
24
  for (i = 0, n = elmChildren.length; i < n; i++) {
29
25
  children.push(toVNode(elmChildren[i]));
30
26
  }
31
-
32
27
  return vnode(sel, {
33
28
  attrs: attrs
34
29
  }, children, undefined, node);
@@ -1,5 +1,4 @@
1
1
  /* eslint no-use-before-define: "off" */
2
-
3
2
  /* eslint import/no-named-as-default: "off" */
4
3
  import h from './snabbdom/h.js';
5
4
  import customComponents from './custom-components.js';
@@ -7,37 +6,30 @@ import { isObject, eventNameToColonCase } from '../../shared/utils.js';
7
6
  const SELF_CLOSING = 'area base br col command embed hr img input keygen link menuitem meta param source track wbr'.split(' ');
8
7
  const PROPS_ATTRS = 'hidden checked disabled readonly selected autofocus autoplay required multiple value indeterminate routeProps innerHTML'.split(' ');
9
8
  const BOOLEAN_PROPS = 'hidden checked disabled readonly selected autofocus autoplay required multiple readOnly indeterminate'.split(' ');
10
-
11
9
  const getTagName = treeNode => {
12
10
  return typeof treeNode.type === 'function' ? treeNode.type.name || 'CustomComponent' : treeNode.type;
13
11
  };
14
-
15
12
  const toCamelCase = name => {
16
13
  return name.split('-').map((word, index) => {
17
14
  if (index === 0) return word.toLowerCase();
18
15
  return word[0].toUpperCase() + word.substr(1);
19
16
  }).join('');
20
17
  };
21
-
22
18
  const propsFromAttrs = function () {
23
19
  const context = {};
24
-
25
20
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
21
  args[_key] = arguments[_key];
27
22
  }
28
-
29
23
  args.forEach(function (obj) {
30
24
  if (obj === void 0) {
31
25
  obj = {};
32
26
  }
33
-
34
27
  Object.keys(obj).forEach(key => {
35
28
  context[toCamelCase(key)] = obj[key];
36
29
  });
37
30
  });
38
31
  return context;
39
32
  };
40
-
41
33
  const createCustomComponent = _ref => {
42
34
  let {
43
35
  f7,
@@ -54,13 +46,11 @@ const createCustomComponent = _ref => {
54
46
  Object.keys(vnode.data.on).forEach(eventName => {
55
47
  c.$el.on(eventName, vnode.data.on[eventName]);
56
48
  });
57
- } // eslint-disable-next-line
58
-
59
-
49
+ }
50
+ // eslint-disable-next-line
60
51
  vnode.elm.__component__ = c;
61
52
  });
62
53
  };
63
-
64
54
  const updateCustomComponent = vnode => {
65
55
  // eslint-disable-next-line
66
56
  const component = vnode && vnode.elm && vnode.elm.__component__;
@@ -70,23 +60,19 @@ const updateCustomComponent = vnode => {
70
60
  Object.assign(component.props, newProps);
71
61
  component.update();
72
62
  };
73
-
74
63
  const destroyCustomComponent = vnode => {
75
64
  // eslint-disable-next-line
76
65
  const component = vnode && vnode.elm && vnode.elm.__component__;
77
-
78
66
  if (component) {
79
67
  const {
80
68
  el,
81
69
  $el
82
70
  } = component;
83
-
84
71
  if (vnode.data && vnode.data.on && $el) {
85
72
  Object.keys(vnode.data.on).forEach(eventName => {
86
73
  $el.off(eventName, vnode.data.on[eventName]);
87
74
  });
88
75
  }
89
-
90
76
  if (component.destroy) component.destroy();
91
77
  if (el && el.parentNode) el.parentNode.removeChild(el);
92
78
  delete vnode.elm.__component__; // eslint-disable-line
@@ -96,7 +82,6 @@ const destroyCustomComponent = vnode => {
96
82
  const isCustomComponent = treeNodeType => {
97
83
  return typeof treeNodeType === 'function' || treeNodeType && treeNodeType.indexOf('-') > 0 && customComponents[treeNodeType];
98
84
  };
99
-
100
85
  function getHooks(treeNode, data, f7, initial, isRoot) {
101
86
  const hooks = {};
102
87
  const insert = [];
@@ -105,15 +90,12 @@ function getHooks(treeNode, data, f7, initial, isRoot) {
105
90
  const postpatch = [];
106
91
  let isFakeElement = false;
107
92
  let tagName = getTagName(treeNode);
108
-
109
93
  if (data && data.attrs && data.attrs.component) {
110
94
  tagName = data.attrs.component;
111
95
  delete data.attrs.component;
112
96
  isFakeElement = true;
113
97
  }
114
-
115
98
  const isCustom = isCustomComponent(treeNode.type);
116
-
117
99
  if (isCustom) {
118
100
  insert.push(vnode => {
119
101
  if (vnode.sel !== tagName && !isFakeElement) return;
@@ -131,7 +113,6 @@ function getHooks(treeNode, data, f7, initial, isRoot) {
131
113
  updateCustomComponent(vnode);
132
114
  });
133
115
  }
134
-
135
116
  if (!isCustom) {
136
117
  if (!data || !data.attrs || !data.attrs.class) return hooks;
137
118
  const classNames = data.attrs.class;
@@ -139,55 +120,45 @@ function getHooks(treeNode, data, f7, initial, isRoot) {
139
120
  if (!initial) {
140
121
  insert.push(...f7.getVnodeHooks('insert', className));
141
122
  }
142
-
143
123
  destroy.push(...f7.getVnodeHooks('destroy', className));
144
124
  update.push(...f7.getVnodeHooks('update', className));
145
125
  postpatch.push(...f7.getVnodeHooks('postpatch', className));
146
126
  });
147
127
  }
148
-
149
128
  if (isRoot && !initial) {
150
129
  postpatch.push((oldVnode, vnode) => {
151
130
  const vn = vnode || oldVnode;
152
131
  if (!vn) return;
153
-
154
132
  if (vn.data && vn.data.component) {
155
133
  vn.data.component.hook('onUpdated');
156
134
  }
157
135
  });
158
136
  }
159
-
160
137
  if (insert.length === 0 && destroy.length === 0 && update.length === 0 && postpatch.length === 0) {
161
138
  return hooks;
162
139
  }
163
-
164
140
  if (insert.length) {
165
141
  hooks.insert = vnode => {
166
142
  insert.forEach(f => f(vnode));
167
143
  };
168
144
  }
169
-
170
145
  if (destroy.length) {
171
146
  hooks.destroy = vnode => {
172
147
  destroy.forEach(f => f(vnode));
173
148
  };
174
149
  }
175
-
176
150
  if (update.length) {
177
151
  hooks.update = (oldVnode, vnode) => {
178
152
  update.forEach(f => f(oldVnode, vnode));
179
153
  };
180
154
  }
181
-
182
155
  if (postpatch.length) {
183
156
  hooks.postpatch = (oldVnode, vnode) => {
184
157
  postpatch.forEach(f => f(oldVnode, vnode));
185
158
  };
186
159
  }
187
-
188
160
  return hooks;
189
161
  }
190
-
191
162
  const getEventHandler = function (eventHandler, _temp) {
192
163
  let {
193
164
  stop,
@@ -195,7 +166,6 @@ const getEventHandler = function (eventHandler, _temp) {
195
166
  once
196
167
  } = _temp === void 0 ? {} : _temp;
197
168
  let fired = false;
198
-
199
169
  function handler() {
200
170
  const e = arguments.length <= 0 ? undefined : arguments[0];
201
171
  if (once && fired) return;
@@ -204,10 +174,8 @@ const getEventHandler = function (eventHandler, _temp) {
204
174
  fired = true;
205
175
  eventHandler(...arguments);
206
176
  }
207
-
208
177
  return handler;
209
178
  };
210
-
211
179
  const getData = (treeNode, component, f7, initial, isRoot) => {
212
180
  const data = {
213
181
  component,
@@ -217,26 +185,21 @@ const getData = (treeNode, component, f7, initial, isRoot) => {
217
185
  Object.keys(treeNode.props).forEach(attrName => {
218
186
  const attrValue = treeNode.props[attrName];
219
187
  if (typeof attrValue === 'undefined') return;
220
-
221
188
  if (PROPS_ATTRS.indexOf(attrName) >= 0) {
222
189
  // Props
223
190
  if (!data.props) data.props = {};
224
-
225
191
  if (attrName === 'readonly') {
226
192
  // eslint-disable-next-line
227
193
  attrName = 'readOnly';
228
194
  }
229
-
230
195
  if (attrName === 'routeProps') {
231
196
  // eslint-disable-next-line
232
197
  attrName = 'f7RouteProps';
233
198
  }
234
-
235
199
  if (tagName === 'option' && attrName === 'value') {
236
200
  if (!data.attrs) data.attrs = {};
237
201
  data.attrs.value = attrValue;
238
202
  }
239
-
240
203
  if (BOOLEAN_PROPS.indexOf(attrName) >= 0) {
241
204
  // eslint-disable-next-line
242
205
  data.props[attrName] = attrValue === false ? false : true;
@@ -253,7 +216,6 @@ const getData = (treeNode, component, f7, initial, isRoot) => {
253
216
  let stop = false;
254
217
  let prevent = false;
255
218
  let once = false;
256
-
257
219
  if (eventName.indexOf('.') >= 0) {
258
220
  eventName.split('.').forEach((eventNamePart, eventNameIndex) => {
259
221
  if (eventNameIndex === 0) eventName = eventNamePart;else {
@@ -263,7 +225,6 @@ const getData = (treeNode, component, f7, initial, isRoot) => {
263
225
  }
264
226
  });
265
227
  }
266
-
267
228
  data.on[eventName] = getEventHandler(attrValue, {
268
229
  stop,
269
230
  prevent,
@@ -280,98 +241,79 @@ const getData = (treeNode, component, f7, initial, isRoot) => {
280
241
  } else {
281
242
  // Rest of attribures
282
243
  if (!data.attrs) data.attrs = {};
283
- data.attrs[attrName] = attrValue; // ID -> Key
244
+ data.attrs[attrName] = attrValue;
284
245
 
246
+ // ID -> Key
285
247
  if (attrName === 'id' && !data.key && !isRoot) {
286
248
  data.key = attrValue;
287
249
  }
288
250
  }
289
251
  });
290
252
  const hooks = getHooks(treeNode, data, f7, initial, isRoot);
291
-
292
253
  hooks.prepatch = (oldVnode, vnode) => {
293
254
  if (!oldVnode || !vnode) return;
294
-
295
255
  if (oldVnode && oldVnode.data && oldVnode.data.props) {
296
256
  Object.keys(oldVnode.data.props).forEach(key => {
297
257
  if (BOOLEAN_PROPS.indexOf(key) < 0) return;
298
258
  if (!vnode.data) vnode.data = {};
299
259
  if (!vnode.data.props) vnode.data.props = {};
300
-
301
260
  if (oldVnode.data.props[key] === true && !(key in vnode.data.props)) {
302
261
  vnode.data.props[key] = false;
303
262
  }
304
263
  });
305
264
  }
306
265
  };
307
-
308
266
  data.hook = hooks;
309
267
  return data;
310
268
  };
311
-
312
269
  const getChildren = (treeNode, component, f7, initial) => {
313
270
  if (treeNode && treeNode.type && SELF_CLOSING.indexOf(treeNode.type) >= 0) {
314
271
  return [];
315
272
  }
316
-
317
273
  const children = [];
318
274
  const nodes = treeNode.children;
319
-
320
275
  for (let i = 0; i < nodes.length; i += 1) {
321
276
  const childNode = nodes[i];
322
277
  const child = treeNodeToVNode(childNode, component, f7, initial, false);
323
-
324
278
  if (Array.isArray(child)) {
325
279
  children.push(...child);
326
280
  } else if (child) {
327
281
  children.push(child);
328
282
  }
329
283
  }
330
-
331
284
  return children;
332
285
  };
333
-
334
286
  const getSlots = (treeNode, component, f7, initial) => {
335
287
  const slotName = treeNode.props.name || 'default';
336
288
  const slotNodes = (component.children || []).filter(childTreeNode => {
337
289
  let childSlotName = 'default';
338
-
339
290
  if (childTreeNode.props) {
340
291
  childSlotName = childTreeNode.props.slot || 'default';
341
292
  }
342
-
343
293
  return childSlotName === slotName;
344
294
  });
345
-
346
295
  if (slotNodes.length === 0) {
347
296
  return getChildren(treeNode, component, f7, initial);
348
297
  }
349
-
350
298
  return slotNodes.map(subTreeNode => treeNodeToVNode(subTreeNode, component, f7, initial));
351
299
  };
352
-
353
300
  const isTreeNode = treeNode => {
354
301
  return isObject(treeNode) && 'props' in treeNode && 'type' in treeNode && 'children' in treeNode;
355
302
  };
356
-
357
303
  const treeNodeToVNode = (treeNode, component, f7, initial, isRoot) => {
358
304
  if (!isTreeNode(treeNode)) {
359
305
  return String(treeNode);
360
306
  }
361
-
362
307
  if (treeNode.type === 'slot') {
363
308
  return getSlots(treeNode, component, f7, initial);
364
309
  }
365
-
366
310
  const data = getData(treeNode, component, f7, initial, isRoot);
367
311
  const children = isCustomComponent(treeNode.type) ? [] : getChildren(treeNode, component, f7, initial);
368
312
  return h(getTagName(treeNode), data, children);
369
313
  };
370
-
371
314
  export default function vdom(tree, component, initial) {
372
315
  if (tree === void 0) {
373
316
  tree = {};
374
317
  }
375
-
376
318
  return treeNodeToVNode(tree, component, component.f7, initial, true);
377
319
  }
@@ -1,16 +1,13 @@
1
1
  export default {
2
2
  // Module Name
3
3
  name: 'demo-module',
4
-
5
4
  install(params) {
6
5
  const Class = this;
7
6
  console.log(Class, params);
8
7
  },
9
-
10
8
  create(instance) {
11
9
  console.log('init', instance);
12
10
  },
13
-
14
11
  // App Params related to module
15
12
  params: {
16
13
  a: 1,
@@ -22,7 +19,6 @@ export default {
22
19
  demo() {
23
20
  return 'demo-module-proto-method';
24
21
  },
25
-
26
22
  demoStatic: 'demo-module-proto-static'
27
23
  },
28
24
  // Extend Class, e.g. Class.myMethod
@@ -30,23 +26,19 @@ export default {
30
26
  demo() {
31
27
  return 'demo-module-class-method';
32
28
  },
33
-
34
29
  demoStatic: 'demo-module-class-static'
35
30
  },
36
31
  // Initialized instance Props & Methods
37
32
  instance: {
38
33
  demoProp: true,
39
-
40
34
  demoMethod() {
41
35
  return 'demo-method';
42
36
  }
43
-
44
37
  },
45
38
  // Add Event Listeners
46
39
  on: {
47
40
  demoEvent(a, b) {
48
41
  console.log('demo-event', a, b);
49
42
  }
50
-
51
43
  }
52
44
  };
@@ -13,37 +13,32 @@ export default {
13
13
  const html = document.querySelector('html');
14
14
  const metaStatusbar = document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');
15
15
  if (!html) return;
16
-
17
16
  if (device.standalone && device.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
18
17
  classNames.push('device-full-viewport');
19
- } // Pixel Ratio
20
-
21
-
22
- classNames.push(`device-pixel-ratio-${Math.floor(device.pixelRatio)}`); // OS classes
18
+ }
23
19
 
20
+ // Pixel Ratio
21
+ classNames.push(`device-pixel-ratio-${Math.floor(device.pixelRatio)}`);
22
+ // OS classes
24
23
  if (device.os && !device.desktop) {
25
24
  classNames.push(`device-${device.os}`);
26
25
  } else if (device.desktop) {
27
26
  classNames.push('device-desktop');
28
-
29
27
  if (device.os) {
30
28
  classNames.push(`device-${device.os}`);
31
29
  }
32
30
  }
33
-
34
31
  if (device.cordova) {
35
32
  classNames.push('device-cordova');
36
33
  }
37
-
38
34
  if (device.capacitor) {
39
35
  classNames.push('device-capacitor');
40
- } // Add html classes
41
-
36
+ }
42
37
 
38
+ // Add html classes
43
39
  classNames.forEach(className => {
44
40
  html.classList.add(className);
45
41
  });
46
42
  }
47
-
48
43
  }
49
44
  };
@@ -8,6 +8,5 @@ export default {
8
8
  init() {
9
9
  History.init(this);
10
10
  }
11
-
12
11
  }
13
12
  };
@@ -2,10 +2,8 @@ import { getWindow, getDocument } from 'ssr-window';
2
2
  import { getDevice } from '../../shared/get-device.js';
3
3
  export default {
4
4
  name: 'resize',
5
-
6
5
  create() {
7
6
  const app = this;
8
-
9
7
  app.getSize = () => {
10
8
  if (!app.el) return {
11
9
  width: 0,
@@ -27,27 +25,28 @@ export default {
27
25
  };
28
26
  };
29
27
  },
30
-
31
28
  on: {
32
29
  init() {
33
30
  const app = this;
34
- const window = getWindow(); // Get Size
31
+ const window = getWindow();
35
32
 
36
- app.getSize(); // Emit resize
33
+ // Get Size
34
+ app.getSize();
37
35
 
36
+ // Emit resize
38
37
  window.addEventListener('resize', () => {
39
38
  app.emit('resize');
40
- }, false); // Emit orientationchange
39
+ }, false);
41
40
 
41
+ // Emit orientationchange
42
42
  window.addEventListener('orientationchange', () => {
43
43
  app.emit('orientationchange');
44
44
  });
45
45
  },
46
-
47
46
  orientationchange() {
48
47
  const document = getDocument();
49
- const device = getDevice(); // Fix iPad weird body scroll
50
-
48
+ const device = getDevice();
49
+ // Fix iPad weird body scroll
51
50
  if (device.ipad) {
52
51
  document.body.scrollLeft = 0;
53
52
  setTimeout(() => {
@@ -55,11 +54,9 @@ export default {
55
54
  }, 0);
56
55
  }
57
56
  },
58
-
59
57
  resize() {
60
58
  const app = this;
61
59
  app.getSize();
62
60
  }
63
-
64
61
  }
65
62
  };
@@ -10,14 +10,11 @@ export default function asyncComponent(router, component, resolve, reject) {
10
10
  throw new Error(err);
11
11
  });
12
12
  }
13
-
14
13
  if (component instanceof Promise) {
15
14
  resolvePromise(component);
16
15
  return;
17
16
  }
18
-
19
17
  const asyncComponentResult = component.call(router);
20
-
21
18
  if (asyncComponentResult instanceof Promise) {
22
19
  resolvePromise(asyncComponentResult);
23
20
  } else {