@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,354 @@
|
|
|
1
|
+
import Framework7, {
|
|
2
|
+
Framework7EventsClass,
|
|
3
|
+
Framework7Plugin,
|
|
4
|
+
CSSSelector,
|
|
5
|
+
} from '../../components/app/app-class.js';
|
|
6
|
+
import { Dom7, Dom7Array } from 'dom7';
|
|
7
|
+
import { View } from '../../components/view/view.js';
|
|
8
|
+
|
|
9
|
+
import { ComponentFunction as Component } from '../../modules/component/component.js';
|
|
10
|
+
import { Actions } from '../../components/actions/actions.js';
|
|
11
|
+
import { Popup } from '../../components/popup/popup.js';
|
|
12
|
+
import { LoginScreen } from '../../components/login-screen/login-screen.js';
|
|
13
|
+
import { Popover } from '../../components/popover/popover.js';
|
|
14
|
+
import { Modal } from '../../components/modal/modal.js';
|
|
15
|
+
import { Sheet } from '../../components/sheet/sheet.js';
|
|
16
|
+
import { Panel } from '../../components/panel/panel.js';
|
|
17
|
+
|
|
18
|
+
export namespace Router {
|
|
19
|
+
interface ModalRouteParameters {
|
|
20
|
+
/** Creates dynamic page from specified content string */
|
|
21
|
+
content?: string | HTMLElement | Dom7Array | HTMLElement[];
|
|
22
|
+
/** Load page content via Ajax. */
|
|
23
|
+
url?: string;
|
|
24
|
+
/** Load page from passed Framework7 Router Component */
|
|
25
|
+
component?: Component | Function | object;
|
|
26
|
+
/** load pages as a component via Ajax */
|
|
27
|
+
componentUrl?: string;
|
|
28
|
+
/** Do required asynchronous manipulation and the return required route content and options */
|
|
29
|
+
async?(routeTo: Route, routeFrom: Route, resolve: Function, reject: Function): void;
|
|
30
|
+
/** Function that should return Promise resolved with Component or ES module with `.default` property containing Component */
|
|
31
|
+
asyncComponent?(): Promise<any>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface RouteCallbackCtx {
|
|
35
|
+
app: Framework7;
|
|
36
|
+
to: Route;
|
|
37
|
+
from: Route;
|
|
38
|
+
resolve: Function;
|
|
39
|
+
reject: Function;
|
|
40
|
+
router: Router;
|
|
41
|
+
direction?: 'forward' | 'backward';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface RouteParameters {
|
|
45
|
+
/** Route name, e.g. home */
|
|
46
|
+
name?: string;
|
|
47
|
+
/** Route path. Means this route will be loaded when we click link that match to this path, or can be loaded by this path using API */
|
|
48
|
+
path: string;
|
|
49
|
+
/** View name where this route will be forced to load */
|
|
50
|
+
viewName?: string;
|
|
51
|
+
/** Object with additional route options (optional) */
|
|
52
|
+
options?: RouteOptions;
|
|
53
|
+
/** Array with nested routes */
|
|
54
|
+
routes?: RouteParameters[];
|
|
55
|
+
/** Modules to load */
|
|
56
|
+
modules?: any[];
|
|
57
|
+
/** Load page from DOM by passed HTMLElement */
|
|
58
|
+
el?: HTMLElement | CSSSelector;
|
|
59
|
+
/** Load page from DOM that has same data-name attribute */
|
|
60
|
+
pageName?: string;
|
|
61
|
+
/** Creates dynamic page from specified content string */
|
|
62
|
+
content?: string | HTMLElement | Dom7Array | HTMLElement[];
|
|
63
|
+
/** Load page content via Ajax. */
|
|
64
|
+
url?: string;
|
|
65
|
+
/** Load page from passed Framework7 Router Component */
|
|
66
|
+
component?: Component | Function | object;
|
|
67
|
+
/** load pages as a component via Ajax */
|
|
68
|
+
componentUrl?: string;
|
|
69
|
+
/** Do required asynchronous manipulation and the return required route content and options */
|
|
70
|
+
async?(ctx: RouteCallbackCtx): void;
|
|
71
|
+
/** Function that should return Promise resolved with Component or ES module with `.default` property containing Component */
|
|
72
|
+
asyncComponent?(): Promise<any>;
|
|
73
|
+
|
|
74
|
+
/** tab id */
|
|
75
|
+
id?: string;
|
|
76
|
+
/** Array with tab routes */
|
|
77
|
+
tabs?: RouteParameters[];
|
|
78
|
+
/** Action Sheet route */
|
|
79
|
+
actions?: Actions.Parameters & ModalRouteParameters;
|
|
80
|
+
/** Popup route */
|
|
81
|
+
popup?: Popup.Parameters & ModalRouteParameters;
|
|
82
|
+
/** Login screen route */
|
|
83
|
+
loginScreen?: LoginScreen.Parameters & ModalRouteParameters;
|
|
84
|
+
/** Popover route */
|
|
85
|
+
popover?: Popover.Parameters & ModalRouteParameters;
|
|
86
|
+
/** Sheet route */
|
|
87
|
+
sheet?: Sheet.Parameters & ModalRouteParameters;
|
|
88
|
+
/** Panel route */
|
|
89
|
+
panel?: Panel.Parameters & ModalRouteParameters;
|
|
90
|
+
|
|
91
|
+
/** Route alias, or array with route aliases. We need to specify here alias path */
|
|
92
|
+
alias?: string | any[];
|
|
93
|
+
/** Route redirect. We need to specify here redirect url (not path) */
|
|
94
|
+
redirect?: string | ((ctx: RouteCallbackCtx) => void);
|
|
95
|
+
/** Function (or array of functions) that will be executed before route load/enter. To proceed route loading resolve must be called. In case of array then every function in array must be resolved to proceed */
|
|
96
|
+
beforeEnter?: Function[] | ((ctx: RouteCallbackCtx) => void);
|
|
97
|
+
/** Function (or array of functions) that will be executed before route unload/leave. To proceed navigation resolve must be called. In case of array then every function in array must be resolved to proceed */
|
|
98
|
+
beforeLeave?: Function[] | ((ctx: RouteCallbackCtx) => void);
|
|
99
|
+
/** When enabled then once loaded page and its component (Vue, React or Router component) will be never destroyed. Instead, it will be detached from DOM and reused again when required */
|
|
100
|
+
keepAlive?: boolean;
|
|
101
|
+
/** Enables master route for Master-Detail view */
|
|
102
|
+
master?: boolean | ((f7: Framework7, router: Router) => boolean);
|
|
103
|
+
/** Detail routes this master route */
|
|
104
|
+
detailRoutes?: RouteParameters[];
|
|
105
|
+
/** Route page events */
|
|
106
|
+
on?: { [event: string]: (e: Event, page: any) => void };
|
|
107
|
+
}
|
|
108
|
+
interface RouteOptions {
|
|
109
|
+
/** whether the page should be animated or not (overwrites default router settings) */
|
|
110
|
+
animate?: boolean;
|
|
111
|
+
/** whether the page should be saved in router history */
|
|
112
|
+
history?: boolean;
|
|
113
|
+
/** whether the page should be saved in browser state. In case you are using browserHistory, then you can pass here false to prevent route getting in browser history */
|
|
114
|
+
browserHistory?: boolean;
|
|
115
|
+
/** replace the current page with the new one from route */
|
|
116
|
+
reloadCurrent?: boolean;
|
|
117
|
+
/** replace the previous page in history with the new one from route */
|
|
118
|
+
reloadPrevious?: boolean;
|
|
119
|
+
/** load new page and remove all previous pages from history and DOM */
|
|
120
|
+
reloadAll?: boolean;
|
|
121
|
+
/** previous pages history will be cleared after reloading/navigate to the specified route */
|
|
122
|
+
clearPreviousHistory?: boolean;
|
|
123
|
+
/** If set to `true` then it will ignore if such URL in cache and reload it using XHR again */
|
|
124
|
+
ignoreCache?: boolean;
|
|
125
|
+
/** if set to `true` then it will ignore previous page in history and load specified one */
|
|
126
|
+
force?: boolean;
|
|
127
|
+
/** pass React/Vue component props */
|
|
128
|
+
props?: object;
|
|
129
|
+
/** custom page transition name */
|
|
130
|
+
transition?: string;
|
|
131
|
+
/** Allows open page route as modal or panel */
|
|
132
|
+
openIn?: 'popup' | 'loginScreen' | 'sheet' | 'popover' | 'panel';
|
|
133
|
+
}
|
|
134
|
+
interface NavigateParameters {
|
|
135
|
+
query?: { [queryParameter: string]: number | string | undefined };
|
|
136
|
+
/** route params. If we have matching route with `/page/user/:userId/post/:postId/` path and url of the page is `/page/user/55/post/12/` then it will be the following object `{userId: '55', postId: '12'}` */
|
|
137
|
+
params?: { [routeParameter: string]: number | string | undefined };
|
|
138
|
+
/** route name */
|
|
139
|
+
name?: string;
|
|
140
|
+
/** route path */
|
|
141
|
+
path?: string;
|
|
142
|
+
}
|
|
143
|
+
interface Route {
|
|
144
|
+
/** route URL */
|
|
145
|
+
url: string;
|
|
146
|
+
/** route path */
|
|
147
|
+
path: string;
|
|
148
|
+
/** object with route query. If the url is `/page/?id=5&foo=bar` then it will contain the following object `{id: '5', foo: 'bar'}` */
|
|
149
|
+
query: { [queryParameter: string]: string | undefined };
|
|
150
|
+
/** route params. If we have matching route with `/page/user/:userId/post/:postId/` path and url of the page is `/page/user/55/post/12/` then it will be the following object `{userId: '55', postId: '12'}` */
|
|
151
|
+
params: { [routeParameter: string]: string | undefined };
|
|
152
|
+
/** route name */
|
|
153
|
+
name: string;
|
|
154
|
+
/** route URL hash */
|
|
155
|
+
hash: string;
|
|
156
|
+
/** object with matching route from available routes */
|
|
157
|
+
route: RouteParameters;
|
|
158
|
+
/** props that were passed to the route */
|
|
159
|
+
props: object;
|
|
160
|
+
}
|
|
161
|
+
interface Page {
|
|
162
|
+
/** Initialized app instance */
|
|
163
|
+
app: Framework7;
|
|
164
|
+
/** View instance that contains this page (if this View was initialized) */
|
|
165
|
+
view: View.View;
|
|
166
|
+
/** Router instance that contains this page (if this View was initialized). Same as page.view.router */
|
|
167
|
+
router: Router.Router;
|
|
168
|
+
/** Value of page's data-name attribute */
|
|
169
|
+
name: string;
|
|
170
|
+
/** Page element */
|
|
171
|
+
el: HTMLElement;
|
|
172
|
+
/** Dom7 instance with Page element */
|
|
173
|
+
$el: Dom7Array;
|
|
174
|
+
/** Related navbar element for this page. Available only in iOS theme with dynamic navbar enabled. */
|
|
175
|
+
navbarEl: HTMLElement;
|
|
176
|
+
/** Dom7 instance with related navbar element for this page. Available only in iOS theme with dynamic navbar enabled. */
|
|
177
|
+
$navbarEl: Dom7Array;
|
|
178
|
+
/** Page position before transition or direction of where this Page comes from. It will be next if you load new page, previous - if you go back to this page, or current if this page replaces the currently active one. */
|
|
179
|
+
from: string;
|
|
180
|
+
/** New page position or where this page goes to. Can be same next, previous or current */
|
|
181
|
+
to: string;
|
|
182
|
+
/** Alias for page.from */
|
|
183
|
+
position: string;
|
|
184
|
+
/** Direction of page transition (if applicable). Can be forward or backward */
|
|
185
|
+
direction: string;
|
|
186
|
+
/** Route associated with this page, object with current route data that was used to load this page. It has the following properties */
|
|
187
|
+
route: Route;
|
|
188
|
+
/** Page data of the page that was currently active before this new page. */
|
|
189
|
+
pageFrom: Page;
|
|
190
|
+
}
|
|
191
|
+
interface Router extends Framework7EventsClass<Events> {
|
|
192
|
+
/** Link to global app instance */
|
|
193
|
+
app: Framework7;
|
|
194
|
+
/** Link to related View instance */
|
|
195
|
+
view: View.View;
|
|
196
|
+
/** Object with router initialization parameters */
|
|
197
|
+
params: View.Parameters;
|
|
198
|
+
/** Router's view HTML element */
|
|
199
|
+
el: HTMLElement;
|
|
200
|
+
/** Dom7 instance with router's view HTML element */
|
|
201
|
+
$el: Dom7Array;
|
|
202
|
+
/** Array with available router's routes */
|
|
203
|
+
routes: RouteParameters[];
|
|
204
|
+
/** Array with router's view history */
|
|
205
|
+
history: string[];
|
|
206
|
+
|
|
207
|
+
/** Object with current route data */
|
|
208
|
+
currentRoute: Route;
|
|
209
|
+
/** Object with previously active route data */
|
|
210
|
+
previousRoute: Route;
|
|
211
|
+
/** Boolean property indicating is it allowed to change page / navigate or not */
|
|
212
|
+
allowPageChange: boolean;
|
|
213
|
+
/** Generate route url based on a given route name */
|
|
214
|
+
generateUrl(parameters: {
|
|
215
|
+
/** route name */
|
|
216
|
+
name: string;
|
|
217
|
+
/** route params */
|
|
218
|
+
params: any;
|
|
219
|
+
/** route query */
|
|
220
|
+
query: any;
|
|
221
|
+
}): string;
|
|
222
|
+
/** Navigate to (load) new page */
|
|
223
|
+
navigate(url: string, options?: RouteOptions): Router;
|
|
224
|
+
/** Navigate to (load) new page by parameters. This method allows to navigate to route by its name */
|
|
225
|
+
navigate(parameters: NavigateParameters, options?: RouteOptions): Router;
|
|
226
|
+
/** Go back to previous page, going back in View history */
|
|
227
|
+
back(url?: string, options?: RouteOptions): Router;
|
|
228
|
+
/** Refresh/reload current page */
|
|
229
|
+
refreshPage(props?: any): Router;
|
|
230
|
+
/** Clear router previous pages history and remove all previous pages from DOM */
|
|
231
|
+
clearPreviousHistory(): Router;
|
|
232
|
+
/** Updates current route url, and updates `router.currentRoute` properties (query, params, hash, etc.) based on passed url. This method doesn't load or reload any content. It just changes current route url */
|
|
233
|
+
updateCurrentUrl(url: string): Router;
|
|
234
|
+
}
|
|
235
|
+
interface SwipeBackData {
|
|
236
|
+
percentage: number;
|
|
237
|
+
currentPageEl: HTMLElement;
|
|
238
|
+
previousPageEl: HTMLElement;
|
|
239
|
+
currentNavbarEl: HTMLElement;
|
|
240
|
+
previousNavbarEl: HTMLElement;
|
|
241
|
+
}
|
|
242
|
+
interface Events {
|
|
243
|
+
/** Event will be fired on current route change */
|
|
244
|
+
routeChange(newRoute: Route, previousRoute: Route, router: Router): void;
|
|
245
|
+
/** Event will be fired on current route change and after page transitions */
|
|
246
|
+
routeChanged(newRoute: Route, previousRoute: Route, router: Router): void;
|
|
247
|
+
/** Event will be fired when router.updateCurrentUrl method called */
|
|
248
|
+
routeUrlUpdate(newRoute: Route, router: Router): void;
|
|
249
|
+
|
|
250
|
+
/** Event will be fired when the request succeeds. As an arguments receives XHR object and navigating options object */
|
|
251
|
+
routerAjaxSuccess(response: Response, options: RouteOptions): void;
|
|
252
|
+
/** Event will be fired if the request fails. As an arguments receives XHR object and navigating options object */
|
|
253
|
+
routerAjaxError(response: Response, options: RouteOptions): void;
|
|
254
|
+
/** Event will be fired when the request finishes. As an arguments receives XHR object and navigating options object */
|
|
255
|
+
routerAjaxComplete(response: Response, options: RouteOptions): void;
|
|
256
|
+
|
|
257
|
+
/** Event will be triggered during swipe back move */
|
|
258
|
+
swipebackMove(data: SwipeBackData): void;
|
|
259
|
+
/** Event will be triggered right before swipe back animation to previous page when you release it */
|
|
260
|
+
swipebackBeforeChange(data: SwipeBackData): void;
|
|
261
|
+
/** Event will be triggered after swipe back animation to previous page when you release it */
|
|
262
|
+
swipebackAfterChange(data: SwipeBackData): void;
|
|
263
|
+
/** Event will be triggered right before swipe back animation to current page when you release it */
|
|
264
|
+
swipebackBeforeReset(data: SwipeBackData): void;
|
|
265
|
+
/** Event will be triggered after swipe back animation to current page when you release it */
|
|
266
|
+
swipebackAfterReset(data: SwipeBackData): void;
|
|
267
|
+
|
|
268
|
+
/** Event will be triggered when new page just inserted to DOM. As an argument event receives Page Data */
|
|
269
|
+
pageMounted(page: Page): void;
|
|
270
|
+
/** Event will be triggered after Router initialize required page's components and navbar. As an argument event receives Page Data */
|
|
271
|
+
pageInit(page: Page): void;
|
|
272
|
+
/** This event will be triggered in case of navigating to the page that was already initialized. As an argument event receives Page Data */
|
|
273
|
+
pageReinit(page: Page): void;
|
|
274
|
+
/** Event will be triggered when everything initialized and page is ready to be transitioned into view (into active/current position). As an argument event receives Page Data */
|
|
275
|
+
pageBeforeIn(page: Page): void;
|
|
276
|
+
/** Event will be triggered after page transitioned into view. As an argument event receives Page Data */
|
|
277
|
+
pageAfterIn(page: Page): void;
|
|
278
|
+
/** Event will be triggered right before page is going to be transitioned out of view. As an argument event receives Page Data */
|
|
279
|
+
pageBeforeOut(page: Page): void;
|
|
280
|
+
/** Event will be triggered after page transitioned out of view. As an argument event receives Page Data */
|
|
281
|
+
pageAfterOut(page: Page): void;
|
|
282
|
+
/** Event will be triggered right before Page will be removed from DOM. This event could be very useful if you need to detach some events / destroy some plugins to free memory. As an argument event receives Page Data */
|
|
283
|
+
pageBeforeRemove(page: Page): void;
|
|
284
|
+
|
|
285
|
+
/** Event will be triggered on page's parent View-Tab show */
|
|
286
|
+
pageTabShow(pageEl: HTMLElement): void;
|
|
287
|
+
/** Event will be triggered on page's parent View-Tab hide */
|
|
288
|
+
pageTabHide(pageEl: HTMLElement): void;
|
|
289
|
+
|
|
290
|
+
/** Event will be triggered right after routable Tab content will be loaded */
|
|
291
|
+
tabInit(newTabEl: HTMLElement, tabRoute: Route): void;
|
|
292
|
+
/** Event will be triggered right after routable Tab content will be loaded */
|
|
293
|
+
tabMounted(newTabEl: HTMLElement, tabRoute: Route): void;
|
|
294
|
+
/** Event will be triggered right before routable Tab content will be removed */
|
|
295
|
+
tabBeforeRemove(oldTabEl: HTMLElement, newTabEl: HTMLElement, tabRoute: Route): void;
|
|
296
|
+
|
|
297
|
+
/** Event will be triggered right after routable modal content will be loaded and added to DOM */
|
|
298
|
+
modalInit(modalEl: HTMLElement, modalRoute: Route, modal: any): void;
|
|
299
|
+
/** Event will be triggered right after routable modal content will be loaded and added to DOM */
|
|
300
|
+
modalMounted(modalEl: HTMLElement, modalRoute: Route, modal: any): void;
|
|
301
|
+
/** Event will be triggered right before routable modal will be removed from DOM and destroyed */
|
|
302
|
+
modalBeforeRemove(modalEl: HTMLElement, modalRoute: Route, modal: any): void;
|
|
303
|
+
}
|
|
304
|
+
interface DomEvents {
|
|
305
|
+
/** Event will be triggered during swipe back move */
|
|
306
|
+
'swipeback:move': () => void;
|
|
307
|
+
/** Event will be triggered right before swipe back animation to previous page when you release it */
|
|
308
|
+
'swipeback:beforechange': () => void;
|
|
309
|
+
/** Event will be triggered after swipe back animation to previous page when you release it */
|
|
310
|
+
'swipeback:afterchange': () => void;
|
|
311
|
+
/** Event will be triggered right before swipe back animation to current page when you release it */
|
|
312
|
+
'swipeback:beforereset': () => void;
|
|
313
|
+
/** Event will be triggered after swipe back animation to current page when you release it */
|
|
314
|
+
'swipeback:afterreset': () => void;
|
|
315
|
+
/** Event will be triggered when new page just inserted to DOM */
|
|
316
|
+
'page:mounted': () => void;
|
|
317
|
+
/** Event will be triggered after Framework7 initialize required page's components and navbar */
|
|
318
|
+
'page:init': () => void;
|
|
319
|
+
/** This event will be triggered in case of navigating to the page that was already initialized. */
|
|
320
|
+
'page:reinit': () => void;
|
|
321
|
+
/** Event will be triggered when everything initialized and page is ready to be transitioned into view (into active/current position) */
|
|
322
|
+
'page:beforein': () => void;
|
|
323
|
+
/** Event will be triggered after page transitioned into view */
|
|
324
|
+
'page:afterin': () => void;
|
|
325
|
+
/** Event will be triggered right before page is going to be transitioned out of view */
|
|
326
|
+
'page:beforeout': () => void;
|
|
327
|
+
/** Event will be triggered after page transitioned out of view */
|
|
328
|
+
'page:afterout': () => void;
|
|
329
|
+
/** Event will be triggered right before Page will be removed from DOM. This event could be very useful if you need to detach some events / destroy some plugins to free memory */
|
|
330
|
+
'page:beforeremove': () => void;
|
|
331
|
+
/** Event will be triggered on page's parent View-Tab show */
|
|
332
|
+
'page:tabshow': () => void;
|
|
333
|
+
/** Event will be triggered on page's parent View-Tab hide */
|
|
334
|
+
'page:tabhide': () => void;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface AppMethods {
|
|
338
|
+
/** Object with router/view cache data */
|
|
339
|
+
cache: {
|
|
340
|
+
xhr: object[];
|
|
341
|
+
templates: object[];
|
|
342
|
+
components: object[];
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
interface AppParams {
|
|
346
|
+
/** Set to false to disable the router. */
|
|
347
|
+
router?: false;
|
|
348
|
+
}
|
|
349
|
+
interface AppEvents {}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
declare const RouterModule: Framework7Plugin;
|
|
353
|
+
|
|
354
|
+
export default RouterModule;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Router from './router-class.js';
|
|
2
|
+
export default {
|
|
3
|
+
name: 'router',
|
|
4
|
+
static: {
|
|
5
|
+
Router
|
|
6
|
+
},
|
|
7
|
+
instance: {
|
|
8
|
+
cache: {
|
|
9
|
+
xhr: [],
|
|
10
|
+
templates: [],
|
|
11
|
+
components: []
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
create() {
|
|
15
|
+
const instance = this;
|
|
16
|
+
if (instance.app) {
|
|
17
|
+
// View Router
|
|
18
|
+
if (instance.params.router) {
|
|
19
|
+
instance.router = new Router(instance.app, instance);
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
// App Router
|
|
23
|
+
instance.router = new Router(instance);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|