@xenknight/framework7 0.0.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/LICENSE +20 -0
- package/README.md +32 -0
- package/components/accordion/accordion-ios.less +2 -0
- package/components/accordion/accordion-md.less +2 -0
- package/components/accordion/accordion-rtl.css +1 -0
- package/components/accordion/accordion-vars.less +0 -0
- package/components/accordion/accordion.css +1 -0
- package/components/accordion/accordion.d.ts +55 -0
- package/components/accordion/accordion.js +118 -0
- package/components/accordion/accordion.less +215 -0
- package/components/actions/actions-class.js +325 -0
- package/components/actions/actions-ios.less +51 -0
- package/components/actions/actions-md.less +24 -0
- package/components/actions/actions-rtl.css +1 -0
- package/components/actions/actions-vars.less +72 -0
- package/components/actions/actions.css +1 -0
- package/components/actions/actions.d.ts +164 -0
- package/components/actions/actions.js +47 -0
- package/components/actions/actions.less +182 -0
- package/components/app/app-class.d.ts +189 -0
- package/components/app/app-class.js +349 -0
- package/components/app/app-ios.less +23 -0
- package/components/app/app-md.less +8 -0
- package/components/app/app-vars.less +122 -0
- package/components/app/app.less +121 -0
- package/components/app/load-module.js +125 -0
- package/components/area-chart/area-chart-class.js +467 -0
- package/components/area-chart/area-chart-ios.less +2 -0
- package/components/area-chart/area-chart-md.less +2 -0
- package/components/area-chart/area-chart-rtl.css +1 -0
- package/components/area-chart/area-chart-vars.less +35 -0
- package/components/area-chart/area-chart.css +1 -0
- package/components/area-chart/area-chart.d.ts +128 -0
- package/components/area-chart/area-chart.js +44 -0
- package/components/area-chart/area-chart.less +131 -0
- package/components/autocomplete/autocomplete-class.js +813 -0
- package/components/autocomplete/autocomplete-ios.less +9 -0
- package/components/autocomplete/autocomplete-md.less +30 -0
- package/components/autocomplete/autocomplete-rtl.css +1 -0
- package/components/autocomplete/autocomplete-vars.less +36 -0
- package/components/autocomplete/autocomplete.css +1 -0
- package/components/autocomplete/autocomplete.d.ts +193 -0
- package/components/autocomplete/autocomplete.js +81 -0
- package/components/autocomplete/autocomplete.less +102 -0
- package/components/badge/badge-ios.less +2 -0
- package/components/badge/badge-md.less +2 -0
- package/components/badge/badge-vars.less +18 -0
- package/components/badge/badge.d.ts +14 -0
- package/components/badge/badge.js +3 -0
- package/components/badge/badge.less +45 -0
- package/components/block/block-ios.less +2 -0
- package/components/block/block-md.less +2 -0
- package/components/block/block-vars.less +77 -0
- package/components/block/block.d.ts +14 -0
- package/components/block/block.js +3 -0
- package/components/block/block.less +209 -0
- package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
- package/components/breadcrumbs/breadcrumbs-md.less +2 -0
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
- package/components/breadcrumbs/breadcrumbs-vars.less +52 -0
- package/components/breadcrumbs/breadcrumbs.css +1 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs/breadcrumbs.js +11 -0
- package/components/breadcrumbs/breadcrumbs.less +91 -0
- package/components/button/button-ios.less +21 -0
- package/components/button/button-md.less +11 -0
- package/components/button/button-vars.less +114 -0
- package/components/button/button.d.ts +14 -0
- package/components/button/button.js +3 -0
- package/components/button/button.less +421 -0
- package/components/calendar/calendar-class.js +1872 -0
- package/components/calendar/calendar-ios.less +2 -0
- package/components/calendar/calendar-md.less +2 -0
- package/components/calendar/calendar-rtl.css +1 -0
- package/components/calendar/calendar-vars.less +108 -0
- package/components/calendar/calendar.css +1 -0
- package/components/calendar/calendar.d.ts +312 -0
- package/components/calendar/calendar.js +118 -0
- package/components/calendar/calendar.less +448 -0
- package/components/card/card-ios.less +2 -0
- package/components/card/card-md.less +2 -0
- package/components/card/card-rtl.css +1 -0
- package/components/card/card-vars.less +80 -0
- package/components/card/card.css +1 -0
- package/components/card/card.d.ts +69 -0
- package/components/card/card.js +504 -0
- package/components/card/card.less +307 -0
- package/components/checkbox/checkbox-ios.less +23 -0
- package/components/checkbox/checkbox-md.less +17 -0
- package/components/checkbox/checkbox-rtl.css +1 -0
- package/components/checkbox/checkbox-vars.less +25 -0
- package/components/checkbox/checkbox.css +1 -0
- package/components/checkbox/checkbox.d.ts +14 -0
- package/components/checkbox/checkbox.js +3 -0
- package/components/checkbox/checkbox.less +155 -0
- package/components/chip/chip-ios.less +25 -0
- package/components/chip/chip-md.less +30 -0
- package/components/chip/chip-rtl.css +1 -0
- package/components/chip/chip-vars.less +42 -0
- package/components/chip/chip.css +1 -0
- package/components/chip/chip.d.ts +14 -0
- package/components/chip/chip.js +3 -0
- package/components/chip/chip.less +106 -0
- package/components/color-picker/color-picker-class.js +871 -0
- package/components/color-picker/color-picker-ios.less +2 -0
- package/components/color-picker/color-picker-md.less +2 -0
- package/components/color-picker/color-picker-rtl.css +1 -0
- package/components/color-picker/color-picker-vars.less +39 -0
- package/components/color-picker/color-picker.css +1 -0
- package/components/color-picker/color-picker.d.ts +233 -0
- package/components/color-picker/color-picker.js +92 -0
- package/components/color-picker/color-picker.less +557 -0
- package/components/color-picker/modules/alpha-slider.js +91 -0
- package/components/color-picker/modules/brightness-slider.js +80 -0
- package/components/color-picker/modules/current-color.js +14 -0
- package/components/color-picker/modules/hex.js +71 -0
- package/components/color-picker/modules/hs-spectrum.js +118 -0
- package/components/color-picker/modules/hsb-sliders.js +191 -0
- package/components/color-picker/modules/hue-slider.js +73 -0
- package/components/color-picker/modules/initial-current-colors.js +43 -0
- package/components/color-picker/modules/palette.js +46 -0
- package/components/color-picker/modules/rgb-bars.js +183 -0
- package/components/color-picker/modules/rgb-sliders.js +185 -0
- package/components/color-picker/modules/sb-spectrum.js +119 -0
- package/components/color-picker/modules/wheel.js +173 -0
- package/components/contacts-list/contacts-list-ios.less +2 -0
- package/components/contacts-list/contacts-list-md.less +21 -0
- package/components/contacts-list/contacts-list-rtl.css +1 -0
- package/components/contacts-list/contacts-list-vars.less +24 -0
- package/components/contacts-list/contacts-list.css +1 -0
- package/components/contacts-list/contacts-list.d.ts +14 -0
- package/components/contacts-list/contacts-list.js +3 -0
- package/components/contacts-list/contacts-list.less +26 -0
- package/components/data-table/data-table-class.js +141 -0
- package/components/data-table/data-table-ios.less +70 -0
- package/components/data-table/data-table-md.less +88 -0
- package/components/data-table/data-table-rtl.css +1 -0
- package/components/data-table/data-table-vars.less +77 -0
- package/components/data-table/data-table.css +1 -0
- package/components/data-table/data-table.d.ts +61 -0
- package/components/data-table/data-table.js +64 -0
- package/components/data-table/data-table.less +429 -0
- package/components/dialog/dialog-class.js +196 -0
- package/components/dialog/dialog-ios.less +94 -0
- package/components/dialog/dialog-md.less +86 -0
- package/components/dialog/dialog-rtl.css +1 -0
- package/components/dialog/dialog-vars.less +93 -0
- package/components/dialog/dialog.css +1 -0
- package/components/dialog/dialog.d.ts +245 -0
- package/components/dialog/dialog.js +242 -0
- package/components/dialog/dialog.less +142 -0
- package/components/fab/fab-ios.less +9 -0
- package/components/fab/fab-md.less +11 -0
- package/components/fab/fab-rtl.css +1 -0
- package/components/fab/fab-vars.less +46 -0
- package/components/fab/fab.css +1 -0
- package/components/fab/fab.d.ts +32 -0
- package/components/fab/fab.js +172 -0
- package/components/fab/fab.less +523 -0
- package/components/form/form-ios.less +0 -0
- package/components/form/form-md.less +0 -0
- package/components/form/form-rtl.css +0 -0
- package/components/form/form.css +0 -0
- package/components/form/form.d.ts +64 -0
- package/components/form/form.js +311 -0
- package/components/form/form.less +7 -0
- package/components/gauge/gauge-class.js +298 -0
- package/components/gauge/gauge-ios.less +2 -0
- package/components/gauge/gauge-md.less +2 -0
- package/components/gauge/gauge-rtl.css +1 -0
- package/components/gauge/gauge.css +1 -0
- package/components/gauge/gauge.d.ts +100 -0
- package/components/gauge/gauge.js +90 -0
- package/components/gauge/gauge.less +24 -0
- package/components/grid/grid-ios.less +2 -0
- package/components/grid/grid-md.less +2 -0
- package/components/grid/grid-rtl.css +1 -0
- package/components/grid/grid-vars.less +3 -0
- package/components/grid/grid.css +1 -0
- package/components/grid/grid.d.ts +15 -0
- package/components/grid/grid.js +3 -0
- package/components/grid/grid.less +78 -0
- package/components/icon/icon-ios.less +44 -0
- package/components/icon/icon-md.less +56 -0
- package/components/icon/icon.d.ts +14 -0
- package/components/icon/icon.js +3 -0
- package/components/icon/icon.less +33 -0
- package/components/infinite-scroll/infinite-scroll-ios.less +11 -0
- package/components/infinite-scroll/infinite-scroll-md.less +6 -0
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -0
- package/components/infinite-scroll/infinite-scroll.css +1 -0
- package/components/infinite-scroll/infinite-scroll.d.ts +27 -0
- package/components/infinite-scroll/infinite-scroll.js +94 -0
- package/components/infinite-scroll/infinite-scroll.less +15 -0
- package/components/input/input-ios.less +129 -0
- package/components/input/input-md.less +171 -0
- package/components/input/input-rtl.css +1 -0
- package/components/input/input-vars.less +94 -0
- package/components/input/input.css +1 -0
- package/components/input/input.d.ts +60 -0
- package/components/input/input.js +339 -0
- package/components/input/input.less +355 -0
- package/components/link/link-ios.less +9 -0
- package/components/link/link-md.less +2 -0
- package/components/link/link-vars.less +9 -0
- package/components/link/link.d.ts +14 -0
- package/components/link/link.js +3 -0
- package/components/link/link.less +37 -0
- package/components/list/list-ios.less +15 -0
- package/components/list/list-md.less +5 -0
- package/components/list/list-vars.less +184 -0
- package/components/list/list.d.ts +14 -0
- package/components/list/list.js +3 -0
- package/components/list/list.less +718 -0
- package/components/list-index/list-index-class.js +333 -0
- package/components/list-index/list-index-ios.less +21 -0
- package/components/list-index/list-index-md.less +7 -0
- package/components/list-index/list-index-rtl.css +1 -0
- package/components/list-index/list-index-vars.less +25 -0
- package/components/list-index/list-index.css +1 -0
- package/components/list-index/list-index.d.ts +101 -0
- package/components/list-index/list-index.js +65 -0
- package/components/list-index/list-index.less +130 -0
- package/components/login-screen/login-screen-class.js +38 -0
- package/components/login-screen/login-screen-ios.less +2 -0
- package/components/login-screen/login-screen-md.less +2 -0
- package/components/login-screen/login-screen-rtl.css +1 -0
- package/components/login-screen/login-screen-vars.less +33 -0
- package/components/login-screen/login-screen.css +1 -0
- package/components/login-screen/login-screen.d.ts +99 -0
- package/components/login-screen/login-screen.js +32 -0
- package/components/login-screen/login-screen.less +100 -0
- package/components/messagebar/messagebar-class.js +367 -0
- package/components/messagebar/messagebar-ios.less +88 -0
- package/components/messagebar/messagebar-md.less +114 -0
- package/components/messagebar/messagebar-rtl.css +1 -0
- package/components/messagebar/messagebar-vars.less +75 -0
- package/components/messagebar/messagebar.css +1 -0
- package/components/messagebar/messagebar.d.ts +165 -0
- package/components/messagebar/messagebar.js +66 -0
- package/components/messagebar/messagebar.less +162 -0
- package/components/messages/messages-class.js +487 -0
- package/components/messages/messages-ios.less +165 -0
- package/components/messages/messages-md.less +140 -0
- package/components/messages/messages-rtl.css +1 -0
- package/components/messages/messages-vars.less +82 -0
- package/components/messages/messages.css +1 -0
- package/components/messages/messages.d.ts +162 -0
- package/components/messages/messages.js +65 -0
- package/components/messages/messages.less +218 -0
- package/components/modal/custom-modal-class.js +66 -0
- package/components/modal/modal-class.js +224 -0
- package/components/modal/modal.d.ts +82 -0
- package/components/modal/modal.js +22 -0
- package/components/modal/modal.less +14 -0
- package/components/navbar/navbar-ios.less +755 -0
- package/components/navbar/navbar-md.less +65 -0
- package/components/navbar/navbar-vars.less +74 -0
- package/components/navbar/navbar.d.ts +77 -0
- package/components/navbar/navbar.js +712 -0
- package/components/navbar/navbar.less +311 -0
- package/components/notification/notification-class.js +212 -0
- package/components/notification/notification-ios.less +55 -0
- package/components/notification/notification-md.less +87 -0
- package/components/notification/notification-rtl.css +1 -0
- package/components/notification/notification-vars.less +75 -0
- package/components/notification/notification.css +1 -0
- package/components/notification/notification.d.ts +122 -0
- package/components/notification/notification.js +33 -0
- package/components/notification/notification.less +94 -0
- package/components/page/page-ios.less +154 -0
- package/components/page/page-md.less +83 -0
- package/components/page/page-transitions/circle.less +107 -0
- package/components/page/page-transitions/cover-v.less +61 -0
- package/components/page/page-transitions/cover.less +71 -0
- package/components/page/page-transitions/dive.less +77 -0
- package/components/page/page-transitions/fade.less +53 -0
- package/components/page/page-transitions/flip.less +91 -0
- package/components/page/page-transitions/parallax.less +75 -0
- package/components/page/page-transitions/push.less +75 -0
- package/components/page/page-vars.less +47 -0
- package/components/page/page.d.ts +14 -0
- package/components/page/page.js +3 -0
- package/components/page/page.less +204 -0
- package/components/panel/panel-class.js +556 -0
- package/components/panel/panel-ios.less +2 -0
- package/components/panel/panel-md.less +11 -0
- package/components/panel/panel-rtl.css +3 -0
- package/components/panel/panel-vars.less +24 -0
- package/components/panel/panel.css +3 -0
- package/components/panel/panel.d.ts +198 -0
- package/components/panel/panel.js +189 -0
- package/components/panel/panel.less +403 -0
- package/components/panel/resizable-panel.js +160 -0
- package/components/panel/swipe-panel.js +311 -0
- package/components/photo-browser/photo-browser-class.js +734 -0
- package/components/photo-browser/photo-browser-ios.less +2 -0
- package/components/photo-browser/photo-browser-md.less +2 -0
- package/components/photo-browser/photo-browser-rtl.css +1 -0
- package/components/photo-browser/photo-browser-vars.less +16 -0
- package/components/photo-browser/photo-browser.css +1 -0
- package/components/photo-browser/photo-browser.d.ts +204 -0
- package/components/photo-browser/photo-browser.js +73 -0
- package/components/photo-browser/photo-browser.less +358 -0
- package/components/picker/picker-class.js +588 -0
- package/components/picker/picker-column.js +121 -0
- package/components/picker/picker-ios.less +12 -0
- package/components/picker/picker-md.less +8 -0
- package/components/picker/picker-rtl.css +1 -0
- package/components/picker/picker-vars.less +35 -0
- package/components/picker/picker.css +1 -0
- package/components/picker/picker.d.ts +209 -0
- package/components/picker/picker.js +59 -0
- package/components/picker/picker.less +180 -0
- package/components/pie-chart/pie-chart-class.js +250 -0
- package/components/pie-chart/pie-chart-ios.less +2 -0
- package/components/pie-chart/pie-chart-md.less +2 -0
- package/components/pie-chart/pie-chart-rtl.css +1 -0
- package/components/pie-chart/pie-chart.css +1 -0
- package/components/pie-chart/pie-chart.d.ts +99 -0
- package/components/pie-chart/pie-chart.js +32 -0
- package/components/pie-chart/pie-chart.less +43 -0
- package/components/popover/popover-class.js +293 -0
- package/components/popover/popover-ios.less +6 -0
- package/components/popover/popover-md.less +41 -0
- package/components/popover/popover-rtl.css +1 -0
- package/components/popover/popover-vars.less +25 -0
- package/components/popover/popover.css +1 -0
- package/components/popover/popover.d.ts +137 -0
- package/components/popover/popover.js +75 -0
- package/components/popover/popover.less +168 -0
- package/components/popup/popup-class.js +329 -0
- package/components/popup/popup-ios.less +2 -0
- package/components/popup/popup-md.less +2 -0
- package/components/popup/popup-rtl.css +1 -0
- package/components/popup/popup-vars.less +21 -0
- package/components/popup/popup.css +1 -0
- package/components/popup/popup.d.ts +143 -0
- package/components/popup/popup.js +46 -0
- package/components/popup/popup.less +204 -0
- package/components/preloader/preloader-ios.less +57 -0
- package/components/preloader/preloader-md.less +114 -0
- package/components/preloader/preloader-rtl.css +1 -0
- package/components/preloader/preloader-vars.less +16 -0
- package/components/preloader/preloader.css +1 -0
- package/components/preloader/preloader.d.ts +26 -0
- package/components/preloader/preloader.js +106 -0
- package/components/preloader/preloader.less +60 -0
- package/components/progressbar/progressbar-ios.less +59 -0
- package/components/progressbar/progressbar-md.less +141 -0
- package/components/progressbar/progressbar-rtl.css +1 -0
- package/components/progressbar/progressbar-vars.less +22 -0
- package/components/progressbar/progressbar.css +1 -0
- package/components/progressbar/progressbar.d.ts +31 -0
- package/components/progressbar/progressbar.js +150 -0
- package/components/progressbar/progressbar.less +111 -0
- package/components/pull-to-refresh/pull-to-refresh-class.js +512 -0
- package/components/pull-to-refresh/pull-to-refresh-ios.less +88 -0
- package/components/pull-to-refresh/pull-to-refresh-md.less +129 -0
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -0
- package/components/pull-to-refresh/pull-to-refresh-vars.less +14 -0
- package/components/pull-to-refresh/pull-to-refresh.css +1 -0
- package/components/pull-to-refresh/pull-to-refresh.d.ts +103 -0
- package/components/pull-to-refresh/pull-to-refresh.js +62 -0
- package/components/pull-to-refresh/pull-to-refresh.less +38 -0
- package/components/radio/radio-ios.less +61 -0
- package/components/radio/radio-md.less +64 -0
- package/components/radio/radio-rtl.css +1 -0
- package/components/radio/radio-vars.less +24 -0
- package/components/radio/radio.css +1 -0
- package/components/radio/radio.d.ts +14 -0
- package/components/radio/radio.js +3 -0
- package/components/radio/radio.less +64 -0
- package/components/range/range-class.js +577 -0
- package/components/range/range-ios.less +9 -0
- package/components/range/range-md.less +41 -0
- package/components/range/range-rtl.css +1 -0
- package/components/range/range-vars.less +61 -0
- package/components/range/range.css +1 -0
- package/components/range/range.d.ts +143 -0
- package/components/range/range.js +75 -0
- package/components/range/range.less +235 -0
- package/components/searchbar/remove-diacritics.js +271 -0
- package/components/searchbar/searchbar-class.js +592 -0
- package/components/searchbar/searchbar-ios.less +107 -0
- package/components/searchbar/searchbar-md.less +147 -0
- package/components/searchbar/searchbar-rtl.css +1 -0
- package/components/searchbar/searchbar-vars.less +77 -0
- package/components/searchbar/searchbar.css +1 -0
- package/components/searchbar/searchbar.d.ts +161 -0
- package/components/searchbar/searchbar.js +122 -0
- package/components/searchbar/searchbar.less +322 -0
- package/components/sheet/sheet-class.js +673 -0
- package/components/sheet/sheet-ios.less +2 -0
- package/components/sheet/sheet-md.less +9 -0
- package/components/sheet/sheet-rtl.css +1 -0
- package/components/sheet/sheet-vars.less +27 -0
- package/components/sheet/sheet.css +1 -0
- package/components/sheet/sheet.d.ts +170 -0
- package/components/sheet/sheet.js +76 -0
- package/components/sheet/sheet.less +196 -0
- package/components/skeleton/skeleton-ios.less +2 -0
- package/components/skeleton/skeleton-md.less +2 -0
- package/components/skeleton/skeleton-rtl.css +1 -0
- package/components/skeleton/skeleton-vars.less +8 -0
- package/components/skeleton/skeleton.css +1 -0
- package/components/skeleton/skeleton.d.ts +14 -0
- package/components/skeleton/skeleton.js +3 -0
- package/components/skeleton/skeleton.less +11 -0
- package/components/smart-select/smart-select-class.js +874 -0
- package/components/smart-select/smart-select-ios.less +2 -0
- package/components/smart-select/smart-select-md.less +2 -0
- package/components/smart-select/smart-select-rtl.css +1 -0
- package/components/smart-select/smart-select-vars.less +6 -0
- package/components/smart-select/smart-select.css +1 -0
- package/components/smart-select/smart-select.d.ts +204 -0
- package/components/smart-select/smart-select.js +138 -0
- package/components/smart-select/smart-select.less +42 -0
- package/components/sortable/sortable-ios.less +7 -0
- package/components/sortable/sortable-md.less +7 -0
- package/components/sortable/sortable-rtl.css +1 -0
- package/components/sortable/sortable-vars.less +22 -0
- package/components/sortable/sortable.css +1 -0
- package/components/sortable/sortable.d.ts +50 -0
- package/components/sortable/sortable.js +286 -0
- package/components/sortable/sortable.less +133 -0
- package/components/statusbar/statusbar-ios.less +2 -0
- package/components/statusbar/statusbar-md.less +2 -0
- package/components/statusbar/statusbar.d.ts +54 -0
- package/components/statusbar/statusbar.js +190 -0
- package/components/statusbar/statusbar.less +7 -0
- package/components/stepper/stepper-class.js +403 -0
- package/components/stepper/stepper-ios.less +36 -0
- package/components/stepper/stepper-md.less +16 -0
- package/components/stepper/stepper-rtl.css +1 -0
- package/components/stepper/stepper-vars.less +40 -0
- package/components/stepper/stepper.css +1 -0
- package/components/stepper/stepper.d.ts +121 -0
- package/components/stepper/stepper.js +82 -0
- package/components/stepper/stepper.less +178 -0
- package/components/subnavbar/subnavbar-ios.less +51 -0
- package/components/subnavbar/subnavbar-md.less +47 -0
- package/components/subnavbar/subnavbar-vars.less +36 -0
- package/components/subnavbar/subnavbar.d.ts +11 -0
- package/components/subnavbar/subnavbar.js +17 -0
- package/components/subnavbar/subnavbar.less +128 -0
- package/components/swipeout/swipeout-ios.less +2 -0
- package/components/swipeout/swipeout-md.less +2 -0
- package/components/swipeout/swipeout-rtl.css +1 -0
- package/components/swipeout/swipeout-vars.less +24 -0
- package/components/swipeout/swipeout.css +1 -0
- package/components/swipeout/swipeout.d.ts +68 -0
- package/components/swipeout/swipeout.js +513 -0
- package/components/swipeout/swipeout.less +109 -0
- package/components/swiper/swiper-ios.less +2 -0
- package/components/swiper/swiper-md.less +2 -0
- package/components/swiper/swiper-rtl.css +1 -0
- package/components/swiper/swiper.css +1 -0
- package/components/swiper/swiper.d.ts +25 -0
- package/components/swiper/swiper.js +141 -0
- package/components/swiper/swiper.less +5 -0
- package/components/tabs/tabs-ios.less +2 -0
- package/components/tabs/tabs-md.less +2 -0
- package/components/tabs/tabs-rtl.css +1 -0
- package/components/tabs/tabs.css +1 -0
- package/components/tabs/tabs.d.ts +39 -0
- package/components/tabs/tabs.js +243 -0
- package/components/tabs/tabs.less +45 -0
- package/components/text-editor/text-editor-class.js +516 -0
- package/components/text-editor/text-editor-ios.less +9 -0
- package/components/text-editor/text-editor-md.less +11 -0
- package/components/text-editor/text-editor-rtl.css +1 -0
- package/components/text-editor/text-editor-vars.less +51 -0
- package/components/text-editor/text-editor.css +1 -0
- package/components/text-editor/text-editor.d.ts +166 -0
- package/components/text-editor/text-editor.js +81 -0
- package/components/text-editor/text-editor.less +153 -0
- package/components/timeline/timeline-ios.less +11 -0
- package/components/timeline/timeline-md.less +7 -0
- package/components/timeline/timeline-rtl.css +1 -0
- package/components/timeline/timeline-vars.less +64 -0
- package/components/timeline/timeline.css +1 -0
- package/components/timeline/timeline.d.ts +14 -0
- package/components/timeline/timeline.js +3 -0
- package/components/timeline/timeline.less +413 -0
- package/components/toast/toast-class.js +105 -0
- package/components/toast/toast-ios.less +81 -0
- package/components/toast/toast-md.less +72 -0
- package/components/toast/toast-rtl.css +1 -0
- package/components/toast/toast-vars.less +24 -0
- package/components/toast/toast.css +1 -0
- package/components/toast/toast.d.ts +121 -0
- package/components/toast/toast.js +40 -0
- package/components/toast/toast.less +62 -0
- package/components/toggle/toggle-class.js +165 -0
- package/components/toggle/toggle-ios.less +70 -0
- package/components/toggle/toggle-md.less +44 -0
- package/components/toggle/toggle-rtl.css +1 -0
- package/components/toggle/toggle-vars.less +30 -0
- package/components/toggle/toggle.css +1 -0
- package/components/toggle/toggle.d.ts +73 -0
- package/components/toggle/toggle.js +57 -0
- package/components/toggle/toggle.less +52 -0
- package/components/toolbar/toolbar-ios.less +47 -0
- package/components/toolbar/toolbar-md.less +77 -0
- package/components/toolbar/toolbar-vars.less +71 -0
- package/components/toolbar/toolbar.d.ts +43 -0
- package/components/toolbar/toolbar.js +198 -0
- package/components/toolbar/toolbar.less +306 -0
- package/components/tooltip/tooltip-class.js +336 -0
- package/components/tooltip/tooltip-ios.less +2 -0
- package/components/tooltip/tooltip-md.less +2 -0
- package/components/tooltip/tooltip-rtl.css +1 -0
- package/components/tooltip/tooltip-vars.less +19 -0
- package/components/tooltip/tooltip.css +1 -0
- package/components/tooltip/tooltip.d.ts +105 -0
- package/components/tooltip/tooltip.js +129 -0
- package/components/tooltip/tooltip.less +39 -0
- package/components/touch-ripple/touch-ripple-class.js +85 -0
- package/components/touch-ripple/touch-ripple-ios.less +2 -0
- package/components/touch-ripple/touch-ripple-md.less +2 -0
- package/components/touch-ripple/touch-ripple-vars.less +8 -0
- package/components/touch-ripple/touch-ripple.d.ts +25 -0
- package/components/touch-ripple/touch-ripple.js +18 -0
- package/components/touch-ripple/touch-ripple.less +114 -0
- package/components/treeview/treeview-ios.less +2 -0
- package/components/treeview/treeview-md.less +2 -0
- package/components/treeview/treeview-rtl.css +1 -0
- package/components/treeview/treeview-vars.less +38 -0
- package/components/treeview/treeview.css +1 -0
- package/components/treeview/treeview.d.ts +42 -0
- package/components/treeview/treeview.js +74 -0
- package/components/treeview/treeview.less +160 -0
- package/components/typography/typography-ios.less +2 -0
- package/components/typography/typography-md.less +2 -0
- package/components/typography/typography-rtl.css +1 -0
- package/components/typography/typography-vars.less +4 -0
- package/components/typography/typography.css +1 -0
- package/components/typography/typography.d.ts +14 -0
- package/components/typography/typography.js +3 -0
- package/components/typography/typography.less +220 -0
- package/components/view/resizable-view.js +125 -0
- package/components/view/view-class.js +206 -0
- package/components/view/view-ios.less +2 -0
- package/components/view/view-md.less +2 -0
- package/components/view/view.d.ts +199 -0
- package/components/view/view.js +173 -0
- package/components/view/view.less +35 -0
- package/components/virtual-list/virtual-list-class.js +583 -0
- package/components/virtual-list/virtual-list-ios.less +2 -0
- package/components/virtual-list/virtual-list-md.less +2 -0
- package/components/virtual-list/virtual-list-rtl.css +0 -0
- package/components/virtual-list/virtual-list.css +0 -0
- package/components/virtual-list/virtual-list.d.ts +142 -0
- package/components/virtual-list/virtual-list.js +17 -0
- package/components/virtual-list/virtual-list.less +7 -0
- package/framework7-bundle-rtl.css +19821 -0
- package/framework7-bundle-rtl.min.css +19 -0
- package/framework7-bundle.css +19802 -0
- package/framework7-bundle.esm.js +93 -0
- package/framework7-bundle.js +48416 -0
- package/framework7-bundle.js.map +1 -0
- package/framework7-bundle.less +92 -0
- package/framework7-bundle.min.css +19 -0
- package/framework7-bundle.min.js +14 -0
- package/framework7-bundle.min.js.map +1 -0
- package/framework7-lite-bundle.esm.js +86 -0
- package/framework7-lite.esm.js +37 -0
- package/framework7-lite.js +31 -0
- package/framework7-rtl.css +5252 -0
- package/framework7-rtl.min.css +17 -0
- package/framework7-types.d.ts +336 -0
- package/framework7.css +5245 -0
- package/framework7.d.ts +322 -0
- package/framework7.esm.js +41 -0
- package/framework7.js +42 -0
- package/framework7.less +41 -0
- package/framework7.min.css +17 -0
- package/less/mixins.less +281 -0
- package/less/plugin.js +15 -0
- package/less/vars.less +7 -0
- package/modules/clicks/clicks.d.ts +19 -0
- package/modules/clicks/clicks.js +94 -0
- package/modules/component/$h.js +15 -0
- package/modules/component/$jsx.js +17 -0
- package/modules/component/component-class.js +517 -0
- package/modules/component/component.d.ts +111 -0
- package/modules/component/component.js +44 -0
- package/modules/component/custom-components.js +1 -0
- package/modules/component/eventslisteners.js +74 -0
- package/modules/component/parse-component.js +79 -0
- package/modules/component/patch.js +8 -0
- package/modules/component/snabbdom/h.d.ts +10 -0
- package/modules/component/snabbdom/h.js +50 -0
- package/modules/component/snabbdom/helpers/attachto.d.ts +9 -0
- package/modules/component/snabbdom/helpers/attachto.js +49 -0
- package/modules/component/snabbdom/hooks.d.ts +23 -0
- package/modules/component/snabbdom/hooks.js +0 -0
- package/modules/component/snabbdom/htmldomapi.d.ts +19 -0
- package/modules/component/snabbdom/htmldomapi.js +67 -0
- package/modules/component/snabbdom/is.d.ts +2 -0
- package/modules/component/snabbdom/is.js +4 -0
- package/modules/component/snabbdom/modules/attributes.d.ts +4 -0
- package/modules/component/snabbdom/modules/attributes.js +51 -0
- package/modules/component/snabbdom/modules/class.d.ts +4 -0
- package/modules/component/snabbdom/modules/class.js +27 -0
- package/modules/component/snabbdom/modules/dataset.d.ts +4 -0
- package/modules/component/snabbdom/modules/dataset.js +37 -0
- package/modules/component/snabbdom/modules/eventlisteners.d.ts +8 -0
- package/modules/component/snabbdom/modules/eventlisteners.js +93 -0
- package/modules/component/snabbdom/modules/hero.d.ts +6 -0
- package/modules/component/snabbdom/modules/hero.js +147 -0
- package/modules/component/snabbdom/modules/module.d.ts +9 -0
- package/modules/component/snabbdom/modules/module.js +0 -0
- package/modules/component/snabbdom/modules/props.d.ts +4 -0
- package/modules/component/snabbdom/modules/props.js +29 -0
- package/modules/component/snabbdom/modules/style.d.ts +7 -0
- package/modules/component/snabbdom/modules/style.js +93 -0
- package/modules/component/snabbdom/snabbdom.bundle.d.ts +5 -0
- package/modules/component/snabbdom/snabbdom.bundle.js +13 -0
- package/modules/component/snabbdom/snabbdom.d.ts +6 -0
- package/modules/component/snabbdom/snabbdom.js +282 -0
- package/modules/component/snabbdom/thunk.d.ts +14 -0
- package/modules/component/snabbdom/thunk.js +50 -0
- package/modules/component/snabbdom/tovnode.d.ts +4 -0
- package/modules/component/snabbdom/tovnode.js +40 -0
- package/modules/component/snabbdom/vnode.d.ts +36 -0
- package/modules/component/snabbdom/vnode.js +12 -0
- package/modules/component/vdom.js +319 -0
- package/modules/demo-module.js +44 -0
- package/modules/device/device.d.ts +14 -0
- package/modules/device/device.js +44 -0
- package/modules/history/history.js +12 -0
- package/modules/resize/resize.d.ts +25 -0
- package/modules/resize/resize.js +62 -0
- package/modules/router/app-router-check.js +5 -0
- package/modules/router/async-component.js +27 -0
- package/modules/router/back.js +723 -0
- package/modules/router/clear-previous-history.js +31 -0
- package/modules/router/component-loader.js +200 -0
- package/modules/router/modal.js +223 -0
- package/modules/router/navigate.js +814 -0
- package/modules/router/process-route-queue.js +66 -0
- package/modules/router/redirect.js +38 -0
- package/modules/router/router-class.js +1268 -0
- package/modules/router/router.d.ts +354 -0
- package/modules/router/router.js +26 -0
- package/modules/router/swipe-back.js +589 -0
- package/modules/router/tab.js +230 -0
- package/modules/service-worker/service-worker.d.ts +38 -0
- package/modules/service-worker/service-worker.js +86 -0
- package/modules/store/create-store.js +138 -0
- package/modules/store/store.d.ts +40 -0
- package/modules/store/store.js +11 -0
- package/modules/support/support.d.ts +15 -0
- package/modules/support/support.js +7 -0
- package/modules/touch/touch.d.ts +60 -0
- package/modules/touch/touch.js +482 -0
- package/modules/utils/utils.d.ts +15 -0
- package/modules/utils/utils.js +10 -0
- package/package.json +458 -0
- package/shared/$jsx.js +21 -0
- package/shared/class.js +146 -0
- package/shared/constructor-methods.js +52 -0
- package/shared/dom7.js +7 -0
- package/shared/events-class.js +95 -0
- package/shared/get-device.d.ts +52 -0
- package/shared/get-device.js +147 -0
- package/shared/get-support.d.ts +12 -0
- package/shared/get-support.js +35 -0
- package/shared/history.js +171 -0
- package/shared/material-color-utils.js +1377 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +80 -0
- package/shared/utils.d.ts +88 -0
- package/shared/utils.js +535 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import { extend } from '../../shared/utils.js';
|
|
3
|
+
import History from '../../shared/history.js';
|
|
4
|
+
import asyncComponent from './async-component.js';
|
|
5
|
+
function tabLoad(tabRoute, loadOptions) {
|
|
6
|
+
if (loadOptions === void 0) {
|
|
7
|
+
loadOptions = {};
|
|
8
|
+
}
|
|
9
|
+
const router = this;
|
|
10
|
+
const options = extend({
|
|
11
|
+
animate: router.params.animate,
|
|
12
|
+
browserHistory: true,
|
|
13
|
+
history: true,
|
|
14
|
+
parentPageEl: null,
|
|
15
|
+
preload: false,
|
|
16
|
+
on: {}
|
|
17
|
+
}, loadOptions);
|
|
18
|
+
let currentRoute;
|
|
19
|
+
let previousRoute;
|
|
20
|
+
if (options.route) {
|
|
21
|
+
// Set Route
|
|
22
|
+
if (!options.preload && options.route !== router.currentRoute) {
|
|
23
|
+
previousRoute = router.previousRoute;
|
|
24
|
+
router.currentRoute = options.route;
|
|
25
|
+
}
|
|
26
|
+
if (options.preload) {
|
|
27
|
+
currentRoute = options.route;
|
|
28
|
+
previousRoute = router.currentRoute;
|
|
29
|
+
} else {
|
|
30
|
+
currentRoute = router.currentRoute;
|
|
31
|
+
if (!previousRoute) previousRoute = router.previousRoute;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Update Browser History
|
|
35
|
+
if (router.params.browserHistory && options.browserHistory && !options.reloadPrevious) {
|
|
36
|
+
History[router.params.browserHistoryTabs](router.view.id, {
|
|
37
|
+
url: options.route.url
|
|
38
|
+
}, (router.params.browserHistoryRoot || '') + router.params.browserHistorySeparator + options.route.url);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Update Router History
|
|
42
|
+
if (options.history) {
|
|
43
|
+
router.history[Math.max(router.history.length - 1, 0)] = options.route.url;
|
|
44
|
+
router.saveHistory();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Show Tab
|
|
49
|
+
const $parentPageEl = $(options.parentPageEl || router.currentPageEl);
|
|
50
|
+
let tabEl;
|
|
51
|
+
if ($parentPageEl.length && $parentPageEl.find(`#${tabRoute.id}`).length) {
|
|
52
|
+
tabEl = $parentPageEl.find(`#${tabRoute.id}`).eq(0);
|
|
53
|
+
} else if (router.view.selector) {
|
|
54
|
+
tabEl = `${router.view.selector} #${tabRoute.id}`;
|
|
55
|
+
} else {
|
|
56
|
+
tabEl = `#${tabRoute.id}`;
|
|
57
|
+
}
|
|
58
|
+
const tabShowResult = router.app.tab.show({
|
|
59
|
+
tabEl,
|
|
60
|
+
animate: options.animate,
|
|
61
|
+
tabRoute: options.route
|
|
62
|
+
});
|
|
63
|
+
const {
|
|
64
|
+
$newTabEl,
|
|
65
|
+
$oldTabEl,
|
|
66
|
+
animated,
|
|
67
|
+
onTabsChanged
|
|
68
|
+
} = tabShowResult;
|
|
69
|
+
if ($newTabEl && $newTabEl.parents('.page').length > 0 && options.route) {
|
|
70
|
+
const tabParentPageData = $newTabEl.parents('.page')[0].f7Page;
|
|
71
|
+
if (tabParentPageData && options.route) {
|
|
72
|
+
tabParentPageData.route = options.route;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Tab Content Loaded
|
|
77
|
+
function onTabLoaded(contentEl) {
|
|
78
|
+
// Remove theme elements
|
|
79
|
+
router.removeThemeElements($newTabEl);
|
|
80
|
+
let tabEventTarget = $newTabEl;
|
|
81
|
+
if (typeof contentEl !== 'string') tabEventTarget = $(contentEl);
|
|
82
|
+
tabEventTarget.trigger('tab:init tab:mounted', tabRoute);
|
|
83
|
+
router.emit('tabInit tabMounted', $newTabEl[0], tabRoute);
|
|
84
|
+
if ($oldTabEl && $oldTabEl.length) {
|
|
85
|
+
if (animated) {
|
|
86
|
+
onTabsChanged(() => {
|
|
87
|
+
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
88
|
+
if (router.params.unloadTabContent) {
|
|
89
|
+
router.tabRemove($oldTabEl, $newTabEl, tabRoute);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
} else {
|
|
93
|
+
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
94
|
+
if (router.params.unloadTabContent) {
|
|
95
|
+
router.tabRemove($oldTabEl, $newTabEl, tabRoute);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if ($newTabEl[0].f7RouterTabLoaded) {
|
|
101
|
+
if (!$oldTabEl || !$oldTabEl.length) return router;
|
|
102
|
+
if (animated) {
|
|
103
|
+
onTabsChanged(() => {
|
|
104
|
+
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
105
|
+
});
|
|
106
|
+
} else {
|
|
107
|
+
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
108
|
+
}
|
|
109
|
+
return router;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Load Tab Content
|
|
113
|
+
function loadTab(loadTabParams, loadTabOptions) {
|
|
114
|
+
// Load Tab Props
|
|
115
|
+
const {
|
|
116
|
+
url,
|
|
117
|
+
content,
|
|
118
|
+
el,
|
|
119
|
+
component,
|
|
120
|
+
componentUrl
|
|
121
|
+
} = loadTabParams;
|
|
122
|
+
// Component/Template Callbacks
|
|
123
|
+
function resolve(contentEl) {
|
|
124
|
+
router.allowPageChange = true;
|
|
125
|
+
if (!contentEl) return;
|
|
126
|
+
if (typeof contentEl === 'string') {
|
|
127
|
+
$newTabEl.html(contentEl);
|
|
128
|
+
} else {
|
|
129
|
+
$newTabEl.html('');
|
|
130
|
+
if (contentEl.f7Component) {
|
|
131
|
+
contentEl.f7Component.mount(componentEl => {
|
|
132
|
+
$newTabEl.append(componentEl);
|
|
133
|
+
});
|
|
134
|
+
} else {
|
|
135
|
+
$newTabEl.append(contentEl);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
$newTabEl[0].f7RouterTabLoaded = true;
|
|
139
|
+
onTabLoaded(contentEl);
|
|
140
|
+
}
|
|
141
|
+
function reject() {
|
|
142
|
+
router.allowPageChange = true;
|
|
143
|
+
return router;
|
|
144
|
+
}
|
|
145
|
+
if (content) {
|
|
146
|
+
resolve(content);
|
|
147
|
+
} else if (el) {
|
|
148
|
+
resolve(el);
|
|
149
|
+
} else if (component || componentUrl) {
|
|
150
|
+
// Load from component (F7/Vue/React/...)
|
|
151
|
+
try {
|
|
152
|
+
router.tabComponentLoader({
|
|
153
|
+
tabEl: $newTabEl[0],
|
|
154
|
+
component,
|
|
155
|
+
componentUrl,
|
|
156
|
+
options: loadTabOptions,
|
|
157
|
+
resolve,
|
|
158
|
+
reject
|
|
159
|
+
});
|
|
160
|
+
} catch (err) {
|
|
161
|
+
router.allowPageChange = true;
|
|
162
|
+
throw err;
|
|
163
|
+
}
|
|
164
|
+
} else if (url) {
|
|
165
|
+
// Load using XHR
|
|
166
|
+
if (router.xhrAbortController) {
|
|
167
|
+
router.xhrAbortController.abort();
|
|
168
|
+
router.xhrAbortController = false;
|
|
169
|
+
}
|
|
170
|
+
router.xhrRequest(url, loadTabOptions).then(tabContent => {
|
|
171
|
+
resolve(tabContent);
|
|
172
|
+
}).catch(() => {
|
|
173
|
+
router.allowPageChange = true;
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
let hasContentLoadProp;
|
|
178
|
+
'url content component el componentUrl'.split(' ').forEach(tabLoadProp => {
|
|
179
|
+
if (tabRoute[tabLoadProp]) {
|
|
180
|
+
hasContentLoadProp = true;
|
|
181
|
+
loadTab({
|
|
182
|
+
[tabLoadProp]: tabRoute[tabLoadProp]
|
|
183
|
+
}, options);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// Async
|
|
188
|
+
function asyncResolve(resolveParams, resolveOptions) {
|
|
189
|
+
loadTab(resolveParams, extend(options, resolveOptions));
|
|
190
|
+
}
|
|
191
|
+
function asyncReject() {
|
|
192
|
+
router.allowPageChange = true;
|
|
193
|
+
}
|
|
194
|
+
if (tabRoute.async) {
|
|
195
|
+
tabRoute.async.call(router, {
|
|
196
|
+
router,
|
|
197
|
+
to: currentRoute,
|
|
198
|
+
from: previousRoute,
|
|
199
|
+
resolve: asyncResolve,
|
|
200
|
+
reject: asyncReject,
|
|
201
|
+
app: router.app
|
|
202
|
+
});
|
|
203
|
+
} else if (tabRoute.asyncComponent) {
|
|
204
|
+
asyncComponent(router, tabRoute.asyncComponent, asyncResolve, asyncReject);
|
|
205
|
+
} else if (!hasContentLoadProp) {
|
|
206
|
+
router.allowPageChange = true;
|
|
207
|
+
}
|
|
208
|
+
return router;
|
|
209
|
+
}
|
|
210
|
+
function tabRemove($oldTabEl, $newTabEl, tabRoute) {
|
|
211
|
+
const router = this;
|
|
212
|
+
let hasTabComponentChild;
|
|
213
|
+
if ($oldTabEl[0]) {
|
|
214
|
+
$oldTabEl[0].f7RouterTabLoaded = false;
|
|
215
|
+
delete $oldTabEl[0].f7RouterTabLoaded;
|
|
216
|
+
}
|
|
217
|
+
$oldTabEl.children().each(tabChild => {
|
|
218
|
+
if (tabChild.f7Component) {
|
|
219
|
+
hasTabComponentChild = true;
|
|
220
|
+
$(tabChild).trigger('tab:beforeremove', tabRoute);
|
|
221
|
+
tabChild.f7Component.destroy();
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
if (!hasTabComponentChild) {
|
|
225
|
+
$oldTabEl.trigger('tab:beforeremove', tabRoute);
|
|
226
|
+
}
|
|
227
|
+
router.emit('tabBeforeRemove', $oldTabEl[0], $newTabEl[0], tabRoute);
|
|
228
|
+
router.removeTabContent($oldTabEl[0], tabRoute);
|
|
229
|
+
}
|
|
230
|
+
export { tabLoad, tabRemove };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Framework7, { Framework7Plugin } from '../../components/app/app-class.js';
|
|
2
|
+
|
|
3
|
+
export namespace ServiceWorker {
|
|
4
|
+
interface AppMethods {
|
|
5
|
+
serviceWorker: {
|
|
6
|
+
/** Service worker container (navigator.serviceWorker) */
|
|
7
|
+
container: ServiceWorkerContainer;
|
|
8
|
+
/** Array with service workers registrations */
|
|
9
|
+
registrations: ServiceWorkerRegistration[];
|
|
10
|
+
/** Register service worker */
|
|
11
|
+
register(path: string, scope?: string): Promise<any>;
|
|
12
|
+
/** Unregister service worker */
|
|
13
|
+
unregister(registration?: ServiceWorkerRegistration): Promise<any>;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface AppParams {
|
|
17
|
+
/** Object with service worker parameters */
|
|
18
|
+
serviceWorker?: {
|
|
19
|
+
/** Service worker to register path (or array with paths) */
|
|
20
|
+
path?: string | string[];
|
|
21
|
+
/** Default service worker scope */
|
|
22
|
+
scope?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface AppEvents {
|
|
26
|
+
/** Event will be triggered when service worker successfully registered */
|
|
27
|
+
serviceWorkerRegisterSuccess: (registration: ServiceWorkerRegistration) => void;
|
|
28
|
+
/** Event will be triggered when service worker registration failed */
|
|
29
|
+
serviceWorkerRegisterError: (error: Error) => void;
|
|
30
|
+
/** Event will be triggered when service worker successfully unregistered */
|
|
31
|
+
serviceWorkerUnregisterSuccess: (registration: ServiceWorkerRegistration) => void;
|
|
32
|
+
/** Event will be triggered when service worker unregister failed */
|
|
33
|
+
serviceWorkerUnregisterError: (registration: ServiceWorkerRegistration, error: Error) => void;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
declare const ServiceWorkerModule: Framework7Plugin;
|
|
37
|
+
|
|
38
|
+
export default ServiceWorkerModule;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { getWindow } from 'ssr-window';
|
|
2
|
+
import { extend } from '../../shared/utils.js';
|
|
3
|
+
const SW = {
|
|
4
|
+
registrations: [],
|
|
5
|
+
register(path, scope) {
|
|
6
|
+
const app = this;
|
|
7
|
+
const window = getWindow();
|
|
8
|
+
if (!('serviceWorker' in window.navigator) || !app.serviceWorker.container) {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
reject(new Error('Service worker is not supported'));
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
app.serviceWorker.container.register(path, scope ? {
|
|
15
|
+
scope
|
|
16
|
+
} : {}).then(reg => {
|
|
17
|
+
SW.registrations.push(reg);
|
|
18
|
+
app.emit('serviceWorkerRegisterSuccess', reg);
|
|
19
|
+
resolve(reg);
|
|
20
|
+
}).catch(error => {
|
|
21
|
+
app.emit('serviceWorkerRegisterError', error);
|
|
22
|
+
reject(error);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
unregister(registration) {
|
|
27
|
+
const app = this;
|
|
28
|
+
const window = getWindow();
|
|
29
|
+
if (!('serviceWorker' in window.navigator) || !app.serviceWorker.container) {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
reject(new Error('Service worker is not supported'));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
let registrations;
|
|
35
|
+
if (!registration) registrations = SW.registrations;else if (Array.isArray(registration)) registrations = registration;else registrations = [registration];
|
|
36
|
+
return Promise.all(registrations.map(reg => new Promise((resolve, reject) => {
|
|
37
|
+
reg.unregister().then(() => {
|
|
38
|
+
if (SW.registrations.indexOf(reg) >= 0) {
|
|
39
|
+
SW.registrations.splice(SW.registrations.indexOf(reg), 1);
|
|
40
|
+
}
|
|
41
|
+
app.emit('serviceWorkerUnregisterSuccess', reg);
|
|
42
|
+
resolve();
|
|
43
|
+
}).catch(error => {
|
|
44
|
+
app.emit('serviceWorkerUnregisterError', reg, error);
|
|
45
|
+
reject(error);
|
|
46
|
+
});
|
|
47
|
+
})));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export default {
|
|
51
|
+
name: 'sw',
|
|
52
|
+
params: {
|
|
53
|
+
serviceWorker: {
|
|
54
|
+
path: undefined,
|
|
55
|
+
scope: undefined
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
create() {
|
|
59
|
+
const app = this;
|
|
60
|
+
const window = getWindow();
|
|
61
|
+
extend(app, {
|
|
62
|
+
serviceWorker: {
|
|
63
|
+
container: 'serviceWorker' in window.navigator ? window.navigator.serviceWorker : undefined,
|
|
64
|
+
registrations: SW.registrations,
|
|
65
|
+
register: SW.register.bind(app),
|
|
66
|
+
unregister: SW.unregister.bind(app)
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
on: {
|
|
71
|
+
init() {
|
|
72
|
+
const window = getWindow();
|
|
73
|
+
if (!('serviceWorker' in window.navigator)) return;
|
|
74
|
+
const app = this;
|
|
75
|
+
if (app.device.cordova || window.Capacitor && window.Capacitor.isNative) return;
|
|
76
|
+
if (!app.serviceWorker.container) return;
|
|
77
|
+
const paths = app.params.serviceWorker.path;
|
|
78
|
+
const scope = app.params.serviceWorker.scope;
|
|
79
|
+
if (!paths || Array.isArray(paths) && !paths.length) return;
|
|
80
|
+
const toRegister = Array.isArray(paths) ? paths : [paths];
|
|
81
|
+
toRegister.forEach(path => {
|
|
82
|
+
app.serviceWorker.register(path, scope);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
|
2
|
+
import { extend } from '../../shared/utils.js';
|
|
3
|
+
function createStore(storeParams) {
|
|
4
|
+
if (storeParams === void 0) {
|
|
5
|
+
storeParams = {};
|
|
6
|
+
}
|
|
7
|
+
const store = {
|
|
8
|
+
__store: true
|
|
9
|
+
};
|
|
10
|
+
const originalState = {
|
|
11
|
+
...(storeParams.state || {})
|
|
12
|
+
};
|
|
13
|
+
const actions = {
|
|
14
|
+
...(storeParams.actions || {})
|
|
15
|
+
};
|
|
16
|
+
const getters = {
|
|
17
|
+
...(storeParams.getters || {})
|
|
18
|
+
};
|
|
19
|
+
const state = extend({}, originalState);
|
|
20
|
+
let propsQueue = [];
|
|
21
|
+
const gettersDependencies = {};
|
|
22
|
+
const gettersCallbacks = {};
|
|
23
|
+
Object.keys(getters).forEach(getterKey => {
|
|
24
|
+
gettersDependencies[getterKey] = [];
|
|
25
|
+
gettersCallbacks[getterKey] = [];
|
|
26
|
+
});
|
|
27
|
+
const getGetterValue = getterKey => {
|
|
28
|
+
return getters[getterKey]({
|
|
29
|
+
state: store.state
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const addGetterDependencies = (getterKey, deps) => {
|
|
33
|
+
if (!gettersDependencies[getterKey]) gettersDependencies[getterKey] = [];
|
|
34
|
+
deps.forEach(dep => {
|
|
35
|
+
if (gettersDependencies[getterKey].indexOf(dep) < 0) {
|
|
36
|
+
gettersDependencies[getterKey].push(dep);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const addGetterCallback = (getterKey, callback) => {
|
|
41
|
+
if (!gettersCallbacks[getterKey]) gettersCallbacks[getterKey] = [];
|
|
42
|
+
gettersCallbacks[getterKey].push(callback);
|
|
43
|
+
};
|
|
44
|
+
const runGetterCallbacks = stateKey => {
|
|
45
|
+
const keys = Object.keys(gettersDependencies).filter(getterKey => {
|
|
46
|
+
return gettersDependencies[getterKey].indexOf(stateKey) >= 0;
|
|
47
|
+
});
|
|
48
|
+
keys.forEach(getterKey => {
|
|
49
|
+
if (!gettersCallbacks[getterKey] || !gettersCallbacks[getterKey].length) return;
|
|
50
|
+
gettersCallbacks[getterKey].forEach(callback => {
|
|
51
|
+
callback(getGetterValue(getterKey));
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const removeGetterCallback = callback => {
|
|
56
|
+
Object.keys(gettersCallbacks).forEach(stateKey => {
|
|
57
|
+
const callbacks = gettersCallbacks[stateKey];
|
|
58
|
+
if (callbacks.indexOf(callback) >= 0) {
|
|
59
|
+
callbacks.splice(callbacks.indexOf(callback), 1);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// eslint-disable-next-line
|
|
65
|
+
store.__removeCallback = callback => {
|
|
66
|
+
removeGetterCallback(callback);
|
|
67
|
+
};
|
|
68
|
+
const getterValue = function (getterKey, addCallback) {
|
|
69
|
+
if (addCallback === void 0) {
|
|
70
|
+
addCallback = true;
|
|
71
|
+
}
|
|
72
|
+
if (getterKey === 'constructor') return undefined;
|
|
73
|
+
propsQueue = [];
|
|
74
|
+
const value = getGetterValue(getterKey);
|
|
75
|
+
addGetterDependencies(getterKey, propsQueue);
|
|
76
|
+
const onUpdated = callback => {
|
|
77
|
+
addGetterCallback(getterKey, callback);
|
|
78
|
+
};
|
|
79
|
+
const obj = {
|
|
80
|
+
value,
|
|
81
|
+
onUpdated
|
|
82
|
+
};
|
|
83
|
+
if (!addCallback) {
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
const callback = v => {
|
|
87
|
+
obj.value = v;
|
|
88
|
+
};
|
|
89
|
+
obj.__callback = callback;
|
|
90
|
+
addGetterCallback(getterKey, callback);
|
|
91
|
+
// eslint-disable-next-line
|
|
92
|
+
return obj;
|
|
93
|
+
};
|
|
94
|
+
store.state = new Proxy(state, {
|
|
95
|
+
set: (target, prop, value) => {
|
|
96
|
+
target[prop] = value;
|
|
97
|
+
runGetterCallbacks(prop);
|
|
98
|
+
return true;
|
|
99
|
+
},
|
|
100
|
+
get: (target, prop) => {
|
|
101
|
+
propsQueue.push(prop);
|
|
102
|
+
return target[prop];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
store.getters = new Proxy(getters, {
|
|
106
|
+
set: () => false,
|
|
107
|
+
get: (target, prop) => {
|
|
108
|
+
if (!target[prop]) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return getterValue(prop, true);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
store._gettersPlain = new Proxy(getters, {
|
|
115
|
+
set: () => false,
|
|
116
|
+
get: (target, prop) => {
|
|
117
|
+
if (!target[prop]) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
return getterValue(prop, false);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
store.dispatch = (actionName, data) => {
|
|
124
|
+
return new Promise((resolve, reject) => {
|
|
125
|
+
if (!actions[actionName]) {
|
|
126
|
+
reject();
|
|
127
|
+
throw new Error(`Framework7: Store action "${actionName}" is not found`);
|
|
128
|
+
}
|
|
129
|
+
const result = actions[actionName]({
|
|
130
|
+
state: store.state,
|
|
131
|
+
dispatch: store.dispatch
|
|
132
|
+
}, data);
|
|
133
|
+
resolve(result);
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
return store;
|
|
137
|
+
}
|
|
138
|
+
export default createStore;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Framework7Plugin } from '../../components/app/app-class.js';
|
|
2
|
+
|
|
3
|
+
interface StoreGetterValue {
|
|
4
|
+
value: any;
|
|
5
|
+
onUpdated: (value: any) => any;
|
|
6
|
+
__callback: any;
|
|
7
|
+
}
|
|
8
|
+
export interface StoreObject {
|
|
9
|
+
state: any;
|
|
10
|
+
getters: any;
|
|
11
|
+
dispatch: (name: string, data: any) => Promise<any>;
|
|
12
|
+
__removeCallback: (callback: any) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface StoreParameters {
|
|
15
|
+
state: object;
|
|
16
|
+
actions?: object;
|
|
17
|
+
getters?: object;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Create new store */
|
|
21
|
+
interface createStore {
|
|
22
|
+
(storeParameters: StoreParameters): StoreObject;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const createStore: createStore;
|
|
26
|
+
|
|
27
|
+
export namespace Store {
|
|
28
|
+
interface AppMethods {
|
|
29
|
+
/** Create new store */
|
|
30
|
+
createStore: (storeParameters: StoreParameters) => StoreObject;
|
|
31
|
+
}
|
|
32
|
+
interface AppParams {
|
|
33
|
+
/** Store */
|
|
34
|
+
store?: StoreParameters | StoreObject;
|
|
35
|
+
}
|
|
36
|
+
interface AppEvents {}
|
|
37
|
+
}
|
|
38
|
+
declare const StoreModule: Framework7Plugin;
|
|
39
|
+
|
|
40
|
+
export default StoreModule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Support } from '../../shared/get-support.js';
|
|
2
|
+
import Framework7, { Framework7Plugin } from '../../components/app/app-class.js';
|
|
3
|
+
|
|
4
|
+
export namespace Support {
|
|
5
|
+
interface AppMethods {
|
|
6
|
+
/** Object with properties about supported features */
|
|
7
|
+
support: Support;
|
|
8
|
+
}
|
|
9
|
+
interface AppParams {}
|
|
10
|
+
interface AppEvents {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const SupportModule: Framework7Plugin;
|
|
14
|
+
|
|
15
|
+
export default SupportModule;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Framework7, { Framework7Plugin } from '../../components/app/app-class.js';
|
|
2
|
+
|
|
3
|
+
export namespace Touch {
|
|
4
|
+
interface AppMethods {
|
|
5
|
+
touchEvents: {
|
|
6
|
+
start: string;
|
|
7
|
+
move: string;
|
|
8
|
+
end: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface AppParams {
|
|
12
|
+
/** Object with touch-module related parameters */
|
|
13
|
+
touch?:
|
|
14
|
+
| {
|
|
15
|
+
/** Distance threshold (in px) to prevent short swipes. So if tap/move distance is larger than this value then "click" will not be triggered. (default 5) */
|
|
16
|
+
touchClicksDistanceThreshold?: number;
|
|
17
|
+
/** . (default true) */
|
|
18
|
+
disableContextMenu?: boolean;
|
|
19
|
+
/** Enables tap hold. (default false) */
|
|
20
|
+
tapHold?: boolean;
|
|
21
|
+
/** Determines how long (in ms) the user must hold their tap before the taphold event is fired on the target element. (default 750) */
|
|
22
|
+
tapHoldDelay?: number;
|
|
23
|
+
/** When enabled (by default), then click event will not be fired after tap hold event. (default true) */
|
|
24
|
+
tapHoldPreventClicks?: boolean;
|
|
25
|
+
/** When enabled, app will add "active-state" class to currently touched (:active) element.. (default true) */
|
|
26
|
+
activeState?: boolean;
|
|
27
|
+
/** CSS selector of elements where enabled activeState will add appropriate active class. (default a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .link, .item-link) */
|
|
28
|
+
activeStateElements?: string;
|
|
29
|
+
/** Enables MD-theme specific touch ripple effect. (default true) */
|
|
30
|
+
mdTouchRipple?: boolean;
|
|
31
|
+
/** Enables iOS-theme specific touch ripple effect. (default false) */
|
|
32
|
+
iosTouchRipple?: boolean;
|
|
33
|
+
/** CSS selector of elements to apply touch ripple effect on click. (default .ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus) */
|
|
34
|
+
touchRippleElements?: string;
|
|
35
|
+
/** CSS selector of elements to with inset touch ripple effect. (default .ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back) */
|
|
36
|
+
touchRippleInsetElements?: string;
|
|
37
|
+
}
|
|
38
|
+
| undefined;
|
|
39
|
+
}
|
|
40
|
+
interface AppEvents {
|
|
41
|
+
/** Event will be fired on app click */
|
|
42
|
+
click: (event: Event) => void;
|
|
43
|
+
/** Event will be fired on touch start (mousedown) event added as active listener (possible to prevent default) */
|
|
44
|
+
'touchstart:active': (event: Event) => void;
|
|
45
|
+
/** Event will be fired on touch move (mousemove) event added as active listener (possible to prevent default) */
|
|
46
|
+
'touchmove:active': (event: Event) => void;
|
|
47
|
+
/** Event will be fired on touch end (mouseup) event added as active listener (possible to prevent default) */
|
|
48
|
+
'touchend:active': (event: Event) => void;
|
|
49
|
+
/** Event will be fired on touch start (mousedown) event added as passive listener (impossible to prevent default) */
|
|
50
|
+
'touchstart:passive': (event: Event) => void;
|
|
51
|
+
/** Event will be fired on touch move (mousemove) event added as passive listener (impossible to prevent default) */
|
|
52
|
+
'touchmove:passive': (event: Event) => void;
|
|
53
|
+
/** Event will be fired on touch end (mouseup) event added as passive listener (impossible to prevent default) */
|
|
54
|
+
'touchend:passive': (event: Event) => void;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare const TouchModule: Framework7Plugin;
|
|
59
|
+
|
|
60
|
+
export default TouchModule;
|