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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import $ from '../../shared/dom7.js';
|
|
2
|
-
import { bindMethods, iosPreloaderContent, mdPreloaderContent
|
|
2
|
+
import { bindMethods, iosPreloaderContent, mdPreloaderContent } from '../../shared/utils.js';
|
|
3
3
|
const Treeview = {
|
|
4
4
|
open(itemEl) {
|
|
5
5
|
const app = this;
|
|
@@ -8,7 +8,6 @@ const Treeview = {
|
|
|
8
8
|
$itemEl.addClass('treeview-item-opened');
|
|
9
9
|
$itemEl.trigger('treeview:open');
|
|
10
10
|
app.emit('treeviewOpen', $itemEl[0]);
|
|
11
|
-
|
|
12
11
|
function done(cancel) {
|
|
13
12
|
if (cancel) {
|
|
14
13
|
$itemEl.removeClass('treeview-item-opened');
|
|
@@ -17,16 +16,13 @@ const Treeview = {
|
|
|
17
16
|
} else {
|
|
18
17
|
$itemEl[0].f7TreeviewChildrenLoaded = true;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
$itemEl.find('.treeview-toggle').removeClass('treeview-toggle-hidden');
|
|
22
20
|
$itemEl.find('.treeview-preloader').remove();
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
if ($itemEl.hasClass('treeview-load-children') && !$itemEl[0].f7TreeviewChildrenLoaded) {
|
|
26
23
|
const preloaders = {
|
|
27
24
|
iosPreloaderContent,
|
|
28
|
-
mdPreloaderContent
|
|
29
|
-
auroraPreloaderContent
|
|
25
|
+
mdPreloaderContent
|
|
30
26
|
};
|
|
31
27
|
$itemEl.trigger('treeview:loadchildren', done);
|
|
32
28
|
app.emit('treeviewLoadChildren', $itemEl[0], done);
|
|
@@ -34,7 +30,6 @@ const Treeview = {
|
|
|
34
30
|
$itemEl.find('.treeview-item-root').prepend(`<div class="preloader treeview-preloader">${preloaders[`${app.theme}PreloaderContent`]}</div>`);
|
|
35
31
|
}
|
|
36
32
|
},
|
|
37
|
-
|
|
38
33
|
close(itemEl) {
|
|
39
34
|
const app = this;
|
|
40
35
|
const $itemEl = $(itemEl).eq(0);
|
|
@@ -43,7 +38,6 @@ const Treeview = {
|
|
|
43
38
|
$itemEl.trigger('treeview:close');
|
|
44
39
|
app.emit('treeviewClose', $itemEl[0]);
|
|
45
40
|
},
|
|
46
|
-
|
|
47
41
|
toggle(itemEl) {
|
|
48
42
|
const app = this;
|
|
49
43
|
const $itemEl = $(itemEl).eq(0);
|
|
@@ -51,18 +45,15 @@ const Treeview = {
|
|
|
51
45
|
const wasOpened = $itemEl.hasClass('treeview-item-opened');
|
|
52
46
|
app.treeview[wasOpened ? 'close' : 'open']($itemEl);
|
|
53
47
|
}
|
|
54
|
-
|
|
55
48
|
};
|
|
56
49
|
export default {
|
|
57
50
|
name: 'treeview',
|
|
58
|
-
|
|
59
51
|
create() {
|
|
60
52
|
const app = this;
|
|
61
53
|
bindMethods(app, {
|
|
62
54
|
treeview: Treeview
|
|
63
55
|
});
|
|
64
56
|
},
|
|
65
|
-
|
|
66
57
|
clicks: {
|
|
67
58
|
'.treeview-toggle': function toggle($clickedEl, clickedData, e) {
|
|
68
59
|
const app = this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);var r=e.$,
|
|
1
|
+
(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);var r=e.$,i=e.utils,o=(e.getDevice,e.getSupport,e.Class,e.Modal,e.ConstructorMethods,e.ModalMethods,e.$jsx,i.iosPreloaderContent),n=i.mdPreloaderContent,s=i.bindMethods;const l={open(e){const t=this,i=r(e).eq(0);if(i.length&&(i.addClass("treeview-item-opened"),i.trigger("treeview:open"),t.emit("treeviewOpen",i[0]),i.hasClass("treeview-load-children")&&!i[0].f7TreeviewChildrenLoaded)){const e={iosPreloaderContent:o,mdPreloaderContent:n};i.trigger("treeview:loadchildren",s),t.emit("treeviewLoadChildren",i[0],s),i.find(".treeview-toggle").addClass("treeview-toggle-hidden"),i.find(".treeview-item-root").prepend(`<div class="preloader treeview-preloader">${e[`${t.theme}PreloaderContent`]}</div>`)}function s(e){e?(i.removeClass("treeview-item-opened"),i.trigger("treeview:close"),t.emit("treeviewClose",i[0])):i[0].f7TreeviewChildrenLoaded=!0,i.find(".treeview-toggle").removeClass("treeview-toggle-hidden"),i.find(".treeview-preloader").remove()}},close(e){const t=r(e).eq(0);t.length&&(t.removeClass("treeview-item-opened"),t.trigger("treeview:close"),this.emit("treeviewClose",t[0]))},toggle(e){const t=r(e).eq(0);if(!t.length)return;const i=t.hasClass("treeview-item-opened");this.treeview[i?"close":"open"](t)}};var d={name:"treeview",create(){s(this,{treeview:l})},clicks:{".treeview-toggle":function(e,t,r){if(e.parents(".treeview-item-toggle").length)return;const i=e.parents(".treeview-item").eq(0);i.length&&(r.preventF7Router=!0,this.treeview.toggle(i[0]))},".treeview-item-toggle":function(e,t,r){const i=e.closest(".treeview-item").eq(0);i.length&&(r.preventF7Router=!0,this.treeview.toggle(i[0]))}}};if(t){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))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-typography-padding:16px;--f7-typography-margin:16px}.display-flex{display:flex!important}.display-block{display:block!important}.display-inline-flex{display:inline-flex!important}.display-inline-block{display:inline-block!important}.display-inline{display:inline!important}.display-none{display:none!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-shrink-2{flex-shrink:2!important}.flex-shrink-3{flex-shrink:3!important}.flex-shrink-4{flex-shrink:4!important}.flex-shrink-5{flex-shrink:5!important}.flex-shrink-6{flex-shrink:6!important}.flex-shrink-7{flex-shrink:7!important}.flex-shrink-8{flex-shrink:8!important}.flex-shrink-9{flex-shrink:9!important}.flex-shrink-10{flex-shrink:10!important}.flex-direction-row{flex-direction:row!important}.flex-direction-row-reverse{flex-direction:row-reverse!important}.flex-direction-column{flex-direction:column!important}.flex-direction-column-reverse{flex-direction:column-reverse!important}.justify-content-flex-start{justify-content:flex-start!important}.justify-content-center{justify-content:center!important}.justify-content-flex-end{justify-content:flex-end!important}.justify-content-space-between{justify-content:space-between!important}.justify-content-space-around{justify-content:space-around!important}.justify-content-space-evenly{justify-content:space-evenly!important}.justify-content-stretch{justify-content:stretch!important}.justify-content-start{justify-content:start!important}.justify-content-end{justify-content:end!important}.justify-content-left{justify-content:left!important}.justify-content-right{justify-content:right!important}.align-content-flex-start{align-content:flex-start!important}.align-content-flex-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-space-between{align-content:space-between!important}.align-content-space-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-items-baseline{align-items:baseline!important}.align-items-flex-start{align-items:flex-start!important}.align-items-flex-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-stretch{align-items:stretch!important}.align-self-flex-start{align-self:flex-start!important}.align-self-flex-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-stretch{align-self:stretch!important}.text-align-left{text-align:left!important}.text-align-center{text-align:center!important}.text-align-right{text-align:right!important}.text-align-justify{text-align:justify!important}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}.vertical-align-bottom{vertical-align:bottom!important}.vertical-align-middle{vertical-align:middle!important}.vertical-align-top{vertical-align:top!important}.no-padding{padding:0!important}.no-padding-left{padding-left:0!important}.no-padding-right{padding-right:0!important}.no-padding-horizontal{padding-left:0!important;padding-right:0!important}.no-padding-top{padding-top:0!important}.no-padding-bottom{padding-bottom:0!important}.no-padding-vertical{padding-top:0!important;padding-bottom:0!important}.no-margin{margin:0!important}.no-margin-left{margin-left:0!important}.no-margin-right{margin-right:0!important}.no-margin-horizontal{margin-left:0!important;margin-right:0!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.no-margin-vertical{margin-top:0!important;margin-bottom:0!important}.width-auto{width:auto!important}.width-100{width:100%!important}.padding{padding:var(--f7-typography-padding)!important}.padding-half{padding:calc(var(--f7-typography-padding)/ 2)!important}.padding-top{padding-top:var(--f7-typography-padding)!important}.padding-top-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important}.padding-bottom{padding-bottom:var(--f7-typography-padding)!important}.padding-bottom-half{padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-left{padding-left:var(--f7-typography-padding)!important}.padding-left-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important}.padding-right{padding-right:var(--f7-typography-padding)!important}.padding-right-half{padding-right:calc(var(--f7-typography-padding)/ 2)!important}.padding-vertical{padding-top:var(--f7-typography-padding)!important;padding-bottom:var(--f7-typography-padding)!important}.padding-vertical-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important;padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-horizontal{padding-left:var(--f7-typography-padding)!important;padding-right:var(--f7-typography-padding)!important}.padding-horizontal-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important;padding-right:calc(var(--f7-typography-padding)/ 2)!important}.margin{margin:var(--f7-typography-margin)!important}.margin-half{margin:calc(var(--f7-typography-margin)/ 2)!important}.margin-top{margin-top:var(--f7-typography-margin)!important}.margin-top-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important}.margin-bottom{margin-bottom:var(--f7-typography-margin)!important}.margin-bottom-half{margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-left{margin-left:var(--f7-typography-margin)!important}.margin-left-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important}.margin-right{margin-right:var(--f7-typography-margin)!important}.margin-right-half{margin-right:calc(var(--f7-typography-margin)/ 2)!important}.margin-vertical{margin-top:var(--f7-typography-margin)!important;margin-bottom:var(--f7-typography-margin)!important}.margin-vertical-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important;margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-horizontal{margin-left:var(--f7-typography-margin)!important;margin-right:var(--f7-typography-margin)!important}.margin-horizontal-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important;margin-right:calc(var(--f7-typography-margin)/ 2)!important}[class*=text-color-]{color:var(--f7-theme-color-text-color)!important}[class*=bg-color-]{background-color:var(--f7-theme-color-bg-color)!important}[class*=border-color-]{border-color:var(--f7-theme-color-border-color)!important}
|
|
1
|
+
:root{--f7-typography-padding:16px;--f7-typography-margin:16px}.display-flex{display:flex!important}.display-block{display:block!important}.display-inline-flex{display:inline-flex!important}.display-inline-block{display:inline-block!important}.display-inline{display:inline!important}.display-none{display:none!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-shrink-2{flex-shrink:2!important}.flex-shrink-3{flex-shrink:3!important}.flex-shrink-4{flex-shrink:4!important}.flex-shrink-5{flex-shrink:5!important}.flex-shrink-6{flex-shrink:6!important}.flex-shrink-7{flex-shrink:7!important}.flex-shrink-8{flex-shrink:8!important}.flex-shrink-9{flex-shrink:9!important}.flex-shrink-10{flex-shrink:10!important}.flex-direction-row{flex-direction:row!important}.flex-direction-row-reverse{flex-direction:row-reverse!important}.flex-direction-column{flex-direction:column!important}.flex-direction-column-reverse{flex-direction:column-reverse!important}.justify-content-flex-start{justify-content:flex-start!important}.justify-content-center{justify-content:center!important}.justify-content-flex-end{justify-content:flex-end!important}.justify-content-space-between{justify-content:space-between!important}.justify-content-space-around{justify-content:space-around!important}.justify-content-space-evenly{justify-content:space-evenly!important}.justify-content-stretch{justify-content:stretch!important}.justify-content-start{justify-content:start!important}.justify-content-end{justify-content:end!important}.justify-content-left{justify-content:left!important}.justify-content-right{justify-content:right!important}.align-content-flex-start{align-content:flex-start!important}.align-content-flex-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-space-between{align-content:space-between!important}.align-content-space-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-items-baseline{align-items:baseline!important}.align-items-flex-start{align-items:flex-start!important}.align-items-flex-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-stretch{align-items:stretch!important}.align-self-flex-start{align-self:flex-start!important}.align-self-flex-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-stretch{align-self:stretch!important}.text-align-left{text-align:left!important}.text-align-center{text-align:center!important}.text-align-right{text-align:right!important}.text-align-justify{text-align:justify!important}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}.vertical-align-bottom{vertical-align:bottom!important}.vertical-align-middle{vertical-align:middle!important}.vertical-align-top{vertical-align:top!important}.no-padding{padding:0!important}.no-padding-left{padding-left:0!important}.no-padding-right{padding-right:0!important}.no-padding-horizontal{padding-left:0!important;padding-right:0!important}.no-padding-top{padding-top:0!important}.no-padding-bottom{padding-bottom:0!important}.no-padding-vertical{padding-top:0!important;padding-bottom:0!important}.no-margin{margin:0!important}.no-margin-left{margin-left:0!important}.no-margin-right{margin-right:0!important}.no-margin-horizontal{margin-left:0!important;margin-right:0!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.no-margin-vertical{margin-top:0!important;margin-bottom:0!important}.width-auto{width:auto!important}.width-100{width:100%!important}.padding{padding:var(--f7-typography-padding)!important}.padding-half{padding:calc(var(--f7-typography-padding)/ 2)!important}.padding-top{padding-top:var(--f7-typography-padding)!important}.padding-top-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important}.padding-bottom{padding-bottom:var(--f7-typography-padding)!important}.padding-bottom-half{padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-left{padding-left:var(--f7-typography-padding)!important}.padding-left-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important}.padding-right{padding-right:var(--f7-typography-padding)!important}.padding-right-half{padding-right:calc(var(--f7-typography-padding)/ 2)!important}.padding-vertical{padding-top:var(--f7-typography-padding)!important;padding-bottom:var(--f7-typography-padding)!important}.padding-vertical-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important;padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-horizontal{padding-left:var(--f7-typography-padding)!important;padding-right:var(--f7-typography-padding)!important}.padding-horizontal-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important;padding-right:calc(var(--f7-typography-padding)/ 2)!important}.margin{margin:var(--f7-typography-margin)!important}.margin-half{margin:calc(var(--f7-typography-margin)/ 2)!important}.margin-top{margin-top:var(--f7-typography-margin)!important}.margin-top-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important}.margin-bottom{margin-bottom:var(--f7-typography-margin)!important}.margin-bottom-half{margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-left{margin-left:var(--f7-typography-margin)!important}.margin-left-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important}.margin-right{margin-right:var(--f7-typography-margin)!important}.margin-right-half{margin-right:calc(var(--f7-typography-margin)/ 2)!important}.margin-vertical{margin-top:var(--f7-typography-margin)!important;margin-bottom:var(--f7-typography-margin)!important}.margin-vertical-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important;margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-horizontal{margin-left:var(--f7-typography-margin)!important;margin-right:var(--f7-typography-margin)!important}.margin-horizontal-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important;margin-right:calc(var(--f7-typography-margin)/ 2)!important}[class*=text-color-]{color:var(--f7-theme-color-text-color)!important}[class*=bg-color-]{background-color:var(--f7-theme-color-bg-color)!important}[class*=border-color-]{border-color:var(--f7-theme-color-border-color)!important}.ios .no-hairlines-ios ul:after,.ios .no-hairlines-ios ul:before,.ios .no-hairlines-ios:after,.ios .no-hairlines-ios:before,.md .no-hairlines-md ul:after,.md .no-hairlines-md ul:before,.md .no-hairlines-md:after,.md .no-hairlines-md:before,.no-hairlines ul:after,.no-hairlines ul:before,.no-hairlines:after,.no-hairlines:before{display:none!important}.ios .no-hairline-top-ios ul:before,.ios .no-hairline-top-ios:before,.md .no-hairline-top-md ul:before,.md .no-hairline-top-md:before,.no-hairline-top ul:before,.no-hairline-top:before{display:none!important}.ios .no-hairline-bottom-ios ul:after,.ios .no-hairline-bottom-ios:after,.md .no-hairline-bottom-md ul:after,.md .no-hairline-bottom-md:after,.no-hairline-bottom ul:after,.no-hairline-bottom:after{display:none!important}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-typography-padding:16px;--f7-typography-margin:16px}.display-flex{display:flex!important}.display-block{display:block!important}.display-inline-flex{display:inline-flex!important}.display-inline-block{display:inline-block!important}.display-inline{display:inline!important}.display-none{display:none!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-shrink-2{flex-shrink:2!important}.flex-shrink-3{flex-shrink:3!important}.flex-shrink-4{flex-shrink:4!important}.flex-shrink-5{flex-shrink:5!important}.flex-shrink-6{flex-shrink:6!important}.flex-shrink-7{flex-shrink:7!important}.flex-shrink-8{flex-shrink:8!important}.flex-shrink-9{flex-shrink:9!important}.flex-shrink-10{flex-shrink:10!important}.flex-direction-row{flex-direction:row!important}.flex-direction-row-reverse{flex-direction:row-reverse!important}.flex-direction-column{flex-direction:column!important}.flex-direction-column-reverse{flex-direction:column-reverse!important}.justify-content-flex-start{justify-content:flex-start!important}.justify-content-center{justify-content:center!important}.justify-content-flex-end{justify-content:flex-end!important}.justify-content-space-between{justify-content:space-between!important}.justify-content-space-around{justify-content:space-around!important}.justify-content-space-evenly{justify-content:space-evenly!important}.justify-content-stretch{justify-content:stretch!important}.justify-content-start{justify-content:start!important}.justify-content-end{justify-content:end!important}.justify-content-left{justify-content:left!important}.justify-content-right{justify-content:right!important}.align-content-flex-start{align-content:flex-start!important}.align-content-flex-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-space-between{align-content:space-between!important}.align-content-space-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-items-baseline{align-items:baseline!important}.align-items-flex-start{align-items:flex-start!important}.align-items-flex-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-stretch{align-items:stretch!important}.align-self-flex-start{align-self:flex-start!important}.align-self-flex-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-stretch{align-self:stretch!important}.text-align-left{text-align:left!important}.text-align-center{text-align:center!important}.text-align-right{text-align:right!important}.text-align-justify{text-align:justify!important}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}.vertical-align-bottom{vertical-align:bottom!important}.vertical-align-middle{vertical-align:middle!important}.vertical-align-top{vertical-align:top!important}.no-padding{padding:0!important}.no-padding-left{padding-left:0!important}.no-padding-right{padding-right:0!important}.no-padding-horizontal{padding-left:0!important;padding-right:0!important}.no-padding-top{padding-top:0!important}.no-padding-bottom{padding-bottom:0!important}.no-padding-vertical{padding-top:0!important;padding-bottom:0!important}.no-margin{margin:0!important}.no-margin-left{margin-left:0!important}.no-margin-right{margin-right:0!important}.no-margin-horizontal{margin-left:0!important;margin-right:0!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.no-margin-vertical{margin-top:0!important;margin-bottom:0!important}.width-auto{width:auto!important}.width-100{width:100%!important}.padding{padding:var(--f7-typography-padding)!important}.padding-half{padding:calc(var(--f7-typography-padding)/ 2)!important}.padding-top{padding-top:var(--f7-typography-padding)!important}.padding-top-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important}.padding-bottom{padding-bottom:var(--f7-typography-padding)!important}.padding-bottom-half{padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-left{padding-left:var(--f7-typography-padding)!important}.padding-left-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important}.padding-right{padding-right:var(--f7-typography-padding)!important}.padding-right-half{padding-right:calc(var(--f7-typography-padding)/ 2)!important}.padding-vertical{padding-top:var(--f7-typography-padding)!important;padding-bottom:var(--f7-typography-padding)!important}.padding-vertical-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important;padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-horizontal{padding-left:var(--f7-typography-padding)!important;padding-right:var(--f7-typography-padding)!important}.padding-horizontal-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important;padding-right:calc(var(--f7-typography-padding)/ 2)!important}.margin{margin:var(--f7-typography-margin)!important}.margin-half{margin:calc(var(--f7-typography-margin)/ 2)!important}.margin-top{margin-top:var(--f7-typography-margin)!important}.margin-top-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important}.margin-bottom{margin-bottom:var(--f7-typography-margin)!important}.margin-bottom-half{margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-left{margin-left:var(--f7-typography-margin)!important}.margin-left-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important}.margin-right{margin-right:var(--f7-typography-margin)!important}.margin-right-half{margin-right:calc(var(--f7-typography-margin)/ 2)!important}.margin-vertical{margin-top:var(--f7-typography-margin)!important;margin-bottom:var(--f7-typography-margin)!important}.margin-vertical-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important;margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-horizontal{margin-left:var(--f7-typography-margin)!important;margin-right:var(--f7-typography-margin)!important}.margin-horizontal-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important;margin-right:calc(var(--f7-typography-margin)/ 2)!important}[class*=text-color-]{color:var(--f7-theme-color-text-color)!important}[class*=bg-color-]{background-color:var(--f7-theme-color-bg-color)!important}[class*=border-color-]{border-color:var(--f7-theme-color-border-color)!important}
|
|
1
|
+
:root{--f7-typography-padding:16px;--f7-typography-margin:16px}.display-flex{display:flex!important}.display-block{display:block!important}.display-inline-flex{display:inline-flex!important}.display-inline-block{display:inline-block!important}.display-inline{display:inline!important}.display-none{display:none!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-shrink-2{flex-shrink:2!important}.flex-shrink-3{flex-shrink:3!important}.flex-shrink-4{flex-shrink:4!important}.flex-shrink-5{flex-shrink:5!important}.flex-shrink-6{flex-shrink:6!important}.flex-shrink-7{flex-shrink:7!important}.flex-shrink-8{flex-shrink:8!important}.flex-shrink-9{flex-shrink:9!important}.flex-shrink-10{flex-shrink:10!important}.flex-direction-row{flex-direction:row!important}.flex-direction-row-reverse{flex-direction:row-reverse!important}.flex-direction-column{flex-direction:column!important}.flex-direction-column-reverse{flex-direction:column-reverse!important}.justify-content-flex-start{justify-content:flex-start!important}.justify-content-center{justify-content:center!important}.justify-content-flex-end{justify-content:flex-end!important}.justify-content-space-between{justify-content:space-between!important}.justify-content-space-around{justify-content:space-around!important}.justify-content-space-evenly{justify-content:space-evenly!important}.justify-content-stretch{justify-content:stretch!important}.justify-content-start{justify-content:start!important}.justify-content-end{justify-content:end!important}.justify-content-left{justify-content:left!important}.justify-content-right{justify-content:right!important}.align-content-flex-start{align-content:flex-start!important}.align-content-flex-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-space-between{align-content:space-between!important}.align-content-space-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-items-baseline{align-items:baseline!important}.align-items-flex-start{align-items:flex-start!important}.align-items-flex-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-stretch{align-items:stretch!important}.align-self-flex-start{align-self:flex-start!important}.align-self-flex-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-stretch{align-self:stretch!important}.text-align-left{text-align:left!important}.text-align-center{text-align:center!important}.text-align-right{text-align:right!important}.text-align-justify{text-align:justify!important}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}.vertical-align-bottom{vertical-align:bottom!important}.vertical-align-middle{vertical-align:middle!important}.vertical-align-top{vertical-align:top!important}.no-padding{padding:0!important}.no-padding-left{padding-left:0!important}.no-padding-right{padding-right:0!important}.no-padding-horizontal{padding-left:0!important;padding-right:0!important}.no-padding-top{padding-top:0!important}.no-padding-bottom{padding-bottom:0!important}.no-padding-vertical{padding-top:0!important;padding-bottom:0!important}.no-margin{margin:0!important}.no-margin-left{margin-left:0!important}.no-margin-right{margin-right:0!important}.no-margin-horizontal{margin-left:0!important;margin-right:0!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.no-margin-vertical{margin-top:0!important;margin-bottom:0!important}.width-auto{width:auto!important}.width-100{width:100%!important}.padding{padding:var(--f7-typography-padding)!important}.padding-half{padding:calc(var(--f7-typography-padding)/ 2)!important}.padding-top{padding-top:var(--f7-typography-padding)!important}.padding-top-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important}.padding-bottom{padding-bottom:var(--f7-typography-padding)!important}.padding-bottom-half{padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-left{padding-left:var(--f7-typography-padding)!important}.padding-left-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important}.padding-right{padding-right:var(--f7-typography-padding)!important}.padding-right-half{padding-right:calc(var(--f7-typography-padding)/ 2)!important}.padding-vertical{padding-top:var(--f7-typography-padding)!important;padding-bottom:var(--f7-typography-padding)!important}.padding-vertical-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important;padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-horizontal{padding-left:var(--f7-typography-padding)!important;padding-right:var(--f7-typography-padding)!important}.padding-horizontal-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important;padding-right:calc(var(--f7-typography-padding)/ 2)!important}.margin{margin:var(--f7-typography-margin)!important}.margin-half{margin:calc(var(--f7-typography-margin)/ 2)!important}.margin-top{margin-top:var(--f7-typography-margin)!important}.margin-top-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important}.margin-bottom{margin-bottom:var(--f7-typography-margin)!important}.margin-bottom-half{margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-left{margin-left:var(--f7-typography-margin)!important}.margin-left-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important}.margin-right{margin-right:var(--f7-typography-margin)!important}.margin-right-half{margin-right:calc(var(--f7-typography-margin)/ 2)!important}.margin-vertical{margin-top:var(--f7-typography-margin)!important;margin-bottom:var(--f7-typography-margin)!important}.margin-vertical-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important;margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-horizontal{margin-left:var(--f7-typography-margin)!important;margin-right:var(--f7-typography-margin)!important}.margin-horizontal-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important;margin-right:calc(var(--f7-typography-margin)/ 2)!important}[class*=text-color-]{color:var(--f7-theme-color-text-color)!important}[class*=bg-color-]{background-color:var(--f7-theme-color-bg-color)!important}[class*=border-color-]{border-color:var(--f7-theme-color-border-color)!important}.ios .no-hairlines-ios ul:after,.ios .no-hairlines-ios ul:before,.ios .no-hairlines-ios:after,.ios .no-hairlines-ios:before,.md .no-hairlines-md ul:after,.md .no-hairlines-md ul:before,.md .no-hairlines-md:after,.md .no-hairlines-md:before,.no-hairlines ul:after,.no-hairlines ul:before,.no-hairlines:after,.no-hairlines:before{display:none!important}.ios .no-hairline-top-ios ul:before,.ios .no-hairline-top-ios:before,.md .no-hairline-top-md ul:before,.md .no-hairline-top-md:before,.no-hairline-top ul:before,.no-hairline-top:before{display:none!important}.ios .no-hairline-bottom-ios ul:after,.ios .no-hairline-bottom-ios:after,.md .no-hairline-bottom-md ul:after,.md .no-hairline-bottom-md:after,.no-hairline-bottom ul:after,.no-hairline-bottom:after{display:none!important}
|
|
@@ -211,6 +211,31 @@
|
|
|
211
211
|
[class*='border-color-'] {
|
|
212
212
|
border-color: var(--f7-theme-color-border-color) !important;
|
|
213
213
|
}
|
|
214
|
+
// Hairlines
|
|
215
|
+
.no-hairlines,
|
|
216
|
+
.no-hairlines ul,
|
|
217
|
+
.md .no-hairlines-md,
|
|
218
|
+
.md .no-hairlines-md ul,
|
|
219
|
+
.ios .no-hairlines-ios,
|
|
220
|
+
.ios .no-hairlines-ios ul {
|
|
221
|
+
.hairline-remove-top-bottom();
|
|
222
|
+
}
|
|
223
|
+
.no-hairline-top,
|
|
224
|
+
.no-hairline-top ul,
|
|
225
|
+
.md .no-hairline-top-md,
|
|
226
|
+
.md .no-hairline-top-md ul,
|
|
227
|
+
.ios .no-hairline-top-ios,
|
|
228
|
+
.ios .no-hairline-top-ios ul {
|
|
229
|
+
.hairline-remove(top);
|
|
230
|
+
}
|
|
231
|
+
.no-hairline-bottom,
|
|
232
|
+
.no-hairline-bottom ul,
|
|
233
|
+
.md .no-hairline-bottom-md,
|
|
234
|
+
.md .no-hairline-bottom-md ul,
|
|
235
|
+
.ios .no-hairline-bottom-ios,
|
|
236
|
+
.ios .no-hairline-bottom-ios ul {
|
|
237
|
+
.hairline-remove(bottom);
|
|
238
|
+
}
|
|
214
239
|
|
|
215
240
|
.if-ios-theme({
|
|
216
241
|
@import './typography-ios.less';
|
|
@@ -218,6 +243,3 @@
|
|
|
218
243
|
.if-md-theme({
|
|
219
244
|
@import './typography-md.less';
|
|
220
245
|
});
|
|
221
|
-
.if-aurora-theme({
|
|
222
|
-
@import './typography-aurora.less';
|
|
223
|
-
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import $ from '../../shared/dom7.js';
|
|
2
2
|
import { extend } from '../../shared/utils.js';
|
|
3
3
|
import { getSupport } from '../../shared/get-support.js';
|
|
4
|
-
|
|
5
4
|
function resizableView(view) {
|
|
6
5
|
const app = view.app;
|
|
7
6
|
const support = getSupport();
|
|
@@ -24,23 +23,18 @@ function resizableView(view) {
|
|
|
24
23
|
let width;
|
|
25
24
|
let minWidth;
|
|
26
25
|
let maxWidth;
|
|
27
|
-
|
|
28
26
|
function transformCSSWidth(v) {
|
|
29
27
|
if (!v) return null;
|
|
30
|
-
|
|
31
28
|
if (v.indexOf('%') >= 0 || v.indexOf('vw') >= 0) {
|
|
32
29
|
return parseInt(v, 10) / 100 * app.width;
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
const newV = parseInt(v, 10);
|
|
36
32
|
if (Number.isNaN(newV)) return null;
|
|
37
33
|
return newV;
|
|
38
34
|
}
|
|
39
|
-
|
|
40
35
|
function isResizable() {
|
|
41
36
|
return view.resizable && $el.hasClass('view-resizable') && $el.hasClass('view-master-detail');
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
function handleTouchStart(e) {
|
|
45
39
|
if (!isResizable()) return;
|
|
46
40
|
touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
|
@@ -51,80 +45,65 @@ function resizableView(view) {
|
|
|
51
45
|
minWidth = transformCSSWidth($pageMasterEl.css('min-width'));
|
|
52
46
|
maxWidth = transformCSSWidth($pageMasterEl.css('max-width'));
|
|
53
47
|
}
|
|
54
|
-
|
|
55
48
|
function handleTouchMove(e) {
|
|
56
49
|
if (!isTouched) return;
|
|
57
50
|
e.f7PreventSwipePanel = true;
|
|
58
51
|
const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
|
59
|
-
|
|
60
52
|
if (!isMoved) {
|
|
61
53
|
width = $resizeHandlerEl[0].offsetLeft + $resizeHandlerEl[0].offsetWidth;
|
|
62
54
|
$el.addClass('view-resizing');
|
|
63
55
|
$htmlEl.css('cursor', 'col-resize');
|
|
64
56
|
}
|
|
65
|
-
|
|
66
57
|
isMoved = true;
|
|
67
58
|
e.preventDefault();
|
|
68
59
|
touchesDiff = pageX - touchesStart.x;
|
|
69
60
|
let newWidth = width + touchesDiff;
|
|
70
|
-
|
|
71
61
|
if (minWidth && !Number.isNaN(minWidth)) {
|
|
72
62
|
newWidth = Math.max(newWidth, minWidth);
|
|
73
63
|
}
|
|
74
|
-
|
|
75
64
|
if (maxWidth && !Number.isNaN(maxWidth)) {
|
|
76
65
|
newWidth = Math.min(newWidth, maxWidth);
|
|
77
66
|
}
|
|
78
|
-
|
|
79
67
|
newWidth = Math.min(Math.max(newWidth, 0), app.width);
|
|
80
68
|
view.resizableWidth = newWidth;
|
|
81
69
|
$htmlEl[0].style.setProperty('--f7-page-master-width', `${newWidth}px`);
|
|
82
70
|
$el.trigger('view:resize', newWidth);
|
|
83
71
|
view.emit('local::resize viewResize', view, newWidth);
|
|
84
72
|
}
|
|
85
|
-
|
|
86
73
|
function handleTouchEnd() {
|
|
87
74
|
$('html').css('cursor', '');
|
|
88
|
-
|
|
89
75
|
if (!isTouched || !isMoved) {
|
|
90
76
|
isTouched = false;
|
|
91
77
|
isMoved = false;
|
|
92
78
|
return;
|
|
93
79
|
}
|
|
94
|
-
|
|
95
80
|
isTouched = false;
|
|
96
81
|
isMoved = false;
|
|
97
82
|
$htmlEl[0].style.setProperty('--f7-page-master-width', `${view.resizableWidth}px`);
|
|
98
83
|
$el.removeClass('view-resizing');
|
|
99
84
|
}
|
|
100
|
-
|
|
101
85
|
function handleResize() {
|
|
102
86
|
if (!view.resizableWidth) return;
|
|
103
87
|
minWidth = transformCSSWidth($resizeHandlerEl.css('min-width'));
|
|
104
88
|
maxWidth = transformCSSWidth($resizeHandlerEl.css('max-width'));
|
|
105
|
-
|
|
106
89
|
if (minWidth && !Number.isNaN(minWidth) && view.resizableWidth < minWidth) {
|
|
107
90
|
view.resizableWidth = Math.max(view.resizableWidth, minWidth);
|
|
108
91
|
}
|
|
109
|
-
|
|
110
92
|
if (maxWidth && !Number.isNaN(maxWidth) && view.resizableWidth > maxWidth) {
|
|
111
93
|
view.resizableWidth = Math.min(view.resizableWidth, maxWidth);
|
|
112
94
|
}
|
|
113
|
-
|
|
114
95
|
view.resizableWidth = Math.min(Math.max(view.resizableWidth, 0), app.width);
|
|
115
96
|
$htmlEl[0].style.setProperty('--f7-page-master-width', `${view.resizableWidth}px`);
|
|
116
97
|
}
|
|
117
|
-
|
|
118
98
|
$resizeHandlerEl = view.$el.children('.view-resize-handler');
|
|
119
|
-
|
|
120
99
|
if (!$resizeHandlerEl.length) {
|
|
121
100
|
view.$el.append('<div class="view-resize-handler"></div>');
|
|
122
101
|
$resizeHandlerEl = view.$el.children('.view-resize-handler');
|
|
123
102
|
}
|
|
124
|
-
|
|
125
103
|
view.$resizeHandlerEl = $resizeHandlerEl;
|
|
126
|
-
$el.addClass('view-resizable');
|
|
104
|
+
$el.addClass('view-resizable');
|
|
127
105
|
|
|
106
|
+
// Add Events
|
|
128
107
|
const passive = support.passiveListener ? {
|
|
129
108
|
passive: true
|
|
130
109
|
} : false;
|
|
@@ -143,5 +122,4 @@ function resizableView(view) {
|
|
|
143
122
|
view.off('beforeOpen', handleResize);
|
|
144
123
|
});
|
|
145
124
|
}
|
|
146
|
-
|
|
147
125
|
export default resizableView;
|
|
@@ -3,13 +3,11 @@ import { extend } from '../../shared/utils.js';
|
|
|
3
3
|
import Router from '../../modules/router/router.js';
|
|
4
4
|
import Framework7Class from '../../shared/class.js';
|
|
5
5
|
import resizableView from './resizable-view.js';
|
|
6
|
-
|
|
7
6
|
class View extends Framework7Class {
|
|
8
7
|
constructor(app, el, viewParams) {
|
|
9
8
|
if (viewParams === void 0) {
|
|
10
9
|
viewParams = {};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
super(viewParams, [app]);
|
|
14
12
|
const view = this;
|
|
15
13
|
const ssr = view.params.routerId;
|
|
@@ -17,54 +15,53 @@ class View extends Framework7Class {
|
|
|
17
15
|
routes: [],
|
|
18
16
|
routesAdd: []
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
if (!ssr) {
|
|
22
19
|
const $el = $(el);
|
|
23
|
-
|
|
24
20
|
if (!$el.length) {
|
|
25
21
|
let message = "Framework7: can't create a View instance because ";
|
|
26
22
|
message += typeof el === 'string' ? `the selector "${el}" didn't match any element` : 'el must be an HTMLElement or Dom7 object';
|
|
27
23
|
throw new Error(message);
|
|
28
24
|
}
|
|
29
|
-
}
|
|
30
|
-
|
|
25
|
+
}
|
|
31
26
|
|
|
27
|
+
// Default View params
|
|
32
28
|
view.params = extend({
|
|
33
29
|
el
|
|
34
|
-
}, defaults, app.params.view, viewParams);
|
|
30
|
+
}, defaults, app.params.view, viewParams);
|
|
35
31
|
|
|
32
|
+
// Routes
|
|
36
33
|
if (view.params.routes.length > 0) {
|
|
37
34
|
view.routes = view.params.routes;
|
|
38
35
|
} else {
|
|
39
36
|
view.routes = [].concat(app.routes, view.params.routesAdd);
|
|
40
|
-
}
|
|
41
|
-
|
|
37
|
+
}
|
|
42
38
|
|
|
39
|
+
// View Props
|
|
43
40
|
extend(false, view, {
|
|
44
41
|
app,
|
|
45
42
|
name: view.params.name,
|
|
46
43
|
main: view.params.main,
|
|
47
44
|
history: [],
|
|
48
45
|
scrollHistory: {}
|
|
49
|
-
});
|
|
46
|
+
});
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
// Install Modules
|
|
49
|
+
view.useModules();
|
|
52
50
|
|
|
51
|
+
// Add to app
|
|
53
52
|
app.views.push(view);
|
|
54
|
-
|
|
55
53
|
if (view.main) {
|
|
56
54
|
app.views.main = view;
|
|
57
55
|
}
|
|
58
|
-
|
|
59
56
|
if (view.name) {
|
|
60
57
|
app.views[view.name] = view;
|
|
61
|
-
}
|
|
62
|
-
|
|
58
|
+
}
|
|
63
59
|
|
|
64
|
-
|
|
60
|
+
// Index
|
|
61
|
+
view.index = app.views.indexOf(view);
|
|
65
62
|
|
|
63
|
+
// View ID
|
|
66
64
|
let viewId;
|
|
67
|
-
|
|
68
65
|
if (view.name) {
|
|
69
66
|
viewId = `view_${view.name}`;
|
|
70
67
|
} else if (view.main) {
|
|
@@ -72,14 +69,11 @@ class View extends Framework7Class {
|
|
|
72
69
|
} else {
|
|
73
70
|
viewId = `view_${view.index}`;
|
|
74
71
|
}
|
|
75
|
-
|
|
76
72
|
view.id = viewId;
|
|
77
|
-
|
|
78
73
|
if (!view.params.init) {
|
|
79
74
|
return view;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
}
|
|
76
|
+
// Init View
|
|
83
77
|
if (app.initialized) {
|
|
84
78
|
view.init();
|
|
85
79
|
} else {
|
|
@@ -87,17 +81,14 @@ class View extends Framework7Class {
|
|
|
87
81
|
view.init();
|
|
88
82
|
});
|
|
89
83
|
}
|
|
90
|
-
|
|
91
84
|
return view;
|
|
92
85
|
}
|
|
93
|
-
|
|
94
86
|
destroy() {
|
|
95
87
|
let view = this;
|
|
96
88
|
const app = view.app;
|
|
97
89
|
view.$el.trigger('view:beforedestroy');
|
|
98
90
|
view.emit('local::beforeDestroy viewBeforeDestroy', view);
|
|
99
91
|
app.off('resize', view.checkMasterDetailBreakpoint);
|
|
100
|
-
|
|
101
92
|
if (view.main) {
|
|
102
93
|
app.views.main = null;
|
|
103
94
|
delete app.views.main;
|
|
@@ -105,82 +96,73 @@ class View extends Framework7Class {
|
|
|
105
96
|
app.views[view.name] = null;
|
|
106
97
|
delete app.views[view.name];
|
|
107
98
|
}
|
|
108
|
-
|
|
109
99
|
view.$el[0].f7View = null;
|
|
110
100
|
delete view.$el[0].f7View;
|
|
111
|
-
app.views.splice(app.views.indexOf(view), 1);
|
|
101
|
+
app.views.splice(app.views.indexOf(view), 1);
|
|
112
102
|
|
|
103
|
+
// Destroy Router
|
|
113
104
|
if (view.params.router && view.router) {
|
|
114
105
|
view.router.destroy();
|
|
115
106
|
}
|
|
107
|
+
view.emit('local::destroy viewDestroy', view);
|
|
116
108
|
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
// Delete props & methods
|
|
119
110
|
Object.keys(view).forEach(viewProp => {
|
|
120
111
|
view[viewProp] = null;
|
|
121
112
|
delete view[viewProp];
|
|
122
113
|
});
|
|
123
114
|
view = null;
|
|
124
115
|
}
|
|
125
|
-
|
|
126
116
|
checkMasterDetailBreakpoint(force) {
|
|
127
117
|
const view = this;
|
|
128
118
|
const app = view.app;
|
|
129
119
|
const wasMasterDetail = view.$el.hasClass('view-master-detail');
|
|
130
120
|
const isMasterDetail = app.width >= view.params.masterDetailBreakpoint && view.$el.children('.page-master').length;
|
|
131
|
-
|
|
132
121
|
if (typeof force === 'undefined' && isMasterDetail || force === true) {
|
|
133
122
|
view.$el.addClass('view-master-detail');
|
|
134
|
-
|
|
135
123
|
if (!wasMasterDetail) {
|
|
136
124
|
view.emit('local::masterDetailBreakpoint viewMasterDetailBreakpoint', view);
|
|
137
125
|
view.$el.trigger('view:masterDetailBreakpoint');
|
|
138
126
|
}
|
|
139
127
|
} else {
|
|
140
128
|
view.$el.removeClass('view-master-detail');
|
|
141
|
-
|
|
142
129
|
if (wasMasterDetail) {
|
|
143
130
|
view.emit('local::masterDetailBreakpoint viewMasterDetailBreakpoint', view);
|
|
144
131
|
view.$el.trigger('view:masterDetailBreakpoint');
|
|
145
132
|
}
|
|
146
133
|
}
|
|
147
134
|
}
|
|
148
|
-
|
|
149
135
|
initMasterDetail() {
|
|
150
136
|
const view = this;
|
|
151
137
|
const app = view.app;
|
|
152
138
|
view.checkMasterDetailBreakpoint = view.checkMasterDetailBreakpoint.bind(view);
|
|
153
139
|
view.checkMasterDetailBreakpoint();
|
|
154
|
-
|
|
155
140
|
if (view.params.masterDetailResizable) {
|
|
156
141
|
resizableView(view);
|
|
157
142
|
}
|
|
158
|
-
|
|
159
143
|
app.on('resize', view.checkMasterDetailBreakpoint);
|
|
160
144
|
}
|
|
161
|
-
|
|
162
145
|
mount(viewEl) {
|
|
163
146
|
const view = this;
|
|
164
147
|
const app = view.app;
|
|
165
148
|
const el = view.params.el || viewEl;
|
|
166
|
-
const $el = $(el);
|
|
149
|
+
const $el = $(el);
|
|
167
150
|
|
|
151
|
+
// Selector
|
|
168
152
|
let selector;
|
|
169
153
|
if (typeof el === 'string') selector = el;else {
|
|
170
154
|
// Supposed to be HTMLElement or Dom7
|
|
171
155
|
selector = ($el.attr('id') ? `#${$el.attr('id')}` : '') + ($el.attr('class') ? `.${$el.attr('class').replace(/ /g, '.').replace('.active', '')}` : '');
|
|
172
|
-
}
|
|
156
|
+
}
|
|
173
157
|
|
|
158
|
+
// DynamicNavbar
|
|
174
159
|
let $navbarsEl;
|
|
175
|
-
|
|
176
160
|
if (app.theme === 'ios' && view.params.iosDynamicNavbar) {
|
|
177
161
|
$navbarsEl = $el.children('.navbars').eq(0);
|
|
178
|
-
|
|
179
162
|
if ($navbarsEl.length === 0) {
|
|
180
163
|
$navbarsEl = $('<div class="navbars"></div>');
|
|
181
164
|
}
|
|
182
165
|
}
|
|
183
|
-
|
|
184
166
|
extend(view, {
|
|
185
167
|
$el,
|
|
186
168
|
el: $el[0],
|
|
@@ -189,28 +171,23 @@ class View extends Framework7Class {
|
|
|
189
171
|
navbarsEl: $navbarsEl ? $navbarsEl[0] : undefined,
|
|
190
172
|
selector
|
|
191
173
|
});
|
|
192
|
-
|
|
193
174
|
if (view.main) {
|
|
194
175
|
app.views.main = view;
|
|
195
|
-
}
|
|
196
|
-
|
|
176
|
+
}
|
|
197
177
|
|
|
178
|
+
// Save in DOM
|
|
198
179
|
if ($el && $el[0]) {
|
|
199
180
|
$el[0].f7View = view;
|
|
200
181
|
}
|
|
201
|
-
|
|
202
182
|
view.emit('local::mount viewMount', view);
|
|
203
183
|
}
|
|
204
|
-
|
|
205
184
|
init(viewEl) {
|
|
206
185
|
const view = this;
|
|
207
186
|
view.mount(viewEl);
|
|
208
|
-
|
|
209
187
|
if (view.params.router) {
|
|
210
188
|
if (view.params.masterDetailBreakpoint > 0) {
|
|
211
189
|
view.initMasterDetail();
|
|
212
190
|
}
|
|
213
|
-
|
|
214
191
|
if (view.params.initRouterOnTabShow && view.$el.hasClass('tab') && !view.$el.hasClass('tab-active')) {
|
|
215
192
|
view.$el.once('tab:show', () => {
|
|
216
193
|
view.router.init();
|
|
@@ -218,14 +195,12 @@ class View extends Framework7Class {
|
|
|
218
195
|
} else {
|
|
219
196
|
view.router.init();
|
|
220
197
|
}
|
|
221
|
-
|
|
222
198
|
view.$el.trigger('view:init');
|
|
223
199
|
view.emit('local::init viewInit', view);
|
|
224
200
|
}
|
|
225
201
|
}
|
|
202
|
+
}
|
|
226
203
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
204
|
+
// Use Router
|
|
230
205
|
View.use(Router);
|
|
231
206
|
export default View;
|
|
@@ -40,8 +40,6 @@ export namespace View {
|
|
|
40
40
|
router?: boolean;
|
|
41
41
|
/** Default (initial) View's url. If not specified, then it is equal to document url */
|
|
42
42
|
url?: string;
|
|
43
|
-
/** If enabled then all previous pages in navigation chain will not be removed from DOM when you navigate deeper and deeper. It could be useful, for example, if you have some Form from 5 steps (5 pages) and when you are on last 5th page you need access to form that was on 1st page. */
|
|
44
|
-
stackPages?: boolean;
|
|
45
43
|
/** CSS Selector of another view or object with initialized View instance. By default all links in initialized (only) view will load pages in this view. This tell links to load pages in other view. */
|
|
46
44
|
linksView?: CSSSelector | View;
|
|
47
45
|
/** You may enable this parameter to allow loading of new pages that have same url as currently "active" page in View. */
|
|
@@ -66,8 +64,6 @@ export namespace View {
|
|
|
66
64
|
iosPageLoadDelay?: number;
|
|
67
65
|
/** Delay (in ms) after new page will be loaded and inserted to DOM and before it will be transitioned. Can be increased a bit to improve performance. Will have effect only under MD theme */
|
|
68
66
|
mdPageLoadDelay?: number;
|
|
69
|
-
/** Delay (in ms) after new page will be loaded and inserted to DOM and before it will be transitioned. Can be increased a bit to improve performance. Will have effect only under Aurora theme */
|
|
70
|
-
auroraPageLoadDelay?: number;
|
|
71
67
|
/** When enabled then router will pass route url query to request url query (for url, componentUrl route properties) */
|
|
72
68
|
passRouteQueryToRequest?: boolean;
|
|
73
69
|
/** When enabled then router will pass current route parameters to request url query (for url, componentUrl route properties) */
|
|
@@ -138,16 +134,6 @@ export namespace View {
|
|
|
138
134
|
mdSwipeBackAnimateShadow?: boolean;
|
|
139
135
|
/** Enable/disable opacity animation during swipe back action. You can disable it to improve performance. For MD theme */
|
|
140
136
|
mdSwipeBackAnimateOpacity?: boolean;
|
|
141
|
-
/** Enable/disable ability to swipe back from left edge of screen to get to the previous page. For Aurora theme */
|
|
142
|
-
auroraSwipeBack?: boolean;
|
|
143
|
-
/** Value in px. Swipe back action will start if "touch distance" will be more than this value. For Aurora theme */
|
|
144
|
-
auroraSwipeBackThreshold?: number;
|
|
145
|
-
/** Value in px. Width of invisible left edge of the screen that triggers swipe back action. For Aurora theme */
|
|
146
|
-
auroraSwipeBackActiveArea?: number;
|
|
147
|
-
/** Enable/disable box-shadow animation during swipe back action. You can disable it to improve performance. For Aurora theme */
|
|
148
|
-
auroraSwipeBackAnimateShadow?: boolean;
|
|
149
|
-
/** Enable/disable opacity animation during swipe back action. You can disable it to improve performance. For Aurora theme */
|
|
150
|
-
auroraSwipeBackAnimateOpacity?: boolean;
|
|
151
137
|
/** If you develop web app (not Cordova/Capacitor or Home Screen web app) it is useful to enable hash navigation (browser url will look like "http://my-webapp.com/#!/about.html"). User as well will be able to navigate through app's history by using browser's default back and forward buttons. */
|
|
152
138
|
browserHistory?: boolean;
|
|
153
139
|
/** Browser history root URL, for example "http://my-app.com/". It is useful only in case when you use empty ("") browserHistorySeparator */
|