framework7-react 7.1.5 → 8.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion-content.js +2 -2
- package/components/accordion-item.js +2 -11
- package/components/accordion-toggle.js +2 -2
- package/components/accordion.js +2 -2
- package/components/actions-button.d.ts +1 -1
- package/components/actions-button.js +4 -8
- package/components/actions-group.js +2 -2
- package/components/actions-label.js +4 -6
- package/components/actions.js +4 -14
- package/components/app.js +4 -8
- package/components/area-chart.js +6 -45
- package/components/badge.js +2 -2
- package/components/block-footer.js +2 -2
- package/components/block-header.js +2 -2
- package/components/block-title.js +2 -2
- package/components/block.d.ts +17 -4
- package/components/block.js +37 -11
- package/components/breadcrumbs-collapsed.js +2 -4
- package/components/breadcrumbs-item.js +2 -4
- package/components/breadcrumbs-separator.js +2 -2
- package/components/breadcrumbs.js +2 -2
- package/components/button.d.ts +3 -7
- package/components/button.js +8 -24
- package/components/card-content.js +2 -2
- package/components/card-footer.js +2 -2
- package/components/card-header.js +2 -2
- package/components/card.d.ts +5 -2
- package/components/card.js +14 -23
- package/components/checkbox.js +2 -4
- package/components/chip.d.ts +0 -1
- package/components/chip.js +2 -9
- package/components/fab-backdrop.js +2 -2
- package/components/fab-button.js +2 -6
- package/components/fab-buttons.js +2 -2
- package/components/fab.js +2 -10
- package/components/gauge.js +2 -2
- package/components/icon.d.ts +0 -1
- package/components/icon.js +3 -17
- package/components/input.js +1 -57
- package/components/link.d.ts +0 -1
- package/components/link.js +5 -12
- package/components/list-button.js +2 -4
- package/components/list-group.js +2 -2
- package/components/list-index.d.ts +0 -1
- package/components/list-index.js +3 -13
- package/components/list-input.d.ts +0 -1
- package/components/list-input.js +1 -55
- package/components/list-item-content.js +9 -20
- package/components/list-item.d.ts +1 -1
- package/components/list-item.js +6 -35
- package/components/list.d.ts +21 -9
- package/components/list.js +43 -37
- package/components/login-screen-title.js +2 -2
- package/components/login-screen.js +3 -15
- package/components/message.js +2 -10
- package/components/messagebar-attachment.js +2 -5
- package/components/messagebar-attachments.js +2 -2
- package/components/messagebar-sheet-image.js +4 -5
- package/components/messagebar-sheet-item.js +2 -2
- package/components/messagebar-sheet.js +2 -2
- package/components/messagebar.js +1 -19
- package/components/messages-title.js +2 -2
- package/components/messages.js +2 -15
- package/components/nav-left.js +2 -6
- package/components/nav-right.js +2 -2
- package/components/nav-title-large.js +2 -2
- package/components/nav-title.js +2 -4
- package/components/navbar.d.ts +1 -2
- package/components/navbar.js +5 -31
- package/components/page-content.js +2 -16
- package/components/page.d.ts +0 -1
- package/components/page.js +4 -62
- package/components/panel.d.ts +1 -0
- package/components/panel.js +6 -26
- package/components/photo-browser.js +1 -17
- package/components/pie-chart.js +6 -18
- package/components/popover.d.ts +1 -0
- package/components/popover.js +4 -14
- package/components/popup.js +3 -19
- package/components/preloader.js +5 -14
- package/components/progressbar.js +2 -4
- package/components/radio.js +2 -4
- package/components/range.js +2 -9
- package/components/routable-modals.js +2 -7
- package/components/searchbar.d.ts +1 -2
- package/components/searchbar.js +5 -30
- package/components/segmented.d.ts +0 -3
- package/components/segmented.js +4 -10
- package/components/sheet.js +2 -22
- package/components/stepper.d.ts +0 -5
- package/components/stepper.js +3 -33
- package/components/subnavbar.js +2 -2
- package/components/swipeout-actions.js +2 -4
- package/components/swipeout-button.js +2 -4
- package/components/tab.js +4 -15
- package/components/tabs.js +1 -4
- package/components/text-editor.js +1 -18
- package/components/toggle.js +1 -13
- package/components/toolbar.d.ts +2 -6
- package/components/toolbar.js +9 -20
- package/components/treeview-item.d.ts +0 -1
- package/components/treeview-item.js +2 -11
- package/components/treeview.js +2 -2
- package/components/view.d.ts +0 -6
- package/components/view.js +3 -30
- package/components/views.js +2 -2
- package/framework7-react.d.ts +2 -14
- package/framework7-react.js +3 -14
- 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 +2 -8
- package/shared/plugin.js +2 -8
- package/shared/router-open-in.js +4 -15
- package/shared/tabbar-context.js +1 -1
- package/shared/use-icon.js +1 -6
- package/shared/use-isomorphic-layout-effect.js +0 -2
- package/shared/use-route-props.js +0 -1
- package/shared/use-smart-select.js +0 -3
- package/shared/use-store.js +4 -8
- package/shared/use-tab.js +0 -4
- package/shared/use-theme.js +0 -2
- package/shared/use-tooltip.js +0 -5
- package/shared/utils.js +0 -18
- package/shared/watch-prop.js +0 -1
- package/components/appbar.d.ts +0 -28
- package/components/appbar.js +0 -45
- package/components/col.d.ts +0 -36
- package/components/col.js +0 -75
- package/components/list-item-cell.d.ts +0 -23
- package/components/list-item-cell.js +0 -28
- package/components/list-item-row.d.ts +0 -23
- package/components/list-item-row.js +0 -28
- package/components/menu-dropdown-item.d.ts +0 -68
- package/components/menu-dropdown-item.js +0 -59
- package/components/menu-dropdown.d.ts +0 -28
- package/components/menu-dropdown.js +0 -42
- package/components/menu-item.d.ts +0 -81
- package/components/menu-item.js +0 -101
- package/components/menu.d.ts +0 -23
- package/components/menu.js +0 -30
- package/components/row.d.ts +0 -31
- package/components/row.js +0 -64
- package/components/swiper-slide.d.ts +0 -4
- package/components/swiper-slide.js +0 -3
- package/components/swiper.d.ts +0 -4
- package/components/swiper.js +0 -3
package/components/toolbar.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
3
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
4
|
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
@@ -8,52 +7,44 @@ import { useTheme } from '../shared/use-theme.js';
|
|
|
8
7
|
import { f7ready, f7 } from '../shared/f7.js';
|
|
9
8
|
import { TabbarContext } from '../shared/tabbar-context.js';
|
|
10
9
|
|
|
10
|
+
|
|
11
11
|
const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
12
12
|
const {
|
|
13
13
|
className,
|
|
14
14
|
id,
|
|
15
15
|
style,
|
|
16
16
|
tabbar,
|
|
17
|
-
|
|
17
|
+
icons,
|
|
18
18
|
scrollable,
|
|
19
19
|
hidden,
|
|
20
|
-
|
|
21
|
-
noHairline,
|
|
22
|
-
noBorder,
|
|
20
|
+
outline = true,
|
|
23
21
|
position,
|
|
24
22
|
topMd,
|
|
25
23
|
topIos,
|
|
26
|
-
topAurora,
|
|
27
24
|
top,
|
|
28
25
|
bottomMd,
|
|
29
26
|
bottomIos,
|
|
30
|
-
bottomAurora,
|
|
31
27
|
bottom,
|
|
32
28
|
inner = true
|
|
33
29
|
} = props;
|
|
34
30
|
const extraAttrs = getExtraAttrs(props);
|
|
35
31
|
const elRef = useRef(null);
|
|
36
|
-
|
|
37
32
|
const onHide = toolbarEl => {
|
|
38
33
|
if (elRef.current !== toolbarEl) return;
|
|
39
34
|
emit(props, 'toolbarHide');
|
|
40
35
|
};
|
|
41
|
-
|
|
42
36
|
const onShow = toolbarEl => {
|
|
43
37
|
if (elRef.current !== toolbarEl) return;
|
|
44
38
|
emit(props, 'toolbarShow');
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
const hide = animate => {
|
|
48
41
|
if (!f7) return;
|
|
49
42
|
f7.toolbar.hide(elRef.current, animate);
|
|
50
43
|
};
|
|
51
|
-
|
|
52
44
|
const show = animate => {
|
|
53
45
|
if (!f7) return;
|
|
54
46
|
f7.toolbar.show(elRef.current, animate);
|
|
55
47
|
};
|
|
56
|
-
|
|
57
48
|
useImperativeHandle(ref, () => ({
|
|
58
49
|
el: elRef.current,
|
|
59
50
|
hide,
|
|
@@ -64,7 +55,6 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
64
55
|
if (tabbar && f7 && elRef.current) {
|
|
65
56
|
f7.toolbar.setHighlight(elRef.current);
|
|
66
57
|
}
|
|
67
|
-
|
|
68
58
|
f7.on('toolbarShow', onShow);
|
|
69
59
|
f7.on('toolbarHide', onHide);
|
|
70
60
|
});
|
|
@@ -77,13 +67,12 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
77
67
|
const theme = useTheme();
|
|
78
68
|
const classes = classNames(className, 'toolbar', {
|
|
79
69
|
tabbar,
|
|
80
|
-
'toolbar-bottom': theme && theme.md && bottomMd || theme && theme.ios && bottomIos ||
|
|
81
|
-
'toolbar-top': theme && theme.md && topMd || theme && theme.ios && topIos ||
|
|
82
|
-
'tabbar-
|
|
70
|
+
'toolbar-bottom': theme && theme.md && bottomMd || theme && theme.ios && bottomIos || bottom || position === 'bottom',
|
|
71
|
+
'toolbar-top': theme && theme.md && topMd || theme && theme.ios && topIos || top || position === 'top',
|
|
72
|
+
'tabbar-icons': icons,
|
|
83
73
|
'tabbar-scrollable': scrollable,
|
|
84
74
|
'toolbar-hidden': hidden,
|
|
85
|
-
'no-
|
|
86
|
-
'no-hairline': noHairline || noBorder
|
|
75
|
+
'no-outline': !outline
|
|
87
76
|
}, colorClasses(props));
|
|
88
77
|
const slots = getSlots(props);
|
|
89
78
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -93,7 +82,7 @@ const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
93
82
|
ref: elRef
|
|
94
83
|
}, extraAttrs), /*#__PURE__*/React.createElement(TabbarContext.Provider, {
|
|
95
84
|
value: {
|
|
96
|
-
|
|
85
|
+
tabbarHasIcons: icons
|
|
97
86
|
}
|
|
98
87
|
}, slots['before-inner'], inner ? /*#__PURE__*/React.createElement("div", {
|
|
99
88
|
className: "toolbar-inner"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
3
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
4
|
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
@@ -7,6 +6,7 @@ import { colorClasses, actionsAttrs, actionsClasses, routerAttrs, routerClasses
|
|
|
7
6
|
import { useIcon } from '../shared/use-icon.js';
|
|
8
7
|
import { f7ready, f7 } from '../shared/f7.js';
|
|
9
8
|
|
|
9
|
+
|
|
10
10
|
const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
11
|
const {
|
|
12
12
|
className,
|
|
@@ -23,30 +23,24 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
23
23
|
} = props;
|
|
24
24
|
const extraAttrs = getExtraAttrs(props);
|
|
25
25
|
const elRef = useRef(null);
|
|
26
|
-
|
|
27
26
|
const onClick = event => {
|
|
28
27
|
emit(props, 'click', event);
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
const onOpen = el => {
|
|
32
30
|
if (elRef.current !== el) return;
|
|
33
31
|
emit(props, 'treeviewOpen', el);
|
|
34
32
|
};
|
|
35
|
-
|
|
36
33
|
const onClose = el => {
|
|
37
34
|
if (elRef.current !== el) return;
|
|
38
35
|
emit(props, 'treeviewClose', el);
|
|
39
36
|
};
|
|
40
|
-
|
|
41
37
|
const onLoadChildren = (el, done) => {
|
|
42
38
|
if (elRef.current !== el) return;
|
|
43
39
|
emit(props, 'treeviewLoadChildren', el, done);
|
|
44
40
|
};
|
|
45
|
-
|
|
46
41
|
useImperativeHandle(ref, () => ({
|
|
47
42
|
el: elRef.current
|
|
48
43
|
}));
|
|
49
|
-
|
|
50
44
|
const attachEvents = () => {
|
|
51
45
|
if (!elRef.current) return;
|
|
52
46
|
f7ready(() => {
|
|
@@ -55,14 +49,12 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
55
49
|
f7.on('treeviewLoadChildren', onLoadChildren);
|
|
56
50
|
});
|
|
57
51
|
};
|
|
58
|
-
|
|
59
52
|
const detachEvents = () => {
|
|
60
53
|
if (!f7) return;
|
|
61
54
|
f7.off('treeviewOpen', onOpen);
|
|
62
55
|
f7.off('treeviewClose', onClose);
|
|
63
56
|
f7.off('treeviewLoadChildren', onLoadChildren);
|
|
64
57
|
};
|
|
65
|
-
|
|
66
58
|
useIsomorphicLayoutEffect(() => {
|
|
67
59
|
attachEvents();
|
|
68
60
|
return detachEvents;
|
|
@@ -84,7 +76,6 @@ const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
84
76
|
let href = link;
|
|
85
77
|
if (link === true) href = '#';
|
|
86
78
|
if (link === false) href = undefined; // no href attribute
|
|
87
|
-
|
|
88
79
|
const itemRootAttrs = {
|
|
89
80
|
href,
|
|
90
81
|
...routerAttrs(props),
|
package/components/treeview.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
3
|
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
4
|
import { colorClasses } from '../shared/mixins.js';
|
|
6
5
|
|
|
6
|
+
|
|
7
7
|
const Treeview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
8
|
const {
|
|
9
9
|
className,
|
package/components/view.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export interface ViewProps {
|
|
|
17
17
|
linksView ?: Object | string;
|
|
18
18
|
url ?: string;
|
|
19
19
|
main ?: boolean;
|
|
20
|
-
stackPages ?: boolean;
|
|
21
20
|
xhrCache ?: boolean;
|
|
22
21
|
xhrCacheIgnore ?: Array<any>;
|
|
23
22
|
xhrCacheIgnoreGetParameters ?: boolean;
|
|
@@ -43,11 +42,6 @@ export interface ViewProps {
|
|
|
43
42
|
mdSwipeBackAnimateOpacity ?: boolean;
|
|
44
43
|
mdSwipeBackActiveArea ?: number;
|
|
45
44
|
mdSwipeBackThreshold ?: number;
|
|
46
|
-
auroraSwipeBack ?: boolean;
|
|
47
|
-
auroraSwipeBackAnimateShadow ?: boolean;
|
|
48
|
-
auroraSwipeBackAnimateOpacity ?: boolean;
|
|
49
|
-
auroraSwipeBackActiveArea ?: number;
|
|
50
|
-
auroraSwipeBackThreshold ?: number;
|
|
51
45
|
browserHistory ?: boolean;
|
|
52
46
|
browserHistoryRoot ?: string;
|
|
53
47
|
browserHistoryAnimate ?: boolean;
|
package/components/view.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
/* eslint-disable no-nested-ternary */
|
|
4
3
|
import React, { forwardRef, useRef, useImperativeHandle, useState } from 'react';
|
|
5
4
|
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
@@ -11,7 +10,6 @@ import { useAsyncComponent } from '../shared/use-async-component.js';
|
|
|
11
10
|
import { getRouterInitialComponent } from '../shared/get-router-initial-component.js';
|
|
12
11
|
import { RouterContext } from '../shared/router-context.js';
|
|
13
12
|
|
|
14
|
-
|
|
15
13
|
const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
14
|
const {
|
|
17
15
|
className,
|
|
@@ -36,16 +34,13 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
36
34
|
const routerData = useRef(null);
|
|
37
35
|
let initialPage;
|
|
38
36
|
let initialRoute;
|
|
39
|
-
|
|
40
37
|
const onViewInit = view => {
|
|
41
38
|
emit(props, 'viewInit', view);
|
|
42
|
-
|
|
43
39
|
if (!init) {
|
|
44
40
|
routerData.current.instance = view;
|
|
45
41
|
f7View.current = routerData.current.instance;
|
|
46
42
|
}
|
|
47
43
|
};
|
|
48
|
-
|
|
49
44
|
if (f7 && !f7View.current && init) {
|
|
50
45
|
const routerId = getRouterId();
|
|
51
46
|
f7View.current = f7.views.create(elRef.current, {
|
|
@@ -62,73 +57,58 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
62
57
|
instance: f7View.current
|
|
63
58
|
};
|
|
64
59
|
f7routers.views.push(routerData.current);
|
|
65
|
-
|
|
66
60
|
if (shouldInitRouter && f7View.current && f7View.current.router && (url || main)) {
|
|
67
61
|
const initialData = getRouterInitialComponent(f7View.current.router, initialPageComponent);
|
|
68
62
|
initialPage = initialData.initialPage;
|
|
69
63
|
initialRoute = initialData.initialRoute;
|
|
70
|
-
|
|
71
64
|
if (initialRoute && initialRoute.route && initialRoute.route.masterRoute) {
|
|
72
65
|
initialPage = undefined;
|
|
73
66
|
initialRoute = undefined;
|
|
74
67
|
}
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
|
-
|
|
78
70
|
const [pages, setPages] = useState(initialPage ? [initialPage] : []);
|
|
79
|
-
|
|
80
71
|
const onResize = (view, width) => {
|
|
81
72
|
emit(props, 'viewResize', width);
|
|
82
73
|
};
|
|
83
|
-
|
|
84
74
|
const onSwipeBackMove = data => {
|
|
85
75
|
const swipeBackData = data;
|
|
86
76
|
emit(props, 'swipeBackMove', swipeBackData);
|
|
87
77
|
};
|
|
88
|
-
|
|
89
78
|
const onSwipeBackBeforeChange = data => {
|
|
90
79
|
const swipeBackData = data;
|
|
91
80
|
emit(props, 'swipeBackBeforeChange', swipeBackData);
|
|
92
81
|
};
|
|
93
|
-
|
|
94
82
|
const onSwipeBackAfterChange = data => {
|
|
95
83
|
const swipeBackData = data;
|
|
96
84
|
emit(props, 'swipeBackAfterChange', swipeBackData);
|
|
97
85
|
};
|
|
98
|
-
|
|
99
86
|
const onSwipeBackBeforeReset = data => {
|
|
100
87
|
const swipeBackData = data;
|
|
101
88
|
emit(props, 'swipeBackBeforeReset', swipeBackData);
|
|
102
89
|
};
|
|
103
|
-
|
|
104
90
|
const onSwipeBackAfterReset = data => {
|
|
105
91
|
const swipeBackData = data;
|
|
106
92
|
emit(props, 'swipeBackAfterReset', swipeBackData);
|
|
107
93
|
};
|
|
108
|
-
|
|
109
94
|
useImperativeHandle(ref, () => ({
|
|
110
95
|
el: elRef.current,
|
|
111
96
|
f7View: () => f7View.current
|
|
112
97
|
}));
|
|
113
|
-
|
|
114
98
|
const onMount = () => {
|
|
115
99
|
f7ready(() => {
|
|
116
100
|
if (f7View.current) {
|
|
117
101
|
routerData.current.el = elRef.current;
|
|
118
102
|
routerData.current.pages = pages;
|
|
119
|
-
|
|
120
103
|
routerData.current.setPages = newPages => {
|
|
121
104
|
setPages([...newPages]);
|
|
122
105
|
};
|
|
123
|
-
|
|
124
106
|
if (initialPage && initialPage.isAsync && !initialPage.initialComponent) {
|
|
125
107
|
initialPage.component().then(() => {
|
|
126
108
|
setTimeout(() => {
|
|
127
109
|
f7View.current.init(elRef.current);
|
|
128
|
-
|
|
129
110
|
if (initialPage) {
|
|
130
111
|
initialPage.el = f7View.current.router.currentPageEl;
|
|
131
|
-
|
|
132
112
|
if (initialRoute && initialRoute.route && initialRoute.route.keepAlive) {
|
|
133
113
|
initialRoute.route.keepAliveData = {
|
|
134
114
|
pageEl: initialPage.el
|
|
@@ -139,10 +119,8 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
139
119
|
});
|
|
140
120
|
} else {
|
|
141
121
|
f7View.current.init(elRef.current);
|
|
142
|
-
|
|
143
122
|
if (initialPage) {
|
|
144
123
|
initialPage.el = f7View.current.router.currentPageEl;
|
|
145
|
-
|
|
146
124
|
if (initialRoute && initialRoute.route && initialRoute.route.keepAlive) {
|
|
147
125
|
initialRoute.route.keepAliveData = {
|
|
148
126
|
pageEl: initialPage.el
|
|
@@ -157,11 +135,9 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
157
135
|
routerId,
|
|
158
136
|
pages,
|
|
159
137
|
instance: f7View.current,
|
|
160
|
-
|
|
161
138
|
setPages(newPages) {
|
|
162
139
|
setPages([...newPages]);
|
|
163
140
|
}
|
|
164
|
-
|
|
165
141
|
};
|
|
166
142
|
f7routers.views.push(routerData.current);
|
|
167
143
|
routerData.current.instance = f7.views.create(elRef.current, {
|
|
@@ -174,7 +150,6 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
174
150
|
});
|
|
175
151
|
f7View.current = routerData.current.instance;
|
|
176
152
|
}
|
|
177
|
-
|
|
178
153
|
if (!init) return;
|
|
179
154
|
f7View.current.on('resize', onResize);
|
|
180
155
|
f7View.current.on('swipebackMove', onSwipeBackMove);
|
|
@@ -184,7 +159,6 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
184
159
|
f7View.current.on('swipebackAfterReset', onSwipeBackAfterReset);
|
|
185
160
|
});
|
|
186
161
|
};
|
|
187
|
-
|
|
188
162
|
const onDestroy = () => {
|
|
189
163
|
if (f7View.current) {
|
|
190
164
|
f7View.current.off('resize', onResize);
|
|
@@ -196,11 +170,9 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
196
170
|
if (f7View.current.destroy) f7View.current.destroy();
|
|
197
171
|
f7View.current = null;
|
|
198
172
|
}
|
|
199
|
-
|
|
200
173
|
f7routers.views.splice(f7routers.views.indexOf(routerData.current), 1);
|
|
201
174
|
routerData.current = null;
|
|
202
175
|
};
|
|
203
|
-
|
|
204
176
|
useIsomorphicLayoutEffect(() => {
|
|
205
177
|
onMount();
|
|
206
178
|
return onDestroy;
|
|
@@ -235,7 +207,8 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
235
207
|
router: pageProps.f7router,
|
|
236
208
|
route: pageProps.f7route
|
|
237
209
|
}
|
|
238
|
-
}, initialComponent ? /*#__PURE__*/React.cloneElement(initialComponent, {
|
|
210
|
+
}, initialComponent ? /*#__PURE__*/React.cloneElement(initialComponent, {
|
|
211
|
+
...pageProps
|
|
239
212
|
}) : isAsync ? useAsyncComponent(PageComponent, pageProps) : /*#__PURE__*/React.createElement(PageComponent, pageProps));
|
|
240
213
|
}));
|
|
241
214
|
});
|
package/components/views.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
3
|
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
4
|
import { colorClasses } from '../shared/mixins.js';
|
|
6
5
|
|
|
6
|
+
|
|
7
7
|
const Views = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
8
|
const {
|
|
9
9
|
className,
|
package/framework7-react.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import ActionsGroup from './components/actions-group.js';
|
|
|
10
10
|
import ActionsLabel from './components/actions-label.js';
|
|
11
11
|
import Actions from './components/actions.js';
|
|
12
12
|
import App from './components/app.js';
|
|
13
|
-
import Appbar from './components/appbar.js';
|
|
14
13
|
import AreaChart from './components/area-chart.js';
|
|
15
14
|
import Badge from './components/badge.js';
|
|
16
15
|
import BlockFooter from './components/block-footer.js';
|
|
@@ -28,7 +27,6 @@ import CardHeader from './components/card-header.js';
|
|
|
28
27
|
import Card from './components/card.js';
|
|
29
28
|
import Checkbox from './components/checkbox.js';
|
|
30
29
|
import Chip from './components/chip.js';
|
|
31
|
-
import Col from './components/col.js';
|
|
32
30
|
import FabBackdrop from './components/fab-backdrop.js';
|
|
33
31
|
import FabButton from './components/fab-button.js';
|
|
34
32
|
import FabButtons from './components/fab-buttons.js';
|
|
@@ -41,17 +39,11 @@ import ListButton from './components/list-button.js';
|
|
|
41
39
|
import ListGroup from './components/list-group.js';
|
|
42
40
|
import ListIndex from './components/list-index.js';
|
|
43
41
|
import ListInput from './components/list-input.js';
|
|
44
|
-
import ListItemCell from './components/list-item-cell.js';
|
|
45
42
|
import ListItemContent from './components/list-item-content.js';
|
|
46
|
-
import ListItemRow from './components/list-item-row.js';
|
|
47
43
|
import ListItem from './components/list-item.js';
|
|
48
44
|
import List from './components/list.js';
|
|
49
45
|
import LoginScreenTitle from './components/login-screen-title.js';
|
|
50
46
|
import LoginScreen from './components/login-screen.js';
|
|
51
|
-
import MenuDropdownItem from './components/menu-dropdown-item.js';
|
|
52
|
-
import MenuDropdown from './components/menu-dropdown.js';
|
|
53
|
-
import MenuItem from './components/menu-item.js';
|
|
54
|
-
import Menu from './components/menu.js';
|
|
55
47
|
import Message from './components/message.js';
|
|
56
48
|
import MessagebarAttachment from './components/messagebar-attachment.js';
|
|
57
49
|
import MessagebarAttachments from './components/messagebar-attachments.js';
|
|
@@ -78,7 +70,6 @@ import Progressbar from './components/progressbar.js';
|
|
|
78
70
|
import Radio from './components/radio.js';
|
|
79
71
|
import Range from './components/range.js';
|
|
80
72
|
import RoutableModals from './components/routable-modals.js';
|
|
81
|
-
import Row from './components/row.js';
|
|
82
73
|
import Searchbar from './components/searchbar.js';
|
|
83
74
|
import Segmented from './components/segmented.js';
|
|
84
75
|
import Sheet from './components/sheet.js';
|
|
@@ -90,8 +81,6 @@ import Stepper from './components/stepper.js';
|
|
|
90
81
|
import Subnavbar from './components/subnavbar.js';
|
|
91
82
|
import SwipeoutActions from './components/swipeout-actions.js';
|
|
92
83
|
import SwipeoutButton from './components/swipeout-button.js';
|
|
93
|
-
import SwiperSlide from './components/swiper-slide.js';
|
|
94
|
-
import Swiper from './components/swiper.js';
|
|
95
84
|
import Tab from './components/tab.js';
|
|
96
85
|
import Tabs from './components/tabs.js';
|
|
97
86
|
import TextEditor from './components/text-editor.js';
|
|
@@ -105,10 +94,9 @@ import Views from './components/views.js';
|
|
|
105
94
|
export interface Framework7Theme {
|
|
106
95
|
ios: boolean;
|
|
107
96
|
md: boolean;
|
|
108
|
-
aurora: boolean;
|
|
109
97
|
}
|
|
110
98
|
|
|
111
|
-
/** Object with boolean properties with information about currently used theme (
|
|
99
|
+
/** Object with boolean properties with information about currently used theme (`ios` or `md`) */
|
|
112
100
|
declare const theme: Framework7Theme;
|
|
113
101
|
|
|
114
102
|
/** Main Framework7's initialized instance. It allows you to use any of Framework7 APIs */
|
|
@@ -126,6 +114,6 @@ declare const useStore: useStore;
|
|
|
126
114
|
|
|
127
115
|
declare const Framework7React: Framework7Plugin;
|
|
128
116
|
|
|
129
|
-
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App,
|
|
117
|
+
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemContent, ListItem, List, LoginScreenTitle, LoginScreen, Message, MessagebarAttachment, MessagebarAttachments, MessagebarSheetImage, MessagebarSheetItem, MessagebarSheet, Messagebar, MessagesTitle, Messages, NavLeft, NavRight, NavTitleLarge, NavTitle, Navbar, PageContent, Page, Panel, PhotoBrowser, PieChart, Popover, Popup, Preloader, Progressbar, Radio, Range, RoutableModals, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
130
118
|
export { f7, f7ready, theme, useStore };
|
|
131
119
|
export default Framework7React;
|
package/framework7-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 React
|
|
2
|
+
* Framework7 React 8.0.0-beta.2
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & React
|
|
4
4
|
* https://framework7.io/react/
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on: February
|
|
10
|
+
* Released on: February 7, 2023
|
|
11
11
|
*/
|
|
12
12
|
import Framework7React from './shared/plugin.js';
|
|
13
13
|
import { f7, f7ready, theme } from './shared/f7.js';
|
|
@@ -22,7 +22,6 @@ import ActionsGroup from './components/actions-group.js';
|
|
|
22
22
|
import ActionsLabel from './components/actions-label.js';
|
|
23
23
|
import Actions from './components/actions.js';
|
|
24
24
|
import App from './components/app.js';
|
|
25
|
-
import Appbar from './components/appbar.js';
|
|
26
25
|
import AreaChart from './components/area-chart.js';
|
|
27
26
|
import Badge from './components/badge.js';
|
|
28
27
|
import BlockFooter from './components/block-footer.js';
|
|
@@ -40,7 +39,6 @@ import CardHeader from './components/card-header.js';
|
|
|
40
39
|
import Card from './components/card.js';
|
|
41
40
|
import Checkbox from './components/checkbox.js';
|
|
42
41
|
import Chip from './components/chip.js';
|
|
43
|
-
import Col from './components/col.js';
|
|
44
42
|
import FabBackdrop from './components/fab-backdrop.js';
|
|
45
43
|
import FabButton from './components/fab-button.js';
|
|
46
44
|
import FabButtons from './components/fab-buttons.js';
|
|
@@ -53,17 +51,11 @@ import ListButton from './components/list-button.js';
|
|
|
53
51
|
import ListGroup from './components/list-group.js';
|
|
54
52
|
import ListIndex from './components/list-index.js';
|
|
55
53
|
import ListInput from './components/list-input.js';
|
|
56
|
-
import ListItemCell from './components/list-item-cell.js';
|
|
57
54
|
import ListItemContent from './components/list-item-content.js';
|
|
58
|
-
import ListItemRow from './components/list-item-row.js';
|
|
59
55
|
import ListItem from './components/list-item.js';
|
|
60
56
|
import List from './components/list.js';
|
|
61
57
|
import LoginScreenTitle from './components/login-screen-title.js';
|
|
62
58
|
import LoginScreen from './components/login-screen.js';
|
|
63
|
-
import MenuDropdownItem from './components/menu-dropdown-item.js';
|
|
64
|
-
import MenuDropdown from './components/menu-dropdown.js';
|
|
65
|
-
import MenuItem from './components/menu-item.js';
|
|
66
|
-
import Menu from './components/menu.js';
|
|
67
59
|
import Message from './components/message.js';
|
|
68
60
|
import MessagebarAttachment from './components/messagebar-attachment.js';
|
|
69
61
|
import MessagebarAttachments from './components/messagebar-attachments.js';
|
|
@@ -90,7 +82,6 @@ import Progressbar from './components/progressbar.js';
|
|
|
90
82
|
import Radio from './components/radio.js';
|
|
91
83
|
import Range from './components/range.js';
|
|
92
84
|
import RoutableModals from './components/routable-modals.js';
|
|
93
|
-
import Row from './components/row.js';
|
|
94
85
|
import Searchbar from './components/searchbar.js';
|
|
95
86
|
import Segmented from './components/segmented.js';
|
|
96
87
|
import Sheet from './components/sheet.js';
|
|
@@ -102,8 +93,6 @@ import Stepper from './components/stepper.js';
|
|
|
102
93
|
import Subnavbar from './components/subnavbar.js';
|
|
103
94
|
import SwipeoutActions from './components/swipeout-actions.js';
|
|
104
95
|
import SwipeoutButton from './components/swipeout-button.js';
|
|
105
|
-
import SwiperSlide from './components/swiper-slide.js';
|
|
106
|
-
import Swiper from './components/swiper.js';
|
|
107
96
|
import Tab from './components/tab.js';
|
|
108
97
|
import Tabs from './components/tabs.js';
|
|
109
98
|
import TextEditor from './components/text-editor.js';
|
|
@@ -114,6 +103,6 @@ import Treeview from './components/treeview.js';
|
|
|
114
103
|
import View from './components/view.js';
|
|
115
104
|
import Views from './components/views.js';
|
|
116
105
|
|
|
117
|
-
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App,
|
|
106
|
+
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemContent, ListItem, List, LoginScreenTitle, LoginScreen, Message, MessagebarAttachment, MessagebarAttachments, MessagebarSheetImage, MessagebarSheetItem, MessagebarSheet, Messagebar, MessagesTitle, Messages, NavLeft, NavRight, NavTitleLarge, NavTitle, Navbar, PageContent, Page, Panel, PhotoBrowser, PieChart, Popover, Popup, Preloader, Progressbar, Radio, Range, RoutableModals, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
118
107
|
export { f7, f7ready, theme, useStore };
|
|
119
108
|
export default Framework7React;
|