framework7-vue 8.3.4 → 9.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-item.js +3 -4
- package/components/actions-button.js +5 -8
- package/components/actions-label.js +4 -7
- package/components/actions.js +3 -4
- package/components/app.d.ts +5 -0
- package/components/app.js +4 -0
- package/components/area-chart.js +19 -24
- package/components/block.js +3 -4
- package/components/breadcrumbs-collapsed.js +1 -2
- package/components/card.js +4 -5
- package/components/checkbox.js +7 -11
- package/components/chip.js +5 -8
- package/components/fab-button.js +4 -7
- package/components/fab.js +4 -5
- package/components/input.js +8 -21
- package/components/link.js +3 -4
- package/components/list-button.js +4 -7
- package/components/list-index.js +3 -4
- package/components/list-input.js +8 -21
- package/components/list-item.js +15 -17
- package/components/list.js +4 -5
- package/components/login-screen.js +3 -4
- package/components/message.js +13 -32
- package/components/messagebar-attachment.js +5 -10
- package/components/messagebar-sheet-image.js +9 -13
- package/components/messagebar.d.ts +6 -6
- package/components/messagebar.js +9 -8
- package/components/messages.js +3 -4
- package/components/nav-left.d.ts +0 -4
- package/components/nav-left.js +5 -13
- package/components/nav-right.d.ts +0 -4
- package/components/nav-right.js +1 -4
- package/components/nav-title.d.ts +0 -4
- package/components/nav-title.js +1 -4
- package/components/navbar.d.ts +0 -5
- package/components/navbar.js +10 -43
- package/components/page-content.js +10 -13
- package/components/page.js +4 -5
- package/components/panel.js +4 -8
- package/components/photo-browser.d.ts +0 -5
- package/components/photo-browser.js +3 -8
- package/components/pie-chart.js +12 -14
- package/components/popover.d.ts +0 -5
- package/components/popover.js +5 -16
- package/components/popup.js +3 -4
- package/components/preloader.js +9 -13
- package/components/radio.js +7 -11
- package/components/range.js +3 -4
- package/components/searchbar.js +18 -27
- package/components/sheet.js +4 -5
- package/components/stepper.js +7 -16
- package/components/subnavbar.d.ts +0 -4
- package/components/subnavbar.js +1 -4
- package/components/swipeout-button.js +4 -7
- package/components/tab.js +3 -4
- package/components/text-editor.js +3 -4
- package/components/toggle.js +7 -11
- package/components/toolbar-pane.d.ts +19 -0
- package/components/toolbar-pane.js +22 -0
- package/components/toolbar.js +3 -4
- package/components/treeview-item.js +4 -5
- package/components/view.d.ts +0 -10
- package/components/view.js +4 -15
- package/framework7-vue-bundle.js +3 -1
- package/framework7-vue.d.ts +2 -1
- package/framework7-vue.js +5 -4
- package/package.json +2 -2
- package/shared/components-router.js +20 -23
- package/shared/f7.js +1 -7
- package/shared/modal-state-classes.js +4 -5
- package/shared/plugin.js +1 -4
- package/shared/use-icon.js +1 -4
- package/shared/use-route-props.js +3 -4
- package/shared/use-store.js +5 -5
- package/shared/utils.js +3 -12
- package/framework7-vue-web-types.json +0 -14296
package/framework7-vue-bundle.js
CHANGED
|
@@ -85,6 +85,7 @@ import f7Tab from './components/tab.js';
|
|
|
85
85
|
import f7Tabs from './components/tabs.js';
|
|
86
86
|
import f7TextEditor from './components/text-editor.js';
|
|
87
87
|
import f7Toggle from './components/toggle.js';
|
|
88
|
+
import f7ToolbarPane from './components/toolbar-pane.js';
|
|
88
89
|
import f7Toolbar from './components/toolbar.js';
|
|
89
90
|
import f7TreeviewItem from './components/treeview-item.js';
|
|
90
91
|
import f7Treeview from './components/treeview.js';
|
|
@@ -92,7 +93,7 @@ import f7UseIcon from './components/use-icon.js';
|
|
|
92
93
|
import f7View from './components/view.js';
|
|
93
94
|
import f7Views from './components/views.js';
|
|
94
95
|
|
|
95
|
-
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, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
96
|
+
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, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7ToolbarPane, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
96
97
|
export { f7, f7ready, theme, useStore };
|
|
97
98
|
export default Framework7Vue;
|
|
98
99
|
|
|
@@ -180,6 +181,7 @@ function registerComponents(app) {
|
|
|
180
181
|
app.component('f7-tabs', f7Tabs);
|
|
181
182
|
app.component('f7-text-editor', f7TextEditor);
|
|
182
183
|
app.component('f7-toggle', f7Toggle);
|
|
184
|
+
app.component('f7-toolbar-pane', f7ToolbarPane);
|
|
183
185
|
app.component('f7-toolbar', f7Toolbar);
|
|
184
186
|
app.component('f7-treeview-item', f7TreeviewItem);
|
|
185
187
|
app.component('f7-treeview', f7Treeview);
|
package/framework7-vue.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ import f7Tab from './components/tab.js';
|
|
|
84
84
|
import f7Tabs from './components/tabs.js';
|
|
85
85
|
import f7TextEditor from './components/text-editor.js';
|
|
86
86
|
import f7Toggle from './components/toggle.js';
|
|
87
|
+
import f7ToolbarPane from './components/toolbar-pane.js';
|
|
87
88
|
import f7Toolbar from './components/toolbar.js';
|
|
88
89
|
import f7TreeviewItem from './components/treeview-item.js';
|
|
89
90
|
import f7Treeview from './components/treeview.js';
|
|
@@ -114,6 +115,6 @@ interface useStore {
|
|
|
114
115
|
|
|
115
116
|
declare const useStore: useStore;
|
|
116
117
|
|
|
117
|
-
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, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
118
|
+
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, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7ToolbarPane, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
118
119
|
export { f7, f7ready, theme, useStore };
|
|
119
120
|
export default Framework7Vue;
|
package/framework7-vue.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 Vue
|
|
2
|
+
* Framework7 Vue 9.0.0-beta.1
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & Vue
|
|
4
4
|
* https://framework7.io/vue/
|
|
5
5
|
*
|
|
6
|
-
* Copyright 2014-
|
|
6
|
+
* Copyright 2014-2025 Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: November 10, 2025
|
|
11
11
|
*/
|
|
12
12
|
import Framework7Vue from './shared/plugin.js';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7.js';
|
|
@@ -96,6 +96,7 @@ import f7Tab from './components/tab.js';
|
|
|
96
96
|
import f7Tabs from './components/tabs.js';
|
|
97
97
|
import f7TextEditor from './components/text-editor.js';
|
|
98
98
|
import f7Toggle from './components/toggle.js';
|
|
99
|
+
import f7ToolbarPane from './components/toolbar-pane.js';
|
|
99
100
|
import f7Toolbar from './components/toolbar.js';
|
|
100
101
|
import f7TreeviewItem from './components/treeview-item.js';
|
|
101
102
|
import f7Treeview from './components/treeview.js';
|
|
@@ -103,6 +104,6 @@ import f7UseIcon from './components/use-icon.js';
|
|
|
103
104
|
import f7View from './components/view.js';
|
|
104
105
|
import f7Views from './components/views.js';
|
|
105
106
|
|
|
106
|
-
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, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
107
|
+
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, f7Tab, f7Tabs, f7TextEditor, f7Toggle, f7ToolbarPane, f7Toolbar, f7TreeviewItem, f7Treeview, f7UseIcon, f7View, f7Views }
|
|
107
108
|
export { f7, f7ready, theme, useStore };
|
|
108
109
|
export default Framework7Vue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7-vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-beta.1",
|
|
4
4
|
"description": "Build full featured iOS & Android apps using Framework7 & Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"type": "patreon",
|
|
62
62
|
"url": "https://www.patreon.com/framework7"
|
|
63
63
|
},
|
|
64
|
-
"releaseDate": "
|
|
64
|
+
"releaseDate": "November 10, 2025"
|
|
65
65
|
}
|
|
@@ -20,14 +20,13 @@ export default {
|
|
|
20
20
|
openIn(router, navigateUrl, options) {
|
|
21
21
|
return routerOpenIn(router, navigateUrl, options);
|
|
22
22
|
},
|
|
23
|
-
pageComponentLoader(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
23
|
+
pageComponentLoader({
|
|
24
|
+
routerEl,
|
|
25
|
+
component,
|
|
26
|
+
options,
|
|
27
|
+
resolve,
|
|
28
|
+
reject
|
|
29
|
+
}) {
|
|
31
30
|
const router = this;
|
|
32
31
|
const routerId = router.id;
|
|
33
32
|
const el = routerEl;
|
|
@@ -101,14 +100,13 @@ export default {
|
|
|
101
100
|
pageEl.parentNode.removeChild(pageEl);
|
|
102
101
|
}
|
|
103
102
|
},
|
|
104
|
-
tabComponentLoader(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
} = _temp === void 0 ? {} : _temp;
|
|
103
|
+
tabComponentLoader({
|
|
104
|
+
tabEl,
|
|
105
|
+
component,
|
|
106
|
+
options,
|
|
107
|
+
resolve,
|
|
108
|
+
reject
|
|
109
|
+
} = {}) {
|
|
112
110
|
const router = this;
|
|
113
111
|
if (!tabEl) reject();
|
|
114
112
|
let tabRouter;
|
|
@@ -155,13 +153,12 @@ export default {
|
|
|
155
153
|
}
|
|
156
154
|
tabRouter.setTabContent(null);
|
|
157
155
|
},
|
|
158
|
-
modalComponentLoader(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
156
|
+
modalComponentLoader({
|
|
157
|
+
component,
|
|
158
|
+
options,
|
|
159
|
+
resolve,
|
|
160
|
+
reject
|
|
161
|
+
} = {}) {
|
|
165
162
|
const router = this;
|
|
166
163
|
const modalsRouter = f7routers.modals;
|
|
167
164
|
if (!modalsRouter) {
|
package/shared/f7.js
CHANGED
|
@@ -25,13 +25,7 @@ const cleanup = () => {
|
|
|
25
25
|
const f7initEvents = () => {
|
|
26
26
|
f7events = new Framework7.Events();
|
|
27
27
|
};
|
|
28
|
-
const f7init =
|
|
29
|
-
if (params === void 0) {
|
|
30
|
-
params = {};
|
|
31
|
-
}
|
|
32
|
-
if (init === void 0) {
|
|
33
|
-
init = true;
|
|
34
|
-
}
|
|
28
|
+
const f7init = (rootEl, params = {}, init = true) => {
|
|
35
29
|
const f7Params = extend({}, params, {
|
|
36
30
|
el: rootEl,
|
|
37
31
|
init
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export const modalStateClasses =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = _temp === void 0 ? {} : _temp;
|
|
1
|
+
export const modalStateClasses = ({
|
|
2
|
+
isOpened,
|
|
3
|
+
isClosing
|
|
4
|
+
} = {}) => {
|
|
6
5
|
return {
|
|
7
6
|
'modal-in': isOpened && !isClosing,
|
|
8
7
|
'modal-out': isClosing
|
package/shared/plugin.js
CHANGED
|
@@ -4,10 +4,7 @@ import { f7, f7ready, theme, f7initEvents, setTheme } from './f7.js';
|
|
|
4
4
|
const Framework7Vue = {
|
|
5
5
|
name: 'vuePlugin',
|
|
6
6
|
installed: false,
|
|
7
|
-
install(params) {
|
|
8
|
-
if (params === void 0) {
|
|
9
|
-
params = {};
|
|
10
|
-
}
|
|
7
|
+
install(params = {}) {
|
|
11
8
|
if (Framework7Vue.installed) return;
|
|
12
9
|
Framework7Vue.installed = true;
|
|
13
10
|
f7initEvents();
|
package/shared/use-icon.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { onMounted, onUpdated } from 'vue';
|
|
2
|
-
export const useRouteProps =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = _temp === void 0 ? {} : _temp;
|
|
2
|
+
export const useRouteProps = (elRef, {
|
|
3
|
+
routeProps
|
|
4
|
+
} = {}) => {
|
|
6
5
|
onMounted(() => {
|
|
7
6
|
if (elRef.value && routeProps) {
|
|
8
7
|
elRef.value.f7RouteProps = routeProps;
|
package/shared/use-store.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { onBeforeUnmount, ref } from 'vue';
|
|
2
2
|
import { f7 } from './f7.js';
|
|
3
|
-
export const useStore =
|
|
3
|
+
export const useStore = (...args) => {
|
|
4
4
|
// (store, getter)
|
|
5
|
-
let store =
|
|
6
|
-
let getter =
|
|
7
|
-
if (
|
|
5
|
+
let store = args[0];
|
|
6
|
+
let getter = args[1];
|
|
7
|
+
if (args.length === 1) {
|
|
8
8
|
// (getter)
|
|
9
9
|
store = f7.store;
|
|
10
|
-
getter =
|
|
10
|
+
getter = args[0];
|
|
11
11
|
}
|
|
12
12
|
// eslint-disable-next-line
|
|
13
13
|
const obj = store._gettersPlain[getter];
|
package/shared/utils.js
CHANGED
|
@@ -15,13 +15,10 @@ export function isObject(o) {
|
|
|
15
15
|
export function now() {
|
|
16
16
|
return Date.now();
|
|
17
17
|
}
|
|
18
|
-
export function extend() {
|
|
18
|
+
export function extend(...args) {
|
|
19
19
|
let deep = true;
|
|
20
20
|
let to;
|
|
21
21
|
let from;
|
|
22
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
|
-
args[_key] = arguments[_key];
|
|
24
|
-
}
|
|
25
22
|
if (typeof args[0] === 'boolean') {
|
|
26
23
|
[deep, to] = args;
|
|
27
24
|
args.splice(0, 2);
|
|
@@ -55,11 +52,8 @@ export function extend() {
|
|
|
55
52
|
}
|
|
56
53
|
return to;
|
|
57
54
|
}
|
|
58
|
-
export function classNames() {
|
|
55
|
+
export function classNames(...args) {
|
|
59
56
|
const classes = [];
|
|
60
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
61
|
-
args[_key2] = arguments[_key2];
|
|
62
|
-
}
|
|
63
57
|
args.forEach(arg => {
|
|
64
58
|
if (typeof arg === 'object' && arg.constructor === Object) {
|
|
65
59
|
Object.keys(arg).forEach(key => {
|
|
@@ -87,10 +81,7 @@ export function getComponentId() {
|
|
|
87
81
|
routerComponentIdCounter += 1;
|
|
88
82
|
return `${now()}_${routerComponentIdCounter}`;
|
|
89
83
|
}
|
|
90
|
-
export function getChildren(slots, slotName) {
|
|
91
|
-
if (slotName === void 0) {
|
|
92
|
-
slotName = 'default';
|
|
93
|
-
}
|
|
84
|
+
export function getChildren(slots, slotName = 'default') {
|
|
94
85
|
const result = [];
|
|
95
86
|
const getElementsChildren = els => {
|
|
96
87
|
if (!Array.isArray(els)) {
|