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.
- package/components/accordion/accordion.js +2 -2
- package/components/accordion/{accordion.umd.js → accordion.lazy.js} +1 -1
- package/components/actions/actions-class.js +11 -6
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -0
- package/components/actions/actions.js +13 -4
- package/components/actions/actions.lazy.js +1 -0
- package/components/actions/actions.less +3 -0
- package/components/app/app-class.d.ts +10 -10
- package/components/app/app-class.js +43 -37
- package/components/app/app.less +3 -3
- package/components/app/load-module.js +4 -4
- package/components/appbar/{appbar.umd.js → appbar.lazy.js} +0 -0
- package/components/area-chart/area-chart-class.js +38 -22
- package/components/area-chart/area-chart-rtl.css +1 -1
- package/components/area-chart/area-chart.css +1 -1
- package/components/area-chart/area-chart.js +3 -3
- package/components/area-chart/area-chart.lazy.js +1 -0
- package/components/autocomplete/autocomplete-class.js +10 -6
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.js +3 -3
- package/components/autocomplete/autocomplete.lazy.js +1 -0
- package/components/breadcrumbs/breadcrumbs-aurora.less +2 -0
- package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
- package/components/breadcrumbs/breadcrumbs-md.less +2 -0
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
- package/components/breadcrumbs/breadcrumbs-vars.less +36 -0
- package/components/breadcrumbs/breadcrumbs.css +1 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs/breadcrumbs.js +13 -0
- package/components/breadcrumbs/breadcrumbs.lazy.js +1 -0
- package/components/breadcrumbs/breadcrumbs.less +100 -0
- package/components/calendar/calendar-class.js +222 -130
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +6 -10
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.d.ts +2 -0
- package/components/calendar/calendar.js +9 -4
- package/components/calendar/calendar.lazy.js +1 -0
- package/components/calendar/calendar.less +20 -16
- package/components/card/card-rtl.css +1 -1
- package/components/card/card.css +1 -1
- package/components/card/card.js +27 -7
- package/components/card/card.lazy.js +1 -0
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/{checkbox.umd.js → checkbox.lazy.js} +0 -0
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip.css +1 -1
- package/components/chip/{chip.umd.js → chip.lazy.js} +0 -0
- package/components/color-picker/color-picker-class.js +37 -21
- package/components/color-picker/color-picker-rtl.css +1 -1
- package/components/color-picker/color-picker.css +1 -1
- package/components/color-picker/color-picker.js +8 -4
- package/components/color-picker/{color-picker.umd.js → color-picker.lazy.js} +1 -1
- package/components/color-picker/modules/alpha-slider.js +1 -1
- package/components/color-picker/modules/brightness-slider.js +2 -2
- package/components/color-picker/modules/current-color.js +1 -1
- package/components/color-picker/modules/hex.js +1 -1
- package/components/color-picker/modules/hs-spectrum.js +4 -4
- package/components/color-picker/modules/hsb-sliders.js +3 -3
- package/components/color-picker/modules/hue-slider.js +1 -1
- package/components/color-picker/modules/initial-current-colors.js +1 -1
- package/components/color-picker/modules/palette.js +2 -2
- package/components/color-picker/modules/rgb-bars.js +2 -2
- package/components/color-picker/modules/rgb-sliders.js +2 -2
- package/components/color-picker/modules/sb-spectrum.js +3 -3
- package/components/color-picker/modules/wheel.js +3 -3
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/{contacts-list.umd.js → contacts-list.lazy.js} +0 -0
- package/components/data-table/data-table-class.js +8 -4
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +3 -3
- package/components/data-table/data-table.lazy.js +1 -0
- package/components/dialog/dialog-class.js +5 -5
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.js +33 -9
- package/components/dialog/dialog.lazy.js +1 -0
- package/components/elevation/{elevation.umd.js → elevation.lazy.js} +0 -0
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +17 -5
- package/components/fab/fab.lazy.js +1 -0
- package/components/form/form.js +2 -2
- package/components/form/{form.umd.js → form.lazy.js} +1 -1
- package/components/gauge/gauge-class.js +14 -6
- package/components/gauge/gauge.d.ts +2 -2
- package/components/gauge/gauge.js +4 -4
- package/components/gauge/gauge.lazy.js +1 -0
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.js +2 -2
- package/components/grid/{grid.umd.js → grid.lazy.js} +0 -0
- package/components/infinite-scroll/infinite-scroll.js +2 -2
- package/components/infinite-scroll/{infinite-scroll.umd.js → infinite-scroll.lazy.js} +0 -0
- package/components/input/input-rtl.css +1 -1
- package/components/input/input.css +1 -1
- package/components/input/input.js +8 -4
- package/components/input/input.lazy.js +1 -0
- package/components/input/input.less +1 -1
- package/components/lazy/lazy.js +3 -3
- package/components/lazy/{lazy.umd.js → lazy.lazy.js} +0 -0
- package/components/list-index/list-index-class.js +9 -5
- package/components/list-index/list-index.d.ts +1 -1
- package/components/list-index/list-index.js +4 -4
- package/components/list-index/list-index.lazy.js +1 -0
- package/components/login-screen/login-screen-class.js +3 -3
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +12 -4
- package/components/login-screen/login-screen.lazy.js +1 -0
- package/components/login-screen/login-screen.less +1 -1
- package/components/menu/menu.js +12 -4
- package/components/menu/menu.lazy.js +1 -0
- package/components/messagebar/messagebar-class.js +28 -8
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +4 -4
- package/components/messagebar/messagebar.lazy.js +1 -0
- package/components/messages/messages-class.js +64 -28
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +3 -3
- package/components/messages/messages.lazy.js +1 -0
- package/components/modal/custom-modal-class.js +3 -3
- package/components/modal/modal-class.js +13 -3
- package/components/modal/modal.js +2 -2
- package/components/navbar/navbar.js +29 -5
- package/components/notification/notification-aurora.less +1 -1
- package/components/notification/notification-class.js +4 -4
- package/components/notification/notification-ios.less +1 -1
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.d.ts +4 -4
- package/components/notification/notification.js +3 -3
- package/components/notification/{notification.umd.js → notification.lazy.js} +0 -0
- package/components/page/page-vars.less +1 -1
- package/components/panel/panel-class.js +40 -12
- package/components/panel/panel.js +43 -11
- package/components/panel/panel.lazy.js +1 -0
- package/components/panel/resizable-panel.js +3 -3
- package/components/panel/swipe-panel.js +2 -2
- package/components/photo-browser/photo-browser-class.js +46 -12
- package/components/photo-browser/photo-browser.js +2 -2
- package/components/photo-browser/photo-browser.lazy.js +1 -0
- package/components/picker/picker-class.js +17 -13
- package/components/picker/picker-column.js +35 -271
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.d.ts +2 -13
- package/components/picker/picker.js +8 -9
- package/components/picker/picker.lazy.js +1 -0
- package/components/picker/picker.less +28 -10
- package/components/pie-chart/pie-chart-class.js +20 -11
- package/components/pie-chart/pie-chart.js +3 -3
- package/components/pie-chart/pie-chart.lazy.js +1 -0
- package/components/popover/popover-class.js +24 -7
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +15 -6
- package/components/popover/popover.lazy.js +1 -0
- package/components/popover/popover.less +3 -0
- package/components/popup/popup-class.js +11 -6
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.d.ts +4 -0
- package/components/popup/popup.js +13 -4
- package/components/popup/popup.lazy.js +1 -0
- package/components/popup/popup.less +25 -21
- package/components/preloader/preloader-ios.less +3 -0
- package/components/preloader/preloader-rtl.css +1 -1
- package/components/preloader/preloader.css +1 -1
- package/components/preloader/preloader.d.ts +4 -0
- package/components/preloader/preloader.js +12 -4
- package/components/preloader/preloader.lazy.js +1 -0
- package/components/progressbar/progressbar-aurora.less +32 -13
- package/components/progressbar/progressbar-ios.less +19 -7
- package/components/progressbar/progressbar-md.less +64 -28
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +19 -6
- package/components/progressbar/progressbar.lazy.js +1 -0
- package/components/progressbar/progressbar.less +16 -4
- package/components/pull-to-refresh/pull-to-refresh-class.js +10 -6
- package/components/pull-to-refresh/pull-to-refresh.js +4 -4
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -0
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio.css +1 -1
- package/components/radio/{radio.umd.js → radio.lazy.js} +0 -0
- package/components/range/range-class.js +4 -4
- package/components/range/range.d.ts +23 -5
- package/components/range/range.js +14 -6
- package/components/range/{range.umd.js → range.lazy.js} +1 -1
- package/components/searchbar/searchbar-class.js +11 -7
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.js +24 -8
- package/components/searchbar/searchbar.lazy.js +1 -0
- package/components/searchbar/searchbar.less +1 -1
- package/components/sheet/sheet-class.js +26 -7
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.d.ts +2 -0
- package/components/sheet/sheet.js +15 -6
- package/components/sheet/sheet.lazy.js +1 -0
- package/components/sheet/sheet.less +19 -16
- package/components/skeleton/skeleton-rtl.css +1 -1
- package/components/skeleton/skeleton-vars.less +1 -1
- package/components/skeleton/skeleton.css +1 -1
- package/components/skeleton/{skeleton.umd.js → skeleton.lazy.js} +0 -0
- package/components/smart-select/smart-select-class.js +19 -7
- package/components/smart-select/smart-select.js +4 -4
- package/components/smart-select/smart-select.lazy.js +1 -0
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.d.ts +5 -1
- package/components/sortable/sortable.js +48 -11
- package/components/sortable/sortable.lazy.js +1 -0
- package/components/statusbar/statusbar.d.ts +9 -9
- package/components/statusbar/statusbar.js +8 -4
- package/components/stepper/stepper-class.js +3 -3
- package/components/stepper/stepper.js +14 -6
- package/components/stepper/{stepper.umd.js → stepper.lazy.js} +1 -1
- package/components/subnavbar/subnavbar.js +1 -1
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +19 -6
- package/components/swipeout/{swipeout.umd.js → swipeout.lazy.js} +1 -1
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +2 -2
- package/components/swiper/swiper.lazy.js +1 -0
- package/components/tabs/tabs.js +16 -9
- package/components/tabs/tabs.lazy.js +1 -0
- package/components/text-editor/text-editor-class.js +5 -5
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +4 -4
- package/components/text-editor/{text-editor.umd.js → text-editor.lazy.js} +1 -1
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/{timeline.umd.js → timeline.lazy.js} +0 -0
- package/components/toast/toast-class.js +4 -4
- package/components/toast/toast.d.ts +2 -2
- package/components/toast/toast.js +3 -3
- package/components/toast/{toast.umd.js → toast.lazy.js} +0 -0
- package/components/toggle/toggle-class.js +9 -5
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +3 -3
- package/components/toggle/toggle.lazy.js +1 -0
- package/components/toolbar/toolbar-aurora.less +0 -13
- package/components/toolbar/toolbar-md.less +0 -13
- package/components/toolbar/toolbar.js +13 -5
- package/components/toolbar/toolbar.less +13 -0
- package/components/tooltip/tooltip-class.js +9 -5
- package/components/tooltip/tooltip.js +3 -3
- package/components/tooltip/tooltip.lazy.js +1 -0
- package/components/touch-ripple/touch-ripple-class.js +1 -1
- package/components/touch-ripple/touch-ripple-vars.less +1 -1
- package/components/touch-ripple/touch-ripple.js +6 -2
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +2 -2
- package/components/treeview/{treeview.umd.js → treeview.lazy.js} +1 -1
- package/components/typography/{typography.umd.js → typography.lazy.js} +0 -0
- package/components/view/resizable-view.js +3 -3
- package/components/view/view-class.js +18 -7
- package/components/view/view.d.ts +5 -1
- package/components/view/view.js +5 -3
- package/components/virtual-list/virtual-list-class.js +58 -13
- package/components/virtual-list/virtual-list.d.ts +2 -2
- package/components/virtual-list/virtual-list.js +2 -2
- package/components/virtual-list/virtual-list.lazy.js +1 -0
- package/framework7-bundle-rtl.css +513 -411
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +498 -395
- package/framework7-bundle.esm.js +87 -86
- package/framework7-bundle.js +2728 -1257
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +4 -3
- package/framework7-bundle.min.css +4 -4
- package/framework7-bundle.min.js +4 -4
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +81 -80
- package/framework7-lite.esm.js +27 -27
- package/framework7-rtl.css +61 -70
- package/framework7-rtl.min.css +4 -4
- package/framework7-types.d.ts +5 -1
- package/framework7.css +60 -68
- package/framework7.d.ts +4 -0
- package/framework7.esm.js +30 -30
- package/framework7.js +675 -255
- package/framework7.js.map +1 -1
- package/framework7.less +3 -3
- package/framework7.min.css +4 -4
- package/framework7.min.js +4 -4
- package/framework7.min.js.map +1 -1
- package/less/mixins.less +2 -2
- package/modules/clicks/clicks.js +2 -2
- package/modules/component/$h.js +6 -2
- package/modules/component/$jsx.js +6 -2
- package/modules/component/component-class.js +40 -27
- package/modules/component/component.d.ts +2 -2
- package/modules/component/component.js +11 -10
- package/modules/component/eventslisteners.js +6 -2
- package/modules/component/parse-component.js +2 -2
- package/modules/component/patch.js +5 -5
- package/modules/component/snabbdom/h.js +2 -2
- package/modules/component/snabbdom/snabbdom.bundle.js +7 -7
- package/modules/component/snabbdom/snabbdom.js +3 -3
- package/modules/component/snabbdom/thunk.js +1 -1
- package/modules/component/snabbdom/tovnode.js +2 -2
- package/modules/component/vdom.js +35 -20
- package/modules/device/device.js +2 -2
- package/modules/history/history.js +1 -1
- package/modules/request/request.js +1 -1
- package/modules/resize/resize.js +1 -1
- package/modules/router/back.js +24 -14
- package/modules/router/clear-previous-history.js +2 -2
- package/modules/router/component-loader.js +81 -24
- package/modules/router/modal.js +8 -4
- package/modules/router/navigate.js +25 -55
- package/modules/router/redirect.js +6 -2
- package/modules/router/router-class.js +50 -21
- package/modules/router/router.js +1 -1
- package/modules/router/swipe-back.js +12 -11
- package/modules/router/tab.js +10 -6
- package/modules/service-worker/service-worker.js +1 -1
- package/modules/store/create-store.js +11 -3
- package/modules/store/store.js +1 -1
- package/modules/support/support.js +1 -1
- package/modules/touch/touch.js +4 -4
- package/modules/utils/utils.js +1 -1
- package/package.json +12 -6
- package/shared/$jsx.js +6 -1
- package/shared/class.js +35 -7
- package/shared/constructor-methods.js +26 -5
- package/shared/events-class.js +15 -3
- package/shared/get-device.d.ts +0 -2
- package/shared/get-device.js +11 -7
- package/shared/history.js +2 -2
- package/shared/modal-methods.js +13 -5
- package/shared/request.js +46 -8
- package/shared/utils.js +47 -10
- package/components/actions/actions.umd.js +0 -1
- package/components/area-chart/area-chart.umd.js +0 -1
- package/components/autocomplete/autocomplete.umd.js +0 -1
- package/components/calendar/calendar.umd.js +0 -1
- package/components/card/card.umd.js +0 -1
- package/components/data-table/data-table.umd.js +0 -1
- package/components/dialog/dialog.umd.js +0 -1
- package/components/fab/fab.umd.js +0 -1
- package/components/gauge/gauge.umd.js +0 -1
- package/components/input/input.umd.js +0 -1
- package/components/list-index/list-index.umd.js +0 -1
- package/components/login-screen/login-screen.umd.js +0 -1
- package/components/menu/menu.umd.js +0 -1
- package/components/messagebar/messagebar.umd.js +0 -1
- package/components/messages/messages.umd.js +0 -1
- package/components/panel/panel.umd.js +0 -1
- package/components/photo-browser/photo-browser.umd.js +0 -1
- package/components/picker/picker.umd.js +0 -1
- package/components/pie-chart/pie-chart.umd.js +0 -1
- package/components/popover/popover.umd.js +0 -1
- package/components/popup/popup.umd.js +0 -1
- package/components/preloader/preloader.umd.js +0 -1
- package/components/progressbar/progressbar.umd.js +0 -1
- package/components/pull-to-refresh/pull-to-refresh.umd.js +0 -1
- package/components/searchbar/searchbar.umd.js +0 -1
- package/components/sheet/sheet.umd.js +0 -1
- package/components/smart-select/smart-select.umd.js +0 -1
- package/components/sortable/sortable.umd.js +0 -1
- package/components/swiper/swiper.umd.js +0 -1
- package/components/tabs/tabs.umd.js +0 -1
- package/components/toggle/toggle.umd.js +0 -1
- package/components/tooltip/tooltip.umd.js +0 -1
- package/components/virtual-list/virtual-list.umd.js +0 -1
package/less/mixins.less
CHANGED
package/modules/clicks/clicks.js
CHANGED
|
@@ -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) {
|
package/modules/component/$h.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
224
|
-
|
|
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
|
-
|
|
231
|
-
|
|
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
|
-
|
|
245
|
-
|
|
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
|
-
|
|
252
|
-
|
|
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
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
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,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,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 = (
|
|
22
|
+
const propsFromAttrs = function () {
|
|
23
23
|
const context = {};
|
|
24
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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(
|
|
189
|
-
const e =
|
|
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(...
|
|
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
|
|
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
|
}
|
package/modules/device/device.js
CHANGED
|
@@ -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
|
|
34
|
+
if (device.cordova) {
|
|
35
35
|
classNames.push('device-cordova');
|
|
36
36
|
}
|
|
37
37
|
|
package/modules/resize/resize.js
CHANGED
package/modules/router/back.js
CHANGED
|
@@ -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(
|
|
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
|
|
570
|
-
navigateOptions =
|
|
569
|
+
if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {
|
|
570
|
+
navigateOptions = (arguments.length <= 0 ? undefined : arguments[0]) || {};
|
|
571
571
|
} else {
|
|
572
|
-
navigateUrl =
|
|
573
|
-
navigateOptions =
|
|
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
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
}
|