framework7 7.0.9 → 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
package/modules/touch/touch.js
CHANGED
|
@@ -4,7 +4,6 @@ import $ from '../../shared/dom7.js';
|
|
|
4
4
|
import { getSupport } from '../../shared/get-support.js';
|
|
5
5
|
import { getDevice } from '../../shared/get-device.js';
|
|
6
6
|
import { extend } from '../../shared/utils.js';
|
|
7
|
-
|
|
8
7
|
function initTouch() {
|
|
9
8
|
const app = this;
|
|
10
9
|
const device = getDevice();
|
|
@@ -13,12 +12,10 @@ function initTouch() {
|
|
|
13
12
|
const document = getDocument();
|
|
14
13
|
const params = app.params.touch;
|
|
15
14
|
const useRipple = params[`${app.theme}TouchRipple`];
|
|
16
|
-
|
|
17
15
|
if (device.ios && device.webView) {
|
|
18
16
|
// Strange hack required for iOS 8 webview to work on inputs
|
|
19
17
|
window.addEventListener('touchstart', () => {});
|
|
20
18
|
}
|
|
21
|
-
|
|
22
19
|
let touchStartX;
|
|
23
20
|
let touchStartY;
|
|
24
21
|
let targetElement;
|
|
@@ -31,109 +28,84 @@ function initTouch() {
|
|
|
31
28
|
let rippleWave;
|
|
32
29
|
let rippleTarget;
|
|
33
30
|
let rippleTimeout;
|
|
34
|
-
|
|
35
31
|
function findActivableElement(el) {
|
|
36
32
|
const target = $(el);
|
|
37
33
|
const parents = target.parents(params.activeStateElements);
|
|
38
|
-
|
|
39
34
|
if (target.closest('.no-active-state').length) {
|
|
40
35
|
return null;
|
|
41
36
|
}
|
|
42
|
-
|
|
43
37
|
let activable;
|
|
44
|
-
|
|
45
38
|
if (target.is(params.activeStateElements)) {
|
|
46
39
|
activable = target;
|
|
47
40
|
}
|
|
48
|
-
|
|
49
41
|
if (parents.length > 0) {
|
|
50
42
|
activable = activable ? activable.add(parents) : parents;
|
|
51
43
|
}
|
|
52
|
-
|
|
53
44
|
if (activable && activable.length > 1) {
|
|
54
45
|
const newActivable = [];
|
|
55
46
|
let preventPropagation;
|
|
56
|
-
|
|
57
47
|
for (let i = 0; i < activable.length; i += 1) {
|
|
58
48
|
if (!preventPropagation) {
|
|
59
49
|
newActivable.push(activable[i]);
|
|
60
|
-
|
|
61
50
|
if (activable.eq(i).hasClass('prevent-active-state-propagation') || activable.eq(i).hasClass('no-active-state-propagation')) {
|
|
62
51
|
preventPropagation = true;
|
|
63
52
|
}
|
|
64
53
|
}
|
|
65
54
|
}
|
|
66
|
-
|
|
67
55
|
activable = $(newActivable);
|
|
68
56
|
}
|
|
69
|
-
|
|
70
57
|
return activable || target;
|
|
71
58
|
}
|
|
72
|
-
|
|
73
59
|
function isInsideScrollableView(el) {
|
|
74
60
|
const pageContent = el.parents('.page-content');
|
|
75
61
|
return pageContent.length > 0;
|
|
76
62
|
}
|
|
77
|
-
|
|
78
63
|
function addActive() {
|
|
79
64
|
if (!activableElement) return;
|
|
80
65
|
activableElement.addClass('active-state');
|
|
81
66
|
}
|
|
82
|
-
|
|
83
67
|
function removeActive() {
|
|
84
68
|
if (!activableElement) return;
|
|
85
69
|
activableElement.removeClass('active-state');
|
|
86
70
|
activableElement = null;
|
|
87
|
-
}
|
|
88
|
-
|
|
71
|
+
}
|
|
89
72
|
|
|
73
|
+
// Ripple handlers
|
|
90
74
|
function findRippleElement(el) {
|
|
91
75
|
const rippleElements = params.touchRippleElements;
|
|
92
76
|
const $el = $(el);
|
|
93
|
-
|
|
94
77
|
if ($el.is(rippleElements)) {
|
|
95
78
|
if ($el.hasClass('no-ripple')) {
|
|
96
79
|
return false;
|
|
97
80
|
}
|
|
98
|
-
|
|
99
81
|
return $el;
|
|
100
82
|
}
|
|
101
|
-
|
|
102
83
|
if ($el.parents(rippleElements).length > 0) {
|
|
103
84
|
const rippleParent = $el.parents(rippleElements).eq(0);
|
|
104
|
-
|
|
105
85
|
if (rippleParent.hasClass('no-ripple')) {
|
|
106
86
|
return false;
|
|
107
87
|
}
|
|
108
|
-
|
|
109
88
|
return rippleParent;
|
|
110
89
|
}
|
|
111
|
-
|
|
112
90
|
return false;
|
|
113
91
|
}
|
|
114
|
-
|
|
115
92
|
function createRipple($el, x, y) {
|
|
116
93
|
if (!$el) return;
|
|
117
94
|
rippleWave = app.touchRipple.create(app, $el, x, y);
|
|
118
95
|
}
|
|
119
|
-
|
|
120
96
|
function removeRipple() {
|
|
121
97
|
if (!rippleWave) return;
|
|
122
98
|
rippleWave.remove();
|
|
123
99
|
rippleWave = undefined;
|
|
124
100
|
rippleTarget = undefined;
|
|
125
101
|
}
|
|
126
|
-
|
|
127
102
|
function rippleTouchStart(el) {
|
|
128
103
|
rippleTarget = findRippleElement(el);
|
|
129
|
-
|
|
130
104
|
if (!rippleTarget || rippleTarget.length === 0) {
|
|
131
105
|
rippleTarget = undefined;
|
|
132
106
|
return;
|
|
133
107
|
}
|
|
134
|
-
|
|
135
108
|
const inScrollable = isInsideScrollableView(rippleTarget);
|
|
136
|
-
|
|
137
109
|
if (!inScrollable) {
|
|
138
110
|
removeRipple();
|
|
139
111
|
createRipple(rippleTarget, touchStartX, touchStartY);
|
|
@@ -145,12 +117,10 @@ function initTouch() {
|
|
|
145
117
|
}, 80);
|
|
146
118
|
}
|
|
147
119
|
}
|
|
148
|
-
|
|
149
120
|
function rippleTouchMove() {
|
|
150
121
|
clearTimeout(rippleTimeout);
|
|
151
122
|
removeRipple();
|
|
152
123
|
}
|
|
153
|
-
|
|
154
124
|
function rippleTouchEnd() {
|
|
155
125
|
if (!rippleWave && rippleTarget && !isMoved) {
|
|
156
126
|
clearTimeout(rippleTimeout);
|
|
@@ -159,85 +129,72 @@ function initTouch() {
|
|
|
159
129
|
} else {
|
|
160
130
|
removeRipple();
|
|
161
131
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
132
|
+
}
|
|
164
133
|
|
|
134
|
+
// Mouse Handlers
|
|
165
135
|
function handleMouseDown(e) {
|
|
166
136
|
const $activableEl = findActivableElement(e.target);
|
|
167
|
-
|
|
168
137
|
if ($activableEl) {
|
|
169
138
|
$activableEl.addClass('active-state');
|
|
170
|
-
|
|
171
139
|
if ('which' in e && e.which === 3) {
|
|
172
140
|
setTimeout(() => {
|
|
173
141
|
$('.active-state').removeClass('active-state');
|
|
174
142
|
}, 0);
|
|
175
143
|
}
|
|
176
144
|
}
|
|
177
|
-
|
|
178
145
|
if (useRipple) {
|
|
179
146
|
touchStartX = e.pageX;
|
|
180
147
|
touchStartY = e.pageY;
|
|
181
148
|
rippleTouchStart(e.target, e.pageX, e.pageY);
|
|
182
149
|
}
|
|
183
150
|
}
|
|
184
|
-
|
|
185
151
|
function handleMouseMove() {
|
|
186
152
|
if (!params.activeStateOnMouseMove) {
|
|
187
153
|
$('.active-state').removeClass('active-state');
|
|
188
154
|
}
|
|
189
|
-
|
|
190
155
|
if (useRipple) {
|
|
191
156
|
rippleTouchMove();
|
|
192
157
|
}
|
|
193
158
|
}
|
|
194
|
-
|
|
195
159
|
function handleMouseUp() {
|
|
196
160
|
$('.active-state').removeClass('active-state');
|
|
197
|
-
|
|
198
161
|
if (useRipple) {
|
|
199
162
|
rippleTouchEnd();
|
|
200
163
|
}
|
|
201
164
|
}
|
|
202
|
-
|
|
203
165
|
function handleTouchCancel() {
|
|
204
|
-
targetElement = null;
|
|
166
|
+
targetElement = null;
|
|
205
167
|
|
|
168
|
+
// Remove Active State
|
|
206
169
|
clearTimeout(activeTimeout);
|
|
207
170
|
clearTimeout(tapHoldTimeout);
|
|
208
|
-
|
|
209
171
|
if (params.activeState) {
|
|
210
172
|
removeActive();
|
|
211
|
-
}
|
|
212
|
-
|
|
173
|
+
}
|
|
213
174
|
|
|
175
|
+
// Remove Ripple
|
|
214
176
|
if (useRipple) {
|
|
215
177
|
rippleTouchEnd();
|
|
216
178
|
}
|
|
217
179
|
}
|
|
218
|
-
|
|
219
180
|
let isScrolling;
|
|
220
181
|
let isSegmentedStrong = false;
|
|
221
182
|
let segmentedStrongEl = null;
|
|
222
183
|
const touchMoveActivableIos = '.dialog-button, .actions-button';
|
|
223
184
|
let isTouchMoveActivable = false;
|
|
224
185
|
let touchmoveActivableEl = null;
|
|
225
|
-
|
|
226
186
|
function handleTouchStart(e) {
|
|
227
187
|
isMoved = false;
|
|
228
188
|
tapHoldFired = false;
|
|
229
189
|
preventClick = false;
|
|
230
190
|
isScrolling = undefined;
|
|
231
|
-
|
|
232
191
|
if (e.targetTouches.length > 1) {
|
|
233
192
|
if (activableElement) removeActive();
|
|
234
193
|
return true;
|
|
235
194
|
}
|
|
236
|
-
|
|
237
195
|
if (e.touches.length > 1 && activableElement) {
|
|
238
196
|
removeActive();
|
|
239
197
|
}
|
|
240
|
-
|
|
241
198
|
if (params.tapHold) {
|
|
242
199
|
if (tapHoldTimeout) clearTimeout(tapHoldTimeout);
|
|
243
200
|
tapHoldTimeout = setTimeout(() => {
|
|
@@ -249,83 +206,66 @@ function initTouch() {
|
|
|
249
206
|
app.emit('taphold', e);
|
|
250
207
|
}, params.tapHoldDelay);
|
|
251
208
|
}
|
|
252
|
-
|
|
253
209
|
targetElement = e.target;
|
|
254
210
|
touchStartX = e.targetTouches[0].pageX;
|
|
255
211
|
touchStartY = e.targetTouches[0].pageY;
|
|
256
212
|
isSegmentedStrong = e.target.closest('.segmented-strong .button-active, .segmented-strong .tab-link-active');
|
|
257
213
|
isTouchMoveActivable = app.theme === 'ios' && e.target.closest(touchMoveActivableIos);
|
|
258
|
-
|
|
259
214
|
if (isSegmentedStrong) {
|
|
260
215
|
segmentedStrongEl = isSegmentedStrong.closest('.segmented-strong');
|
|
261
216
|
}
|
|
262
|
-
|
|
263
217
|
if (params.activeState) {
|
|
264
218
|
activableElement = findActivableElement(targetElement);
|
|
265
|
-
|
|
266
219
|
if (activableElement && !isInsideScrollableView(activableElement)) {
|
|
267
220
|
addActive();
|
|
268
221
|
} else if (activableElement) {
|
|
269
222
|
activeTimeout = setTimeout(addActive, 80);
|
|
270
223
|
}
|
|
271
224
|
}
|
|
272
|
-
|
|
273
225
|
if (useRipple) {
|
|
274
226
|
rippleTouchStart(targetElement, touchStartX, touchStartY);
|
|
275
227
|
}
|
|
276
|
-
|
|
277
228
|
return true;
|
|
278
229
|
}
|
|
279
|
-
|
|
280
230
|
function handleTouchMove(e) {
|
|
281
231
|
let touch;
|
|
282
232
|
let distance;
|
|
283
233
|
let shouldRemoveActive = true;
|
|
284
|
-
|
|
285
234
|
if (e.type === 'touchmove') {
|
|
286
235
|
touch = e.targetTouches[0];
|
|
287
236
|
distance = params.touchClicksDistanceThreshold;
|
|
288
237
|
}
|
|
289
|
-
|
|
290
238
|
const touchCurrentX = e.targetTouches[0].pageX;
|
|
291
239
|
const touchCurrentY = e.targetTouches[0].pageY;
|
|
292
|
-
|
|
293
240
|
if (typeof isScrolling === 'undefined') {
|
|
294
241
|
isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX));
|
|
295
242
|
}
|
|
296
|
-
|
|
297
243
|
if (isTouchMoveActivable || !isScrolling && isSegmentedStrong && segmentedStrongEl) {
|
|
298
244
|
if (e.cancelable) e.preventDefault();
|
|
299
245
|
}
|
|
300
|
-
|
|
301
246
|
if (!isScrolling && isSegmentedStrong && segmentedStrongEl) {
|
|
302
247
|
const elementFromPoint = document.elementFromPoint(e.targetTouches[0].clientX, e.targetTouches[0].clientY);
|
|
303
248
|
const buttonEl = elementFromPoint.closest('.segmented-strong .button:not(.button-active):not(.tab-link-active)');
|
|
304
|
-
|
|
305
249
|
if (buttonEl && segmentedStrongEl.contains(buttonEl)) {
|
|
306
250
|
$(buttonEl).trigger('click', 'f7Segmented');
|
|
307
251
|
targetElement = buttonEl;
|
|
308
252
|
}
|
|
309
253
|
}
|
|
310
|
-
|
|
311
254
|
if (distance && touch) {
|
|
312
255
|
const pageX = touch.pageX;
|
|
313
256
|
const pageY = touch.pageY;
|
|
314
|
-
|
|
315
257
|
if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) {
|
|
316
258
|
isMoved = true;
|
|
317
259
|
}
|
|
318
260
|
} else {
|
|
319
261
|
isMoved = true;
|
|
320
262
|
}
|
|
321
|
-
|
|
322
263
|
if (isMoved) {
|
|
323
|
-
preventClick = true;
|
|
324
|
-
|
|
264
|
+
preventClick = true;
|
|
265
|
+
// Keep active state on touchMove (for dialog and actions buttons)
|
|
325
266
|
if (isTouchMoveActivable) {
|
|
326
267
|
const elementFromPoint = document.elementFromPoint(e.targetTouches[0].clientX, e.targetTouches[0].clientY);
|
|
327
268
|
touchmoveActivableEl = elementFromPoint.closest(touchMoveActivableIos);
|
|
328
|
-
|
|
329
269
|
if (touchmoveActivableEl && activableElement && activableElement[0] === touchmoveActivableEl) {
|
|
330
270
|
shouldRemoveActive = false;
|
|
331
271
|
} else if (touchmoveActivableEl) {
|
|
@@ -335,22 +275,18 @@ function initTouch() {
|
|
|
335
275
|
});
|
|
336
276
|
}
|
|
337
277
|
}
|
|
338
|
-
|
|
339
278
|
if (params.tapHold) {
|
|
340
279
|
clearTimeout(tapHoldTimeout);
|
|
341
280
|
}
|
|
342
|
-
|
|
343
281
|
if (params.activeState && shouldRemoveActive) {
|
|
344
282
|
clearTimeout(activeTimeout);
|
|
345
283
|
removeActive();
|
|
346
284
|
}
|
|
347
|
-
|
|
348
285
|
if (useRipple) {
|
|
349
286
|
rippleTouchMove();
|
|
350
287
|
}
|
|
351
288
|
}
|
|
352
289
|
}
|
|
353
|
-
|
|
354
290
|
function handleTouchEnd(e) {
|
|
355
291
|
isScrolling = undefined;
|
|
356
292
|
isSegmentedStrong = false;
|
|
@@ -358,47 +294,37 @@ function initTouch() {
|
|
|
358
294
|
isTouchMoveActivable = false;
|
|
359
295
|
clearTimeout(activeTimeout);
|
|
360
296
|
clearTimeout(tapHoldTimeout);
|
|
361
|
-
|
|
362
297
|
if (touchmoveActivableEl) {
|
|
363
298
|
$(touchmoveActivableEl).trigger('click', 'f7TouchMoveActivable');
|
|
364
299
|
touchmoveActivableEl = null;
|
|
365
300
|
}
|
|
366
|
-
|
|
367
301
|
if (document.activeElement === e.target) {
|
|
368
302
|
if (params.activeState) removeActive();
|
|
369
|
-
|
|
370
303
|
if (useRipple) {
|
|
371
304
|
rippleTouchEnd();
|
|
372
305
|
}
|
|
373
|
-
|
|
374
306
|
return true;
|
|
375
307
|
}
|
|
376
|
-
|
|
377
308
|
if (params.activeState) {
|
|
378
309
|
addActive();
|
|
379
310
|
setTimeout(removeActive, 0);
|
|
380
311
|
}
|
|
381
|
-
|
|
382
312
|
if (useRipple) {
|
|
383
313
|
rippleTouchEnd();
|
|
384
314
|
}
|
|
385
|
-
|
|
386
315
|
if (params.tapHoldPreventClicks && tapHoldFired || preventClick) {
|
|
387
316
|
if (e.cancelable) e.preventDefault();
|
|
388
317
|
preventClick = true;
|
|
389
318
|
return false;
|
|
390
319
|
}
|
|
391
|
-
|
|
392
320
|
return true;
|
|
393
321
|
}
|
|
394
|
-
|
|
395
322
|
function handleClick(e) {
|
|
396
323
|
const isOverswipe = e && e.detail && e.detail === 'f7Overswipe';
|
|
397
|
-
const isSegmented = e && e.detail && e.detail === 'f7Segmented';
|
|
398
|
-
|
|
324
|
+
const isSegmented = e && e.detail && e.detail === 'f7Segmented';
|
|
325
|
+
// eslint-disable-next-line
|
|
399
326
|
const isTouchMoveActivable = e && e.detail && e.detail === 'f7TouchMoveActivable';
|
|
400
327
|
let localPreventClick = preventClick;
|
|
401
|
-
|
|
402
328
|
if (targetElement && e.target !== targetElement) {
|
|
403
329
|
if (isOverswipe || isSegmented || isTouchMoveActivable) {
|
|
404
330
|
localPreventClick = false;
|
|
@@ -408,63 +334,50 @@ function initTouch() {
|
|
|
408
334
|
} else if (isTouchMoveActivable) {
|
|
409
335
|
localPreventClick = false;
|
|
410
336
|
}
|
|
411
|
-
|
|
412
337
|
if (params.tapHold && params.tapHoldPreventClicks && tapHoldFired) {
|
|
413
338
|
localPreventClick = true;
|
|
414
339
|
}
|
|
415
|
-
|
|
416
340
|
if (localPreventClick) {
|
|
417
341
|
e.stopImmediatePropagation();
|
|
418
342
|
e.stopPropagation();
|
|
419
343
|
e.preventDefault();
|
|
420
344
|
}
|
|
421
|
-
|
|
422
345
|
if (params.tapHold) {
|
|
423
346
|
tapHoldTimeout = setTimeout(() => {
|
|
424
347
|
tapHoldFired = false;
|
|
425
348
|
}, device.ios || device.androidChrome ? 100 : 400);
|
|
426
349
|
}
|
|
427
|
-
|
|
428
350
|
preventClick = false;
|
|
429
351
|
targetElement = null;
|
|
430
352
|
return !localPreventClick;
|
|
431
353
|
}
|
|
432
|
-
|
|
433
354
|
function emitAppTouchEvent(name, e) {
|
|
434
355
|
app.emit({
|
|
435
356
|
events: name,
|
|
436
357
|
data: [e]
|
|
437
358
|
});
|
|
438
359
|
}
|
|
439
|
-
|
|
440
360
|
function appClick(e) {
|
|
441
361
|
emitAppTouchEvent('click', e);
|
|
442
362
|
}
|
|
443
|
-
|
|
444
363
|
function appTouchStartActive(e) {
|
|
445
364
|
emitAppTouchEvent('touchstart touchstart:active', e);
|
|
446
365
|
}
|
|
447
|
-
|
|
448
366
|
function appTouchMoveActive(e) {
|
|
449
367
|
emitAppTouchEvent('touchmove touchmove:active', e);
|
|
450
368
|
}
|
|
451
|
-
|
|
452
369
|
function appTouchEndActive(e) {
|
|
453
370
|
emitAppTouchEvent('touchend touchend:active', e);
|
|
454
371
|
}
|
|
455
|
-
|
|
456
372
|
function appTouchStartPassive(e) {
|
|
457
373
|
emitAppTouchEvent('touchstart:passive', e);
|
|
458
374
|
}
|
|
459
|
-
|
|
460
375
|
function appTouchMovePassive(e) {
|
|
461
376
|
emitAppTouchEvent('touchmove:passive', e);
|
|
462
377
|
}
|
|
463
|
-
|
|
464
378
|
function appTouchEndPassive(e) {
|
|
465
379
|
emitAppTouchEvent('touchend:passive', e);
|
|
466
380
|
}
|
|
467
|
-
|
|
468
381
|
const passiveListener = support.passiveListener ? {
|
|
469
382
|
passive: true
|
|
470
383
|
} : false;
|
|
@@ -480,7 +393,6 @@ function initTouch() {
|
|
|
480
393
|
capture: true
|
|
481
394
|
} : true;
|
|
482
395
|
document.addEventListener('click', appClick, true);
|
|
483
|
-
|
|
484
396
|
if (support.passiveListener) {
|
|
485
397
|
document.addEventListener(app.touchEvents.start, appTouchStartActive, activeListenerCapture);
|
|
486
398
|
document.addEventListener(app.touchEvents.move, appTouchMoveActive, activeListener);
|
|
@@ -502,7 +414,6 @@ function initTouch() {
|
|
|
502
414
|
appTouchEndPassive(e);
|
|
503
415
|
}, false);
|
|
504
416
|
}
|
|
505
|
-
|
|
506
417
|
if (support.touch) {
|
|
507
418
|
app.on('click', handleClick);
|
|
508
419
|
app.on('touchstart', handleTouchStart);
|
|
@@ -519,19 +430,16 @@ function initTouch() {
|
|
|
519
430
|
passive: true
|
|
520
431
|
});
|
|
521
432
|
}
|
|
522
|
-
|
|
523
433
|
document.addEventListener('contextmenu', e => {
|
|
524
434
|
if (params.disableContextMenu && (device.ios || device.android || device.cordova || window.Capacitor && window.Capacitor.isNative)) {
|
|
525
435
|
e.preventDefault();
|
|
526
436
|
}
|
|
527
|
-
|
|
528
437
|
if (useRipple) {
|
|
529
438
|
if (activableElement) removeActive();
|
|
530
439
|
rippleTouchEnd();
|
|
531
440
|
}
|
|
532
441
|
});
|
|
533
442
|
}
|
|
534
|
-
|
|
535
443
|
export default {
|
|
536
444
|
name: 'touch',
|
|
537
445
|
params: {
|
|
@@ -550,12 +458,10 @@ export default {
|
|
|
550
458
|
activeStateOnMouseMove: false,
|
|
551
459
|
mdTouchRipple: true,
|
|
552
460
|
iosTouchRipple: false,
|
|
553
|
-
|
|
554
|
-
touchRippleElements: '.ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .menu-item-content, .list.accordion-list .accordion-item-toggle',
|
|
461
|
+
touchRippleElements: '.ripple, .link, .item-link, .list label.item-content, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .menu-item-content, .list.accordion-list .accordion-item-toggle',
|
|
555
462
|
touchRippleInsetElements: '.ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back'
|
|
556
463
|
}
|
|
557
464
|
},
|
|
558
|
-
|
|
559
465
|
create() {
|
|
560
466
|
const app = this;
|
|
561
467
|
const support = getSupport();
|
|
@@ -567,7 +473,6 @@ export default {
|
|
|
567
473
|
}
|
|
568
474
|
});
|
|
569
475
|
},
|
|
570
|
-
|
|
571
476
|
on: {
|
|
572
477
|
init: initTouch
|
|
573
478
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-beta.1",
|
|
4
4
|
"description": "Full featured mobile HTML framework for building iOS & Android apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"./css/bundle/rtl": "./framework7-bundle-rtl.css",
|
|
19
19
|
"./types": "./framework7-types.d.ts",
|
|
20
20
|
"./shared/*": "./shared/*",
|
|
21
|
-
"./components/appbar": "./components/appbar/appbar.js",
|
|
22
|
-
"./components/appbar/less": "./components/appbar/appbar.less",
|
|
23
|
-
"./components/appbar/css": "./components/appbar/appbar.css",
|
|
24
|
-
"./components/appbar/css/rtl": "./components/appbar/appbar-rtl.css",
|
|
25
21
|
"./components/dialog": "./components/dialog/dialog.js",
|
|
26
22
|
"./components/dialog/less": "./components/dialog/dialog.less",
|
|
27
23
|
"./components/dialog/css": "./components/dialog/dialog.css",
|
|
@@ -230,10 +226,6 @@
|
|
|
230
226
|
"./components/area-chart/less": "./components/area-chart/area-chart.less",
|
|
231
227
|
"./components/area-chart/css": "./components/area-chart/area-chart.css",
|
|
232
228
|
"./components/area-chart/css/rtl": "./components/area-chart/area-chart-rtl.css",
|
|
233
|
-
"./components/elevation": "./components/elevation/elevation.js",
|
|
234
|
-
"./components/elevation/less": "./components/elevation/elevation.less",
|
|
235
|
-
"./components/elevation/css": "./components/elevation/elevation.css",
|
|
236
|
-
"./components/elevation/css/rtl": "./components/elevation/elevation-rtl.css",
|
|
237
229
|
"./components/typography": "./components/typography/typography.js",
|
|
238
230
|
"./components/typography/less": "./components/typography/typography.less",
|
|
239
231
|
"./components/typography/css": "./components/typography/typography.css",
|
|
@@ -249,9 +241,6 @@
|
|
|
249
241
|
".": [
|
|
250
242
|
"./framework7.d.ts"
|
|
251
243
|
],
|
|
252
|
-
"components/appbar": [
|
|
253
|
-
"./components/appbar/appbar.d.ts"
|
|
254
|
-
],
|
|
255
244
|
"components/dialog": [
|
|
256
245
|
"./components/dialog/dialog.d.ts"
|
|
257
246
|
],
|
|
@@ -421,9 +410,6 @@
|
|
|
421
410
|
"*.css",
|
|
422
411
|
"shared/dom7.js"
|
|
423
412
|
],
|
|
424
|
-
"scripts": {
|
|
425
|
-
"postinstall": "node postinstall.js"
|
|
426
|
-
},
|
|
427
413
|
"repository": {
|
|
428
414
|
"type": "git",
|
|
429
415
|
"url": "https://github.com/framework7io/framework7.git"
|
|
@@ -461,10 +447,10 @@
|
|
|
461
447
|
},
|
|
462
448
|
"dependencies": {
|
|
463
449
|
"dom7": "^4.0.4",
|
|
464
|
-
"htm": "^3.1.
|
|
450
|
+
"htm": "^3.1.1",
|
|
465
451
|
"path-to-regexp": "^6.2.0",
|
|
466
|
-
"skeleton-elements": "^4.0.
|
|
452
|
+
"skeleton-elements": "^4.0.1",
|
|
467
453
|
"ssr-window": "^4.0.2",
|
|
468
|
-
"swiper": "^
|
|
454
|
+
"swiper": "^9.0.0-beta.21"
|
|
469
455
|
}
|
|
470
456
|
}
|
package/shared/$jsx.js
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
/* eslint-disable prefer-rest-params */
|
|
2
2
|
const $jsx = function (tag, props) {
|
|
3
3
|
const attrs = props || {};
|
|
4
|
-
|
|
5
4
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
6
5
|
args[_key - 2] = arguments[_key];
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
const children = args || [];
|
|
10
8
|
const attrsString = Object.keys(attrs).map(attr => {
|
|
11
9
|
if (attr[0] === '_') {
|
|
12
10
|
if (attrs[attr]) return attr.replace('_', '');
|
|
13
11
|
return '';
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
return `${attr}="${attrs[attr]}"`;
|
|
17
14
|
}).filter(attr => !!attr).join(' ');
|
|
18
|
-
|
|
19
15
|
if (['path', 'img', 'circle', 'polygon', 'line', 'input'].indexOf(tag) >= 0) {
|
|
20
16
|
return `<${tag} ${attrsString} />`.trim();
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
const childrenContent = children.filter(c => !!c).map(c => Array.isArray(c) ? c.join('') : c).join('');
|
|
24
19
|
return `<${tag} ${attrsString}>${childrenContent}</${tag}>`.trim();
|
|
25
20
|
};
|
|
26
|
-
|
|
27
21
|
export default $jsx;
|