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
|
@@ -2,19 +2,17 @@ import $ from '../../shared/dom7.js';
|
|
|
2
2
|
import { extend, deleteProps } from '../../shared/utils.js';
|
|
3
3
|
import Framework7Class from '../../shared/class.js';
|
|
4
4
|
/** @jsx $jsx */
|
|
5
|
-
|
|
6
5
|
import $jsx from '../../shared/$jsx.js';
|
|
7
|
-
|
|
8
6
|
class AreaChart extends Framework7Class {
|
|
9
7
|
constructor(app, params) {
|
|
10
8
|
if (params === void 0) {
|
|
11
9
|
params = {};
|
|
12
10
|
}
|
|
13
|
-
|
|
14
11
|
super(params, [app]);
|
|
15
12
|
const self = this;
|
|
16
|
-
const defaults = extend({}, app.params.areaChart);
|
|
13
|
+
const defaults = extend({}, app.params.areaChart);
|
|
17
14
|
|
|
15
|
+
// Extend defaults with modules params
|
|
18
16
|
self.useModulesParams(defaults);
|
|
19
17
|
self.params = extend(defaults, params);
|
|
20
18
|
const {
|
|
@@ -33,8 +31,9 @@ class AreaChart extends Framework7Class {
|
|
|
33
31
|
f7Tooltip: null,
|
|
34
32
|
linesOffsets: null
|
|
35
33
|
});
|
|
36
|
-
$el[0].f7AreaChart = self;
|
|
34
|
+
$el[0].f7AreaChart = self;
|
|
37
35
|
|
|
36
|
+
// Install Modules
|
|
38
37
|
self.useModules();
|
|
39
38
|
self.onMouseEnter = self.onMouseEnter.bind(self);
|
|
40
39
|
self.onMouseMove = self.onMouseMove.bind(self);
|
|
@@ -43,7 +42,6 @@ class AreaChart extends Framework7Class {
|
|
|
43
42
|
self.init();
|
|
44
43
|
return self;
|
|
45
44
|
}
|
|
46
|
-
|
|
47
45
|
getVisibleLabels() {
|
|
48
46
|
const {
|
|
49
47
|
maxAxisLabels,
|
|
@@ -54,7 +52,6 @@ class AreaChart extends Framework7Class {
|
|
|
54
52
|
const filtered = axisLabels.filter((label, index) => index % skipStep === 0);
|
|
55
53
|
return filtered;
|
|
56
54
|
}
|
|
57
|
-
|
|
58
55
|
getSummValues() {
|
|
59
56
|
const {
|
|
60
57
|
datasets
|
|
@@ -74,7 +71,6 @@ class AreaChart extends Framework7Class {
|
|
|
74
71
|
});
|
|
75
72
|
return summValues;
|
|
76
73
|
}
|
|
77
|
-
|
|
78
74
|
getChartData() {
|
|
79
75
|
const {
|
|
80
76
|
datasets,
|
|
@@ -86,14 +82,11 @@ class AreaChart extends Framework7Class {
|
|
|
86
82
|
hiddenDatasets
|
|
87
83
|
} = this;
|
|
88
84
|
const data = [];
|
|
89
|
-
|
|
90
85
|
if (!datasets.length) {
|
|
91
86
|
return data;
|
|
92
87
|
}
|
|
93
|
-
|
|
94
88
|
const lastValues = datasets[0].values.map(() => 0);
|
|
95
89
|
let maxValue = 0;
|
|
96
|
-
|
|
97
90
|
if (lineChart) {
|
|
98
91
|
datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).forEach(_ref2 => {
|
|
99
92
|
let {
|
|
@@ -105,7 +98,6 @@ class AreaChart extends Framework7Class {
|
|
|
105
98
|
} else {
|
|
106
99
|
maxValue = Math.max(...this.getSummValues());
|
|
107
100
|
}
|
|
108
|
-
|
|
109
101
|
datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).forEach(_ref3 => {
|
|
110
102
|
let {
|
|
111
103
|
label,
|
|
@@ -117,18 +109,14 @@ class AreaChart extends Framework7Class {
|
|
|
117
109
|
const value = lineChart ? originalValue : lastValues[valueIndex];
|
|
118
110
|
const x = valueIndex / (values.length - 1) * width;
|
|
119
111
|
const y = height - value / maxValue * height;
|
|
120
|
-
|
|
121
112
|
if (lineChart) {
|
|
122
113
|
return `${valueIndex === 0 ? 'M' : 'L'}${x},${y}`;
|
|
123
114
|
}
|
|
124
|
-
|
|
125
115
|
return `${x} ${y}`;
|
|
126
116
|
});
|
|
127
|
-
|
|
128
117
|
if (!lineChart) {
|
|
129
118
|
points.push(`${width} ${height} 0 ${height}`);
|
|
130
119
|
}
|
|
131
|
-
|
|
132
120
|
data.push({
|
|
133
121
|
label,
|
|
134
122
|
points: points.join(' '),
|
|
@@ -137,18 +125,15 @@ class AreaChart extends Framework7Class {
|
|
|
137
125
|
});
|
|
138
126
|
return data.reverse();
|
|
139
127
|
}
|
|
140
|
-
|
|
141
128
|
getVerticalLines() {
|
|
142
129
|
const {
|
|
143
130
|
datasets,
|
|
144
131
|
width
|
|
145
132
|
} = this.params;
|
|
146
133
|
const lines = [];
|
|
147
|
-
|
|
148
134
|
if (!datasets.length) {
|
|
149
135
|
return lines;
|
|
150
136
|
}
|
|
151
|
-
|
|
152
137
|
const values = datasets[0].values;
|
|
153
138
|
values.forEach((value, valueIndex) => {
|
|
154
139
|
const x = valueIndex / (values.length - 1) * width;
|
|
@@ -156,7 +141,6 @@ class AreaChart extends Framework7Class {
|
|
|
156
141
|
});
|
|
157
142
|
return lines;
|
|
158
143
|
}
|
|
159
|
-
|
|
160
144
|
toggleDataset(index) {
|
|
161
145
|
const {
|
|
162
146
|
hiddenDatasets,
|
|
@@ -165,23 +149,19 @@ class AreaChart extends Framework7Class {
|
|
|
165
149
|
}
|
|
166
150
|
} = this;
|
|
167
151
|
if (!toggleDatasets) return;
|
|
168
|
-
|
|
169
152
|
if (hiddenDatasets.includes(index)) {
|
|
170
153
|
hiddenDatasets.splice(hiddenDatasets.indexOf(index), 1);
|
|
171
154
|
} else {
|
|
172
155
|
hiddenDatasets.push(index);
|
|
173
156
|
}
|
|
174
|
-
|
|
175
157
|
if (this.$legendEl) {
|
|
176
158
|
this.$legendEl.find('.area-chart-legend-item').removeClass('area-chart-legend-item-hidden');
|
|
177
159
|
hiddenDatasets.forEach(i => {
|
|
178
160
|
this.$legendEl.find(`.area-chart-legend-item[data-index="${i}"]`).addClass('area-chart-legend-item-hidden');
|
|
179
161
|
});
|
|
180
162
|
}
|
|
181
|
-
|
|
182
163
|
this.update({}, true);
|
|
183
164
|
}
|
|
184
|
-
|
|
185
165
|
formatAxisLabel(label) {
|
|
186
166
|
const {
|
|
187
167
|
formatAxisLabel
|
|
@@ -189,7 +169,6 @@ class AreaChart extends Framework7Class {
|
|
|
189
169
|
if (formatAxisLabel) return formatAxisLabel.call(this, label);
|
|
190
170
|
return label;
|
|
191
171
|
}
|
|
192
|
-
|
|
193
172
|
formatLegendLabel(label) {
|
|
194
173
|
const {
|
|
195
174
|
formatLegendLabel
|
|
@@ -197,16 +176,13 @@ class AreaChart extends Framework7Class {
|
|
|
197
176
|
if (formatLegendLabel) return formatLegendLabel.call(this, label);
|
|
198
177
|
return label;
|
|
199
178
|
}
|
|
200
|
-
|
|
201
179
|
calcLinesOffsets() {
|
|
202
180
|
const lines = this.svgEl.querySelectorAll('line');
|
|
203
181
|
this.linesOffsets = [];
|
|
204
|
-
|
|
205
182
|
for (let i = 0; i < lines.length; i += 1) {
|
|
206
183
|
this.linesOffsets.push(lines[i].getBoundingClientRect().left);
|
|
207
184
|
}
|
|
208
185
|
}
|
|
209
|
-
|
|
210
186
|
formatTooltip() {
|
|
211
187
|
const self = this;
|
|
212
188
|
const {
|
|
@@ -231,7 +207,6 @@ class AreaChart extends Framework7Class {
|
|
|
231
207
|
currentValues.forEach(dataset => {
|
|
232
208
|
total += dataset.value;
|
|
233
209
|
});
|
|
234
|
-
|
|
235
210
|
if (formatTooltip) {
|
|
236
211
|
return formatTooltip({
|
|
237
212
|
index: currentIndex,
|
|
@@ -239,11 +214,10 @@ class AreaChart extends Framework7Class {
|
|
|
239
214
|
datasets: currentValues
|
|
240
215
|
});
|
|
241
216
|
}
|
|
242
|
-
|
|
243
217
|
let labelText = formatTooltipAxisLabel ? formatTooltipAxisLabel.call(self, axisLabels[currentIndex]) : this.formatAxisLabel(axisLabels[currentIndex]);
|
|
244
218
|
if (!labelText) labelText = '';
|
|
245
|
-
const totalText = formatTooltipTotal ? formatTooltipTotal.call(self, total) : total;
|
|
246
|
-
|
|
219
|
+
const totalText = formatTooltipTotal ? formatTooltipTotal.call(self, total) : total;
|
|
220
|
+
// prettier-ignore
|
|
247
221
|
const datasetsText = currentValues.length > 0 ? `
|
|
248
222
|
<ul class="area-chart-tooltip-list">
|
|
249
223
|
${currentValues.map(_ref4 => {
|
|
@@ -257,15 +231,14 @@ class AreaChart extends Framework7Class {
|
|
|
257
231
|
<li><span style="background-color: ${color};"></span>${valueText}</li>
|
|
258
232
|
`;
|
|
259
233
|
}).join('')}
|
|
260
|
-
</ul>` : '';
|
|
261
|
-
|
|
234
|
+
</ul>` : '';
|
|
235
|
+
// prettier-ignore
|
|
262
236
|
return `
|
|
263
237
|
<div class="area-chart-tooltip-label">${labelText}</div>
|
|
264
238
|
<div class="area-chart-tooltip-total">${totalText}</div>
|
|
265
239
|
${datasetsText}
|
|
266
240
|
`;
|
|
267
241
|
}
|
|
268
|
-
|
|
269
242
|
setTooltip() {
|
|
270
243
|
const self = this;
|
|
271
244
|
const {
|
|
@@ -281,12 +254,10 @@ class AreaChart extends Framework7Class {
|
|
|
281
254
|
} = self;
|
|
282
255
|
if (!tooltip) return;
|
|
283
256
|
const hasVisibleDataSets = datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).length > 0;
|
|
284
|
-
|
|
285
257
|
if (!hasVisibleDataSets) {
|
|
286
258
|
if (self.f7Tooltip && self.f7Tooltip.hide) self.f7Tooltip.hide();
|
|
287
259
|
return;
|
|
288
260
|
}
|
|
289
|
-
|
|
290
261
|
if (currentIndex !== null && !self.f7Tooltip) {
|
|
291
262
|
self.f7Tooltip = app.tooltip.create({
|
|
292
263
|
trigger: 'manual',
|
|
@@ -295,18 +266,14 @@ class AreaChart extends Framework7Class {
|
|
|
295
266
|
text: self.formatTooltip(),
|
|
296
267
|
cssClass: 'area-chart-tooltip'
|
|
297
268
|
});
|
|
298
|
-
|
|
299
269
|
if (self.f7Tooltip && self.f7Tooltip.show) {
|
|
300
270
|
self.f7Tooltip.show();
|
|
301
271
|
}
|
|
302
|
-
|
|
303
272
|
return;
|
|
304
273
|
}
|
|
305
|
-
|
|
306
274
|
if (!self.f7Tooltip || !self.f7Tooltip.hide || !self.f7Tooltip.show) {
|
|
307
275
|
return;
|
|
308
276
|
}
|
|
309
|
-
|
|
310
277
|
if (currentIndex !== null) {
|
|
311
278
|
self.f7Tooltip.setText(self.formatTooltip());
|
|
312
279
|
self.f7Tooltip.setTargetEl(svgEl.querySelector(`line[data-index="${currentIndex}"]`));
|
|
@@ -315,7 +282,6 @@ class AreaChart extends Framework7Class {
|
|
|
315
282
|
self.f7Tooltip.hide();
|
|
316
283
|
}
|
|
317
284
|
}
|
|
318
|
-
|
|
319
285
|
setCurrentIndex(index) {
|
|
320
286
|
if (index === this.currentIndex) return;
|
|
321
287
|
this.currentIndex = index;
|
|
@@ -327,23 +293,18 @@ class AreaChart extends Framework7Class {
|
|
|
327
293
|
this.$svgEl.find(`line[data-index="${index}"]`).addClass('area-chart-current-line');
|
|
328
294
|
this.setTooltip();
|
|
329
295
|
}
|
|
330
|
-
|
|
331
296
|
onLegendClick(e) {
|
|
332
297
|
const index = parseInt($(e.target).closest('.area-chart-legend-item').attr('data-index'), 10);
|
|
333
298
|
this.toggleDataset(index);
|
|
334
299
|
}
|
|
335
|
-
|
|
336
300
|
onMouseEnter() {
|
|
337
301
|
this.calcLinesOffsets();
|
|
338
302
|
}
|
|
339
|
-
|
|
340
303
|
onMouseMove(e) {
|
|
341
304
|
const self = this;
|
|
342
|
-
|
|
343
305
|
if (!self.linesOffsets) {
|
|
344
306
|
self.calcLinesOffsets();
|
|
345
307
|
}
|
|
346
|
-
|
|
347
308
|
let currentLeft = e.pageX;
|
|
348
309
|
if (typeof currentLeft === 'undefined') currentLeft = 0;
|
|
349
310
|
const distances = self.linesOffsets.map(left => Math.abs(currentLeft - left));
|
|
@@ -351,11 +312,9 @@ class AreaChart extends Framework7Class {
|
|
|
351
312
|
const closestIndex = distances.indexOf(minDistance);
|
|
352
313
|
self.setCurrentIndex(closestIndex);
|
|
353
314
|
}
|
|
354
|
-
|
|
355
315
|
onMouseLeave() {
|
|
356
316
|
this.setCurrentIndex(null);
|
|
357
317
|
}
|
|
358
|
-
|
|
359
318
|
attachEvents() {
|
|
360
319
|
const {
|
|
361
320
|
svgEl,
|
|
@@ -367,7 +326,6 @@ class AreaChart extends Framework7Class {
|
|
|
367
326
|
svgEl.addEventListener('mouseleave', this.onMouseLeave);
|
|
368
327
|
$el.on('click', '.area-chart-legend-item', this.onLegendClick);
|
|
369
328
|
}
|
|
370
|
-
|
|
371
329
|
detachEvents() {
|
|
372
330
|
const {
|
|
373
331
|
svgEl,
|
|
@@ -379,7 +337,6 @@ class AreaChart extends Framework7Class {
|
|
|
379
337
|
svgEl.removeEventListener('mouseleave', this.onMouseLeave);
|
|
380
338
|
$el.off('click', '.area-chart-legend-item', this.onLegendClick);
|
|
381
339
|
}
|
|
382
|
-
|
|
383
340
|
render() {
|
|
384
341
|
const self = this;
|
|
385
342
|
const {
|
|
@@ -429,16 +386,13 @@ class AreaChart extends Framework7Class {
|
|
|
429
386
|
style: `background-color: ${dataset.color}`
|
|
430
387
|
}), self.formatLegendLabel(dataset.label)))));
|
|
431
388
|
}
|
|
432
|
-
|
|
433
389
|
update(newParams, onlySvg) {
|
|
434
390
|
if (newParams === void 0) {
|
|
435
391
|
newParams = {};
|
|
436
392
|
}
|
|
437
|
-
|
|
438
393
|
if (onlySvg === void 0) {
|
|
439
394
|
onlySvg = false;
|
|
440
395
|
}
|
|
441
|
-
|
|
442
396
|
const self = this;
|
|
443
397
|
const {
|
|
444
398
|
params
|
|
@@ -451,19 +405,16 @@ class AreaChart extends Framework7Class {
|
|
|
451
405
|
if (self.$svgEl.length === 0) return self;
|
|
452
406
|
self.detachEvents();
|
|
453
407
|
self.$svgEl.remove();
|
|
454
|
-
|
|
455
408
|
if (!onlySvg) {
|
|
456
409
|
self.$axisEl.remove();
|
|
457
410
|
self.$legendEl.remove();
|
|
458
411
|
}
|
|
459
|
-
|
|
460
412
|
const $rendered = $(self.render());
|
|
461
413
|
const $svgEl = $rendered.find('svg');
|
|
462
414
|
extend(self, {
|
|
463
415
|
svgEl: $svgEl && $svgEl[0],
|
|
464
416
|
$svgEl
|
|
465
417
|
});
|
|
466
|
-
|
|
467
418
|
if (!onlySvg) {
|
|
468
419
|
const $axisEl = $rendered.find('.area-chart-axis');
|
|
469
420
|
const $legendEl = $rendered.find('.area-chart-legend');
|
|
@@ -474,12 +425,10 @@ class AreaChart extends Framework7Class {
|
|
|
474
425
|
self.$el.append($axisEl);
|
|
475
426
|
self.$el.append($legendEl);
|
|
476
427
|
}
|
|
477
|
-
|
|
478
428
|
self.$el.prepend($svgEl);
|
|
479
429
|
self.attachEvents();
|
|
480
430
|
return self;
|
|
481
431
|
}
|
|
482
|
-
|
|
483
432
|
init() {
|
|
484
433
|
const self = this;
|
|
485
434
|
const $rendered = $(self.render());
|
|
@@ -498,7 +447,6 @@ class AreaChart extends Framework7Class {
|
|
|
498
447
|
self.attachEvents();
|
|
499
448
|
return self;
|
|
500
449
|
}
|
|
501
|
-
|
|
502
450
|
destroy() {
|
|
503
451
|
const self = this;
|
|
504
452
|
if (!self.$el || self.destroyed) return;
|
|
@@ -508,16 +456,12 @@ class AreaChart extends Framework7Class {
|
|
|
508
456
|
self.$svgEl.remove();
|
|
509
457
|
self.$axisEl.remove();
|
|
510
458
|
self.$legendEl.remove();
|
|
511
|
-
|
|
512
459
|
if (self.f7Tooltip && self.f7Tooltip.destroy) {
|
|
513
460
|
self.f7Tooltip.destroy();
|
|
514
461
|
}
|
|
515
|
-
|
|
516
462
|
delete self.$el[0].f7AreaChart;
|
|
517
463
|
deleteProps(self);
|
|
518
464
|
self.destroyed = true;
|
|
519
465
|
}
|
|
520
|
-
|
|
521
466
|
}
|
|
522
|
-
|
|
523
467
|
export default AreaChart;
|
|
@@ -24,7 +24,6 @@ export default {
|
|
|
24
24
|
formatTooltipDataset: null
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
|
|
28
27
|
create() {
|
|
29
28
|
const app = this;
|
|
30
29
|
app.areaChart = ConstructorMethods({
|
|
@@ -33,7 +32,6 @@ export default {
|
|
|
33
32
|
app,
|
|
34
33
|
domProp: 'f7AreaChart'
|
|
35
34
|
});
|
|
36
|
-
|
|
37
35
|
app.areaChart.update = function update(el, newParams) {
|
|
38
36
|
const $el = $(el);
|
|
39
37
|
if ($el.length === 0) return undefined;
|
|
@@ -43,5 +41,4 @@ export default {
|
|
|
43
41
|
return areaChart;
|
|
44
42
|
};
|
|
45
43
|
}
|
|
46
|
-
|
|
47
44
|
};
|