framework7-react 7.0.0-beta.1 → 7.0.0-beta.10

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.
Files changed (113) hide show
  1. package/components/accordion-content.js +2 -2
  2. package/components/accordion-item.js +4 -4
  3. package/components/accordion-toggle.js +2 -2
  4. package/components/accordion.js +2 -2
  5. package/components/actions-button.js +3 -3
  6. package/components/actions-group.js +2 -2
  7. package/components/actions-label.js +2 -2
  8. package/components/actions.js +6 -6
  9. package/components/app.js +5 -5
  10. package/components/appbar.js +2 -2
  11. package/components/area-chart.js +2 -2
  12. package/components/badge.js +3 -3
  13. package/components/block-footer.js +2 -2
  14. package/components/block-header.js +2 -2
  15. package/components/block-title.js +2 -2
  16. package/components/block.js +3 -3
  17. package/components/button.js +6 -6
  18. package/components/card-content.js +2 -2
  19. package/components/card-footer.js +2 -2
  20. package/components/card-header.js +2 -2
  21. package/components/card.js +8 -8
  22. package/components/checkbox.js +2 -2
  23. package/components/chip.js +4 -4
  24. package/components/col.js +3 -3
  25. package/components/fab-backdrop.js +1 -1
  26. package/components/fab-button.js +3 -3
  27. package/components/fab-buttons.js +2 -2
  28. package/components/fab.js +3 -3
  29. package/components/gauge.js +1 -1
  30. package/components/icon.js +4 -4
  31. package/components/input.js +8 -8
  32. package/components/link.js +8 -8
  33. package/components/list-button.js +4 -4
  34. package/components/list-group.js +3 -3
  35. package/components/list-index.js +5 -5
  36. package/components/list-input.js +7 -7
  37. package/components/list-item-cell.js +2 -2
  38. package/components/list-item-content.js +3 -3
  39. package/components/list-item-row.js +2 -2
  40. package/components/list-item.js +10 -10
  41. package/components/list.js +6 -6
  42. package/components/login-screen-title.js +2 -2
  43. package/components/login-screen.js +6 -6
  44. package/components/menu-dropdown-item.js +3 -3
  45. package/components/menu-dropdown.js +2 -2
  46. package/components/menu-item.js +7 -7
  47. package/components/menu.js +2 -2
  48. package/components/message.js +2 -2
  49. package/components/messagebar-attachment.js +2 -2
  50. package/components/messagebar-attachments.js +2 -2
  51. package/components/messagebar-sheet-image.js +2 -2
  52. package/components/messagebar-sheet-item.js +2 -2
  53. package/components/messagebar-sheet.js +2 -2
  54. package/components/messagebar.js +7 -7
  55. package/components/messages-title.js +2 -2
  56. package/components/messages.js +5 -5
  57. package/components/nav-left.js +4 -4
  58. package/components/nav-right.js +2 -2
  59. package/components/nav-title-large.js +2 -2
  60. package/components/nav-title.js +2 -2
  61. package/components/navbar.js +8 -8
  62. package/components/page-content.js +6 -6
  63. package/components/page.js +5 -5
  64. package/components/panel.js +5 -5
  65. package/components/photo-browser.js +4 -4
  66. package/components/pie-chart.js +2 -2
  67. package/components/popover.js +6 -6
  68. package/components/popup.js +6 -6
  69. package/components/preloader.js +3 -3
  70. package/components/progressbar.js +3 -3
  71. package/components/radio.js +2 -2
  72. package/components/range.js +5 -5
  73. package/components/routable-modals.js +2 -2
  74. package/components/row.js +3 -3
  75. package/components/searchbar.js +4 -4
  76. package/components/segmented.js +2 -2
  77. package/components/sheet.js +6 -6
  78. package/components/skeleton-avatar.d.ts +1 -0
  79. package/components/skeleton-avatar.js +1 -0
  80. package/components/skeleton-block.d.ts +1 -0
  81. package/components/skeleton-block.js +1 -0
  82. package/components/skeleton-image.d.ts +1 -0
  83. package/components/skeleton-image.js +1 -0
  84. package/components/skeleton-text.d.ts +1 -0
  85. package/components/skeleton-text.js +1 -0
  86. package/components/stepper.js +5 -5
  87. package/components/subnavbar.js +2 -2
  88. package/components/swipeout-actions.js +2 -2
  89. package/components/swipeout-button.js +2 -2
  90. package/components/tab.js +7 -7
  91. package/components/tabs.js +3 -3
  92. package/components/text-editor.js +5 -5
  93. package/components/toggle.js +6 -6
  94. package/components/toolbar.js +6 -6
  95. package/components/treeview-item.js +5 -5
  96. package/components/treeview.js +2 -2
  97. package/components/view.js +8 -8
  98. package/components/views.js +2 -2
  99. package/framework7-react.js +101 -101
  100. package/package.json +1 -1
  101. package/shared/components-router.js +7 -2
  102. package/shared/f7.js +1 -1
  103. package/shared/get-router-initial-component.js +1 -1
  104. package/shared/mixins.js +3 -3
  105. package/shared/plugin.js +2 -2
  106. package/shared/router-open-in.js +106 -0
  107. package/shared/use-icon.js +2 -2
  108. package/shared/use-smart-select.js +2 -2
  109. package/shared/use-store.js +1 -1
  110. package/shared/use-tab.js +3 -3
  111. package/shared/use-theme.js +1 -1
  112. package/shared/use-tooltip.js +2 -2
  113. package/shared/watch-prop.js +1 -1
