framework7-react 7.0.0-beta.2 → 7.0.0-beta.20
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 +4 -4
- package/components/accordion-toggle.js +2 -2
- package/components/accordion.js +2 -2
- package/components/actions-button.js +3 -3
- package/components/actions-group.js +2 -2
- package/components/actions-label.js +2 -2
- package/components/actions.d.ts +1 -1
- package/components/actions.js +6 -6
- package/components/app.js +5 -5
- package/components/appbar.js +2 -2
- package/components/area-chart.js +22 -18
- package/components/badge.js +3 -3
- package/components/block-footer.js +2 -2
- package/components/block-header.js +2 -2
- package/components/block-title.js +2 -2
- package/components/block.js +3 -3
- package/components/breadcrumbs-collapsed.d.ts +16 -0
- package/components/breadcrumbs-collapsed.js +32 -0
- package/components/breadcrumbs-item.d.ts +17 -0
- package/components/breadcrumbs-item.js +33 -0
- package/components/breadcrumbs-separator.d.ts +15 -0
- package/components/breadcrumbs-separator.js +25 -0
- package/components/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs.js +26 -0
- package/components/button.js +6 -6
- package/components/card-content.js +2 -2
- package/components/card-footer.js +2 -2
- package/components/card-header.js +2 -2
- package/components/card.js +8 -8
- package/components/checkbox.js +2 -2
- package/components/chip.js +4 -4
- package/components/col.js +3 -3
- package/components/fab-backdrop.js +1 -1
- package/components/fab-button.js +3 -3
- package/components/fab-buttons.js +2 -2
- package/components/fab.js +3 -3
- package/components/gauge.js +1 -1
- package/components/icon.js +4 -4
- package/components/input.js +28 -12
- package/components/link.js +8 -8
- package/components/list-button.js +4 -4
- package/components/list-group.js +3 -3
- package/components/list-index.js +5 -5
- package/components/list-input.js +27 -11
- package/components/list-item-cell.js +2 -2
- package/components/list-item-content.js +3 -3
- package/components/list-item-row.js +2 -2
- package/components/list-item.js +10 -10
- package/components/list.d.ts +1 -0
- package/components/list.js +13 -6
- package/components/login-screen-title.js +2 -2
- package/components/login-screen.js +6 -6
- package/components/menu-dropdown-item.js +3 -3
- package/components/menu-dropdown.js +2 -2
- package/components/menu-item.js +7 -7
- package/components/menu.js +2 -2
- package/components/message.js +2 -2
- package/components/messagebar-attachment.js +2 -2
- package/components/messagebar-attachments.js +2 -2
- package/components/messagebar-sheet-image.js +2 -2
- package/components/messagebar-sheet-item.js +2 -2
- package/components/messagebar-sheet.js +2 -2
- package/components/messagebar.js +7 -7
- package/components/messages-title.js +2 -2
- package/components/messages.js +5 -5
- package/components/nav-left.js +4 -4
- package/components/nav-right.js +2 -2
- package/components/nav-title-large.js +2 -2
- package/components/nav-title.js +2 -2
- package/components/navbar.js +8 -8
- package/components/page-content.js +6 -6
- package/components/page.js +5 -5
- package/components/panel.js +10 -6
- package/components/photo-browser.js +4 -4
- package/components/pie-chart.js +8 -7
- package/components/popover.js +6 -6
- package/components/popup.js +6 -6
- package/components/preloader.js +3 -3
- package/components/progressbar.js +3 -3
- package/components/radio.js +2 -2
- package/components/range.d.ts +1 -1
- package/components/range.js +5 -5
- package/components/routable-modals.js +8 -7
- package/components/row.js +3 -3
- package/components/searchbar.js +4 -4
- package/components/segmented.js +2 -2
- package/components/sheet.js +6 -6
- package/components/skeleton-avatar.d.ts +1 -0
- package/components/skeleton-avatar.js +1 -0
- package/components/skeleton-block.d.ts +1 -0
- package/components/skeleton-block.js +1 -0
- package/components/skeleton-image.d.ts +1 -0
- package/components/skeleton-image.js +1 -0
- package/components/skeleton-text.d.ts +1 -0
- package/components/skeleton-text.js +1 -0
- package/components/stepper.js +5 -5
- package/components/subnavbar.js +2 -2
- package/components/swipeout-actions.js +2 -2
- package/components/swipeout-button.js +2 -2
- package/components/tab.js +7 -7
- package/components/tabs.js +3 -3
- package/components/text-editor.js +5 -5
- package/components/toggle.js +18 -7
- package/components/toolbar.js +6 -6
- package/components/treeview-item.js +5 -5
- package/components/treeview.js +2 -2
- package/components/view.d.ts +1 -0
- package/components/view.js +28 -23
- package/components/views.js +2 -2
- package/framework7-react.d.ts +5 -1
- package/framework7-react.js +107 -103
- package/package.json +2 -1
- package/shared/components-router.js +30 -22
- package/shared/f7.js +10 -2
- package/shared/get-router-initial-component.js +1 -1
- package/shared/mixins.js +3 -3
- package/shared/modal-state-classes.js +5 -4
- package/shared/plugin.js +7 -3
- package/shared/router-open-in.js +106 -0
- package/shared/use-icon.js +7 -3
- package/shared/use-route-props.js +4 -3
- package/shared/use-smart-select.js +2 -2
- package/shared/use-store.js +6 -6
- package/shared/use-tab.js +3 -3
- package/shared/use-theme.js +1 -1
- package/shared/use-tooltip.js +2 -2
- package/shared/utils.js +32 -6
- package/shared/watch-prop.js +1 -1
package/components/toggle.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect';
|
|
5
|
-
import { classNames, getExtraAttrs, emit } from '../shared/utils';
|
|
6
|
-
import { colorClasses } from '../shared/mixins';
|
|
7
|
-
import { f7ready, f7 } from '../shared/f7';
|
|
8
|
-
import { watchProp } from '../shared/watch-prop';
|
|
9
|
-
import { useTooltip } from '../shared/use-tooltip';
|
|
4
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
|
+
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
6
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
7
|
+
import { f7ready, f7 } from '../shared/f7.js';
|
|
8
|
+
import { watchProp } from '../shared/watch-prop.js';
|
|
9
|
+
import { useTooltip } from '../shared/use-tooltip.js';
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -25,6 +25,7 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
25
25
|
} = props;
|
|
26
26
|
const extraAttrs = getExtraAttrs(props);
|
|
27
27
|
const elRef = useRef(null);
|
|
28
|
+
const inputElRef = useRef(null);
|
|
28
29
|
|
|
29
30
|
const onChange = event => {
|
|
30
31
|
emit(props, 'change', event);
|
|
@@ -69,8 +70,17 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
69
70
|
|
|
70
71
|
useIsomorphicLayoutEffect(() => {
|
|
71
72
|
toggleEvents('on');
|
|
73
|
+
|
|
74
|
+
if (inputElRef.current) {
|
|
75
|
+
inputElRef.current.addEventListener('change', onChange);
|
|
76
|
+
}
|
|
77
|
+
|
|
72
78
|
return () => {
|
|
73
79
|
toggleEvents('off');
|
|
80
|
+
|
|
81
|
+
if (inputElRef.current) {
|
|
82
|
+
inputElRef.current.removeEventListener('change', onChange);
|
|
83
|
+
}
|
|
74
84
|
};
|
|
75
85
|
});
|
|
76
86
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -81,6 +91,7 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
81
91
|
disabled
|
|
82
92
|
}, colorClasses(props));
|
|
83
93
|
const inputEl = /*#__PURE__*/React.createElement("input", {
|
|
94
|
+
ref: inputElRef,
|
|
84
95
|
type: "checkbox",
|
|
85
96
|
name: name,
|
|
86
97
|
disabled: disabled,
|
|
@@ -88,7 +99,7 @@ const Toggle = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
88
99
|
checked: checked,
|
|
89
100
|
defaultChecked: defaultChecked,
|
|
90
101
|
value: value,
|
|
91
|
-
onChange:
|
|
102
|
+
onChange: () => {}
|
|
92
103
|
});
|
|
93
104
|
return /*#__PURE__*/React.createElement("label", _extends({
|
|
94
105
|
id: id,
|
package/components/toolbar.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect';
|
|
5
|
-
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils';
|
|
6
|
-
import { colorClasses } from '../shared/mixins';
|
|
7
|
-
import { useTheme } from '../shared/use-theme';
|
|
8
|
-
import { f7ready, f7 } from '../shared/f7';
|
|
9
|
-
import { TabbarContext } from '../shared/tabbar-context';
|
|
4
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
|
+
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
6
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
7
|
+
import { useTheme } from '../shared/use-theme.js';
|
|
8
|
+
import { f7ready, f7 } from '../shared/f7.js';
|
|
9
|
+
import { TabbarContext } from '../shared/tabbar-context.js';
|
|
10
10
|
|
|
11
11
|
const Toolbar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
12
12
|
const {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect';
|
|
5
|
-
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils';
|
|
6
|
-
import { colorClasses, actionsAttrs, actionsClasses, routerAttrs, routerClasses } from '../shared/mixins';
|
|
7
|
-
import { useIcon } from '../shared/use-icon';
|
|
8
|
-
import { f7ready, f7 } from '../shared/f7';
|
|
4
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
|
+
import { classNames, getExtraAttrs, getSlots, emit } from '../shared/utils.js';
|
|
6
|
+
import { colorClasses, actionsAttrs, actionsClasses, routerAttrs, routerClasses } from '../shared/mixins.js';
|
|
7
|
+
import { useIcon } from '../shared/use-icon.js';
|
|
8
|
+
import { f7ready, f7 } from '../shared/f7.js';
|
|
9
9
|
|
|
10
10
|
const TreeviewItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
11
|
const {
|
package/components/treeview.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs } from '../shared/utils';
|
|
5
|
-
import { colorClasses } from '../shared/mixins';
|
|
4
|
+
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
6
6
|
|
|
7
7
|
const Treeview = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
8
|
const {
|
package/components/view.d.ts
CHANGED
package/components/view.js
CHANGED
|
@@ -2,14 +2,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-nested-ternary */
|
|
4
4
|
import React, { forwardRef, useRef, useImperativeHandle, useState } from 'react';
|
|
5
|
-
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect';
|
|
6
|
-
import { classNames, getExtraAttrs, noUndefinedProps, emit, getRouterId } from '../shared/utils';
|
|
7
|
-
import { colorClasses } from '../shared/mixins';
|
|
8
|
-
import { f7ready, f7routers, f7, f7events } from '../shared/f7';
|
|
9
|
-
import { useTab } from '../shared/use-tab';
|
|
10
|
-
import { useAsyncComponent } from '../shared/use-async-component';
|
|
11
|
-
import { getRouterInitialComponent } from '../shared/get-router-initial-component';
|
|
12
|
-
import { RouterContext } from '../shared/router-context';
|
|
5
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
6
|
+
import { classNames, getExtraAttrs, noUndefinedProps, emit, getRouterId } from '../shared/utils.js';
|
|
7
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
8
|
+
import { f7ready, f7routers, f7, f7events } from '../shared/f7.js';
|
|
9
|
+
import { useTab } from '../shared/use-tab.js';
|
|
10
|
+
import { useAsyncComponent } from '../shared/use-async-component.js';
|
|
11
|
+
import { getRouterInitialComponent } from '../shared/get-router-initial-component.js';
|
|
12
|
+
import { RouterContext } from '../shared/router-context.js';
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -23,11 +23,13 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
23
23
|
tab,
|
|
24
24
|
tabActive,
|
|
25
25
|
url,
|
|
26
|
+
initRouterOnTabShow,
|
|
26
27
|
browserHistoryInitialMatch = true
|
|
27
28
|
} = props;
|
|
28
29
|
const childrenArray = React.Children.toArray(children);
|
|
29
30
|
const initialPageComponent = childrenArray.filter(c => c.props && c.props.initialPage)[0];
|
|
30
31
|
const restChildren = childrenArray.filter(c => !c.props || !c.props.initialPage);
|
|
32
|
+
const shouldInitRouter = !(initRouterOnTabShow && tab && !tabActive);
|
|
31
33
|
const extraAttrs = getExtraAttrs(props);
|
|
32
34
|
const f7View = useRef(null);
|
|
33
35
|
const elRef = useRef(null);
|
|
@@ -61,7 +63,7 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
61
63
|
};
|
|
62
64
|
f7routers.views.push(routerData.current);
|
|
63
65
|
|
|
64
|
-
if (f7View.current && f7View.current.router && (url || main)) {
|
|
66
|
+
if (shouldInitRouter && f7View.current && f7View.current.router && (url || main)) {
|
|
65
67
|
const initialData = getRouterInitialComponent(f7View.current.router, initialPageComponent);
|
|
66
68
|
initialPage = initialData.initialPage;
|
|
67
69
|
initialRoute = initialData.initialRoute;
|
|
@@ -219,20 +221,23 @@ const View = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
219
221
|
style: style,
|
|
220
222
|
className: classes,
|
|
221
223
|
ref: elRef
|
|
222
|
-
}, extraAttrs), restChildren, pages.map(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
224
|
+
}, extraAttrs), restChildren, pages.map(_ref => {
|
|
225
|
+
let {
|
|
226
|
+
component: PageComponent,
|
|
227
|
+
id: pageId,
|
|
228
|
+
props: pageProps,
|
|
229
|
+
isAsync,
|
|
230
|
+
initialComponent
|
|
231
|
+
} = _ref;
|
|
232
|
+
return /*#__PURE__*/React.createElement(RouterContext.Provider, {
|
|
233
|
+
key: pageId,
|
|
234
|
+
value: {
|
|
235
|
+
router: pageProps.f7router,
|
|
236
|
+
route: pageProps.f7route
|
|
237
|
+
}
|
|
238
|
+
}, initialComponent ? /*#__PURE__*/React.cloneElement(initialComponent, { ...pageProps
|
|
239
|
+
}) : isAsync ? useAsyncComponent(PageComponent, pageProps) : /*#__PURE__*/React.createElement(PageComponent, pageProps));
|
|
240
|
+
}));
|
|
236
241
|
});
|
|
237
242
|
View.displayName = 'f7-view';
|
|
238
243
|
export default View;
|
package/components/views.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs } from '../shared/utils';
|
|
5
|
-
import { colorClasses } from '../shared/mixins';
|
|
4
|
+
import { classNames, getExtraAttrs } from '../shared/utils.js';
|
|
5
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
6
6
|
|
|
7
7
|
const Views = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
8
|
const {
|
package/framework7-react.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ import BlockFooter from './components/block-footer';
|
|
|
17
17
|
import BlockHeader from './components/block-header';
|
|
18
18
|
import BlockTitle from './components/block-title';
|
|
19
19
|
import Block from './components/block';
|
|
20
|
+
import BreadcrumbsCollapsed from './components/breadcrumbs-collapsed';
|
|
21
|
+
import BreadcrumbsItem from './components/breadcrumbs-item';
|
|
22
|
+
import BreadcrumbsSeparator from './components/breadcrumbs-separator';
|
|
23
|
+
import Breadcrumbs from './components/breadcrumbs';
|
|
20
24
|
import Button from './components/button';
|
|
21
25
|
import CardContent from './components/card-content';
|
|
22
26
|
import CardFooter from './components/card-footer';
|
|
@@ -122,6 +126,6 @@ declare const useStore: useStore;
|
|
|
122
126
|
|
|
123
127
|
declare const Framework7React: Framework7Plugin;
|
|
124
128
|
|
|
125
|
-
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, Appbar, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, Col, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemCell, ListItemContent, ListItemRow, ListItem, List, LoginScreenTitle, LoginScreen, MenuDropdownItem, MenuDropdown, MenuItem, Menu, 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, Row, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, SwiperSlide, Swiper, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
129
|
+
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, Appbar, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, Col, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemCell, ListItemContent, ListItemRow, ListItem, List, LoginScreenTitle, LoginScreen, MenuDropdownItem, MenuDropdown, MenuItem, Menu, 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, Row, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, SwiperSlide, Swiper, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
126
130
|
export { f7, f7ready, theme, useStore };
|
|
127
131
|
export default Framework7React;
|
package/framework7-react.js
CHANGED
|
@@ -1,115 +1,119 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 React 7.0.0-beta.
|
|
2
|
+
* Framework7 React 7.0.0-beta.20
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & React
|
|
4
4
|
* https://framework7.io/react/
|
|
5
5
|
*
|
|
6
|
-
* Copyright 2014-
|
|
6
|
+
* Copyright 2014-2022 Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: April 15, 2022
|
|
11
11
|
*/
|
|
12
|
-
import Framework7React from './shared/plugin';
|
|
13
|
-
import { f7, f7ready, theme } from './shared/f7';
|
|
14
|
-
import { useStore } from './shared/use-store';
|
|
12
|
+
import Framework7React from './shared/plugin.js';
|
|
13
|
+
import { f7, f7ready, theme } from './shared/f7.js';
|
|
14
|
+
import { useStore } from './shared/use-store.js';
|
|
15
15
|
|
|
16
|
-
import AccordionContent from './components/accordion-content';
|
|
17
|
-
import AccordionItem from './components/accordion-item';
|
|
18
|
-
import AccordionToggle from './components/accordion-toggle';
|
|
19
|
-
import Accordion from './components/accordion';
|
|
20
|
-
import ActionsButton from './components/actions-button';
|
|
21
|
-
import ActionsGroup from './components/actions-group';
|
|
22
|
-
import ActionsLabel from './components/actions-label';
|
|
23
|
-
import Actions from './components/actions';
|
|
24
|
-
import App from './components/app';
|
|
25
|
-
import Appbar from './components/appbar';
|
|
26
|
-
import AreaChart from './components/area-chart';
|
|
27
|
-
import Badge from './components/badge';
|
|
28
|
-
import BlockFooter from './components/block-footer';
|
|
29
|
-
import BlockHeader from './components/block-header';
|
|
30
|
-
import BlockTitle from './components/block-title';
|
|
31
|
-
import Block from './components/block';
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
import
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
import
|
|
96
|
-
import
|
|
97
|
-
import
|
|
98
|
-
import
|
|
99
|
-
import
|
|
100
|
-
import
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
104
|
-
import
|
|
105
|
-
import
|
|
106
|
-
import
|
|
107
|
-
import
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
import
|
|
111
|
-
import
|
|
16
|
+
import AccordionContent from './components/accordion-content.js';
|
|
17
|
+
import AccordionItem from './components/accordion-item.js';
|
|
18
|
+
import AccordionToggle from './components/accordion-toggle.js';
|
|
19
|
+
import Accordion from './components/accordion.js';
|
|
20
|
+
import ActionsButton from './components/actions-button.js';
|
|
21
|
+
import ActionsGroup from './components/actions-group.js';
|
|
22
|
+
import ActionsLabel from './components/actions-label.js';
|
|
23
|
+
import Actions from './components/actions.js';
|
|
24
|
+
import App from './components/app.js';
|
|
25
|
+
import Appbar from './components/appbar.js';
|
|
26
|
+
import AreaChart from './components/area-chart.js';
|
|
27
|
+
import Badge from './components/badge.js';
|
|
28
|
+
import BlockFooter from './components/block-footer.js';
|
|
29
|
+
import BlockHeader from './components/block-header.js';
|
|
30
|
+
import BlockTitle from './components/block-title.js';
|
|
31
|
+
import Block from './components/block.js';
|
|
32
|
+
import BreadcrumbsCollapsed from './components/breadcrumbs-collapsed.js';
|
|
33
|
+
import BreadcrumbsItem from './components/breadcrumbs-item.js';
|
|
34
|
+
import BreadcrumbsSeparator from './components/breadcrumbs-separator.js';
|
|
35
|
+
import Breadcrumbs from './components/breadcrumbs.js';
|
|
36
|
+
import Button from './components/button.js';
|
|
37
|
+
import CardContent from './components/card-content.js';
|
|
38
|
+
import CardFooter from './components/card-footer.js';
|
|
39
|
+
import CardHeader from './components/card-header.js';
|
|
40
|
+
import Card from './components/card.js';
|
|
41
|
+
import Checkbox from './components/checkbox.js';
|
|
42
|
+
import Chip from './components/chip.js';
|
|
43
|
+
import Col from './components/col.js';
|
|
44
|
+
import FabBackdrop from './components/fab-backdrop.js';
|
|
45
|
+
import FabButton from './components/fab-button.js';
|
|
46
|
+
import FabButtons from './components/fab-buttons.js';
|
|
47
|
+
import Fab from './components/fab.js';
|
|
48
|
+
import Gauge from './components/gauge.js';
|
|
49
|
+
import Icon from './components/icon.js';
|
|
50
|
+
import Input from './components/input.js';
|
|
51
|
+
import Link from './components/link.js';
|
|
52
|
+
import ListButton from './components/list-button.js';
|
|
53
|
+
import ListGroup from './components/list-group.js';
|
|
54
|
+
import ListIndex from './components/list-index.js';
|
|
55
|
+
import ListInput from './components/list-input.js';
|
|
56
|
+
import ListItemCell from './components/list-item-cell.js';
|
|
57
|
+
import ListItemContent from './components/list-item-content.js';
|
|
58
|
+
import ListItemRow from './components/list-item-row.js';
|
|
59
|
+
import ListItem from './components/list-item.js';
|
|
60
|
+
import List from './components/list.js';
|
|
61
|
+
import LoginScreenTitle from './components/login-screen-title.js';
|
|
62
|
+
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
|
+
import Message from './components/message.js';
|
|
68
|
+
import MessagebarAttachment from './components/messagebar-attachment.js';
|
|
69
|
+
import MessagebarAttachments from './components/messagebar-attachments.js';
|
|
70
|
+
import MessagebarSheetImage from './components/messagebar-sheet-image.js';
|
|
71
|
+
import MessagebarSheetItem from './components/messagebar-sheet-item.js';
|
|
72
|
+
import MessagebarSheet from './components/messagebar-sheet.js';
|
|
73
|
+
import Messagebar from './components/messagebar.js';
|
|
74
|
+
import MessagesTitle from './components/messages-title.js';
|
|
75
|
+
import Messages from './components/messages.js';
|
|
76
|
+
import NavLeft from './components/nav-left.js';
|
|
77
|
+
import NavRight from './components/nav-right.js';
|
|
78
|
+
import NavTitleLarge from './components/nav-title-large.js';
|
|
79
|
+
import NavTitle from './components/nav-title.js';
|
|
80
|
+
import Navbar from './components/navbar.js';
|
|
81
|
+
import PageContent from './components/page-content.js';
|
|
82
|
+
import Page from './components/page.js';
|
|
83
|
+
import Panel from './components/panel.js';
|
|
84
|
+
import PhotoBrowser from './components/photo-browser.js';
|
|
85
|
+
import PieChart from './components/pie-chart.js';
|
|
86
|
+
import Popover from './components/popover.js';
|
|
87
|
+
import Popup from './components/popup.js';
|
|
88
|
+
import Preloader from './components/preloader.js';
|
|
89
|
+
import Progressbar from './components/progressbar.js';
|
|
90
|
+
import Radio from './components/radio.js';
|
|
91
|
+
import Range from './components/range.js';
|
|
92
|
+
import RoutableModals from './components/routable-modals.js';
|
|
93
|
+
import Row from './components/row.js';
|
|
94
|
+
import Searchbar from './components/searchbar.js';
|
|
95
|
+
import Segmented from './components/segmented.js';
|
|
96
|
+
import Sheet from './components/sheet.js';
|
|
97
|
+
import SkeletonAvatar from './components/skeleton-avatar.js';
|
|
98
|
+
import SkeletonBlock from './components/skeleton-block.js';
|
|
99
|
+
import SkeletonImage from './components/skeleton-image.js';
|
|
100
|
+
import SkeletonText from './components/skeleton-text.js';
|
|
101
|
+
import Stepper from './components/stepper.js';
|
|
102
|
+
import Subnavbar from './components/subnavbar.js';
|
|
103
|
+
import SwipeoutActions from './components/swipeout-actions.js';
|
|
104
|
+
import SwipeoutButton from './components/swipeout-button.js';
|
|
105
|
+
import SwiperSlide from './components/swiper-slide.js';
|
|
106
|
+
import Swiper from './components/swiper.js';
|
|
107
|
+
import Tab from './components/tab.js';
|
|
108
|
+
import Tabs from './components/tabs.js';
|
|
109
|
+
import TextEditor from './components/text-editor.js';
|
|
110
|
+
import Toggle from './components/toggle.js';
|
|
111
|
+
import Toolbar from './components/toolbar.js';
|
|
112
|
+
import TreeviewItem from './components/treeview-item.js';
|
|
113
|
+
import Treeview from './components/treeview.js';
|
|
114
|
+
import View from './components/view.js';
|
|
115
|
+
import Views from './components/views.js';
|
|
112
116
|
|
|
113
|
-
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, Appbar, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, Col, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemCell, ListItemContent, ListItemRow, ListItem, List, LoginScreenTitle, LoginScreen, MenuDropdownItem, MenuDropdown, MenuItem, Menu, 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, Row, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, SwiperSlide, Swiper, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
117
|
+
export { AccordionContent, AccordionItem, AccordionToggle, Accordion, ActionsButton, ActionsGroup, ActionsLabel, Actions, App, Appbar, AreaChart, Badge, BlockFooter, BlockHeader, BlockTitle, Block, BreadcrumbsCollapsed, BreadcrumbsItem, BreadcrumbsSeparator, Breadcrumbs, Button, CardContent, CardFooter, CardHeader, Card, Checkbox, Chip, Col, FabBackdrop, FabButton, FabButtons, Fab, Gauge, Icon, Input, Link, ListButton, ListGroup, ListIndex, ListInput, ListItemCell, ListItemContent, ListItemRow, ListItem, List, LoginScreenTitle, LoginScreen, MenuDropdownItem, MenuDropdown, MenuItem, Menu, 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, Row, Searchbar, Segmented, Sheet, SkeletonAvatar, SkeletonBlock, SkeletonImage, SkeletonText, Stepper, Subnavbar, SwipeoutActions, SwipeoutButton, SwiperSlide, Swiper, Tab, Tabs, TextEditor, Toggle, Toolbar, TreeviewItem, Treeview, View, Views }
|
|
114
118
|
export { f7, f7ready, theme, useStore };
|
|
115
119
|
export default Framework7React;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7-react",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.20",
|
|
4
4
|
"description": "Build full featured iOS & Android apps using Framework7 & React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"ipad",
|
|
26
26
|
"apple",
|
|
27
27
|
"phonegap",
|
|
28
|
+
"capacitor",
|
|
28
29
|
"native",
|
|
29
30
|
"touch",
|
|
30
31
|
"appstore",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint no-underscore-dangle: "off" */
|
|
2
|
-
import { f7events, f7routers } from './f7';
|
|
3
|
-
import { extend, getComponentId } from './utils';
|
|
2
|
+
import { f7events, f7routers } from './f7.js';
|
|
3
|
+
import { extend, getComponentId } from './utils.js';
|
|
4
|
+
import { routerOpenIn } from './router-open-in.js';
|
|
4
5
|
|
|
5
6
|
const getChildrenArray = el => {
|
|
6
7
|
const arr = [];
|
|
@@ -21,13 +22,18 @@ const hasSameChildren = (childrenBefore, childrenAfter) => {
|
|
|
21
22
|
|
|
22
23
|
export default {
|
|
23
24
|
proto: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
openIn(router, navigateUrl, options) {
|
|
26
|
+
return routerOpenIn(router, navigateUrl, options);
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
pageComponentLoader(_ref) {
|
|
30
|
+
let {
|
|
31
|
+
routerEl,
|
|
32
|
+
component,
|
|
33
|
+
options,
|
|
34
|
+
resolve,
|
|
35
|
+
reject
|
|
36
|
+
} = _ref;
|
|
31
37
|
const router = this;
|
|
32
38
|
const routerId = router.id;
|
|
33
39
|
const el = routerEl;
|
|
@@ -112,13 +118,14 @@ export default {
|
|
|
112
118
|
}
|
|
113
119
|
},
|
|
114
120
|
|
|
115
|
-
tabComponentLoader({
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
tabComponentLoader(_temp) {
|
|
122
|
+
let {
|
|
123
|
+
tabEl,
|
|
124
|
+
component,
|
|
125
|
+
options,
|
|
126
|
+
resolve,
|
|
127
|
+
reject
|
|
128
|
+
} = _temp === void 0 ? {} : _temp;
|
|
122
129
|
const router = this;
|
|
123
130
|
if (!tabEl) reject();
|
|
124
131
|
let tabRouter;
|
|
@@ -174,12 +181,13 @@ export default {
|
|
|
174
181
|
tabRouter.setTabContent(null);
|
|
175
182
|
},
|
|
176
183
|
|
|
177
|
-
modalComponentLoader({
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
modalComponentLoader(_temp2) {
|
|
185
|
+
let {
|
|
186
|
+
component,
|
|
187
|
+
options,
|
|
188
|
+
resolve,
|
|
189
|
+
reject
|
|
190
|
+
} = _temp2 === void 0 ? {} : _temp2;
|
|
183
191
|
const router = this;
|
|
184
192
|
const modalsRouter = f7routers.modals;
|
|
185
193
|
|
package/shared/f7.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable import/no-mutable-exports */
|
|
2
2
|
import Framework7 from 'framework7/lite';
|
|
3
|
-
import { extend, unsetRouterIds } from './utils';
|
|
3
|
+
import { extend, unsetRouterIds } from './utils.js';
|
|
4
4
|
let f7;
|
|
5
5
|
let f7events;
|
|
6
6
|
const theme = {};
|
|
@@ -31,7 +31,15 @@ const f7initEvents = () => {
|
|
|
31
31
|
f7events = new Framework7.Events();
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const f7init = (rootEl, params
|
|
34
|
+
const f7init = function (rootEl, params, init) {
|
|
35
|
+
if (params === void 0) {
|
|
36
|
+
params = {};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (init === void 0) {
|
|
40
|
+
init = true;
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
const f7Params = extend({}, params, {
|
|
36
44
|
el: rootEl,
|
|
37
45
|
init
|
package/shared/mixins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isStringProp } from './utils';
|
|
1
|
+
import { isStringProp } from './utils.js';
|
|
2
2
|
export function colorClasses(props) {
|
|
3
3
|
const {
|
|
4
4
|
color,
|
|
@@ -7,10 +7,10 @@ export function colorClasses(props) {
|
|
|
7
7
|
bgColor,
|
|
8
8
|
borderColor,
|
|
9
9
|
rippleColor,
|
|
10
|
-
|
|
10
|
+
dark
|
|
11
11
|
} = props;
|
|
12
12
|
return {
|
|
13
|
-
|
|
13
|
+
dark,
|
|
14
14
|
[`color-${color}`]: color,
|
|
15
15
|
[`color-theme-${colorTheme}`]: colorTheme,
|
|
16
16
|
[`text-color-${textColor}`]: textColor,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export const modalStateClasses = ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const modalStateClasses = function (_temp) {
|
|
2
|
+
let {
|
|
3
|
+
isOpened,
|
|
4
|
+
isClosing
|
|
5
|
+
} = _temp === void 0 ? {} : _temp;
|
|
5
6
|
return {
|
|
6
7
|
'modal-in': isOpened.current && !isClosing.current,
|
|
7
8
|
'modal-out': isClosing.current
|