framework7 7.0.8 → 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.
- package/components/accordion/accordion.js +2 -16
- package/components/accordion/accordion.less +0 -3
- package/components/actions/actions-class.js +13 -58
- package/components/actions/actions-ios.less +42 -0
- package/components/actions/actions-md.less +12 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions-vars.less +17 -42
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -2
- package/components/actions/actions.js +0 -4
- package/components/actions/actions.lazy.js +1 -1
- package/components/actions/actions.less +5 -35
- package/components/app/app-class.d.ts +14 -12
- package/components/app/app-class.js +93 -75
- package/components/app/app-ios.less +0 -2
- package/components/app/app-md.less +0 -2
- package/components/app/app-vars.less +13 -96
- package/components/app/app.less +1 -4
- package/components/app/load-module.js +17 -36
- package/components/area-chart/area-chart-class.js +8 -64
- package/components/area-chart/area-chart.js +0 -3
- package/components/area-chart/area-chart.less +0 -3
- package/components/autocomplete/autocomplete-class.js +30 -175
- package/components/autocomplete/autocomplete-ios.less +0 -8
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete-vars.less +8 -22
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.d.ts +1 -3
- package/components/autocomplete/autocomplete.js +1 -6
- package/components/autocomplete/autocomplete.lazy.js +1 -1
- package/components/autocomplete/autocomplete.less +6 -18
- package/components/badge/badge-vars.less +3 -6
- package/components/badge/badge.less +1 -3
- package/components/block/block-vars.less +25 -52
- package/components/block/block.less +37 -12
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
- package/components/breadcrumbs/breadcrumbs-vars.less +31 -15
- package/components/breadcrumbs/breadcrumbs.css +1 -1
- package/components/breadcrumbs/breadcrumbs.js +0 -2
- package/components/breadcrumbs/breadcrumbs.less +4 -10
- package/components/button/button-vars.less +42 -43
- package/components/button/button.less +24 -26
- package/components/calendar/calendar-class.js +81 -401
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +32 -46
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.js +6 -4
- package/components/calendar/calendar.lazy.js +1 -1
- package/components/calendar/calendar.less +10 -21
- package/components/card/card-rtl.css +1 -1
- package/components/card/card-vars.less +41 -44
- package/components/card/card.css +1 -1
- package/components/card/card.js +0 -108
- package/components/card/card.less +18 -24
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox-vars.less +0 -8
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.less +10 -3
- package/components/chip/chip-ios.less +3 -0
- package/components/chip/chip-md.less +4 -3
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip-vars.less +17 -20
- package/components/chip/chip.css +1 -1
- package/components/chip/chip.less +16 -21
- package/components/color-picker/color-picker-class.js +27 -158
- 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 +0 -4
- package/components/color-picker/color-picker.lazy.js +1 -1
- package/components/color-picker/color-picker.less +18 -8
- package/components/color-picker/modules/alpha-slider.js +0 -12
- package/components/color-picker/modules/brightness-slider.js +0 -8
- package/components/color-picker/modules/current-color.js +0 -2
- package/components/color-picker/modules/hex.js +0 -12
- package/components/color-picker/modules/hs-spectrum.js +0 -20
- package/components/color-picker/modules/hsb-sliders.js +0 -18
- package/components/color-picker/modules/hue-slider.js +0 -7
- package/components/color-picker/modules/initial-current-colors.js +0 -7
- package/components/color-picker/modules/palette.js +2 -10
- package/components/color-picker/modules/rgb-bars.js +0 -17
- package/components/color-picker/modules/rgb-sliders.js +0 -17
- package/components/color-picker/modules/sb-spectrum.js +0 -20
- package/components/color-picker/modules/wheel.js +0 -28
- package/components/contacts-list/contacts-list-md.less +4 -3
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list-vars.less +3 -15
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/contacts-list.less +0 -3
- package/components/data-table/data-table-class.js +10 -32
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table-vars.less +6 -39
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +0 -8
- package/components/data-table/data-table.less +0 -3
- package/components/dialog/dialog-class.js +7 -41
- package/components/dialog/dialog-ios.less +0 -3
- package/components/dialog/dialog-md.less +9 -9
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog-vars.less +25 -70
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +12 -48
- package/components/dialog/dialog.lazy.js +1 -1
- package/components/dialog/dialog.less +8 -4
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab-vars.less +20 -14
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +0 -21
- package/components/fab/fab.less +50 -53
- package/components/form/form.d.ts +4 -4
- package/components/form/form.js +58 -94
- package/components/form/form.lazy.js +1 -1
- package/components/form/form.less +0 -3
- package/components/gauge/gauge-class.js +4 -20
- package/components/gauge/gauge.js +0 -9
- package/components/gauge/gauge.less +0 -3
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid-vars.less +0 -7
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.d.ts +2 -8
- package/components/grid/grid.js +1 -225
- package/components/grid/grid.lazy.js +1 -1
- package/components/grid/grid.less +54 -184
- package/components/icon/icon.less +0 -3
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
- package/components/infinite-scroll/infinite-scroll.css +1 -1
- package/components/infinite-scroll/infinite-scroll.js +0 -16
- package/components/infinite-scroll/infinite-scroll.less +0 -3
- package/components/input/input-ios.less +49 -41
- package/components/input/input-md.less +87 -19
- package/components/input/input-rtl.css +1 -1
- package/components/input/input-vars.less +26 -60
- package/components/input/input.css +1 -1
- package/components/input/input.js +8 -67
- package/components/input/input.less +67 -153
- package/components/link/link-vars.less +0 -5
- package/components/link/link.less +3 -3
- package/components/list/list-md.less +0 -7
- package/components/list/list-vars.less +59 -108
- package/components/list/list.less +122 -90
- package/components/list-index/list-index-class.js +12 -69
- package/components/list-index/list-index-rtl.css +1 -1
- package/components/list-index/list-index-vars.less +0 -7
- package/components/list-index/list-index.css +1 -1
- package/components/list-index/list-index.d.ts +1 -3
- package/components/list-index/list-index.js +0 -8
- package/components/list-index/list-index.lazy.js +1 -1
- package/components/list-index/list-index.less +4 -7
- package/components/login-screen/login-screen-class.js +4 -9
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen-vars.less +13 -12
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +0 -4
- package/components/login-screen/login-screen.less +2 -8
- package/components/messagebar/messagebar-class.js +18 -79
- package/components/messagebar/messagebar-ios.less +36 -0
- package/components/messagebar/messagebar-md.less +96 -16
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar-vars.less +27 -50
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +0 -8
- package/components/messagebar/messagebar.less +11 -42
- package/components/messages/messages-class.js +17 -110
- package/components/messages/messages-ios.less +9 -0
- package/components/messages/messages-md.less +63 -28
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages-vars.less +43 -50
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +0 -8
- package/components/messages/messages.lazy.js +1 -1
- package/components/messages/messages.less +0 -11
- package/components/modal/custom-modal-class.js +4 -14
- package/components/modal/modal-class.js +19 -55
- package/components/modal/modal.js +0 -3
- package/components/navbar/navbar-ios.less +3 -39
- package/components/navbar/navbar-md.less +12 -0
- package/components/navbar/navbar-vars.less +20 -49
- package/components/navbar/navbar.d.ts +0 -2
- package/components/navbar/navbar.js +37 -166
- package/components/navbar/navbar.less +4 -26
- package/components/notification/notification-class.js +4 -39
- package/components/notification/notification-md.less +18 -8
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification-vars.less +15 -54
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.js +0 -2
- package/components/notification/notification.lazy.js +1 -1
- package/components/notification/notification.less +0 -3
- package/components/page/page-md.less +40 -10
- package/components/page/page-transitions/circle.less +15 -9
- package/components/page/page-transitions/fade.less +17 -11
- package/components/page/page-transitions/flip.less +9 -4
- package/components/page/page-vars.less +3 -19
- package/components/page/page.less +2 -10
- package/components/panel/panel-class.js +23 -127
- package/components/panel/panel-md.less +9 -0
- package/components/panel/panel-rtl.css +1 -1
- package/components/panel/panel-vars.less +7 -21
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.d.ts +2 -2
- package/components/panel/panel.js +0 -34
- package/components/panel/panel.lazy.js +1 -1
- package/components/panel/panel.less +56 -48
- package/components/panel/resizable-panel.js +2 -32
- package/components/panel/swipe-panel.js +16 -71
- package/components/photo-browser/photo-browser-class.js +41 -171
- package/components/photo-browser/photo-browser-rtl.css +1 -1
- package/components/photo-browser/photo-browser-vars.less +0 -3
- package/components/photo-browser/photo-browser.css +1 -1
- package/components/photo-browser/photo-browser.d.ts +2 -4
- package/components/photo-browser/photo-browser.js +1 -6
- package/components/photo-browser/photo-browser.lazy.js +1 -1
- package/components/photo-browser/photo-browser.less +0 -4
- package/components/picker/picker-class.js +26 -133
- package/components/picker/picker-column.js +11 -31
- package/components/picker/picker-ios.less +10 -0
- package/components/picker/picker-md.less +6 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker-vars.less +9 -25
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.js +0 -4
- package/components/picker/picker.lazy.js +1 -1
- package/components/picker/picker.less +0 -11
- package/components/pie-chart/pie-chart-class.js +8 -31
- package/components/pie-chart/pie-chart.js +0 -3
- package/components/pie-chart/pie-chart.less +0 -3
- package/components/popover/popover-class.js +72 -126
- package/components/popover/popover-ios.less +0 -50
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover-vars.less +6 -23
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +1 -12
- package/components/popover/popover.lazy.js +1 -1
- package/components/popover/popover.less +62 -5
- package/components/popup/popup-class.js +12 -78
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup-vars.less +7 -9
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +0 -4
- package/components/popup/popup.lazy.js +1 -1
- package/components/popup/popup.less +4 -4
- package/components/preloader/preloader-ios.less +3 -1
- package/components/preloader/preloader-md.less +5 -1
- package/components/preloader/preloader-rtl.css +1 -1
- package/components/preloader/preloader-vars.less +0 -6
- package/components/preloader/preloader.css +1 -1
- package/components/preloader/preloader.js +8 -25
- package/components/preloader/preloader.lazy.js +1 -1
- package/components/preloader/preloader.less +6 -3
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar-vars.less +2 -12
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +2 -31
- package/components/progressbar/progressbar.less +0 -3
- package/components/pull-to-refresh/pull-to-refresh-class.js +15 -107
- package/components/pull-to-refresh/pull-to-refresh-md.less +2 -1
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh-vars.less +0 -4
- package/components/pull-to-refresh/pull-to-refresh.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh.js +0 -8
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
- package/components/pull-to-refresh/pull-to-refresh.less +0 -3
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio-vars.less +0 -7
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.less +12 -5
- package/components/range/range-class.js +27 -112
- package/components/range/range-rtl.css +1 -1
- package/components/range/range-vars.less +10 -32
- package/components/range/range.css +1 -1
- package/components/range/range.js +0 -12
- package/components/range/range.less +0 -3
- package/components/searchbar/remove-diacritics.js +0 -4
- package/components/searchbar/searchbar-class.js +17 -138
- package/components/searchbar/searchbar-md.less +41 -16
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar-vars.less +25 -76
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.d.ts +2 -2
- package/components/searchbar/searchbar.js +0 -15
- package/components/searchbar/searchbar.lazy.js +1 -1
- package/components/searchbar/searchbar.less +14 -28
- package/components/sheet/sheet-class.js +15 -110
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet-vars.less +17 -6
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +0 -9
- package/components/sheet/sheet.lazy.js +1 -1
- package/components/sheet/sheet.less +10 -3
- package/components/skeleton/skeleton.less +1 -4
- package/components/smart-select/smart-select-class.js +36 -173
- package/components/smart-select/smart-select.d.ts +1 -3
- package/components/smart-select/smart-select.js +1 -14
- package/components/smart-select/smart-select.lazy.js +1 -1
- package/components/smart-select/smart-select.less +0 -3
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable-vars.less +8 -8
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +0 -44
- package/components/sortable/sortable.less +0 -3
- package/components/statusbar/statusbar.js +0 -36
- package/components/statusbar/statusbar.less +0 -3
- package/components/stepper/stepper-class.js +10 -83
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper-vars.less +12 -24
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +0 -12
- package/components/stepper/stepper.less +12 -23
- package/components/subnavbar/subnavbar-vars.less +3 -18
- package/components/subnavbar/subnavbar.js +0 -3
- package/components/subnavbar/subnavbar.less +1 -11
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout-vars.less +7 -6
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +2 -99
- package/components/swipeout/swipeout.less +2 -7
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +9 -30
- package/components/swiper/swiper.lazy.js +1 -1
- package/components/swiper/swiper.less +1 -16
- package/components/tabs/tabs-rtl.css +1 -1
- package/components/tabs/tabs.css +1 -1
- package/components/tabs/tabs.js +23 -60
- package/components/tabs/tabs.lazy.js +1 -1
- package/components/tabs/tabs.less +1 -3
- package/components/text-editor/text-editor-class.js +16 -102
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor-vars.less +12 -16
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +0 -8
- package/components/text-editor/text-editor.lazy.js +1 -1
- package/components/text-editor/text-editor.less +0 -6
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline-vars.less +13 -47
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.less +2 -9
- package/components/toast/toast-class.js +2 -16
- package/components/toast/toast-rtl.css +1 -1
- package/components/toast/toast-vars.less +5 -9
- package/components/toast/toast.css +1 -1
- package/components/toast/toast.js +0 -3
- package/components/toast/toast.less +0 -3
- package/components/toggle/toggle-class.js +6 -30
- package/components/toggle/toggle-ios.less +5 -1
- package/components/toggle/toggle-md.less +27 -11
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle-vars.less +19 -21
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +0 -8
- package/components/toggle/toggle.less +0 -4
- package/components/toolbar/toolbar-ios.less +2 -2
- package/components/toolbar/toolbar-md.less +28 -4
- package/components/toolbar/toolbar-vars.less +17 -52
- package/components/toolbar/toolbar.js +5 -43
- package/components/toolbar/toolbar.less +27 -45
- package/components/tooltip/tooltip-class.js +10 -64
- package/components/tooltip/tooltip-rtl.css +1 -1
- package/components/tooltip/tooltip-vars.less +12 -3
- package/components/tooltip/tooltip.css +1 -1
- package/components/tooltip/tooltip.js +0 -15
- package/components/tooltip/tooltip.less +0 -3
- package/components/touch-ripple/touch-ripple-class.js +0 -13
- package/components/touch-ripple/touch-ripple.js +0 -4
- package/components/touch-ripple/touch-ripple.less +1 -5
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview-vars.less +0 -3
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +2 -11
- package/components/treeview/treeview.lazy.js +1 -1
- package/components/treeview/treeview.less +0 -3
- package/components/typography/typography-rtl.css +1 -1
- package/components/typography/typography.css +1 -1
- package/components/typography/typography.less +25 -3
- package/components/view/resizable-view.js +2 -24
- package/components/view/view-class.js +28 -53
- package/components/view/view.d.ts +0 -14
- package/components/view/view.js +8 -32
- package/components/view/view.less +1 -4
- package/components/virtual-list/virtual-list-class.js +58 -146
- package/components/virtual-list/virtual-list.d.ts +1 -1
- package/components/virtual-list/virtual-list.js +0 -2
- package/components/virtual-list/virtual-list.lazy.js +1 -1
- package/components/virtual-list/virtual-list.less +0 -3
- package/framework7-bundle-rtl.css +3593 -5977
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +3591 -5978
- package/framework7-bundle.esm.js +4 -10
- package/framework7-bundle.js +6063 -12044
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -27
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +4 -10
- package/framework7-lite.esm.js +4 -6
- package/framework7-lite.js +31 -0
- package/framework7-rtl.css +803 -1591
- package/framework7-rtl.min.css +3 -3
- package/framework7-types.d.ts +1 -32
- package/framework7.css +803 -1594
- package/framework7.d.ts +1 -32
- package/framework7.esm.js +4 -6
- package/framework7.js +1770 -3407
- package/framework7.js.map +1 -1
- package/framework7.less +2 -23
- package/framework7.min.css +3 -3
- package/framework7.min.js +3 -3
- package/framework7.min.js.map +1 -1
- package/less/mixins.less +7 -88
- package/less/plugin.js +15 -0
- package/modules/clicks/clicks.js +10 -22
- package/modules/component/$h.js +0 -3
- package/modules/component/$jsx.js +0 -5
- package/modules/component/component-class.js +13 -66
- package/modules/component/component.d.ts +1 -2
- package/modules/component/component.js +0 -8
- package/modules/component/eventslisteners.js +12 -20
- package/modules/component/parse-component.js +18 -20
- package/modules/component/snabbdom/h.js +3 -12
- package/modules/component/snabbdom/helpers/attachto.js +9 -14
- package/modules/component/snabbdom/htmldomapi.js +0 -16
- package/modules/component/snabbdom/modules/attributes.js +7 -11
- package/modules/component/snabbdom/modules/class.js +4 -8
- package/modules/component/snabbdom/modules/dataset.js +3 -7
- package/modules/component/snabbdom/modules/eventlisteners.js +16 -22
- package/modules/component/snabbdom/modules/hero.js +4 -44
- package/modules/component/snabbdom/modules/props.js +5 -9
- package/modules/component/snabbdom/modules/style.js +13 -30
- package/modules/component/snabbdom/snabbdom.bundle.js +0 -6
- package/modules/component/snabbdom/snabbdom.js +13 -72
- package/modules/component/snabbdom/thunk.js +3 -11
- package/modules/component/snabbdom/tovnode.js +1 -6
- package/modules/component/vdom.js +4 -62
- package/modules/demo-module.js +0 -8
- package/modules/device/device.js +6 -11
- package/modules/history/history.js +0 -1
- package/modules/resize/resize.js +8 -11
- package/modules/router/async-component.js +0 -3
- package/modules/router/back.js +86 -275
- package/modules/router/clear-previous-history.js +5 -18
- package/modules/router/component-loader.js +4 -25
- package/modules/router/modal.js +16 -43
- package/modules/router/navigate.js +80 -249
- package/modules/router/process-route-queue.js +0 -12
- package/modules/router/redirect.js +0 -8
- package/modules/router/router-class.js +92 -315
- package/modules/router/router.d.ts +3 -5
- package/modules/router/router.js +0 -3
- package/modules/router/swipe-back.js +35 -139
- package/modules/router/tab.js +14 -43
- package/modules/service-worker/service-worker.js +0 -11
- package/modules/store/create-store.js +10 -29
- package/modules/touch/touch.d.ts +2 -4
- package/modules/touch/touch.js +13 -108
- package/package.json +4 -18
- package/shared/$jsx.js +0 -6
- package/shared/class.js +18 -43
- package/shared/constructor-methods.js +0 -11
- package/shared/events-class.js +0 -17
- package/shared/get-device.js +18 -34
- package/shared/get-support.js +2 -8
- package/shared/history.js +2 -30
- package/shared/material-color-utils.js +728 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +0 -18
- package/shared/utils.d.ts +0 -4
- package/shared/utils.js +191 -71
- package/components/accordion/accordion-aurora.less +0 -2
- package/components/actions/actions-aurora.less +0 -9
- package/components/app/app-aurora.less +0 -10
- package/components/appbar/appbar-aurora.less +0 -2
- package/components/appbar/appbar-ios.less +0 -2
- package/components/appbar/appbar-md.less +0 -2
- package/components/appbar/appbar-rtl.css +0 -1
- package/components/appbar/appbar-vars.less +0 -28
- package/components/appbar/appbar.css +0 -1
- package/components/appbar/appbar.d.ts +0 -14
- package/components/appbar/appbar.js +0 -3
- package/components/appbar/appbar.lazy.js +0 -1
- package/components/appbar/appbar.less +0 -106
- package/components/area-chart/area-chart-aurora.less +0 -2
- package/components/autocomplete/autocomplete-aurora.less +0 -17
- package/components/badge/badge-aurora.less +0 -2
- package/components/block/block-aurora.less +0 -2
- package/components/breadcrumbs/breadcrumbs-aurora.less +0 -2
- package/components/button/button-aurora.less +0 -25
- package/components/calendar/calendar-aurora.less +0 -2
- package/components/card/card-aurora.less +0 -2
- package/components/checkbox/checkbox-aurora.less +0 -39
- package/components/chip/chip-aurora.less +0 -14
- package/components/color-picker/color-picker-aurora.less +0 -2
- package/components/contacts-list/contacts-list-aurora.less +0 -2
- package/components/data-table/data-table-aurora.less +0 -64
- package/components/dialog/dialog-aurora.less +0 -112
- package/components/elevation/elevation-aurora.less +0 -2
- package/components/elevation/elevation-ios.less +0 -2
- package/components/elevation/elevation-md.less +0 -2
- package/components/elevation/elevation-rtl.css +0 -1
- package/components/elevation/elevation-vars.less +0 -51
- package/components/elevation/elevation.css +0 -1
- package/components/elevation/elevation.d.ts +0 -14
- package/components/elevation/elevation.js +0 -3
- package/components/elevation/elevation.lazy.js +0 -1
- package/components/elevation/elevation.less +0 -54
- package/components/fab/fab-aurora.less +0 -2
- package/components/form/form-aurora.less +0 -0
- package/components/gauge/gauge-aurora.less +0 -2
- package/components/grid/grid-aurora.less +0 -2
- package/components/icon/icon-aurora.less +0 -49
- package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
- package/components/input/input-aurora.less +0 -120
- package/components/lazy/lazy-aurora.less +0 -2
- package/components/lazy/lazy-ios.less +0 -2
- package/components/lazy/lazy-md.less +0 -2
- package/components/lazy/lazy-rtl.css +0 -1
- package/components/lazy/lazy.css +0 -1
- package/components/lazy/lazy.d.ts +0 -57
- package/components/lazy/lazy.js +0 -283
- package/components/lazy/lazy.lazy.js +0 -1
- package/components/lazy/lazy.less +0 -23
- package/components/link/link-aurora.less +0 -15
- package/components/list/list-aurora.less +0 -25
- package/components/list-index/list-index-aurora.less +0 -21
- package/components/login-screen/login-screen-aurora.less +0 -2
- package/components/menu/menu-aurora.less +0 -8
- package/components/menu/menu-ios.less +0 -2
- package/components/menu/menu-md.less +0 -2
- package/components/menu/menu-rtl.css +0 -1
- package/components/menu/menu-vars.less +0 -27
- package/components/menu/menu.css +0 -1
- package/components/menu/menu.d.ts +0 -32
- package/components/menu/menu.js +0 -87
- package/components/menu/menu.lazy.js +0 -1
- package/components/menu/menu.less +0 -232
- package/components/messagebar/messagebar-aurora.less +0 -53
- package/components/messages/messages-aurora.less +0 -137
- package/components/navbar/navbar-aurora.less +0 -70
- package/components/notification/notification-aurora.less +0 -59
- package/components/page/page-aurora.less +0 -49
- package/components/panel/panel-aurora.less +0 -2
- package/components/photo-browser/photo-browser-aurora.less +0 -2
- package/components/picker/picker-aurora.less +0 -2
- package/components/pie-chart/pie-chart-aurora.less +0 -2
- package/components/popover/popover-aurora.less +0 -56
- package/components/popup/popup-aurora.less +0 -2
- package/components/preloader/preloader-aurora.less +0 -53
- package/components/progressbar/progressbar-aurora.less +0 -72
- package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
- package/components/radio/radio-aurora.less +0 -86
- package/components/range/range-aurora.less +0 -9
- package/components/searchbar/searchbar-aurora.less +0 -86
- package/components/sheet/sheet-aurora.less +0 -2
- package/components/skeleton/skeleton-aurora.less +0 -2
- package/components/smart-select/smart-select-aurora.less +0 -2
- package/components/sortable/sortable-aurora.less +0 -7
- package/components/statusbar/statusbar-aurora.less +0 -2
- package/components/stepper/stepper-aurora.less +0 -32
- package/components/subnavbar/subnavbar-aurora.less +0 -51
- package/components/swipeout/swipeout-aurora.less +0 -2
- package/components/swiper/swiper-aurora.less +0 -2
- package/components/tabs/tabs-aurora.less +0 -2
- package/components/text-editor/text-editor-aurora.less +0 -9
- package/components/timeline/timeline-aurora.less +0 -7
- package/components/toast/toast-aurora.less +0 -64
- package/components/toggle/toggle-aurora.less +0 -26
- package/components/toolbar/toolbar-aurora.less +0 -43
- package/components/tooltip/tooltip-aurora.less +0 -2
- package/components/touch-ripple/touch-ripple-aurora.less +0 -2
- package/components/treeview/treeview-aurora.less +0 -31
- package/components/typography/typography-aurora.less +0 -2
- package/components/view/view-aurora.less +0 -2
- package/components/virtual-list/virtual-list-aurora.less +0 -2
- package/modules/request/request.d.ts +0 -15
- package/modules/request/request.js +0 -11
- package/postinstall.js +0 -3
- package/shared/request.d.ts +0 -115
- package/shared/request.js +0 -512
|
@@ -247,14 +247,12 @@ export namespace Router {
|
|
|
247
247
|
/** Event will be fired when router.updateCurrentUrl method called */
|
|
248
248
|
routeUrlUpdate(newRoute: Route, router: Router): void;
|
|
249
249
|
|
|
250
|
-
/** Event will be fired after router XHR opened and before XHR send. Can be used to modify the XHR object before it is sent. Use this callback to set custom headers, etc. As an arguments receives XHR object and navigating options object */
|
|
251
|
-
routerAjaxStart(xhr: XMLHttpRequest, options: RouteOptions): void;
|
|
252
250
|
/** Event will be fired when the request succeeds. As an arguments receives XHR object and navigating options object */
|
|
253
|
-
routerAjaxSuccess(
|
|
251
|
+
routerAjaxSuccess(response: Response, options: RouteOptions): void;
|
|
254
252
|
/** Event will be fired if the request fails. As an arguments receives XHR object and navigating options object */
|
|
255
|
-
routerAjaxError(
|
|
253
|
+
routerAjaxError(response: Response, options: RouteOptions): void;
|
|
256
254
|
/** Event will be fired when the request finishes. As an arguments receives XHR object and navigating options object */
|
|
257
|
-
routerAjaxComplete(
|
|
255
|
+
routerAjaxComplete(response: Response, options: RouteOptions): void;
|
|
258
256
|
|
|
259
257
|
/** Event will be triggered during swipe back move */
|
|
260
258
|
swipebackMove(data: SwipeBackData): void;
|
package/modules/router/router.js
CHANGED
|
@@ -11,10 +11,8 @@ export default {
|
|
|
11
11
|
components: []
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
|
|
15
14
|
create() {
|
|
16
15
|
const instance = this;
|
|
17
|
-
|
|
18
16
|
if (instance.app) {
|
|
19
17
|
// View Router
|
|
20
18
|
if (instance.params.router) {
|
|
@@ -25,5 +23,4 @@ export default {
|
|
|
25
23
|
instance.router = new Router(instance);
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
|
-
|
|
29
26
|
};
|
|
@@ -3,7 +3,6 @@ import History from '../../shared/history.js';
|
|
|
3
3
|
import { getSupport } from '../../shared/get-support.js';
|
|
4
4
|
import { getDevice } from '../../shared/get-device.js';
|
|
5
5
|
import { now } from '../../shared/utils.js';
|
|
6
|
-
|
|
7
6
|
function SwipeBack(r) {
|
|
8
7
|
const router = r;
|
|
9
8
|
const {
|
|
@@ -36,7 +35,6 @@ function SwipeBack(r) {
|
|
|
36
35
|
const paramsSwipeBackThreshold = params[`${app.theme}SwipeBackThreshold`];
|
|
37
36
|
const transformOrigin = app.rtl ? 'right center' : 'left center';
|
|
38
37
|
const transformOriginTitleLarge = app.rtl ? 'calc(100% - var(--f7-navbar-large-title-padding-left) - var(--f7-safe-area-left)) center' : 'calc(var(--f7-navbar-large-title-padding-left) + var(--f7-safe-area-left)) center';
|
|
39
|
-
|
|
40
38
|
function animatableNavElements() {
|
|
41
39
|
const els = [];
|
|
42
40
|
const inverter = app.rtl ? -1 : 1;
|
|
@@ -54,20 +52,17 @@ function SwipeBack(r) {
|
|
|
54
52
|
const $previousNavElements = $previousNavbarEl.find('.left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg');
|
|
55
53
|
let activeNavBackIconText;
|
|
56
54
|
let previousNavBackIconText;
|
|
57
|
-
|
|
58
55
|
if (params.iosAnimateNavbarBackIcon) {
|
|
59
56
|
if ($currentNavbarEl.hasClass('sliding') || $currentNavbarEl.find('.navbar-inner.sliding').length) {
|
|
60
57
|
activeNavBackIconText = $currentNavbarEl.find('.left').find('.back .icon + span').eq(0);
|
|
61
58
|
} else {
|
|
62
59
|
activeNavBackIconText = $currentNavbarEl.find('.left.sliding').find('.back .icon + span').eq(0);
|
|
63
60
|
}
|
|
64
|
-
|
|
65
61
|
if ($previousNavbarEl.hasClass('sliding') || $previousNavbarEl.find('.navbar-inner.sliding').length) {
|
|
66
62
|
previousNavBackIconText = $previousNavbarEl.find('.left').find('.back .icon + span').eq(0);
|
|
67
63
|
} else {
|
|
68
64
|
previousNavBackIconText = $previousNavbarEl.find('.left.sliding').find('.back .icon + span').eq(0);
|
|
69
65
|
}
|
|
70
|
-
|
|
71
66
|
if (activeNavBackIconText.length) {
|
|
72
67
|
$previousNavElements.each(el => {
|
|
73
68
|
if (!$(el).hasClass('title')) return;
|
|
@@ -75,7 +70,6 @@ function SwipeBack(r) {
|
|
|
75
70
|
});
|
|
76
71
|
}
|
|
77
72
|
}
|
|
78
|
-
|
|
79
73
|
$currentNavElements.each(navEl => {
|
|
80
74
|
const $navEl = $(navEl);
|
|
81
75
|
const isSubnavbar = $navEl.hasClass('subnavbar');
|
|
@@ -87,10 +81,8 @@ function SwipeBack(r) {
|
|
|
87
81
|
const el = {
|
|
88
82
|
el: navEl
|
|
89
83
|
};
|
|
90
|
-
|
|
91
84
|
if (fromLarge) {
|
|
92
85
|
if (isTitle) return;
|
|
93
|
-
|
|
94
86
|
if ($navEl.hasClass('title-large')) {
|
|
95
87
|
if (els.indexOf(el) < 0) els.push(el);
|
|
96
88
|
el.overflow = 'visible';
|
|
@@ -103,7 +95,6 @@ function SwipeBack(r) {
|
|
|
103
95
|
return;
|
|
104
96
|
}
|
|
105
97
|
}
|
|
106
|
-
|
|
107
98
|
if (toLarge) {
|
|
108
99
|
if (!fromLarge) {
|
|
109
100
|
if ($navEl.hasClass('title-large')) {
|
|
@@ -111,12 +102,9 @@ function SwipeBack(r) {
|
|
|
111
102
|
el.opacity = 0;
|
|
112
103
|
}
|
|
113
104
|
}
|
|
114
|
-
|
|
115
105
|
if (isLeft) {
|
|
116
106
|
if (els.indexOf(el) < 0) els.push(el);
|
|
117
|
-
|
|
118
107
|
el.opacity = progress => 1 - progress ** 0.33;
|
|
119
|
-
|
|
120
108
|
$navEl.find('.back span').each(subNavEl => {
|
|
121
109
|
els.push({
|
|
122
110
|
el: subNavEl,
|
|
@@ -127,50 +115,38 @@ function SwipeBack(r) {
|
|
|
127
115
|
return;
|
|
128
116
|
}
|
|
129
117
|
}
|
|
130
|
-
|
|
131
118
|
if (isBg) {
|
|
132
119
|
if (els.indexOf(el) < 0) els.push(el);
|
|
133
|
-
|
|
134
120
|
if (!fromLarge && !toLarge) {
|
|
135
121
|
if (currentNavIsCollapsed) {
|
|
136
122
|
if (currentNavIsLargeTransparent) {
|
|
137
123
|
el.className = 'ios-swipeback-navbar-bg-large';
|
|
138
124
|
}
|
|
139
|
-
|
|
140
125
|
el.transform = progress => `translateX(${100 * progress * inverter}%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))`;
|
|
141
126
|
} else {
|
|
142
127
|
el.transform = progress => `translateX(${100 * progress * inverter}%)`;
|
|
143
128
|
}
|
|
144
129
|
}
|
|
145
|
-
|
|
146
130
|
if (!fromLarge && toLarge) {
|
|
147
131
|
el.className = 'ios-swipeback-navbar-bg-large';
|
|
148
|
-
|
|
149
132
|
el.transform = progress => `translateX(${100 * progress * inverter}%) translateY(calc(-1 * ${1 - progress} * var(--f7-navbar-large-title-height)))`;
|
|
150
133
|
}
|
|
151
|
-
|
|
152
134
|
if (fromLarge && toLarge) {
|
|
153
135
|
el.transform = progress => `translateX(${100 * progress * inverter}%)`;
|
|
154
136
|
}
|
|
155
|
-
|
|
156
137
|
if (fromLarge && !toLarge) {
|
|
157
138
|
el.transform = progress => `translateX(${100 * progress * inverter}%) translateY(calc(-${progress} * var(--f7-navbar-large-title-height)))`;
|
|
158
139
|
}
|
|
159
|
-
|
|
160
140
|
return;
|
|
161
141
|
}
|
|
162
|
-
|
|
163
142
|
if ($navEl.hasClass('title-large')) return;
|
|
164
143
|
const isSliding = $navEl.hasClass('sliding') || $navEl.parents('.navbar-inner.sliding').length;
|
|
165
144
|
if (els.indexOf(el) < 0) els.push(el);
|
|
166
|
-
|
|
167
145
|
if (!isSubnavbar || isSubnavbar && !isSliding) {
|
|
168
146
|
el.opacity = progress => 1 - progress ** 0.33;
|
|
169
147
|
}
|
|
170
|
-
|
|
171
148
|
if (isSliding) {
|
|
172
149
|
let transformTarget = el;
|
|
173
|
-
|
|
174
150
|
if (isLeft && activeNavBackIconText.length && params.iosAnimateNavbarBackIcon) {
|
|
175
151
|
const textEl = {
|
|
176
152
|
el: activeNavBackIconText[0]
|
|
@@ -178,15 +154,12 @@ function SwipeBack(r) {
|
|
|
178
154
|
transformTarget = textEl;
|
|
179
155
|
els.push(textEl);
|
|
180
156
|
}
|
|
181
|
-
|
|
182
157
|
transformTarget.transform = progress => {
|
|
183
158
|
let activeNavTranslate = progress * transformTarget.el.f7NavbarRightOffset;
|
|
184
159
|
if (device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate);
|
|
185
|
-
|
|
186
160
|
if (isSubnavbar && currentNavIsLarge) {
|
|
187
161
|
return `translate3d(${activeNavTranslate}px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)`;
|
|
188
162
|
}
|
|
189
|
-
|
|
190
163
|
return `translate3d(${activeNavTranslate}px,0,0)`;
|
|
191
164
|
};
|
|
192
165
|
}
|
|
@@ -201,11 +174,9 @@ function SwipeBack(r) {
|
|
|
201
174
|
const el = {
|
|
202
175
|
el: navEl
|
|
203
176
|
};
|
|
204
|
-
|
|
205
177
|
if (toLarge) {
|
|
206
178
|
if (isTitle) return;
|
|
207
179
|
if (els.indexOf(el) < 0) els.push(el);
|
|
208
|
-
|
|
209
180
|
if ($navEl.hasClass('title-large')) {
|
|
210
181
|
el.opacity = 1;
|
|
211
182
|
el.overflow = 'visible';
|
|
@@ -220,50 +191,38 @@ function SwipeBack(r) {
|
|
|
220
191
|
return;
|
|
221
192
|
}
|
|
222
193
|
}
|
|
223
|
-
|
|
224
194
|
if (isBg) {
|
|
225
195
|
if (els.indexOf(el) < 0) els.push(el);
|
|
226
|
-
|
|
227
196
|
if (!fromLarge && !toLarge) {
|
|
228
197
|
if (previousNavIsCollapsed) {
|
|
229
198
|
if (previousNavIsLargeTransparent) {
|
|
230
199
|
el.className = 'ios-swipeback-navbar-bg-large';
|
|
231
200
|
}
|
|
232
|
-
|
|
233
201
|
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))`;
|
|
234
202
|
} else {
|
|
235
203
|
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%)`;
|
|
236
204
|
}
|
|
237
205
|
}
|
|
238
|
-
|
|
239
206
|
if (!fromLarge && toLarge) {
|
|
240
207
|
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%) translateY(calc(-1 * ${1 - progress} * var(--f7-navbar-large-title-height)))`;
|
|
241
208
|
}
|
|
242
|
-
|
|
243
209
|
if (fromLarge && !toLarge) {
|
|
244
210
|
el.className = 'ios-swipeback-navbar-bg-large';
|
|
245
|
-
|
|
246
211
|
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%) translateY(calc(-${progress} * var(--f7-navbar-large-title-height)))`;
|
|
247
212
|
}
|
|
248
|
-
|
|
249
213
|
if (fromLarge && toLarge) {
|
|
250
214
|
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%)`;
|
|
251
215
|
}
|
|
252
|
-
|
|
253
216
|
return;
|
|
254
217
|
}
|
|
255
|
-
|
|
256
218
|
if ($navEl.hasClass('title-large')) return;
|
|
257
219
|
const isSliding = $navEl.hasClass('sliding') || $previousNavbarEl.children('.navbar-inner.sliding').length;
|
|
258
220
|
if (els.indexOf(el) < 0) els.push(el);
|
|
259
|
-
|
|
260
221
|
if (!isSubnavbar || isSubnavbar && !isSliding) {
|
|
261
222
|
el.opacity = progress => progress ** 3;
|
|
262
223
|
}
|
|
263
|
-
|
|
264
224
|
if (isSliding) {
|
|
265
225
|
let transformTarget = el;
|
|
266
|
-
|
|
267
226
|
if (isLeft && previousNavBackIconText.length && params.iosAnimateNavbarBackIcon) {
|
|
268
227
|
const textEl = {
|
|
269
228
|
el: previousNavBackIconText[0]
|
|
@@ -271,22 +230,18 @@ function SwipeBack(r) {
|
|
|
271
230
|
transformTarget = textEl;
|
|
272
231
|
els.push(textEl);
|
|
273
232
|
}
|
|
274
|
-
|
|
275
233
|
transformTarget.transform = progress => {
|
|
276
234
|
let previousNavTranslate = transformTarget.el.f7NavbarLeftOffset * (1 - progress);
|
|
277
235
|
if (device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate);
|
|
278
|
-
|
|
279
236
|
if (isSubnavbar && previousNavIsLarge) {
|
|
280
237
|
return `translate3d(${previousNavTranslate}px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)`;
|
|
281
238
|
}
|
|
282
|
-
|
|
283
239
|
return `translate3d(${previousNavTranslate}px,0,0)`;
|
|
284
240
|
};
|
|
285
241
|
}
|
|
286
242
|
});
|
|
287
243
|
return els;
|
|
288
244
|
}
|
|
289
|
-
|
|
290
245
|
function setAnimatableNavElements(_temp) {
|
|
291
246
|
let {
|
|
292
247
|
progress,
|
|
@@ -295,39 +250,31 @@ function SwipeBack(r) {
|
|
|
295
250
|
reflow
|
|
296
251
|
} = _temp === void 0 ? {} : _temp;
|
|
297
252
|
const styles = ['overflow', 'transform', 'transform-origin', 'opacity'];
|
|
298
|
-
|
|
299
253
|
if (transition === true || transition === false) {
|
|
300
254
|
for (let i = 0; i < animatableNavEls.length; i += 1) {
|
|
301
255
|
const el = animatableNavEls[i];
|
|
302
|
-
|
|
303
256
|
if (el && el.el) {
|
|
304
257
|
if (transition === true) el.el.classList.add('navbar-page-transitioning');
|
|
305
258
|
if (transition === false) el.el.classList.remove('navbar-page-transitioning');
|
|
306
259
|
}
|
|
307
260
|
}
|
|
308
261
|
}
|
|
309
|
-
|
|
310
262
|
if (reflow && animatableNavEls.length && animatableNavEls[0] && animatableNavEls[0].el) {
|
|
311
263
|
// eslint-disable-next-line
|
|
312
264
|
animatableNavEls[0].el._clientLeft = animatableNavEls[0].el.clientLeft;
|
|
313
265
|
}
|
|
314
|
-
|
|
315
266
|
for (let i = 0; i < animatableNavEls.length; i += 1) {
|
|
316
267
|
const el = animatableNavEls[i];
|
|
317
|
-
|
|
318
268
|
if (el && el.el) {
|
|
319
269
|
if (el.className && !el.classNameSet && !reset) {
|
|
320
270
|
el.el.classList.add(el.className);
|
|
321
271
|
el.classNameSet = true;
|
|
322
272
|
}
|
|
323
|
-
|
|
324
273
|
if (el.className && reset) {
|
|
325
274
|
el.el.classList.remove(el.className);
|
|
326
275
|
}
|
|
327
|
-
|
|
328
276
|
for (let j = 0; j < styles.length; j += 1) {
|
|
329
277
|
const styleProp = styles[j];
|
|
330
|
-
|
|
331
278
|
if (el[styleProp]) {
|
|
332
279
|
if (reset) {
|
|
333
280
|
el.el.style[styleProp] = '';
|
|
@@ -341,7 +288,6 @@ function SwipeBack(r) {
|
|
|
341
288
|
}
|
|
342
289
|
}
|
|
343
290
|
}
|
|
344
|
-
|
|
345
291
|
function handleTouchStart(e) {
|
|
346
292
|
const swipeBackEnabled = params[`${app.theme}SwipeBack`];
|
|
347
293
|
if (!allowViewTouchMove || !swipeBackEnabled || isTouched || app.swipeout && app.swipeout.el || !router.allowPageChange) return;
|
|
@@ -355,103 +301,87 @@ function SwipeBack(r) {
|
|
|
355
301
|
touchStartTime = now();
|
|
356
302
|
dynamicNavbar = router.dynamicNavbar;
|
|
357
303
|
}
|
|
358
|
-
|
|
359
304
|
function handleTouchMove(e) {
|
|
360
305
|
if (!isTouched) return;
|
|
361
306
|
const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
|
362
307
|
const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
|
363
|
-
|
|
364
308
|
if (typeof isScrolling === 'undefined') {
|
|
365
309
|
isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)) || pageX < touchesStart.x && !app.rtl || pageX > touchesStart.x && app.rtl;
|
|
366
310
|
}
|
|
367
|
-
|
|
368
311
|
if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) {
|
|
369
312
|
isTouched = false;
|
|
370
313
|
return;
|
|
371
314
|
}
|
|
372
|
-
|
|
373
315
|
if (!isMoved) {
|
|
374
316
|
// Calc values during first move fired
|
|
375
317
|
let cancel = false;
|
|
376
318
|
const target = $(e.target);
|
|
377
319
|
const swipeout = target.closest('.swipeout');
|
|
378
|
-
|
|
379
320
|
if (swipeout.length > 0) {
|
|
380
321
|
if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true;
|
|
381
322
|
if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true;
|
|
382
323
|
}
|
|
383
|
-
|
|
384
324
|
$currentPageEl = target.closest('.page');
|
|
385
325
|
if ($currentPageEl.hasClass('no-swipeback') || target.closest('.no-swipeback, .card-opened').length > 0) cancel = true;
|
|
386
|
-
$previousPageEl = $el.find('.page-previous
|
|
387
|
-
|
|
326
|
+
$previousPageEl = $el.find('.page-previous');
|
|
388
327
|
if ($previousPageEl.length > 1) {
|
|
389
328
|
$previousPageEl = $previousPageEl.eq($previousPageEl.length - 1);
|
|
390
329
|
}
|
|
391
|
-
|
|
392
330
|
let notFromBorder = touchesStart.x - $el.offset().left > paramsSwipeBackActiveArea;
|
|
393
331
|
viewContainerWidth = $el.width();
|
|
394
|
-
|
|
395
332
|
if (app.rtl) {
|
|
396
333
|
notFromBorder = touchesStart.x < $el.offset().left - $el[0].scrollLeft + (viewContainerWidth - paramsSwipeBackActiveArea);
|
|
397
334
|
} else {
|
|
398
335
|
notFromBorder = touchesStart.x - $el.offset().left > paramsSwipeBackActiveArea;
|
|
399
336
|
}
|
|
400
|
-
|
|
401
337
|
if (notFromBorder) cancel = true;
|
|
402
338
|
if ($previousPageEl.length === 0 || $currentPageEl.length === 0) cancel = true;
|
|
403
|
-
|
|
404
339
|
if (cancel) {
|
|
405
340
|
isTouched = false;
|
|
406
341
|
return;
|
|
407
342
|
}
|
|
408
|
-
|
|
409
343
|
if (paramsSwipeBackAnimateShadow) {
|
|
410
344
|
$pageShadowEl = $currentPageEl.find('.page-shadow-effect');
|
|
411
|
-
|
|
412
345
|
if ($pageShadowEl.length === 0) {
|
|
413
346
|
$pageShadowEl = $('<div class="page-shadow-effect"></div>');
|
|
414
347
|
$currentPageEl.append($pageShadowEl);
|
|
415
348
|
}
|
|
416
349
|
}
|
|
417
|
-
|
|
418
350
|
if (paramsSwipeBackAnimateOpacity) {
|
|
419
351
|
$pageOpacityEl = $previousPageEl.find('.page-opacity-effect');
|
|
420
|
-
|
|
421
352
|
if ($pageOpacityEl.length === 0) {
|
|
422
353
|
$pageOpacityEl = $('<div class="page-opacity-effect"></div>');
|
|
423
354
|
$previousPageEl.append($pageOpacityEl);
|
|
424
355
|
}
|
|
425
356
|
}
|
|
426
|
-
|
|
427
357
|
if (dynamicNavbar) {
|
|
428
|
-
$currentNavbarEl = $navbarsEl.find('.navbar-current
|
|
429
|
-
$previousNavbarEl = $navbarsEl.find('.navbar-previous
|
|
430
|
-
|
|
358
|
+
$currentNavbarEl = $navbarsEl.find('.navbar-current');
|
|
359
|
+
$previousNavbarEl = $navbarsEl.find('.navbar-previous');
|
|
431
360
|
if ($previousNavbarEl.length > 1) {
|
|
432
361
|
$previousNavbarEl = $previousNavbarEl.eq($previousNavbarEl.length - 1);
|
|
433
362
|
}
|
|
434
|
-
|
|
435
363
|
animatableNavEls = animatableNavElements($previousNavbarEl, $currentNavbarEl);
|
|
436
|
-
}
|
|
437
|
-
|
|
364
|
+
}
|
|
438
365
|
|
|
366
|
+
// Close/Hide Any Picker
|
|
439
367
|
if ($('.sheet.modal-in').length > 0 && app.sheet) {
|
|
440
368
|
app.sheet.close($('.sheet.modal-in'));
|
|
441
369
|
}
|
|
442
370
|
}
|
|
443
|
-
|
|
444
371
|
e.f7PreventSwipePanel = true;
|
|
445
372
|
isMoved = true;
|
|
446
373
|
app.preventSwipePanelBySwipeBack = true;
|
|
447
|
-
e.preventDefault();
|
|
374
|
+
e.preventDefault();
|
|
448
375
|
|
|
449
|
-
|
|
376
|
+
// RTL inverter
|
|
377
|
+
const inverter = app.rtl ? -1 : 1;
|
|
450
378
|
|
|
379
|
+
// Touches diff
|
|
451
380
|
touchesDiff = (pageX - touchesStart.x - paramsSwipeBackThreshold) * inverter;
|
|
452
381
|
if (touchesDiff < 0) touchesDiff = 0;
|
|
453
|
-
const percentage = Math.min(Math.max(touchesDiff / viewContainerWidth, 0), 1);
|
|
382
|
+
const percentage = Math.min(Math.max(touchesDiff / viewContainerWidth, 0), 1);
|
|
454
383
|
|
|
384
|
+
// Swipe Back Callback
|
|
455
385
|
const callbackData = {
|
|
456
386
|
percentage,
|
|
457
387
|
progress: percentage,
|
|
@@ -461,11 +391,11 @@ function SwipeBack(r) {
|
|
|
461
391
|
previousNavbarEl: $previousNavbarEl[0]
|
|
462
392
|
};
|
|
463
393
|
$el.trigger('swipeback:move', callbackData);
|
|
464
|
-
router.emit('swipebackMove', callbackData);
|
|
394
|
+
router.emit('swipebackMove', callbackData);
|
|
465
395
|
|
|
396
|
+
// Transform pages
|
|
466
397
|
let currentPageTranslate = touchesDiff * inverter;
|
|
467
398
|
let previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter;
|
|
468
|
-
|
|
469
399
|
if (!app.rtl) {
|
|
470
400
|
currentPageTranslate = Math.min(currentPageTranslate, viewContainerWidth);
|
|
471
401
|
previousPageTranslate = Math.min(previousPageTranslate, 0);
|
|
@@ -473,86 +403,70 @@ function SwipeBack(r) {
|
|
|
473
403
|
currentPageTranslate = Math.max(currentPageTranslate, -viewContainerWidth);
|
|
474
404
|
previousPageTranslate = Math.max(previousPageTranslate, 0);
|
|
475
405
|
}
|
|
476
|
-
|
|
477
406
|
if (device.pixelRatio === 1) {
|
|
478
407
|
currentPageTranslate = Math.round(currentPageTranslate);
|
|
479
408
|
previousPageTranslate = Math.round(previousPageTranslate);
|
|
480
409
|
}
|
|
481
|
-
|
|
482
410
|
router.swipeBackActive = true;
|
|
483
411
|
$([$currentPageEl[0], $previousPageEl[0]]).addClass('page-swipeback-active');
|
|
484
412
|
$currentPageEl.transform(`translate3d(${currentPageTranslate}px,0,0)`);
|
|
485
413
|
if (paramsSwipeBackAnimateShadow) $pageShadowEl[0].style.opacity = 1 - 1 * percentage;
|
|
486
|
-
|
|
487
414
|
if (app.theme === 'ios') {
|
|
488
415
|
$previousPageEl.transform(`translate3d(${previousPageTranslate}px,0,0)`);
|
|
489
416
|
}
|
|
417
|
+
if (paramsSwipeBackAnimateOpacity) $pageOpacityEl[0].style.opacity = 1 - 1 * percentage;
|
|
490
418
|
|
|
491
|
-
|
|
492
|
-
|
|
419
|
+
// Dynamic Navbars Animation
|
|
493
420
|
if (!dynamicNavbar) return;
|
|
494
421
|
setAnimatableNavElements({
|
|
495
422
|
progress: percentage
|
|
496
423
|
});
|
|
497
424
|
}
|
|
498
|
-
|
|
499
425
|
function handleTouchEnd() {
|
|
500
426
|
app.preventSwipePanelBySwipeBack = false;
|
|
501
|
-
|
|
502
427
|
if (!isTouched || !isMoved) {
|
|
503
428
|
isTouched = false;
|
|
504
429
|
isMoved = false;
|
|
505
430
|
return;
|
|
506
431
|
}
|
|
507
|
-
|
|
508
432
|
isTouched = false;
|
|
509
433
|
isMoved = false;
|
|
510
434
|
router.swipeBackActive = false;
|
|
511
435
|
const $pages = $([$currentPageEl[0], $previousPageEl[0]]);
|
|
512
436
|
$pages.removeClass('page-swipeback-active');
|
|
513
|
-
|
|
514
437
|
if (touchesDiff === 0) {
|
|
515
438
|
$pages.transform('');
|
|
516
439
|
if ($pageShadowEl && $pageShadowEl.length > 0) $pageShadowEl.remove();
|
|
517
440
|
if ($pageOpacityEl && $pageOpacityEl.length > 0) $pageOpacityEl.remove();
|
|
518
|
-
|
|
519
441
|
if (dynamicNavbar) {
|
|
520
442
|
setAnimatableNavElements({
|
|
521
443
|
reset: true
|
|
522
444
|
});
|
|
523
445
|
}
|
|
524
|
-
|
|
525
446
|
return;
|
|
526
447
|
}
|
|
527
|
-
|
|
528
448
|
const timeDiff = now() - touchStartTime;
|
|
529
|
-
let pageChanged = false;
|
|
530
|
-
|
|
449
|
+
let pageChanged = false;
|
|
450
|
+
// Swipe back to previous page
|
|
531
451
|
if (timeDiff < 300 && touchesDiff > 10 || timeDiff >= 300 && touchesDiff > viewContainerWidth / 2) {
|
|
532
452
|
$currentPageEl.removeClass('page-current').addClass(`page-next${app.theme !== 'ios' ? ' page-next-on-right' : ''}`);
|
|
533
453
|
$previousPageEl.removeClass('page-previous').addClass('page-current').removeAttr('aria-hidden');
|
|
534
454
|
if ($pageShadowEl) $pageShadowEl[0].style.opacity = '';
|
|
535
455
|
if ($pageOpacityEl) $pageOpacityEl[0].style.opacity = '';
|
|
536
|
-
|
|
537
456
|
if (dynamicNavbar) {
|
|
538
457
|
router.setNavbarPosition($currentNavbarEl, 'next');
|
|
539
458
|
router.setNavbarPosition($previousNavbarEl, 'current', false);
|
|
540
459
|
}
|
|
541
|
-
|
|
542
460
|
pageChanged = true;
|
|
543
|
-
}
|
|
461
|
+
}
|
|
462
|
+
// Reset custom styles
|
|
544
463
|
// Add transitioning class for transition-duration
|
|
545
|
-
|
|
546
|
-
|
|
547
464
|
$pages.addClass('page-transitioning page-transitioning-swipeback');
|
|
548
|
-
|
|
549
465
|
if (device.ios) {
|
|
550
466
|
// eslint-disable-next-line
|
|
551
467
|
$currentPageEl[0]._clientLeft = $currentPageEl[0].clientLeft;
|
|
552
468
|
}
|
|
553
|
-
|
|
554
469
|
$pages.transform('');
|
|
555
|
-
|
|
556
470
|
if (dynamicNavbar) {
|
|
557
471
|
setAnimatableNavElements({
|
|
558
472
|
progress: pageChanged ? 1 : 0,
|
|
@@ -560,22 +474,22 @@ function SwipeBack(r) {
|
|
|
560
474
|
reflow: !!device.ios
|
|
561
475
|
});
|
|
562
476
|
}
|
|
563
|
-
|
|
564
477
|
allowViewTouchMove = false;
|
|
565
|
-
router.allowPageChange = false;
|
|
478
|
+
router.allowPageChange = false;
|
|
566
479
|
|
|
480
|
+
// Swipe Back Callback
|
|
567
481
|
const callbackData = {
|
|
568
482
|
currentPageEl: $currentPageEl[0],
|
|
569
483
|
previousPageEl: $previousPageEl[0],
|
|
570
484
|
currentNavbarEl: $currentNavbarEl[0],
|
|
571
485
|
previousNavbarEl: $previousNavbarEl[0]
|
|
572
486
|
};
|
|
573
|
-
|
|
574
487
|
if (pageChanged) {
|
|
575
488
|
// Update Route
|
|
576
489
|
router.currentRoute = $previousPageEl[0].f7Page.route;
|
|
577
|
-
router.currentPage = $previousPageEl[0];
|
|
490
|
+
router.currentPage = $previousPageEl[0];
|
|
578
491
|
|
|
492
|
+
// Page before animation callback
|
|
579
493
|
router.pageCallback('beforeOut', $currentPageEl, $currentNavbarEl, 'current', 'next', {
|
|
580
494
|
route: $currentPageEl[0].f7Page.route,
|
|
581
495
|
swipeBack: true
|
|
@@ -590,34 +504,30 @@ function SwipeBack(r) {
|
|
|
590
504
|
$el.trigger('swipeback:beforereset', callbackData);
|
|
591
505
|
router.emit('swipebackBeforeReset', callbackData);
|
|
592
506
|
}
|
|
593
|
-
|
|
594
507
|
$currentPageEl.transitionEnd(() => {
|
|
595
508
|
$pages.removeClass('page-transitioning page-transitioning-swipeback');
|
|
596
|
-
|
|
597
509
|
if (dynamicNavbar) {
|
|
598
510
|
setAnimatableNavElements({
|
|
599
511
|
reset: true,
|
|
600
512
|
transition: false
|
|
601
513
|
});
|
|
602
514
|
}
|
|
603
|
-
|
|
604
515
|
allowViewTouchMove = true;
|
|
605
516
|
router.allowPageChange = true;
|
|
606
|
-
|
|
607
517
|
if (pageChanged) {
|
|
608
518
|
// Update History
|
|
609
519
|
if (router.history.length === 1) {
|
|
610
520
|
router.history.unshift(router.url);
|
|
611
521
|
}
|
|
612
|
-
|
|
613
522
|
router.history.pop();
|
|
614
|
-
router.saveHistory();
|
|
523
|
+
router.saveHistory();
|
|
615
524
|
|
|
525
|
+
// Update push state
|
|
616
526
|
if (params.browserHistory) {
|
|
617
527
|
History.back();
|
|
618
|
-
}
|
|
619
|
-
|
|
528
|
+
}
|
|
620
529
|
|
|
530
|
+
// Page after animation callback
|
|
621
531
|
router.pageCallback('afterOut', $currentPageEl, $currentNavbarEl, 'current', 'next', {
|
|
622
532
|
route: $currentPageEl[0].f7Page.route,
|
|
623
533
|
swipeBack: true
|
|
@@ -625,29 +535,20 @@ function SwipeBack(r) {
|
|
|
625
535
|
router.pageCallback('afterIn', $previousPageEl, $previousNavbarEl, 'previous', 'current', {
|
|
626
536
|
route: $previousPageEl[0].f7Page.route,
|
|
627
537
|
swipeBack: true
|
|
628
|
-
});
|
|
629
|
-
|
|
630
|
-
if (params.stackPages && router.initialPages.indexOf($currentPageEl[0]) >= 0) {
|
|
631
|
-
$currentPageEl.addClass('stacked');
|
|
538
|
+
});
|
|
632
539
|
|
|
633
|
-
|
|
634
|
-
$currentNavbarEl.addClass('stacked');
|
|
635
|
-
}
|
|
636
|
-
} else {
|
|
637
|
-
router.pageCallback('beforeRemove', $currentPageEl, $currentNavbarEl, 'next', {
|
|
638
|
-
swipeBack: true
|
|
639
|
-
});
|
|
640
|
-
router.removePage($currentPageEl);
|
|
540
|
+
// Remove Old Page
|
|
641
541
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
542
|
+
router.pageCallback('beforeRemove', $currentPageEl, $currentNavbarEl, 'next', {
|
|
543
|
+
swipeBack: true
|
|
544
|
+
});
|
|
545
|
+
router.removePage($currentPageEl);
|
|
546
|
+
if (dynamicNavbar) {
|
|
547
|
+
router.removeNavbar($currentNavbarEl);
|
|
645
548
|
}
|
|
646
|
-
|
|
647
549
|
$el.trigger('swipeback:afterchange', callbackData);
|
|
648
550
|
router.emit('swipebackAfterChange', callbackData);
|
|
649
551
|
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
650
|
-
|
|
651
552
|
if (params.preloadPreviousPage) {
|
|
652
553
|
router.back(router.history[router.history.length - 2], {
|
|
653
554
|
preload: true
|
|
@@ -657,12 +558,10 @@ function SwipeBack(r) {
|
|
|
657
558
|
$el.trigger('swipeback:afterreset', callbackData);
|
|
658
559
|
router.emit('swipebackAfterReset', callbackData);
|
|
659
560
|
}
|
|
660
|
-
|
|
661
561
|
if ($pageShadowEl && $pageShadowEl.length > 0) $pageShadowEl.remove();
|
|
662
562
|
if ($pageOpacityEl && $pageOpacityEl.length > 0) $pageOpacityEl.remove();
|
|
663
563
|
});
|
|
664
564
|
}
|
|
665
|
-
|
|
666
565
|
function attachEvents() {
|
|
667
566
|
const passiveListener = app.touchEvents.start === 'touchstart' && support.passiveListener ? {
|
|
668
567
|
passive: true,
|
|
@@ -672,7 +571,6 @@ function SwipeBack(r) {
|
|
|
672
571
|
app.on('touchmove:active', handleTouchMove);
|
|
673
572
|
app.on('touchend:passive', handleTouchEnd);
|
|
674
573
|
}
|
|
675
|
-
|
|
676
574
|
function detachEvents() {
|
|
677
575
|
const passiveListener = app.touchEvents.start === 'touchstart' && support.passiveListener ? {
|
|
678
576
|
passive: true,
|
|
@@ -682,9 +580,7 @@ function SwipeBack(r) {
|
|
|
682
580
|
app.off('touchmove:active', handleTouchMove);
|
|
683
581
|
app.off('touchend:passive', handleTouchEnd);
|
|
684
582
|
}
|
|
685
|
-
|
|
686
583
|
attachEvents();
|
|
687
584
|
router.on('routerDestroy', detachEvents);
|
|
688
585
|
}
|
|
689
|
-
|
|
690
586
|
export default SwipeBack;
|