framework7 7.1.5 → 8.0.0-beta.2
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.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.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.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 +32 -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.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.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.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.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.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.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.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 +27 -132
- 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.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.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.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.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.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.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.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.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.less +10 -3
- package/components/skeleton/skeleton.less +0 -3
- package/components/smart-select/smart-select-class.js +39 -176
- package/components/smart-select/smart-select.d.ts +3 -3
- package/components/smart-select/smart-select.js +2 -14
- 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 +15 -48
- package/components/swiper/swiper.less +0 -15
- 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.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.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.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.less +0 -3
- package/framework7-bundle-rtl.css +3064 -6057
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +3063 -6059
- package/framework7-bundle.esm.js +4 -10
- package/framework7-bundle.js +6442 -12377
- 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-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.less +2 -23
- package/framework7.min.css +3 -3
- package/less/mixins.less +7 -88
- 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 -250
- 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 +3 -14
- 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/accordion/accordion.lazy.js +0 -1
- package/components/actions/actions-aurora.less +0 -9
- package/components/actions/actions.lazy.js +0 -1
- 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/area-chart/area-chart.lazy.js +0 -1
- package/components/autocomplete/autocomplete-aurora.less +0 -17
- package/components/autocomplete/autocomplete.lazy.js +0 -1
- 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/breadcrumbs/breadcrumbs.lazy.js +0 -1
- package/components/button/button-aurora.less +0 -25
- package/components/calendar/calendar-aurora.less +0 -2
- package/components/calendar/calendar.lazy.js +0 -1
- package/components/card/card-aurora.less +0 -2
- package/components/card/card.lazy.js +0 -1
- package/components/checkbox/checkbox-aurora.less +0 -39
- package/components/checkbox/checkbox.lazy.js +0 -1
- package/components/chip/chip-aurora.less +0 -14
- package/components/chip/chip.lazy.js +0 -1
- package/components/color-picker/color-picker-aurora.less +0 -2
- package/components/color-picker/color-picker.lazy.js +0 -1
- package/components/contacts-list/contacts-list-aurora.less +0 -2
- package/components/contacts-list/contacts-list.lazy.js +0 -1
- package/components/data-table/data-table-aurora.less +0 -64
- package/components/data-table/data-table.lazy.js +0 -1
- package/components/dialog/dialog-aurora.less +0 -112
- package/components/dialog/dialog.lazy.js +0 -1
- 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/fab/fab.lazy.js +0 -1
- package/components/form/form-aurora.less +0 -0
- package/components/form/form.lazy.js +0 -1
- package/components/gauge/gauge-aurora.less +0 -2
- package/components/gauge/gauge.lazy.js +0 -1
- package/components/grid/grid-aurora.less +0 -2
- package/components/grid/grid.lazy.js +0 -1
- package/components/icon/icon-aurora.less +0 -49
- package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
- package/components/infinite-scroll/infinite-scroll.lazy.js +0 -1
- package/components/input/input-aurora.less +0 -120
- package/components/input/input.lazy.js +0 -1
- 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/list-index/list-index.lazy.js +0 -1
- package/components/login-screen/login-screen-aurora.less +0 -2
- package/components/login-screen/login-screen.lazy.js +0 -1
- 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/messagebar/messagebar.lazy.js +0 -1
- package/components/messages/messages-aurora.less +0 -137
- package/components/messages/messages.lazy.js +0 -1
- package/components/navbar/navbar-aurora.less +0 -70
- package/components/notification/notification-aurora.less +0 -59
- package/components/notification/notification.lazy.js +0 -1
- package/components/page/page-aurora.less +0 -49
- package/components/panel/panel-aurora.less +0 -2
- package/components/panel/panel.lazy.js +0 -1
- package/components/photo-browser/photo-browser-aurora.less +0 -2
- package/components/photo-browser/photo-browser.lazy.js +0 -1
- package/components/picker/picker-aurora.less +0 -2
- package/components/picker/picker.lazy.js +0 -1
- package/components/pie-chart/pie-chart-aurora.less +0 -2
- package/components/pie-chart/pie-chart.lazy.js +0 -1
- package/components/popover/popover-aurora.less +0 -56
- package/components/popover/popover.lazy.js +0 -1
- package/components/popup/popup-aurora.less +0 -2
- package/components/popup/popup.lazy.js +0 -1
- package/components/preloader/preloader-aurora.less +0 -53
- package/components/preloader/preloader.lazy.js +0 -1
- package/components/progressbar/progressbar-aurora.less +0 -72
- package/components/progressbar/progressbar.lazy.js +0 -1
- package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +0 -1
- package/components/radio/radio-aurora.less +0 -86
- package/components/radio/radio.lazy.js +0 -1
- package/components/range/range-aurora.less +0 -9
- package/components/range/range.lazy.js +0 -1
- package/components/searchbar/searchbar-aurora.less +0 -86
- package/components/searchbar/searchbar.lazy.js +0 -1
- package/components/sheet/sheet-aurora.less +0 -2
- package/components/sheet/sheet.lazy.js +0 -1
- package/components/skeleton/skeleton-aurora.less +0 -2
- package/components/skeleton/skeleton.lazy.js +0 -1
- package/components/smart-select/smart-select-aurora.less +0 -2
- package/components/smart-select/smart-select.lazy.js +0 -1
- package/components/sortable/sortable-aurora.less +0 -7
- package/components/sortable/sortable.lazy.js +0 -1
- package/components/statusbar/statusbar-aurora.less +0 -2
- package/components/stepper/stepper-aurora.less +0 -32
- package/components/stepper/stepper.lazy.js +0 -1
- package/components/subnavbar/subnavbar-aurora.less +0 -51
- package/components/swipeout/swipeout-aurora.less +0 -2
- package/components/swipeout/swipeout.lazy.js +0 -1
- package/components/swiper/swiper-aurora.less +0 -2
- package/components/swiper/swiper.lazy.js +0 -1
- package/components/tabs/tabs-aurora.less +0 -2
- package/components/tabs/tabs.lazy.js +0 -1
- package/components/text-editor/text-editor-aurora.less +0 -9
- package/components/text-editor/text-editor.lazy.js +0 -1
- package/components/timeline/timeline-aurora.less +0 -7
- package/components/timeline/timeline.lazy.js +0 -1
- package/components/toast/toast-aurora.less +0 -64
- package/components/toast/toast.lazy.js +0 -1
- package/components/toggle/toggle-aurora.less +0 -26
- package/components/toggle/toggle.lazy.js +0 -1
- package/components/toolbar/toolbar-aurora.less +0 -43
- package/components/tooltip/tooltip-aurora.less +0 -2
- package/components/tooltip/tooltip.lazy.js +0 -1
- package/components/touch-ripple/touch-ripple-aurora.less +0 -2
- package/components/treeview/treeview-aurora.less +0 -31
- package/components/treeview/treeview.lazy.js +0 -1
- package/components/typography/typography-aurora.less +0 -2
- package/components/typography/typography.lazy.js +0 -1
- package/components/view/view-aurora.less +0 -2
- package/components/virtual-list/virtual-list-aurora.less +0 -2
- package/components/virtual-list/virtual-list.lazy.js +0 -1
- package/framework7.js +0 -14715
- package/framework7.js.map +0 -1
- package/framework7.min.js +0 -14
- package/framework7.min.js.map +0 -1
- package/modules/request/request.d.ts +0 -15
- package/modules/request/request.js +0 -11
- package/shared/request.d.ts +0 -115
- package/shared/request.js +0 -512
package/components/fab/fab.less
CHANGED
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
width: var(--f7-fab-size);
|
|
92
92
|
height: var(--f7-fab-size);
|
|
93
93
|
box-shadow: var(--f7-fab-box-shadow);
|
|
94
|
-
border-radius:
|
|
94
|
+
border-radius: var(--f7-fab-border-radius);
|
|
95
95
|
position: relative;
|
|
96
96
|
transition-duration: 300ms;
|
|
97
97
|
display: flex;
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
.fab-buttons {
|
|
123
123
|
a {
|
|
124
|
-
border-radius:
|
|
124
|
+
border-radius: var(--f7-fab-border-radius);
|
|
125
125
|
width: var(--f7-fab-button-size);
|
|
126
126
|
height: var(--f7-fab-button-size);
|
|
127
127
|
}
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
}
|
|
276
276
|
// Morph
|
|
277
277
|
.fab-morph {
|
|
278
|
-
border-radius:
|
|
278
|
+
border-radius: var(--f7-fab-border-radius);
|
|
279
279
|
background: var(--f7-fab-bg-color, var(--f7-theme-color));
|
|
280
280
|
box-shadow: var(--f7-fab-box-shadow);
|
|
281
281
|
> a {
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
padding: var(--f7-fab-extended-text-padding);
|
|
322
322
|
font-weight: var(--f7-fab-extended-text-font-weight);
|
|
323
323
|
letter-spacing: var(--f7-fab-extended-text-letter-spacing);
|
|
324
|
-
text-transform:
|
|
324
|
+
text-transform: var(--f7-fab-extended-text-transform);
|
|
325
325
|
}
|
|
326
326
|
// Labels
|
|
327
327
|
.fab-label-button {
|
|
@@ -409,45 +409,45 @@
|
|
|
409
409
|
.md .toolbar-bottom-md ~ .fab-right-bottom {
|
|
410
410
|
margin-bottom: var(--f7-toolbar-height);
|
|
411
411
|
}
|
|
412
|
-
.tabbar-
|
|
413
|
-
.tabbar-
|
|
414
|
-
.tabbar-
|
|
415
|
-
.tabbar-
|
|
416
|
-
.tabbar-
|
|
417
|
-
.tabbar-
|
|
418
|
-
.ios .tabbar-
|
|
419
|
-
.ios .tabbar-
|
|
420
|
-
.ios .tabbar-
|
|
421
|
-
.ios .tabbar-
|
|
422
|
-
.ios .tabbar-
|
|
423
|
-
.ios .tabbar-
|
|
424
|
-
.md .tabbar-
|
|
425
|
-
.md .tabbar-
|
|
426
|
-
.md .tabbar-
|
|
427
|
-
.md .tabbar-
|
|
428
|
-
.md .tabbar-
|
|
429
|
-
.md .tabbar-
|
|
430
|
-
margin-bottom: var(--f7-tabbar-
|
|
431
|
-
}
|
|
432
|
-
.tabbar-
|
|
433
|
-
.tabbar-
|
|
434
|
-
.tabbar-
|
|
435
|
-
.tabbar-
|
|
436
|
-
.tabbar-
|
|
437
|
-
.tabbar-
|
|
438
|
-
.ios .tabbar-
|
|
439
|
-
.ios .tabbar-
|
|
440
|
-
.ios .tabbar-
|
|
441
|
-
.ios .tabbar-
|
|
442
|
-
.ios .tabbar-
|
|
443
|
-
.ios .tabbar-
|
|
444
|
-
.md .tabbar-
|
|
445
|
-
.md .tabbar-
|
|
446
|
-
.md .tabbar-
|
|
447
|
-
.md .tabbar-
|
|
448
|
-
.md .tabbar-
|
|
449
|
-
.md .tabbar-
|
|
450
|
-
margin-top: var(--f7-tabbar-
|
|
412
|
+
.tabbar-icons.toolbar-bottom ~ * .fab-left-bottom,
|
|
413
|
+
.tabbar-icons.toolbar-bottom ~ * .fab-center-bottom,
|
|
414
|
+
.tabbar-icons.toolbar-bottom ~ * .fab-right-bottom,
|
|
415
|
+
.tabbar-icons.toolbar-bottom ~ .fab-left-bottom,
|
|
416
|
+
.tabbar-icons.toolbar-bottom ~ .fab-center-bottom,
|
|
417
|
+
.tabbar-icons.toolbar-bottom ~ .fab-right-bottom,
|
|
418
|
+
.ios .tabbar-icons.toolbar-bottom-ios ~ * .fab-left-bottom,
|
|
419
|
+
.ios .tabbar-icons.toolbar-bottom-ios ~ * .fab-center-bottom,
|
|
420
|
+
.ios .tabbar-icons.toolbar-bottom-ios ~ * .fab-right-bottom,
|
|
421
|
+
.ios .tabbar-icons.toolbar-bottom-ios ~ .fab-left-bottom,
|
|
422
|
+
.ios .tabbar-icons.toolbar-bottom-ios ~ .fab-center-bottom,
|
|
423
|
+
.ios .tabbar-icons.toolbar-bottom-ios ~ .fab-right-bottom,
|
|
424
|
+
.md .tabbar-icons.toolbar-bottom-md ~ * .fab-left-bottom,
|
|
425
|
+
.md .tabbar-icons.toolbar-bottom-md ~ * .fab-center-bottom,
|
|
426
|
+
.md .tabbar-icons.toolbar-bottom-md ~ * .fab-right-bottom,
|
|
427
|
+
.md .tabbar-icons.toolbar-bottom-md ~ .fab-left-bottom,
|
|
428
|
+
.md .tabbar-icons.toolbar-bottom-md ~ .fab-center-bottom,
|
|
429
|
+
.md .tabbar-icons.toolbar-bottom-md ~ .fab-right-bottom {
|
|
430
|
+
margin-bottom: var(--f7-tabbar-icons-height);
|
|
431
|
+
}
|
|
432
|
+
.tabbar-icons.toolbar-top ~ * .fab-left-bottom,
|
|
433
|
+
.tabbar-icons.toolbar-top ~ * .fab-center-bottom,
|
|
434
|
+
.tabbar-icons.toolbar-top ~ * .fab-right-bottom,
|
|
435
|
+
.tabbar-icons.toolbar-top ~ .fab-left-bottom,
|
|
436
|
+
.tabbar-icons.toolbar-top ~ .fab-center-bottom,
|
|
437
|
+
.tabbar-icons.toolbar-top ~ .fab-right-bottom,
|
|
438
|
+
.ios .tabbar-icons.toolbar-top-ios ~ * .fab-left-bottom,
|
|
439
|
+
.ios .tabbar-icons.toolbar-top-ios ~ * .fab-center-bottom,
|
|
440
|
+
.ios .tabbar-icons.toolbar-top-ios ~ * .fab-right-bottom,
|
|
441
|
+
.ios .tabbar-icons.toolbar-top-ios ~ .fab-left-bottom,
|
|
442
|
+
.ios .tabbar-icons.toolbar-top-ios ~ .fab-center-bottom,
|
|
443
|
+
.ios .tabbar-icons.toolbar-top-ios ~ .fab-right-bottom,
|
|
444
|
+
.md .tabbar-icons.toolbar-top-md ~ * .fab-left-bottom,
|
|
445
|
+
.md .tabbar-icons.toolbar-top-md ~ * .fab-center-bottom,
|
|
446
|
+
.md .tabbar-icons.toolbar-top-md ~ * .fab-right-bottom,
|
|
447
|
+
.md .tabbar-icons.toolbar-top-md ~ .fab-left-bottom,
|
|
448
|
+
.md .tabbar-icons.toolbar-top-md ~ .fab-center-bottom,
|
|
449
|
+
.md .tabbar-icons.toolbar-top-md ~ .fab-right-bottom {
|
|
450
|
+
margin-top: var(--f7-tabbar-icons-height);
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
.messagebar ~ * .fab-left-bottom,
|
|
@@ -474,9 +474,9 @@
|
|
|
474
474
|
);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
+ .toolbar-top.tabbar-
|
|
478
|
-
.ios & + .toolbar-top-ios.tabbar-
|
|
479
|
-
.md & + .toolbar-top-ios.tabbar-
|
|
477
|
+
+ .toolbar-top.tabbar-icons,
|
|
478
|
+
.ios & + .toolbar-top-ios.tabbar-icons,
|
|
479
|
+
.md & + .toolbar-top-ios.tabbar-icons {
|
|
480
480
|
~ * .fab-left-top,
|
|
481
481
|
~ * .fab-center-top,
|
|
482
482
|
~ * .fab-right-top,
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
~ .fab-center-top,
|
|
485
485
|
~ .fab-right-top {
|
|
486
486
|
margin-top: calc(
|
|
487
|
-
var(--f7-tabbar-
|
|
487
|
+
var(--f7-tabbar-icons-height) + var(--f7-navbar-height) + var(--f7-safe-area-top)
|
|
488
488
|
);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
@@ -503,8 +503,8 @@
|
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
+ .toolbar-top.tabbar-
|
|
507
|
-
.ios & + .toolbar-top-ios.tabbar-
|
|
506
|
+
+ .toolbar-top.tabbar-icons,
|
|
507
|
+
.ios & + .toolbar-top-ios.tabbar-icons {
|
|
508
508
|
~ * .fab-left-top,
|
|
509
509
|
~ * .fab-center-top,
|
|
510
510
|
~ * .fab-right-top,
|
|
@@ -512,7 +512,7 @@
|
|
|
512
512
|
~ .fab-center-top,
|
|
513
513
|
~ .fab-right-top {
|
|
514
514
|
margin-top: calc(
|
|
515
|
-
var(--f7-tabbar-
|
|
515
|
+
var(--f7-tabbar-icons-height) + var(--f7-navbar-height) + var(--f7-safe-area-top)
|
|
516
516
|
);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
@@ -524,6 +524,3 @@
|
|
|
524
524
|
.if-md-theme({
|
|
525
525
|
@import './fab-md.less';
|
|
526
526
|
});
|
|
527
|
-
.if-aurora-theme({
|
|
528
|
-
@import './fab-aurora.less';
|
|
529
|
-
});
|
|
@@ -50,13 +50,13 @@ export namespace Form {
|
|
|
50
50
|
formStoreData: (form: HTMLElement, data: object) => void;
|
|
51
51
|
|
|
52
52
|
/** Event will be triggered right after for data saved */
|
|
53
|
-
formAjaxSuccess: (form: HTMLElement, data: object,
|
|
53
|
+
formAjaxSuccess: (form: HTMLElement, data: object, response: Response) => void;
|
|
54
54
|
/** Event will be triggered right after for data saved */
|
|
55
|
-
formAjaxComplete: (form: HTMLElement, data: object,
|
|
55
|
+
formAjaxComplete: (form: HTMLElement, data: object, response: Response) => void;
|
|
56
56
|
/** Event will be triggered right after for data saved */
|
|
57
|
-
formAjaxBeforeSend: (form: HTMLElement, data: object
|
|
57
|
+
formAjaxBeforeSend: (form: HTMLElement, data: object) => void;
|
|
58
58
|
/** Event will be triggered right after for data saved */
|
|
59
|
-
formAjaxError: (form: HTMLElement, data: object,
|
|
59
|
+
formAjaxError: (form: HTMLElement, data: object, error: any) => void;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
declare const FormComponent: Framework7Plugin;
|
package/components/form/form.js
CHANGED
|
@@ -1,70 +1,63 @@
|
|
|
1
1
|
import { getWindow, getDocument } from 'ssr-window';
|
|
2
2
|
import $ from '../../shared/dom7.js';
|
|
3
|
-
import { extend, serializeObject } from '../../shared/utils.js';
|
|
3
|
+
import { extend, serializeObject } from '../../shared/utils.js';
|
|
4
4
|
|
|
5
|
+
// Form Data
|
|
5
6
|
const FormData = {
|
|
6
7
|
store(form, data) {
|
|
7
8
|
const app = this;
|
|
8
9
|
const window = getWindow();
|
|
9
10
|
let formId = form;
|
|
10
11
|
const $formEl = $(form);
|
|
11
|
-
|
|
12
12
|
if ($formEl.length && $formEl.is('form') && $formEl.attr('id')) {
|
|
13
13
|
formId = $formEl.attr('id');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
app.form.data[`form-${formId}`] = data; // Store form data in local storage also
|
|
14
|
+
}
|
|
15
|
+
// Store form data in app.formsData
|
|
16
|
+
app.form.data[`form-${formId}`] = data;
|
|
18
17
|
|
|
18
|
+
// Store form data in local storage also
|
|
19
19
|
window.localStorage[`f7form-${formId}`] = JSON.stringify(data);
|
|
20
20
|
},
|
|
21
|
-
|
|
22
21
|
get(form) {
|
|
23
22
|
const app = this;
|
|
24
23
|
const window = getWindow();
|
|
25
24
|
let formId = form;
|
|
26
25
|
const $formEl = $(form);
|
|
27
|
-
|
|
28
26
|
if ($formEl.length && $formEl.is('form') && $formEl.attr('id')) {
|
|
29
27
|
formId = $formEl.attr('id');
|
|
30
28
|
}
|
|
31
|
-
|
|
32
29
|
if (window.localStorage[`f7form-${formId}`]) {
|
|
33
30
|
return JSON.parse(window.localStorage[`f7form-${formId}`]);
|
|
34
31
|
}
|
|
35
|
-
|
|
36
32
|
if (app.form.data[`form-${formId}`]) {
|
|
37
33
|
return app.form.data[`form-${formId}`];
|
|
38
34
|
}
|
|
39
|
-
|
|
40
35
|
return undefined;
|
|
41
36
|
},
|
|
42
|
-
|
|
43
37
|
remove(form) {
|
|
44
38
|
const app = this;
|
|
45
39
|
const window = getWindow();
|
|
46
40
|
let formId = form;
|
|
47
41
|
const $formEl = $(form);
|
|
48
|
-
|
|
49
42
|
if ($formEl.length && $formEl.is('form') && $formEl.attr('id')) {
|
|
50
43
|
formId = $formEl.attr('id');
|
|
51
|
-
}
|
|
52
|
-
|
|
44
|
+
}
|
|
53
45
|
|
|
46
|
+
// Delete form data from app.formsData
|
|
54
47
|
if (app.form.data[`form-${formId}`]) {
|
|
55
48
|
app.form.data[`form-${formId}`] = '';
|
|
56
49
|
delete app.form.data[`form-${formId}`];
|
|
57
|
-
}
|
|
58
|
-
|
|
50
|
+
}
|
|
59
51
|
|
|
52
|
+
// Delete form data from local storage also
|
|
60
53
|
if (window.localStorage[`f7form-${formId}`]) {
|
|
61
54
|
window.localStorage[`f7form-${formId}`] = '';
|
|
62
55
|
window.localStorage.removeItem(`f7form-${formId}`);
|
|
63
56
|
}
|
|
64
57
|
}
|
|
58
|
+
};
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
// Form Storage
|
|
68
61
|
const FormStorage = {
|
|
69
62
|
init(formEl) {
|
|
70
63
|
const app = this;
|
|
@@ -72,11 +65,9 @@ const FormStorage = {
|
|
|
72
65
|
const formId = $formEl.attr('id');
|
|
73
66
|
if (!formId) return;
|
|
74
67
|
const initialData = app.form.getFormData(formId);
|
|
75
|
-
|
|
76
68
|
if (initialData) {
|
|
77
69
|
app.form.fillFromData($formEl, initialData);
|
|
78
70
|
}
|
|
79
|
-
|
|
80
71
|
function store() {
|
|
81
72
|
const data = app.form.convertToData($formEl);
|
|
82
73
|
if (!data) return;
|
|
@@ -84,39 +75,36 @@ const FormStorage = {
|
|
|
84
75
|
$formEl.trigger('form:storedata', data);
|
|
85
76
|
app.emit('formStoreData', $formEl[0], data);
|
|
86
77
|
}
|
|
87
|
-
|
|
88
78
|
$formEl.on('change submit', store);
|
|
89
79
|
},
|
|
90
|
-
|
|
91
80
|
destroy(formEl) {
|
|
92
81
|
const $formEl = $(formEl);
|
|
93
82
|
$formEl.off('change submit');
|
|
94
83
|
}
|
|
84
|
+
};
|
|
95
85
|
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
// Form To/From Data
|
|
98
87
|
function formToData(formEl) {
|
|
99
88
|
const app = this;
|
|
100
89
|
const $formEl = $(formEl).eq(0);
|
|
101
|
-
if ($formEl.length === 0) return undefined;
|
|
90
|
+
if ($formEl.length === 0) return undefined;
|
|
102
91
|
|
|
103
|
-
|
|
92
|
+
// Form data
|
|
93
|
+
const data = {};
|
|
104
94
|
|
|
95
|
+
// Skip input types
|
|
105
96
|
const skipTypes = ['submit', 'image', 'button', 'file'];
|
|
106
97
|
const skipNames = [];
|
|
107
98
|
$formEl.find('input, select, textarea').each(inputEl => {
|
|
108
99
|
const $inputEl = $(inputEl);
|
|
109
|
-
|
|
110
100
|
if ($inputEl.hasClass('ignore-store-data') || $inputEl.hasClass('no-store-data')) {
|
|
111
101
|
return;
|
|
112
102
|
}
|
|
113
|
-
|
|
114
103
|
const name = $inputEl.attr('name');
|
|
115
104
|
const type = $inputEl.attr('type');
|
|
116
105
|
const tag = inputEl.nodeName.toLowerCase();
|
|
117
106
|
if (skipTypes.indexOf(type) >= 0) return;
|
|
118
107
|
if (skipNames.indexOf(name) >= 0 || !name) return;
|
|
119
|
-
|
|
120
108
|
if (tag === 'select' && $inputEl.prop('multiple')) {
|
|
121
109
|
skipNames.push(name);
|
|
122
110
|
data[name] = [];
|
|
@@ -132,14 +120,12 @@ function formToData(formEl) {
|
|
|
132
120
|
if (el.checked) data[name].push(el.value);
|
|
133
121
|
});
|
|
134
122
|
break;
|
|
135
|
-
|
|
136
123
|
case 'radio':
|
|
137
124
|
skipNames.push(name);
|
|
138
125
|
$formEl.find(`input[name="${name}"]`).each(el => {
|
|
139
126
|
if (el.checked) data[name] = el.value;
|
|
140
127
|
});
|
|
141
128
|
break;
|
|
142
|
-
|
|
143
129
|
default:
|
|
144
130
|
data[name] = $inputEl.val();
|
|
145
131
|
break;
|
|
@@ -150,36 +136,31 @@ function formToData(formEl) {
|
|
|
150
136
|
app.emit('formToData', $formEl[0], data);
|
|
151
137
|
return data;
|
|
152
138
|
}
|
|
153
|
-
|
|
154
139
|
function formFromData(formEl, formData) {
|
|
155
140
|
const app = this;
|
|
156
141
|
const $formEl = $(formEl).eq(0);
|
|
157
142
|
if (!$formEl.length) return;
|
|
158
143
|
let data = formData;
|
|
159
144
|
const formId = $formEl.attr('id');
|
|
160
|
-
|
|
161
145
|
if (!data && formId) {
|
|
162
146
|
data = app.form.getFormData(formId);
|
|
163
147
|
}
|
|
148
|
+
if (!data) return;
|
|
164
149
|
|
|
165
|
-
|
|
166
|
-
|
|
150
|
+
// Skip input types
|
|
167
151
|
const skipTypes = ['submit', 'image', 'button', 'file'];
|
|
168
152
|
const skipNames = [];
|
|
169
153
|
$formEl.find('input, select, textarea').each(inputEl => {
|
|
170
154
|
const $inputEl = $(inputEl);
|
|
171
|
-
|
|
172
155
|
if ($inputEl.hasClass('ignore-store-data') || $inputEl.hasClass('no-store-data')) {
|
|
173
156
|
return;
|
|
174
157
|
}
|
|
175
|
-
|
|
176
158
|
const name = $inputEl.attr('name');
|
|
177
159
|
const type = $inputEl.attr('type');
|
|
178
160
|
const tag = inputEl.nodeName.toLowerCase();
|
|
179
161
|
if (typeof data[name] === 'undefined' || data[name] === null) return;
|
|
180
162
|
if (skipTypes.indexOf(type) >= 0) return;
|
|
181
163
|
if (skipNames.indexOf(name) >= 0 || !name) return;
|
|
182
|
-
|
|
183
164
|
if (tag === 'select' && $inputEl.prop('multiple')) {
|
|
184
165
|
skipNames.push(name);
|
|
185
166
|
$formEl.find(`select[name="${name}"] option`).each(el => {
|
|
@@ -195,7 +176,6 @@ function formFromData(formEl, formData) {
|
|
|
195
176
|
if (data[name].indexOf(el.value) >= 0) checkboxEl.checked = true;else checkboxEl.checked = false;
|
|
196
177
|
});
|
|
197
178
|
break;
|
|
198
|
-
|
|
199
179
|
case 'radio':
|
|
200
180
|
skipNames.push(name);
|
|
201
181
|
$formEl.find(`input[name="${name}"]`).each(el => {
|
|
@@ -203,13 +183,11 @@ function formFromData(formEl, formData) {
|
|
|
203
183
|
if (data[name] === el.value) radioEl.checked = true;else radioEl.checked = false;
|
|
204
184
|
});
|
|
205
185
|
break;
|
|
206
|
-
|
|
207
186
|
default:
|
|
208
187
|
$inputEl.val(data[name]);
|
|
209
188
|
break;
|
|
210
189
|
}
|
|
211
190
|
}
|
|
212
|
-
|
|
213
191
|
if (tag === 'select' || tag === 'input' || tag === 'textarea') {
|
|
214
192
|
$inputEl.trigger('change', 'fromdata');
|
|
215
193
|
}
|
|
@@ -217,80 +195,72 @@ function formFromData(formEl, formData) {
|
|
|
217
195
|
$formEl.trigger('form:fromdata', data);
|
|
218
196
|
app.emit('formFromData', $formEl[0], data);
|
|
219
197
|
}
|
|
220
|
-
|
|
221
198
|
function initAjaxForm() {
|
|
222
199
|
const app = this;
|
|
223
200
|
const window = getWindow();
|
|
224
201
|
const document = getDocument();
|
|
225
|
-
|
|
226
202
|
function onSubmitChange(e, fromData) {
|
|
227
203
|
const $formEl = $(this);
|
|
228
204
|
if (e.type === 'change' && !$formEl.hasClass('form-ajax-submit-onchange')) return;
|
|
229
205
|
if (e.type === 'submit') e.preventDefault();
|
|
230
206
|
if (e.type === 'change' && fromData === 'fromdata') return;
|
|
231
207
|
const method = ($formEl.attr('method') || 'GET').toUpperCase();
|
|
232
|
-
const contentType = $formEl.
|
|
233
|
-
|
|
208
|
+
const contentType = $formEl.attr('enctype') || $formEl.prop('enctype');
|
|
209
|
+
let url = $formEl.attr('action');
|
|
234
210
|
if (!url) return;
|
|
235
211
|
let data;
|
|
236
|
-
|
|
237
212
|
if (method === 'POST') {
|
|
238
|
-
if (contentType === 'application/x-www-form-urlencoded') {
|
|
213
|
+
if (contentType === 'application/x-www-form-urlencoded' || contentType === 'application/json') {
|
|
239
214
|
data = app.form.convertToData($formEl[0]);
|
|
215
|
+
if (contentType === 'application/json') {
|
|
216
|
+
data = JSON.stringify(data);
|
|
217
|
+
}
|
|
240
218
|
} else {
|
|
241
219
|
data = new window.FormData($formEl[0]);
|
|
242
220
|
}
|
|
243
221
|
} else {
|
|
244
222
|
data = serializeObject(app.form.convertToData($formEl[0]));
|
|
223
|
+
if (url.includes('?')) {
|
|
224
|
+
url += `&${data}`;
|
|
225
|
+
} else {
|
|
226
|
+
url += `?${data}`;
|
|
227
|
+
}
|
|
245
228
|
}
|
|
246
|
-
|
|
247
|
-
|
|
229
|
+
$formEl.trigger('formajax:beforesend', {
|
|
230
|
+
data
|
|
231
|
+
});
|
|
232
|
+
app.emit('formAjaxBeforeSend', $formEl[0], data);
|
|
233
|
+
fetch(url, {
|
|
248
234
|
method,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
data,
|
|
252
|
-
|
|
253
|
-
beforeSend(xhr) {
|
|
254
|
-
$formEl.trigger('formajax:beforesend', {
|
|
255
|
-
data,
|
|
256
|
-
xhr
|
|
257
|
-
});
|
|
258
|
-
app.emit('formAjaxBeforeSend', $formEl[0], data, xhr);
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
error(xhr) {
|
|
262
|
-
$formEl.trigger('formajax:error', {
|
|
263
|
-
data,
|
|
264
|
-
xhr
|
|
265
|
-
});
|
|
266
|
-
app.emit('formAjaxError', $formEl[0], data, xhr);
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
complete(xhr) {
|
|
270
|
-
$formEl.trigger('formajax:complete', {
|
|
271
|
-
data,
|
|
272
|
-
xhr
|
|
273
|
-
});
|
|
274
|
-
app.emit('formAjaxComplete', $formEl[0], data, xhr);
|
|
235
|
+
headers: {
|
|
236
|
+
'Content-Type': contentType || 'application/x-www-form-urlencoded'
|
|
275
237
|
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
|
|
238
|
+
...(method === 'POST' || method === 'PUT' ? {
|
|
239
|
+
body: data
|
|
240
|
+
} : {})
|
|
241
|
+
}).then(response => {
|
|
242
|
+
$formEl.trigger('formajax:complete', {
|
|
243
|
+
data,
|
|
244
|
+
response
|
|
245
|
+
});
|
|
246
|
+
app.emit('formAjaxComplete', $formEl[0], data, response);
|
|
247
|
+
$formEl.trigger('formajax:success', {
|
|
248
|
+
data,
|
|
249
|
+
response
|
|
250
|
+
});
|
|
251
|
+
app.emit('formAjaxSuccess', $formEl[0], data, response);
|
|
252
|
+
}).catch(error => {
|
|
253
|
+
$formEl.trigger('formajax:error', {
|
|
254
|
+
data,
|
|
255
|
+
error
|
|
256
|
+
});
|
|
257
|
+
app.emit('formAjaxError', $formEl[0], data, error);
|
|
285
258
|
});
|
|
286
259
|
}
|
|
287
|
-
|
|
288
260
|
$(document).on('submit change', 'form.form-ajax-submit, form.form-ajax-submit-onchange', onSubmitChange);
|
|
289
261
|
}
|
|
290
|
-
|
|
291
262
|
export default {
|
|
292
263
|
name: 'form',
|
|
293
|
-
|
|
294
264
|
create() {
|
|
295
265
|
const app = this;
|
|
296
266
|
extend(app, {
|
|
@@ -308,40 +278,34 @@ export default {
|
|
|
308
278
|
}
|
|
309
279
|
});
|
|
310
280
|
},
|
|
311
|
-
|
|
312
281
|
on: {
|
|
313
282
|
init() {
|
|
314
283
|
const app = this;
|
|
315
284
|
initAjaxForm.call(app);
|
|
316
285
|
},
|
|
317
|
-
|
|
318
286
|
tabBeforeRemove(tabEl) {
|
|
319
287
|
const app = this;
|
|
320
288
|
$(tabEl).find('.form-store-data').each(formEl => {
|
|
321
289
|
app.form.storage.destroy(formEl);
|
|
322
290
|
});
|
|
323
291
|
},
|
|
324
|
-
|
|
325
292
|
tabMounted(tabEl) {
|
|
326
293
|
const app = this;
|
|
327
294
|
$(tabEl).find('.form-store-data').each(formEl => {
|
|
328
295
|
app.form.storage.init(formEl);
|
|
329
296
|
});
|
|
330
297
|
},
|
|
331
|
-
|
|
332
298
|
pageBeforeRemove(page) {
|
|
333
299
|
const app = this;
|
|
334
300
|
page.$el.find('.form-store-data').each(formEl => {
|
|
335
301
|
app.form.storage.destroy(formEl);
|
|
336
302
|
});
|
|
337
303
|
},
|
|
338
|
-
|
|
339
304
|
pageInit(page) {
|
|
340
305
|
const app = this;
|
|
341
306
|
page.$el.find('.form-store-data').each(formEl => {
|
|
342
307
|
app.form.storage.init(formEl);
|
|
343
308
|
});
|
|
344
309
|
}
|
|
345
|
-
|
|
346
310
|
}
|
|
347
311
|
};
|
|
@@ -4,19 +4,17 @@ import $ from '../../shared/dom7.js';
|
|
|
4
4
|
import { extend, deleteProps } from '../../shared/utils.js';
|
|
5
5
|
import Framework7Class from '../../shared/class.js';
|
|
6
6
|
/** @jsx $jsx */
|
|
7
|
-
|
|
8
7
|
import $jsx from '../../shared/$jsx.js';
|
|
9
|
-
|
|
10
8
|
class Gauge extends Framework7Class {
|
|
11
9
|
constructor(app, params) {
|
|
12
10
|
if (params === void 0) {
|
|
13
11
|
params = {};
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
super(params, [app]);
|
|
17
14
|
const self = this;
|
|
18
|
-
const defaults = extend({}, app.params.gauge);
|
|
15
|
+
const defaults = extend({}, app.params.gauge);
|
|
19
16
|
|
|
17
|
+
// Extend defaults with modules params
|
|
20
18
|
self.useModulesParams(defaults);
|
|
21
19
|
self.params = extend(defaults, params);
|
|
22
20
|
const {
|
|
@@ -31,13 +29,13 @@ class Gauge extends Framework7Class {
|
|
|
31
29
|
$el,
|
|
32
30
|
el: $el && $el[0]
|
|
33
31
|
});
|
|
34
|
-
$el[0].f7Gauge = self;
|
|
32
|
+
$el[0].f7Gauge = self;
|
|
35
33
|
|
|
34
|
+
// Install Modules
|
|
36
35
|
self.useModules();
|
|
37
36
|
self.init();
|
|
38
37
|
return self;
|
|
39
38
|
}
|
|
40
|
-
|
|
41
39
|
calcRadius() {
|
|
42
40
|
const self = this;
|
|
43
41
|
const {
|
|
@@ -46,13 +44,11 @@ class Gauge extends Framework7Class {
|
|
|
46
44
|
} = self.params;
|
|
47
45
|
return size / 2 - borderWidth / 2;
|
|
48
46
|
}
|
|
49
|
-
|
|
50
47
|
calcBorderLength() {
|
|
51
48
|
const self = this;
|
|
52
49
|
const radius = self.calcRadius();
|
|
53
50
|
return 2 * Math.PI * radius;
|
|
54
51
|
}
|
|
55
|
-
|
|
56
52
|
render() {
|
|
57
53
|
const self = this;
|
|
58
54
|
if (self.params.render) return self.params.render.call(self, self);
|
|
@@ -137,12 +133,10 @@ class Gauge extends Framework7Class {
|
|
|
137
133
|
"dominant-baseline": !semiCircle && 'middle'
|
|
138
134
|
}, labelText));
|
|
139
135
|
}
|
|
140
|
-
|
|
141
136
|
update(newParams) {
|
|
142
137
|
if (newParams === void 0) {
|
|
143
138
|
newParams = {};
|
|
144
139
|
}
|
|
145
|
-
|
|
146
140
|
const self = this;
|
|
147
141
|
const document = getDocument();
|
|
148
142
|
const {
|
|
@@ -183,7 +177,6 @@ class Gauge extends Framework7Class {
|
|
|
183
177
|
Object.keys(svgAttrs).forEach(attr => {
|
|
184
178
|
$svgEl.attr(attr, svgAttrs[attr]);
|
|
185
179
|
});
|
|
186
|
-
|
|
187
180
|
if (semiCircle) {
|
|
188
181
|
const backAttrs = {
|
|
189
182
|
d: `M${size - borderWidth / 2},${size / 2} a1,1 0 0,0 -${size - borderWidth},0`,
|
|
@@ -232,14 +225,12 @@ class Gauge extends Framework7Class {
|
|
|
232
225
|
$svgEl.find('.gauge-front-circle').attr(attr, frontAttrs[attr]);
|
|
233
226
|
});
|
|
234
227
|
}
|
|
235
|
-
|
|
236
228
|
if (valueText) {
|
|
237
229
|
if (!$svgEl.find('.gauge-value-text').length) {
|
|
238
230
|
const textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
239
231
|
textEl.classList.add('gauge-value-text');
|
|
240
232
|
$svgEl.append(textEl);
|
|
241
233
|
}
|
|
242
|
-
|
|
243
234
|
const textAttrs = {
|
|
244
235
|
x: '50%',
|
|
245
236
|
y: semiCircle ? '100%' : '50%',
|
|
@@ -257,14 +248,12 @@ class Gauge extends Framework7Class {
|
|
|
257
248
|
} else {
|
|
258
249
|
$svgEl.find('.gauge-value-text').remove();
|
|
259
250
|
}
|
|
260
|
-
|
|
261
251
|
if (labelText) {
|
|
262
252
|
if (!$svgEl.find('.gauge-label-text').length) {
|
|
263
253
|
const textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
264
254
|
textEl.classList.add('gauge-label-text');
|
|
265
255
|
$svgEl.append(textEl);
|
|
266
256
|
}
|
|
267
|
-
|
|
268
257
|
const labelAttrs = {
|
|
269
258
|
x: '50%',
|
|
270
259
|
y: semiCircle ? '100%' : '50%',
|
|
@@ -282,10 +271,8 @@ class Gauge extends Framework7Class {
|
|
|
282
271
|
} else {
|
|
283
272
|
$svgEl.find('.gauge-label-text').remove();
|
|
284
273
|
}
|
|
285
|
-
|
|
286
274
|
return self;
|
|
287
275
|
}
|
|
288
|
-
|
|
289
276
|
init() {
|
|
290
277
|
const self = this;
|
|
291
278
|
const $svgEl = $(self.render()).eq(0);
|
|
@@ -297,7 +284,6 @@ class Gauge extends Framework7Class {
|
|
|
297
284
|
self.$el.append($svgEl);
|
|
298
285
|
return self;
|
|
299
286
|
}
|
|
300
|
-
|
|
301
287
|
destroy() {
|
|
302
288
|
const self = this;
|
|
303
289
|
if (!self.$el || self.destroyed) return;
|
|
@@ -308,7 +294,5 @@ class Gauge extends Framework7Class {
|
|
|
308
294
|
deleteProps(self);
|
|
309
295
|
self.destroyed = true;
|
|
310
296
|
}
|
|
311
|
-
|
|
312
297
|
}
|
|
313
|
-
|
|
314
298
|
export default Gauge;
|