@admin-layout/gluestack-ui-mobile 6.5.1-alpha.0
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/CHANGELOG.md +117 -0
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/assets/logo.png +0 -0
- package/babel.config.js +26 -0
- package/jest-react-navigation-setup.js +14 -0
- package/jest.config.js +39 -0
- package/jest.env.js +2 -0
- package/lib/__tests__/prolayout-layout-feature.test.d.ts +1 -0
- package/lib/__tests__/prolayout-layout-feature.test.js +202 -0
- package/lib/__tests__/prolayout-layout-feature.test.js.map +1 -0
- package/lib/components/ApplicationErrorFillWrapper.d.ts +2 -0
- package/lib/components/ApplicationErrorFillWrapper.js +7 -0
- package/lib/components/ApplicationErrorFillWrapper.js.map +1 -0
- package/lib/components/ApplicationErrorHandler.d.ts +2 -0
- package/lib/components/ApplicationErrorHandler.js +24 -0
- package/lib/components/ApplicationErrorHandler.js.map +1 -0
- package/lib/components/ErrorBounday.d.ts +18 -0
- package/lib/components/ErrorBounday.js +22 -0
- package/lib/components/ErrorBounday.js.map +1 -0
- package/lib/components/Fallback.d.ts +6 -0
- package/lib/components/Fallback.js +53 -0
- package/lib/components/Fallback.js.map +1 -0
- package/lib/components/Layout/components/BasicLayout.d.ts +5 -0
- package/lib/components/Layout/components/BasicLayout.js +28 -0
- package/lib/components/Layout/components/BasicLayout.js.map +1 -0
- package/lib/components/Layout/components/BottomTabBar.d.ts +2 -0
- package/lib/components/Layout/components/BottomTabBar.js +90 -0
- package/lib/components/Layout/components/BottomTabBar.js.map +1 -0
- package/lib/components/Layout/components/Drawer.d.ts +2 -0
- package/lib/components/Layout/components/Drawer.js +253 -0
- package/lib/components/Layout/components/Drawer.js.map +1 -0
- package/lib/components/Layout/components/Header.d.ts +2 -0
- package/lib/components/Layout/components/Header.js +130 -0
- package/lib/components/Layout/components/Header.js.map +1 -0
- package/lib/components/Layout/components/Sample.d.ts +2 -0
- package/lib/components/Layout/components/Sample.js +7 -0
- package/lib/components/Layout/components/Sample.js.map +1 -0
- package/lib/components/Layout/components/SettingDrawer/LayoutButton.d.ts +3 -0
- package/lib/components/Layout/components/SettingDrawer/LayoutButton.js +66 -0
- package/lib/components/Layout/components/SettingDrawer/LayoutButton.js.map +1 -0
- package/lib/components/Layout/components/SettingDrawer/SettingDrawer.d.ts +2 -0
- package/lib/components/Layout/components/SettingDrawer/SettingDrawer.js +23 -0
- package/lib/components/Layout/components/SettingDrawer/SettingDrawer.js.map +1 -0
- package/lib/components/Layout/components/SettingDrawer/ThemeColorButton.d.ts +3 -0
- package/lib/components/Layout/components/SettingDrawer/ThemeColorButton.js +24 -0
- package/lib/components/Layout/components/SettingDrawer/ThemeColorButton.js.map +1 -0
- package/lib/components/Layout/components/SettingDrawer/index.d.ts +1 -0
- package/lib/components/Layout/components/SettingDrawer/index.js +2 -0
- package/lib/components/Layout/components/SettingDrawer/index.js.map +1 -0
- package/lib/components/Layout/components/SideBar.d.ts +10 -0
- package/lib/components/Layout/components/SideBar.js +59 -0
- package/lib/components/Layout/components/SideBar.js.map +1 -0
- package/lib/components/Layout/components/defaultSettings.d.ts +4 -0
- package/lib/components/Layout/components/defaultSettings.js +16 -0
- package/lib/components/Layout/components/defaultSettings.js.map +1 -0
- package/lib/components/Layout/components/index.d.ts +4 -0
- package/lib/components/Layout/components/index.js +5 -0
- package/lib/components/Layout/components/index.js.map +1 -0
- package/lib/components/Layout/components/util.d.ts +1 -0
- package/lib/components/Layout/components/util.js +15 -0
- package/lib/components/Layout/components/util.js.map +1 -0
- package/lib/components/Layout/compute.d.ts +6 -0
- package/lib/components/Layout/compute.js +316 -0
- package/lib/components/Layout/compute.js.map +1 -0
- package/lib/components/Layout/compute.test.d.ts +6 -0
- package/lib/components/Layout/compute.test.js +120 -0
- package/lib/components/Layout/compute.test.js.map +1 -0
- package/lib/components/Layout/index.d.ts +4 -0
- package/lib/components/Layout/index.js +4 -0
- package/lib/components/Layout/index.js.map +1 -0
- package/lib/components/Layout/typings.d.ts +1 -0
- package/lib/components/Layout/typings.js +2 -0
- package/lib/components/Layout/typings.js.map +1 -0
- package/lib/components/NavigationComponent.d.ts +15 -0
- package/lib/components/NavigationComponent.js +120 -0
- package/lib/components/NavigationComponent.js.map +1 -0
- package/lib/components/PluginArea.d.ts +2 -0
- package/lib/components/PluginArea.js +8 -0
- package/lib/components/PluginArea.js.map +1 -0
- package/lib/components/ToastAlert.d.ts +12 -0
- package/lib/components/ToastAlert.js +17 -0
- package/lib/components/ToastAlert.js.map +1 -0
- package/lib/components/index.d.ts +9 -0
- package/lib/components/index.js +10 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/with-interactions-managed.d.ts +2 -0
- package/lib/components/with-interactions-managed.js +18 -0
- package/lib/components/with-interactions-managed.js.map +1 -0
- package/lib/config/config.d.ts +17 -0
- package/lib/config/config.js +18 -0
- package/lib/config/config.js.map +1 -0
- package/lib/config/index.d.ts +1 -0
- package/lib/config/index.js +2 -0
- package/lib/config/index.js.map +1 -0
- package/lib/constants/routes.d.ts +3 -0
- package/lib/constants/routes.js +5 -0
- package/lib/constants/routes.js.map +1 -0
- package/lib/containers/layout/BasicLayout.d.ts +7 -0
- package/lib/containers/layout/BasicLayout.js +36 -0
- package/lib/containers/layout/BasicLayout.js.map +1 -0
- package/lib/containers/layout/DrawerBottomNavigationConfig.d.ts +128 -0
- package/lib/containers/layout/DrawerBottomNavigationConfig.js +72 -0
- package/lib/containers/layout/DrawerBottomNavigationConfig.js.map +1 -0
- package/lib/containers/layout/DrawerConfig.d.ts +85 -0
- package/lib/containers/layout/DrawerConfig.js +48 -0
- package/lib/containers/layout/DrawerConfig.js.map +1 -0
- package/lib/containers/layout/Lifecycle.d.ts +13 -0
- package/lib/containers/layout/Lifecycle.js +18 -0
- package/lib/containers/layout/Lifecycle.js.map +1 -0
- package/lib/containers/layout/ProLayout.d.ts +5 -0
- package/lib/containers/layout/ProLayout.js +35 -0
- package/lib/containers/layout/ProLayout.js.map +1 -0
- package/lib/containers/layout/module.d.ts +5 -0
- package/lib/containers/layout/module.js +22 -0
- package/lib/containers/layout/module.js.map +1 -0
- package/lib/hooks/use-after-interactions.d.ts +6 -0
- package/lib/hooks/use-after-interactions.js +29 -0
- package/lib/hooks/use-after-interactions.js.map +1 -0
- package/lib/hooks/useIsReady.d.ts +2 -0
- package/lib/hooks/useIsReady.js +24 -0
- package/lib/hooks/useIsReady.js.map +1 -0
- package/lib/hooks/useLayoutSetting/index.d.ts +11 -0
- package/lib/hooks/useLayoutSetting/index.js +68 -0
- package/lib/hooks/useLayoutSetting/index.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/index.js +2 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/settings.d.ts +4 -0
- package/lib/interfaces/settings.js +2 -0
- package/lib/interfaces/settings.js.map +1 -0
- package/lib/redux/settings.d.ts +80 -0
- package/lib/redux/settings.js +16 -0
- package/lib/redux/settings.js.map +1 -0
- package/lib/utils/ThemeColor.d.ts +8 -0
- package/lib/utils/ThemeColor.js +9 -0
- package/lib/utils/ThemeColor.js.map +1 -0
- package/lib/utils/routeConfigKeyReplace.d.ts +7 -0
- package/lib/utils/routeConfigKeyReplace.js +77 -0
- package/lib/utils/routeConfigKeyReplace.js.map +1 -0
- package/lib/utils/routeConfigKeyReplace.test.d.ts +1 -0
- package/lib/utils/routeConfigKeyReplace.test.js +102 -0
- package/lib/utils/routeConfigKeyReplace.test.js.map +1 -0
- package/package.json +40 -0
- package/src/__tests__/prolayout-layout-feature.test.tsx +207 -0
- package/src/components/ApplicationErrorFillWrapper.tsx +7 -0
- package/src/components/ApplicationErrorHandler.tsx +30 -0
- package/src/components/ErrorBounday.tsx +31 -0
- package/src/components/Fallback.tsx +65 -0
- package/src/components/Layout/README.md +11 -0
- package/src/components/Layout/components/BasicLayout.tsx +70 -0
- package/src/components/Layout/components/BottomTabBar.tsx +135 -0
- package/src/components/Layout/components/Drawer.tsx +412 -0
- package/src/components/Layout/components/Header.tsx +195 -0
- package/src/components/Layout/components/Sample.tsx +10 -0
- package/src/components/Layout/components/SettingDrawer/LayoutButton.tsx +102 -0
- package/src/components/Layout/components/SettingDrawer/SettingDrawer.tsx +60 -0
- package/src/components/Layout/components/SettingDrawer/ThemeColorButton.tsx +26 -0
- package/src/components/Layout/components/SettingDrawer/index.ts +1 -0
- package/src/components/Layout/components/SideBar.tsx +109 -0
- package/src/components/Layout/components/defaultSettings.ts +19 -0
- package/src/components/Layout/components/index.ts +4 -0
- package/src/components/Layout/components/util.ts +14 -0
- package/src/components/Layout/compute.test.tsx +129 -0
- package/src/components/Layout/compute.tsx +384 -0
- package/src/components/Layout/eslint.json +1 -0
- package/src/components/Layout/index.ts +5 -0
- package/src/components/Layout/typings.ts +1 -0
- package/src/components/NavigationComponent.tsx +154 -0
- package/src/components/PluginArea.tsx +11 -0
- package/src/components/ToastAlert.tsx +44 -0
- package/src/components/index.ts +9 -0
- package/src/components/with-interactions-managed.tsx +33 -0
- package/src/config/config.ts +17 -0
- package/src/config/index.ts +1 -0
- package/src/constants/routes.ts +3 -0
- package/src/containers/layout/BasicLayout.tsx +61 -0
- package/src/containers/layout/DrawerBottomNavigationConfig.tsx +85 -0
- package/src/containers/layout/DrawerConfig.tsx +59 -0
- package/src/containers/layout/Lifecycle.tsx +23 -0
- package/src/containers/layout/ProLayout.tsx +42 -0
- package/src/containers/layout/module.ts +24 -0
- package/src/hooks/use-after-interactions.ts +35 -0
- package/src/hooks/useIsReady.ts +31 -0
- package/src/hooks/useLayoutSetting/index.ts +99 -0
- package/src/index.ts +41 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/settings.ts +5 -0
- package/src/redux/settings.ts +28 -0
- package/src/utils/ThemeColor.ts +9 -0
- package/src/utils/__snapshots__/routeConfigKeyReplace.test.ts.snap +117 -0
- package/src/utils/routeConfigKeyReplace.test.ts +114 -0
- package/src/utils/routeConfigKeyReplace.ts +74 -0
- package/tsconfig.json +37 -0
- package/types.d.ts +11 -0
- package/webpack.config.js +104 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const appDrawerBottomNavigationConfig: {
|
|
3
|
+
"/": {
|
|
4
|
+
exact: boolean;
|
|
5
|
+
container: import("@react-navigation/core").TypedNavigator<import("@react-navigation/routers").ParamListBase, import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/stack").StackNavigationOptions, import("@react-navigation/stack").StackNavigationEventMap, ({ id, initialRouteName, children, screenListeners, screenOptions, ...rest }: import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
6
|
+
id?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
screenListeners?: Partial<{
|
|
9
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionStart">;
|
|
10
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionEnd">;
|
|
11
|
+
gestureStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureStart">;
|
|
12
|
+
gestureEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureEnd">;
|
|
13
|
+
gestureCancel: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureCancel">;
|
|
14
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "focus">;
|
|
15
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "blur">;
|
|
16
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "state">;
|
|
17
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "beforeRemove">;
|
|
18
|
+
}> | ((props: {
|
|
19
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
20
|
+
navigation: any;
|
|
21
|
+
}) => Partial<{
|
|
22
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionStart">;
|
|
23
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionEnd">;
|
|
24
|
+
gestureStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureStart">;
|
|
25
|
+
gestureEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureEnd">;
|
|
26
|
+
gestureCancel: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureCancel">;
|
|
27
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "focus">;
|
|
28
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "blur">;
|
|
29
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "state">;
|
|
30
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "beforeRemove">;
|
|
31
|
+
}>);
|
|
32
|
+
screenOptions?: import("@react-navigation/stack").StackNavigationOptions | ((props: {
|
|
33
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
34
|
+
navigation: any;
|
|
35
|
+
}) => import("@react-navigation/stack").StackNavigationOptions);
|
|
36
|
+
} & import("@react-navigation/routers").StackRouterOptions & import("@react-navigation/stack/lib/typescript/src/types").StackNavigationConfig) => JSX.Element>;
|
|
37
|
+
name: string;
|
|
38
|
+
props: {
|
|
39
|
+
initialRouteName: string;
|
|
40
|
+
screenOptions: {
|
|
41
|
+
headerShown: boolean;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
"//main_drawer": {
|
|
46
|
+
exact: boolean;
|
|
47
|
+
container: import("@react-navigation/core").TypedNavigator<import("@react-navigation/routers").ParamListBase, import("@react-navigation/routers").DrawerNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/drawer").DrawerNavigationOptions, import("@react-navigation/drawer").DrawerNavigationEventMap, ({ id, initialRouteName, defaultStatus: customDefaultStatus, backBehavior, children, screenListeners, screenOptions, ...restWithDeprecated }: import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
48
|
+
id?: string;
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
screenListeners?: Partial<{
|
|
51
|
+
drawerItemPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "drawerItemPress">;
|
|
52
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "focus">;
|
|
53
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "blur">;
|
|
54
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "state">;
|
|
55
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "beforeRemove">;
|
|
56
|
+
}> | ((props: {
|
|
57
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
58
|
+
navigation: any;
|
|
59
|
+
}) => Partial<{
|
|
60
|
+
drawerItemPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "drawerItemPress">;
|
|
61
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "focus">;
|
|
62
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "blur">;
|
|
63
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "state">;
|
|
64
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "beforeRemove">;
|
|
65
|
+
}>);
|
|
66
|
+
screenOptions?: import("@react-navigation/drawer").DrawerNavigationOptions | ((props: {
|
|
67
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
68
|
+
navigation: any;
|
|
69
|
+
}) => import("@react-navigation/drawer").DrawerNavigationOptions);
|
|
70
|
+
} & {
|
|
71
|
+
backBehavior?: import("@react-navigation/routers/lib/typescript/src/TabRouter").BackBehavior;
|
|
72
|
+
} & {
|
|
73
|
+
defaultStatus?: import("@react-navigation/routers").DrawerStatus;
|
|
74
|
+
} & import("@react-navigation/drawer/lib/typescript/src/types").DrawerNavigationConfig) => JSX.Element>;
|
|
75
|
+
name: string;
|
|
76
|
+
props: {
|
|
77
|
+
initialRouteName: string;
|
|
78
|
+
drawerContent: (props: any) => React.JSX.Element;
|
|
79
|
+
screenOptions: (options: any) => {
|
|
80
|
+
headerShown: boolean;
|
|
81
|
+
drawerIcon: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
"//main_drawer/mainbottomtab": {
|
|
86
|
+
container: import("@react-navigation/core").TypedNavigator<import("@react-navigation/routers").ParamListBase, import("@react-navigation/routers").TabNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/bottom-tabs").BottomTabNavigationOptions, import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, ({ id, initialRouteName, backBehavior, children, screenListeners, screenOptions, sceneContainerStyle, ...restWithDeprecated }: import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
87
|
+
id?: string;
|
|
88
|
+
children: React.ReactNode;
|
|
89
|
+
screenListeners?: Partial<{
|
|
90
|
+
tabPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "tabPress">;
|
|
91
|
+
tabLongPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "tabLongPress">;
|
|
92
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "focus">;
|
|
93
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "blur">;
|
|
94
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "state">;
|
|
95
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "beforeRemove">;
|
|
96
|
+
}> | ((props: {
|
|
97
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
98
|
+
navigation: any;
|
|
99
|
+
}) => Partial<{
|
|
100
|
+
tabPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "tabPress">;
|
|
101
|
+
tabLongPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "tabLongPress">;
|
|
102
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "focus">;
|
|
103
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "blur">;
|
|
104
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "state">;
|
|
105
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/bottom-tabs").BottomTabNavigationEventMap, "beforeRemove">;
|
|
106
|
+
}>);
|
|
107
|
+
screenOptions?: import("@react-navigation/bottom-tabs").BottomTabNavigationOptions | ((props: {
|
|
108
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
109
|
+
navigation: any;
|
|
110
|
+
}) => import("@react-navigation/bottom-tabs").BottomTabNavigationOptions);
|
|
111
|
+
} & {
|
|
112
|
+
backBehavior?: import("@react-navigation/routers/lib/typescript/src/TabRouter").BackBehavior;
|
|
113
|
+
} & import("@react-navigation/bottom-tabs/lib/typescript/src/types").BottomTabNavigationConfig) => JSX.Element>;
|
|
114
|
+
exact: boolean;
|
|
115
|
+
name: string;
|
|
116
|
+
props: {
|
|
117
|
+
initialRouteName: string;
|
|
118
|
+
tabBar: (props: any) => React.JSX.Element;
|
|
119
|
+
screenOptions: ({ route }: any) => {
|
|
120
|
+
headerShown: boolean;
|
|
121
|
+
title: string;
|
|
122
|
+
headerTitle: string;
|
|
123
|
+
tabBarActiveTintColor: string;
|
|
124
|
+
tabBarInactiveTintColor: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createStackNavigator } from '@react-navigation/stack';
|
|
3
|
+
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
4
|
+
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
5
|
+
import { Drawer, BottomTabBar } from '../../components';
|
|
6
|
+
export const appDrawerBottomNavigationConfig = {
|
|
7
|
+
['/']: {
|
|
8
|
+
exact: false,
|
|
9
|
+
container: createStackNavigator(),
|
|
10
|
+
name: 'MainStack',
|
|
11
|
+
props: {
|
|
12
|
+
initialRouteName: 'MainStack.MainDrawer',
|
|
13
|
+
screenOptions: {
|
|
14
|
+
headerShown: false,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
['//main_drawer']: {
|
|
19
|
+
exact: false,
|
|
20
|
+
container: createDrawerNavigator(),
|
|
21
|
+
name: 'MainDrawer',
|
|
22
|
+
props: {
|
|
23
|
+
initialRouteName: 'MainStack.MainDrawer.MainBottomTab',
|
|
24
|
+
drawerContent: (props) => (React.createElement(Drawer, Object.assign({}, props, { title: 'ClockBook', titleColor: 'black', logout: true, redirect: 'MainStack.Login' }))),
|
|
25
|
+
screenOptions: (options) => {
|
|
26
|
+
return {
|
|
27
|
+
headerShown: false,
|
|
28
|
+
drawerIcon: 'grid',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
['//main_drawer/mainbottomtab']: {
|
|
34
|
+
container: createBottomTabNavigator(),
|
|
35
|
+
exact: false,
|
|
36
|
+
name: 'MainBottomTab',
|
|
37
|
+
props: {
|
|
38
|
+
initialRouteName: 'MainStack.MainDrawer.MainBottomTab.Home',
|
|
39
|
+
tabBar: (props) => React.createElement(BottomTabBar, Object.assign({}, props)),
|
|
40
|
+
screenOptions: ({ route }) => {
|
|
41
|
+
return {
|
|
42
|
+
headerShown: false,
|
|
43
|
+
title: 'Home',
|
|
44
|
+
headerTitle: 'Home',
|
|
45
|
+
tabBarActiveTintColor: '#ff5a60',
|
|
46
|
+
tabBarInactiveTintColor: 'black',
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
// ['//o']: {
|
|
52
|
+
// exact: false,
|
|
53
|
+
// name: 'Home',
|
|
54
|
+
// props: {
|
|
55
|
+
// initialParams: { orgName: null,title:'Home',priority:1 },
|
|
56
|
+
// component: ProLayout,
|
|
57
|
+
// priority:1,
|
|
58
|
+
// options: {
|
|
59
|
+
// headerShown: true,
|
|
60
|
+
// header: (props: any) => <Header showToggle={true} right={true} {...props} />,
|
|
61
|
+
// title: 'Home',
|
|
62
|
+
// headerTitle: 'Home',
|
|
63
|
+
// priority: 1,
|
|
64
|
+
// tabBarActiveTintColor: '#ff5a60',
|
|
65
|
+
// tabBarInactiveTintColor: 'black',
|
|
66
|
+
// tabBarIcon: ({ color }: { color: any }) => <MaterialIcons name="home" size={24} color={color} />,
|
|
67
|
+
// tabBarLabel: 'Home',
|
|
68
|
+
// },
|
|
69
|
+
// },
|
|
70
|
+
// },
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=DrawerBottomNavigationConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerBottomNavigationConfig.js","sourceRoot":"","sources":["../../../src/containers/layout/DrawerBottomNavigationConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAS,YAAY,EAAU,MAAM,kBAAkB,CAAC;AAIvE,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC3C,CAAC,GAAG,CAAC,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,oBAAoB,EAAE;QACjC,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE;YACH,gBAAgB,EAAE,sBAAsB;YACxC,aAAa,EAAE;gBACX,WAAW,EAAE,KAAK;aACrB;SACJ;KACJ;IACD,CAAC,eAAe,CAAC,EAAE;QACf,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,qBAAqB,EAAE;QAClC,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE;YACH,gBAAgB,EAAE,oCAAoC;YACtD,aAAa,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,CAC3B,oBAAC,MAAM,oBACH,KAAK,IACT,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,iBAAiB,IACzB,CACD;YACD,aAAa,EAAC,CAAC,OAAW,EAAE,EAAE;gBAE1B,OAAM;oBACF,WAAW,EAAC,KAAK;oBACjB,UAAU,EAAE,MAAM;iBACrB,CAAA;YACL,CAAC;SACJ;KACJ;IACD,CAAC,6BAA6B,CAAC,EAAE;QAC7B,SAAS,EAAE,wBAAwB,EAAE;QACrC,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE;YACH,gBAAgB,EAAE,yCAAyC;YAC3D,MAAM,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,oBAAC,YAAY,oBAAK,KAAK,EAAI;YACnD,aAAa,EAAE,CAAC,EAAE,KAAK,EAAO,EAAE,EAAE;gBAC9B,OAAO;oBACH,WAAW,EAAE,KAAK;oBAClB,KAAK,EAAC,MAAM;oBACZ,WAAW,EAAC,MAAM;oBAClB,qBAAqB,EAAE,SAAS;oBAChC,uBAAuB,EAAE,OAAO;iBACnC,CAAC;YACN,CAAC;SACJ;KACJ;IACD,aAAa;IACb,oBAAoB;IACpB,oBAAoB;IACpB,eAAe;IACf,oEAAoE;IACpE,gCAAgC;IAChC,sBAAsB;IACtB,sBAAsB;IACtB,iCAAiC;IACjC,4FAA4F;IAC5F,6BAA6B;IAC7B,oCAAoC;IACpC,2BAA2B;IAC3B,gDAAgD;IAChD,gDAAgD;IAChD,gHAAgH;IAChH,mCAAmC;IACnC,cAAc;IACd,SAAS;IACT,KAAK;CACR,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const appDrawerConfig: {
|
|
3
|
+
"/": {
|
|
4
|
+
exact: boolean;
|
|
5
|
+
container: import("@react-navigation/core").TypedNavigator<import("@react-navigation/routers").ParamListBase, import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/stack").StackNavigationOptions, import("@react-navigation/stack").StackNavigationEventMap, ({ id, initialRouteName, children, screenListeners, screenOptions, ...rest }: import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
6
|
+
id?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
screenListeners?: Partial<{
|
|
9
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionStart">;
|
|
10
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionEnd">;
|
|
11
|
+
gestureStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureStart">;
|
|
12
|
+
gestureEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureEnd">;
|
|
13
|
+
gestureCancel: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureCancel">;
|
|
14
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "focus">;
|
|
15
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "blur">;
|
|
16
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "state">;
|
|
17
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "beforeRemove">;
|
|
18
|
+
}> | ((props: {
|
|
19
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
20
|
+
navigation: any;
|
|
21
|
+
}) => Partial<{
|
|
22
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionStart">;
|
|
23
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "transitionEnd">;
|
|
24
|
+
gestureStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureStart">;
|
|
25
|
+
gestureEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureEnd">;
|
|
26
|
+
gestureCancel: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "gestureCancel">;
|
|
27
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "focus">;
|
|
28
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "blur">;
|
|
29
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "state">;
|
|
30
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap, "beforeRemove">;
|
|
31
|
+
}>);
|
|
32
|
+
screenOptions?: import("@react-navigation/stack").StackNavigationOptions | ((props: {
|
|
33
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
34
|
+
navigation: any;
|
|
35
|
+
}) => import("@react-navigation/stack").StackNavigationOptions);
|
|
36
|
+
} & import("@react-navigation/routers").StackRouterOptions & import("@react-navigation/stack/lib/typescript/src/types").StackNavigationConfig) => JSX.Element>;
|
|
37
|
+
name: string;
|
|
38
|
+
props: {
|
|
39
|
+
initialRouteName: string;
|
|
40
|
+
screenOptions: {
|
|
41
|
+
headerShown: boolean;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
"//main_drawer": {
|
|
46
|
+
exact: boolean;
|
|
47
|
+
container: import("@react-navigation/core").TypedNavigator<import("@react-navigation/routers").ParamListBase, import("@react-navigation/routers").DrawerNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/drawer").DrawerNavigationOptions, import("@react-navigation/drawer").DrawerNavigationEventMap, ({ id, initialRouteName, defaultStatus: customDefaultStatus, backBehavior, children, screenListeners, screenOptions, ...restWithDeprecated }: import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
48
|
+
id?: string;
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
screenListeners?: Partial<{
|
|
51
|
+
drawerItemPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "drawerItemPress">;
|
|
52
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "focus">;
|
|
53
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "blur">;
|
|
54
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "state">;
|
|
55
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "beforeRemove">;
|
|
56
|
+
}> | ((props: {
|
|
57
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
58
|
+
navigation: any;
|
|
59
|
+
}) => Partial<{
|
|
60
|
+
drawerItemPress: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "drawerItemPress">;
|
|
61
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "focus">;
|
|
62
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "blur">;
|
|
63
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "state">;
|
|
64
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/drawer").DrawerNavigationEventMap, "beforeRemove">;
|
|
65
|
+
}>);
|
|
66
|
+
screenOptions?: import("@react-navigation/drawer").DrawerNavigationOptions | ((props: {
|
|
67
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
68
|
+
navigation: any;
|
|
69
|
+
}) => import("@react-navigation/drawer").DrawerNavigationOptions);
|
|
70
|
+
} & {
|
|
71
|
+
backBehavior?: import("@react-navigation/routers/lib/typescript/src/TabRouter").BackBehavior;
|
|
72
|
+
} & {
|
|
73
|
+
defaultStatus?: import("@react-navigation/routers").DrawerStatus;
|
|
74
|
+
} & import("@react-navigation/drawer/lib/typescript/src/types").DrawerNavigationConfig) => JSX.Element>;
|
|
75
|
+
name: string;
|
|
76
|
+
props: {
|
|
77
|
+
initialRouteName: string;
|
|
78
|
+
drawerContent: (props: any) => React.JSX.Element;
|
|
79
|
+
screenOptions: (options: any) => {
|
|
80
|
+
headerShown: boolean;
|
|
81
|
+
drawerIcon: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createStackNavigator } from '@react-navigation/stack';
|
|
3
|
+
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
4
|
+
import { Drawer } from '../../components';
|
|
5
|
+
export const appDrawerConfig = {
|
|
6
|
+
['/']: {
|
|
7
|
+
exact: false,
|
|
8
|
+
container: createStackNavigator(),
|
|
9
|
+
name: 'MainStack',
|
|
10
|
+
props: {
|
|
11
|
+
initialRouteName: 'MainStack.MainDrawer',
|
|
12
|
+
screenOptions: {
|
|
13
|
+
headerShown: false,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
['//main_drawer']: {
|
|
18
|
+
exact: false,
|
|
19
|
+
container: createDrawerNavigator(),
|
|
20
|
+
name: 'MainDrawer',
|
|
21
|
+
props: {
|
|
22
|
+
initialRouteName: 'MainStack.MainDrawer.Home',
|
|
23
|
+
drawerContent: (props) => (React.createElement(Drawer, Object.assign({}, props, { title: 'ClockBook', titleColor: 'black', logout: true, redirect: 'MainStack.Login' }))),
|
|
24
|
+
screenOptions: (options) => {
|
|
25
|
+
return {
|
|
26
|
+
headerShown: false,
|
|
27
|
+
drawerIcon: 'grid',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
// ['//main_drawer/home']: {
|
|
33
|
+
// exact: false,
|
|
34
|
+
// name: 'Home',
|
|
35
|
+
// auth: true,
|
|
36
|
+
// props: {
|
|
37
|
+
// initialParams: { orgName: null },
|
|
38
|
+
// component: ProLayout,
|
|
39
|
+
// options: {
|
|
40
|
+
// headerShown: true,
|
|
41
|
+
// title: 'Home',
|
|
42
|
+
// header: (props: any) => <Header showToggle={true} right={true} {...props} />,
|
|
43
|
+
// drawerIcon: 'grid',
|
|
44
|
+
// },
|
|
45
|
+
// },
|
|
46
|
+
// },
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=DrawerConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerConfig.js","sourceRoot":"","sources":["../../../src/containers/layout/DrawerConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAkB,MAAM,kBAAkB,CAAC;AAG1D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,CAAC,GAAG,CAAC,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,oBAAoB,EAAE;QACjC,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE;YACH,gBAAgB,EAAE,sBAAsB;YACxC,aAAa,EAAE;gBACX,WAAW,EAAE,KAAK;aACrB;SACJ;KACJ;IACD,CAAC,eAAe,CAAC,EAAE;QACf,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,qBAAqB,EAAE;QAClC,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE;YACH,gBAAgB,EAAE,2BAA2B;YAC7C,aAAa,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,CAC3B,oBAAC,MAAM,oBACC,KAAK,IACT,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,iBAAiB,IAC7B,CACL;YACD,aAAa,EAAC,CAAC,OAAW,EAAE,EAAE;gBAE1B,OAAM;oBACF,WAAW,EAAC,KAAK;oBACjB,UAAU,EAAE,MAAM;iBACrB,CAAA;YACL,CAAC;SACJ;KACJ;IACD,4BAA4B;IAC5B,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,eAAe;IACf,4CAA4C;IAC5C,gCAAgC;IAChC,qBAAqB;IACrB,iCAAiC;IACjC,6BAA6B;IAC7B,4FAA4F;IAC5F,kCAAkC;IAClC,aAAa;IACb,SAAS;IACT,KAAK;CACR,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { LifecyclePhase } from '@workbench-stack/core';
|
|
3
|
+
export type WithFalse<T> = T | false;
|
|
4
|
+
export interface LifecycleProps {
|
|
5
|
+
setPhaseReady?: boolean;
|
|
6
|
+
setPhase?: LifecyclePhase;
|
|
7
|
+
renderWhenPhase?: LifecyclePhase;
|
|
8
|
+
loadingRenderer: ({ loading }: {
|
|
9
|
+
loading: boolean;
|
|
10
|
+
}) => ReactElement;
|
|
11
|
+
children?: ReactElement;
|
|
12
|
+
}
|
|
13
|
+
export declare const Lifecycle: ({ children, ...rest }: LifecycleProps) => React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { LifecycleCommonComponent } from '@adminide-stack/platform-client';
|
|
14
|
+
export const Lifecycle = (_a) => {
|
|
15
|
+
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
16
|
+
return React.createElement(LifecycleCommonComponent, Object.assign({}, rest), children);
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=Lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lifecycle.js","sourceRoot":"","sources":["../../../src/containers/layout/Lifecycle.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAI5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAc3E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAqC,EAAE,EAAE;QAAzC,EAAE,QAAQ,OAA2B,EAAtB,IAAI,cAAnB,YAAqB,CAAF;IAC3C,OAAO,oBAAC,wBAAwB,oBAAK,IAAI,GACtC,QAAQ,CACgB,CAAA;AAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Box, Spinner } from '@gluestack-ui/themed';
|
|
3
|
+
import { NavigationContainerComponent, ApplicationErrorHandler, ErrorBoundary } from '../../components';
|
|
4
|
+
import { PluginArea } from '@common-stack/client-react';
|
|
5
|
+
import routeConfigKeyReplace from '../../utils/routeConfigKeyReplace';
|
|
6
|
+
import { useLayoutSetting } from '../../hooks/useLayoutSetting';
|
|
7
|
+
let AppFeatures;
|
|
8
|
+
let AppLayout;
|
|
9
|
+
const ProLayout = (props) => {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const [appRoutes, setAppRoutes] = React.useState([]);
|
|
12
|
+
const { pathKey, appLayout } = useLayoutSetting(props);
|
|
13
|
+
AppLayout = appLayout;
|
|
14
|
+
const { appFeatures } = routeConfigKeyReplace(pathKey, props === null || props === void 0 ? void 0 : props.features, appLayout);
|
|
15
|
+
AppFeatures = appFeatures;
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
if (appLayout) {
|
|
18
|
+
let routes = AppFeatures ? (AppFeatures === null || AppFeatures === void 0 ? void 0 : AppFeatures.getRoutes2('/', 'MainStack')) || [] : null;
|
|
19
|
+
setAppRoutes(routes);
|
|
20
|
+
}
|
|
21
|
+
}, [appLayout]);
|
|
22
|
+
//const appRoutes = AppFeatures ? AppFeatures?.getRoutes2('/', 'MainStack') || [] : null;
|
|
23
|
+
const loadingComponent = () => React.createElement(Box, { flex: 1 }, React.createElement(Spinner, null));
|
|
24
|
+
let plugins = (_a = AppFeatures === null || AppFeatures === void 0 ? void 0 : AppFeatures.getComponentFillPlugins()) !== null && _a !== void 0 ? _a : props.features;
|
|
25
|
+
let configuredRoutes = (_b = AppFeatures === null || AppFeatures === void 0 ? void 0 : AppFeatures.getConfiguredRoutes2('/')) !== null && _b !== void 0 ? _b : (_c = props === null || props === void 0 ? void 0 : props.features) === null || _c === void 0 ? void 0 : _c.getConfiguredRoutes2('/');
|
|
26
|
+
if (!appRoutes)
|
|
27
|
+
return loadingComponent();
|
|
28
|
+
return (React.createElement(ErrorBoundary, null,
|
|
29
|
+
React.createElement(NavigationContainerComponent, { configurableRoutes: configuredRoutes, independent: true },
|
|
30
|
+
appRoutes,
|
|
31
|
+
React.createElement(PluginArea, null),
|
|
32
|
+
React.createElement(ApplicationErrorHandler, { plugins: plugins }))));
|
|
33
|
+
};
|
|
34
|
+
export { ProLayout, AppFeatures, AppLayout };
|
|
35
|
+
//# sourceMappingURL=ProLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProLayout.js","sourceRoot":"","sources":["../../../src/containers/layout/ProLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,qBAAqB,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,IAAI,WAAgB,CAAC;AACrB,IAAI,SAAc,CAAC;AAEnB,MAAM,SAAS,GAAkB,CAAC,KAAK,EAAE,EAAE;;IACvC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAM,EAAE,CAAC,CAAC;IAC1D,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACvD,SAAS,GAAG,SAAS,CAAC;IACtB,MAAM,EAAC,WAAW,EAAC,GAAG,qBAAqB,CAAC,OAAO,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAC,SAAS,CAAC,CAAC;IAChF,WAAW,GAAG,WAAW,CAAC;IAE1B,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,SAAS,EAAE;YACX,IAAI,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,CAAC,GAAG,EAAE,WAAW,CAAC,KAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAClF,YAAY,CAAC,MAAM,CAAC,CAAC;SACxB;IACL,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,yFAAyF;IAEzF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,oBAAC,GAAG,IAAC,IAAI,EAAE,CAAC,IAAG,oBAAC,OAAO,OAAG,CAAO,CAAC;IAEjE,IAAI,OAAO,GAAG,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,uBAAuB,EAAE,mCAAI,KAAK,CAAC,QAAQ,CAAC;IACvE,IAAI,gBAAgB,GAAG,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC,GAAG,CAAC,mCAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,0CAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC5G,IAAI,CAAC,SAAS;QAAE,OAAO,gBAAgB,EAAE,CAAC;IAC1C,OAAO,CACH,oBAAC,aAAa;QACV,oBAAC,4BAA4B,IAAC,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,IAAI;YAChF,SAAS;YACV,oBAAC,UAAU,OAAG;YACd,oBAAC,uBAAuB,IAAC,OAAO,EAAE,OAAO,GAAI,CAClB,CACnB,CACnB,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import { Feature } from '@common-stack/client-react';
|
|
3
|
+
import { createStackNavigator } from '@react-navigation/stack';
|
|
4
|
+
import { ProLayout, AppFeatures, AppLayout } from './ProLayout';
|
|
5
|
+
export { ProLayout, AppFeatures, AppLayout };
|
|
6
|
+
const layoutConfig = {
|
|
7
|
+
['/']: {
|
|
8
|
+
exact: false,
|
|
9
|
+
container: createStackNavigator(),
|
|
10
|
+
name: 'MainStack',
|
|
11
|
+
props: {
|
|
12
|
+
initialRouteName: 'MainStack.MainBottomTab',
|
|
13
|
+
screenOptions: {
|
|
14
|
+
headerShown: false,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default new Feature({
|
|
20
|
+
routeConfig: layoutConfig,
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/containers/layout/module.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;AAE7C,MAAM,YAAY,GAAG;IACjB,CAAC,GAAG,CAAC,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,oBAAoB,EAAE;QACjC,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE;YACH,gBAAgB,EAAE,yBAAyB;YAC3C,aAAa,EAAE;gBACX,WAAW,EAAE,KAAK;aACrB;SACJ;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,OAAO,CAAC;IACvB,WAAW,EAAE,YAAY;CAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import { InteractionManager } from 'react-native';
|
|
3
|
+
import { useFocusEffect } from '@react-navigation/native';
|
|
4
|
+
export const useAfterInteractions = () => {
|
|
5
|
+
const [interactionsComplete, setInteractionsComplete] = useState(false);
|
|
6
|
+
const subscriptionRef = useRef(null);
|
|
7
|
+
const transitionRef = useRef(null);
|
|
8
|
+
useFocusEffect(React.useCallback(() => {
|
|
9
|
+
// Do something when the screen is focused
|
|
10
|
+
subscriptionRef.current = InteractionManager.runAfterInteractions(() => {
|
|
11
|
+
var _a;
|
|
12
|
+
(_a = transitionRef.current) === null || _a === void 0 ? void 0 : _a.animateNextTransition();
|
|
13
|
+
setInteractionsComplete(true);
|
|
14
|
+
subscriptionRef.current = null;
|
|
15
|
+
});
|
|
16
|
+
return () => {
|
|
17
|
+
var _a;
|
|
18
|
+
// Do something when the screen is unfocused
|
|
19
|
+
// Useful for cleanup functions
|
|
20
|
+
setInteractionsComplete(false);
|
|
21
|
+
(_a = subscriptionRef.current) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
22
|
+
};
|
|
23
|
+
}, []));
|
|
24
|
+
return {
|
|
25
|
+
interactionsComplete,
|
|
26
|
+
transitionRef,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=use-after-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-after-interactions.js","sourceRoot":"","sources":["../../src/hooks/use-after-interactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACrC,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExE,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAErC,MAAM,aAAa,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEtD,cAAc,CACV,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACnB,0CAA0C;QAC1C,eAAe,CAAC,OAAO,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,GAAG,EAAE;;YACnE,MAAA,aAAa,CAAC,OAAO,0CAAE,qBAAqB,EAAE,CAAC;YAC/C,uBAAuB,CAAC,IAAI,CAAC,CAAC;YAC9B,eAAe,CAAC,OAAO,GAAG,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;;YACR,4CAA4C;YAC5C,+BAA+B;YAC/B,uBAAuB,CAAC,KAAK,CAAC,CAAC;YAC/B,MAAA,eAAe,CAAC,OAAO,0CAAE,MAAM,EAAE,CAAC;QACtC,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CACT,CAAC;IAEF,OAAO;QACH,oBAAoB;QACpB,aAAa;KAChB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useFocusEffect } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const useIsReady = (stack = true) => {
|
|
4
|
+
const [isReady, setIsReady] = React.useState(false);
|
|
5
|
+
useFocusEffect(React.useCallback(() => {
|
|
6
|
+
// Do something when the screen is focused
|
|
7
|
+
let timer;
|
|
8
|
+
if (!isReady) {
|
|
9
|
+
timer = setTimeout(() => {
|
|
10
|
+
setIsReady(true);
|
|
11
|
+
}, 200);
|
|
12
|
+
}
|
|
13
|
+
return () => {
|
|
14
|
+
// Do something when the screen is unfocused
|
|
15
|
+
// Useful for cleanup functions
|
|
16
|
+
clearTimeout(timer);
|
|
17
|
+
// unsubscribeFocus();
|
|
18
|
+
// unsubscribeTransitionEnd && unsubscribeTransitionEnd();
|
|
19
|
+
};
|
|
20
|
+
}, []));
|
|
21
|
+
return isReady;
|
|
22
|
+
};
|
|
23
|
+
export default useIsReady;
|
|
24
|
+
//# sourceMappingURL=useIsReady.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsReady.js","sourceRoot":"","sources":["../../src/hooks/useIsReady.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,GAAG,CAAC,QAAiB,IAAI,EAAE,EAAE;IACzC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,cAAc,CACV,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACnB,0CAA0C;QAE1C,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,EAAE;YACV,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;gBACpB,UAAU,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC,EAAE,GAAG,CAAC,CAAC;SACX;QAED,OAAO,GAAG,EAAE;YACR,4CAA4C;YAC5C,+BAA+B;YAC/B,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,sBAAsB;YACtB,0DAA0D;QAC9D,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CACT,CAAC;IAEF,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LayoutSettingProps {
|
|
2
|
+
drawerConfig?: any;
|
|
3
|
+
appFeatures?: any;
|
|
4
|
+
tabBarConfig?: any;
|
|
5
|
+
}
|
|
6
|
+
export declare function useLayoutSetting(props?: LayoutSettingProps): {
|
|
7
|
+
appLayout: import("@common-stack/client-react").Feature;
|
|
8
|
+
pathKey: string;
|
|
9
|
+
intialRouteName: string;
|
|
10
|
+
appLayoutFeatures: any;
|
|
11
|
+
};
|