framework7-vue 7.0.9 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion-content.js +2 -5
- package/components/accordion-item.js +0 -13
- package/components/accordion-toggle.js +2 -5
- package/components/accordion.js +0 -4
- package/components/actions-button.d.ts +1 -1
- package/components/actions-button.js +2 -9
- package/components/actions-group.js +2 -5
- package/components/actions-label.d.ts +1 -1
- package/components/actions-label.js +2 -8
- package/components/actions.js +2 -14
- package/components/app.d.ts +7 -12
- package/components/app.js +11 -24
- package/components/appbar.js +2 -5
- package/components/area-chart.js +4 -41
- package/components/badge.js +0 -4
- package/components/block-footer.js +2 -5
- package/components/block-header.js +2 -5
- package/components/block-title.js +0 -4
- package/components/block.d.ts +61 -9
- package/components/block.js +52 -17
- package/components/breadcrumbs-collapsed.js +0 -5
- package/components/breadcrumbs-item.js +0 -4
- package/components/breadcrumbs-separator.js +0 -4
- package/components/breadcrumbs.js +0 -4
- package/components/button.d.ts +9 -25
- package/components/button.js +9 -25
- package/components/card-content.js +0 -4
- package/components/card-footer.js +2 -5
- package/components/card-header.js +2 -5
- package/components/card.d.ts +17 -5
- package/components/card.js +10 -20
- package/components/checkbox.js +0 -7
- package/components/chip.d.ts +0 -4
- package/components/chip.js +0 -7
- package/components/col.js +3 -9
- package/components/fab-backdrop.js +2 -5
- package/components/fab-button.js +0 -6
- package/components/fab-buttons.js +0 -4
- package/components/fab.js +0 -9
- package/components/gauge.js +0 -4
- package/components/icon.d.ts +0 -4
- package/components/icon.js +1 -18
- package/components/input.js +0 -56
- package/components/link.d.ts +0 -4
- package/components/link.js +4 -13
- package/components/list-button.js +0 -6
- package/components/list-group.js +0 -4
- package/components/list-index.d.ts +0 -5
- package/components/list-index.js +0 -14
- package/components/list-input.d.ts +0 -4
- package/components/list-input.js +0 -53
- package/components/list-item-cell.js +3 -5
- package/components/list-item-row.js +3 -5
- package/components/list-item.d.ts +0 -4
- package/components/list-item.js +9 -52
- package/components/list.d.ts +71 -23
- package/components/list.js +42 -33
- package/components/login-screen-title.js +2 -5
- package/components/login-screen.js +2 -17
- package/components/menu-dropdown-item.js +1 -6
- package/components/menu-dropdown.js +1 -4
- package/components/menu-item.js +4 -18
- package/components/menu.js +3 -5
- package/components/message.js +0 -16
- package/components/messagebar-attachment.js +0 -7
- package/components/messagebar-attachments.js +2 -5
- package/components/messagebar-sheet-image.js +7 -15
- package/components/messagebar-sheet-item.js +2 -5
- package/components/messagebar-sheet.js +2 -5
- package/components/messagebar.js +0 -16
- package/components/messages-title.js +2 -5
- package/components/messages.js +0 -13
- package/components/nav-left.js +0 -9
- package/components/nav-right.js +0 -4
- package/components/nav-title-large.js +2 -5
- package/components/nav-title.js +0 -4
- package/components/navbar.d.ts +5 -8
- package/components/navbar.js +6 -29
- package/components/page-content.js +0 -16
- package/components/page.d.ts +0 -4
- package/components/page.js +2 -67
- package/components/panel.d.ts +4 -0
- package/components/panel.js +2 -23
- package/components/photo-browser.js +2 -18
- package/components/pie-chart.js +4 -20
- package/components/popover.d.ts +5 -0
- package/components/popover.js +8 -16
- package/components/popup.js +3 -19
- package/components/preloader.js +4 -23
- package/components/progressbar.js +0 -6
- package/components/radio.js +0 -7
- package/components/range.js +0 -7
- package/components/routable-modals.js +0 -7
- package/components/row.js +3 -9
- package/components/searchbar.d.ts +5 -8
- package/components/searchbar.js +7 -28
- package/components/segmented.d.ts +0 -12
- package/components/segmented.js +2 -12
- package/components/sheet.js +2 -18
- package/components/stepper.d.ts +0 -20
- package/components/stepper.js +1 -27
- package/components/subnavbar.js +0 -4
- package/components/swipeout-actions.js +0 -6
- package/components/swipeout-button.js +0 -6
- package/components/tab.js +2 -15
- package/components/tabs.js +0 -4
- package/components/text-editor.js +0 -17
- package/components/toggle.js +0 -9
- package/components/toolbar.d.ts +4 -21
- package/components/toolbar.js +12 -34
- package/components/treeview-item.d.ts +0 -4
- package/components/treeview-item.js +0 -13
- package/components/treeview.js +2 -5
- package/components/use-icon.js +0 -4
- package/components/view.d.ts +0 -28
- package/components/view.js +4 -50
- package/components/views.js +0 -4
- package/framework7-vue-bundle.js +3 -21
- package/framework7-vue-web-types.json +85 -644
- package/framework7-vue.d.ts +2 -12
- package/framework7-vue.js +3 -12
- package/package.json +1 -1
- package/shared/components-router.js +0 -32
- package/shared/f7.js +5 -19
- package/shared/get-router-initial-component.js +0 -4
- package/shared/mixins.js +3 -15
- package/shared/plugin.js +2 -8
- package/shared/router-open-in.js +4 -13
- package/shared/use-icon.js +1 -6
- package/shared/use-smart-select.js +0 -1
- package/shared/use-store.js +2 -6
- package/shared/use-tab.js +0 -2
- package/shared/use-theme.js +0 -2
- package/shared/use-tooltip.js +0 -2
- package/shared/utils.js +0 -14
- package/components/appbar.d.ts +0 -67
- package/components/col.d.ts +0 -94
- package/components/list-item-cell.d.ts +0 -46
- package/components/list-item-row.d.ts +0 -46
- package/components/menu-dropdown-item.d.ts +0 -223
- package/components/menu-dropdown.d.ts +0 -66
- package/components/menu-item.d.ts +0 -267
- package/components/menu.d.ts +0 -46
- package/components/row.d.ts +0 -73
package/framework7-vue.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import f7ActionsGroup from './components/actions-group.js';
|
|
|
10
10
|
import f7ActionsLabel from './components/actions-label.js';
|
|
11
11
|
import f7Actions from './components/actions.js';
|
|
12
12
|
import f7App from './components/app.js';
|
|
13
|
-
import f7Appbar from './components/appbar.js';
|
|
14
13
|
import f7AreaChart from './components/area-chart.js';
|
|
15
14
|
import f7Badge from './components/badge.js';
|
|
16
15
|
import f7BlockFooter from './components/block-footer.js';
|
|
@@ -28,7 +27,6 @@ import f7CardHeader from './components/card-header.js';
|
|
|
28
27
|
import f7Card from './components/card.js';
|
|
29
28
|
import f7Checkbox from './components/checkbox.js';
|
|
30
29
|
import f7Chip from './components/chip.js';
|
|
31
|
-
import f7Col from './components/col.js';
|
|
32
30
|
import f7FabBackdrop from './components/fab-backdrop.js';
|
|
33
31
|
import f7FabButton from './components/fab-button.js';
|
|
34
32
|
import f7FabButtons from './components/fab-buttons.js';
|
|
@@ -41,16 +39,10 @@ import f7ListButton from './components/list-button.js';
|
|
|
41
39
|
import f7ListGroup from './components/list-group.js';
|
|
42
40
|
import f7ListIndex from './components/list-index.js';
|
|
43
41
|
import f7ListInput from './components/list-input.js';
|
|
44
|
-
import f7ListItemCell from './components/list-item-cell.js';
|
|
45
|
-
import f7ListItemRow from './components/list-item-row.js';
|
|
46
42
|
import f7ListItem from './components/list-item.js';
|
|
47
43
|
import f7List from './components/list.js';
|
|
48
44
|
import f7LoginScreenTitle from './components/login-screen-title.js';
|
|
49
45
|
import f7LoginScreen from './components/login-screen.js';
|
|
50
|
-
import f7MenuDropdownItem from './components/menu-dropdown-item.js';
|
|
51
|
-
import f7MenuDropdown from './components/menu-dropdown.js';
|
|
52
|
-
import f7MenuItem from './components/menu-item.js';
|
|
53
|
-
import f7Menu from './components/menu.js';
|
|
54
46
|
import f7Message from './components/message.js';
|
|
55
47
|
import f7MessagebarAttachment from './components/messagebar-attachment.js';
|
|
56
48
|
import f7MessagebarAttachments from './components/messagebar-attachments.js';
|
|
@@ -77,7 +69,6 @@ import f7Progressbar from './components/progressbar.js';
|
|
|
77
69
|
import f7Radio from './components/radio.js';
|
|
78
70
|
import f7Range from './components/range.js';
|
|
79
71
|
import f7RoutableModals from './components/routable-modals.js';
|
|
80
|
-
import f7Row from './components/row.js';
|
|
81
72
|
import f7Searchbar from './components/searchbar.js';
|
|
82
73
|
import f7Segmented from './components/segmented.js';
|
|
83
74
|
import f7Sheet from './components/sheet.js';
|
|
@@ -105,10 +96,9 @@ import f7Views from './components/views.js';
|
|
|
105
96
|
export interface Framework7Theme {
|
|
106
97
|
ios: boolean;
|
|
107
98
|
md: boolean;
|
|
108
|
-
aurora: boolean;
|
|
109
99
|
}
|
|
110
100
|
|
|
111
|
-
/** Object with boolean properties with information about currently used theme (
|
|
101
|
+
/** Object with boolean properties with information about currently used theme (`ios` and `md`) */
|
|
112
102
|
declare const theme: Framework7Theme;
|
|
113
103
|
|
|
114
104
|
/** Main Framework7's initialized instance. It allows you to use any of Framework7 APIs */
|
|
@@ -126,6 +116,6 @@ interface useStore {
|
|
|
126
116
|
|
|
127
117
|
declare const useStore: useStore;
|
|
128
118
|
|
|
129
|
-
export { f7AccordionContent, f7AccordionItem, f7AccordionToggle, f7Accordion, f7ActionsButton, f7ActionsGroup, f7ActionsLabel, f7Actions, f7App,
|
|
119
|
+
export { f7AccordionContent, f7AccordionItem, f7AccordionToggle, f7Accordion, f7ActionsButton, f7ActionsGroup, f7ActionsLabel, f7Actions, f7App, f7AreaChart, f7Badge, f7BlockFooter, f7BlockHeader, f7BlockTitle, f7Block, f7BreadcrumbsCollapsed, f7BreadcrumbsItem, f7BreadcrumbsSeparator, f7Breadcrumbs, f7Button, f7CardContent, f7CardFooter, f7CardHeader, f7Card, f7Checkbox, f7Chip, f7FabBackdrop, f7FabButton, f7FabButtons, f7Fab, f7Gauge, f7Icon, f7Input, f7Link, f7ListButton, f7ListGroup, f7ListIndex, f7ListInput, f7ListItem, f7List, f7LoginScreenTitle, f7LoginScreen, f7Message, f7MessagebarAttachment, f7MessagebarAttachments, f7MessagebarSheetImage, f7MessagebarSheetItem, f7MessagebarSheet, f7Messagebar, f7MessagesTitle, f7Messages, f7NavLeft, f7NavRight, f7NavTitleLarge, f7NavTitle, f7Navbar, f7PageContent, f7Page, f7Panel, f7PhotoBrowser, f7PieChart, f7Popover, f7Popup, f7Preloader, f7Progressbar, f7Radio, f7Range, f7RoutableModals, f7Searchbar, f7Segmented, f7Sheet, f7SkeletonAvatar, f7SkeletonBlock, f7SkeletonImage, f7SkeletonText, f7Stepper, f7Subnavbar, f7SwipeoutActions, f7SwipeoutButton, f7SwiperSlide, f7Swiper, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
130
120
|
export { f7, f7ready, theme, useStore };
|
|
131
121
|
export default Framework7Vue;
|
package/framework7-vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 Vue
|
|
2
|
+
* Framework7 Vue 8.0.0-beta.1
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & Vue
|
|
4
4
|
* https://framework7.io/vue/
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: December 16, 2022
|
|
11
11
|
*/
|
|
12
12
|
import Framework7Vue from './shared/plugin.js';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7.js';
|
|
@@ -22,7 +22,6 @@ import f7ActionsGroup from './components/actions-group.js';
|
|
|
22
22
|
import f7ActionsLabel from './components/actions-label.js';
|
|
23
23
|
import f7Actions from './components/actions.js';
|
|
24
24
|
import f7App from './components/app.js';
|
|
25
|
-
import f7Appbar from './components/appbar.js';
|
|
26
25
|
import f7AreaChart from './components/area-chart.js';
|
|
27
26
|
import f7Badge from './components/badge.js';
|
|
28
27
|
import f7BlockFooter from './components/block-footer.js';
|
|
@@ -40,7 +39,6 @@ import f7CardHeader from './components/card-header.js';
|
|
|
40
39
|
import f7Card from './components/card.js';
|
|
41
40
|
import f7Checkbox from './components/checkbox.js';
|
|
42
41
|
import f7Chip from './components/chip.js';
|
|
43
|
-
import f7Col from './components/col.js';
|
|
44
42
|
import f7FabBackdrop from './components/fab-backdrop.js';
|
|
45
43
|
import f7FabButton from './components/fab-button.js';
|
|
46
44
|
import f7FabButtons from './components/fab-buttons.js';
|
|
@@ -53,16 +51,10 @@ import f7ListButton from './components/list-button.js';
|
|
|
53
51
|
import f7ListGroup from './components/list-group.js';
|
|
54
52
|
import f7ListIndex from './components/list-index.js';
|
|
55
53
|
import f7ListInput from './components/list-input.js';
|
|
56
|
-
import f7ListItemCell from './components/list-item-cell.js';
|
|
57
|
-
import f7ListItemRow from './components/list-item-row.js';
|
|
58
54
|
import f7ListItem from './components/list-item.js';
|
|
59
55
|
import f7List from './components/list.js';
|
|
60
56
|
import f7LoginScreenTitle from './components/login-screen-title.js';
|
|
61
57
|
import f7LoginScreen from './components/login-screen.js';
|
|
62
|
-
import f7MenuDropdownItem from './components/menu-dropdown-item.js';
|
|
63
|
-
import f7MenuDropdown from './components/menu-dropdown.js';
|
|
64
|
-
import f7MenuItem from './components/menu-item.js';
|
|
65
|
-
import f7Menu from './components/menu.js';
|
|
66
58
|
import f7Message from './components/message.js';
|
|
67
59
|
import f7MessagebarAttachment from './components/messagebar-attachment.js';
|
|
68
60
|
import f7MessagebarAttachments from './components/messagebar-attachments.js';
|
|
@@ -89,7 +81,6 @@ import f7Progressbar from './components/progressbar.js';
|
|
|
89
81
|
import f7Radio from './components/radio.js';
|
|
90
82
|
import f7Range from './components/range.js';
|
|
91
83
|
import f7RoutableModals from './components/routable-modals.js';
|
|
92
|
-
import f7Row from './components/row.js';
|
|
93
84
|
import f7Searchbar from './components/searchbar.js';
|
|
94
85
|
import f7Segmented from './components/segmented.js';
|
|
95
86
|
import f7Sheet from './components/sheet.js';
|
|
@@ -114,6 +105,6 @@ import f7UseIcon from './components/use-icon.js';
|
|
|
114
105
|
import f7View from './components/view.js';
|
|
115
106
|
import f7Views from './components/views.js';
|
|
116
107
|
|
|
117
|
-
export { f7AccordionContent, f7AccordionItem, f7AccordionToggle, f7Accordion, f7ActionsButton, f7ActionsGroup, f7ActionsLabel, f7Actions, f7App,
|
|
108
|
+
export { f7AccordionContent, f7AccordionItem, f7AccordionToggle, f7Accordion, f7ActionsButton, f7ActionsGroup, f7ActionsLabel, f7Actions, f7App, f7AreaChart, f7Badge, f7BlockFooter, f7BlockHeader, f7BlockTitle, f7Block, f7BreadcrumbsCollapsed, f7BreadcrumbsItem, f7BreadcrumbsSeparator, f7Breadcrumbs, f7Button, f7CardContent, f7CardFooter, f7CardHeader, f7Card, f7Checkbox, f7Chip, f7FabBackdrop, f7FabButton, f7FabButtons, f7Fab, f7Gauge, f7Icon, f7Input, f7Link, f7ListButton, f7ListGroup, f7ListIndex, f7ListInput, f7ListItem, f7List, f7LoginScreenTitle, f7LoginScreen, f7Message, f7MessagebarAttachment, f7MessagebarAttachments, f7MessagebarSheetImage, f7MessagebarSheetItem, f7MessagebarSheet, f7Messagebar, f7MessagesTitle, f7Messages, f7NavLeft, f7NavRight, f7NavTitleLarge, f7NavTitle, f7Navbar, f7PageContent, f7Page, f7Panel, f7PhotoBrowser, f7PieChart, f7Popover, f7Popup, f7Preloader, f7Progressbar, f7Radio, f7Range, f7RoutableModals, f7Searchbar, f7Segmented, f7Sheet, f7SkeletonAvatar, f7SkeletonBlock, f7SkeletonImage, f7SkeletonText, f7Stepper, f7Subnavbar, f7SwipeoutActions, f7SwipeoutButton, f7SwiperSlide, f7Swiper, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
118
109
|
export { f7, f7ready, theme, useStore };
|
|
119
110
|
export default Framework7Vue;
|
package/package.json
CHANGED
|
@@ -2,30 +2,24 @@
|
|
|
2
2
|
import { f7events, f7routers } from './f7.js';
|
|
3
3
|
import { extend, getComponentId } from './utils.js';
|
|
4
4
|
import { routerOpenIn } from './router-open-in.js';
|
|
5
|
-
|
|
6
5
|
const getChildrenArray = el => {
|
|
7
6
|
const arr = [];
|
|
8
|
-
|
|
9
7
|
for (let i = 0; i < el.children.length; i += 1) {
|
|
10
8
|
arr.push(el.children[i]);
|
|
11
9
|
}
|
|
12
|
-
|
|
13
10
|
return arr;
|
|
14
11
|
};
|
|
15
|
-
|
|
16
12
|
const hasSameChildren = (childrenBefore, childrenAfter) => {
|
|
17
13
|
if (childrenBefore.length !== childrenAfter.length) return false;
|
|
18
14
|
const set = new Set([...childrenBefore, ...childrenAfter]);
|
|
19
15
|
if (set.size === childrenBefore.length) return true;
|
|
20
16
|
return false;
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
export default {
|
|
24
19
|
proto: {
|
|
25
20
|
openIn(router, navigateUrl, options) {
|
|
26
21
|
return routerOpenIn(router, navigateUrl, options);
|
|
27
22
|
},
|
|
28
|
-
|
|
29
23
|
pageComponentLoader(_ref) {
|
|
30
24
|
let {
|
|
31
25
|
routerEl,
|
|
@@ -43,12 +37,10 @@ export default {
|
|
|
43
37
|
viewRouter = data;
|
|
44
38
|
}
|
|
45
39
|
});
|
|
46
|
-
|
|
47
40
|
if (!viewRouter) {
|
|
48
41
|
reject();
|
|
49
42
|
return;
|
|
50
43
|
}
|
|
51
|
-
|
|
52
44
|
const pageData = {
|
|
53
45
|
component,
|
|
54
46
|
id: getComponentId(),
|
|
@@ -59,7 +51,6 @@ export default {
|
|
|
59
51
|
};
|
|
60
52
|
let resolved;
|
|
61
53
|
const childrenBefore = getChildrenArray(el);
|
|
62
|
-
|
|
63
54
|
function onDidUpdate(componentRouterData) {
|
|
64
55
|
if (componentRouterData !== viewRouter || resolved) return;
|
|
65
56
|
const childrenAfter = getChildrenArray(el);
|
|
@@ -70,23 +61,19 @@ export default {
|
|
|
70
61
|
resolve(pageEl);
|
|
71
62
|
resolved = true;
|
|
72
63
|
}
|
|
73
|
-
|
|
74
64
|
f7events.on('viewRouterDidUpdate', onDidUpdate);
|
|
75
65
|
viewRouter.pages.push(pageData);
|
|
76
66
|
viewRouter.setPages(viewRouter.pages);
|
|
77
67
|
},
|
|
78
|
-
|
|
79
68
|
removePage($pageEl) {
|
|
80
69
|
if (!$pageEl) return;
|
|
81
70
|
const router = this;
|
|
82
71
|
let f7Page;
|
|
83
72
|
if ('length' in $pageEl && $pageEl[0]) f7Page = $pageEl[0].f7Page;else f7Page = $pageEl.f7Page;
|
|
84
|
-
|
|
85
73
|
if (f7Page && f7Page.route && f7Page.route.route && f7Page.route.route.keepAlive) {
|
|
86
74
|
router.app.$($pageEl).remove();
|
|
87
75
|
return;
|
|
88
76
|
}
|
|
89
|
-
|
|
90
77
|
let viewRouter;
|
|
91
78
|
f7routers.views.forEach(data => {
|
|
92
79
|
if (data.el && data.el === router.el) {
|
|
@@ -94,7 +81,6 @@ export default {
|
|
|
94
81
|
}
|
|
95
82
|
});
|
|
96
83
|
let pageEl;
|
|
97
|
-
|
|
98
84
|
if ('length' in $pageEl) {
|
|
99
85
|
// Dom7
|
|
100
86
|
if ($pageEl.length === 0) return;
|
|
@@ -102,7 +88,6 @@ export default {
|
|
|
102
88
|
} else {
|
|
103
89
|
pageEl = $pageEl;
|
|
104
90
|
}
|
|
105
|
-
|
|
106
91
|
if (!pageEl) return;
|
|
107
92
|
let pageComponentFound;
|
|
108
93
|
viewRouter.pages.forEach((page, index) => {
|
|
@@ -112,12 +97,10 @@ export default {
|
|
|
112
97
|
viewRouter.setPages(viewRouter.pages);
|
|
113
98
|
}
|
|
114
99
|
});
|
|
115
|
-
|
|
116
100
|
if (!pageComponentFound) {
|
|
117
101
|
pageEl.parentNode.removeChild(pageEl);
|
|
118
102
|
}
|
|
119
103
|
},
|
|
120
|
-
|
|
121
104
|
tabComponentLoader(_temp) {
|
|
122
105
|
let {
|
|
123
106
|
tabEl,
|
|
@@ -134,12 +117,10 @@ export default {
|
|
|
134
117
|
tabRouter = tabData;
|
|
135
118
|
}
|
|
136
119
|
});
|
|
137
|
-
|
|
138
120
|
if (!tabRouter) {
|
|
139
121
|
reject();
|
|
140
122
|
return;
|
|
141
123
|
}
|
|
142
|
-
|
|
143
124
|
const id = getComponentId();
|
|
144
125
|
const tabContent = {
|
|
145
126
|
id,
|
|
@@ -150,7 +131,6 @@ export default {
|
|
|
150
131
|
}, options.route.route && options.route.route.tab && options.route.route.tab.options && options.route.route.tab.options.props || {}, options.route.params, options.props || {})
|
|
151
132
|
};
|
|
152
133
|
let resolved;
|
|
153
|
-
|
|
154
134
|
function onDidUpdate(componentRouterData) {
|
|
155
135
|
if (componentRouterData !== tabRouter || resolved) return;
|
|
156
136
|
f7events.off('tabRouterDidUpdate', onDidUpdate);
|
|
@@ -158,11 +138,9 @@ export default {
|
|
|
158
138
|
resolve(tabContentEl);
|
|
159
139
|
resolved = true;
|
|
160
140
|
}
|
|
161
|
-
|
|
162
141
|
f7events.on('tabRouterDidUpdate', onDidUpdate);
|
|
163
142
|
tabRouter.setTabContent(tabContent);
|
|
164
143
|
},
|
|
165
|
-
|
|
166
144
|
removeTabContent(tabEl) {
|
|
167
145
|
if (!tabEl) return;
|
|
168
146
|
let tabRouter;
|
|
@@ -171,16 +149,12 @@ export default {
|
|
|
171
149
|
tabRouter = tabData;
|
|
172
150
|
}
|
|
173
151
|
});
|
|
174
|
-
|
|
175
152
|
if (!tabRouter) {
|
|
176
153
|
tabEl.innerHTML = ''; // eslint-disable-line
|
|
177
|
-
|
|
178
154
|
return;
|
|
179
155
|
}
|
|
180
|
-
|
|
181
156
|
tabRouter.setTabContent(null);
|
|
182
157
|
},
|
|
183
|
-
|
|
184
158
|
modalComponentLoader(_temp2) {
|
|
185
159
|
let {
|
|
186
160
|
component,
|
|
@@ -190,12 +164,10 @@ export default {
|
|
|
190
164
|
} = _temp2 === void 0 ? {} : _temp2;
|
|
191
165
|
const router = this;
|
|
192
166
|
const modalsRouter = f7routers.modals;
|
|
193
|
-
|
|
194
167
|
if (!modalsRouter) {
|
|
195
168
|
reject();
|
|
196
169
|
return;
|
|
197
170
|
}
|
|
198
|
-
|
|
199
171
|
const modalData = {
|
|
200
172
|
component,
|
|
201
173
|
id: getComponentId(),
|
|
@@ -205,7 +177,6 @@ export default {
|
|
|
205
177
|
}, options.route.params, options.props || {})
|
|
206
178
|
};
|
|
207
179
|
let resolved;
|
|
208
|
-
|
|
209
180
|
function onDidUpdate() {
|
|
210
181
|
if (resolved) return;
|
|
211
182
|
f7events.off('modalsRouterDidUpdate', onDidUpdate);
|
|
@@ -214,12 +185,10 @@ export default {
|
|
|
214
185
|
resolve(modalEl);
|
|
215
186
|
resolved = true;
|
|
216
187
|
}
|
|
217
|
-
|
|
218
188
|
f7events.on('modalsRouterDidUpdate', onDidUpdate);
|
|
219
189
|
modalsRouter.modals.push(modalData);
|
|
220
190
|
modalsRouter.setModals(modalsRouter.modals);
|
|
221
191
|
},
|
|
222
|
-
|
|
223
192
|
removeModal(modalEl) {
|
|
224
193
|
const modalsRouter = f7routers.modals;
|
|
225
194
|
if (!modalsRouter) return;
|
|
@@ -230,6 +199,5 @@ export default {
|
|
|
230
199
|
modalsRouter.modals.splice(modalsRouter.modals.indexOf(modalDataToRemove), 1);
|
|
231
200
|
modalsRouter.setModals(modalsRouter.modals);
|
|
232
201
|
}
|
|
233
|
-
|
|
234
202
|
}
|
|
235
203
|
};
|
package/shared/f7.js
CHANGED
|
@@ -9,61 +9,49 @@ const f7routers = {
|
|
|
9
9
|
tabs: [],
|
|
10
10
|
modals: null
|
|
11
11
|
};
|
|
12
|
-
|
|
13
12
|
const setTheme = () => {
|
|
14
13
|
if (!f7) return;
|
|
15
14
|
theme.ios = f7.theme === 'ios';
|
|
16
15
|
theme.md = f7.theme === 'md';
|
|
17
|
-
theme.aurora = f7.theme === 'aurora';
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
const cleanup = () => {
|
|
21
18
|
unsetRouterIds();
|
|
22
19
|
delete theme.ios;
|
|
23
20
|
delete theme.md;
|
|
24
|
-
delete theme.aurora;
|
|
25
21
|
f7routers.views = [];
|
|
26
22
|
f7routers.tabs = [];
|
|
27
23
|
f7routers.modals = null;
|
|
28
24
|
};
|
|
29
|
-
|
|
30
25
|
const f7initEvents = () => {
|
|
31
26
|
f7events = new Framework7.Events();
|
|
32
27
|
};
|
|
33
|
-
|
|
34
28
|
const f7init = function (rootEl, params, init) {
|
|
35
29
|
if (params === void 0) {
|
|
36
30
|
params = {};
|
|
37
31
|
}
|
|
38
|
-
|
|
39
32
|
if (init === void 0) {
|
|
40
33
|
init = true;
|
|
41
34
|
}
|
|
42
|
-
|
|
43
35
|
const f7Params = extend({}, params, {
|
|
44
36
|
el: rootEl,
|
|
45
37
|
init
|
|
46
38
|
});
|
|
47
39
|
if (typeof params.store !== 'undefined') f7Params.store = params.store;
|
|
48
40
|
if (!f7Params.routes) f7Params.routes = [];
|
|
49
|
-
|
|
50
41
|
if (f7Params.userAgent && (f7Params.theme === 'auto' || !f7Params.theme)) {
|
|
51
42
|
const device = Framework7.getDevice({
|
|
52
43
|
userAgent: f7Params.userAgent
|
|
53
44
|
}, true);
|
|
54
45
|
theme.ios = !!device.ios;
|
|
55
|
-
theme.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (f7 && typeof window !== 'undefined') return; // eslint-disable-next-line
|
|
61
|
-
|
|
46
|
+
theme.md = !theme.ios;
|
|
47
|
+
}
|
|
48
|
+
// eslint-disable-next-line
|
|
49
|
+
if (f7 && typeof window !== 'undefined') return;
|
|
50
|
+
// eslint-disable-next-line
|
|
62
51
|
if (typeof window === 'undefined') cleanup();
|
|
63
52
|
const instance = new Framework7(f7Params);
|
|
64
53
|
f7 = instance;
|
|
65
54
|
setTheme();
|
|
66
|
-
|
|
67
55
|
if (instance.initialized) {
|
|
68
56
|
f7 = instance;
|
|
69
57
|
f7events.emit('ready', f7);
|
|
@@ -74,12 +62,10 @@ const f7init = function (rootEl, params, init) {
|
|
|
74
62
|
});
|
|
75
63
|
}
|
|
76
64
|
};
|
|
77
|
-
|
|
78
65
|
const f7ready = callback => {
|
|
79
66
|
if (!callback) return;
|
|
80
67
|
if (f7 && f7.initialized) callback(f7);else {
|
|
81
68
|
f7events.once('ready', callback);
|
|
82
69
|
}
|
|
83
70
|
};
|
|
84
|
-
|
|
85
71
|
export { f7, theme, f7ready, f7events, f7init, f7routers, f7initEvents, setTheme };
|
|
@@ -6,17 +6,14 @@ export const getRouterInitialComponent = (router, initialComponent) => {
|
|
|
6
6
|
} = router.getInitialUrl();
|
|
7
7
|
const initialRoute = router.findMatchingRoute(initialUrl);
|
|
8
8
|
let routeProps = {};
|
|
9
|
-
|
|
10
9
|
if (initialRoute && initialRoute.route && initialRoute.route.options) {
|
|
11
10
|
routeProps = initialRoute.route.options.props;
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
const isMasterRoute = route => {
|
|
15
13
|
if (route.master === true) return true;
|
|
16
14
|
if (typeof route.master === 'function') return route.master(router.app);
|
|
17
15
|
return false;
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
if (initialRoute && initialRoute.route && (initialRoute.route.component || initialRoute.route.asyncComponent) && !isMasterRoute(initialRoute.route)) {
|
|
21
18
|
initialComponentData = {
|
|
22
19
|
component: initialRoute.route.component || initialRoute.route.asyncComponent,
|
|
@@ -31,7 +28,6 @@ export const getRouterInitialComponent = (router, initialComponent) => {
|
|
|
31
28
|
}
|
|
32
29
|
};
|
|
33
30
|
}
|
|
34
|
-
|
|
35
31
|
return {
|
|
36
32
|
initialPage: initialComponentData,
|
|
37
33
|
initialRoute
|
package/shared/mixins.js
CHANGED
|
@@ -34,7 +34,6 @@ export const iconProps = {
|
|
|
34
34
|
iconF7: String,
|
|
35
35
|
iconIos: String,
|
|
36
36
|
iconMd: String,
|
|
37
|
-
iconAurora: String,
|
|
38
37
|
iconColor: String,
|
|
39
38
|
iconSize: [String, Number],
|
|
40
39
|
iconBadge: [String, Number],
|
|
@@ -78,17 +77,13 @@ export function routerAttrs(props) {
|
|
|
78
77
|
openIn
|
|
79
78
|
} = props;
|
|
80
79
|
let dataAnimate;
|
|
81
|
-
|
|
82
80
|
if ('animate' in props && typeof animate !== 'undefined') {
|
|
83
81
|
dataAnimate = animate.toString();
|
|
84
82
|
}
|
|
85
|
-
|
|
86
83
|
let dataReloadDetail;
|
|
87
|
-
|
|
88
84
|
if ('reloadDetail' in props && typeof reloadDetail !== 'undefined') {
|
|
89
85
|
dataReloadDetail = reloadDetail.toString();
|
|
90
86
|
}
|
|
91
|
-
|
|
92
87
|
return {
|
|
93
88
|
'data-force': force || undefined,
|
|
94
89
|
'data-reload-current': reloadCurrent || undefined,
|
|
@@ -147,12 +142,7 @@ export const actionsProps = {
|
|
|
147
142
|
// Card
|
|
148
143
|
cardOpen: [Boolean, String],
|
|
149
144
|
cardPreventOpen: [Boolean, String],
|
|
150
|
-
cardClose: [Boolean, String]
|
|
151
|
-
// Menu
|
|
152
|
-
menuClose: {
|
|
153
|
-
type: [Boolean, String],
|
|
154
|
-
default: undefined
|
|
155
|
-
}
|
|
145
|
+
cardClose: [Boolean, String]
|
|
156
146
|
};
|
|
157
147
|
export function actionsAttrs(props) {
|
|
158
148
|
const {
|
|
@@ -215,8 +205,7 @@ export function actionsClasses(props) {
|
|
|
215
205
|
sortableToggle,
|
|
216
206
|
cardOpen,
|
|
217
207
|
cardPreventOpen,
|
|
218
|
-
cardClose
|
|
219
|
-
menuClose
|
|
208
|
+
cardClose
|
|
220
209
|
} = props;
|
|
221
210
|
return {
|
|
222
211
|
'searchbar-enable': searchbarEnable || searchbarEnable === '',
|
|
@@ -241,7 +230,6 @@ export function actionsClasses(props) {
|
|
|
241
230
|
'sortable-toggle': sortableToggle || sortableToggle === '',
|
|
242
231
|
'card-close': cardClose || cardClose === '',
|
|
243
232
|
'card-open': cardOpen || cardOpen === '',
|
|
244
|
-
'card-prevent-open': cardPreventOpen || cardPreventOpen === ''
|
|
245
|
-
'menu-close': menuClose || menuClose === ''
|
|
233
|
+
'card-prevent-open': cardPreventOpen || cardPreventOpen === ''
|
|
246
234
|
};
|
|
247
235
|
}
|
package/shared/plugin.js
CHANGED
|
@@ -4,12 +4,10 @@ import { f7, f7ready, theme, f7initEvents, setTheme } from './f7.js';
|
|
|
4
4
|
const Framework7Vue = {
|
|
5
5
|
name: 'vuePlugin',
|
|
6
6
|
installed: false,
|
|
7
|
-
|
|
8
7
|
install(params) {
|
|
9
8
|
if (params === void 0) {
|
|
10
9
|
params = {};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
if (Framework7Vue.installed) return;
|
|
14
12
|
Framework7Vue.installed = true;
|
|
15
13
|
f7initEvents();
|
|
@@ -19,25 +17,21 @@ const Framework7Vue = {
|
|
|
19
17
|
} = params;
|
|
20
18
|
if (paramsTheme === 'md') theme.md = true;
|
|
21
19
|
if (paramsTheme === 'ios') theme.ios = true;
|
|
22
|
-
if (paramsTheme === 'aurora') theme.aurora = true; // eslint-disable-next-line
|
|
23
20
|
|
|
21
|
+
// eslint-disable-next-line
|
|
24
22
|
const needThemeCalc = typeof window === 'undefined' ? !!userAgent : true;
|
|
25
|
-
|
|
26
23
|
if (needThemeCalc && (!paramsTheme || paramsTheme === 'auto')) {
|
|
27
24
|
const device = Framework7.getDevice({
|
|
28
25
|
userAgent
|
|
29
26
|
}, true);
|
|
30
27
|
theme.ios = !!device.ios;
|
|
31
|
-
theme.
|
|
32
|
-
theme.md = !theme.ios && !theme.aurora;
|
|
28
|
+
theme.md = !theme.ios;
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
f7ready(() => {
|
|
36
31
|
setTheme();
|
|
37
32
|
});
|
|
38
33
|
Framework7.Router.use(componentsRouter);
|
|
39
34
|
}
|
|
40
|
-
|
|
41
35
|
};
|
|
42
36
|
export { f7ready, f7, theme };
|
|
43
37
|
export default Framework7Vue;
|
package/shared/router-open-in.js
CHANGED
|
@@ -10,14 +10,15 @@ export const routerOpenIn = (router, url, options) => {
|
|
|
10
10
|
url,
|
|
11
11
|
route: {
|
|
12
12
|
path: url,
|
|
13
|
-
options: {
|
|
13
|
+
options: {
|
|
14
|
+
...options,
|
|
14
15
|
openIn: undefined
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
};
|
|
18
|
-
const params = {
|
|
19
|
+
const params = {
|
|
20
|
+
...options
|
|
19
21
|
};
|
|
20
|
-
|
|
21
22
|
if (options.openIn === 'popup') {
|
|
22
23
|
params.component = {
|
|
23
24
|
setup() {
|
|
@@ -30,11 +31,9 @@ export const routerOpenIn = (router, url, options) => {
|
|
|
30
31
|
ignoreOpenIn: true
|
|
31
32
|
})]);
|
|
32
33
|
}
|
|
33
|
-
|
|
34
34
|
};
|
|
35
35
|
navigateOptions.route.popup = params;
|
|
36
36
|
}
|
|
37
|
-
|
|
38
37
|
if (options.openIn === 'loginScreen') {
|
|
39
38
|
params.component = {
|
|
40
39
|
setup() {
|
|
@@ -47,11 +46,9 @@ export const routerOpenIn = (router, url, options) => {
|
|
|
47
46
|
ignoreOpenIn: true
|
|
48
47
|
})]);
|
|
49
48
|
}
|
|
50
|
-
|
|
51
49
|
};
|
|
52
50
|
navigateOptions.route.loginScreen = params;
|
|
53
51
|
}
|
|
54
|
-
|
|
55
52
|
if (options.openIn === 'sheet') {
|
|
56
53
|
params.component = {
|
|
57
54
|
setup() {
|
|
@@ -64,11 +61,9 @@ export const routerOpenIn = (router, url, options) => {
|
|
|
64
61
|
ignoreOpenIn: true
|
|
65
62
|
})]);
|
|
66
63
|
}
|
|
67
|
-
|
|
68
64
|
};
|
|
69
65
|
navigateOptions.route.sheet = params;
|
|
70
66
|
}
|
|
71
|
-
|
|
72
67
|
if (options.openIn === 'popover') {
|
|
73
68
|
params.targetEl = options.clickedEl || options.targetEl;
|
|
74
69
|
params.component = {
|
|
@@ -83,11 +78,9 @@ export const routerOpenIn = (router, url, options) => {
|
|
|
83
78
|
ignoreOpenIn: true
|
|
84
79
|
})]);
|
|
85
80
|
}
|
|
86
|
-
|
|
87
81
|
};
|
|
88
82
|
navigateOptions.route.popover = params;
|
|
89
83
|
}
|
|
90
|
-
|
|
91
84
|
if (options.openIn.indexOf('panel') >= 0) {
|
|
92
85
|
const parts = options.openIn.split(':');
|
|
93
86
|
const side = parts[1] || 'left';
|
|
@@ -105,10 +98,8 @@ export const routerOpenIn = (router, url, options) => {
|
|
|
105
98
|
ignoreOpenIn: true
|
|
106
99
|
})]);
|
|
107
100
|
}
|
|
108
|
-
|
|
109
101
|
};
|
|
110
102
|
navigateOptions.route.panel = params;
|
|
111
103
|
}
|
|
112
|
-
|
|
113
104
|
return router.navigate(navigateOptions);
|
|
114
105
|
};
|
package/shared/use-icon.js
CHANGED
|
@@ -2,22 +2,19 @@ export const useIcon = function (props) {
|
|
|
2
2
|
if (props === void 0) {
|
|
3
3
|
props = {};
|
|
4
4
|
}
|
|
5
|
-
|
|
6
5
|
const {
|
|
7
6
|
icon,
|
|
8
7
|
iconMaterial,
|
|
9
8
|
iconF7,
|
|
10
9
|
iconMd,
|
|
11
10
|
iconIos,
|
|
12
|
-
iconAurora,
|
|
13
11
|
iconColor,
|
|
14
12
|
iconSize,
|
|
15
13
|
iconBadge,
|
|
16
14
|
badgeColor,
|
|
17
15
|
iconBadgeColor
|
|
18
16
|
} = props;
|
|
19
|
-
|
|
20
|
-
if (icon || iconMaterial || iconF7 || iconMd || iconIos || iconAurora) {
|
|
17
|
+
if (icon || iconMaterial || iconF7 || iconMd || iconIos) {
|
|
21
18
|
return {
|
|
22
19
|
props: {
|
|
23
20
|
material: iconMaterial,
|
|
@@ -25,7 +22,6 @@ export const useIcon = function (props) {
|
|
|
25
22
|
icon,
|
|
26
23
|
md: iconMd,
|
|
27
24
|
ios: iconIos,
|
|
28
|
-
aurora: iconAurora,
|
|
29
25
|
color: iconColor,
|
|
30
26
|
size: iconSize
|
|
31
27
|
},
|
|
@@ -37,6 +33,5 @@ export const useIcon = function (props) {
|
|
|
37
33
|
} : null
|
|
38
34
|
};
|
|
39
35
|
}
|
|
40
|
-
|
|
41
36
|
return null;
|
|
42
37
|
};
|
package/shared/use-store.js
CHANGED
|
@@ -4,21 +4,17 @@ export const useStore = function () {
|
|
|
4
4
|
// (store, getter)
|
|
5
5
|
let store = arguments.length <= 0 ? undefined : arguments[0];
|
|
6
6
|
let getter = arguments.length <= 1 ? undefined : arguments[1];
|
|
7
|
-
|
|
8
7
|
if (arguments.length === 1) {
|
|
9
8
|
// (getter)
|
|
10
9
|
store = f7.store;
|
|
11
10
|
getter = arguments.length <= 0 ? undefined : arguments[0];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
}
|
|
12
|
+
// eslint-disable-next-line
|
|
15
13
|
const obj = store._gettersPlain[getter];
|
|
16
14
|
const valueRef = ref(obj.value);
|
|
17
|
-
|
|
18
15
|
const callback = v => {
|
|
19
16
|
valueRef.value = v;
|
|
20
17
|
};
|
|
21
|
-
|
|
22
18
|
obj.onUpdated(callback);
|
|
23
19
|
onBeforeUnmount(() => {
|
|
24
20
|
// eslint-disable-next-line
|