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
package/modules/router/tab.js
CHANGED
|
@@ -2,12 +2,10 @@ import $ from '../../shared/dom7.js';
|
|
|
2
2
|
import { extend } from '../../shared/utils.js';
|
|
3
3
|
import History from '../../shared/history.js';
|
|
4
4
|
import asyncComponent from './async-component.js';
|
|
5
|
-
|
|
6
5
|
function tabLoad(tabRoute, loadOptions) {
|
|
7
6
|
if (loadOptions === void 0) {
|
|
8
7
|
loadOptions = {};
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
const router = this;
|
|
12
10
|
const options = extend({
|
|
13
11
|
animate: router.params.animate,
|
|
@@ -19,40 +17,37 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
19
17
|
}, loadOptions);
|
|
20
18
|
let currentRoute;
|
|
21
19
|
let previousRoute;
|
|
22
|
-
|
|
23
20
|
if (options.route) {
|
|
24
21
|
// Set Route
|
|
25
22
|
if (!options.preload && options.route !== router.currentRoute) {
|
|
26
23
|
previousRoute = router.previousRoute;
|
|
27
24
|
router.currentRoute = options.route;
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
if (options.preload) {
|
|
31
27
|
currentRoute = options.route;
|
|
32
28
|
previousRoute = router.currentRoute;
|
|
33
29
|
} else {
|
|
34
30
|
currentRoute = router.currentRoute;
|
|
35
31
|
if (!previousRoute) previousRoute = router.previousRoute;
|
|
36
|
-
}
|
|
37
|
-
|
|
32
|
+
}
|
|
38
33
|
|
|
34
|
+
// Update Browser History
|
|
39
35
|
if (router.params.browserHistory && options.browserHistory && !options.reloadPrevious) {
|
|
40
36
|
History[router.params.browserHistoryTabs](router.view.id, {
|
|
41
37
|
url: options.route.url
|
|
42
38
|
}, (router.params.browserHistoryRoot || '') + router.params.browserHistorySeparator + options.route.url);
|
|
43
|
-
}
|
|
44
|
-
|
|
39
|
+
}
|
|
45
40
|
|
|
41
|
+
// Update Router History
|
|
46
42
|
if (options.history) {
|
|
47
43
|
router.history[Math.max(router.history.length - 1, 0)] = options.route.url;
|
|
48
44
|
router.saveHistory();
|
|
49
45
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
46
|
+
}
|
|
52
47
|
|
|
48
|
+
// Show Tab
|
|
53
49
|
const $parentPageEl = $(options.parentPageEl || router.currentPageEl);
|
|
54
50
|
let tabEl;
|
|
55
|
-
|
|
56
51
|
if ($parentPageEl.length && $parentPageEl.find(`#${tabRoute.id}`).length) {
|
|
57
52
|
tabEl = $parentPageEl.find(`#${tabRoute.id}`).eq(0);
|
|
58
53
|
} else if (router.view.selector) {
|
|
@@ -60,7 +55,6 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
60
55
|
} else {
|
|
61
56
|
tabEl = `#${tabRoute.id}`;
|
|
62
57
|
}
|
|
63
|
-
|
|
64
58
|
const tabShowResult = router.app.tab.show({
|
|
65
59
|
tabEl,
|
|
66
60
|
animate: options.animate,
|
|
@@ -72,16 +66,14 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
72
66
|
animated,
|
|
73
67
|
onTabsChanged
|
|
74
68
|
} = tabShowResult;
|
|
75
|
-
|
|
76
69
|
if ($newTabEl && $newTabEl.parents('.page').length > 0 && options.route) {
|
|
77
70
|
const tabParentPageData = $newTabEl.parents('.page')[0].f7Page;
|
|
78
|
-
|
|
79
71
|
if (tabParentPageData && options.route) {
|
|
80
72
|
tabParentPageData.route = options.route;
|
|
81
73
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
74
|
+
}
|
|
84
75
|
|
|
76
|
+
// Tab Content Loaded
|
|
85
77
|
function onTabLoaded(contentEl) {
|
|
86
78
|
// Remove theme elements
|
|
87
79
|
router.removeThemeElements($newTabEl);
|
|
@@ -89,29 +81,24 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
89
81
|
if (typeof contentEl !== 'string') tabEventTarget = $(contentEl);
|
|
90
82
|
tabEventTarget.trigger('tab:init tab:mounted', tabRoute);
|
|
91
83
|
router.emit('tabInit tabMounted', $newTabEl[0], tabRoute);
|
|
92
|
-
|
|
93
84
|
if ($oldTabEl && $oldTabEl.length) {
|
|
94
85
|
if (animated) {
|
|
95
86
|
onTabsChanged(() => {
|
|
96
87
|
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
97
|
-
|
|
98
88
|
if (router.params.unloadTabContent) {
|
|
99
89
|
router.tabRemove($oldTabEl, $newTabEl, tabRoute);
|
|
100
90
|
}
|
|
101
91
|
});
|
|
102
92
|
} else {
|
|
103
93
|
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
104
|
-
|
|
105
94
|
if (router.params.unloadTabContent) {
|
|
106
95
|
router.tabRemove($oldTabEl, $newTabEl, tabRoute);
|
|
107
96
|
}
|
|
108
97
|
}
|
|
109
98
|
}
|
|
110
99
|
}
|
|
111
|
-
|
|
112
100
|
if ($newTabEl[0].f7RouterTabLoaded) {
|
|
113
101
|
if (!$oldTabEl || !$oldTabEl.length) return router;
|
|
114
|
-
|
|
115
102
|
if (animated) {
|
|
116
103
|
onTabsChanged(() => {
|
|
117
104
|
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
@@ -119,11 +106,10 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
119
106
|
} else {
|
|
120
107
|
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
121
108
|
}
|
|
122
|
-
|
|
123
109
|
return router;
|
|
124
|
-
}
|
|
125
|
-
|
|
110
|
+
}
|
|
126
111
|
|
|
112
|
+
// Load Tab Content
|
|
127
113
|
function loadTab(loadTabParams, loadTabOptions) {
|
|
128
114
|
// Load Tab Props
|
|
129
115
|
const {
|
|
@@ -132,17 +118,15 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
132
118
|
el,
|
|
133
119
|
component,
|
|
134
120
|
componentUrl
|
|
135
|
-
} = loadTabParams;
|
|
136
|
-
|
|
121
|
+
} = loadTabParams;
|
|
122
|
+
// Component/Template Callbacks
|
|
137
123
|
function resolve(contentEl) {
|
|
138
124
|
router.allowPageChange = true;
|
|
139
125
|
if (!contentEl) return;
|
|
140
|
-
|
|
141
126
|
if (typeof contentEl === 'string') {
|
|
142
127
|
$newTabEl.html(contentEl);
|
|
143
128
|
} else {
|
|
144
129
|
$newTabEl.html('');
|
|
145
|
-
|
|
146
130
|
if (contentEl.f7Component) {
|
|
147
131
|
contentEl.f7Component.mount(componentEl => {
|
|
148
132
|
$newTabEl.append(componentEl);
|
|
@@ -151,16 +135,13 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
151
135
|
$newTabEl.append(contentEl);
|
|
152
136
|
}
|
|
153
137
|
}
|
|
154
|
-
|
|
155
138
|
$newTabEl[0].f7RouterTabLoaded = true;
|
|
156
139
|
onTabLoaded(contentEl);
|
|
157
140
|
}
|
|
158
|
-
|
|
159
141
|
function reject() {
|
|
160
142
|
router.allowPageChange = true;
|
|
161
143
|
return router;
|
|
162
144
|
}
|
|
163
|
-
|
|
164
145
|
if (content) {
|
|
165
146
|
resolve(content);
|
|
166
147
|
} else if (el) {
|
|
@@ -186,7 +167,6 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
186
167
|
router.xhrAbortController.abort();
|
|
187
168
|
router.xhrAbortController = false;
|
|
188
169
|
}
|
|
189
|
-
|
|
190
170
|
router.xhrRequest(url, loadTabOptions).then(tabContent => {
|
|
191
171
|
resolve(tabContent);
|
|
192
172
|
}).catch(() => {
|
|
@@ -194,7 +174,6 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
194
174
|
});
|
|
195
175
|
}
|
|
196
176
|
}
|
|
197
|
-
|
|
198
177
|
let hasContentLoadProp;
|
|
199
178
|
'url content component el componentUrl'.split(' ').forEach(tabLoadProp => {
|
|
200
179
|
if (tabRoute[tabLoadProp]) {
|
|
@@ -203,16 +182,15 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
203
182
|
[tabLoadProp]: tabRoute[tabLoadProp]
|
|
204
183
|
}, options);
|
|
205
184
|
}
|
|
206
|
-
});
|
|
185
|
+
});
|
|
207
186
|
|
|
187
|
+
// Async
|
|
208
188
|
function asyncResolve(resolveParams, resolveOptions) {
|
|
209
189
|
loadTab(resolveParams, extend(options, resolveOptions));
|
|
210
190
|
}
|
|
211
|
-
|
|
212
191
|
function asyncReject() {
|
|
213
192
|
router.allowPageChange = true;
|
|
214
193
|
}
|
|
215
|
-
|
|
216
194
|
if (tabRoute.async) {
|
|
217
195
|
tabRoute.async.call(router, {
|
|
218
196
|
router,
|
|
@@ -227,19 +205,15 @@ function tabLoad(tabRoute, loadOptions) {
|
|
|
227
205
|
} else if (!hasContentLoadProp) {
|
|
228
206
|
router.allowPageChange = true;
|
|
229
207
|
}
|
|
230
|
-
|
|
231
208
|
return router;
|
|
232
209
|
}
|
|
233
|
-
|
|
234
210
|
function tabRemove($oldTabEl, $newTabEl, tabRoute) {
|
|
235
211
|
const router = this;
|
|
236
212
|
let hasTabComponentChild;
|
|
237
|
-
|
|
238
213
|
if ($oldTabEl[0]) {
|
|
239
214
|
$oldTabEl[0].f7RouterTabLoaded = false;
|
|
240
215
|
delete $oldTabEl[0].f7RouterTabLoaded;
|
|
241
216
|
}
|
|
242
|
-
|
|
243
217
|
$oldTabEl.children().each(tabChild => {
|
|
244
218
|
if (tabChild.f7Component) {
|
|
245
219
|
hasTabComponentChild = true;
|
|
@@ -247,13 +221,10 @@ function tabRemove($oldTabEl, $newTabEl, tabRoute) {
|
|
|
247
221
|
tabChild.f7Component.destroy();
|
|
248
222
|
}
|
|
249
223
|
});
|
|
250
|
-
|
|
251
224
|
if (!hasTabComponentChild) {
|
|
252
225
|
$oldTabEl.trigger('tab:beforeremove', tabRoute);
|
|
253
226
|
}
|
|
254
|
-
|
|
255
227
|
router.emit('tabBeforeRemove', $oldTabEl[0], $newTabEl[0], tabRoute);
|
|
256
228
|
router.removeTabContent($oldTabEl[0], tabRoute);
|
|
257
229
|
}
|
|
258
|
-
|
|
259
230
|
export { tabLoad, tabRemove };
|
|
@@ -2,17 +2,14 @@ import { getWindow } from 'ssr-window';
|
|
|
2
2
|
import { extend } from '../../shared/utils.js';
|
|
3
3
|
const SW = {
|
|
4
4
|
registrations: [],
|
|
5
|
-
|
|
6
5
|
register(path, scope) {
|
|
7
6
|
const app = this;
|
|
8
7
|
const window = getWindow();
|
|
9
|
-
|
|
10
8
|
if (!('serviceWorker' in window.navigator) || !app.serviceWorker.container) {
|
|
11
9
|
return new Promise((resolve, reject) => {
|
|
12
10
|
reject(new Error('Service worker is not supported'));
|
|
13
11
|
});
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
return new Promise((resolve, reject) => {
|
|
17
14
|
app.serviceWorker.container.register(path, scope ? {
|
|
18
15
|
scope
|
|
@@ -26,17 +23,14 @@ const SW = {
|
|
|
26
23
|
});
|
|
27
24
|
});
|
|
28
25
|
},
|
|
29
|
-
|
|
30
26
|
unregister(registration) {
|
|
31
27
|
const app = this;
|
|
32
28
|
const window = getWindow();
|
|
33
|
-
|
|
34
29
|
if (!('serviceWorker' in window.navigator) || !app.serviceWorker.container) {
|
|
35
30
|
return new Promise((resolve, reject) => {
|
|
36
31
|
reject(new Error('Service worker is not supported'));
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
let registrations;
|
|
41
35
|
if (!registration) registrations = SW.registrations;else if (Array.isArray(registration)) registrations = registration;else registrations = [registration];
|
|
42
36
|
return Promise.all(registrations.map(reg => new Promise((resolve, reject) => {
|
|
@@ -44,7 +38,6 @@ const SW = {
|
|
|
44
38
|
if (SW.registrations.indexOf(reg) >= 0) {
|
|
45
39
|
SW.registrations.splice(SW.registrations.indexOf(reg), 1);
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
app.emit('serviceWorkerUnregisterSuccess', reg);
|
|
49
42
|
resolve();
|
|
50
43
|
}).catch(error => {
|
|
@@ -53,7 +46,6 @@ const SW = {
|
|
|
53
46
|
});
|
|
54
47
|
})));
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
};
|
|
58
50
|
export default {
|
|
59
51
|
name: 'sw',
|
|
@@ -63,7 +55,6 @@ export default {
|
|
|
63
55
|
scope: undefined
|
|
64
56
|
}
|
|
65
57
|
},
|
|
66
|
-
|
|
67
58
|
create() {
|
|
68
59
|
const app = this;
|
|
69
60
|
const window = getWindow();
|
|
@@ -76,7 +67,6 @@ export default {
|
|
|
76
67
|
}
|
|
77
68
|
});
|
|
78
69
|
},
|
|
79
|
-
|
|
80
70
|
on: {
|
|
81
71
|
init() {
|
|
82
72
|
const window = getWindow();
|
|
@@ -92,6 +82,5 @@ export default {
|
|
|
92
82
|
app.serviceWorker.register(path, scope);
|
|
93
83
|
});
|
|
94
84
|
}
|
|
95
|
-
|
|
96
85
|
}
|
|
97
86
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
2
|
import { extend } from '../../shared/utils.js';
|
|
3
|
-
|
|
4
3
|
function createStore(storeParams) {
|
|
5
4
|
if (storeParams === void 0) {
|
|
6
5
|
storeParams = {};
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
const store = {
|
|
10
8
|
__store: true
|
|
11
9
|
};
|
|
12
|
-
const originalState = {
|
|
10
|
+
const originalState = {
|
|
11
|
+
...(storeParams.state || {})
|
|
13
12
|
};
|
|
14
|
-
const actions = {
|
|
13
|
+
const actions = {
|
|
14
|
+
...(storeParams.actions || {})
|
|
15
15
|
};
|
|
16
|
-
const getters = {
|
|
16
|
+
const getters = {
|
|
17
|
+
...(storeParams.getters || {})
|
|
17
18
|
};
|
|
18
19
|
const state = extend({}, originalState);
|
|
19
20
|
let propsQueue = [];
|
|
@@ -23,13 +24,11 @@ function createStore(storeParams) {
|
|
|
23
24
|
gettersDependencies[getterKey] = [];
|
|
24
25
|
gettersCallbacks[getterKey] = [];
|
|
25
26
|
});
|
|
26
|
-
|
|
27
27
|
const getGetterValue = getterKey => {
|
|
28
28
|
return getters[getterKey]({
|
|
29
29
|
state: store.state
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
|
|
33
32
|
const addGetterDependencies = (getterKey, deps) => {
|
|
34
33
|
if (!gettersDependencies[getterKey]) gettersDependencies[getterKey] = [];
|
|
35
34
|
deps.forEach(dep => {
|
|
@@ -38,12 +37,10 @@ function createStore(storeParams) {
|
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
};
|
|
41
|
-
|
|
42
40
|
const addGetterCallback = (getterKey, callback) => {
|
|
43
41
|
if (!gettersCallbacks[getterKey]) gettersCallbacks[getterKey] = [];
|
|
44
42
|
gettersCallbacks[getterKey].push(callback);
|
|
45
43
|
};
|
|
46
|
-
|
|
47
44
|
const runGetterCallbacks = stateKey => {
|
|
48
45
|
const keys = Object.keys(gettersDependencies).filter(getterKey => {
|
|
49
46
|
return gettersDependencies[getterKey].indexOf(stateKey) >= 0;
|
|
@@ -55,55 +52,45 @@ function createStore(storeParams) {
|
|
|
55
52
|
});
|
|
56
53
|
});
|
|
57
54
|
};
|
|
58
|
-
|
|
59
55
|
const removeGetterCallback = callback => {
|
|
60
56
|
Object.keys(gettersCallbacks).forEach(stateKey => {
|
|
61
57
|
const callbacks = gettersCallbacks[stateKey];
|
|
62
|
-
|
|
63
58
|
if (callbacks.indexOf(callback) >= 0) {
|
|
64
59
|
callbacks.splice(callbacks.indexOf(callback), 1);
|
|
65
60
|
}
|
|
66
61
|
});
|
|
67
|
-
};
|
|
68
|
-
|
|
62
|
+
};
|
|
69
63
|
|
|
64
|
+
// eslint-disable-next-line
|
|
70
65
|
store.__removeCallback = callback => {
|
|
71
66
|
removeGetterCallback(callback);
|
|
72
67
|
};
|
|
73
|
-
|
|
74
68
|
const getterValue = function (getterKey, addCallback) {
|
|
75
69
|
if (addCallback === void 0) {
|
|
76
70
|
addCallback = true;
|
|
77
71
|
}
|
|
78
|
-
|
|
79
72
|
if (getterKey === 'constructor') return undefined;
|
|
80
73
|
propsQueue = [];
|
|
81
74
|
const value = getGetterValue(getterKey);
|
|
82
75
|
addGetterDependencies(getterKey, propsQueue);
|
|
83
|
-
|
|
84
76
|
const onUpdated = callback => {
|
|
85
77
|
addGetterCallback(getterKey, callback);
|
|
86
78
|
};
|
|
87
|
-
|
|
88
79
|
const obj = {
|
|
89
80
|
value,
|
|
90
81
|
onUpdated
|
|
91
82
|
};
|
|
92
|
-
|
|
93
83
|
if (!addCallback) {
|
|
94
84
|
return obj;
|
|
95
85
|
}
|
|
96
|
-
|
|
97
86
|
const callback = v => {
|
|
98
87
|
obj.value = v;
|
|
99
88
|
};
|
|
100
|
-
|
|
101
89
|
obj.__callback = callback;
|
|
102
|
-
addGetterCallback(getterKey, callback);
|
|
103
|
-
|
|
90
|
+
addGetterCallback(getterKey, callback);
|
|
91
|
+
// eslint-disable-next-line
|
|
104
92
|
return obj;
|
|
105
93
|
};
|
|
106
|
-
|
|
107
94
|
store.state = new Proxy(state, {
|
|
108
95
|
set: (target, prop, value) => {
|
|
109
96
|
target[prop] = value;
|
|
@@ -121,7 +108,6 @@ function createStore(storeParams) {
|
|
|
121
108
|
if (!target[prop]) {
|
|
122
109
|
return undefined;
|
|
123
110
|
}
|
|
124
|
-
|
|
125
111
|
return getterValue(prop, true);
|
|
126
112
|
}
|
|
127
113
|
});
|
|
@@ -131,18 +117,15 @@ function createStore(storeParams) {
|
|
|
131
117
|
if (!target[prop]) {
|
|
132
118
|
return undefined;
|
|
133
119
|
}
|
|
134
|
-
|
|
135
120
|
return getterValue(prop, false);
|
|
136
121
|
}
|
|
137
122
|
});
|
|
138
|
-
|
|
139
123
|
store.dispatch = (actionName, data) => {
|
|
140
124
|
return new Promise((resolve, reject) => {
|
|
141
125
|
if (!actions[actionName]) {
|
|
142
126
|
reject();
|
|
143
127
|
throw new Error(`Framework7: Store action "${actionName}" is not found`);
|
|
144
128
|
}
|
|
145
|
-
|
|
146
129
|
const result = actions[actionName]({
|
|
147
130
|
state: store.state,
|
|
148
131
|
dispatch: store.dispatch
|
|
@@ -150,8 +133,6 @@ function createStore(storeParams) {
|
|
|
150
133
|
resolve(result);
|
|
151
134
|
});
|
|
152
135
|
};
|
|
153
|
-
|
|
154
136
|
return store;
|
|
155
137
|
}
|
|
156
|
-
|
|
157
138
|
export default createStore;
|
package/modules/touch/touch.d.ts
CHANGED
|
@@ -24,15 +24,13 @@ export namespace Touch {
|
|
|
24
24
|
tapHoldPreventClicks?: boolean;
|
|
25
25
|
/** When enabled, app will add "active-state" class to currently touched (:active) element.. (default true) */
|
|
26
26
|
activeState?: boolean;
|
|
27
|
-
/** CSS selector of elements where enabled activeState will add appropriate active class. (default a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .
|
|
27
|
+
/** CSS selector of elements where enabled activeState will add appropriate active class. (default a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .link, .item-link) */
|
|
28
28
|
activeStateElements?: string;
|
|
29
29
|
/** Enables MD-theme specific touch ripple effect. (default true) */
|
|
30
30
|
mdTouchRipple?: boolean;
|
|
31
31
|
/** Enables iOS-theme specific touch ripple effect. (default false) */
|
|
32
32
|
iosTouchRipple?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
auroraTouchRipple?: boolean;
|
|
35
|
-
/** CSS selector of elements to apply touch ripple effect on click. (default .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) */
|
|
33
|
+
/** CSS selector of elements to apply touch ripple effect on click. (default .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) */
|
|
36
34
|
touchRippleElements?: string;
|
|
37
35
|
/** CSS selector of elements to with inset touch ripple effect. (default .ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back) */
|
|
38
36
|
touchRippleInsetElements?: string;
|