framework7 7.0.8 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion.js +2 -16
- package/components/accordion/accordion.less +0 -3
- package/components/actions/actions-class.js +13 -58
- package/components/actions/actions-ios.less +42 -0
- package/components/actions/actions-md.less +12 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions-vars.less +17 -42
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -2
- package/components/actions/actions.js +0 -4
- package/components/actions/actions.lazy.js +1 -1
- package/components/actions/actions.less +5 -35
- package/components/app/app-class.d.ts +14 -12
- package/components/app/app-class.js +93 -75
- package/components/app/app-ios.less +0 -2
- package/components/app/app-md.less +0 -2
- package/components/app/app-vars.less +13 -96
- package/components/app/app.less +1 -4
- package/components/app/load-module.js +17 -36
- package/components/area-chart/area-chart-class.js +8 -64
- package/components/area-chart/area-chart.js +0 -3
- package/components/area-chart/area-chart.less +0 -3
- package/components/autocomplete/autocomplete-class.js +30 -175
- package/components/autocomplete/autocomplete-ios.less +0 -8
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete-vars.less +8 -22
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.d.ts +1 -3
- package/components/autocomplete/autocomplete.js +1 -6
- package/components/autocomplete/autocomplete.lazy.js +1 -1
- package/components/autocomplete/autocomplete.less +6 -18
- package/components/badge/badge-vars.less +3 -6
- package/components/badge/badge.less +1 -3
- package/components/block/block-vars.less +25 -52
- package/components/block/block.less +37 -12
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
- package/components/breadcrumbs/breadcrumbs-vars.less +31 -15
- package/components/breadcrumbs/breadcrumbs.css +1 -1
- package/components/breadcrumbs/breadcrumbs.js +0 -2
- package/components/breadcrumbs/breadcrumbs.less +4 -10
- package/components/button/button-vars.less +42 -43
- package/components/button/button.less +24 -26
- package/components/calendar/calendar-class.js +81 -401
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +32 -46
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.js +6 -4
- package/components/calendar/calendar.lazy.js +1 -1
- package/components/calendar/calendar.less +10 -21
- package/components/card/card-rtl.css +1 -1
- package/components/card/card-vars.less +41 -44
- package/components/card/card.css +1 -1
- package/components/card/card.js +0 -108
- package/components/card/card.less +18 -24
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox-vars.less +0 -8
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.less +10 -3
- package/components/chip/chip-ios.less +3 -0
- package/components/chip/chip-md.less +4 -3
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip-vars.less +17 -20
- package/components/chip/chip.css +1 -1
- package/components/chip/chip.less +16 -21
- package/components/color-picker/color-picker-class.js +27 -158
- package/components/color-picker/color-picker-rtl.css +1 -1
- package/components/color-picker/color-picker.css +1 -1
- package/components/color-picker/color-picker.js +0 -4
- package/components/color-picker/color-picker.lazy.js +1 -1
- package/components/color-picker/color-picker.less +18 -8
- package/components/color-picker/modules/alpha-slider.js +0 -12
- package/components/color-picker/modules/brightness-slider.js +0 -8
- package/components/color-picker/modules/current-color.js +0 -2
- package/components/color-picker/modules/hex.js +0 -12
- package/components/color-picker/modules/hs-spectrum.js +0 -20
- package/components/color-picker/modules/hsb-sliders.js +0 -18
- package/components/color-picker/modules/hue-slider.js +0 -7
- package/components/color-picker/modules/initial-current-colors.js +0 -7
- package/components/color-picker/modules/palette.js +2 -10
- package/components/color-picker/modules/rgb-bars.js +0 -17
- package/components/color-picker/modules/rgb-sliders.js +0 -17
- package/components/color-picker/modules/sb-spectrum.js +0 -20
- package/components/color-picker/modules/wheel.js +0 -28
- package/components/contacts-list/contacts-list-md.less +4 -3
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list-vars.less +3 -15
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/contacts-list.less +0 -3
- package/components/data-table/data-table-class.js +10 -32
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table-vars.less +6 -39
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +0 -8
- package/components/data-table/data-table.less +0 -3
- package/components/dialog/dialog-class.js +7 -41
- package/components/dialog/dialog-ios.less +0 -3
- package/components/dialog/dialog-md.less +9 -9
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog-vars.less +25 -70
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +12 -48
- package/components/dialog/dialog.lazy.js +1 -1
- package/components/dialog/dialog.less +8 -4
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab-vars.less +20 -14
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +0 -21
- package/components/fab/fab.less +50 -53
- package/components/form/form.d.ts +4 -4
- package/components/form/form.js +58 -94
- package/components/form/form.lazy.js +1 -1
- package/components/form/form.less +0 -3
- package/components/gauge/gauge-class.js +4 -20
- package/components/gauge/gauge.js +0 -9
- package/components/gauge/gauge.less +0 -3
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid-vars.less +0 -7
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.d.ts +2 -8
- package/components/grid/grid.js +1 -225
- package/components/grid/grid.lazy.js +1 -1
- package/components/grid/grid.less +54 -184
- package/components/icon/icon.less +0 -3
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
- package/components/infinite-scroll/infinite-scroll.css +1 -1
- package/components/infinite-scroll/infinite-scroll.js +0 -16
- package/components/infinite-scroll/infinite-scroll.less +0 -3
- package/components/input/input-ios.less +49 -41
- package/components/input/input-md.less +87 -19
- package/components/input/input-rtl.css +1 -1
- package/components/input/input-vars.less +26 -60
- package/components/input/input.css +1 -1
- package/components/input/input.js +8 -67
- package/components/input/input.less +67 -153
- package/components/link/link-vars.less +0 -5
- package/components/link/link.less +3 -3
- package/components/list/list-md.less +0 -7
- package/components/list/list-vars.less +59 -108
- package/components/list/list.less +122 -90
- package/components/list-index/list-index-class.js +12 -69
- package/components/list-index/list-index-rtl.css +1 -1
- package/components/list-index/list-index-vars.less +0 -7
- package/components/list-index/list-index.css +1 -1
- package/components/list-index/list-index.d.ts +1 -3
- package/components/list-index/list-index.js +0 -8
- package/components/list-index/list-index.lazy.js +1 -1
- package/components/list-index/list-index.less +4 -7
- package/components/login-screen/login-screen-class.js +4 -9
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen-vars.less +13 -12
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +0 -4
- package/components/login-screen/login-screen.less +2 -8
- package/components/messagebar/messagebar-class.js +18 -79
- package/components/messagebar/messagebar-ios.less +36 -0
- package/components/messagebar/messagebar-md.less +96 -16
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar-vars.less +27 -50
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +0 -8
- package/components/messagebar/messagebar.less +11 -42
- package/components/messages/messages-class.js +17 -110
- package/components/messages/messages-ios.less +9 -0
- package/components/messages/messages-md.less +63 -28
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages-vars.less +43 -50
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +0 -8
- package/components/messages/messages.lazy.js +1 -1
- package/components/messages/messages.less +0 -11
- package/components/modal/custom-modal-class.js +4 -14
- package/components/modal/modal-class.js +19 -55
- package/components/modal/modal.js +0 -3
- package/components/navbar/navbar-ios.less +3 -39
- package/components/navbar/navbar-md.less +12 -0
- package/components/navbar/navbar-vars.less +20 -49
- package/components/navbar/navbar.d.ts +0 -2
- package/components/navbar/navbar.js +37 -166
- package/components/navbar/navbar.less +4 -26
- package/components/notification/notification-class.js +4 -39
- package/components/notification/notification-md.less +18 -8
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification-vars.less +15 -54
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.js +0 -2
- package/components/notification/notification.lazy.js +1 -1
- package/components/notification/notification.less +0 -3
- package/components/page/page-md.less +40 -10
- package/components/page/page-transitions/circle.less +15 -9
- package/components/page/page-transitions/fade.less +17 -11
- package/components/page/page-transitions/flip.less +9 -4
- package/components/page/page-vars.less +3 -19
- package/components/page/page.less +2 -10
- package/components/panel/panel-class.js +23 -127
- package/components/panel/panel-md.less +9 -0
- package/components/panel/panel-rtl.css +1 -1
- package/components/panel/panel-vars.less +7 -21
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.d.ts +2 -2
- package/components/panel/panel.js +0 -34
- package/components/panel/panel.lazy.js +1 -1
- package/components/panel/panel.less +56 -48
- package/components/panel/resizable-panel.js +2 -32
- package/components/panel/swipe-panel.js +16 -71
- package/components/photo-browser/photo-browser-class.js +41 -171
- package/components/photo-browser/photo-browser-rtl.css +1 -1
- package/components/photo-browser/photo-browser-vars.less +0 -3
- package/components/photo-browser/photo-browser.css +1 -1
- package/components/photo-browser/photo-browser.d.ts +2 -4
- package/components/photo-browser/photo-browser.js +1 -6
- package/components/photo-browser/photo-browser.lazy.js +1 -1
- package/components/photo-browser/photo-browser.less +0 -4
- package/components/picker/picker-class.js +26 -133
- package/components/picker/picker-column.js +11 -31
- package/components/picker/picker-ios.less +10 -0
- package/components/picker/picker-md.less +6 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker-vars.less +9 -25
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.js +0 -4
- package/components/picker/picker.lazy.js +1 -1
- package/components/picker/picker.less +0 -11
- package/components/pie-chart/pie-chart-class.js +8 -31
- package/components/pie-chart/pie-chart.js +0 -3
- package/components/pie-chart/pie-chart.less +0 -3
- package/components/popover/popover-class.js +72 -126
- package/components/popover/popover-ios.less +0 -50
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover-vars.less +6 -23
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +1 -12
- package/components/popover/popover.lazy.js +1 -1
- package/components/popover/popover.less +62 -5
- package/components/popup/popup-class.js +12 -78
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup-vars.less +7 -9
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +0 -4
- package/components/popup/popup.lazy.js +1 -1
- package/components/popup/popup.less +4 -4
- package/components/preloader/preloader-ios.less +3 -1
- package/components/preloader/preloader-md.less +5 -1
- package/components/preloader/preloader-rtl.css +1 -1
- package/components/preloader/preloader-vars.less +0 -6
- package/components/preloader/preloader.css +1 -1
- package/components/preloader/preloader.js +8 -25
- package/components/preloader/preloader.lazy.js +1 -1
- package/components/preloader/preloader.less +6 -3
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar-vars.less +2 -12
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +2 -31
- package/components/progressbar/progressbar.less +0 -3
- package/components/pull-to-refresh/pull-to-refresh-class.js +15 -107
- package/components/pull-to-refresh/pull-to-refresh-md.less +2 -1
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh-vars.less +0 -4
- package/components/pull-to-refresh/pull-to-refresh.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh.js +0 -8
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
- package/components/pull-to-refresh/pull-to-refresh.less +0 -3
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio-vars.less +0 -7
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.less +12 -5
- package/components/range/range-class.js +27 -112
- package/components/range/range-rtl.css +1 -1
- package/components/range/range-vars.less +10 -32
- package/components/range/range.css +1 -1
- package/components/range/range.js +0 -12
- package/components/range/range.less +0 -3
- package/components/searchbar/remove-diacritics.js +0 -4
- package/components/searchbar/searchbar-class.js +17 -138
- package/components/searchbar/searchbar-md.less +41 -16
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar-vars.less +25 -76
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.d.ts +2 -2
- package/components/searchbar/searchbar.js +0 -15
- package/components/searchbar/searchbar.lazy.js +1 -1
- package/components/searchbar/searchbar.less +14 -28
- package/components/sheet/sheet-class.js +15 -110
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet-vars.less +17 -6
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +0 -9
- package/components/sheet/sheet.lazy.js +1 -1
- package/components/sheet/sheet.less +10 -3
- package/components/skeleton/skeleton.less +1 -4
- package/components/smart-select/smart-select-class.js +36 -173
- package/components/smart-select/smart-select.d.ts +1 -3
- package/components/smart-select/smart-select.js +1 -14
- package/components/smart-select/smart-select.lazy.js +1 -1
- package/components/smart-select/smart-select.less +0 -3
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable-vars.less +8 -8
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +0 -44
- package/components/sortable/sortable.less +0 -3
- package/components/statusbar/statusbar.js +0 -36
- package/components/statusbar/statusbar.less +0 -3
- package/components/stepper/stepper-class.js +10 -83
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper-vars.less +12 -24
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +0 -12
- package/components/stepper/stepper.less +12 -23
- package/components/subnavbar/subnavbar-vars.less +3 -18
- package/components/subnavbar/subnavbar.js +0 -3
- package/components/subnavbar/subnavbar.less +1 -11
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout-vars.less +7 -6
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +2 -99
- package/components/swipeout/swipeout.less +2 -7
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +9 -30
- package/components/swiper/swiper.lazy.js +1 -1
- package/components/swiper/swiper.less +1 -16
- package/components/tabs/tabs-rtl.css +1 -1
- package/components/tabs/tabs.css +1 -1
- package/components/tabs/tabs.js +23 -60
- package/components/tabs/tabs.lazy.js +1 -1
- package/components/tabs/tabs.less +1 -3
- package/components/text-editor/text-editor-class.js +16 -102
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor-vars.less +12 -16
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +0 -8
- package/components/text-editor/text-editor.lazy.js +1 -1
- package/components/text-editor/text-editor.less +0 -6
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline-vars.less +13 -47
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.less +2 -9
- package/components/toast/toast-class.js +2 -16
- package/components/toast/toast-rtl.css +1 -1
- package/components/toast/toast-vars.less +5 -9
- package/components/toast/toast.css +1 -1
- package/components/toast/toast.js +0 -3
- package/components/toast/toast.less +0 -3
- package/components/toggle/toggle-class.js +6 -30
- package/components/toggle/toggle-ios.less +5 -1
- package/components/toggle/toggle-md.less +27 -11
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle-vars.less +19 -21
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +0 -8
- package/components/toggle/toggle.less +0 -4
- package/components/toolbar/toolbar-ios.less +2 -2
- package/components/toolbar/toolbar-md.less +28 -4
- package/components/toolbar/toolbar-vars.less +17 -52
- package/components/toolbar/toolbar.js +5 -43
- package/components/toolbar/toolbar.less +27 -45
- package/components/tooltip/tooltip-class.js +10 -64
- package/components/tooltip/tooltip-rtl.css +1 -1
- package/components/tooltip/tooltip-vars.less +12 -3
- package/components/tooltip/tooltip.css +1 -1
- package/components/tooltip/tooltip.js +0 -15
- package/components/tooltip/tooltip.less +0 -3
- package/components/touch-ripple/touch-ripple-class.js +0 -13
- package/components/touch-ripple/touch-ripple.js +0 -4
- package/components/touch-ripple/touch-ripple.less +1 -5
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview-vars.less +0 -3
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +2 -11
- package/components/treeview/treeview.lazy.js +1 -1
- package/components/treeview/treeview.less +0 -3
- package/components/typography/typography-rtl.css +1 -1
- package/components/typography/typography.css +1 -1
- package/components/typography/typography.less +25 -3
- package/components/view/resizable-view.js +2 -24
- package/components/view/view-class.js +28 -53
- package/components/view/view.d.ts +0 -14
- package/components/view/view.js +8 -32
- package/components/view/view.less +1 -4
- package/components/virtual-list/virtual-list-class.js +58 -146
- package/components/virtual-list/virtual-list.d.ts +1 -1
- package/components/virtual-list/virtual-list.js +0 -2
- package/components/virtual-list/virtual-list.lazy.js +1 -1
- package/components/virtual-list/virtual-list.less +0 -3
- package/framework7-bundle-rtl.css +3593 -5977
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +3591 -5978
- package/framework7-bundle.esm.js +4 -10
- package/framework7-bundle.js +6063 -12044
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -27
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +4 -10
- package/framework7-lite.esm.js +4 -6
- package/framework7-lite.js +31 -0
- package/framework7-rtl.css +803 -1591
- package/framework7-rtl.min.css +3 -3
- package/framework7-types.d.ts +1 -32
- package/framework7.css +803 -1594
- package/framework7.d.ts +1 -32
- package/framework7.esm.js +4 -6
- package/framework7.js +1770 -3407
- package/framework7.js.map +1 -1
- package/framework7.less +2 -23
- package/framework7.min.css +3 -3
- package/framework7.min.js +3 -3
- package/framework7.min.js.map +1 -1
- package/less/mixins.less +7 -88
- package/less/plugin.js +15 -0
- package/modules/clicks/clicks.js +10 -22
- package/modules/component/$h.js +0 -3
- package/modules/component/$jsx.js +0 -5
- package/modules/component/component-class.js +13 -66
- package/modules/component/component.d.ts +1 -2
- package/modules/component/component.js +0 -8
- package/modules/component/eventslisteners.js +12 -20
- package/modules/component/parse-component.js +18 -20
- package/modules/component/snabbdom/h.js +3 -12
- package/modules/component/snabbdom/helpers/attachto.js +9 -14
- package/modules/component/snabbdom/htmldomapi.js +0 -16
- package/modules/component/snabbdom/modules/attributes.js +7 -11
- package/modules/component/snabbdom/modules/class.js +4 -8
- package/modules/component/snabbdom/modules/dataset.js +3 -7
- package/modules/component/snabbdom/modules/eventlisteners.js +16 -22
- package/modules/component/snabbdom/modules/hero.js +4 -44
- package/modules/component/snabbdom/modules/props.js +5 -9
- package/modules/component/snabbdom/modules/style.js +13 -30
- package/modules/component/snabbdom/snabbdom.bundle.js +0 -6
- package/modules/component/snabbdom/snabbdom.js +13 -72
- package/modules/component/snabbdom/thunk.js +3 -11
- package/modules/component/snabbdom/tovnode.js +1 -6
- package/modules/component/vdom.js +4 -62
- package/modules/demo-module.js +0 -8
- package/modules/device/device.js +6 -11
- package/modules/history/history.js +0 -1
- package/modules/resize/resize.js +8 -11
- package/modules/router/async-component.js +0 -3
- package/modules/router/back.js +86 -275
- package/modules/router/clear-previous-history.js +5 -18
- package/modules/router/component-loader.js +4 -25
- package/modules/router/modal.js +16 -43
- package/modules/router/navigate.js +80 -249
- package/modules/router/process-route-queue.js +0 -12
- package/modules/router/redirect.js +0 -8
- package/modules/router/router-class.js +92 -315
- package/modules/router/router.d.ts +3 -5
- package/modules/router/router.js +0 -3
- package/modules/router/swipe-back.js +35 -139
- package/modules/router/tab.js +14 -43
- package/modules/service-worker/service-worker.js +0 -11
- package/modules/store/create-store.js +10 -29
- package/modules/touch/touch.d.ts +2 -4
- package/modules/touch/touch.js +13 -108
- package/package.json +4 -18
- package/shared/$jsx.js +0 -6
- package/shared/class.js +18 -43
- package/shared/constructor-methods.js +0 -11
- package/shared/events-class.js +0 -17
- package/shared/get-device.js +18 -34
- package/shared/get-support.js +2 -8
- package/shared/history.js +2 -30
- package/shared/material-color-utils.js +728 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +0 -18
- package/shared/utils.d.ts +0 -4
- package/shared/utils.js +191 -71
- package/components/accordion/accordion-aurora.less +0 -2
- package/components/actions/actions-aurora.less +0 -9
- package/components/app/app-aurora.less +0 -10
- package/components/appbar/appbar-aurora.less +0 -2
- package/components/appbar/appbar-ios.less +0 -2
- package/components/appbar/appbar-md.less +0 -2
- package/components/appbar/appbar-rtl.css +0 -1
- package/components/appbar/appbar-vars.less +0 -28
- package/components/appbar/appbar.css +0 -1
- package/components/appbar/appbar.d.ts +0 -14
- package/components/appbar/appbar.js +0 -3
- package/components/appbar/appbar.lazy.js +0 -1
- package/components/appbar/appbar.less +0 -106
- package/components/area-chart/area-chart-aurora.less +0 -2
- package/components/autocomplete/autocomplete-aurora.less +0 -17
- package/components/badge/badge-aurora.less +0 -2
- package/components/block/block-aurora.less +0 -2
- package/components/breadcrumbs/breadcrumbs-aurora.less +0 -2
- package/components/button/button-aurora.less +0 -25
- package/components/calendar/calendar-aurora.less +0 -2
- package/components/card/card-aurora.less +0 -2
- package/components/checkbox/checkbox-aurora.less +0 -39
- package/components/chip/chip-aurora.less +0 -14
- package/components/color-picker/color-picker-aurora.less +0 -2
- package/components/contacts-list/contacts-list-aurora.less +0 -2
- package/components/data-table/data-table-aurora.less +0 -64
- package/components/dialog/dialog-aurora.less +0 -112
- package/components/elevation/elevation-aurora.less +0 -2
- package/components/elevation/elevation-ios.less +0 -2
- package/components/elevation/elevation-md.less +0 -2
- package/components/elevation/elevation-rtl.css +0 -1
- package/components/elevation/elevation-vars.less +0 -51
- package/components/elevation/elevation.css +0 -1
- package/components/elevation/elevation.d.ts +0 -14
- package/components/elevation/elevation.js +0 -3
- package/components/elevation/elevation.lazy.js +0 -1
- package/components/elevation/elevation.less +0 -54
- package/components/fab/fab-aurora.less +0 -2
- package/components/form/form-aurora.less +0 -0
- package/components/gauge/gauge-aurora.less +0 -2
- package/components/grid/grid-aurora.less +0 -2
- package/components/icon/icon-aurora.less +0 -49
- package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
- package/components/input/input-aurora.less +0 -120
- package/components/lazy/lazy-aurora.less +0 -2
- package/components/lazy/lazy-ios.less +0 -2
- package/components/lazy/lazy-md.less +0 -2
- package/components/lazy/lazy-rtl.css +0 -1
- package/components/lazy/lazy.css +0 -1
- package/components/lazy/lazy.d.ts +0 -57
- package/components/lazy/lazy.js +0 -283
- package/components/lazy/lazy.lazy.js +0 -1
- package/components/lazy/lazy.less +0 -23
- package/components/link/link-aurora.less +0 -15
- package/components/list/list-aurora.less +0 -25
- package/components/list-index/list-index-aurora.less +0 -21
- package/components/login-screen/login-screen-aurora.less +0 -2
- package/components/menu/menu-aurora.less +0 -8
- package/components/menu/menu-ios.less +0 -2
- package/components/menu/menu-md.less +0 -2
- package/components/menu/menu-rtl.css +0 -1
- package/components/menu/menu-vars.less +0 -27
- package/components/menu/menu.css +0 -1
- package/components/menu/menu.d.ts +0 -32
- package/components/menu/menu.js +0 -87
- package/components/menu/menu.lazy.js +0 -1
- package/components/menu/menu.less +0 -232
- package/components/messagebar/messagebar-aurora.less +0 -53
- package/components/messages/messages-aurora.less +0 -137
- package/components/navbar/navbar-aurora.less +0 -70
- package/components/notification/notification-aurora.less +0 -59
- package/components/page/page-aurora.less +0 -49
- package/components/panel/panel-aurora.less +0 -2
- package/components/photo-browser/photo-browser-aurora.less +0 -2
- package/components/picker/picker-aurora.less +0 -2
- package/components/pie-chart/pie-chart-aurora.less +0 -2
- package/components/popover/popover-aurora.less +0 -56
- package/components/popup/popup-aurora.less +0 -2
- package/components/preloader/preloader-aurora.less +0 -53
- package/components/progressbar/progressbar-aurora.less +0 -72
- package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
- package/components/radio/radio-aurora.less +0 -86
- package/components/range/range-aurora.less +0 -9
- package/components/searchbar/searchbar-aurora.less +0 -86
- package/components/sheet/sheet-aurora.less +0 -2
- package/components/skeleton/skeleton-aurora.less +0 -2
- package/components/smart-select/smart-select-aurora.less +0 -2
- package/components/sortable/sortable-aurora.less +0 -7
- package/components/statusbar/statusbar-aurora.less +0 -2
- package/components/stepper/stepper-aurora.less +0 -32
- package/components/subnavbar/subnavbar-aurora.less +0 -51
- package/components/swipeout/swipeout-aurora.less +0 -2
- package/components/swiper/swiper-aurora.less +0 -2
- package/components/tabs/tabs-aurora.less +0 -2
- package/components/text-editor/text-editor-aurora.less +0 -9
- package/components/timeline/timeline-aurora.less +0 -7
- package/components/toast/toast-aurora.less +0 -64
- package/components/toggle/toggle-aurora.less +0 -26
- package/components/toolbar/toolbar-aurora.less +0 -43
- package/components/tooltip/tooltip-aurora.less +0 -2
- package/components/touch-ripple/touch-ripple-aurora.less +0 -2
- package/components/treeview/treeview-aurora.less +0 -31
- package/components/typography/typography-aurora.less +0 -2
- package/components/view/view-aurora.less +0 -2
- package/components/virtual-list/virtual-list-aurora.less +0 -2
- package/modules/request/request.d.ts +0 -15
- package/modules/request/request.js +0 -11
- package/postinstall.js +0 -3
- package/shared/request.d.ts +0 -115
- package/shared/request.js +0 -512
|
@@ -5,32 +5,26 @@ const Navbar = {
|
|
|
5
5
|
size(el) {
|
|
6
6
|
const app = this;
|
|
7
7
|
let $el = $(el);
|
|
8
|
-
|
|
9
8
|
if ($el.hasClass('navbars')) {
|
|
10
9
|
$el = $el.children('.navbar').each(navbarEl => {
|
|
11
10
|
app.navbar.size(navbarEl);
|
|
12
11
|
});
|
|
13
12
|
return;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
const $innerEl = $el.children('.navbar-inner');
|
|
17
15
|
if (!$innerEl.length) return;
|
|
18
16
|
const needCenterTitle = $innerEl.hasClass('navbar-inner-centered-title') || app.params.navbar[`${app.theme}CenterTitle`];
|
|
19
17
|
const needLeftTitle = app.theme === 'ios' && !app.params.navbar[`${app.theme}CenterTitle`];
|
|
20
18
|
if (!needCenterTitle && !needLeftTitle) return;
|
|
21
|
-
|
|
22
|
-
if ($el.hasClass('stacked') || $el.parents('.stacked').length > 0 || $el.parents('.tab:not(.tab-active)').length > 0 || $el.parents('.popup:not(.modal-in)').length > 0) {
|
|
19
|
+
if ($el.parents('.tab:not(.tab-active)').length > 0 || $el.parents('.popup:not(.modal-in)').length > 0) {
|
|
23
20
|
return;
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
if (app.theme !== 'ios' && app.params.navbar[`${app.theme}CenterTitle`]) {
|
|
27
23
|
$innerEl.addClass('navbar-inner-centered-title');
|
|
28
24
|
}
|
|
29
|
-
|
|
30
25
|
if (app.theme === 'ios' && !app.params.navbar.iosCenterTitle) {
|
|
31
26
|
$innerEl.addClass('navbar-inner-left-title');
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
const $viewEl = $el.parents('.view').eq(0);
|
|
35
29
|
const left = app.rtl ? $innerEl.children('.right') : $innerEl.children('.left');
|
|
36
30
|
const right = app.rtl ? $innerEl.children('.left') : $innerEl.children('.right');
|
|
@@ -48,65 +42,51 @@ const Navbar = {
|
|
|
48
42
|
const sliding = $innerEl.hasClass('sliding');
|
|
49
43
|
let router;
|
|
50
44
|
let dynamicNavbar;
|
|
51
|
-
|
|
52
45
|
if ($viewEl.length > 0 && $viewEl[0].f7View) {
|
|
53
46
|
router = $viewEl[0].f7View.router;
|
|
54
47
|
dynamicNavbar = router && router.dynamicNavbar;
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
let currLeft;
|
|
58
50
|
let diff;
|
|
59
|
-
|
|
60
51
|
if (noRight) {
|
|
61
52
|
currLeft = navbarInnerWidth - titleWidth;
|
|
62
53
|
}
|
|
63
|
-
|
|
64
54
|
if (noLeft) {
|
|
65
55
|
currLeft = 0;
|
|
66
56
|
}
|
|
67
|
-
|
|
68
57
|
if (!noLeft && !noRight) {
|
|
69
58
|
currLeft = (navbarInnerWidth - rightWidth - titleWidth + leftWidth) / 2;
|
|
70
59
|
}
|
|
71
|
-
|
|
72
60
|
let requiredLeft = (navbarInnerWidth - titleWidth) / 2;
|
|
73
|
-
|
|
74
61
|
if (navbarInnerWidth - leftWidth - rightWidth > titleWidth) {
|
|
75
62
|
if (requiredLeft < leftWidth) {
|
|
76
63
|
requiredLeft = leftWidth;
|
|
77
64
|
}
|
|
78
|
-
|
|
79
65
|
if (requiredLeft + titleWidth > navbarInnerWidth - rightWidth) {
|
|
80
66
|
requiredLeft = navbarInnerWidth - rightWidth - titleWidth;
|
|
81
67
|
}
|
|
82
|
-
|
|
83
68
|
diff = requiredLeft - currLeft;
|
|
84
69
|
} else {
|
|
85
70
|
diff = 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
71
|
+
}
|
|
88
72
|
|
|
73
|
+
// RTL inverter
|
|
89
74
|
const inverter = app.rtl ? -1 : 1;
|
|
90
|
-
|
|
91
75
|
if (dynamicNavbar && app.theme === 'ios') {
|
|
92
76
|
if (title.hasClass('sliding') || title.length > 0 && sliding) {
|
|
93
77
|
let titleLeftOffset = -(currLeft + diff) * inverter;
|
|
94
78
|
const titleRightOffset = (navbarInnerWidth - currLeft - diff - titleWidth) * inverter;
|
|
95
|
-
|
|
96
79
|
if (isPrevious) {
|
|
97
80
|
if (router && router.params.iosAnimateNavbarBackIcon) {
|
|
98
81
|
const activeNavbarBackLink = $el.parent().find('.navbar-current').children('.left.sliding').find('.back .icon ~ span');
|
|
99
|
-
|
|
100
82
|
if (activeNavbarBackLink.length > 0) {
|
|
101
83
|
titleLeftOffset += activeNavbarBackLink[0].offsetLeft;
|
|
102
84
|
}
|
|
103
85
|
}
|
|
104
86
|
}
|
|
105
|
-
|
|
106
87
|
title[0].f7NavbarLeftOffset = titleLeftOffset;
|
|
107
88
|
title[0].f7NavbarRightOffset = titleRightOffset;
|
|
108
89
|
}
|
|
109
|
-
|
|
110
90
|
if (!noLeft && (left.hasClass('sliding') || sliding)) {
|
|
111
91
|
if (app.rtl) {
|
|
112
92
|
left[0].f7NavbarLeftOffset = -(navbarInnerWidth - left[0].offsetWidth) / 2 * inverter;
|
|
@@ -114,7 +94,6 @@ const Navbar = {
|
|
|
114
94
|
} else {
|
|
115
95
|
left[0].f7NavbarLeftOffset = -leftWidth;
|
|
116
96
|
left[0].f7NavbarRightOffset = (navbarInnerWidth - left[0].offsetWidth) / 2;
|
|
117
|
-
|
|
118
97
|
if (router && router.params.iosAnimateNavbarBackIcon && left.find('.back .icon').length > 0) {
|
|
119
98
|
if (left.find('.back .icon ~ span').length) {
|
|
120
99
|
const leftOffset = left[0].f7NavbarLeftOffset;
|
|
@@ -127,7 +106,6 @@ const Navbar = {
|
|
|
127
106
|
}
|
|
128
107
|
}
|
|
129
108
|
}
|
|
130
|
-
|
|
131
109
|
if (!noRight && (right.hasClass('sliding') || sliding)) {
|
|
132
110
|
if (app.rtl) {
|
|
133
111
|
right[0].f7NavbarLeftOffset = -rightWidth * inverter;
|
|
@@ -137,14 +115,13 @@ const Navbar = {
|
|
|
137
115
|
right[0].f7NavbarRightOffset = rightWidth;
|
|
138
116
|
}
|
|
139
117
|
}
|
|
140
|
-
|
|
141
118
|
if (subnavbar.length && (subnavbar.hasClass('sliding') || sliding)) {
|
|
142
119
|
subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth;
|
|
143
120
|
subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset;
|
|
144
121
|
}
|
|
145
|
-
}
|
|
146
|
-
|
|
122
|
+
}
|
|
147
123
|
|
|
124
|
+
// Center title
|
|
148
125
|
if (needCenterTitle) {
|
|
149
126
|
let titleLeft = diff;
|
|
150
127
|
if (app.rtl && noLeft && noRight && title.length > 0) titleLeft = -titleLeft;
|
|
@@ -153,20 +130,16 @@ const Navbar = {
|
|
|
153
130
|
});
|
|
154
131
|
}
|
|
155
132
|
},
|
|
156
|
-
|
|
157
133
|
hide(el, animate, hideStatusbar, hideOnlyCurrent) {
|
|
158
134
|
if (animate === void 0) {
|
|
159
135
|
animate = true;
|
|
160
136
|
}
|
|
161
|
-
|
|
162
137
|
if (hideStatusbar === void 0) {
|
|
163
138
|
hideStatusbar = false;
|
|
164
139
|
}
|
|
165
|
-
|
|
166
140
|
if (hideOnlyCurrent === void 0) {
|
|
167
141
|
hideOnlyCurrent = false;
|
|
168
142
|
}
|
|
169
|
-
|
|
170
143
|
const app = this;
|
|
171
144
|
let $el = $(el);
|
|
172
145
|
const isDynamic = $el.hasClass('navbar') && $el.parent('.navbars').length && !hideOnlyCurrent;
|
|
@@ -175,20 +148,16 @@ const Navbar = {
|
|
|
175
148
|
if ($el.hasClass('navbar-hidden')) return;
|
|
176
149
|
let className = `navbar-hidden${animate ? ' navbar-transitioning' : ''}`;
|
|
177
150
|
const currentIsLarge = isDynamic ? $el.find('.navbar-current .title-large').length : $el.find('.title-large').length;
|
|
178
|
-
|
|
179
151
|
if (currentIsLarge) {
|
|
180
152
|
className += ' navbar-large-hidden';
|
|
181
153
|
}
|
|
182
|
-
|
|
183
154
|
if (hideStatusbar) {
|
|
184
155
|
className += ' navbar-hidden-statusbar';
|
|
185
156
|
}
|
|
186
|
-
|
|
187
157
|
$el.transitionEnd(() => {
|
|
188
158
|
$el.removeClass('navbar-transitioning');
|
|
189
159
|
});
|
|
190
160
|
$el.addClass(className);
|
|
191
|
-
|
|
192
161
|
if (isDynamic) {
|
|
193
162
|
$el.children('.navbar').each(subEl => {
|
|
194
163
|
$(subEl).trigger('navbar:hide');
|
|
@@ -199,36 +168,29 @@ const Navbar = {
|
|
|
199
168
|
app.emit('navbarHide', $el[0]);
|
|
200
169
|
}
|
|
201
170
|
},
|
|
202
|
-
|
|
203
171
|
show(el, animate, hideOnlyCurrent) {
|
|
204
172
|
if (el === void 0) {
|
|
205
173
|
el = '.navbar-hidden';
|
|
206
174
|
}
|
|
207
|
-
|
|
208
175
|
if (animate === void 0) {
|
|
209
176
|
animate = true;
|
|
210
177
|
}
|
|
211
|
-
|
|
212
178
|
if (hideOnlyCurrent === void 0) {
|
|
213
179
|
hideOnlyCurrent = false;
|
|
214
180
|
}
|
|
215
|
-
|
|
216
181
|
const app = this;
|
|
217
182
|
let $el = $(el);
|
|
218
183
|
const isDynamic = $el.hasClass('navbar') && $el.parent('.navbars').length && !hideOnlyCurrent;
|
|
219
184
|
if (isDynamic) $el = $el.parents('.navbars');
|
|
220
185
|
if (!$el.length) return;
|
|
221
186
|
if (!$el.hasClass('navbar-hidden')) return;
|
|
222
|
-
|
|
223
187
|
if (animate) {
|
|
224
188
|
$el.addClass('navbar-transitioning');
|
|
225
189
|
$el.transitionEnd(() => {
|
|
226
190
|
$el.removeClass('navbar-transitioning');
|
|
227
191
|
});
|
|
228
192
|
}
|
|
229
|
-
|
|
230
193
|
$el.removeClass('navbar-hidden navbar-large-hidden navbar-hidden-statusbar');
|
|
231
|
-
|
|
232
194
|
if (isDynamic) {
|
|
233
195
|
$el.children('.navbar').each(subEl => {
|
|
234
196
|
$(subEl).trigger('navbar:show');
|
|
@@ -239,12 +201,10 @@ const Navbar = {
|
|
|
239
201
|
app.emit('navbarShow', $el[0]);
|
|
240
202
|
}
|
|
241
203
|
},
|
|
242
|
-
|
|
243
204
|
getElByPage(page) {
|
|
244
205
|
let $pageEl;
|
|
245
206
|
let $navbarEl;
|
|
246
207
|
let pageData;
|
|
247
|
-
|
|
248
208
|
if (page.$navbarEl || page.$el) {
|
|
249
209
|
pageData = page;
|
|
250
210
|
$pageEl = page.$el;
|
|
@@ -252,24 +212,19 @@ const Navbar = {
|
|
|
252
212
|
$pageEl = $(page);
|
|
253
213
|
if ($pageEl.length > 0) pageData = $pageEl[0].f7Page;
|
|
254
214
|
}
|
|
255
|
-
|
|
256
215
|
if (pageData && pageData.$navbarEl && pageData.$navbarEl.length > 0) {
|
|
257
216
|
$navbarEl = pageData.$navbarEl;
|
|
258
217
|
} else if ($pageEl) {
|
|
259
218
|
$navbarEl = $pageEl.children('.navbar');
|
|
260
219
|
}
|
|
261
|
-
|
|
262
220
|
if (!$navbarEl || $navbarEl && $navbarEl.length === 0) return undefined;
|
|
263
221
|
return $navbarEl[0];
|
|
264
222
|
},
|
|
265
|
-
|
|
266
223
|
getPageByEl(navbarEl) {
|
|
267
224
|
const $navbarEl = $(navbarEl);
|
|
268
|
-
|
|
269
225
|
if ($navbarEl.parents('.page').length) {
|
|
270
226
|
return $navbarEl.parents('.page')[0];
|
|
271
227
|
}
|
|
272
|
-
|
|
273
228
|
let pageEl;
|
|
274
229
|
$navbarEl.parents('.view').find('.page').each(el => {
|
|
275
230
|
if (el && el.f7Page && el.f7Page.navbarEl && $navbarEl[0] === el.f7Page.navbarEl) {
|
|
@@ -278,23 +233,18 @@ const Navbar = {
|
|
|
278
233
|
});
|
|
279
234
|
return pageEl;
|
|
280
235
|
},
|
|
281
|
-
|
|
282
236
|
collapseLargeTitle(navbarEl) {
|
|
283
237
|
const app = this;
|
|
284
238
|
let $navbarEl = $(navbarEl);
|
|
285
|
-
|
|
286
239
|
if ($navbarEl.hasClass('navbars')) {
|
|
287
240
|
$navbarEl = $navbarEl.find('.navbar');
|
|
288
|
-
|
|
289
241
|
if ($navbarEl.length > 1) {
|
|
290
242
|
$navbarEl = $(navbarEl).find('.navbar-large.navbar-current');
|
|
291
243
|
}
|
|
292
|
-
|
|
293
244
|
if ($navbarEl.length > 1 || !$navbarEl.length) {
|
|
294
245
|
return;
|
|
295
246
|
}
|
|
296
247
|
}
|
|
297
|
-
|
|
298
248
|
const $pageEl = $(app.navbar.getPageByEl($navbarEl));
|
|
299
249
|
$navbarEl.addClass('navbar-large-collapsed');
|
|
300
250
|
$pageEl.eq(0).addClass('page-with-navbar-large-collapsed').trigger('page:navbarlargecollapsed');
|
|
@@ -302,23 +252,18 @@ const Navbar = {
|
|
|
302
252
|
$navbarEl.trigger('navbar:collapse');
|
|
303
253
|
app.emit('navbarCollapse', $navbarEl[0]);
|
|
304
254
|
},
|
|
305
|
-
|
|
306
255
|
expandLargeTitle(navbarEl) {
|
|
307
256
|
const app = this;
|
|
308
257
|
let $navbarEl = $(navbarEl);
|
|
309
|
-
|
|
310
258
|
if ($navbarEl.hasClass('navbars')) {
|
|
311
259
|
$navbarEl = $navbarEl.find('.navbar-large');
|
|
312
|
-
|
|
313
260
|
if ($navbarEl.length > 1) {
|
|
314
261
|
$navbarEl = $(navbarEl).find('.navbar-large.navbar-current');
|
|
315
262
|
}
|
|
316
|
-
|
|
317
263
|
if ($navbarEl.length > 1 || !$navbarEl.length) {
|
|
318
264
|
return;
|
|
319
265
|
}
|
|
320
266
|
}
|
|
321
|
-
|
|
322
267
|
const $pageEl = $(app.navbar.getPageByEl($navbarEl));
|
|
323
268
|
$navbarEl.removeClass('navbar-large-collapsed');
|
|
324
269
|
$pageEl.eq(0).removeClass('page-with-navbar-large-collapsed').trigger('page:navbarlargeexpanded');
|
|
@@ -326,30 +271,24 @@ const Navbar = {
|
|
|
326
271
|
$navbarEl.trigger('navbar:expand');
|
|
327
272
|
app.emit('navbarExpand', $navbarEl[0]);
|
|
328
273
|
},
|
|
329
|
-
|
|
330
274
|
toggleLargeTitle(navbarEl) {
|
|
331
275
|
const app = this;
|
|
332
276
|
let $navbarEl = $(navbarEl);
|
|
333
|
-
|
|
334
277
|
if ($navbarEl.hasClass('navbars')) {
|
|
335
278
|
$navbarEl = $navbarEl.find('.navbar-large');
|
|
336
|
-
|
|
337
279
|
if ($navbarEl.length > 1) {
|
|
338
280
|
$navbarEl = $(navbarEl).find('.navbar-large.navbar-current');
|
|
339
281
|
}
|
|
340
|
-
|
|
341
282
|
if ($navbarEl.length > 1 || !$navbarEl.length) {
|
|
342
283
|
return;
|
|
343
284
|
}
|
|
344
285
|
}
|
|
345
|
-
|
|
346
286
|
if ($navbarEl.hasClass('navbar-large-collapsed')) {
|
|
347
287
|
app.navbar.expandLargeTitle($navbarEl);
|
|
348
288
|
} else {
|
|
349
289
|
app.navbar.collapseLargeTitle($navbarEl);
|
|
350
290
|
}
|
|
351
291
|
},
|
|
352
|
-
|
|
353
292
|
initNavbarOnScroll(pageEl, navbarEl, needHide, needCollapse, needTransparent) {
|
|
354
293
|
const app = this;
|
|
355
294
|
const support = getSupport();
|
|
@@ -370,85 +309,70 @@ const Navbar = {
|
|
|
370
309
|
let navbarCollapsed;
|
|
371
310
|
let navbarTitleLargeHeight;
|
|
372
311
|
let navbarOffsetHeight;
|
|
373
|
-
|
|
374
312
|
if (needCollapse || needHide && isLarge) {
|
|
375
313
|
navbarTitleLargeHeight = $navbarEl.css('--f7-navbar-large-title-height');
|
|
376
|
-
|
|
377
314
|
if (navbarTitleLargeHeight && navbarTitleLargeHeight.indexOf('px') >= 0) {
|
|
378
315
|
navbarTitleLargeHeight = parseInt(navbarTitleLargeHeight, 10);
|
|
379
|
-
|
|
380
316
|
if (Number.isNaN(navbarTitleLargeHeight) && $titleLargeEl.length) {
|
|
381
317
|
navbarTitleLargeHeight = $titleLargeEl[0].offsetHeight;
|
|
382
318
|
} else if (Number.isNaN(navbarTitleLargeHeight)) {
|
|
383
|
-
if (app.theme === 'ios') navbarTitleLargeHeight = 52;else if (app.theme === 'md') navbarTitleLargeHeight =
|
|
319
|
+
if (app.theme === 'ios') navbarTitleLargeHeight = 52;else if (app.theme === 'md') navbarTitleLargeHeight = 88;
|
|
384
320
|
}
|
|
385
321
|
} else if ($titleLargeEl.length) {
|
|
386
322
|
navbarTitleLargeHeight = $titleLargeEl[0].offsetHeight;
|
|
387
323
|
} else {
|
|
388
324
|
// eslint-disable-next-line
|
|
389
|
-
if (app.theme === 'ios') navbarTitleLargeHeight = 52;else if (app.theme === 'md') navbarTitleLargeHeight =
|
|
325
|
+
if (app.theme === 'ios') navbarTitleLargeHeight = 52;else if (app.theme === 'md') navbarTitleLargeHeight = 88;
|
|
390
326
|
}
|
|
391
327
|
}
|
|
392
|
-
|
|
393
328
|
if (needHide && isLarge) {
|
|
394
329
|
navbarHideHeight += navbarTitleLargeHeight;
|
|
395
330
|
}
|
|
396
|
-
|
|
397
331
|
let scrollChanged;
|
|
398
332
|
let scrollContent;
|
|
399
333
|
let scrollTimeoutId;
|
|
400
334
|
let touchEndTimeoutId;
|
|
401
335
|
const touchSnapTimeout = 70;
|
|
402
336
|
const desktopSnapTimeout = 300;
|
|
403
|
-
|
|
404
337
|
function calcScrollableDistance() {
|
|
405
338
|
$pageEl.find('.page-content').each(pageContentEl => {
|
|
406
339
|
pageContentEl.f7ScrollableDistance = pageContentEl.scrollHeight - pageContentEl.offsetHeight;
|
|
407
340
|
});
|
|
408
341
|
}
|
|
409
|
-
|
|
410
342
|
function snapLargeNavbar() {
|
|
411
343
|
const inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');
|
|
412
344
|
if (inSearchbarExpanded) return;
|
|
413
345
|
if (!scrollContent || currentScrollTop < 0) return;
|
|
414
|
-
|
|
415
346
|
if (currentScrollTop >= navbarTitleLargeHeight / 2 && currentScrollTop < navbarTitleLargeHeight) {
|
|
416
347
|
$(scrollContent).scrollTop(navbarTitleLargeHeight, 100);
|
|
417
348
|
} else if (currentScrollTop < navbarTitleLargeHeight) {
|
|
418
349
|
$(scrollContent).scrollTop(0, 200);
|
|
419
350
|
}
|
|
420
351
|
}
|
|
421
|
-
|
|
422
352
|
function snapTransparentNavbar() {
|
|
423
353
|
const inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');
|
|
424
354
|
if (inSearchbarExpanded) return;
|
|
425
355
|
if (!scrollContent || currentScrollTop < 0) return;
|
|
426
|
-
|
|
427
356
|
if (currentScrollTop >= navbarOffsetHeight / 2 && currentScrollTop < navbarOffsetHeight) {
|
|
428
357
|
$(scrollContent).scrollTop(navbarOffsetHeight, 100);
|
|
429
358
|
} else if (currentScrollTop < navbarOffsetHeight) {
|
|
430
359
|
$(scrollContent).scrollTop(0, 200);
|
|
431
360
|
}
|
|
432
361
|
}
|
|
433
|
-
|
|
434
362
|
function handleNavbarTransparent() {
|
|
435
363
|
const isHidden = $navbarEl.hasClass('navbar-hidden') || $navbarEl.parent('.navbars').hasClass('navbar-hidden');
|
|
436
364
|
const inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');
|
|
437
365
|
if (inSearchbarExpanded || isHidden) return;
|
|
438
|
-
|
|
439
366
|
if (!navbarOffsetHeight) {
|
|
440
367
|
navbarOffsetHeight = navbarEl.offsetHeight;
|
|
441
368
|
}
|
|
442
|
-
|
|
443
369
|
let opacity = currentScrollTop / navbarOffsetHeight;
|
|
444
370
|
const notTransparent = $navbarEl.hasClass('navbar-transparent-visible');
|
|
445
371
|
opacity = Math.max(Math.min(opacity, 1), 0);
|
|
446
|
-
|
|
447
372
|
if (notTransparent && opacity === 1 || !notTransparent && opacity === 0) {
|
|
448
373
|
$navbarEl.find('.navbar-bg, .title').css('opacity', '');
|
|
449
374
|
return;
|
|
450
375
|
}
|
|
451
|
-
|
|
452
376
|
if (notTransparent && opacity === 0) {
|
|
453
377
|
$navbarEl.trigger('navbar:transparenthide');
|
|
454
378
|
app.emit('navbarTransparentHide', $navbarEl[0]);
|
|
@@ -456,7 +380,6 @@ const Navbar = {
|
|
|
456
380
|
$navbarEl.find('.navbar-bg, .title').css('opacity', '');
|
|
457
381
|
return;
|
|
458
382
|
}
|
|
459
|
-
|
|
460
383
|
if (!notTransparent && opacity === 1) {
|
|
461
384
|
$navbarEl.trigger('navbar:transparentshow');
|
|
462
385
|
app.emit('navbarTransparentShow', $navbarEl[0]);
|
|
@@ -464,9 +387,7 @@ const Navbar = {
|
|
|
464
387
|
$navbarEl.find('.navbar-bg, .title').css('opacity', '');
|
|
465
388
|
return;
|
|
466
389
|
}
|
|
467
|
-
|
|
468
390
|
$navbarEl.find('.navbar-bg, .title').css('opacity', opacity);
|
|
469
|
-
|
|
470
391
|
if (snapPageScrollToTransparentNavbar) {
|
|
471
392
|
if (!support.touch) {
|
|
472
393
|
clearTimeout(scrollTimeoutId);
|
|
@@ -484,10 +405,8 @@ const Navbar = {
|
|
|
484
405
|
}
|
|
485
406
|
}
|
|
486
407
|
}
|
|
487
|
-
|
|
488
408
|
let previousCollapseProgress = null;
|
|
489
409
|
let collapseProgress = null;
|
|
490
|
-
|
|
491
410
|
function handleLargeNavbarCollapse(pageContentEl) {
|
|
492
411
|
const isHidden = $navbarEl.hasClass('navbar-hidden') || $navbarEl.parent('.navbars').hasClass('navbar-hidden');
|
|
493
412
|
if (isHidden) return;
|
|
@@ -499,41 +418,35 @@ const Navbar = {
|
|
|
499
418
|
const inSearchbarExpanded = $navbarEl.hasClass('with-searchbar-expandable-enabled');
|
|
500
419
|
if (inSearchbarExpanded) return;
|
|
501
420
|
navbarCollapsed = $navbarEl.hasClass('navbar-large-collapsed');
|
|
502
|
-
|
|
421
|
+
const $bgEl = $navbarEl.find('.navbar-bg');
|
|
503
422
|
if (collapseProgress === 0 && navbarCollapsed) {
|
|
504
423
|
app.navbar.expandLargeTitle($navbarEl[0]);
|
|
505
424
|
} else if (collapseProgress === 1 && !navbarCollapsed) {
|
|
506
425
|
app.navbar.collapseLargeTitle($navbarEl[0]);
|
|
507
426
|
}
|
|
508
|
-
|
|
509
427
|
if (collapseProgress === 0 && navbarCollapsed || collapseProgress === 0 && previousCollapseWasInMiddle || collapseProgress === 1 && !navbarCollapsed || collapseProgress === 1 && previousCollapseWasInMiddle) {
|
|
510
428
|
if (app.theme === 'md') {
|
|
511
429
|
$navbarEl.find('.navbar-inner').css('overflow', '');
|
|
512
430
|
}
|
|
513
|
-
|
|
514
431
|
$navbarEl.find('.title').css('opacity', '');
|
|
515
432
|
$navbarEl.find('.title-large-text, .subnavbar').css('transform', '');
|
|
516
|
-
|
|
433
|
+
$navbarEl.find('.title-large-text').css('opacity', '');
|
|
517
434
|
if (isLargeTransparent) {
|
|
518
|
-
$
|
|
519
|
-
} else {
|
|
520
|
-
$navbarEl.find('.navbar-bg').css('transform', '');
|
|
435
|
+
$bgEl.css('opacity', '');
|
|
521
436
|
}
|
|
437
|
+
$bgEl.css('transform', '');
|
|
522
438
|
} else if (collapseProgress > 0 && collapseProgress < 1) {
|
|
523
439
|
if (app.theme === 'md') {
|
|
524
440
|
$navbarEl.find('.navbar-inner').css('overflow', 'visible');
|
|
525
441
|
}
|
|
526
|
-
|
|
527
|
-
$navbarEl.find('.title').css('opacity', collapseProgress);
|
|
442
|
+
$navbarEl.find('.title').css('opacity', -0.5 + collapseProgress * 1.5);
|
|
528
443
|
$navbarEl.find('.title-large-text, .subnavbar').css('transform', `translate3d(0px, ${-1 * collapseProgress * navbarTitleLargeHeight}px, 0)`);
|
|
529
|
-
|
|
444
|
+
$navbarEl.find('.title-large-text').css('opacity', 1 - collapseProgress * 2);
|
|
530
445
|
if (isLargeTransparent) {
|
|
531
|
-
$
|
|
532
|
-
} else {
|
|
533
|
-
$navbarEl.find('.navbar-bg').css('transform', `translate3d(0px, ${-1 * collapseProgress * navbarTitleLargeHeight}px, 0)`);
|
|
446
|
+
$bgEl.css('opacity', collapseProgress);
|
|
534
447
|
}
|
|
448
|
+
$bgEl.css('transform', `translate3d(0px, ${-1 * collapseProgress * navbarTitleLargeHeight}px, 0)`);
|
|
535
449
|
}
|
|
536
|
-
|
|
537
450
|
if (snapPageScrollToLargeTitle) {
|
|
538
451
|
if (!support.touch) {
|
|
539
452
|
clearTimeout(scrollTimeoutId);
|
|
@@ -551,14 +464,12 @@ const Navbar = {
|
|
|
551
464
|
}
|
|
552
465
|
}
|
|
553
466
|
}
|
|
554
|
-
|
|
555
467
|
function handleTitleHideShow() {
|
|
556
468
|
if ($pageEl.hasClass('page-with-card-opened')) return;
|
|
557
469
|
scrollHeight = scrollContent.scrollHeight;
|
|
558
470
|
offsetHeight = scrollContent.offsetHeight;
|
|
559
471
|
reachEnd = currentScrollTop + offsetHeight >= scrollHeight;
|
|
560
472
|
navbarHidden = $navbarEl.hasClass('navbar-hidden') || $navbarEl.parent('.navbars').hasClass('navbar-hidden');
|
|
561
|
-
|
|
562
473
|
if (reachEnd) {
|
|
563
474
|
if (app.params.navbar.showOnPageScrollEnd) {
|
|
564
475
|
action = 'show';
|
|
@@ -574,7 +485,6 @@ const Navbar = {
|
|
|
574
485
|
} else {
|
|
575
486
|
action = 'show';
|
|
576
487
|
}
|
|
577
|
-
|
|
578
488
|
if (action === 'show' && navbarHidden) {
|
|
579
489
|
app.navbar.show($navbarEl, true, true);
|
|
580
490
|
navbarHidden = false;
|
|
@@ -582,37 +492,28 @@ const Navbar = {
|
|
|
582
492
|
app.navbar.hide($navbarEl, true, false, true);
|
|
583
493
|
navbarHidden = true;
|
|
584
494
|
}
|
|
585
|
-
|
|
586
495
|
previousScrollTop = currentScrollTop;
|
|
587
496
|
}
|
|
588
|
-
|
|
589
497
|
function handleScroll(e) {
|
|
590
498
|
scrollContent = this;
|
|
591
|
-
|
|
592
499
|
if (e && e.target && e.target !== scrollContent) {
|
|
593
500
|
return;
|
|
594
501
|
}
|
|
595
|
-
|
|
596
502
|
currentScrollTop = scrollContent.scrollTop;
|
|
597
503
|
scrollChanged = currentScrollTop;
|
|
598
|
-
|
|
599
504
|
if (needCollapse) {
|
|
600
505
|
handleLargeNavbarCollapse(scrollContent);
|
|
601
506
|
} else if (needTransparent) {
|
|
602
507
|
handleNavbarTransparent();
|
|
603
508
|
}
|
|
604
|
-
|
|
605
509
|
if ($pageEl.hasClass('page-previous')) return;
|
|
606
|
-
|
|
607
510
|
if (needHide) {
|
|
608
511
|
handleTitleHideShow();
|
|
609
512
|
}
|
|
610
513
|
}
|
|
611
|
-
|
|
612
514
|
function handeTouchStart() {
|
|
613
515
|
scrollChanged = false;
|
|
614
516
|
}
|
|
615
|
-
|
|
616
517
|
function handleTouchEnd() {
|
|
617
518
|
clearTimeout(touchEndTimeoutId);
|
|
618
519
|
touchEndTimeoutId = null;
|
|
@@ -623,59 +524,47 @@ const Navbar = {
|
|
|
623
524
|
} else {
|
|
624
525
|
snapLargeNavbar();
|
|
625
526
|
}
|
|
626
|
-
|
|
627
527
|
clearTimeout(touchEndTimeoutId);
|
|
628
528
|
touchEndTimeoutId = null;
|
|
629
529
|
}
|
|
630
530
|
}, touchSnapTimeout);
|
|
631
531
|
}
|
|
632
|
-
|
|
633
532
|
$pageEl.on('scroll', '.page-content', handleScroll, true);
|
|
634
|
-
|
|
635
533
|
if (support.touch && (needCollapse && snapPageScrollToLargeTitle || needTransparent && snapPageScrollToTransparentNavbar)) {
|
|
636
534
|
app.on('touchstart:passive', handeTouchStart);
|
|
637
535
|
app.on('touchend:passive', handleTouchEnd);
|
|
638
536
|
}
|
|
639
|
-
|
|
640
537
|
calcScrollableDistance();
|
|
641
|
-
|
|
642
538
|
if (needCollapse || needTransparent) {
|
|
643
539
|
$pageEl.find('.page-content').each(pageContentEl => {
|
|
644
540
|
if (pageContentEl.scrollTop > 0) handleScroll.call(pageContentEl);
|
|
645
541
|
});
|
|
646
542
|
}
|
|
647
|
-
|
|
648
543
|
app.on('resize', calcScrollableDistance);
|
|
649
|
-
|
|
650
544
|
$pageEl[0].f7DetachNavbarScrollHandlers = function f7DetachNavbarScrollHandlers() {
|
|
651
545
|
app.off('resize', calcScrollableDistance);
|
|
652
546
|
delete $pageEl[0].f7DetachNavbarScrollHandlers;
|
|
653
547
|
$pageEl.off('scroll', '.page-content', handleScroll, true);
|
|
654
|
-
|
|
655
548
|
if (support.touch && (needCollapse && snapPageScrollToLargeTitle || needTransparent && snapPageScrollToTransparentNavbar)) {
|
|
656
549
|
app.off('touchstart:passive', handeTouchStart);
|
|
657
550
|
app.off('touchend:passive', handleTouchEnd);
|
|
658
551
|
}
|
|
659
552
|
};
|
|
660
553
|
}
|
|
661
|
-
|
|
662
554
|
};
|
|
663
555
|
export default {
|
|
664
556
|
name: 'navbar',
|
|
665
|
-
|
|
666
557
|
create() {
|
|
667
558
|
const app = this;
|
|
668
559
|
bindMethods(app, {
|
|
669
560
|
navbar: Navbar
|
|
670
561
|
});
|
|
671
562
|
},
|
|
672
|
-
|
|
673
563
|
params: {
|
|
674
564
|
navbar: {
|
|
675
565
|
scrollTopOnTitleClick: true,
|
|
676
566
|
iosCenterTitle: true,
|
|
677
567
|
mdCenterTitle: false,
|
|
678
|
-
auroraCenterTitle: true,
|
|
679
568
|
hideOnPageScroll: false,
|
|
680
569
|
showOnPageScrollEnd: true,
|
|
681
570
|
showOnPageScrollTop: true,
|
|
@@ -691,26 +580,22 @@ export default {
|
|
|
691
580
|
app.navbar.size(navbarEl);
|
|
692
581
|
});
|
|
693
582
|
},
|
|
694
|
-
|
|
695
583
|
pageBeforeRemove(page) {
|
|
696
584
|
if (page.$el[0].f7DetachNavbarScrollHandlers) {
|
|
697
585
|
page.$el[0].f7DetachNavbarScrollHandlers();
|
|
698
586
|
}
|
|
699
587
|
},
|
|
700
|
-
|
|
701
588
|
pageBeforeIn(page) {
|
|
702
589
|
const app = this;
|
|
703
590
|
if (app.theme !== 'ios') return;
|
|
704
591
|
let $navbarsEl;
|
|
705
592
|
const view = page.$el.parents('.view')[0].f7View;
|
|
706
593
|
const navbarEl = app.navbar.getElByPage(page);
|
|
707
|
-
|
|
708
594
|
if (!navbarEl) {
|
|
709
595
|
$navbarsEl = page.$el.parents('.view').children('.navbars');
|
|
710
596
|
} else {
|
|
711
597
|
$navbarsEl = $(navbarEl).parents('.navbars');
|
|
712
598
|
}
|
|
713
|
-
|
|
714
599
|
if (page.$el.hasClass('no-navbar') || view.router.dynamicNavbar && !navbarEl) {
|
|
715
600
|
const animate = !!(page.pageFrom && page.router.history.length > 0);
|
|
716
601
|
app.navbar.hide($navbarsEl, animate);
|
|
@@ -718,42 +603,38 @@ export default {
|
|
|
718
603
|
app.navbar.show($navbarsEl);
|
|
719
604
|
}
|
|
720
605
|
},
|
|
721
|
-
|
|
722
606
|
pageReinit(page) {
|
|
723
607
|
const app = this;
|
|
724
608
|
const $navbarEl = $(app.navbar.getElByPage(page));
|
|
725
609
|
if (!$navbarEl || $navbarEl.length === 0) return;
|
|
726
610
|
app.navbar.size($navbarEl);
|
|
727
611
|
},
|
|
728
|
-
|
|
729
612
|
pageInit(page) {
|
|
730
613
|
const app = this;
|
|
731
614
|
const $navbarEl = $(app.navbar.getElByPage(page));
|
|
732
|
-
if (!$navbarEl || $navbarEl.length === 0) return;
|
|
615
|
+
if (!$navbarEl || $navbarEl.length === 0) return;
|
|
733
616
|
|
|
734
|
-
|
|
617
|
+
// Size
|
|
618
|
+
app.navbar.size($navbarEl);
|
|
735
619
|
|
|
620
|
+
// Need Collapse On Scroll
|
|
736
621
|
let needCollapseOnScrollHandler;
|
|
737
|
-
|
|
738
622
|
if ($navbarEl.find('.title-large').length > 0) {
|
|
739
623
|
$navbarEl.addClass('navbar-large');
|
|
740
624
|
}
|
|
741
|
-
|
|
742
625
|
if ($navbarEl.hasClass('navbar-large')) {
|
|
743
626
|
if (app.params.navbar.collapseLargeTitleOnScroll) needCollapseOnScrollHandler = true;
|
|
744
627
|
page.$el.addClass('page-with-navbar-large');
|
|
745
|
-
}
|
|
746
|
-
|
|
628
|
+
}
|
|
747
629
|
|
|
630
|
+
// Need transparent on scroll
|
|
748
631
|
let needTransparentOnScroll;
|
|
749
|
-
|
|
750
632
|
if (!needCollapseOnScrollHandler && $navbarEl.hasClass('navbar-transparent')) {
|
|
751
633
|
needTransparentOnScroll = true;
|
|
752
|
-
}
|
|
753
|
-
|
|
634
|
+
}
|
|
754
635
|
|
|
636
|
+
// Need Hide On Scroll
|
|
755
637
|
let needHideOnScrollHandler;
|
|
756
|
-
|
|
757
638
|
if (app.params.navbar.hideOnPageScroll || page.$el.find('.hide-navbar-on-scroll').length || page.$el.hasClass('hide-navbar-on-scroll') || page.$el.find('.hide-bars-on-scroll').length || page.$el.hasClass('hide-bars-on-scroll')) {
|
|
758
639
|
if (page.$el.find('.keep-navbar-on-scroll').length || page.$el.hasClass('keep-navbar-on-scroll') || page.$el.find('.keep-bars-on-scroll').length || page.$el.hasClass('keep-bars-on-scroll')) {
|
|
759
640
|
needHideOnScrollHandler = false;
|
|
@@ -761,70 +642,61 @@ export default {
|
|
|
761
642
|
needHideOnScrollHandler = true;
|
|
762
643
|
}
|
|
763
644
|
}
|
|
764
|
-
|
|
765
645
|
if (needCollapseOnScrollHandler || needHideOnScrollHandler || needTransparentOnScroll) {
|
|
766
646
|
app.navbar.initNavbarOnScroll(page.el, $navbarEl[0], needHideOnScrollHandler, needCollapseOnScrollHandler, needTransparentOnScroll);
|
|
767
647
|
}
|
|
768
648
|
},
|
|
769
|
-
|
|
770
649
|
'panelOpen panelSwipeOpen modalOpen': function onPanelModalOpen(instance) {
|
|
771
650
|
const app = this;
|
|
772
|
-
instance.$el.find('.navbar:not(.navbar-previous)
|
|
651
|
+
instance.$el.find('.navbar:not(.navbar-previous)').each(navbarEl => {
|
|
773
652
|
app.navbar.size(navbarEl);
|
|
774
653
|
});
|
|
775
654
|
},
|
|
776
|
-
|
|
777
655
|
tabShow(tabEl) {
|
|
778
656
|
const app = this;
|
|
779
|
-
$(tabEl).find('.navbar:not(.navbar-previous)
|
|
657
|
+
$(tabEl).find('.navbar:not(.navbar-previous)').each(navbarEl => {
|
|
780
658
|
app.navbar.size(navbarEl);
|
|
781
659
|
});
|
|
782
660
|
}
|
|
783
|
-
|
|
784
661
|
},
|
|
785
662
|
clicks: {
|
|
786
663
|
'.navbar .title': function onTitleClick($clickedEl, clickedData, e) {
|
|
787
664
|
const app = this;
|
|
788
665
|
if (!app.params.navbar.scrollTopOnTitleClick) return;
|
|
789
|
-
|
|
790
666
|
if ($(e.target).closest('a, button').length > 0) {
|
|
791
667
|
return;
|
|
792
668
|
}
|
|
669
|
+
let $pageContentEl;
|
|
793
670
|
|
|
794
|
-
|
|
795
|
-
|
|
671
|
+
// Find active page
|
|
796
672
|
const $navbarEl = $clickedEl.parents('.navbar');
|
|
797
|
-
const $navbarsEl = $navbarEl.parents('.navbars');
|
|
673
|
+
const $navbarsEl = $navbarEl.parents('.navbars');
|
|
798
674
|
|
|
675
|
+
// Static Layout
|
|
799
676
|
$pageContentEl = $navbarEl.parents('.page-content');
|
|
800
|
-
|
|
801
677
|
if ($pageContentEl.length === 0) {
|
|
802
678
|
// Fixed Layout
|
|
803
679
|
if ($navbarEl.parents('.page').length > 0) {
|
|
804
680
|
$pageContentEl = $navbarEl.parents('.page').find('.page-content');
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
|
|
681
|
+
}
|
|
682
|
+
// Through Layout iOS
|
|
808
683
|
if ($pageContentEl.length === 0 && $navbarsEl.length) {
|
|
809
|
-
if ($navbarsEl.nextAll('.page-current
|
|
810
|
-
$pageContentEl = $navbarsEl.nextAll('.page-current
|
|
684
|
+
if ($navbarsEl.nextAll('.page-current').length > 0) {
|
|
685
|
+
$pageContentEl = $navbarsEl.nextAll('.page-current').find('.page-content');
|
|
811
686
|
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
|
|
687
|
+
}
|
|
688
|
+
// Through Layout
|
|
815
689
|
if ($pageContentEl.length === 0) {
|
|
816
|
-
if ($navbarEl.nextAll('.page-current
|
|
817
|
-
$pageContentEl = $navbarEl.nextAll('.page-current
|
|
690
|
+
if ($navbarEl.nextAll('.page-current').length > 0) {
|
|
691
|
+
$pageContentEl = $navbarEl.nextAll('.page-current').find('.page-content');
|
|
818
692
|
}
|
|
819
693
|
}
|
|
820
694
|
}
|
|
821
|
-
|
|
822
695
|
if ($pageContentEl && $pageContentEl.length > 0) {
|
|
823
696
|
// Check for tab
|
|
824
697
|
if ($pageContentEl.hasClass('tab')) {
|
|
825
698
|
$pageContentEl = $pageContentEl.parent('.tabs').children('.page-content.tab-active');
|
|
826
699
|
}
|
|
827
|
-
|
|
828
700
|
if ($pageContentEl.length > 0) $pageContentEl.scrollTop(0, 300);
|
|
829
701
|
}
|
|
830
702
|
}
|
|
@@ -835,7 +707,6 @@ export default {
|
|
|
835
707
|
const app = this;
|
|
836
708
|
app.navbar.size(vnode.elm);
|
|
837
709
|
}
|
|
838
|
-
|
|
839
710
|
}
|
|
840
711
|
}
|
|
841
712
|
};
|