@@ -0,0 +1,106 @@
1
+ import React from 'react';
2
+ import Popup from '../components/popup.js';
3
+ import View from '../components/view.js';
4
+ import LoginScreen from '../components/login-screen.js';
5
+ import Sheet from '../components/sheet.js';
6
+ import Popover from '../components/popover.js';
7
+ import Panel from '../components/panel.js';
8
+ export const routerOpenIn = (router, url, options) => {
9
+ const navigateOptions = {
10
+ url,
11
+ route: {
12
+ path: url,
13
+ options: { ...options,
14
+ openIn: undefined
15
+ }
16
+ }
17
+ };
18
+ const params = { ...options
19
+ };
20
+
21
+ if (options.openIn === 'popup') {
22
+ params.component = function DynamicPopup() {
23
+ return /*#__PURE__*/React.createElement(Popup, {
24
+ className: "popup-router-open-in",
25
+ "data-url": url
26
+ }, /*#__PURE__*/React.createElement(View, {
27
+ linksView: router.view.selector,
28
+ url: url,
29
+ ignoreOpenIn: true
30
+ }));
31
+ };
32
+
33
+ navigateOptions.route.popup = params;
34
+ }
35
+
36
+ if (options.openIn === 'loginScreen') {
37
+ params.component = function DynamicPopover() {
38
+ return /*#__PURE__*/React.createElement(LoginScreen, {
39
+ className: "login-screen-router-open-in",
40
+ "data-url": url
41
+ }, /*#__PURE__*/React.createElement(View, {
42
+ linksView: router.view.selector,
43
+ url: url,
44
+ ignoreOpenIn: true
45
+ }));
46
+ };
47
+
48
+ navigateOptions.route.loginScreen = params;
49
+ }
50
+
51
+ if (options.openIn === 'sheet') {
52
+ params.component = function DynamicSheet() {
53
+ return /*#__PURE__*/React.createElement(Sheet, {
54
+ className: "sheet-modal-router-open-in",
55
+ "data-url": url
56
+ }, /*#__PURE__*/React.createElement(View, {
57
+ linksView: router.view.selector,
58
+ url: url,
59
+ ignoreOpenIn: true
60
+ }));
61
+ };
62
+
63
+ navigateOptions.route.sheet = params;
64
+ }
65
+
66
+ if (options.openIn === 'popover') {
67
+ params.targetEl = options.clickedEl || options.targetEl;
68
+
69
+ params.component = function DynamicPopover() {
70
+ return /*#__PURE__*/React.createElement(Popover, {
71
+ className: "popover-router-open-in",
72
+ targetEl: options.clickedEl || options.targetEl,
73
+ "data-url": url
74
+ }, /*#__PURE__*/React.createElement(View, {
75
+ linksView: router.view.selector,
76
+ url: url,
77
+ ignoreOpenIn: true
78
+ }));
79
+ };
80
+
81
+ navigateOptions.route.popover = params;
82
+ }
83
+
84
+ if (options.openIn.indexOf('panel') >= 0) {
85
+ const parts = options.openIn.split(':');
86
+ const side = parts[1] || 'left';
87
+ const effect = parts[2] || 'cover';
88
+
89
+ params.component = function DynamicPanel() {
90
+ return /*#__PURE__*/React.createElement(Panel, {
91
+ side: side,
92
+ effect: effect,
93
+ className: "panel-router-open-in",
94
+ "data-url": url
95
+ }, /*#__PURE__*/React.createElement(View, {
96
+ linksView: router.view.selector,
97
+ url: url,
98
+ ignoreOpenIn: true
99
+ }));
100
+ };
101
+
102
+ navigateOptions.route.panel = params;
103
+ }
104
+
105
+ return router.navigate(navigateOptions);
106
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import Icon from '../components/icon';
3
- import Badge from '../components/badge';
2
+ import Icon from '../components/icon.js';
3
+ import Badge from '../components/badge.js';
4
4
  export const useIcon = (props = {}) => {
5
5
  const {
6
6
  icon,
@@ -1,6 +1,6 @@
1
1
  import { useEffect } from 'react';
2
- import { f7ready, f7 } from './f7';
3
- import { extend } from './utils';
2
+ import { f7ready, f7 } from './f7.js';
3
+ import { extend } from './utils.js';
4
4
  export const useSmartSelect = (smartSelect, smartSelectParams, f7SmartSelect, getEl) => {
5
5
  const onMount = () => {
6
6
  f7ready(() => {
@@ -1,5 +1,5 @@
1
1
  import { useState, useEffect, useRef } from 'react';
2
- import { f7 } from './f7';
2
+ import { f7 } from './f7.js';
3
3
  export const useStore = (...args) => {
4
4
  const assignedGetters = useRef({}); // (store, getter)
5
5
 
package/shared/use-tab.js CHANGED
@@ -1,6 +1,6 @@
1
- import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect';
2
- import { f7, f7ready } from './f7';
3
- import { emit } from './utils';
1
+ import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect.js';
2
+ import { f7, f7ready } from './f7.js';
3
+ import { emit } from './utils.js';
4
4
  export const useTab = (elRef, props) => {
5
5
  const onTabShow = el => {
6
6
  if (elRef.current !== el) return;
@@ -1,5 +1,5 @@
1
1
  import { useState } from 'react';
2
- import { f7, f7ready, theme } from './f7';
2
+ import { f7, f7ready, theme } from './f7.js';
3
3
  export const useTheme = () => {
4
4
  const [t, setTheme] = useState(f7 ? theme : null);
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useRef } from 'react';
2
- import { watchProp } from './watch-prop';
3
- import { f7, f7ready } from './f7';
2
+ import { watchProp } from './watch-prop.js';
3
+ import { f7, f7ready } from './f7.js';
4
4
  export const useTooltip = (elRef, props) => {
5
5
  const f7Tooltip = useRef(null);
6
6
  const {
@@ -1,5 +1,5 @@
1
1
  import { useRef } from 'react';
2
- import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect';
2
+ import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect.js';
3
3
  export const watchProp = (value, callback) => {
4
4
  const valueRef = useRef(value);
5
5
  useIsomorphicLayoutEffect(() => {