framework7 6.3.4 → 7.0.0-beta.3
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 +132 -1
- package/components/accordion/accordion.umd.js +1 -0
- package/components/actions/actions-class.js +365 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.js +42 -1
- package/components/actions/actions.umd.js +1 -0
- package/components/app/app-class.d.ts +10 -10
- package/{esm/components → components}/app/app-class.js +107 -140
- package/components/app/app.less +3 -3
- package/{esm/components → components}/app/load-module.js +32 -32
- package/components/appbar/appbar.js +3 -1
- package/components/appbar/appbar.umd.js +1 -0
- package/components/area-chart/area-chart-class.js +507 -0
- package/components/area-chart/area-chart-rtl.css +1 -1
- package/components/area-chart/area-chart.css +1 -1
- package/components/area-chart/area-chart.js +47 -1
- package/components/area-chart/area-chart.umd.js +1 -0
- package/{esm/components → components}/autocomplete/autocomplete-class.js +241 -253
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.js +86 -1
- package/components/autocomplete/autocomplete.umd.js +1 -0
- package/{esm/components → components}/badge/badge.js +0 -0
- package/{esm/components → components}/block/block.js +0 -0
- package/{esm/components → components}/button/button.js +0 -0
- package/{esm/components → components}/calendar/calendar-class.js +676 -643
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.js +111 -1
- package/components/calendar/calendar.umd.js +1 -0
- package/components/card/card-rtl.css +1 -1
- package/components/card/card.css +1 -1
- package/components/card/card.js +592 -1
- package/components/card/card.umd.js +1 -0
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.js +3 -1
- package/components/checkbox/checkbox.umd.js +1 -0
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip.css +1 -1
- package/components/chip/chip.js +3 -1
- package/components/chip/chip.umd.js +1 -0
- package/{esm/components → components}/color-picker/color-picker-class.js +336 -349
- 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 +92 -1
- package/components/color-picker/color-picker.umd.js +1 -0
- package/{esm/components → components}/color-picker/modules/alpha-slider.js +30 -19
- package/{esm/components → components}/color-picker/modules/brightness-slider.js +35 -24
- package/{esm/components → components}/color-picker/modules/current-color.js +4 -2
- package/{esm/components → components}/color-picker/modules/hex.js +27 -16
- package/{esm/components → components}/color-picker/modules/hs-spectrum.js +37 -25
- package/{esm/components → components}/color-picker/modules/hsb-sliders.js +54 -41
- package/{esm/components → components}/color-picker/modules/hue-slider.js +29 -18
- package/{esm/components → components}/color-picker/modules/initial-current-colors.js +14 -9
- package/{esm/components → components}/color-picker/modules/palette.js +14 -11
- package/{esm/components → components}/color-picker/modules/rgb-bars.js +42 -29
- package/{esm/components → components}/color-picker/modules/rgb-sliders.js +47 -34
- package/{esm/components → components}/color-picker/modules/sb-spectrum.js +38 -26
- package/{esm/components → components}/color-picker/modules/wheel.js +59 -47
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/contacts-list.js +3 -1
- package/components/contacts-list/contacts-list.umd.js +1 -0
- package/{esm/components → components}/data-table/data-table-class.js +40 -59
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +72 -1
- package/components/data-table/data-table.umd.js +1 -0
- package/{esm/components → components}/dialog/dialog-class.js +58 -67
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.js +254 -1
- package/components/dialog/dialog.umd.js +1 -0
- package/components/elevation/elevation.js +3 -1
- package/components/elevation/elevation.umd.js +1 -0
- package/components/fab/fab.js +181 -1
- package/components/fab/fab.umd.js +1 -0
- package/components/form/form.js +347 -1
- package/components/form/form.umd.js +1 -0
- package/components/gauge/gauge-class.js +306 -0
- package/components/gauge/gauge.js +99 -1
- package/components/gauge/gauge.umd.js +1 -0
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.js +227 -1
- package/components/grid/grid.umd.js +1 -0
- package/{esm/components → components}/icon/icon.js +0 -0
- package/components/infinite-scroll/infinite-scroll.js +110 -1
- package/components/infinite-scroll/infinite-scroll.umd.js +1 -0
- package/components/input/input-rtl.css +1 -1
- package/components/input/input.css +1 -1
- package/components/input/input.js +394 -1
- package/components/input/input.less +1 -1
- package/components/input/input.umd.js +1 -0
- package/components/lazy/lazy.js +283 -1
- package/components/lazy/lazy.umd.js +1 -0
- package/{esm/components → components}/link/link.js +0 -0
- package/{esm/components → components}/list/list.js +0 -0
- package/{esm/components → components}/list-index/list-index-class.js +113 -121
- package/components/list-index/list-index-rtl.css +1 -1
- package/components/list-index/list-index.css +1 -1
- package/components/list-index/list-index.js +73 -1
- package/components/list-index/list-index.umd.js +1 -0
- package/components/login-screen/login-screen-class.js +43 -0
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +28 -1
- package/components/login-screen/login-screen.less +1 -1
- package/components/login-screen/login-screen.umd.js +1 -0
- package/components/menu/menu.js +79 -1
- package/components/menu/menu.umd.js +1 -0
- package/{esm/components → components}/messagebar/messagebar-class.js +124 -152
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +74 -1
- package/components/messagebar/messagebar.umd.js +1 -0
- package/{esm/components → components}/messages/messages-class.js +162 -242
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +73 -1
- package/components/messages/messages.umd.js +1 -0
- package/{esm/components → components}/modal/custom-modal-class.js +16 -29
- package/{esm/components → components}/modal/modal-class.js +68 -83
- package/{esm/components → components}/modal/modal.js +8 -5
- package/{esm/components → components}/navbar/navbar.js +166 -171
- package/components/notification/notification-aurora.less +1 -1
- package/{esm/components → components}/notification/notification-class.js +65 -78
- package/components/notification/notification-ios.less +1 -1
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.js +35 -1
- package/components/notification/notification.umd.js +1 -0
- package/components/page/page-vars.less +1 -1
- package/{esm/components → components}/page/page.js +0 -0
- package/{esm/components → components}/panel/panel-class.js +183 -214
- package/components/panel/panel-rtl.css +1 -1
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.js +190 -1
- package/components/panel/panel.umd.js +1 -0
- package/{esm/components → components}/panel/resizable-panel.js +30 -28
- package/{esm/components → components}/panel/swipe-panel.js +46 -44
- package/{esm/components → components}/photo-browser/photo-browser-class.js +206 -234
- package/components/photo-browser/photo-browser.js +73 -1
- package/components/photo-browser/photo-browser.umd.js +1 -0
- package/{esm/components → components}/picker/picker-class.js +233 -233
- package/{esm/components → components}/picker/picker-column.js +70 -72
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.js +64 -1
- package/components/picker/picker.umd.js +1 -0
- package/components/pie-chart/pie-chart-class.js +264 -0
- package/components/pie-chart/pie-chart.js +35 -1
- package/components/pie-chart/pie-chart.umd.js +1 -0
- package/{esm/components → components}/popover/popover-class.js +72 -97
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.js +76 -1
- package/components/popover/popover.umd.js +1 -0
- package/{esm/components → components}/popup/popup-class.js +66 -81
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +41 -1
- package/components/popup/popup.less +21 -21
- package/components/popup/popup.umd.js +1 -0
- package/components/preloader/preloader.js +115 -1
- package/components/preloader/preloader.umd.js +1 -0
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +166 -1
- package/components/progressbar/progressbar.umd.js +1 -0
- package/{esm/components → components}/pull-to-refresh/pull-to-refresh-class.js +101 -118
- package/components/pull-to-refresh/pull-to-refresh.js +70 -1
- package/components/pull-to-refresh/pull-to-refresh.umd.js +1 -0
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.js +3 -1
- package/components/radio/radio.umd.js +1 -0
- package/{esm/components → components}/range/range-class.js +191 -192
- package/components/range/range-rtl.css +1 -1
- package/components/range/range.css +1 -1
- package/components/range/range.js +79 -1
- package/components/range/range.umd.js +1 -0
- package/components/searchbar/remove-diacritics.js +275 -0
- package/{esm/components → components}/searchbar/searchbar-class.js +129 -146
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.js +121 -1
- package/components/searchbar/searchbar.less +1 -1
- package/components/searchbar/searchbar.umd.js +1 -0
- package/{esm/components → components}/sheet/sheet-class.js +87 -106
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +68 -1
- package/components/sheet/sheet.less +16 -16
- package/components/sheet/sheet.umd.js +1 -0
- package/components/skeleton/skeleton-rtl.css +1 -1
- package/components/skeleton/skeleton-vars.less +1 -1
- package/components/skeleton/skeleton.css +1 -1
- package/components/skeleton/skeleton.js +3 -1
- package/components/skeleton/skeleton.less +1 -1
- package/components/skeleton/skeleton.umd.js +1 -0
- package/{esm/components → components}/smart-select/smart-select-class.js +284 -296
- package/components/smart-select/smart-select.js +149 -1
- package/components/smart-select/smart-select.umd.js +1 -0
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +293 -1
- package/components/sortable/sortable.umd.js +1 -0
- package/{esm/components → components}/statusbar/statusbar.js +48 -41
- package/{esm/components → components}/stepper/stepper-class.js +104 -115
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +86 -1
- package/components/stepper/stepper.umd.js +1 -0
- package/{esm/components → components}/subnavbar/subnavbar.js +3 -2
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +597 -1
- package/components/swipeout/swipeout.umd.js +1 -0
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +191 -1
- package/components/swiper/swiper.less +1 -1
- package/components/swiper/swiper.umd.js +1 -0
- package/components/tabs/tabs.js +272 -1
- package/components/tabs/tabs.umd.js +1 -0
- package/{esm/components → components}/text-editor/text-editor-class.js +170 -182
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +89 -1
- package/components/text-editor/text-editor.umd.js +1 -0
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.js +3 -1
- package/components/timeline/timeline.umd.js +1 -0
- package/components/toast/toast-class.js +119 -0
- package/components/toast/toast.js +43 -1
- package/components/toast/toast.umd.js +1 -0
- package/{esm/components → components}/toggle/toggle-class.js +46 -63
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +65 -1
- package/components/toggle/toggle.umd.js +1 -0
- package/{esm/components → components}/toolbar/toolbar.js +63 -59
- package/{esm/components → components}/tooltip/tooltip-class.js +95 -106
- package/components/tooltip/tooltip.js +144 -1
- package/components/tooltip/tooltip.umd.js +1 -0
- package/components/touch-ripple/touch-ripple-class.js +98 -0
- package/components/touch-ripple/touch-ripple-vars.less +1 -1
- package/components/touch-ripple/touch-ripple.js +18 -0
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +83 -1
- package/components/treeview/treeview.umd.js +1 -0
- package/components/typography/typography.js +3 -1
- package/components/typography/typography.umd.js +1 -0
- package/{esm/components → components}/view/resizable-view.js +23 -21
- package/{esm/components → components}/view/view-class.js +48 -67
- package/{esm/components → components}/view/view.js +37 -28
- package/{esm/components → components}/virtual-list/virtual-list-class.js +153 -170
- package/components/virtual-list/virtual-list.js +19 -1
- package/components/virtual-list/virtual-list.umd.js +1 -0
- package/framework7-bundle-rtl.css +268 -852
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +268 -852
- package/{esm/framework7-bundle.js → framework7-bundle.esm.js} +2 -2
- package/framework7-bundle.js +30782 -31429
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -2
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/{esm/framework7-lite-bundle.js → framework7-lite-bundle.esm.js} +2 -2
- package/{esm/framework7-lite.js → framework7-lite.esm.js} +2 -2
- package/framework7-rtl.css +52 -56
- package/framework7-rtl.min.css +3 -3
- package/{types/types.d.ts → framework7-types.d.ts} +0 -0
- package/framework7.css +52 -56
- package/framework7.d.ts +81 -81
- package/{esm/framework7.js → framework7.esm.js} +2 -2
- package/framework7.js +3386 -4049
- package/framework7.js.map +1 -1
- package/framework7.less +2 -2
- package/framework7.min.css +3 -3
- package/framework7.min.js +3 -3
- package/framework7.min.js.map +1 -1
- package/less/mixins.less +2 -2
- package/{esm/modules → modules}/clicks/clicks.js +17 -16
- package/modules/component/$h.js +14 -0
- package/modules/component/$jsx.js +18 -0
- package/modules/component/component-class.js +382 -0
- package/modules/component/component.d.ts +2 -0
- package/{esm/modules → modules}/component/component.js +23 -17
- package/{esm/modules → modules}/component/custom-components.js +0 -0
- package/{esm/modules → modules}/component/eventslisteners.js +14 -18
- package/modules/component/parse-component.js +80 -0
- package/{esm/modules → modules}/component/patch.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/h.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/helpers/attachto.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/hooks.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/htmldomapi.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/is.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/attributes.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/class.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/dataset.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/eventlisteners.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/hero.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/modules/module.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/props.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/modules/style.js +1 -1
- package/{esm/modules → modules}/component/snabbdom/snabbdom.bundle.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/snabbdom.js +6 -18
- package/{esm/modules → modules}/component/snabbdom/thunk.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/tovnode.js +0 -0
- package/{esm/modules → modules}/component/snabbdom/vnode.js +0 -0
- package/{esm/modules → modules}/component/vdom.js +106 -130
- package/{esm/modules → modules}/demo-module.js +15 -7
- package/{esm/modules → modules}/device/device.js +12 -11
- package/{esm/modules → modules}/history/history.js +2 -1
- package/{esm/modules → modules}/request/request.js +2 -2
- package/modules/resize/resize.js +65 -0
- package/{esm/modules → modules}/router/app-router-check.js +1 -1
- package/{esm/modules → modules}/router/async-component.js +3 -3
- package/{esm/modules → modules}/router/back.js +117 -117
- package/{esm/modules → modules}/router/clear-previous-history.js +8 -8
- package/modules/router/component-loader.js +174 -0
- package/{esm/modules → modules}/router/modal.js +49 -49
- package/{esm/modules → modules}/router/navigate.js +140 -221
- package/{esm/modules → modules}/router/process-route-queue.js +20 -17
- package/{esm/modules → modules}/router/redirect.js +7 -11
- package/{esm/modules → modules}/router/router-class.js +411 -432
- package/{esm/modules → modules}/router/router.js +5 -3
- package/{esm/modules → modules}/router/swipe-back.js +143 -177
- package/{esm/modules → modules}/router/tab.js +46 -46
- package/{esm/modules → modules}/service-worker/service-worker.js +41 -37
- package/modules/store/create-store.js +149 -0
- package/{esm/modules → modules}/store/store.js +2 -2
- package/{esm/modules → modules}/support/support.js +1 -1
- package/{esm/modules → modules}/touch/touch.js +71 -70
- package/{esm/modules → modules}/utils/utils.js +2 -2
- package/package.json +252 -11
- package/shared/$jsx.js +22 -0
- package/shared/class.js +143 -0
- package/shared/constructor-methods.js +42 -0
- package/{esm/shared → shared}/dom7.js +2 -1
- package/shared/events-class.js +100 -0
- package/{types/shared → shared}/get-device.d.ts +0 -0
- package/{esm/shared → shared}/get-device.js +32 -37
- package/{types/shared → shared}/get-support.d.ts +0 -0
- package/{esm/shared → shared}/get-support.js +7 -6
- package/{esm/shared → shared}/history.js +61 -47
- package/shared/modal-methods.js +90 -0
- package/{types/shared → shared}/request.d.ts +0 -0
- package/shared/request.js +474 -0
- package/{types/shared → shared}/utils.d.ts +0 -0
- package/{esm/shared → shared}/utils.js +125 -162
- package/bundle/package.json +0 -8
- package/cjs/components/accordion/accordion.js +0 -136
- package/cjs/components/actions/actions-class.js +0 -383
- package/cjs/components/actions/actions.js +0 -58
- package/cjs/components/app/app-class.js +0 -378
- package/cjs/components/app/load-module.js +0 -155
- package/cjs/components/appbar/appbar.js +0 -8
- package/cjs/components/area-chart/area-chart-class.js +0 -526
- package/cjs/components/area-chart/area-chart.js +0 -56
- package/cjs/components/autocomplete/autocomplete-class.js +0 -975
- package/cjs/components/autocomplete/autocomplete.js +0 -93
- package/cjs/components/badge/badge.js +0 -8
- package/cjs/components/block/block.js +0 -8
- package/cjs/components/button/button.js +0 -8
- package/cjs/components/calendar/calendar-class.js +0 -2078
- package/cjs/components/calendar/calendar.js +0 -124
- package/cjs/components/card/card.js +0 -625
- package/cjs/components/checkbox/checkbox.js +0 -8
- package/cjs/components/chip/chip.js +0 -8
- package/cjs/components/color-picker/color-picker-class.js +0 -1022
- package/cjs/components/color-picker/color-picker.js +0 -105
- package/cjs/components/color-picker/modules/alpha-slider.js +0 -101
- package/cjs/components/color-picker/modules/brightness-slider.js +0 -86
- package/cjs/components/color-picker/modules/current-color.js +0 -23
- package/cjs/components/color-picker/modules/hex.js +0 -81
- package/cjs/components/color-picker/modules/hs-spectrum.js +0 -137
- package/cjs/components/color-picker/modules/hsb-sliders.js +0 -206
- package/cjs/components/color-picker/modules/hue-slider.js +0 -78
- package/cjs/components/color-picker/modules/initial-current-colors.js +0 -54
- package/cjs/components/color-picker/modules/palette.js +0 -61
- package/cjs/components/color-picker/modules/rgb-bars.js +0 -196
- package/cjs/components/color-picker/modules/rgb-sliders.js +0 -198
- package/cjs/components/color-picker/modules/sb-spectrum.js +0 -137
- package/cjs/components/color-picker/modules/wheel.js +0 -198
- package/cjs/components/contacts-list/contacts-list.js +0 -8
- package/cjs/components/data-table/data-table-class.js +0 -188
- package/cjs/components/data-table/data-table.js +0 -75
- package/cjs/components/dialog/dialog-class.js +0 -250
- package/cjs/components/dialog/dialog.js +0 -297
- package/cjs/components/elevation/elevation.js +0 -8
- package/cjs/components/fab/fab.js +0 -195
- package/cjs/components/form/form.js +0 -341
- package/cjs/components/gauge/gauge-class.js +0 -332
- package/cjs/components/gauge/gauge.js +0 -103
- package/cjs/components/grid/grid.js +0 -233
- package/cjs/components/icon/icon.js +0 -8
- package/cjs/components/infinite-scroll/infinite-scroll.js +0 -111
- package/cjs/components/input/input.js +0 -396
- package/cjs/components/lazy/lazy.js +0 -283
- package/cjs/components/link/link.js +0 -8
- package/cjs/components/list/list.js +0 -8
- package/cjs/components/list-index/list-index-class.js +0 -405
- package/cjs/components/list-index/list-index.js +0 -77
- package/cjs/components/login-screen/login-screen-class.js +0 -68
- package/cjs/components/login-screen/login-screen.js +0 -44
- package/cjs/components/menu/menu.js +0 -92
- package/cjs/components/messagebar/messagebar-class.js +0 -446
- package/cjs/components/messagebar/messagebar.js +0 -78
- package/cjs/components/messages/messages-class.js +0 -633
- package/cjs/components/messages/messages.js +0 -76
- package/cjs/components/modal/custom-modal-class.js +0 -99
- package/cjs/components/modal/modal-class.js +0 -277
- package/cjs/components/modal/modal.js +0 -32
- package/cjs/components/navbar/navbar.js +0 -833
- package/cjs/components/notification/notification-class.js +0 -269
- package/cjs/components/notification/notification.js +0 -44
- package/cjs/components/page/page.js +0 -8
- package/cjs/components/panel/panel-class.js +0 -660
- package/cjs/components/panel/panel.js +0 -219
- package/cjs/components/panel/resizable-panel.js +0 -197
- package/cjs/components/panel/swipe-panel.js +0 -363
- package/cjs/components/photo-browser/photo-browser-class.js +0 -781
- package/cjs/components/photo-browser/photo-browser.js +0 -78
- package/cjs/components/picker/picker-class.js +0 -704
- package/cjs/components/picker/picker-column.js +0 -389
- package/cjs/components/picker/picker.js +0 -77
- package/cjs/components/pie-chart/pie-chart-class.js +0 -290
- package/cjs/components/pie-chart/pie-chart.js +0 -44
- package/cjs/components/popover/popover-class.js +0 -365
- package/cjs/components/popover/popover.js +0 -93
- package/cjs/components/popup/popup-class.js +0 -416
- package/cjs/components/popup/popup.js +0 -57
- package/cjs/components/preloader/preloader.js +0 -111
- package/cjs/components/progressbar/progressbar.js +0 -185
- package/cjs/components/pull-to-refresh/pull-to-refresh-class.js +0 -627
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +0 -74
- package/cjs/components/radio/radio.js +0 -8
- package/cjs/components/range/range-class.js +0 -674
- package/cjs/components/range/range.js +0 -93
- package/cjs/components/searchbar/remove-diacritics.js +0 -283
- package/cjs/components/searchbar/searchbar-class.js +0 -739
- package/cjs/components/searchbar/searchbar.js +0 -141
- package/cjs/components/sheet/sheet-class.js +0 -583
- package/cjs/components/sheet/sheet.js +0 -83
- package/cjs/components/skeleton/skeleton.js +0 -8
- package/cjs/components/smart-select/smart-select-class.js +0 -1005
- package/cjs/components/smart-select/smart-select.js +0 -151
- package/cjs/components/sortable/sortable.js +0 -322
- package/cjs/components/statusbar/statusbar.js +0 -226
- package/cjs/components/stepper/stepper-class.js +0 -497
- package/cjs/components/stepper/stepper.js +0 -96
- package/cjs/components/subnavbar/subnavbar.js +0 -28
- package/cjs/components/swipeout/swipeout.js +0 -618
- package/cjs/components/swiper/swiper.js +0 -189
- package/cjs/components/tabs/tabs.js +0 -296
- package/cjs/components/text-editor/text-editor-class.js +0 -627
- package/cjs/components/text-editor/text-editor.js +0 -93
- package/cjs/components/timeline/timeline.js +0 -8
- package/cjs/components/toast/toast-class.js +0 -142
- package/cjs/components/toast/toast.js +0 -51
- package/cjs/components/toggle/toggle-class.js +0 -213
- package/cjs/components/toggle/toggle.js +0 -72
- package/cjs/components/toolbar/toolbar.js +0 -234
- package/cjs/components/tooltip/tooltip-class.js +0 -409
- package/cjs/components/tooltip/tooltip.js +0 -146
- package/cjs/components/touch-ripple/touch-ripple-class.js +0 -110
- package/cjs/components/touch-ripple/touch-ripple.js +0 -34
- package/cjs/components/treeview/treeview.js +0 -88
- package/cjs/components/typography/typography.js +0 -8
- package/cjs/components/view/resizable-view.js +0 -155
- package/cjs/components/view/view-class.js +0 -251
- package/cjs/components/view/view.js +0 -196
- package/cjs/components/virtual-list/virtual-list-class.js +0 -654
- package/cjs/components/virtual-list/virtual-list.js +0 -27
- package/cjs/framework7-bundle.js +0 -208
- package/cjs/framework7-lite-bundle.js +0 -191
- package/cjs/framework7-lite.js +0 -87
- package/cjs/framework7.js +0 -98
- package/cjs/modules/clicks/clicks.js +0 -115
- package/cjs/modules/component/$h.js +0 -31
- package/cjs/modules/component/$jsx.js +0 -31
- package/cjs/modules/component/component-class.js +0 -415
- package/cjs/modules/component/component.js +0 -58
- package/cjs/modules/component/custom-components.js +0 -6
- package/cjs/modules/component/eventslisteners.js +0 -90
- package/cjs/modules/component/parse-component.js +0 -80
- package/cjs/modules/component/patch.js +0 -21
- package/cjs/modules/component/snabbdom/h.js +0 -72
- package/cjs/modules/component/snabbdom/helpers/attachto.js +0 -62
- package/cjs/modules/component/snabbdom/hooks.js +0 -1
- package/cjs/modules/component/snabbdom/htmldomapi.js +0 -90
- package/cjs/modules/component/snabbdom/is.js +0 -11
- package/cjs/modules/component/snabbdom/modules/attributes.js +0 -61
- package/cjs/modules/component/snabbdom/modules/class.js +0 -38
- package/cjs/modules/component/snabbdom/modules/dataset.js +0 -47
- package/cjs/modules/component/snabbdom/modules/eventlisteners.js +0 -106
- package/cjs/modules/component/snabbdom/modules/hero.js +0 -193
- package/cjs/modules/component/snabbdom/modules/module.js +0 -1
- package/cjs/modules/component/snabbdom/modules/props.js +0 -40
- package/cjs/modules/component/snabbdom/modules/style.js +0 -116
- package/cjs/modules/component/snabbdom/snabbdom.bundle.js +0 -33
- package/cjs/modules/component/snabbdom/snabbdom.js +0 -374
- package/cjs/modules/component/snabbdom/thunk.js +0 -66
- package/cjs/modules/component/snabbdom/tovnode.js +0 -57
- package/cjs/modules/component/snabbdom/vnode.js +0 -20
- package/cjs/modules/component/vdom.js +0 -393
- package/cjs/modules/demo-module.js +0 -49
- package/cjs/modules/device/device.js +0 -56
- package/cjs/modules/history/history.js +0 -21
- package/cjs/modules/request/request.js +0 -20
- package/cjs/modules/resize/resize.js +0 -72
- package/cjs/modules/router/app-router-check.js +0 -10
- package/cjs/modules/router/async-component.js +0 -33
- package/cjs/modules/router/back.js +0 -899
- package/cjs/modules/router/clear-previous-history.js +0 -50
- package/cjs/modules/router/component-loader.js +0 -140
- package/cjs/modules/router/modal.js +0 -254
- package/cjs/modules/router/navigate.js +0 -1054
- package/cjs/modules/router/process-route-queue.js +0 -80
- package/cjs/modules/router/redirect.js +0 -52
- package/cjs/modules/router/router-class.js +0 -1500
- package/cjs/modules/router/router.js +0 -36
- package/cjs/modules/router/swipe-back.js +0 -735
- package/cjs/modules/router/tab.js +0 -264
- package/cjs/modules/service-worker/service-worker.js +0 -101
- package/cjs/modules/store/create-store.js +0 -169
- package/cjs/modules/store/store.js +0 -21
- package/cjs/modules/support/support.js +0 -14
- package/cjs/modules/touch/touch.js +0 -585
- package/cjs/modules/utils/utils.js +0 -21
- package/cjs/shared/$jsx.js +0 -39
- package/cjs/shared/class.js +0 -206
- package/cjs/shared/constructor-methods.js +0 -73
- package/cjs/shared/dom7.js +0 -17
- package/cjs/shared/events-class.js +0 -125
- package/cjs/shared/get-device.js +0 -157
- package/cjs/shared/get-support.js +0 -44
- package/cjs/shared/history.js +0 -185
- package/cjs/shared/modal-methods.js +0 -105
- package/cjs/shared/request.js +0 -552
- package/cjs/shared/utils.js +0 -472
- package/components/accordion/package.json +0 -9
- package/components/actions/package.json +0 -9
- package/components/app/package.json +0 -9
- package/components/appbar/package.json +0 -9
- package/components/area-chart/package.json +0 -9
- package/components/autocomplete/package.json +0 -9
- package/components/badge/package.json +0 -9
- package/components/block/package.json +0 -9
- package/components/button/package.json +0 -9
- package/components/calendar/package.json +0 -9
- package/components/card/package.json +0 -9
- package/components/checkbox/package.json +0 -9
- package/components/chip/package.json +0 -9
- package/components/color-picker/package.json +0 -9
- package/components/contacts-list/package.json +0 -9
- package/components/data-table/package.json +0 -9
- package/components/dialog/package.json +0 -9
- package/components/elevation/package.json +0 -9
- package/components/fab/package.json +0 -9
- package/components/form/package.json +0 -9
- package/components/gauge/package.json +0 -9
- package/components/grid/package.json +0 -9
- package/components/icon/package.json +0 -9
- package/components/infinite-scroll/package.json +0 -9
- package/components/input/package.json +0 -9
- package/components/lazy/package.json +0 -9
- package/components/link/package.json +0 -9
- package/components/list/package.json +0 -9
- package/components/list-index/package.json +0 -9
- package/components/login-screen/package.json +0 -9
- package/components/menu/package.json +0 -9
- package/components/messagebar/package.json +0 -9
- package/components/messages/package.json +0 -9
- package/components/modal/package.json +0 -9
- package/components/navbar/package.json +0 -9
- package/components/notification/package.json +0 -9
- package/components/page/package.json +0 -9
- package/components/panel/package.json +0 -9
- package/components/photo-browser/package.json +0 -9
- package/components/picker/package.json +0 -9
- package/components/pie-chart/package.json +0 -9
- package/components/popover/package.json +0 -9
- package/components/popup/package.json +0 -9
- package/components/preloader/package.json +0 -9
- package/components/progressbar/package.json +0 -9
- package/components/pull-to-refresh/package.json +0 -9
- package/components/radio/package.json +0 -9
- package/components/range/package.json +0 -9
- package/components/searchbar/package.json +0 -9
- package/components/sheet/package.json +0 -9
- package/components/skeleton/package.json +0 -9
- package/components/smart-select/package.json +0 -9
- package/components/sortable/package.json +0 -9
- package/components/statusbar/package.json +0 -9
- package/components/stepper/package.json +0 -9
- package/components/subnavbar/package.json +0 -9
- package/components/swipeout/package.json +0 -9
- package/components/swiper/package.json +0 -9
- package/components/tabs/package.json +0 -9
- package/components/text-editor/package.json +0 -9
- package/components/timeline/package.json +0 -9
- package/components/toast/package.json +0 -9
- package/components/toggle/package.json +0 -9
- package/components/toolbar/package.json +0 -9
- package/components/tooltip/package.json +0 -9
- package/components/touch-ripple/package.json +0 -9
- package/components/treeview/package.json +0 -9
- package/components/typography/package.json +0 -9
- package/components/view/package.json +0 -9
- package/components/virtual-list/package.json +0 -9
- package/core/package.json +0 -8
- package/esm/components/accordion/accordion.js +0 -126
- package/esm/components/actions/actions-class.js +0 -373
- package/esm/components/actions/actions.js +0 -48
- package/esm/components/appbar/appbar.js +0 -3
- package/esm/components/area-chart/area-chart-class.js +0 -517
- package/esm/components/area-chart/area-chart.js +0 -45
- package/esm/components/autocomplete/autocomplete.js +0 -82
- package/esm/components/calendar/calendar.js +0 -113
- package/esm/components/card/card.js +0 -612
- package/esm/components/checkbox/checkbox.js +0 -3
- package/esm/components/chip/chip.js +0 -3
- package/esm/components/color-picker/color-picker.js +0 -94
- package/esm/components/contacts-list/contacts-list.js +0 -3
- package/esm/components/data-table/data-table.js +0 -64
- package/esm/components/dialog/dialog.js +0 -286
- package/esm/components/elevation/elevation.js +0 -3
- package/esm/components/fab/fab.js +0 -185
- package/esm/components/form/form.js +0 -330
- package/esm/components/gauge/gauge-class.js +0 -323
- package/esm/components/gauge/gauge.js +0 -91
- package/esm/components/grid/grid.js +0 -223
- package/esm/components/infinite-scroll/infinite-scroll.js +0 -101
- package/esm/components/input/input.js +0 -384
- package/esm/components/lazy/lazy.js +0 -271
- package/esm/components/list-index/list-index.js +0 -65
- package/esm/components/login-screen/login-screen-class.js +0 -58
- package/esm/components/login-screen/login-screen.js +0 -34
- package/esm/components/menu/menu.js +0 -82
- package/esm/components/messagebar/messagebar.js +0 -66
- package/esm/components/messages/messages.js +0 -65
- package/esm/components/notification/notification.js +0 -33
- package/esm/components/panel/panel.js +0 -208
- package/esm/components/photo-browser/photo-browser.js +0 -68
- package/esm/components/picker/picker.js +0 -66
- package/esm/components/pie-chart/pie-chart-class.js +0 -281
- package/esm/components/pie-chart/pie-chart.js +0 -33
- package/esm/components/popover/popover.js +0 -81
- package/esm/components/popup/popup.js +0 -47
- package/esm/components/preloader/preloader.js +0 -101
- package/esm/components/progressbar/progressbar.js +0 -175
- package/esm/components/pull-to-refresh/pull-to-refresh.js +0 -62
- package/esm/components/radio/radio.js +0 -3
- package/esm/components/range/range.js +0 -81
- package/esm/components/searchbar/remove-diacritics.js +0 -277
- package/esm/components/searchbar/searchbar.js +0 -129
- package/esm/components/sheet/sheet.js +0 -71
- package/esm/components/skeleton/skeleton.js +0 -3
- package/esm/components/smart-select/smart-select.js +0 -139
- package/esm/components/sortable/sortable.js +0 -310
- package/esm/components/stepper/stepper.js +0 -84
- package/esm/components/swipeout/swipeout.js +0 -606
- package/esm/components/swiper/swiper.js +0 -177
- package/esm/components/tabs/tabs.js +0 -286
- package/esm/components/text-editor/text-editor.js +0 -81
- package/esm/components/timeline/timeline.js +0 -3
- package/esm/components/toast/toast-class.js +0 -132
- package/esm/components/toast/toast.js +0 -40
- package/esm/components/toggle/toggle.js +0 -61
- package/esm/components/tooltip/tooltip.js +0 -135
- package/esm/components/touch-ripple/touch-ripple-class.js +0 -103
- package/esm/components/touch-ripple/touch-ripple.js +0 -25
- package/esm/components/treeview/treeview.js +0 -78
- package/esm/components/typography/typography.js +0 -3
- package/esm/components/virtual-list/virtual-list.js +0 -17
- package/esm/modules/component/$h.js +0 -20
- package/esm/modules/component/$jsx.js +0 -24
- package/esm/modules/component/component-class.js +0 -402
- package/esm/modules/component/parse-component.js +0 -70
- package/esm/modules/resize/resize.js +0 -64
- package/esm/modules/router/component-loader.js +0 -133
- package/esm/modules/store/create-store.js +0 -164
- package/esm/shared/$jsx.js +0 -33
- package/esm/shared/class.js +0 -197
- package/esm/shared/constructor-methods.js +0 -65
- package/esm/shared/events-class.js +0 -119
- package/esm/shared/modal-methods.js +0 -95
- package/esm/shared/request.js +0 -545
- package/lite/package.json +0 -8
- package/lite-bundle/package.json +0 -8
- package/modules/clicks/package.json +0 -9
- package/modules/component/package.json +0 -9
- package/modules/device/package.json +0 -9
- package/modules/history/package.json +0 -9
- package/modules/request/package.json +0 -9
- package/modules/resize/package.json +0 -9
- package/modules/router/package.json +0 -9
- package/modules/service-worker/package.json +0 -9
- package/modules/store/package.json +0 -9
- package/modules/support/package.json +0 -9
- package/modules/touch/package.json +0 -9
- package/modules/utils/package.json +0 -9
- package/types/components/accordion/accordion.d.ts +0 -55
- package/types/components/actions/actions.d.ts +0 -158
- package/types/components/app/app-class.d.ts +0 -196
- package/types/components/appbar/appbar.d.ts +0 -10
- package/types/components/area-chart/area-chart.d.ts +0 -124
- package/types/components/autocomplete/autocomplete.d.ts +0 -191
- package/types/components/badge/badge.d.ts +0 -10
- package/types/components/block/block.d.ts +0 -10
- package/types/components/button/button.d.ts +0 -10
- package/types/components/calendar/calendar.d.ts +0 -304
- package/types/components/card/card.d.ts +0 -65
- package/types/components/checkbox/checkbox.d.ts +0 -10
- package/types/components/chip/chip.d.ts +0 -10
- package/types/components/color-picker/color-picker.d.ts +0 -229
- package/types/components/contacts-list/contacts-list.d.ts +0 -10
- package/types/components/data-table/data-table.d.ts +0 -57
- package/types/components/dialog/dialog.d.ts +0 -241
- package/types/components/elevation/elevation.d.ts +0 -10
- package/types/components/fab/fab.d.ts +0 -28
- package/types/components/form/form.d.ts +0 -60
- package/types/components/gauge/gauge.d.ts +0 -96
- package/types/components/grid/grid.d.ts +0 -17
- package/types/components/icon/icon.d.ts +0 -10
- package/types/components/infinite-scroll/infinite-scroll.d.ts +0 -23
- package/types/components/input/input.d.ts +0 -56
- package/types/components/lazy/lazy.d.ts +0 -53
- package/types/components/link/link.d.ts +0 -10
- package/types/components/list/list.d.ts +0 -10
- package/types/components/list-index/list-index.d.ts +0 -99
- package/types/components/login-screen/login-screen.d.ts +0 -95
- package/types/components/menu/menu.d.ts +0 -28
- package/types/components/messagebar/messagebar.d.ts +0 -161
- package/types/components/messages/messages.d.ts +0 -158
- package/types/components/modal/modal.d.ts +0 -78
- package/types/components/navbar/navbar.d.ts +0 -75
- package/types/components/notification/notification.d.ts +0 -118
- package/types/components/page/page.d.ts +0 -10
- package/types/components/panel/panel.d.ts +0 -194
- package/types/components/photo-browser/photo-browser.d.ts +0 -194
- package/types/components/picker/picker.d.ts +0 -216
- package/types/components/pie-chart/pie-chart.d.ts +0 -95
- package/types/components/popover/popover.d.ts +0 -127
- package/types/components/popup/popup.d.ts +0 -135
- package/types/components/preloader/preloader.d.ts +0 -18
- package/types/components/progressbar/progressbar.d.ts +0 -27
- package/types/components/pull-to-refresh/pull-to-refresh.d.ts +0 -99
- package/types/components/radio/radio.d.ts +0 -10
- package/types/components/range/range.d.ts +0 -121
- package/types/components/searchbar/searchbar.d.ts +0 -157
- package/types/components/sheet/sheet.d.ts +0 -149
- package/types/components/skeleton/skeleton.d.ts +0 -10
- package/types/components/smart-select/smart-select.d.ts +0 -199
- package/types/components/sortable/sortable.d.ts +0 -46
- package/types/components/statusbar/statusbar.d.ts +0 -50
- package/types/components/stepper/stepper.d.ts +0 -117
- package/types/components/subnavbar/subnavbar.d.ts +0 -11
- package/types/components/swipeout/swipeout.d.ts +0 -68
- package/types/components/swiper/swiper.d.ts +0 -21
- package/types/components/tabs/tabs.d.ts +0 -39
- package/types/components/text-editor/text-editor.d.ts +0 -162
- package/types/components/timeline/timeline.d.ts +0 -10
- package/types/components/toast/toast.d.ts +0 -117
- package/types/components/toggle/toggle.d.ts +0 -69
- package/types/components/toolbar/toolbar.d.ts +0 -43
- package/types/components/tooltip/tooltip.d.ts +0 -101
- package/types/components/touch-ripple/touch-ripple.d.ts +0 -21
- package/types/components/treeview/treeview.d.ts +0 -38
- package/types/components/typography/typography.d.ts +0 -10
- package/types/components/view/view.d.ts +0 -205
- package/types/components/virtual-list/virtual-list.d.ts +0 -138
- package/types/modules/clicks/clicks.d.ts +0 -19
- package/types/modules/component/component.d.ts +0 -94
- package/types/modules/component/snabbdom/h.d.ts +0 -10
- package/types/modules/component/snabbdom/helpers/attachto.d.ts +0 -9
- package/types/modules/component/snabbdom/hooks.d.ts +0 -23
- package/types/modules/component/snabbdom/htmldomapi.d.ts +0 -19
- package/types/modules/component/snabbdom/is.d.ts +0 -2
- package/types/modules/component/snabbdom/modules/attributes.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/class.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/dataset.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/eventlisteners.d.ts +0 -8
- package/types/modules/component/snabbdom/modules/hero.d.ts +0 -6
- package/types/modules/component/snabbdom/modules/module.d.ts +0 -9
- package/types/modules/component/snabbdom/modules/props.d.ts +0 -4
- package/types/modules/component/snabbdom/modules/style.d.ts +0 -7
- package/types/modules/component/snabbdom/snabbdom.bundle.d.ts +0 -5
- package/types/modules/component/snabbdom/snabbdom.d.ts +0 -6
- package/types/modules/component/snabbdom/thunk.d.ts +0 -14
- package/types/modules/component/snabbdom/tovnode.d.ts +0 -4
- package/types/modules/component/snabbdom/vnode.d.ts +0 -36
- package/types/modules/device/device.d.ts +0 -14
- package/types/modules/request/request.d.ts +0 -15
- package/types/modules/resize/resize.d.ts +0 -25
- package/types/modules/router/router.d.ts +0 -356
- package/types/modules/service-worker/service-worker.d.ts +0 -38
- package/types/modules/store/store.d.ts +0 -40
- package/types/modules/support/support.d.ts +0 -15
- package/types/modules/touch/touch.d.ts +0 -62
- package/types/modules/utils/utils.d.ts +0 -15
- package/types/package.json +0 -6
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
2
|
-
|
|
3
|
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
4
|
-
|
|
5
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
6
|
-
|
|
7
1
|
import { getWindow, getDocument } from 'ssr-window';
|
|
8
2
|
import $ from '../../shared/dom7';
|
|
9
3
|
import { extend, now, getTranslate } from '../../shared/utils';
|
|
@@ -11,24 +5,18 @@ import { getSupport } from '../../shared/get-support';
|
|
|
11
5
|
import { getDevice } from '../../shared/get-device';
|
|
12
6
|
import Modal from '../modal/modal-class';
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function Sheet(app, params) {
|
|
18
|
-
var _this;
|
|
19
|
-
|
|
20
|
-
var extendedParams = extend({
|
|
8
|
+
class Sheet extends Modal {
|
|
9
|
+
constructor(app, params) {
|
|
10
|
+
const extendedParams = extend({
|
|
21
11
|
on: {}
|
|
22
12
|
}, app.params.sheet, params); // Extends with open/close Modal methods;
|
|
23
13
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var support = getSupport();
|
|
31
|
-
var device = getDevice();
|
|
14
|
+
super(app, extendedParams);
|
|
15
|
+
const sheet = this;
|
|
16
|
+
const window = getWindow();
|
|
17
|
+
const document = getDocument();
|
|
18
|
+
const support = getSupport();
|
|
19
|
+
const device = getDevice();
|
|
32
20
|
sheet.params = extendedParams;
|
|
33
21
|
|
|
34
22
|
if (typeof sheet.params.backdrop === 'undefined') {
|
|
@@ -36,25 +24,23 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
36
24
|
} // Find Element
|
|
37
25
|
|
|
38
26
|
|
|
39
|
-
|
|
27
|
+
let $el;
|
|
40
28
|
|
|
41
29
|
if (!sheet.params.el) {
|
|
42
|
-
$el = $(sheet.params.content).filter(
|
|
43
|
-
return node.nodeType === 1;
|
|
44
|
-
}).eq(0);
|
|
30
|
+
$el = $(sheet.params.content).filter(node => node.nodeType === 1).eq(0);
|
|
45
31
|
} else {
|
|
46
32
|
$el = $(sheet.params.el).eq(0);
|
|
47
33
|
}
|
|
48
34
|
|
|
49
35
|
if ($el && $el.length > 0 && $el[0].f7Modal) {
|
|
50
|
-
return $el[0].f7Modal
|
|
36
|
+
return $el[0].f7Modal;
|
|
51
37
|
}
|
|
52
38
|
|
|
53
39
|
if ($el.length === 0) {
|
|
54
|
-
return sheet.destroy()
|
|
40
|
+
return sheet.destroy();
|
|
55
41
|
}
|
|
56
42
|
|
|
57
|
-
|
|
43
|
+
let $backdropEl;
|
|
58
44
|
|
|
59
45
|
if (sheet.params.backdrop && sheet.params.backdropEl) {
|
|
60
46
|
$backdropEl = $(sheet.params.backdropEl);
|
|
@@ -68,11 +54,11 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
68
54
|
}
|
|
69
55
|
|
|
70
56
|
extend(sheet, {
|
|
71
|
-
app
|
|
57
|
+
app,
|
|
72
58
|
push: $el.hasClass('sheet-modal-push') || sheet.params.push,
|
|
73
|
-
$el
|
|
59
|
+
$el,
|
|
74
60
|
el: $el[0],
|
|
75
|
-
$backdropEl
|
|
61
|
+
$backdropEl,
|
|
76
62
|
backdropEl: $backdropEl && $backdropEl[0],
|
|
77
63
|
type: 'sheet',
|
|
78
64
|
$htmlEl: $('html')
|
|
@@ -82,23 +68,23 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
82
68
|
$el.addClass('sheet-modal-push');
|
|
83
69
|
}
|
|
84
70
|
|
|
85
|
-
|
|
71
|
+
let $pageContentEl;
|
|
86
72
|
|
|
87
73
|
function scrollToElementOnOpen() {
|
|
88
|
-
|
|
74
|
+
const $scrollEl = $(sheet.params.scrollToEl).eq(0);
|
|
89
75
|
if ($scrollEl.length === 0) return;
|
|
90
76
|
$pageContentEl = $scrollEl.parents('.page-content');
|
|
91
77
|
if ($pageContentEl.length === 0) return;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
const paddingTop = parseInt($pageContentEl.css('padding-top'), 10);
|
|
79
|
+
const paddingBottom = parseInt($pageContentEl.css('padding-bottom'), 10);
|
|
80
|
+
const pageHeight = $pageContentEl[0].offsetHeight - paddingTop - $el.height();
|
|
81
|
+
const pageScrollHeight = $pageContentEl[0].scrollHeight - paddingTop - $el.height();
|
|
82
|
+
const pageScroll = $pageContentEl.scrollTop();
|
|
83
|
+
let newPaddingBottom;
|
|
84
|
+
const scrollElTop = $scrollEl.offset().top - paddingTop + $scrollEl[0].offsetHeight;
|
|
99
85
|
|
|
100
86
|
if (scrollElTop > pageHeight) {
|
|
101
|
-
|
|
87
|
+
const scrollTop = pageScroll + scrollElTop - pageHeight;
|
|
102
88
|
|
|
103
89
|
if (scrollTop + pageHeight > pageScrollHeight) {
|
|
104
90
|
newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;
|
|
@@ -108,7 +94,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
108
94
|
}
|
|
109
95
|
|
|
110
96
|
$pageContentEl.css({
|
|
111
|
-
'padding-bottom': newPaddingBottom
|
|
97
|
+
'padding-bottom': `${newPaddingBottom}px`
|
|
112
98
|
});
|
|
113
99
|
}
|
|
114
100
|
|
|
@@ -125,9 +111,9 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
125
111
|
}
|
|
126
112
|
|
|
127
113
|
function handleClick(e) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
114
|
+
const target = e.target;
|
|
115
|
+
const $target = $(target);
|
|
116
|
+
const keyboardOpened = !device.desktop && device.cordova && (window.Keyboard && window.Keyboard.isVisible || window.cordova.plugins && window.cordova.plugins.Keyboard && window.cordova.plugins.Keyboard.isVisible);
|
|
131
117
|
if (keyboardOpened) return;
|
|
132
118
|
|
|
133
119
|
if ($target.closest(sheet.el).length === 0) {
|
|
@@ -140,39 +126,39 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
140
126
|
}
|
|
141
127
|
|
|
142
128
|
function onKeyDown(e) {
|
|
143
|
-
|
|
129
|
+
const keyCode = e.keyCode;
|
|
144
130
|
|
|
145
131
|
if (keyCode === 27 && sheet.params.closeOnEscape) {
|
|
146
132
|
sheet.close();
|
|
147
133
|
}
|
|
148
134
|
}
|
|
149
135
|
|
|
150
|
-
|
|
136
|
+
let pushOffset;
|
|
151
137
|
|
|
152
138
|
function pushViewScale(offset) {
|
|
153
139
|
return (app.height - offset * 2) / app.height;
|
|
154
140
|
}
|
|
155
141
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
142
|
+
let isTouched = false;
|
|
143
|
+
let startTouch;
|
|
144
|
+
let currentTouch;
|
|
145
|
+
let isScrolling;
|
|
146
|
+
let touchStartTime;
|
|
147
|
+
let touchesDiff;
|
|
148
|
+
let isMoved = false;
|
|
149
|
+
let isTopSheetModal;
|
|
150
|
+
let swipeStepTranslate;
|
|
151
|
+
let startTranslate;
|
|
152
|
+
let currentTranslate;
|
|
153
|
+
let sheetElOffsetHeight;
|
|
154
|
+
let minTranslate;
|
|
155
|
+
let maxTranslate;
|
|
156
|
+
let $pushViewEl;
|
|
157
|
+
let pushBorderRadius;
|
|
158
|
+
let sheetPageContentEl;
|
|
159
|
+
let sheetPageContentScrollTop;
|
|
160
|
+
let sheetPageContentScrollHeight;
|
|
161
|
+
let sheetPageContentOffsetHeight;
|
|
176
162
|
|
|
177
163
|
function handleTouchStart(e) {
|
|
178
164
|
if (isTouched || !(sheet.params.swipeToClose || sheet.params.swipeToStep)) return;
|
|
@@ -214,7 +200,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
214
200
|
}
|
|
215
201
|
|
|
216
202
|
touchesDiff = startTouch.y - currentTouch.y;
|
|
217
|
-
|
|
203
|
+
const direction = touchesDiff < 0 ? 'to-bottom' : 'to-top';
|
|
218
204
|
|
|
219
205
|
if (!isMoved) {
|
|
220
206
|
if (sheetPageContentEl && !$el.hasClass('modal-in-swipe-step')) {
|
|
@@ -253,7 +239,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
253
239
|
e.preventDefault();
|
|
254
240
|
|
|
255
241
|
if (sheet.push && pushOffset) {
|
|
256
|
-
|
|
242
|
+
let progress = (currentTranslate - startTranslate) / sheetElOffsetHeight;
|
|
257
243
|
|
|
258
244
|
if (sheet.params.swipeToStep) {
|
|
259
245
|
if (isTopSheetModal) {
|
|
@@ -265,31 +251,31 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
265
251
|
|
|
266
252
|
progress = Math.abs(progress);
|
|
267
253
|
progress = Math.min(Math.max(progress, 0), 1);
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
$pushViewEl.transition(0).forEach(
|
|
271
|
-
el.style.setProperty('transform',
|
|
254
|
+
const pushProgress = 1 - progress;
|
|
255
|
+
const scale = 1 - (1 - pushViewScale(pushOffset)) * pushProgress;
|
|
256
|
+
$pushViewEl.transition(0).forEach(el => {
|
|
257
|
+
el.style.setProperty('transform', `translate3d(0,0,0) scale(${scale})`, 'important');
|
|
272
258
|
});
|
|
273
259
|
|
|
274
260
|
if (sheet.params.swipeToStep) {
|
|
275
|
-
$pushViewEl.css('border-radius', pushBorderRadius * pushProgress
|
|
261
|
+
$pushViewEl.css('border-radius', `${pushBorderRadius * pushProgress}px`);
|
|
276
262
|
}
|
|
277
263
|
}
|
|
278
264
|
|
|
279
|
-
$el.transition(0).transform(
|
|
265
|
+
$el.transition(0).transform(`translate3d(0,${currentTranslate}px,0)`);
|
|
280
266
|
|
|
281
267
|
if (sheet.params.swipeToStep) {
|
|
282
|
-
|
|
268
|
+
let progress;
|
|
283
269
|
|
|
284
270
|
if (isTopSheetModal) {
|
|
285
|
-
|
|
271
|
+
progress = 1 - currentTranslate / swipeStepTranslate;
|
|
286
272
|
} else {
|
|
287
|
-
|
|
273
|
+
progress = (swipeStepTranslate - currentTranslate) / swipeStepTranslate;
|
|
288
274
|
}
|
|
289
275
|
|
|
290
|
-
|
|
291
|
-
$el.trigger('sheet:stepprogress',
|
|
292
|
-
sheet.emit('local::stepProgress sheetStepProgress', sheet,
|
|
276
|
+
progress = Math.min(Math.max(progress, 0), 1);
|
|
277
|
+
$el.trigger('sheet:stepprogress', progress);
|
|
278
|
+
sheet.emit('local::stepProgress sheetStepProgress', sheet, progress);
|
|
293
279
|
}
|
|
294
280
|
}
|
|
295
281
|
|
|
@@ -308,10 +294,10 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
308
294
|
$pushViewEl.css('border-radius', '');
|
|
309
295
|
}
|
|
310
296
|
|
|
311
|
-
|
|
312
|
-
|
|
297
|
+
const direction = touchesDiff < 0 ? 'to-bottom' : 'to-top';
|
|
298
|
+
const diff = Math.abs(touchesDiff);
|
|
313
299
|
if (diff === 0 || currentTranslate === startTranslate) return;
|
|
314
|
-
|
|
300
|
+
const timeDiff = new Date().getTime() - touchStartTime;
|
|
315
301
|
|
|
316
302
|
if (!sheet.params.swipeToStep) {
|
|
317
303
|
if (direction !== (isTopSheetModal ? 'to-top' : 'to-bottom')) {
|
|
@@ -325,10 +311,10 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
325
311
|
return;
|
|
326
312
|
}
|
|
327
313
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
314
|
+
const openDirection = isTopSheetModal ? 'to-bottom' : 'to-top';
|
|
315
|
+
const closeDirection = isTopSheetModal ? 'to-top' : 'to-bottom';
|
|
316
|
+
const absCurrentTranslate = Math.abs(currentTranslate);
|
|
317
|
+
const absSwipeStepTranslate = Math.abs(swipeStepTranslate);
|
|
332
318
|
|
|
333
319
|
if (timeDiff < 300 && diff > 10) {
|
|
334
320
|
if (direction === openDirection && absCurrentTranslate < absSwipeStepTranslate) {
|
|
@@ -382,7 +368,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
382
368
|
}
|
|
383
369
|
|
|
384
370
|
if (timeDiff >= 300) {
|
|
385
|
-
|
|
371
|
+
const stepOpened = !$el.hasClass('modal-in-swipe-step');
|
|
386
372
|
|
|
387
373
|
if (!stepOpened) {
|
|
388
374
|
if (absCurrentTranslate < absSwipeStepTranslate / 2) {
|
|
@@ -422,12 +408,8 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
422
408
|
}
|
|
423
409
|
}
|
|
424
410
|
|
|
425
|
-
sheet.setSwipeStep = function setSwipeStep(byResize) {
|
|
426
|
-
|
|
427
|
-
byResize = true;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
var $swipeStepEl = $el.find('.sheet-modal-swipe-step').eq(0);
|
|
411
|
+
sheet.setSwipeStep = function setSwipeStep(byResize = true) {
|
|
412
|
+
const $swipeStepEl = $el.find('.sheet-modal-swipe-step').eq(0);
|
|
431
413
|
if (!$swipeStepEl.length) return;
|
|
432
414
|
|
|
433
415
|
if ($el.hasClass('sheet-modal-top')) {
|
|
@@ -436,7 +418,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
436
418
|
swipeStepTranslate = $el[0].offsetHeight - ($swipeStepEl.offset().top - $el.offset().top + $swipeStepEl[0].offsetHeight);
|
|
437
419
|
}
|
|
438
420
|
|
|
439
|
-
$el[0].style.setProperty('--f7-sheet-swipe-step', swipeStepTranslate
|
|
421
|
+
$el[0].style.setProperty('--f7-sheet-swipe-step', `${swipeStepTranslate}px`);
|
|
440
422
|
|
|
441
423
|
if (!byResize) {
|
|
442
424
|
$el.addClass('modal-in-swipe-step');
|
|
@@ -447,7 +429,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
447
429
|
sheet.setSwipeStep(true);
|
|
448
430
|
}
|
|
449
431
|
|
|
450
|
-
|
|
432
|
+
const passive = support.passiveListener ? {
|
|
451
433
|
passive: true
|
|
452
434
|
} : false;
|
|
453
435
|
|
|
@@ -455,14 +437,14 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
455
437
|
$el.on(app.touchEvents.start, handleTouchStart, passive);
|
|
456
438
|
app.on('touchmove', handleTouchMove);
|
|
457
439
|
app.on('touchend:passive', handleTouchEnd);
|
|
458
|
-
sheet.once('sheetDestroy',
|
|
440
|
+
sheet.once('sheetDestroy', () => {
|
|
459
441
|
$el.off(app.touchEvents.start, handleTouchStart, passive);
|
|
460
442
|
app.off('touchmove', handleTouchMove);
|
|
461
443
|
app.off('touchend:passive', handleTouchEnd);
|
|
462
444
|
});
|
|
463
445
|
}
|
|
464
446
|
|
|
465
|
-
sheet.on('open',
|
|
447
|
+
sheet.on('open', () => {
|
|
466
448
|
if (sheet.params.closeOnEscape) {
|
|
467
449
|
$(document).on('keydown', onKeyDown);
|
|
468
450
|
}
|
|
@@ -490,18 +472,18 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
490
472
|
sheet.$htmlEl[0].style.setProperty('--f7-sheet-push-scale', pushViewScale(pushOffset));
|
|
491
473
|
} else {
|
|
492
474
|
$pushViewEl = app.$el.children('.view, .views');
|
|
493
|
-
pushBorderRadius = parseFloat($el.css(
|
|
475
|
+
pushBorderRadius = parseFloat($el.css(`border-${isTopSheetModal ? 'bottom' : 'top'}-left-radius`));
|
|
494
476
|
$pushViewEl.css('border-radius', '0px');
|
|
495
477
|
}
|
|
496
478
|
}
|
|
497
479
|
}
|
|
498
480
|
});
|
|
499
|
-
sheet.on('opened',
|
|
481
|
+
sheet.on('opened', () => {
|
|
500
482
|
if (sheet.params.closeByOutsideClick || sheet.params.closeByBackdropClick) {
|
|
501
483
|
app.on('click', handleClick);
|
|
502
484
|
}
|
|
503
485
|
});
|
|
504
|
-
sheet.on('close',
|
|
486
|
+
sheet.on('close', () => {
|
|
505
487
|
if (sheet.params.swipeToStep) {
|
|
506
488
|
$el.removeClass('modal-in-swipe-step');
|
|
507
489
|
app.off('resize', onResize);
|
|
@@ -526,7 +508,7 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
526
508
|
sheet.$htmlEl.addClass('with-modal-sheet-push-closing');
|
|
527
509
|
}
|
|
528
510
|
});
|
|
529
|
-
sheet.on('closed',
|
|
511
|
+
sheet.on('closed', () => {
|
|
530
512
|
if (sheet.push && pushOffset) {
|
|
531
513
|
sheet.$htmlEl.removeClass('with-modal-sheet-push-closing');
|
|
532
514
|
sheet.$htmlEl[0].style.removeProperty('--f7-sheet-push-scale');
|
|
@@ -561,10 +543,9 @@ var Sheet = /*#__PURE__*/function (_Modal) {
|
|
|
561
543
|
};
|
|
562
544
|
|
|
563
545
|
$el[0].f7Modal = sheet;
|
|
564
|
-
return sheet
|
|
546
|
+
return sheet;
|
|
565
547
|
}
|
|
566
548
|
|
|
567
|
-
|
|
568
|
-
}(Modal);
|
|
549
|
+
}
|
|
569
550
|
|
|
570
551
|
export default Sheet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-sheet-height:260px;--f7-sheet-border-color:transparent;--f7-sheet-transition-duration:300ms;--f7-sheet-push-border-radius:10px;--f7-sheet-push-offset:var(--f7-safe-area-top);--f7-sheet-bg-color:#fff}:root .
|
|
1
|
+
:root{--f7-sheet-height:260px;--f7-sheet-border-color:transparent;--f7-sheet-transition-duration:300ms;--f7-sheet-push-border-radius:10px;--f7-sheet-push-offset:var(--f7-safe-area-top);--f7-sheet-bg-color:#fff}:root .dark,:root.dark{--f7-sheet-bg-color:#202020}.ios{--f7-sheet-border-color:var(--f7-bars-border-color)}.sheet-backdrop{z-index:11000}.sheet-modal{position:absolute;left:0;bottom:0;width:100%;height:var(--f7-sheet-height);display:none;box-sizing:border-box;transition-property:transform;transform:translate3d(0,100%,0);background:var(--f7-sheet-bg-color);z-index:12500;will-change:transform,opacity}.sheet-modal.modal-in,.sheet-modal.modal-out{transition-duration:var(--f7-sheet-transition-duration)}.sheet-modal.not-animated{transition-duration:0s}.sheet-modal.modal-in{display:block;transform:translate3d(0,0,0)}.sheet-modal.modal-in-swipe-step{display:block;transform:translate3d(0,var(--f7-sheet-swipe-step,0),0)}.sheet-modal.modal-out{transform:translate3d(0,100%,0)}.sheet-modal .sheet-modal-inner{height:100%;position:relative;overflow:hidden}.sheet-modal .toolbar{--f7-safe-area-bottom:0px;position:relative;width:100%}.sheet-modal .toolbar:after,.sheet-modal .toolbar:before{display:none}.sheet-modal .toolbar+.sheet-modal-inner{height:calc(100% - var(--f7-toolbar-height))}.sheet-modal .toolbar+.sheet-modal-inner .page-content{--f7-page-toolbar-top-offset:0px;--f7-page-toolbar-bottom-offset:0px}.sheet-modal-top:after{content:'';position:absolute;background-color:var(--f7-sheet-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}.sheet-modal-top:after{z-index:700;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.sheet-modal-bottom,.sheet-modal:not(.sheet-modal-top){--f7-safe-area-top:0px}.sheet-modal-bottom:before,.sheet-modal:not(.sheet-modal-top):before{content:'';position:absolute;background-color:var(--f7-sheet-border-color);display:block;z-index:15;top:0;right:auto;bottom:auto;left:0;height:1px;width:100%;transform-origin:50% 0%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}.sheet-modal-bottom:before,.sheet-modal:not(.sheet-modal-top):before{z-index:700;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.sheet-modal-top{--f7-safe-area-bottom:0px;bottom:auto;top:0;transform:translate3d(0,-100%,0)}.sheet-modal-top.modal-out{transform:translate3d(0,-100%,0)}.sheet-modal-top .toolbar-bottom{position:absolute}.sheet-modal-top .page-content{padding-top:var(--f7-safe-area-top)}html.with-modal-sheet-push .sheet-modal-push,html.with-modal-sheet-push-closing .sheet-modal-push{--f7-sheet-border-color:transparent;border-radius:var(--f7-sheet-push-border-radius) var(--f7-sheet-push-border-radius) 0 0;overflow:hidden}html.with-modal-sheet-push .sheet-modal-push .page,html.with-modal-sheet-push .sheet-modal-push .view,html.with-modal-sheet-push-closing .sheet-modal-push .page,html.with-modal-sheet-push-closing .sheet-modal-push .view{--f7-safe-area-top:0px}html.with-modal-sheet-push .sheet-modal-push.sheet-modal-top,html.with-modal-sheet-push-closing .sheet-modal-push.sheet-modal-top{border-radius:0 0 var(--f7-sheet-push-border-radius) var(--f7-sheet-push-border-radius)}html.with-modal-sheet-push .framework7-root,html.with-modal-sheet-push-closing .framework7-root{background:#000}html.with-modal-sheet-push .framework7-root>.view,html.with-modal-sheet-push .framework7-root>.views,html.with-modal-sheet-push-closing .framework7-root>.view,html.with-modal-sheet-push-closing .framework7-root>.views{transition-duration:var(--f7-sheet-transition-duration)}html.with-modal-sheet-push .dark .framework7-root>.view:after,html.with-modal-sheet-push .dark .framework7-root>.views:after,html.with-modal-sheet-push .dark.framework7-root>.view:after,html.with-modal-sheet-push .dark.framework7-root>.views:after,html.with-modal-sheet-push .framework7-root>.view.dark:after,html.with-modal-sheet-push .framework7-root>.views.dark:after,html.with-modal-sheet-push-closing .dark .framework7-root>.view:after,html.with-modal-sheet-push-closing .dark .framework7-root>.views:after,html.with-modal-sheet-push-closing .dark.framework7-root>.view:after,html.with-modal-sheet-push-closing .dark.framework7-root>.views:after,html.with-modal-sheet-push-closing .framework7-root>.view.dark:after,html.with-modal-sheet-push-closing .framework7-root>.views.dark:after,html.with-modal-sheet-push-closing.dark .framework7-root>.view:after,html.with-modal-sheet-push-closing.dark .framework7-root>.views:after,html.with-modal-sheet-push.dark .framework7-root>.view:after,html.with-modal-sheet-push.dark .framework7-root>.views:after{content:'';position:absolute;pointer-events:none;left:0;top:0;width:100%;height:100%;background:rgba(255,255,255,.1);z-index:13000;border-radius:var(--f7-sheet-push-border-radius) var(--f7-sheet-push-border-radius) 0 0;opacity:1;animation:sheet-dark-push-overlay-fade-in var(--f7-sheet-transition-duration) forwards}html.with-modal-sheet-push .framework7-root>.view,html.with-modal-sheet-push .framework7-root>.views{border-radius:var(--f7-sheet-push-border-radius);transform:translate3d(0,0,0px) scale(var(--f7-sheet-push-scale,1))!important}html.with-modal-sheet-push-closing .dark .framework7-root>.view:after,html.with-modal-sheet-push-closing .dark .framework7-root>.views:after,html.with-modal-sheet-push-closing .dark.framework7-root>.view:after,html.with-modal-sheet-push-closing .dark.framework7-root>.views:after,html.with-modal-sheet-push-closing .framework7-root>.view.dark:after,html.with-modal-sheet-push-closing .framework7-root>.views.dark:after,html.with-modal-sheet-push-closing.dark .framework7-root>.view:after,html.with-modal-sheet-push-closing.dark .framework7-root>.views:after{animation:sheet-dark-push-overlay-fade-out var(--f7-sheet-transition-duration) forwards}@keyframes sheet-dark-push-overlay-fade-in{from{opacity:0}to{opacity:1}}@keyframes sheet-dark-push-overlay-fade-out{from{opacity:1}to{opacity:0}}.md .sheet-modal .toolbar a.link:not(.tab-link){flex-shrink:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-sheet-height:260px;--f7-sheet-border-color:transparent;--f7-sheet-transition-duration:300ms;--f7-sheet-push-border-radius:10px;--f7-sheet-push-offset:var(--f7-safe-area-top);--f7-sheet-bg-color:#fff}:root .
|
|
1
|
+
:root{--f7-sheet-height:260px;--f7-sheet-border-color:transparent;--f7-sheet-transition-duration:300ms;--f7-sheet-push-border-radius:10px;--f7-sheet-push-offset:var(--f7-safe-area-top);--f7-sheet-bg-color:#fff}:root .dark,:root.dark{--f7-sheet-bg-color:#202020}.ios{--f7-sheet-border-color:var(--f7-bars-border-color)}.sheet-backdrop{z-index:11000}.sheet-modal{position:absolute;left:0;bottom:0;width:100%;height:var(--f7-sheet-height);display:none;box-sizing:border-box;transition-property:transform;transform:translate3d(0,100%,0);background:var(--f7-sheet-bg-color);z-index:12500;will-change:transform,opacity}.sheet-modal.modal-in,.sheet-modal.modal-out{transition-duration:var(--f7-sheet-transition-duration)}.sheet-modal.not-animated{transition-duration:0s}.sheet-modal.modal-in{display:block;transform:translate3d(0,0,0)}.sheet-modal.modal-in-swipe-step{display:block;transform:translate3d(0,var(--f7-sheet-swipe-step,0),0)}.sheet-modal.modal-out{transform:translate3d(0,100%,0)}.sheet-modal .sheet-modal-inner{height:100%;position:relative;overflow:hidden}.sheet-modal .toolbar{--f7-safe-area-bottom:0px;position:relative;width:100%}.sheet-modal .toolbar:after,.sheet-modal .toolbar:before{display:none}.sheet-modal .toolbar+.sheet-modal-inner{height:calc(100% - var(--f7-toolbar-height))}.sheet-modal .toolbar+.sheet-modal-inner .page-content{--f7-page-toolbar-top-offset:0px;--f7-page-toolbar-bottom-offset:0px}.sheet-modal-top:after{content:'';position:absolute;background-color:var(--f7-sheet-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}.sheet-modal-top:after{z-index:700;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.sheet-modal-bottom,.sheet-modal:not(.sheet-modal-top){--f7-safe-area-top:0px}.sheet-modal-bottom:before,.sheet-modal:not(.sheet-modal-top):before{content:'';position:absolute;background-color:var(--f7-sheet-border-color);display:block;z-index:15;top:0;right:auto;bottom:auto;left:0;height:1px;width:100%;transform-origin:50% 0%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}.sheet-modal-bottom:before,.sheet-modal:not(.sheet-modal-top):before{z-index:700;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.sheet-modal-top{--f7-safe-area-bottom:0px;bottom:auto;top:0;transform:translate3d(0,-100%,0)}.sheet-modal-top.modal-out{transform:translate3d(0,-100%,0)}.sheet-modal-top .toolbar-bottom{position:absolute}.sheet-modal-top .page-content{padding-top:var(--f7-safe-area-top)}html.with-modal-sheet-push .sheet-modal-push,html.with-modal-sheet-push-closing .sheet-modal-push{--f7-sheet-border-color:transparent;border-radius:var(--f7-sheet-push-border-radius) var(--f7-sheet-push-border-radius) 0 0;overflow:hidden}html.with-modal-sheet-push .sheet-modal-push .page,html.with-modal-sheet-push .sheet-modal-push .view,html.with-modal-sheet-push-closing .sheet-modal-push .page,html.with-modal-sheet-push-closing .sheet-modal-push .view{--f7-safe-area-top:0px}html.with-modal-sheet-push .sheet-modal-push.sheet-modal-top,html.with-modal-sheet-push-closing .sheet-modal-push.sheet-modal-top{border-radius:0 0 var(--f7-sheet-push-border-radius) var(--f7-sheet-push-border-radius)}html.with-modal-sheet-push .framework7-root,html.with-modal-sheet-push-closing .framework7-root{background:#000}html.with-modal-sheet-push .framework7-root>.view,html.with-modal-sheet-push .framework7-root>.views,html.with-modal-sheet-push-closing .framework7-root>.view,html.with-modal-sheet-push-closing .framework7-root>.views{transition-duration:var(--f7-sheet-transition-duration)}html.with-modal-sheet-push .dark .framework7-root>.view:after,html.with-modal-sheet-push .dark .framework7-root>.views:after,html.with-modal-sheet-push .dark.framework7-root>.view:after,html.with-modal-sheet-push .dark.framework7-root>.views:after,html.with-modal-sheet-push .framework7-root>.view.dark:after,html.with-modal-sheet-push .framework7-root>.views.dark:after,html.with-modal-sheet-push-closing .dark .framework7-root>.view:after,html.with-modal-sheet-push-closing .dark .framework7-root>.views:after,html.with-modal-sheet-push-closing .dark.framework7-root>.view:after,html.with-modal-sheet-push-closing .dark.framework7-root>.views:after,html.with-modal-sheet-push-closing .framework7-root>.view.dark:after,html.with-modal-sheet-push-closing .framework7-root>.views.dark:after,html.with-modal-sheet-push-closing.dark .framework7-root>.view:after,html.with-modal-sheet-push-closing.dark .framework7-root>.views:after,html.with-modal-sheet-push.dark .framework7-root>.view:after,html.with-modal-sheet-push.dark .framework7-root>.views:after{content:'';position:absolute;pointer-events:none;left:0;top:0;width:100%;height:100%;background:rgba(255,255,255,.1);z-index:13000;border-radius:var(--f7-sheet-push-border-radius) var(--f7-sheet-push-border-radius) 0 0;opacity:1;animation:sheet-dark-push-overlay-fade-in var(--f7-sheet-transition-duration) forwards}html.with-modal-sheet-push .framework7-root>.view,html.with-modal-sheet-push .framework7-root>.views{border-radius:var(--f7-sheet-push-border-radius);transform:translate3d(0,0,0px) scale(var(--f7-sheet-push-scale,1))!important}html.with-modal-sheet-push-closing .dark .framework7-root>.view:after,html.with-modal-sheet-push-closing .dark .framework7-root>.views:after,html.with-modal-sheet-push-closing .dark.framework7-root>.view:after,html.with-modal-sheet-push-closing .dark.framework7-root>.views:after,html.with-modal-sheet-push-closing .framework7-root>.view.dark:after,html.with-modal-sheet-push-closing .framework7-root>.views.dark:after,html.with-modal-sheet-push-closing.dark .framework7-root>.view:after,html.with-modal-sheet-push-closing.dark .framework7-root>.views:after{animation:sheet-dark-push-overlay-fade-out var(--f7-sheet-transition-duration) forwards}@keyframes sheet-dark-push-overlay-fade-in{from{opacity:0}to{opacity:1}}@keyframes sheet-dark-push-overlay-fade-out{from{opacity:1}to{opacity:0}}.md .sheet-modal .toolbar a.link:not(.tab-link){flex-shrink:0}
|
|
@@ -1 +1,68 @@
|
|
|
1
|
-
(function framework7ComponentLoader(e,s){void 0===s&&(s=!0);var t=e.$,o=e.utils,r=e.getDevice,a=e.getSupport,p=(e.Class,e.Modal),n=(e.ConstructorMethods,e.ModalMethods),l=o.extend,i=o.now,c=o.getTranslate;function h(e){this.wrapped=e}function d(e){var s,t;function o(s,t){try{var a=e[s](t),p=a.value,n=p instanceof h;Promise.resolve(n?p.wrapped:p).then((function(e){n?o("return"===s?"return":"next",e):r(a.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){r("throw",e)}}function r(e,r){switch(e){case"return":s.resolve({value:r,done:!0});break;case"throw":s.reject(r);break;default:s.resolve({value:r,done:!1})}(s=s.next)?o(s.key,s.arg):t=null}this._invoke=function(e,r){return new Promise((function(a,p){var n={key:e,arg:r,resolve:a,reject:p,next:null};t?t=t.next=n:(s=t=n,o(e,r))}))},"function"!=typeof e.return&&(this.return=void 0)}function u(e,s){return(u=Object.setPrototypeOf||function(e,s){return e.__proto__=s,e})(e,s)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}d.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},d.prototype.next=function(e){return this._invoke("next",e)},d.prototype.throw=function(e){return this._invoke("throw",e)},d.prototype.return=function(e){return this._invoke("return",e)};var f=function(e){var s,o;function p(s,o){var p,n,h,d,u,f=l({on:{}},s.params.sheet,o),g=m(p=e.call(this,s,f)||this),v=a(),w=r();if(g.params=f,void 0===g.params.backdrop&&(g.params.backdrop="ios"!==s.theme),(n=g.params.el?t(g.params.el).eq(0):t(g.params.content).filter((function(e){return 1===e.nodeType})).eq(0))&&n.length>0&&n[0].f7Modal)return n[0].f7Modal||m(p);if(0===n.length)return g.destroy()||m(p);function y(e){var s=e.target,o=t(s);!w.desktop&&w.cordova&&(window.Keyboard&&window.Keyboard.isVisible||window.cordova.plugins&&window.cordova.plugins.Keyboard&&window.cordova.plugins.Keyboard.isVisible)||0===o.closest(g.el).length&&(g.params.closeByBackdropClick&&g.params.backdrop&&g.backdropEl&&g.backdropEl===s||g.params.closeByOutsideClick)&&g.close()}function b(e){27===e.keyCode&&g.params.closeOnEscape&&g.close()}function C(e){return(s.height-2*e)/s.height}g.params.backdrop&&g.params.backdropEl?h=t(g.params.backdropEl):g.params.backdrop&&0===(h=g.$containerEl.children(".sheet-backdrop")).length&&(h=t('<div class="sheet-backdrop"></div>'),g.$containerEl.append(h)),l(g,{app:s,push:n.hasClass("sheet-modal-push")||g.params.push,$el:n,el:n[0],$backdropEl:h,backdropEl:h&&h[0],type:"sheet",$htmlEl:t("html")}),g.params.push&&n.addClass("sheet-modal-push");var k,E,T,S,P,x,M,$,O,H,B,_,I,N,q,j,D,K,X=!1,Y=!1;function z(e){X||!g.params.swipeToClose&&!g.params.swipeToStep||g.params.swipeHandler&&0===t(e.target).closest(g.params.swipeHandler).length||(X=!0,Y=!1,k={x:"touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,y:"touchstart"===e.type?e.targetTouches[0].pageY:e.pageY},S=i(),T=void 0,x=n.hasClass("sheet-modal-top"),g.params.swipeHandler||"touchstart"!==e.type||(q=t(e.target).closest(".page-content")[0]))}function A(e){if(X){if(E={x:"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,y:"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY},void 0===T&&(T=!!(T||Math.abs(E.x-k.x)>Math.abs(E.y-k.y))),T)return X=!1,void(Y=!1);var t,o=(P=k.y-E.y)<0?"to-bottom":"to-top";if(!Y){if(q&&!n.hasClass("modal-in-swipe-step")&&(j=q.scrollTop,D=q.scrollHeight,K=q.offsetHeight,!(D===K||"to-bottom"===o&&0===j||"to-top"===o&&j===D-K)))return n.transform(""),X=!1,void(Y=!1);g.push&&u&&(I=s.$el.children(".view, .views")),H=n[0].offsetHeight,$=c(n[0],"y"),x?(B=g.params.swipeToClose?-H:-M,_=0):(B=0,_=g.params.swipeToClose?H:M),Y=!0}if(O=$-P,O=Math.min(Math.max(O,B),_),e.preventDefault(),g.push&&u){var r=(O-$)/H;g.params.swipeToStep&&(r=x?O/M:1-(M-O)/M),r=Math.abs(r);var a=1-(r=Math.min(Math.max(r,0),1)),p=1-(1-C(u))*a;I.transition(0).forEach((function(e){e.style.setProperty("transform","translate3d(0,0,0) scale("+p+")","important")})),g.params.swipeToStep&&I.css("border-radius",N*a+"px")}if(n.transition(0).transform("translate3d(0,"+O+"px,0)"),g.params.swipeToStep)t=x?1-O/M:(M-O)/M,t=Math.min(Math.max(t,0),1),n.trigger("sheet:stepprogress",t),g.emit("local::stepProgress sheetStepProgress",g,t)}}function L(){if(X=!1,Y){Y=!1,n.transform("").transition(""),g.push&&u&&(I.transition("").transform(""),I.css("border-radius",""));var e=P<0?"to-bottom":"to-top",s=Math.abs(P);if(0!==s&&O!==$){var t=(new Date).getTime()-S;if(g.params.swipeToStep){var o=x?"to-bottom":"to-top",r=x?"to-top":"to-bottom",a=Math.abs(O),p=Math.abs(M);if(t<300&&s>10)return e===o&&a<p&&(n.removeClass("modal-in-swipe-step"),n.trigger("sheet:stepprogress",1),g.emit("local::stepProgress sheetStepProgress",g,1),n.trigger("sheet:stepopen"),g.emit("local::stepOpen sheetStepOpen",g),g.push&&u&&(g.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",C(u)),I.css("border-radius",""))),e===r&&a>p&&(g.params.swipeToClose?g.close():(n.addClass("modal-in-swipe-step"),n.trigger("sheet:stepprogress",0),g.emit("local::stepProgress sheetStepProgress",g,0),n.trigger("sheet:stepclose"),g.emit("local::stepClose sheetStepClose",g),g.push&&u&&(g.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"),I.css("border-radius","0px")))),void(e===r&&a<=p&&(n.addClass("modal-in-swipe-step"),n.trigger("sheet:stepprogress",0),g.emit("local::stepProgress sheetStepProgress",g,0),n.trigger("sheet:stepclose"),g.emit("local::stepClose sheetStepClose",g),g.push&&u&&(g.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"),I.css("border-radius","0px"))));if(t>=300){var l=!n.hasClass("modal-in-swipe-step");l?l&&(a>p+(H-p)/2?g.params.swipeToClose&&g.close():a>p/2&&(n.addClass("modal-in-swipe-step"),n.trigger("sheet:stepprogress",0),g.emit("local::stepProgress sheetStepProgress",g,0),n.trigger("sheet:stepclose"),g.emit("local::stepClose sheetStepClose",g),g.push&&u&&(g.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"),I.css("border-radius","0px")))):a<p/2?(n.removeClass("modal-in-swipe-step"),n.trigger("sheet:stepprogress",1),g.emit("local::stepProgress sheetStepProgress",g,1),n.trigger("sheet:stepopen"),g.emit("local::stepOpen sheetStepOpen",g),g.push&&u&&(g.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",C(u)),I.css("border-radius",""))):a-p>(H-p)/2&&g.params.swipeToClose&&g.close()}}else{if(e!==(x?"to-top":"to-bottom"))return;(t<300&&s>20||t>=300&&s>H/2)&&g.close()}}}}function V(){g.setSwipeStep(!0)}g.setSwipeStep=function(e){void 0===e&&(e=!0);var s=n.find(".sheet-modal-swipe-step").eq(0);s.length&&(M=n.hasClass("sheet-modal-top")?-(s.offset().top-n.offset().top+s[0].offsetHeight):n[0].offsetHeight-(s.offset().top-n.offset().top+s[0].offsetHeight),n[0].style.setProperty("--f7-sheet-swipe-step",M+"px"),e||n.addClass("modal-in-swipe-step"))};var F=!!v.passiveListener&&{passive:!0};return(g.params.swipeToClose||g.params.swipeToStep)&&(n.on(s.touchEvents.start,z,F),s.on("touchmove",A),s.on("touchend:passive",L),g.once("sheetDestroy",(function(){n.off(s.touchEvents.start,z,F),s.off("touchmove",A),s.off("touchend:passive",L)}))),g.on("open",(function(){g.params.closeOnEscape&&t(document).on("keydown",b),n.prevAll(".popup.modal-in").addClass("popup-behind"),g.params.swipeToStep&&(g.setSwipeStep(!1),s.on("resize",V)),g.params.scrollToEl&&function(){var e=t(g.params.scrollToEl).eq(0);if(0!==e.length&&0!==(d=e.parents(".page-content")).length){var s,o=parseInt(d.css("padding-top"),10),r=parseInt(d.css("padding-bottom"),10),a=d[0].offsetHeight-o-n.height(),p=d[0].scrollHeight-o-n.height(),l=d.scrollTop(),i=e.offset().top-o+e[0].offsetHeight;if(i>a){var c=l+i-a;c+a>p&&(s=c+a-p+r,a===p&&(s=n.height()),d.css({"padding-bottom":s+"px"})),d.scrollTop(c,300)}}}(),g.push&&(u=parseInt(n.css("--f7-sheet-push-offset"),10),Number.isNaN(u)&&(u=0),u&&(n.addClass("sheet-modal-push"),g.$htmlEl.addClass("with-modal-sheet-push"),g.params.swipeToStep?(I=s.$el.children(".view, .views"),N=parseFloat(n.css("border-"+(x?"bottom":"top")+"-left-radius")),I.css("border-radius","0px")):g.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",C(u))))})),g.on("opened",(function(){(g.params.closeByOutsideClick||g.params.closeByBackdropClick)&&s.on("click",y)})),g.on("close",(function(){g.params.swipeToStep&&(n.removeClass("modal-in-swipe-step"),s.off("resize",V)),g.params.closeOnEscape&&t(document).off("keydown",b),g.params.scrollToEl&&d&&d.length>0&&d.css({"padding-bottom":""}),(g.params.closeByOutsideClick||g.params.closeByBackdropClick)&&s.off("click",y),n.prevAll(".popup.modal-in").eq(0).removeClass("popup-behind"),g.push&&u&&(g.$htmlEl.removeClass("with-modal-sheet-push"),g.$htmlEl.addClass("with-modal-sheet-push-closing"))})),g.on("closed",(function(){g.push&&u&&(g.$htmlEl.removeClass("with-modal-sheet-push-closing"),g.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"))})),g.stepOpen=function(){n.removeClass("modal-in-swipe-step"),g.push&&(u||(u=parseInt(n.css("--f7-sheet-push-offset"),10),Number.isNaN(u)&&(u=0)),u&&g.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",C(u)))},g.stepClose=function(){n.addClass("modal-in-swipe-step"),g.push&&g.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale")},g.stepToggle=function(){n.toggleClass("modal-in-swipe-step")},n[0].f7Modal=g,g||m(p)}return o=e,(s=p).prototype=Object.create(o.prototype),s.prototype.constructor=s,u(s,o),p}(p),g={name:"sheet",params:{sheet:{push:!1,backdrop:void 0,backdropEl:void 0,closeByBackdropClick:!0,closeByOutsideClick:!1,closeOnEscape:!1,swipeToClose:!1,swipeToStep:!1,swipeHandler:null,containerEl:null}},static:{Sheet:f},create:function(){var e=this;e.sheet=l({},n({app:e,constructor:f,defaultSelector:".sheet-modal.modal-in"}),{stepOpen:function(s){var t=e.sheet.get(s);if(t&&t.stepOpen)return t.stepOpen()},stepClose:function(s){var t=e.sheet.get(s);if(t&&t.stepClose)return t.stepClose()},stepToggle:function(s){var t=e.sheet.get(s);if(t&&t.stepToggle)return t.stepToggle()}})},clicks:{".sheet-open":function(e,s){void 0===s&&(s={});t(".sheet-modal.modal-in").length>0&&s.sheet&&t(s.sheet)[0]!==t(".sheet-modal.modal-in")[0]&&this.sheet.close(".sheet-modal.modal-in"),this.sheet.open(s.sheet,s.animate,e)},".sheet-close":function(e,s){void 0===s&&(s={});this.sheet.close(s.sheet,s.animate,e)}}};if(s){if(e.prototype.modules&&e.prototype.modules[g.name])return;e.use(g),e.instance&&(e.instance.useModuleParams(g,e.instance.params),e.instance.useModule(g))}return g}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
|
|
1
|
+
import $ from '../../shared/dom7';
|
|
2
|
+
import { extend } from '../../shared/utils';
|
|
3
|
+
import Sheet from './sheet-class';
|
|
4
|
+
import ModalMethods from '../../shared/modal-methods';
|
|
5
|
+
export default {
|
|
6
|
+
name: 'sheet',
|
|
7
|
+
params: {
|
|
8
|
+
sheet: {
|
|
9
|
+
push: false,
|
|
10
|
+
backdrop: undefined,
|
|
11
|
+
backdropEl: undefined,
|
|
12
|
+
closeByBackdropClick: true,
|
|
13
|
+
closeByOutsideClick: false,
|
|
14
|
+
closeOnEscape: false,
|
|
15
|
+
swipeToClose: false,
|
|
16
|
+
swipeToStep: false,
|
|
17
|
+
swipeHandler: null,
|
|
18
|
+
containerEl: null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
static: {
|
|
22
|
+
Sheet
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
create() {
|
|
26
|
+
const app = this;
|
|
27
|
+
app.sheet = extend({}, ModalMethods({
|
|
28
|
+
app,
|
|
29
|
+
constructor: Sheet,
|
|
30
|
+
defaultSelector: '.sheet-modal.modal-in'
|
|
31
|
+
}), {
|
|
32
|
+
stepOpen(sheet) {
|
|
33
|
+
const sheetInstance = app.sheet.get(sheet);
|
|
34
|
+
if (sheetInstance && sheetInstance.stepOpen) return sheetInstance.stepOpen();
|
|
35
|
+
return undefined;
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
stepClose(sheet) {
|
|
39
|
+
const sheetInstance = app.sheet.get(sheet);
|
|
40
|
+
if (sheetInstance && sheetInstance.stepClose) return sheetInstance.stepClose();
|
|
41
|
+
return undefined;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
stepToggle(sheet) {
|
|
45
|
+
const sheetInstance = app.sheet.get(sheet);
|
|
46
|
+
if (sheetInstance && sheetInstance.stepToggle) return sheetInstance.stepToggle();
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
clicks: {
|
|
54
|
+
'.sheet-open': function openSheet($clickedEl, data = {}) {
|
|
55
|
+
const app = this;
|
|
56
|
+
|
|
57
|
+
if ($('.sheet-modal.modal-in').length > 0 && data.sheet && $(data.sheet)[0] !== $('.sheet-modal.modal-in')[0]) {
|
|
58
|
+
app.sheet.close('.sheet-modal.modal-in');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
app.sheet.open(data.sheet, data.animate, $clickedEl);
|
|
62
|
+
},
|
|
63
|
+
'.sheet-close': function closeSheet($clickedEl, data = {}) {
|
|
64
|
+
const app = this;
|
|
65
|
+
app.sheet.close(data.sheet, data.animate, $clickedEl);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -112,14 +112,14 @@ html.with-modal-sheet-push-closing {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
.if-dark-theme({
|
|
115
|
-
&.
|
|
116
|
-
&.
|
|
117
|
-
.
|
|
118
|
-
.
|
|
119
|
-
.
|
|
120
|
-
.
|
|
121
|
-
.framework7-root > .views.
|
|
122
|
-
.framework7-root > .view.
|
|
115
|
+
&.dark .framework7-root > .views,
|
|
116
|
+
&.dark .framework7-root > .view,
|
|
117
|
+
.dark .framework7-root > .views,
|
|
118
|
+
.dark .framework7-root > .view,
|
|
119
|
+
.dark.framework7-root > .views,
|
|
120
|
+
.dark.framework7-root > .view,
|
|
121
|
+
.framework7-root > .views.dark,
|
|
122
|
+
.framework7-root > .view.dark {
|
|
123
123
|
&:after {
|
|
124
124
|
content: '';
|
|
125
125
|
position: absolute;
|
|
@@ -149,14 +149,14 @@ html.with-modal-sheet-push {
|
|
|
149
149
|
|
|
150
150
|
.if-dark-theme({
|
|
151
151
|
html.with-modal-sheet-push-closing {
|
|
152
|
-
&.
|
|
153
|
-
&.
|
|
154
|
-
.
|
|
155
|
-
.
|
|
156
|
-
.
|
|
157
|
-
.
|
|
158
|
-
.framework7-root > .views.
|
|
159
|
-
.framework7-root > .view.
|
|
152
|
+
&.dark .framework7-root > .views,
|
|
153
|
+
&.dark .framework7-root > .view,
|
|
154
|
+
.dark .framework7-root > .views,
|
|
155
|
+
.dark .framework7-root > .view,
|
|
156
|
+
.dark.framework7-root > .views,
|
|
157
|
+
.dark.framework7-root > .view,
|
|
158
|
+
.framework7-root > .views.dark,
|
|
159
|
+
.framework7-root > .view.dark {
|
|
160
160
|
&:after {
|
|
161
161
|
animation: sheet-dark-push-overlay-fade-out var(--f7-sheet-transition-duration) forwards;
|
|
162
162
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function framework7ComponentLoader(e,s){void 0===s&&(s=!0);var t=e.$,o=e.utils,a=e.getDevice,p=e.getSupport,r=(e.Class,e.Modal),l=(e.ConstructorMethods,e.ModalMethods),i=o.extend,n=o.now,h=o.getTranslate;class c extends r{constructor(e,s){const o=i({on:{}},e.params.sheet,s);super(e,o);const r=this,l=getWindow(),c=getDocument(),d=p(),m=a();let u,g,f,y;if(r.params=o,void 0===r.params.backdrop&&(r.params.backdrop="ios"!==e.theme),u=r.params.el?t(r.params.el).eq(0):t(r.params.content).filter((e=>1===e.nodeType)).eq(0),u&&u.length>0&&u[0].f7Modal)return u[0].f7Modal;if(0===u.length)return r.destroy();function w(e){const s=e.target,o=t(s);!m.desktop&&m.cordova&&(l.Keyboard&&l.Keyboard.isVisible||l.cordova.plugins&&l.cordova.plugins.Keyboard&&l.cordova.plugins.Keyboard.isVisible)||0===o.closest(r.el).length&&(r.params.closeByBackdropClick&&r.params.backdrop&&r.backdropEl&&r.backdropEl===s||r.params.closeByOutsideClick)&&r.close()}function C(e){27===e.keyCode&&r.params.closeOnEscape&&r.close()}function b(s){return(e.height-2*s)/e.height}r.params.backdrop&&r.params.backdropEl?g=t(r.params.backdropEl):r.params.backdrop&&(g=r.$containerEl.children(".sheet-backdrop"),0===g.length&&(g=t('<div class="sheet-backdrop"></div>'),r.$containerEl.append(g))),i(r,{app:e,push:u.hasClass("sheet-modal-push")||r.params.push,$el:u,el:u[0],$backdropEl:g,backdropEl:g&&g[0],type:"sheet",$htmlEl:t("html")}),r.params.push&&u.addClass("sheet-modal-push");let v,k,T,E,S,$,P,M,x,O,H,B,N,q,D,I,K,X,Y=!1,z=!1;function A(e){Y||!r.params.swipeToClose&&!r.params.swipeToStep||r.params.swipeHandler&&0===t(e.target).closest(r.params.swipeHandler).length||(Y=!0,z=!1,v={x:"touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,y:"touchstart"===e.type?e.targetTouches[0].pageY:e.pageY},E=n(),T=void 0,$=u.hasClass("sheet-modal-top"),r.params.swipeHandler||"touchstart"!==e.type||(D=t(e.target).closest(".page-content")[0]))}function L(s){if(!Y)return;if(k={x:"touchmove"===s.type?s.targetTouches[0].pageX:s.pageX,y:"touchmove"===s.type?s.targetTouches[0].pageY:s.pageY},void 0===T&&(T=!!(T||Math.abs(k.x-v.x)>Math.abs(k.y-v.y))),T)return Y=!1,void(z=!1);S=v.y-k.y;const t=S<0?"to-bottom":"to-top";if(!z){if(D&&!u.hasClass("modal-in-swipe-step")&&(I=D.scrollTop,K=D.scrollHeight,X=D.offsetHeight,!(K===X||"to-bottom"===t&&0===I||"to-top"===t&&I===K-X)))return u.transform(""),Y=!1,void(z=!1);r.push&&y&&(N=e.$el.children(".view, .views")),O=u[0].offsetHeight,M=h(u[0],"y"),$?(H=r.params.swipeToClose?-O:-P,B=0):(H=0,B=r.params.swipeToClose?O:P),z=!0}if(x=M-S,x=Math.min(Math.max(x,H),B),s.preventDefault(),r.push&&y){let e=(x-M)/O;r.params.swipeToStep&&(e=$?x/P:1-(P-x)/P),e=Math.abs(e),e=Math.min(Math.max(e,0),1);const s=1-e,t=1-(1-b(y))*s;N.transition(0).forEach((e=>{e.style.setProperty("transform",`translate3d(0,0,0) scale(${t})`,"important")})),r.params.swipeToStep&&N.css("border-radius",q*s+"px")}if(u.transition(0).transform(`translate3d(0,${x}px,0)`),r.params.swipeToStep){let e;e=$?1-x/P:(P-x)/P,e=Math.min(Math.max(e,0),1),u.trigger("sheet:stepprogress",e),r.emit("local::stepProgress sheetStepProgress",r,e)}}function V(){if(Y=!1,!z)return;z=!1,u.transform("").transition(""),r.push&&y&&(N.transition("").transform(""),N.css("border-radius",""));const e=S<0?"to-bottom":"to-top",s=Math.abs(S);if(0===s||x===M)return;const t=(new Date).getTime()-E;if(!r.params.swipeToStep){if(e!==($?"to-top":"to-bottom"))return;return void((t<300&&s>20||t>=300&&s>O/2)&&r.close())}const o=$?"to-bottom":"to-top",a=$?"to-top":"to-bottom",p=Math.abs(x),l=Math.abs(P);if(t<300&&s>10)return e===o&&p<l&&(u.removeClass("modal-in-swipe-step"),u.trigger("sheet:stepprogress",1),r.emit("local::stepProgress sheetStepProgress",r,1),u.trigger("sheet:stepopen"),r.emit("local::stepOpen sheetStepOpen",r),r.push&&y&&(r.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",b(y)),N.css("border-radius",""))),e===a&&p>l&&(r.params.swipeToClose?r.close():(u.addClass("modal-in-swipe-step"),u.trigger("sheet:stepprogress",0),r.emit("local::stepProgress sheetStepProgress",r,0),u.trigger("sheet:stepclose"),r.emit("local::stepClose sheetStepClose",r),r.push&&y&&(r.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"),N.css("border-radius","0px")))),void(e===a&&p<=l&&(u.addClass("modal-in-swipe-step"),u.trigger("sheet:stepprogress",0),r.emit("local::stepProgress sheetStepProgress",r,0),u.trigger("sheet:stepclose"),r.emit("local::stepClose sheetStepClose",r),r.push&&y&&(r.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"),N.css("border-radius","0px"))));if(t>=300){const e=!u.hasClass("modal-in-swipe-step");e?e&&(p>l+(O-l)/2?r.params.swipeToClose&&r.close():p>l/2&&(u.addClass("modal-in-swipe-step"),u.trigger("sheet:stepprogress",0),r.emit("local::stepProgress sheetStepProgress",r,0),u.trigger("sheet:stepclose"),r.emit("local::stepClose sheetStepClose",r),r.push&&y&&(r.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"),N.css("border-radius","0px")))):p<l/2?(u.removeClass("modal-in-swipe-step"),u.trigger("sheet:stepprogress",1),r.emit("local::stepProgress sheetStepProgress",r,1),u.trigger("sheet:stepopen"),r.emit("local::stepOpen sheetStepOpen",r),r.push&&y&&(r.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",b(y)),N.css("border-radius",""))):p-l>(O-l)/2&&r.params.swipeToClose&&r.close()}}function F(){r.setSwipeStep(!0)}r.setSwipeStep=function(e=!0){const s=u.find(".sheet-modal-swipe-step").eq(0);s.length&&(P=u.hasClass("sheet-modal-top")?-(s.offset().top-u.offset().top+s[0].offsetHeight):u[0].offsetHeight-(s.offset().top-u.offset().top+s[0].offsetHeight),u[0].style.setProperty("--f7-sheet-swipe-step",`${P}px`),e||u.addClass("modal-in-swipe-step"))};const W=!!d.passiveListener&&{passive:!0};return(r.params.swipeToClose||r.params.swipeToStep)&&(u.on(e.touchEvents.start,A,W),e.on("touchmove",L),e.on("touchend:passive",V),r.once("sheetDestroy",(()=>{u.off(e.touchEvents.start,A,W),e.off("touchmove",L),e.off("touchend:passive",V)}))),r.on("open",(()=>{r.params.closeOnEscape&&t(c).on("keydown",C),u.prevAll(".popup.modal-in").addClass("popup-behind"),r.params.swipeToStep&&(r.setSwipeStep(!1),e.on("resize",F)),r.params.scrollToEl&&function(){const e=t(r.params.scrollToEl).eq(0);if(0===e.length)return;if(f=e.parents(".page-content"),0===f.length)return;const s=parseInt(f.css("padding-top"),10),o=parseInt(f.css("padding-bottom"),10),a=f[0].offsetHeight-s-u.height(),p=f[0].scrollHeight-s-u.height(),l=f.scrollTop();let i;const n=e.offset().top-s+e[0].offsetHeight;if(n>a){const e=l+n-a;e+a>p&&(i=e+a-p+o,a===p&&(i=u.height()),f.css({"padding-bottom":`${i}px`})),f.scrollTop(e,300)}}(),r.push&&(y=parseInt(u.css("--f7-sheet-push-offset"),10),Number.isNaN(y)&&(y=0),y&&(u.addClass("sheet-modal-push"),r.$htmlEl.addClass("with-modal-sheet-push"),r.params.swipeToStep?(N=e.$el.children(".view, .views"),q=parseFloat(u.css(`border-${$?"bottom":"top"}-left-radius`)),N.css("border-radius","0px")):r.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",b(y))))})),r.on("opened",(()=>{(r.params.closeByOutsideClick||r.params.closeByBackdropClick)&&e.on("click",w)})),r.on("close",(()=>{r.params.swipeToStep&&(u.removeClass("modal-in-swipe-step"),e.off("resize",F)),r.params.closeOnEscape&&t(c).off("keydown",C),r.params.scrollToEl&&f&&f.length>0&&f.css({"padding-bottom":""}),(r.params.closeByOutsideClick||r.params.closeByBackdropClick)&&e.off("click",w),u.prevAll(".popup.modal-in").eq(0).removeClass("popup-behind"),r.push&&y&&(r.$htmlEl.removeClass("with-modal-sheet-push"),r.$htmlEl.addClass("with-modal-sheet-push-closing"))})),r.on("closed",(()=>{r.push&&y&&(r.$htmlEl.removeClass("with-modal-sheet-push-closing"),r.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale"))})),r.stepOpen=function(){u.removeClass("modal-in-swipe-step"),r.push&&(y||(y=parseInt(u.css("--f7-sheet-push-offset"),10),Number.isNaN(y)&&(y=0)),y&&r.$htmlEl[0].style.setProperty("--f7-sheet-push-scale",b(y)))},r.stepClose=function(){u.addClass("modal-in-swipe-step"),r.push&&r.$htmlEl[0].style.removeProperty("--f7-sheet-push-scale")},r.stepToggle=function(){u.toggleClass("modal-in-swipe-step")},u[0].f7Modal=r,r}}var d={name:"sheet",params:{sheet:{push:!1,backdrop:void 0,backdropEl:void 0,closeByBackdropClick:!0,closeByOutsideClick:!1,closeOnEscape:!1,swipeToClose:!1,swipeToStep:!1,swipeHandler:null,containerEl:null}},static:{Sheet:c},create(){const e=this;e.sheet=i({},l({app:e,constructor:c,defaultSelector:".sheet-modal.modal-in"}),{stepOpen(s){const t=e.sheet.get(s);if(t&&t.stepOpen)return t.stepOpen()},stepClose(s){const t=e.sheet.get(s);if(t&&t.stepClose)return t.stepClose()},stepToggle(s){const t=e.sheet.get(s);if(t&&t.stepToggle)return t.stepToggle()}})},clicks:{".sheet-open":function(e,s={}){const o=this;t(".sheet-modal.modal-in").length>0&&s.sheet&&t(s.sheet)[0]!==t(".sheet-modal.modal-in")[0]&&o.sheet.close(".sheet-modal.modal-in"),o.sheet.open(s.sheet,s.animate,e)},".sheet-close":function(e,s={}){this.sheet.close(s.sheet,s.animate,e)}}};if(s){if(e.prototype.modules&&e.prototype.modules[d.name])return;e.use(d),e.instance&&(e.instance.useModuleParams(d,e.instance.params),e.instance.useModule(d))}return d}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
|