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/modules/router/modal.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { extend, nextTick } from '../../shared/utils';
|
|
2
|
-
import History from '../../shared/history';
|
|
3
|
-
import asyncComponent from './async-component';
|
|
1
|
+
import { extend, nextTick } from '../../shared/utils.js';
|
|
2
|
+
import History from '../../shared/history.js';
|
|
3
|
+
import asyncComponent from './async-component.js';
|
|
4
|
+
|
|
5
|
+
function modalLoad(modalType, route, loadOptions, direction) {
|
|
6
|
+
if (loadOptions === void 0) {
|
|
7
|
+
loadOptions = {};
|
|
8
|
+
}
|
|
4
9
|
|
|
5
|
-
function modalLoad(modalType, route, loadOptions = {}, direction) {
|
|
6
10
|
const router = this;
|
|
7
11
|
const app = router.app;
|
|
8
12
|
const isPanel = modalType === 'panel';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getDocument } from 'ssr-window';
|
|
2
|
-
import $ from '../../shared/dom7';
|
|
3
|
-
import { extend, parseUrlQuery } from '../../shared/utils';
|
|
4
|
-
import History from '../../shared/history';
|
|
5
|
-
import redirect from './redirect';
|
|
6
|
-
import processRouteQueue from './process-route-queue';
|
|
7
|
-
import appRouterCheck from './app-router-check';
|
|
8
|
-
import asyncComponent from './async-component';
|
|
2
|
+
import $ from '../../shared/dom7.js';
|
|
3
|
+
import { extend, parseUrlQuery } from '../../shared/utils.js';
|
|
4
|
+
import History from '../../shared/history.js';
|
|
5
|
+
import redirect from './redirect.js';
|
|
6
|
+
import processRouteQueue from './process-route-queue.js';
|
|
7
|
+
import appRouterCheck from './app-router-check.js';
|
|
8
|
+
import asyncComponent from './async-component.js';
|
|
9
9
|
|
|
10
10
|
function refreshPage() {
|
|
11
11
|
const router = this;
|
|
@@ -16,7 +16,11 @@ function refreshPage() {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function forward(router, el, forwardOptions
|
|
19
|
+
function forward(router, el, forwardOptions) {
|
|
20
|
+
if (forwardOptions === void 0) {
|
|
21
|
+
forwardOptions = {};
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
const document = getDocument();
|
|
21
25
|
const $el = $(el);
|
|
22
26
|
const app = router.app;
|
|
@@ -615,7 +619,15 @@ function forward(router, el, forwardOptions = {}) {
|
|
|
615
619
|
return router;
|
|
616
620
|
}
|
|
617
621
|
|
|
618
|
-
function load(router, loadParams
|
|
622
|
+
function load(router, loadParams, loadOptions, ignorePageChange) {
|
|
623
|
+
if (loadParams === void 0) {
|
|
624
|
+
loadParams = {};
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
if (loadOptions === void 0) {
|
|
628
|
+
loadOptions = {};
|
|
629
|
+
}
|
|
630
|
+
|
|
619
631
|
if (!router.allowPageChange && !ignorePageChange) return router;
|
|
620
632
|
const params = loadParams;
|
|
621
633
|
const options = loadOptions;
|
|
@@ -730,53 +742,11 @@ function load(router, loadParams = {}, loadOptions = {}, ignorePageChange) {
|
|
|
730
742
|
return router;
|
|
731
743
|
}
|
|
732
744
|
|
|
733
|
-
function
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
route: {
|
|
737
|
-
path: url,
|
|
738
|
-
options: { ...options,
|
|
739
|
-
openIn: undefined
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
};
|
|
743
|
-
const params = { ...options
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
if (options.openIn === 'popup') {
|
|
747
|
-
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>`;
|
|
748
|
-
navigateOptions.route.popup = params;
|
|
745
|
+
function navigate(navigateParams, navigateOptions) {
|
|
746
|
+
if (navigateOptions === void 0) {
|
|
747
|
+
navigateOptions = {};
|
|
749
748
|
}
|
|
750
749
|
|
|
751
|
-
if (options.openIn === 'loginScreen') {
|
|
752
|
-
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>`;
|
|
753
|
-
navigateOptions.route.loginScreen = params;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
if (options.openIn === 'sheet') {
|
|
757
|
-
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>`;
|
|
758
|
-
navigateOptions.route.sheet = params;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
if (options.openIn === 'popover') {
|
|
762
|
-
params.targetEl = options.clickedEl || options.targetEl;
|
|
763
|
-
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>`;
|
|
764
|
-
navigateOptions.route.popover = params;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
if (options.openIn.indexOf('panel') >= 0) {
|
|
768
|
-
const parts = options.openIn.split(':');
|
|
769
|
-
const side = parts[1] || 'left';
|
|
770
|
-
const effect = parts[2] || 'cover';
|
|
771
|
-
params.targetEl = options.clickedEl || options.targetEl;
|
|
772
|
-
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>`;
|
|
773
|
-
navigateOptions.route.panel = params;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
return router.navigate(navigateOptions);
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
function navigate(navigateParams, navigateOptions = {}) {
|
|
780
750
|
const router = this;
|
|
781
751
|
if (router.swipeBackActive) return router;
|
|
782
752
|
let url;
|
|
@@ -865,7 +835,7 @@ function navigate(navigateParams, navigateOptions = {}) {
|
|
|
865
835
|
}
|
|
866
836
|
|
|
867
837
|
if (options.openIn && (!router.params.ignoreOpenIn || router.params.ignoreOpenIn && router.history.length > 0)) {
|
|
868
|
-
return openIn(router, navigateUrl, options);
|
|
838
|
+
return router.openIn(router, navigateUrl, options);
|
|
869
839
|
}
|
|
870
840
|
|
|
871
841
|
options.route = route;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extend } from '../../shared/utils';
|
|
1
|
+
import { extend } from '../../shared/utils.js';
|
|
2
2
|
export default function redirect(direction, route, options) {
|
|
3
3
|
const router = this;
|
|
4
4
|
const r = route.route.redirect;
|
|
@@ -10,7 +10,11 @@ export default function redirect(direction, route, options) {
|
|
|
10
10
|
options.history = true; // eslint-disable-line
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function redirectResolve(redirectUrl, redirectOptions
|
|
13
|
+
function redirectResolve(redirectUrl, redirectOptions) {
|
|
14
|
+
if (redirectOptions === void 0) {
|
|
15
|
+
redirectOptions = {};
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
router.allowPageChange = true;
|
|
15
19
|
router[method](redirectUrl, extend({}, options, redirectOptions));
|
|
16
20
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { getWindow, getDocument } from 'ssr-window';
|
|
2
2
|
import { pathToRegexp, compile } from 'path-to-regexp';
|
|
3
|
-
import $ from '../../shared/dom7';
|
|
4
|
-
import Framework7Class from '../../shared/class';
|
|
5
|
-
import { extend, nextFrame, parseUrlQuery, serializeObject, now, eventNameToColonCase } from '../../shared/utils';
|
|
6
|
-
import History from '../../shared/history';
|
|
7
|
-
import SwipeBack from './swipe-back';
|
|
8
|
-
import { refreshPage, navigate } from './navigate';
|
|
9
|
-
import { tabLoad, tabRemove } from './tab';
|
|
10
|
-
import { modalLoad, modalRemove } from './modal';
|
|
11
|
-
import { back } from './back';
|
|
12
|
-
import { clearPreviousHistory } from './clear-previous-history';
|
|
13
|
-
import appRouterCheck from './app-router-check';
|
|
3
|
+
import $ from '../../shared/dom7.js';
|
|
4
|
+
import Framework7Class from '../../shared/class.js';
|
|
5
|
+
import { extend, nextFrame, parseUrlQuery, serializeObject, now, eventNameToColonCase } from '../../shared/utils.js';
|
|
6
|
+
import History from '../../shared/history.js';
|
|
7
|
+
import SwipeBack from './swipe-back.js';
|
|
8
|
+
import { refreshPage, navigate } from './navigate.js';
|
|
9
|
+
import { tabLoad, tabRemove } from './tab.js';
|
|
10
|
+
import { modalLoad, modalRemove } from './modal.js';
|
|
11
|
+
import { back } from './back.js';
|
|
12
|
+
import { clearPreviousHistory } from './clear-previous-history.js';
|
|
13
|
+
import appRouterCheck from './app-router-check.js';
|
|
14
14
|
|
|
15
15
|
class Router extends Framework7Class {
|
|
16
16
|
constructor(app, view) {
|
|
@@ -56,7 +56,11 @@ class Router extends Framework7Class {
|
|
|
56
56
|
enumerable: true,
|
|
57
57
|
configurable: true,
|
|
58
58
|
|
|
59
|
-
set(newRoute
|
|
59
|
+
set(newRoute) {
|
|
60
|
+
if (newRoute === void 0) {
|
|
61
|
+
newRoute = {};
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
previousRoute = extend({}, currentRoute);
|
|
61
65
|
currentRoute = newRoute;
|
|
62
66
|
if (!currentRoute) return;
|
|
@@ -461,7 +465,11 @@ class Router extends Framework7Class {
|
|
|
461
465
|
return undefined;
|
|
462
466
|
}
|
|
463
467
|
|
|
464
|
-
flattenRoutes(routes
|
|
468
|
+
flattenRoutes(routes) {
|
|
469
|
+
if (routes === void 0) {
|
|
470
|
+
routes = this.routes;
|
|
471
|
+
}
|
|
472
|
+
|
|
465
473
|
const router = this;
|
|
466
474
|
let flattenedRoutes = [];
|
|
467
475
|
routes.forEach(route => {
|
|
@@ -529,7 +537,11 @@ class Router extends Framework7Class {
|
|
|
529
537
|
};
|
|
530
538
|
}
|
|
531
539
|
|
|
532
|
-
generateUrl(parameters
|
|
540
|
+
generateUrl(parameters) {
|
|
541
|
+
if (parameters === void 0) {
|
|
542
|
+
parameters = {};
|
|
543
|
+
}
|
|
544
|
+
|
|
533
545
|
if (typeof parameters === 'string') {
|
|
534
546
|
return parameters;
|
|
535
547
|
}
|
|
@@ -569,10 +581,11 @@ class Router extends Framework7Class {
|
|
|
569
581
|
} // eslint-disable-next-line
|
|
570
582
|
|
|
571
583
|
|
|
572
|
-
constructRouteUrl(route, {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
584
|
+
constructRouteUrl(route, _temp) {
|
|
585
|
+
let {
|
|
586
|
+
params,
|
|
587
|
+
query
|
|
588
|
+
} = _temp === void 0 ? {} : _temp;
|
|
576
589
|
const {
|
|
577
590
|
path
|
|
578
591
|
} = route;
|
|
@@ -693,7 +706,15 @@ class Router extends Framework7Class {
|
|
|
693
706
|
} // eslint-disable-next-line
|
|
694
707
|
|
|
695
708
|
|
|
696
|
-
replaceRequestUrlParams(url
|
|
709
|
+
replaceRequestUrlParams(url, options) {
|
|
710
|
+
if (url === void 0) {
|
|
711
|
+
url = '';
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
if (options === void 0) {
|
|
715
|
+
options = {};
|
|
716
|
+
}
|
|
717
|
+
|
|
697
718
|
let compiledUrl = url;
|
|
698
719
|
|
|
699
720
|
if (typeof compiledUrl === 'string' && compiledUrl.indexOf('{{') >= 0 && options && options.route && options.route.params && Object.keys(options.route.params).length) {
|
|
@@ -856,7 +877,11 @@ class Router extends Framework7Class {
|
|
|
856
877
|
$(el).find(toRemove).remove();
|
|
857
878
|
}
|
|
858
879
|
|
|
859
|
-
getPageData(pageEl, navbarEl, from, to, route
|
|
880
|
+
getPageData(pageEl, navbarEl, from, to, route, pageFromEl) {
|
|
881
|
+
if (route === void 0) {
|
|
882
|
+
route = {};
|
|
883
|
+
}
|
|
884
|
+
|
|
860
885
|
const router = this;
|
|
861
886
|
const $pageEl = $(pageEl).eq(0);
|
|
862
887
|
const $navbarEl = $(navbarEl).eq(0);
|
|
@@ -903,7 +928,11 @@ class Router extends Framework7Class {
|
|
|
903
928
|
} // Callbacks
|
|
904
929
|
|
|
905
930
|
|
|
906
|
-
pageCallback(callback, pageEl, navbarEl, from, to, options
|
|
931
|
+
pageCallback(callback, pageEl, navbarEl, from, to, options, pageFromEl) {
|
|
932
|
+
if (options === void 0) {
|
|
933
|
+
options = {};
|
|
934
|
+
}
|
|
935
|
+
|
|
907
936
|
if (!pageEl) return;
|
|
908
937
|
const router = this;
|
|
909
938
|
const $pageEl = $(pageEl);
|
package/modules/router/router.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import $ from '../../shared/dom7';
|
|
2
|
-
import History from '../../shared/history';
|
|
3
|
-
import { getSupport } from '../../shared/get-support';
|
|
4
|
-
import { getDevice } from '../../shared/get-device';
|
|
5
|
-
import { now } from '../../shared/utils';
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import History from '../../shared/history.js';
|
|
3
|
+
import { getSupport } from '../../shared/get-support.js';
|
|
4
|
+
import { getDevice } from '../../shared/get-device.js';
|
|
5
|
+
import { now } from '../../shared/utils.js';
|
|
6
6
|
|
|
7
7
|
function SwipeBack(r) {
|
|
8
8
|
const router = r;
|
|
@@ -287,12 +287,13 @@ function SwipeBack(r) {
|
|
|
287
287
|
return els;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
function setAnimatableNavElements({
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
290
|
+
function setAnimatableNavElements(_temp) {
|
|
291
|
+
let {
|
|
292
|
+
progress,
|
|
293
|
+
reset,
|
|
294
|
+
transition,
|
|
295
|
+
reflow
|
|
296
|
+
} = _temp === void 0 ? {} : _temp;
|
|
296
297
|
const styles = ['overflow', 'transform', 'transform-origin', 'opacity'];
|
|
297
298
|
|
|
298
299
|
if (transition === true || transition === false) {
|
package/modules/router/tab.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import $ from '../../shared/dom7';
|
|
2
|
-
import { extend } from '../../shared/utils';
|
|
3
|
-
import History from '../../shared/history';
|
|
4
|
-
import asyncComponent from './async-component';
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import { extend } from '../../shared/utils.js';
|
|
3
|
+
import History from '../../shared/history.js';
|
|
4
|
+
import asyncComponent from './async-component.js';
|
|
5
|
+
|
|
6
|
+
function tabLoad(tabRoute, loadOptions) {
|
|
7
|
+
if (loadOptions === void 0) {
|
|
8
|
+
loadOptions = {};
|
|
9
|
+
}
|
|
5
10
|
|
|
6
|
-
function tabLoad(tabRoute, loadOptions = {}) {
|
|
7
11
|
const router = this;
|
|
8
12
|
const options = extend({
|
|
9
13
|
animate: router.params.animate,
|
|
@@ -33,7 +37,7 @@ function tabLoad(tabRoute, loadOptions = {}) {
|
|
|
33
37
|
|
|
34
38
|
|
|
35
39
|
if (router.params.browserHistory && options.browserHistory && !options.reloadPrevious) {
|
|
36
|
-
History.
|
|
40
|
+
History[router.params.browserHistoryTabs](router.view.id, {
|
|
37
41
|
url: options.route.url
|
|
38
42
|
}, (router.params.browserHistoryRoot || '') + router.params.browserHistorySeparator + options.route.url);
|
|
39
43
|
} // Update Router History
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
|
-
import { extend } from '../../shared/utils';
|
|
2
|
+
import { extend } from '../../shared/utils.js';
|
|
3
|
+
|
|
4
|
+
function createStore(storeParams) {
|
|
5
|
+
if (storeParams === void 0) {
|
|
6
|
+
storeParams = {};
|
|
7
|
+
}
|
|
3
8
|
|
|
4
|
-
function createStore(storeParams = {}) {
|
|
5
9
|
const store = {
|
|
6
10
|
__store: true
|
|
7
11
|
};
|
|
@@ -67,7 +71,11 @@ function createStore(storeParams = {}) {
|
|
|
67
71
|
removeGetterCallback(callback);
|
|
68
72
|
};
|
|
69
73
|
|
|
70
|
-
const getterValue = (getterKey, addCallback
|
|
74
|
+
const getterValue = function (getterKey, addCallback) {
|
|
75
|
+
if (addCallback === void 0) {
|
|
76
|
+
addCallback = true;
|
|
77
|
+
}
|
|
78
|
+
|
|
71
79
|
if (getterKey === 'constructor') return undefined;
|
|
72
80
|
propsQueue = [];
|
|
73
81
|
const value = getGetterValue(getterKey);
|
package/modules/store/store.js
CHANGED
package/modules/touch/touch.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
2
|
import { getWindow, getDocument } from 'ssr-window';
|
|
3
|
-
import $ from '../../shared/dom7';
|
|
4
|
-
import { getSupport } from '../../shared/get-support';
|
|
5
|
-
import { getDevice } from '../../shared/get-device';
|
|
6
|
-
import { extend } from '../../shared/utils';
|
|
3
|
+
import $ from '../../shared/dom7.js';
|
|
4
|
+
import { getSupport } from '../../shared/get-support.js';
|
|
5
|
+
import { getDevice } from '../../shared/get-device.js';
|
|
6
|
+
import { extend } from '../../shared/utils.js';
|
|
7
7
|
|
|
8
8
|
function initTouch() {
|
|
9
9
|
const app = this;
|
package/modules/utils/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.20",
|
|
4
4
|
"description": "Full featured mobile HTML framework for building iOS & Android apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"./css/bundle": "./framework7-bundle.css",
|
|
17
17
|
"./css/bundle/rtl": "./framework7-bundle-rtl.css",
|
|
18
18
|
"./types": "./framework7-types.d.ts",
|
|
19
|
+
"./shared/*": "./shared/*",
|
|
19
20
|
"./components/appbar": "./components/appbar/appbar.js",
|
|
20
21
|
"./components/appbar/less": "./components/appbar/appbar.less",
|
|
21
22
|
"./components/appbar/css": "./components/appbar/appbar.css",
|
|
@@ -235,7 +236,11 @@
|
|
|
235
236
|
"./components/typography": "./components/typography/typography.js",
|
|
236
237
|
"./components/typography/less": "./components/typography/typography.less",
|
|
237
238
|
"./components/typography/css": "./components/typography/typography.css",
|
|
238
|
-
"./components/typography/css/rtl": "./components/typography/typography-rtl.css"
|
|
239
|
+
"./components/typography/css/rtl": "./components/typography/typography-rtl.css",
|
|
240
|
+
"./components/breadcrumbs": "./components/breadcrumbs/breadcrumbs.js",
|
|
241
|
+
"./components/breadcrumbs/less": "./components/breadcrumbs/breadcrumbs.less",
|
|
242
|
+
"./components/breadcrumbs/css": "./components/breadcrumbs/breadcrumbs.css",
|
|
243
|
+
"./components/breadcrumbs/css/rtl": "./components/breadcrumbs/breadcrumbs-rtl.css"
|
|
239
244
|
},
|
|
240
245
|
"typings": "framework7.d.ts",
|
|
241
246
|
"typesVersions": {
|
|
@@ -270,6 +275,7 @@
|
|
|
270
275
|
"ipad",
|
|
271
276
|
"apple",
|
|
272
277
|
"phonegap",
|
|
278
|
+
"capacitor",
|
|
273
279
|
"native",
|
|
274
280
|
"touch",
|
|
275
281
|
"appstore",
|
|
@@ -291,11 +297,11 @@
|
|
|
291
297
|
"url": "https://www.patreon.com/framework7"
|
|
292
298
|
},
|
|
293
299
|
"dependencies": {
|
|
294
|
-
"dom7": "^4.0.
|
|
300
|
+
"dom7": "^4.0.4",
|
|
295
301
|
"htm": "^3.1.0",
|
|
296
302
|
"path-to-regexp": "^6.2.0",
|
|
297
|
-
"skeleton-elements": "^4.0.0
|
|
298
|
-
"ssr-window": "^4.0.
|
|
299
|
-
"swiper": "^
|
|
303
|
+
"skeleton-elements": "^4.0.0",
|
|
304
|
+
"ssr-window": "^4.0.2",
|
|
305
|
+
"swiper": "^8.1.0"
|
|
300
306
|
}
|
|
301
307
|
}
|
package/shared/$jsx.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* eslint-disable prefer-rest-params */
|
|
2
|
-
const $jsx = (tag, props
|
|
2
|
+
const $jsx = function (tag, props) {
|
|
3
3
|
const attrs = props || {};
|
|
4
|
+
|
|
5
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
6
|
+
args[_key - 2] = arguments[_key];
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
const children = args || [];
|
|
5
10
|
const attrsString = Object.keys(attrs).map(attr => {
|
|
6
11
|
if (attr[0] === '_') {
|
package/shared/class.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import { extend, now } from './utils';
|
|
2
|
-
import EventsClass from './events-class';
|
|
1
|
+
import { extend, now } from './utils.js';
|
|
2
|
+
import EventsClass from './events-class.js';
|
|
3
3
|
|
|
4
4
|
class Framework7Class extends EventsClass {
|
|
5
|
-
constructor(params
|
|
5
|
+
constructor(params, parents) {
|
|
6
|
+
if (params === void 0) {
|
|
7
|
+
params = {};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (parents === void 0) {
|
|
11
|
+
parents = [];
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
super(parents);
|
|
7
15
|
const self = this;
|
|
8
16
|
self.params = params;
|
|
@@ -41,7 +49,15 @@ class Framework7Class extends EventsClass {
|
|
|
41
49
|
});
|
|
42
50
|
}
|
|
43
51
|
|
|
44
|
-
useModule(moduleName
|
|
52
|
+
useModule(moduleName, moduleParams) {
|
|
53
|
+
if (moduleName === void 0) {
|
|
54
|
+
moduleName = '';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (moduleParams === void 0) {
|
|
58
|
+
moduleParams = {};
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
const instance = this;
|
|
46
62
|
if (!instance.modules) return;
|
|
47
63
|
const module = typeof moduleName === 'string' ? instance.modules[moduleName] : moduleName;
|
|
@@ -85,7 +101,11 @@ class Framework7Class extends EventsClass {
|
|
|
85
101
|
}
|
|
86
102
|
}
|
|
87
103
|
|
|
88
|
-
useModules(modulesParams
|
|
104
|
+
useModules(modulesParams) {
|
|
105
|
+
if (modulesParams === void 0) {
|
|
106
|
+
modulesParams = {};
|
|
107
|
+
}
|
|
108
|
+
|
|
89
109
|
const instance = this;
|
|
90
110
|
if (!instance.modules) return;
|
|
91
111
|
Object.keys(instance.modules).forEach(moduleName => {
|
|
@@ -100,7 +120,7 @@ class Framework7Class extends EventsClass {
|
|
|
100
120
|
Class.use(components);
|
|
101
121
|
}
|
|
102
122
|
|
|
103
|
-
static installModule(module
|
|
123
|
+
static installModule(module) {
|
|
104
124
|
const Class = this;
|
|
105
125
|
if (!Class.prototype.modules) Class.prototype.modules = {};
|
|
106
126
|
const name = module.name || `${Object.keys(Class.prototype.modules).length}_${now()}`;
|
|
@@ -121,13 +141,17 @@ class Framework7Class extends EventsClass {
|
|
|
121
141
|
|
|
122
142
|
|
|
123
143
|
if (module.install) {
|
|
144
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
145
|
+
params[_key - 1] = arguments[_key];
|
|
146
|
+
}
|
|
147
|
+
|
|
124
148
|
module.install.apply(Class, params);
|
|
125
149
|
}
|
|
126
150
|
|
|
127
151
|
return Class;
|
|
128
152
|
}
|
|
129
153
|
|
|
130
|
-
static use(module
|
|
154
|
+
static use(module) {
|
|
131
155
|
const Class = this;
|
|
132
156
|
|
|
133
157
|
if (Array.isArray(module)) {
|
|
@@ -135,6 +159,10 @@ class Framework7Class extends EventsClass {
|
|
|
135
159
|
return Class;
|
|
136
160
|
}
|
|
137
161
|
|
|
162
|
+
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
163
|
+
params[_key2 - 1] = arguments[_key2];
|
|
164
|
+
}
|
|
165
|
+
|
|
138
166
|
return Class.installModule(module, ...params);
|
|
139
167
|
}
|
|
140
168
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import $ from './dom7';
|
|
2
|
-
export default function ConstructorMethods(parameters
|
|
1
|
+
import $ from './dom7.js';
|
|
2
|
+
export default function ConstructorMethods(parameters) {
|
|
3
|
+
if (parameters === void 0) {
|
|
4
|
+
parameters = {};
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
const {
|
|
4
8
|
defaultSelector,
|
|
5
9
|
constructor: Constructor,
|
|
@@ -8,12 +12,20 @@ export default function ConstructorMethods(parameters = {}) {
|
|
|
8
12
|
addMethods
|
|
9
13
|
} = parameters;
|
|
10
14
|
const methods = {
|
|
11
|
-
create(
|
|
15
|
+
create() {
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
if (app) return new Constructor(app, ...args);
|
|
13
21
|
return new Constructor(...args);
|
|
14
22
|
},
|
|
15
23
|
|
|
16
|
-
get(el
|
|
24
|
+
get(el) {
|
|
25
|
+
if (el === void 0) {
|
|
26
|
+
el = defaultSelector;
|
|
27
|
+
}
|
|
28
|
+
|
|
17
29
|
if (el instanceof Constructor) return el;
|
|
18
30
|
const $el = $(el);
|
|
19
31
|
if ($el.length === 0) return undefined;
|
|
@@ -30,8 +42,17 @@ export default function ConstructorMethods(parameters = {}) {
|
|
|
30
42
|
|
|
31
43
|
if (addMethods && Array.isArray(addMethods)) {
|
|
32
44
|
addMethods.forEach(methodName => {
|
|
33
|
-
methods[methodName] = (el
|
|
45
|
+
methods[methodName] = function (el) {
|
|
46
|
+
if (el === void 0) {
|
|
47
|
+
el = defaultSelector;
|
|
48
|
+
}
|
|
49
|
+
|
|
34
50
|
const instance = methods.get(el);
|
|
51
|
+
|
|
52
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
53
|
+
args[_key2 - 1] = arguments[_key2];
|
|
54
|
+
}
|
|
55
|
+
|
|
35
56
|
if (instance && instance[methodName]) return instance[methodName](...args);
|
|
36
57
|
return undefined;
|
|
37
58
|
};
|
package/shared/events-class.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
class EventsClass {
|
|
2
|
-
constructor(parents
|
|
2
|
+
constructor(parents) {
|
|
3
|
+
if (parents === void 0) {
|
|
4
|
+
parents = [];
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
const self = this;
|
|
4
8
|
self.eventsParents = parents;
|
|
5
9
|
self.eventsListeners = {};
|
|
@@ -20,13 +24,17 @@ class EventsClass {
|
|
|
20
24
|
const self = this;
|
|
21
25
|
if (typeof handler !== 'function') return self;
|
|
22
26
|
|
|
23
|
-
function onceHandler(
|
|
27
|
+
function onceHandler() {
|
|
24
28
|
self.off(events, onceHandler);
|
|
25
29
|
|
|
26
30
|
if (onceHandler.f7proxy) {
|
|
27
31
|
delete onceHandler.f7proxy;
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
|
+
args[_key] = arguments[_key];
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
handler.apply(self, args);
|
|
31
39
|
}
|
|
32
40
|
|
|
@@ -51,7 +59,7 @@ class EventsClass {
|
|
|
51
59
|
return self;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
|
-
emit(
|
|
62
|
+
emit() {
|
|
55
63
|
const self = this;
|
|
56
64
|
if (!self.eventsListeners) return self;
|
|
57
65
|
let events;
|
|
@@ -59,6 +67,10 @@ class EventsClass {
|
|
|
59
67
|
let context;
|
|
60
68
|
let eventsParents;
|
|
61
69
|
|
|
70
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
71
|
+
args[_key2] = arguments[_key2];
|
|
72
|
+
}
|
|
73
|
+
|
|
62
74
|
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
|
63
75
|
events = args[0];
|
|
64
76
|
data = args.slice(1, args.length);
|