@ionic/react 7.5.3-dev.11698858201.14165f23 → 7.5.3-dev.11699994454.1cbf1283

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 (247) hide show
  1. package/dist/index.js +2443 -8
  2. package/dist/index.js.map +1 -7
  3. package/dist/types/components/CreateAnimation.d.ts +71 -0
  4. package/dist/types/components/IonActionSheet.d.ts +3 -0
  5. package/dist/types/components/IonAlert.d.ts +3 -0
  6. package/dist/types/components/IonApp.d.ts +41 -0
  7. package/dist/types/components/IonIcon.d.ts +16 -0
  8. package/dist/types/components/IonLoading.d.ts +3 -0
  9. package/dist/types/components/IonModal.d.ts +3 -0
  10. package/dist/types/components/IonOverlayManager.d.ts +15 -0
  11. package/dist/types/components/IonPage.d.ts +3 -0
  12. package/dist/types/components/IonPicker.d.ts +3 -0
  13. package/dist/types/components/IonPopover.d.ts +3 -0
  14. package/dist/types/components/IonRedirect.d.ts +16 -0
  15. package/dist/types/components/IonRoute.d.ts +17 -0
  16. package/dist/types/components/IonRouterContext.d.ts +42 -0
  17. package/dist/types/components/IonRouterOutlet.d.ts +8 -0
  18. package/dist/types/components/IonToast.d.ts +3 -0
  19. package/dist/types/components/IonicReactProps.d.ts +6 -0
  20. package/dist/types/components/__tests__/utils.spec.d.ts +1 -0
  21. package/dist/types/components/createControllerComponent.d.ts +19 -0
  22. package/dist/types/components/createInlineOverlayComponent.d.ts +2 -0
  23. package/dist/types/components/createOverlayComponent.d.ts +20 -0
  24. package/dist/types/components/createRoutingComponent.d.ts +2 -0
  25. package/dist/types/components/hrefprops.d.ts +9 -0
  26. package/dist/types/components/index.d.ts +35 -0
  27. package/dist/types/components/inner-proxies.d.ts +14 -0
  28. package/dist/types/components/navigation/IonBackButton.d.ts +68 -0
  29. package/dist/types/components/navigation/IonNav.d.ts +5 -0
  30. package/dist/types/components/navigation/IonTabBar.d.ts +15 -0
  31. package/dist/types/components/navigation/IonTabButton.d.ts +40 -0
  32. package/dist/types/components/navigation/IonTabs.d.ts +49 -0
  33. package/dist/types/components/navigation/IonTabsContext.d.ts +6 -0
  34. package/dist/types/components/proxies.d.ts +66 -0
  35. package/dist/types/components/react-component-lib/createComponent.d.ts +10 -0
  36. package/dist/types/components/react-component-lib/createOverlayComponent.d.ts +21 -0
  37. package/dist/types/components/react-component-lib/index.d.ts +2 -0
  38. package/dist/types/components/react-component-lib/interfaces.d.ts +29 -0
  39. package/dist/types/components/react-component-lib/utils/attachProps.d.ts +16 -0
  40. package/dist/types/components/react-component-lib/utils/case.d.ts +2 -0
  41. package/dist/types/components/react-component-lib/utils/dev.d.ts +2 -0
  42. package/dist/types/components/react-component-lib/utils/index.d.ts +10 -0
  43. package/dist/types/components/routing-proxies.d.ts +44 -0
  44. package/dist/types/components/utils/detachProps.d.ts +8 -0
  45. package/dist/types/components/utils/index.d.ts +8 -0
  46. package/dist/types/components/utils/ionRenderToString.d.ts +2 -0
  47. package/dist/types/contexts/IonContext.d.ts +7 -0
  48. package/dist/types/contexts/IonLifeCycleContext.d.ts +72 -0
  49. package/dist/types/contexts/NavContext.d.ts +17 -0
  50. package/dist/types/framework-delegate.d.ts +2 -0
  51. package/dist/types/hooks/HookOverlayOptions.d.ts +7 -0
  52. package/dist/types/hooks/__tests__/hooks.spec.d.ts +0 -0
  53. package/dist/types/hooks/useController.d.ts +12 -0
  54. package/dist/types/hooks/useIonActionSheet.d.ts +26 -0
  55. package/dist/types/hooks/useIonAlert.d.ts +26 -0
  56. package/dist/types/hooks/useIonLoading.d.ts +27 -0
  57. package/dist/types/hooks/useIonModal.d.ts +17 -0
  58. package/dist/types/hooks/useIonPicker.d.ts +26 -0
  59. package/dist/types/hooks/useIonPopover.d.ts +17 -0
  60. package/dist/types/hooks/useIonToast.d.ts +26 -0
  61. package/dist/types/hooks/useOverlay.d.ts +13 -0
  62. package/dist/types/index.d.ts +7 -0
  63. package/dist/types/lifecycle/IonLifeCycleHOC.d.ts +31 -0
  64. package/dist/types/lifecycle/hooks.d.ts +5 -0
  65. package/dist/types/lifecycle/index.d.ts +2 -0
  66. package/dist/types/models/ReactComponentOrElement.d.ts +2 -0
  67. package/dist/types/models/RouteAction.d.ts +1 -0
  68. package/dist/types/models/RouteInfo.d.ts +19 -0
  69. package/dist/types/models/RouterDirection.d.ts +1 -0
  70. package/dist/types/models/RouterOptions.d.ts +10 -0
  71. package/dist/types/models/index.d.ts +5 -0
  72. package/dist/types/routing/LocationHistory.d.ts +20 -0
  73. package/dist/types/routing/NavManager.d.ts +38 -0
  74. package/dist/types/routing/OutletPageManager.d.ts +26 -0
  75. package/dist/types/routing/PageManager.d.ts +25 -0
  76. package/dist/types/routing/RouteManagerContext.d.ts +16 -0
  77. package/dist/types/routing/StackContext.d.ts +7 -0
  78. package/dist/types/routing/ViewItem.d.ts +12 -0
  79. package/dist/types/routing/ViewLifeCycleManager.d.ts +42 -0
  80. package/dist/types/routing/ViewStacks.d.ts +19 -0
  81. package/dist/types/routing/__tests__/LocationHistory.spec.d.ts +1 -0
  82. package/dist/types/routing/index.d.ts +7 -0
  83. package/dist/types/utils/HTMLElementSSR.d.ts +4 -0
  84. package/dist/types/utils/generateId.d.ts +1 -0
  85. package/package.json +12 -5
  86. package/dist/components/CreateAnimation.js +0 -107
  87. package/dist/components/CreateAnimation.js.map +0 -7
  88. package/dist/components/IonActionSheet.js +0 -8
  89. package/dist/components/IonActionSheet.js.map +0 -7
  90. package/dist/components/IonAlert.js +0 -8
  91. package/dist/components/IonAlert.js.map +0 -7
  92. package/dist/components/IonApp.js +0 -42
  93. package/dist/components/IonApp.js.map +0 -7
  94. package/dist/components/IonIcon.js +0 -39
  95. package/dist/components/IonIcon.js.map +0 -7
  96. package/dist/components/IonLoading.js +0 -8
  97. package/dist/components/IonLoading.js.map +0 -7
  98. package/dist/components/IonModal.js +0 -9
  99. package/dist/components/IonModal.js.map +0 -7
  100. package/dist/components/IonOverlayManager.js +0 -29
  101. package/dist/components/IonOverlayManager.js.map +0 -7
  102. package/dist/components/IonPage.js +0 -31
  103. package/dist/components/IonPage.js.map +0 -7
  104. package/dist/components/IonPicker.js +0 -8
  105. package/dist/components/IonPicker.js.map +0 -7
  106. package/dist/components/IonPopover.js +0 -8
  107. package/dist/components/IonPopover.js.map +0 -7
  108. package/dist/components/IonRedirect.js +0 -19
  109. package/dist/components/IonRedirect.js.map +0 -7
  110. package/dist/components/IonRoute.js +0 -17
  111. package/dist/components/IonRoute.js.map +0 -7
  112. package/dist/components/IonRouterContext.js +0 -32
  113. package/dist/components/IonRouterContext.js.map +0 -7
  114. package/dist/components/IonRouterOutlet.js +0 -24
  115. package/dist/components/IonRouterOutlet.js.map +0 -7
  116. package/dist/components/IonToast.js +0 -8
  117. package/dist/components/IonToast.js.map +0 -7
  118. package/dist/components/IonicReactProps.js +0 -2
  119. package/dist/components/IonicReactProps.js.map +0 -7
  120. package/dist/components/__tests__/utils.spec.js +0 -50
  121. package/dist/components/__tests__/utils.spec.js.map +0 -7
  122. package/dist/components/createControllerComponent.js +0 -80
  123. package/dist/components/createControllerComponent.js.map +0 -7
  124. package/dist/components/createInlineOverlayComponent.js +0 -114
  125. package/dist/components/createInlineOverlayComponent.js.map +0 -7
  126. package/dist/components/createOverlayComponent.js +0 -88
  127. package/dist/components/createOverlayComponent.js.map +0 -7
  128. package/dist/components/createRoutingComponent.js +0 -79
  129. package/dist/components/createRoutingComponent.js.map +0 -7
  130. package/dist/components/hrefprops.js +0 -2
  131. package/dist/components/hrefprops.js.map +0 -7
  132. package/dist/components/index.js +0 -126
  133. package/dist/components/index.js.map +0 -7
  134. package/dist/components/inner-proxies.js +0 -30
  135. package/dist/components/inner-proxies.js.map +0 -7
  136. package/dist/components/navigation/IonBackButton.js +0 -31
  137. package/dist/components/navigation/IonBackButton.js.map +0 -7
  138. package/dist/components/navigation/IonNav.js +0 -21
  139. package/dist/components/navigation/IonNav.js.map +0 -7
  140. package/dist/components/navigation/IonTabBar.js +0 -173
  141. package/dist/components/navigation/IonTabBar.js.map +0 -7
  142. package/dist/components/navigation/IonTabButton.js +0 -30
  143. package/dist/components/navigation/IonTabButton.js.map +0 -7
  144. package/dist/components/navigation/IonTabs.js +0 -103
  145. package/dist/components/navigation/IonTabs.js.map +0 -7
  146. package/dist/components/navigation/IonTabsContext.js +0 -7
  147. package/dist/components/navigation/IonTabsContext.js.map +0 -7
  148. package/dist/components/proxies.js +0 -131
  149. package/dist/components/proxies.js.map +0 -7
  150. package/dist/components/react-component-lib/createComponent.js +0 -58
  151. package/dist/components/react-component-lib/createComponent.js.map +0 -7
  152. package/dist/components/react-component-lib/createOverlayComponent.js +0 -86
  153. package/dist/components/react-component-lib/createOverlayComponent.js.map +0 -7
  154. package/dist/components/react-component-lib/index.js +0 -4
  155. package/dist/components/react-component-lib/index.js.map +0 -7
  156. package/dist/components/react-component-lib/interfaces.js +0 -2
  157. package/dist/components/react-component-lib/interfaces.js.map +0 -7
  158. package/dist/components/react-component-lib/utils/attachProps.js +0 -92
  159. package/dist/components/react-component-lib/utils/attachProps.js.map +0 -7
  160. package/dist/components/react-component-lib/utils/case.js +0 -4
  161. package/dist/components/react-component-lib/utils/case.js.map +0 -7
  162. package/dist/components/react-component-lib/utils/dev.js +0 -14
  163. package/dist/components/react-component-lib/utils/dev.js.map +0 -7
  164. package/dist/components/react-component-lib/utils/index.js +0 -31
  165. package/dist/components/react-component-lib/utils/index.js.map +0 -7
  166. package/dist/components/routing-proxies.js +0 -29
  167. package/dist/components/routing-proxies.js.map +0 -7
  168. package/dist/components/utils/detachProps.js +0 -24
  169. package/dist/components/utils/detachProps.js.map +0 -7
  170. package/dist/components/utils/index.js +0 -26
  171. package/dist/components/utils/index.js.map +0 -7
  172. package/dist/components/utils/ionRenderToString.js +0 -36
  173. package/dist/components/utils/ionRenderToString.js.map +0 -7
  174. package/dist/contexts/IonContext.js +0 -11
  175. package/dist/contexts/IonContext.js.map +0 -7
  176. package/dist/contexts/IonLifeCycleContext.js +0 -185
  177. package/dist/contexts/IonLifeCycleContext.js.map +0 -7
  178. package/dist/contexts/NavContext.js +0 -36
  179. package/dist/contexts/NavContext.js.map +0 -7
  180. package/dist/framework-delegate.js +0 -30
  181. package/dist/framework-delegate.js.map +0 -7
  182. package/dist/hooks/HookOverlayOptions.js +0 -2
  183. package/dist/hooks/HookOverlayOptions.js.map +0 -7
  184. package/dist/hooks/__tests__/hooks.spec.js +0 -6
  185. package/dist/hooks/__tests__/hooks.spec.js.map +0 -7
  186. package/dist/hooks/useController.js +0 -45
  187. package/dist/hooks/useController.js.map +0 -7
  188. package/dist/hooks/useIonActionSheet.js +0 -27
  189. package/dist/hooks/useIonActionSheet.js.map +0 -7
  190. package/dist/hooks/useIonAlert.js +0 -23
  191. package/dist/hooks/useIonAlert.js.map +0 -7
  192. package/dist/hooks/useIonLoading.js +0 -28
  193. package/dist/hooks/useIonLoading.js.map +0 -7
  194. package/dist/hooks/useIonModal.js +0 -22
  195. package/dist/hooks/useIonModal.js.map +0 -7
  196. package/dist/hooks/useIonPicker.js +0 -27
  197. package/dist/hooks/useIonPicker.js.map +0 -7
  198. package/dist/hooks/useIonPopover.js +0 -22
  199. package/dist/hooks/useIonPopover.js.map +0 -7
  200. package/dist/hooks/useIonToast.js +0 -23
  201. package/dist/hooks/useIonToast.js.map +0 -7
  202. package/dist/hooks/useOverlay.js +0 -67
  203. package/dist/hooks/useOverlay.js.map +0 -7
  204. package/dist/lifecycle/IonLifeCycleHOC.js +0 -41
  205. package/dist/lifecycle/IonLifeCycleHOC.js.map +0 -7
  206. package/dist/lifecycle/hooks.js +0 -52
  207. package/dist/lifecycle/hooks.js.map +0 -7
  208. package/dist/lifecycle/index.js +0 -4
  209. package/dist/lifecycle/index.js.map +0 -7
  210. package/dist/models/ReactComponentOrElement.js +0 -2
  211. package/dist/models/ReactComponentOrElement.js.map +0 -7
  212. package/dist/models/RouteAction.js +0 -2
  213. package/dist/models/RouteAction.js.map +0 -7
  214. package/dist/models/RouteInfo.js +0 -2
  215. package/dist/models/RouteInfo.js.map +0 -7
  216. package/dist/models/RouterDirection.js +0 -2
  217. package/dist/models/RouterDirection.js.map +0 -7
  218. package/dist/models/RouterOptions.js +0 -2
  219. package/dist/models/RouterOptions.js.map +0 -7
  220. package/dist/models/index.js +0 -7
  221. package/dist/models/index.js.map +0 -7
  222. package/dist/routing/LocationHistory.js +0 -140
  223. package/dist/routing/LocationHistory.js.map +0 -7
  224. package/dist/routing/NavManager.js +0 -76
  225. package/dist/routing/NavManager.js.map +0 -7
  226. package/dist/routing/OutletPageManager.js +0 -69
  227. package/dist/routing/OutletPageManager.js.map +0 -7
  228. package/dist/routing/PageManager.js +0 -60
  229. package/dist/routing/PageManager.js.map +0 -7
  230. package/dist/routing/RouteManagerContext.js +0 -15
  231. package/dist/routing/RouteManagerContext.js.map +0 -7
  232. package/dist/routing/StackContext.js +0 -7
  233. package/dist/routing/StackContext.js.map +0 -7
  234. package/dist/routing/ViewItem.js +0 -2
  235. package/dist/routing/ViewItem.js.map +0 -7
  236. package/dist/routing/ViewLifeCycleManager.js +0 -36
  237. package/dist/routing/ViewLifeCycleManager.js.map +0 -7
  238. package/dist/routing/ViewStacks.js +0 -49
  239. package/dist/routing/ViewStacks.js.map +0 -7
  240. package/dist/routing/__tests__/LocationHistory.spec.js +0 -185
  241. package/dist/routing/__tests__/LocationHistory.spec.js.map +0 -7
  242. package/dist/routing/index.js +0 -9
  243. package/dist/routing/index.js.map +0 -7
  244. package/dist/utils/HTMLElementSSR.js +0 -4
  245. package/dist/utils/HTMLElementSSR.js.map +0 -7
  246. package/dist/utils/generateId.js +0 -8
  247. package/dist/utils/generateId.js.map +0 -7
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { IonLifeCycleContext } from '../contexts/IonLifeCycleContext';
3
+ export declare const withIonLifeCycle: (WrappedComponent: React.ComponentType<any>) => {
4
+ new (props: any): {
5
+ context: React.ContextType<typeof IonLifeCycleContext>;
6
+ componentRef: React.RefObject<any>;
7
+ componentDidMount(): void;
8
+ render(): JSX.Element;
9
+ setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
10
+ forceUpdate(callback?: (() => void) | undefined): void;
11
+ readonly props: Readonly<any> & Readonly<{
12
+ children?: React.ReactNode;
13
+ }>;
14
+ state: Readonly<any>;
15
+ refs: {
16
+ [key: string]: React.ReactInstance;
17
+ };
18
+ shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): boolean;
19
+ componentWillUnmount?(): void;
20
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
21
+ getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>): any;
22
+ componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<any>, snapshot?: any): void;
23
+ componentWillMount?(): void;
24
+ UNSAFE_componentWillMount?(): void;
25
+ componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
26
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
27
+ componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
28
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<any>, nextContext: any): void;
29
+ };
30
+ contextType?: React.Context<any> | undefined;
31
+ };
@@ -0,0 +1,5 @@
1
+ import type { LifeCycleCallback } from '../contexts/IonLifeCycleContext';
2
+ export declare const useIonViewWillEnter: (callback: LifeCycleCallback, deps?: any[]) => void;
3
+ export declare const useIonViewDidEnter: (callback: LifeCycleCallback, deps?: any[]) => void;
4
+ export declare const useIonViewWillLeave: (callback: LifeCycleCallback, deps?: any[]) => void;
5
+ export declare const useIonViewDidLeave: (callback: LifeCycleCallback, deps?: any[]) => void;
@@ -0,0 +1,2 @@
1
+ export { withIonLifeCycle } from './IonLifeCycleHOC';
2
+ export { useIonViewDidEnter, useIonViewDidLeave, useIonViewWillEnter, useIonViewWillLeave } from './hooks';
@@ -0,0 +1,2 @@
1
+ import type React from 'react';
2
+ export type ReactComponentOrElement = React.ComponentClass<any, any> | React.FC<any> | JSX.Element;
@@ -0,0 +1 @@
1
+ export type RouteAction = 'push' | 'replace' | 'pop';
@@ -0,0 +1,19 @@
1
+ import type { AnimationBuilder } from '@ionic/core/components';
2
+ import type { RouteAction } from './RouteAction';
3
+ import type { RouterDirection } from './RouterDirection';
4
+ export interface RouteInfo<TOptions = any> {
5
+ id: string;
6
+ lastPathname?: string;
7
+ prevRouteLastPathname?: string;
8
+ routeAction?: RouteAction;
9
+ routeDirection?: RouterDirection;
10
+ routeAnimation?: AnimationBuilder;
11
+ routeOptions?: TOptions;
12
+ params?: {
13
+ [key: string]: string | string[];
14
+ };
15
+ pushedByRoute?: string;
16
+ pathname: string;
17
+ search: string;
18
+ tab?: string;
19
+ }
@@ -0,0 +1 @@
1
+ export type RouterDirection = 'forward' | 'back' | 'root' | 'none';
@@ -0,0 +1,10 @@
1
+ export interface RouterOptions {
2
+ /**
3
+ * Optional - Used for routing frameworks that need an 'as' parameter for routing.
4
+ */
5
+ as?: string;
6
+ /**
7
+ * Optional - If the component should be unmounted after it is transitioned away from. Defaults to false.
8
+ */
9
+ unmount?: boolean;
10
+ }
@@ -0,0 +1,5 @@
1
+ export * from './RouteAction';
2
+ export * from './RouteInfo';
3
+ export * from './RouterDirection';
4
+ export * from './RouterOptions';
5
+ export * from './ReactComponentOrElement';
@@ -0,0 +1,20 @@
1
+ import type { RouteInfo } from '../models/RouteInfo';
2
+ export declare class LocationHistory {
3
+ private locationHistory;
4
+ private tabHistory;
5
+ add(routeInfo: RouteInfo): void;
6
+ clearTabStack(tab: string): void;
7
+ update(routeInfo: RouteInfo): void;
8
+ private _add;
9
+ private _areRoutesEqual;
10
+ private _pop;
11
+ private _replace;
12
+ private _clear;
13
+ private _getRouteInfosByKey;
14
+ getFirstRouteInfoForTab(tab: string): RouteInfo<any> | undefined;
15
+ getCurrentRouteInfoForTab(tab?: string): RouteInfo<any> | undefined;
16
+ findLastLocation(routeInfo: RouteInfo): RouteInfo<any> | undefined;
17
+ previous(): RouteInfo<any>;
18
+ current(): RouteInfo<any>;
19
+ canGoBack(): boolean;
20
+ }
@@ -0,0 +1,38 @@
1
+ import type { AnimationBuilder } from '@ionic/core/components';
2
+ import React from 'react';
3
+ import type { IonRouterContextState } from '../components/IonRouterContext';
4
+ import type { NavContextState } from '../contexts/NavContext';
5
+ import type { RouteAction } from '../models/RouteAction';
6
+ import type { RouteInfo } from '../models/RouteInfo';
7
+ import type { RouterDirection } from '../models/RouterDirection';
8
+ import type { LocationHistory } from './LocationHistory';
9
+ import PageManager from './PageManager';
10
+ interface NavManagerProps {
11
+ routeInfo: RouteInfo;
12
+ onNativeBack: () => void;
13
+ onNavigateBack: (route?: string | RouteInfo, animationBuilder?: AnimationBuilder) => void;
14
+ onNavigate: (path: string, action: RouteAction, direction?: RouterDirection, animationBuilder?: AnimationBuilder, options?: any, tab?: string) => void;
15
+ onSetCurrentTab: (tab: string, routeInfo: RouteInfo) => void;
16
+ onChangeTab: (tab: string, path: string, routeOptions?: any) => void;
17
+ onResetTab: (tab: string, path: string, routeOptions?: any) => void;
18
+ ionRedirect: any;
19
+ ionRoute: any;
20
+ stackManager: any;
21
+ locationHistory: LocationHistory;
22
+ }
23
+ export declare class NavManager extends React.PureComponent<NavManagerProps, NavContextState> {
24
+ ionRouterContextValue: IonRouterContextState;
25
+ constructor(props: NavManagerProps);
26
+ componentDidMount(): void;
27
+ componentWillUnmount(): void;
28
+ handleHardwareBackButton(e: any): void;
29
+ goBack(route?: string | RouteInfo, animationBuilder?: AnimationBuilder): void;
30
+ nativeGoBack(): void;
31
+ navigate(path: string, direction?: RouterDirection, action?: RouteAction, animationBuilder?: AnimationBuilder, options?: any, tab?: string): void;
32
+ getPageManager(): typeof PageManager;
33
+ getIonRedirect(): any;
34
+ getIonRoute(): any;
35
+ getStackManager(): any;
36
+ render(): JSX.Element;
37
+ }
38
+ export {};
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { IonLifeCycleContext } from '../contexts/IonLifeCycleContext';
3
+ import type { RouteInfo } from '../models';
4
+ import { StackContext } from './StackContext';
5
+ interface OutletPageManagerProps {
6
+ className?: string;
7
+ forwardedRef?: React.ForwardedRef<HTMLIonRouterOutletElement>;
8
+ routeInfo?: RouteInfo;
9
+ StackManager: any;
10
+ }
11
+ export declare class OutletPageManager extends React.Component<OutletPageManagerProps> {
12
+ ionLifeCycleContext: React.ContextType<typeof IonLifeCycleContext>;
13
+ context: React.ContextType<typeof StackContext>;
14
+ ionRouterOutlet: HTMLIonRouterOutletElement | undefined;
15
+ outletIsReady: boolean;
16
+ constructor(props: OutletPageManagerProps);
17
+ componentDidMount(): void;
18
+ componentWillUnmount(): void;
19
+ ionViewWillEnterHandler(): void;
20
+ ionViewDidEnterHandler(): void;
21
+ ionViewWillLeaveHandler(): void;
22
+ ionViewDidLeaveHandler(): void;
23
+ render(): JSX.Element;
24
+ static get contextType(): React.Context<import("./StackContext").StackContextState>;
25
+ }
26
+ export default OutletPageManager;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { IonLifeCycleContext } from '../contexts/IonLifeCycleContext';
3
+ import type { RouteInfo } from '../models';
4
+ import { StackContext } from './StackContext';
5
+ interface PageManagerProps {
6
+ className?: string;
7
+ forwardedRef?: React.ForwardedRef<HTMLDivElement>;
8
+ routeInfo?: RouteInfo;
9
+ }
10
+ export declare class PageManager extends React.PureComponent<PageManagerProps> {
11
+ ionLifeCycleContext: React.ContextType<typeof IonLifeCycleContext>;
12
+ context: React.ContextType<typeof StackContext>;
13
+ ionPageElementRef: React.RefObject<HTMLDivElement>;
14
+ stableMergedRefs: React.RefCallback<HTMLDivElement>;
15
+ constructor(props: PageManagerProps);
16
+ componentDidMount(): void;
17
+ componentWillUnmount(): void;
18
+ ionViewWillEnterHandler(): void;
19
+ ionViewDidEnterHandler(): void;
20
+ ionViewWillLeaveHandler(): void;
21
+ ionViewDidLeaveHandler(): void;
22
+ render(): JSX.Element;
23
+ static get contextType(): React.Context<import("./StackContext").StackContextState>;
24
+ }
25
+ export default PageManager;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { RouteInfo } from '../models/RouteInfo';
3
+ import type { ViewItem } from './ViewItem';
4
+ export interface RouteManagerContextState {
5
+ addViewItem: (viewItem: ViewItem) => void;
6
+ canGoBack: () => boolean;
7
+ clearOutlet: (outletId: string) => void;
8
+ createViewItem: (outletId: string, reactElement: React.ReactElement, routeInfo: RouteInfo, page?: HTMLElement) => ViewItem;
9
+ findViewItemByPathname(pathname: string, outletId?: string): ViewItem | undefined;
10
+ findLeavingViewItemByRouteInfo: (routeInfo: RouteInfo, outletId?: string) => ViewItem | undefined;
11
+ findViewItemByRouteInfo: (routeInfo: RouteInfo, outletId?: string, updateMatch?: boolean) => ViewItem | undefined;
12
+ getChildrenToRender: (outletId: string, ionRouterOutlet: React.ReactElement, routeInfo: RouteInfo, reRender: () => void) => React.ReactNode[];
13
+ goBack: () => void;
14
+ unMountViewItem: (viewItem: ViewItem) => void;
15
+ }
16
+ export declare const RouteManagerContext: React.Context<RouteManagerContextState>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { RouteInfo } from '../models/RouteInfo';
3
+ export interface StackContextState {
4
+ registerIonPage: (page: HTMLElement, routeInfo: RouteInfo) => void;
5
+ isInOutlet: () => boolean;
6
+ }
7
+ export declare const StackContext: React.Context<StackContextState>;
@@ -0,0 +1,12 @@
1
+ import type { ReactElement } from 'react';
2
+ export interface ViewItem<T = any> {
3
+ id: string;
4
+ reactElement: ReactElement;
5
+ ionPageElement?: HTMLElement | undefined;
6
+ ionRoute?: boolean;
7
+ mount: boolean;
8
+ routeData?: T;
9
+ transitionHtml?: string;
10
+ outletId: string;
11
+ disableIonPageManagement?: boolean;
12
+ }
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ interface ViewTransitionManagerProps {
3
+ removeView: () => void;
4
+ mount: boolean;
5
+ }
6
+ interface ViewTransitionManagerState {
7
+ show: boolean;
8
+ }
9
+ export declare class ViewLifeCycleManager extends React.Component<ViewTransitionManagerProps, ViewTransitionManagerState> {
10
+ ionLifeCycleContext: {
11
+ ionViewWillEnterCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleCallback[];
12
+ ionViewDidEnterCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleCallback[];
13
+ ionViewWillLeaveCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleCallback[];
14
+ ionViewDidLeaveCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleCallback[];
15
+ componentCanBeDestroyedCallback?: (() => void) | undefined;
16
+ ionViewWillEnterDestructorCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleDestructor[];
17
+ ionViewDidEnterDestructorCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleDestructor[];
18
+ ionViewWillLeaveDestructorCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleDestructor[];
19
+ ionViewDidLeaveDestructorCallbacks: import("../contexts/IonLifeCycleContext").LifeCycleDestructor[];
20
+ onIonViewWillEnter(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
21
+ teardownCallback(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback, callbacks: any[]): void;
22
+ cleanupIonViewWillEnter(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
23
+ cleanupIonViewDidEnter(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
24
+ cleanupIonViewWillLeave(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
25
+ cleanupIonViewDidLeave(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
26
+ ionViewWillEnter(): void;
27
+ onIonViewDidEnter(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
28
+ ionViewDidEnter(): void;
29
+ onIonViewWillLeave(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
30
+ ionViewWillLeave(): void;
31
+ onIonViewDidLeave(callback: import("../contexts/IonLifeCycleContext").LifeCycleCallback): void;
32
+ ionViewDidLeave(): void;
33
+ onComponentCanBeDestroyed(callback: () => void): void;
34
+ componentCanBeDestroyed(): void;
35
+ };
36
+ private _isMounted;
37
+ constructor(props: ViewTransitionManagerProps);
38
+ componentDidMount(): void;
39
+ componentWillUnmount(): void;
40
+ render(): JSX.Element;
41
+ }
42
+ export {};
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="react" />
3
+ import type { RouteInfo } from '../models/RouteInfo';
4
+ import type { ViewItem } from './ViewItem';
5
+ export declare abstract class ViewStacks {
6
+ private viewStacks;
7
+ constructor();
8
+ add(viewItem: ViewItem): void;
9
+ clear(outletId: string): NodeJS.Timeout;
10
+ getViewItemsForOutlet(outletId: string): ViewItem<any>[];
11
+ remove(viewItem: ViewItem): void;
12
+ protected getStackIds(): string[];
13
+ protected getAllViewItems(): ViewItem<any>[];
14
+ abstract createViewItem(outletId: string, reactElement: React.ReactElement, routeInfo: RouteInfo, page?: HTMLElement): ViewItem;
15
+ abstract findViewItemByPathname(pathname: string, outletId?: string): ViewItem | undefined;
16
+ abstract findViewItemByRouteInfo(routeInfo: RouteInfo, outletId?: string, updateMatch?: boolean): ViewItem | undefined;
17
+ abstract findLeavingViewItemByRouteInfo(routeInfo: RouteInfo, outletId?: string): ViewItem | undefined;
18
+ abstract getChildrenToRender(outletId: string, ionRouterOutlet: React.ReactElement, routeInfo: RouteInfo, reRender: () => void, setInTransition: () => void): React.ReactNode[];
19
+ }
@@ -0,0 +1,7 @@
1
+ export * from './RouteManagerContext';
2
+ export * from './ViewLifeCycleManager';
3
+ export * from './LocationHistory';
4
+ export * from './NavManager';
5
+ export * from './ViewItem';
6
+ export * from './StackContext';
7
+ export * from './ViewStacks';
@@ -0,0 +1,4 @@
1
+ export declare const HTMLElementSSR: {
2
+ new (): HTMLElement;
3
+ prototype: HTMLElement;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const generateId: (type?: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/react",
3
- "version": "7.5.3-dev.11698858201.14165f23",
3
+ "version": "7.5.3-dev.11699994454.1cbf1283",
4
4
  "description": "React specific wrapper for @ionic/core",
5
5
  "keywords": [
6
6
  "ionic",
@@ -20,15 +20,18 @@
20
20
  "url": "git+https://github.com/ionic-team/ionic-framework.git"
21
21
  },
22
22
  "scripts": {
23
- "build": "npm run copy && npm run compile",
24
- "compile": "node ./esbuild.mjs",
23
+ "build": "npm run clean && npm run copy && npm run compile",
24
+ "clean": "rimraf dist && rimraf dist-transpiled && rimraf routing",
25
+ "compile": "npm run tsc && rollup -c",
25
26
  "eslint": "eslint src",
26
27
  "prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
27
28
  "release": "np --any-branch --yolo --no-release-draft",
28
29
  "lint": "npm run eslint && npm run prettier -- --write --cache",
29
30
  "lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
31
+ "tsc": "tsc -p .",
30
32
  "copy": "node scripts/copy.js",
31
33
  "test.spec": "jest --ci",
34
+ "test.treeshake": "node scripts/treeshaking.js dist/index.esm.js",
32
35
  "sync": "sh ./scripts/sync.sh"
33
36
  },
34
37
  "main": "dist/index.js",
@@ -38,7 +41,7 @@
38
41
  "css/"
39
42
  ],
40
43
  "dependencies": {
41
- "@ionic/core": "7.5.3-dev.11698858201.14165f23",
44
+ "@ionic/core": "7.5.3-dev.11699994454.1cbf1283",
42
45
  "ionicons": "^7.0.0",
43
46
  "tslib": "*"
44
47
  },
@@ -49,6 +52,8 @@
49
52
  "devDependencies": {
50
53
  "@ionic/eslint-config": "^0.3.0",
51
54
  "@ionic/prettier-config": "^2.0.0",
55
+ "@rollup/plugin-node-resolve": "^8.1.0",
56
+ "@rollup/plugin-virtual": "^2.0.3",
52
57
  "@testing-library/jest-dom": "^5.11.6",
53
58
  "@testing-library/react": "^11.2.2",
54
59
  "@testing-library/react-hooks": "^7.0.1",
@@ -58,7 +63,6 @@
58
63
  "@types/react-dom": "^16.9.0",
59
64
  "@typescript-eslint/eslint-plugin": "^5.48.2",
60
65
  "@typescript-eslint/parser": "^5.48.2",
61
- "esbuild": "^0.19.5",
62
66
  "eslint": "^7.32.0",
63
67
  "fs-extra": "^9.0.1",
64
68
  "jest": "^26.6.3",
@@ -66,6 +70,9 @@
66
70
  "prettier": "^2.8.3",
67
71
  "react": "^16.9.0",
68
72
  "react-dom": "^16.9.0",
73
+ "rimraf": "^3.0.2",
74
+ "rollup": "^2.26.4",
75
+ "rollup-plugin-sourcemaps": "^0.6.2",
69
76
  "ts-jest": "^26.4.4",
70
77
  "typescript": "^4.0.5"
71
78
  },
@@ -1,107 +0,0 @@
1
- "use strict";
2
- import { createAnimation } from "@ionic/core/components";
3
- import React from "react";
4
- export class CreateAnimation extends React.PureComponent {
5
- constructor(props) {
6
- super(props);
7
- this.nodes = /* @__PURE__ */ new Map();
8
- this.animation = createAnimation(props.id);
9
- }
10
- setupAnimation(props) {
11
- const animation = this.animation;
12
- if (this.nodes.size > 0) {
13
- animation.addElement(Array.from(this.nodes.values()));
14
- }
15
- checkConfig(animation, props);
16
- checkPlayback(animation, props);
17
- }
18
- componentDidMount() {
19
- const props = this.props;
20
- this.setupAnimation(props);
21
- }
22
- componentDidUpdate(prevProps) {
23
- const animation = this.animation;
24
- const props = this.props;
25
- checkConfig(animation, props, prevProps);
26
- checkProgress(animation, props, prevProps);
27
- checkPlayback(animation, props, prevProps);
28
- }
29
- render() {
30
- const { children } = this.props;
31
- return /* @__PURE__ */ React.createElement(React.Fragment, null, React.Children.map(
32
- children,
33
- (child, id) => React.cloneElement(child, { ref: (el) => this.nodes.set(id, el) })
34
- ));
35
- }
36
- }
37
- const checkConfig = (animation, currentProps = {}, prevProps = {}) => {
38
- const reservedProps = [
39
- "children",
40
- "progressStart",
41
- "progressStep",
42
- "progressEnd",
43
- "pause",
44
- "stop",
45
- "destroy",
46
- "play",
47
- "from",
48
- "to",
49
- "fromTo",
50
- "onFinish"
51
- ];
52
- for (const key in currentProps) {
53
- if (
54
- // eslint-disable-next-line no-prototype-builtins
55
- currentProps.hasOwnProperty(key) && !reservedProps.includes(key) && currentProps[key] !== prevProps[key]
56
- ) {
57
- animation[key](currentProps[key]);
58
- }
59
- }
60
- const fromValues = currentProps.from;
61
- if (fromValues && fromValues !== prevProps.from) {
62
- const values = Array.isArray(fromValues) ? fromValues : [fromValues];
63
- values.forEach((val) => animation.from(val.property, val.value));
64
- }
65
- const toValues = currentProps.to;
66
- if (toValues && toValues !== prevProps.to) {
67
- const values = Array.isArray(toValues) ? toValues : [toValues];
68
- values.forEach((val) => animation.to(val.property, val.value));
69
- }
70
- const fromToValues = currentProps.fromTo;
71
- if (fromToValues && fromToValues !== prevProps.fromTo) {
72
- const values = Array.isArray(fromToValues) ? fromToValues : [fromToValues];
73
- values.forEach((val) => animation.fromTo(val.property, val.fromValue, val.toValue));
74
- }
75
- const onFinishValues = currentProps.onFinish;
76
- if (onFinishValues && onFinishValues !== prevProps.onFinish) {
77
- const values = Array.isArray(onFinishValues) ? onFinishValues : [onFinishValues];
78
- values.forEach((val) => animation.onFinish(val.callback, val.opts));
79
- }
80
- };
81
- const checkProgress = (animation, currentProps = {}, prevProps = {}) => {
82
- const { progressStart, progressStep, progressEnd } = currentProps;
83
- if (progressStart && (prevProps.progressStart?.forceLinearEasing !== progressStart?.forceLinearEasing || prevProps.progressStart?.step !== progressStart?.step)) {
84
- animation.progressStart(progressStart.forceLinearEasing, progressStart.step);
85
- }
86
- if (progressStep && prevProps.progressStep?.step !== progressStep?.step) {
87
- animation.progressStep(progressStep.step);
88
- }
89
- if (progressEnd && (prevProps.progressEnd?.playTo !== progressEnd?.playTo || prevProps.progressEnd?.step !== progressEnd?.step || prevProps?.dur !== progressEnd?.dur)) {
90
- animation.progressEnd(progressEnd.playTo, progressEnd.step, progressEnd.dur);
91
- }
92
- };
93
- const checkPlayback = (animation, currentProps = {}, prevProps = {}) => {
94
- if (!prevProps.play && currentProps.play) {
95
- animation.play();
96
- }
97
- if (!prevProps.pause && currentProps.pause) {
98
- animation.pause();
99
- }
100
- if (!prevProps.stop && currentProps.stop) {
101
- animation.stop();
102
- }
103
- if (!prevProps.destroy && currentProps.destroy) {
104
- animation.destroy();
105
- }
106
- };
107
- //# sourceMappingURL=CreateAnimation.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/CreateAnimation.tsx"],
4
- "sourcesContent": ["import type {\n Animation,\n AnimationCallbackOptions,\n AnimationDirection,\n AnimationFill,\n AnimationKeyFrames,\n AnimationLifecycle,\n} from '@ionic/core/components';\nimport { createAnimation } from '@ionic/core/components';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\n// TODO(FW-2959): types\n\ninterface PartialPropertyValue {\n property: string;\n value: any;\n}\ninterface PropertyValue {\n property: string;\n fromValue: any;\n toValue: any;\n}\n\nexport interface CreateAnimationProps {\n delay?: number;\n direction?: AnimationDirection;\n duration?: number;\n easing?: string;\n fill?: AnimationFill;\n iterations?: number;\n id?: string;\n\n afterAddRead?: () => void;\n afterAddWrite?: () => void;\n afterClearStyles?: string[];\n afterStyles?: { [property: string]: any };\n afterAddClass?: string | string[];\n afterRemoveClass?: string | string[];\n\n beforeAddRead?: () => void;\n beforeAddWrite?: () => void;\n beforeClearStyles?: string[];\n beforeStyles?: { [property: string]: any };\n beforeAddClass?: string | string[];\n beforeRemoveClass?: string | string[];\n\n onFinish?: { callback: AnimationLifecycle; opts?: AnimationCallbackOptions };\n\n keyframes?: AnimationKeyFrames;\n from?: PartialPropertyValue[] | PartialPropertyValue;\n to?: PartialPropertyValue[] | PartialPropertyValue;\n fromTo?: PropertyValue[] | PropertyValue;\n\n play?: boolean;\n pause?: boolean;\n stop?: boolean;\n destroy?: boolean;\n\n progressStart?: { forceLinearEasing: boolean; step?: number };\n progressStep?: { step: number };\n progressEnd?: { playTo: 0 | 1 | undefined; step: number; dur?: number };\n}\n\nexport class CreateAnimation extends React.PureComponent<PropsWithChildren<CreateAnimationProps>> {\n nodes: Map<number, HTMLElement> = new Map();\n animation: Animation;\n\n constructor(props: any) {\n super(props);\n\n this.animation = createAnimation(props.id);\n }\n\n setupAnimation(props: any) {\n const animation = this.animation;\n\n if (this.nodes.size > 0) {\n animation.addElement(Array.from(this.nodes.values()));\n }\n\n checkConfig(animation, props);\n checkPlayback(animation, props);\n }\n\n componentDidMount() {\n const props = this.props;\n this.setupAnimation(props);\n }\n\n componentDidUpdate(prevProps: any) {\n const animation = this.animation;\n\n const props = this.props;\n\n checkConfig(animation, props, prevProps);\n checkProgress(animation, props, prevProps);\n checkPlayback(animation, props, prevProps);\n }\n\n render() {\n const { children } = this.props;\n return (\n <>\n {React.Children.map(children, (child, id) =>\n React.cloneElement(child as any, { ref: (el: any) => this.nodes.set(id, el) })\n )}\n </>\n );\n }\n}\n\nconst checkConfig = (animation: Animation, currentProps: any = {}, prevProps: any = {}) => {\n const reservedProps = [\n 'children',\n 'progressStart',\n 'progressStep',\n 'progressEnd',\n 'pause',\n 'stop',\n 'destroy',\n 'play',\n 'from',\n 'to',\n 'fromTo',\n 'onFinish',\n ];\n for (const key in currentProps) {\n if (\n // eslint-disable-next-line no-prototype-builtins\n currentProps.hasOwnProperty(key) &&\n !reservedProps.includes(key) &&\n currentProps[key] !== prevProps[key]\n ) {\n (animation as any)[key]((currentProps as any)[key]);\n }\n }\n\n const fromValues = currentProps.from;\n if (fromValues && fromValues !== prevProps.from) {\n const values = Array.isArray(fromValues) ? fromValues : [fromValues];\n values.forEach((val) => animation.from(val.property, val.value));\n }\n\n const toValues = currentProps.to;\n if (toValues && toValues !== prevProps.to) {\n const values = Array.isArray(toValues) ? toValues : [toValues];\n values.forEach((val) => animation.to(val.property, val.value));\n }\n\n const fromToValues = currentProps.fromTo;\n if (fromToValues && fromToValues !== prevProps.fromTo) {\n const values = Array.isArray(fromToValues) ? fromToValues : [fromToValues];\n values.forEach((val) => animation.fromTo(val.property, val.fromValue, val.toValue));\n }\n\n const onFinishValues = currentProps.onFinish;\n if (onFinishValues && onFinishValues !== prevProps.onFinish) {\n const values = Array.isArray(onFinishValues) ? onFinishValues : [onFinishValues];\n values.forEach((val) => animation.onFinish(val.callback, val.opts));\n }\n};\n\nconst checkProgress = (animation: Animation, currentProps: any = {}, prevProps: any = {}) => {\n const { progressStart, progressStep, progressEnd } = currentProps;\n\n if (\n progressStart &&\n (prevProps.progressStart?.forceLinearEasing !== progressStart?.forceLinearEasing ||\n prevProps.progressStart?.step !== progressStart?.step)\n ) {\n animation.progressStart(progressStart.forceLinearEasing, progressStart.step);\n }\n\n if (progressStep && prevProps.progressStep?.step !== progressStep?.step) {\n animation.progressStep(progressStep.step);\n }\n\n if (\n progressEnd &&\n (prevProps.progressEnd?.playTo !== progressEnd?.playTo ||\n prevProps.progressEnd?.step !== progressEnd?.step ||\n prevProps?.dur !== progressEnd?.dur)\n ) {\n animation.progressEnd(progressEnd.playTo, progressEnd.step, progressEnd.dur);\n }\n};\n\nconst checkPlayback = (animation: Animation, currentProps: any = {}, prevProps: any = {}) => {\n if (!prevProps.play && currentProps.play) {\n animation.play();\n }\n\n if (!prevProps.pause && currentProps.pause) {\n animation.pause();\n }\n\n if (!prevProps.stop && currentProps.stop) {\n animation.stop();\n }\n\n if (!prevProps.destroy && currentProps.destroy) {\n animation.destroy();\n }\n};\n"],
5
- "mappings": "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",
6
- "names": []
7
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- import { defineCustomElement } from "@ionic/core/components/ion-action-sheet.js";
3
- import { createInlineOverlayComponent } from "./createInlineOverlayComponent";
4
- export const IonActionSheet = /* @__PURE__ */ createInlineOverlayComponent(
5
- "ion-action-sheet",
6
- defineCustomElement
7
- );
8
- //# sourceMappingURL=IonActionSheet.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/IonActionSheet.tsx"],
4
- "sourcesContent": ["import type { JSX } from '@ionic/core/components';\nimport { defineCustomElement } from '@ionic/core/components/ion-action-sheet.js';\n\nimport { createInlineOverlayComponent } from './createInlineOverlayComponent';\n\nexport const IonActionSheet = /*@__PURE__*/ createInlineOverlayComponent<JSX.IonActionSheet, HTMLIonActionSheetElement>(\n 'ion-action-sheet',\n defineCustomElement\n);\n"],
5
- "mappings": ";AACA,SAAS,2BAA2B;AAEpC,SAAS,oCAAoC;AAEtC,aAAM,iBAA+B;AAAA,EAC1C;AAAA,EACA;AACF;",
6
- "names": []
7
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- import { defineCustomElement } from "@ionic/core/components/ion-alert.js";
3
- import { createInlineOverlayComponent } from "./createInlineOverlayComponent";
4
- export const IonAlert = /* @__PURE__ */ createInlineOverlayComponent(
5
- "ion-alert",
6
- defineCustomElement
7
- );
8
- //# sourceMappingURL=IonAlert.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/IonAlert.tsx"],
4
- "sourcesContent": ["import type { JSX } from '@ionic/core/components';\nimport { defineCustomElement } from '@ionic/core/components/ion-alert.js';\n\nimport { createInlineOverlayComponent } from './createInlineOverlayComponent';\n\nexport const IonAlert = /*@__PURE__*/ createInlineOverlayComponent<JSX.IonAlert, HTMLIonAlertElement>(\n 'ion-alert',\n defineCustomElement\n);\n"],
5
- "mappings": ";AACA,SAAS,2BAA2B;AAEpC,SAAS,oCAAoC;AAEtC,aAAM,WAAyB;AAAA,EACpC;AAAA,EACA;AACF;",
6
- "names": []
7
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- import React from "react";
3
- import { IonContext } from "../contexts/IonContext";
4
- import { IonOverlayManager } from "./IonOverlayManager";
5
- import { IonAppInner } from "./inner-proxies";
6
- export const IonApp = /* @__PURE__ */ (() => class extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- /*
10
- Wire up methods to call into IonOverlayManager
11
- */
12
- this.ionContext = {
13
- addOverlay: (id, overlay, containerElement) => {
14
- if (this.addOverlayCallback) {
15
- this.addOverlayCallback(id, overlay, containerElement);
16
- }
17
- },
18
- removeOverlay: (id) => {
19
- if (this.removeOverlayCallback) {
20
- this.removeOverlayCallback(id);
21
- }
22
- }
23
- };
24
- }
25
- render() {
26
- return /* @__PURE__ */ React.createElement(IonContext.Provider, { value: this.ionContext }, /* @__PURE__ */ React.createElement(IonAppInner, { ...this.props }, this.props.children), /* @__PURE__ */ React.createElement(
27
- IonOverlayManager,
28
- {
29
- onAddOverlay: (callback) => {
30
- this.addOverlayCallback = callback;
31
- },
32
- onRemoveOverlay: (callback) => {
33
- this.removeOverlayCallback = callback;
34
- }
35
- }
36
- ));
37
- }
38
- static get displayName() {
39
- return "IonApp";
40
- }
41
- })();
42
- //# sourceMappingURL=IonApp.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/IonApp.tsx"],
4
- "sourcesContent": ["import type { JSX as LocalJSX } from '@ionic/core/components';\nimport React from 'react';\n\nimport type { IonContextInterface } from '../contexts/IonContext';\nimport { IonContext } from '../contexts/IonContext';\nimport type { ReactComponentOrElement } from '../models';\n\nimport { IonOverlayManager } from './IonOverlayManager';\nimport type { IonicReactProps } from './IonicReactProps';\nimport { IonAppInner } from './inner-proxies';\n\ntype Props = LocalJSX.IonApp &\n IonicReactProps & {\n ref?: React.Ref<HTMLIonAppElement>;\n };\n\nexport const IonApp = /*@__PURE__*/ (() =>\n class extends React.Component<Props> {\n addOverlayCallback?: (id: string, overlay: ReactComponentOrElement, containerElement: HTMLDivElement) => void;\n removeOverlayCallback?: (id: string) => void;\n\n constructor(props: Props) {\n super(props);\n }\n\n /*\n Wire up methods to call into IonOverlayManager\n */\n ionContext: IonContextInterface = {\n addOverlay: (id: string, overlay: ReactComponentOrElement, containerElement: HTMLDivElement) => {\n if (this.addOverlayCallback) {\n this.addOverlayCallback(id, overlay, containerElement);\n }\n },\n removeOverlay: (id: string) => {\n if (this.removeOverlayCallback) {\n this.removeOverlayCallback(id);\n }\n },\n };\n\n render() {\n return (\n <IonContext.Provider value={this.ionContext}>\n <IonAppInner {...this.props}>{this.props.children}</IonAppInner>\n <IonOverlayManager\n onAddOverlay={(callback) => {\n this.addOverlayCallback = callback;\n }}\n onRemoveOverlay={(callback) => {\n this.removeOverlayCallback = callback;\n }}\n />\n </IonContext.Provider>\n );\n }\n\n static get displayName() {\n return 'IonApp';\n }\n })();\n"],
5
- "mappings": ";AACA,OAAO,WAAW;AAGlB,SAAS,kBAAkB;AAG3B,SAAS,yBAAyB;AAElC,SAAS,mBAAmB;AAOrB,aAAM,SAAwB,uBACnC,cAAc,MAAM,UAAiB;AAAA,EAInC,YAAY,OAAc;AACxB,UAAM,KAAK;AAMb;AAAA;AAAA;AAAA,sBAAkC;AAAA,MAChC,YAAY,CAAC,IAAY,SAAkC,qBAAqC;AAC9F,YAAI,KAAK,oBAAoB;AAC3B,eAAK,mBAAmB,IAAI,SAAS,gBAAgB;AAAA,QACvD;AAAA,MACF;AAAA,MACA,eAAe,CAAC,OAAe;AAC7B,YAAI,KAAK,uBAAuB;AAC9B,eAAK,sBAAsB,EAAE;AAAA,QAC/B;AAAA,MACF;AAAA,IACF;AAAA,EAhBA;AAAA,EAkBA,SAAS;AACP,WACE,oCAAC,WAAW,UAAX,EAAoB,OAAO,KAAK,cAC/B,oCAAC,eAAa,GAAG,KAAK,SAAQ,KAAK,MAAM,QAAS,GAClD;AAAA,MAAC;AAAA;AAAA,QACC,cAAc,CAAC,aAAa;AAC1B,eAAK,qBAAqB;AAAA,QAC5B;AAAA,QACA,iBAAiB,CAAC,aAAa;AAC7B,eAAK,wBAAwB;AAAA,QAC/B;AAAA;AAAA,IACF,CACF;AAAA,EAEJ;AAAA,EAEA,WAAW,cAAc;AACvB,WAAO;AAAA,EACT;AACF,GAAG;",
6
- "names": []
7
- }