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