@admin-layout/gluestack-ui-mobile 9.0.2-alpha.4 → 9.0.4-alpha.102
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 +112 -0
- package/lib/components/AuthWrapper.d.ts +4 -1
- package/lib/components/AuthWrapper.js +6 -5
- package/lib/components/AuthWrapper.js.map +1 -1
- package/lib/components/Layout/components/Drawer.js +9 -9
- package/lib/components/Layout/components/Drawer.js.map +1 -1
- package/lib/components/Layout/components/Header.js +28 -15
- package/lib/components/Layout/components/Header.js.map +1 -1
- package/lib/components/Layout/components/SettingDrawer/LayoutButton.js +14 -6
- package/lib/components/Layout/components/SettingDrawer/LayoutButton.js.map +1 -1
- package/lib/components/Layout/components/SettingDrawer/SettingDrawer.d.ts +1 -1
- package/lib/components/Layout/components/SettingDrawer/SettingDrawer.js +55 -15
- package/lib/components/Layout/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/Layout/components/SettingDrawer/ThemeColorButton.js +1 -1
- package/lib/components/NavigationComponent.js +11 -2
- package/lib/components/NavigationComponent.js.map +1 -1
- package/lib/components/WithConfiguration.d.ts +18 -0
- package/lib/components/WithConfiguration.js +42 -0
- package/lib/components/WithConfiguration.js.map +1 -0
- package/lib/components/WithPermission.d.ts +31 -0
- package/lib/components/WithPermission.js +53 -0
- package/lib/components/WithPermission.js.map +1 -0
- package/lib/components/WithPolicy.d.ts +13 -0
- package/lib/components/WithPolicy.js +18 -0
- package/lib/components/WithPolicy.js.map +1 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/usePermissionAutoFetch.d.ts +75 -0
- package/lib/components/usePermissionAutoFetch.js +63 -0
- package/lib/components/usePermissionAutoFetch.js.map +1 -0
- package/lib/components/useSetting.d.ts +25 -0
- package/lib/components/useSetting.js +87 -0
- package/lib/components/useSetting.js.map +1 -0
- package/lib/components/with-interactions-lifecycle-managed.d.ts +3 -3
- package/lib/components/with-interactions-lifecycle-managed.js +23 -15
- package/lib/components/with-interactions-lifecycle-managed.js.map +1 -1
- package/lib/containers/layout/BasicLayout.d.ts +3 -3
- package/lib/containers/layout/DrawerBottomNavigationConfig.d.ts +393 -88
- package/lib/containers/layout/DrawerConfig.d.ts +266 -60
- package/lib/containers/layout/module.js +2 -2
- package/lib/containers/layout/module.js.map +1 -1
- package/lib/redux/settings.d.ts +8 -8
- package/lib/utils/ThemeColor.js +11 -1
- package/lib/utils/ThemeColor.js.map +1 -1
- package/lib/utils/generateMobileNavigations.d.ts +4 -10
- package/lib/utils/generateMobileNavigations.js +720 -310
- package/lib/utils/generateMobileNavigations.js.map +1 -1
- package/package.json +7 -7
- package/src/components/AuthWrapper.tsx +30 -17
- package/src/components/Layout/components/Drawer.tsx +19 -20
- package/src/components/Layout/components/Header.tsx +154 -93
- package/src/components/Layout/components/SettingDrawer/LayoutButton.tsx +27 -13
- package/src/components/Layout/components/SettingDrawer/SettingDrawer.tsx +151 -48
- package/src/components/Layout/components/SettingDrawer/ThemeColorButton.tsx +2 -2
- package/src/components/NavigationComponent.tsx +9 -2
- package/src/components/WithConfiguration.tsx +74 -0
- package/src/components/WithPermission.tsx +81 -0
- package/src/components/WithPolicy.tsx +32 -0
- package/src/components/index.ts +6 -1
- package/src/components/usePermissionAutoFetch.tsx +78 -0
- package/src/components/useSetting.tsx +137 -0
- package/src/components/with-interactions-lifecycle-managed.tsx +62 -26
- package/src/containers/layout/module.ts +2 -2
- package/src/utils/ThemeColor.ts +11 -1
- package/src/utils/generateMobileNavigations.ts +780 -290
- package/lib/components/Layout/components/util.d.ts +0 -1
- package/lib/components/Layout/components/util.js +0 -15
- package/lib/components/Layout/components/util.js.map +0 -1
- package/src/components/Layout/components/util.ts +0 -14
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// import { Transition, Transitioning } from 'react-native-reanimated';
|
|
3
2
|
import { Lifecycle } from '../containers/layout/Lifecycle';
|
|
4
3
|
import Animated from 'react-native-reanimated';
|
|
5
4
|
import { useAfterInteractions } from '../hooks/use-after-interactions';
|
|
6
5
|
import { Spinner, Center } from '@gluestack-ui/themed';
|
|
7
6
|
import { Platform } from 'react-native';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
)
|
|
7
|
+
import { isUserAuthenticated } from '@adminide-stack/user-auth0-client';
|
|
8
|
+
const LoadingComponent = () => (React.createElement(Center, { flex: 1, justifyContent: 'center', alignItems: 'center' }, React.createElement(Spinner, { color: '$blue500' })));
|
|
9
|
+
const LifecycleComponent = ({ children }) => {
|
|
10
|
+
const { authenticated } = isUserAuthenticated();
|
|
11
|
+
if (authenticated) {
|
|
12
|
+
return (React.createElement(Lifecycle, { renderWhenPhase: 3 /* LifecyclePhase.Restored */, loadingRenderer: LoadingComponent }, children));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return React.createElement(React.Fragment, null, children);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
13
18
|
const IntractionComponent = ({ children, interationTime }) => {
|
|
14
19
|
const { interactionsComplete, opacity, setInteractionsTimeOut } = useAfterInteractions();
|
|
15
20
|
React.useEffect(() => {
|
|
16
21
|
if (interationTime)
|
|
17
22
|
setInteractionsTimeOut(interationTime);
|
|
18
23
|
}, [interationTime]);
|
|
19
|
-
console.log('interactionsComplete', interactionsComplete);
|
|
20
24
|
return (React.createElement(React.Fragment, null, interactionsComplete ? ({ children }) : (React.createElement(Animated.View, { style: {
|
|
21
25
|
flex: 1,
|
|
22
26
|
opacity: opacity.value,
|
|
@@ -30,21 +34,25 @@ const IntractionWithLifeCycleComponent = ({ children, interationTime }) => {
|
|
|
30
34
|
if (interationTime)
|
|
31
35
|
setInteractionsTimeOut(interationTime);
|
|
32
36
|
}, [interationTime]);
|
|
33
|
-
|
|
34
|
-
return (React.createElement(React.Fragment, null, interactionsComplete ? (React.createElement(Lifecycle, { renderWhenPhase: 3 /* LifecyclePhase.Restored */, loadingRenderer: LoadingComponent }, children)) : (React.createElement(Animated.View, { style: {
|
|
37
|
+
return (React.createElement(React.Fragment, null, interactionsComplete ? (React.createElement(LifecycleComponent, null, children)) : (React.createElement(Animated.View, { style: {
|
|
35
38
|
flex: 1,
|
|
36
39
|
opacity: opacity.value,
|
|
37
40
|
transform: [{ scale: opacity.value }],
|
|
38
41
|
} },
|
|
39
42
|
React.createElement(LoadingComponent, null)))));
|
|
40
43
|
};
|
|
41
|
-
export function withInteractionsManaged(component, interationTime) {
|
|
42
|
-
return (React.createElement(React.Fragment, null, Platform.OS === 'ios' ? (
|
|
44
|
+
export function withInteractionsManaged(component, interationTime, permissionKeys = null) {
|
|
45
|
+
return (React.createElement(React.Fragment, null, Platform.OS === 'ios' ? (React.createElement(React.Fragment, null,
|
|
46
|
+
React.createElement(React.Fragment, null, component))) : (React.createElement(IntractionComponent, { interationTime: interationTime },
|
|
47
|
+
React.createElement(React.Fragment, null, component)))));
|
|
43
48
|
}
|
|
44
|
-
export function withLifeCycleInteractionsManaged(component, interationTime) {
|
|
45
|
-
return (React.createElement(React.Fragment, null, Platform.OS === 'ios' ? (React.createElement(
|
|
49
|
+
export function withLifeCycleInteractionsManaged(component, interationTime, permissionKeys = null) {
|
|
50
|
+
return (React.createElement(React.Fragment, null, Platform.OS === 'ios' ? (React.createElement(LifecycleComponent, null,
|
|
51
|
+
React.createElement(React.Fragment, null, component))) : (React.createElement(IntractionWithLifeCycleComponent, { interationTime: interationTime },
|
|
52
|
+
React.createElement(React.Fragment, null, component)))));
|
|
46
53
|
}
|
|
47
|
-
export function withLifeCycleManaged(component) {
|
|
48
|
-
return (React.createElement(
|
|
54
|
+
export function withLifeCycleManaged(component, permissionKeys = null) {
|
|
55
|
+
return (React.createElement(LifecycleComponent, null,
|
|
56
|
+
React.createElement(React.Fragment, null, component)));
|
|
49
57
|
}
|
|
50
58
|
//# sourceMappingURL=with-interactions-lifecycle-managed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-interactions-lifecycle-managed.js","sourceRoot":"","sources":["../../src/components/with-interactions-lifecycle-managed.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"with-interactions-lifecycle-managed.js","sourceRoot":"","sources":["../../src/components/with-interactions-lifecycle-managed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC3B,oBAAC,MAAM,IAAC,IAAI,EAAE,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,IAC1D,oBAAC,OAAO,IAAC,KAAK,EAAE,UAAU,GAAI,CAC1B,CACZ,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,EAAE,QAAQ,EAAsB,EAAE,EAAE;IAC5D,MAAM,EAAE,aAAa,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAChD,IAAI,aAAa,EAAE,CAAC;QAChB,OAAO,CACH,oBAAC,SAAS,IAAC,eAAe,mCAA2B,eAAe,EAAE,gBAAgB,IACjF,QAAQ,CACD,CACf,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,OAAO,0CAAG,QAAQ,CAAI,CAAC;IAC3B,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,EAAE,QAAQ,EAAE,cAAc,EAA8C,EAAE,EAAE;IACrG,MAAM,EAAE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ACN,CAAC,CAAC;AAEF,MAAM,UAAU,uBAAuB,CAAC,SAAc,EAAE,cAAuB,EAAE,cAAc,GAAG,IAAI;IAClG,OAAO,CACH,0CACK,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CACrB;QACI,0CAAG,SAAS,CAAI,CAMjB,CACN,CAAC,CAAC,CAAC,CACA,oBAAC,mBAAmB,IAAC,cAAc,EAAE,cAAc;QAC/C,0CAAG,SAAS,CAAI,CAME,CACzB,CACF,CACN,CAAC;AACN,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,SAAc,EAAE,cAAuB,EAAE,cAAc,GAAG,IAAI;IAC3G,OAAO,CACH,0CACK,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CACrB,oBAAC,kBAAkB;QACf,0CAAG,SAAS,CAAI,CAMC,CACxB,CAAC,CAAC,CAAC,CACA,oBAAC,gCAAgC,IAAC,cAAc,EAAE,cAAc;QAC5D,0CAAG,SAAS,CAAI,CAMe,CACtC,CACF,CACN,CAAC;AACN,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,SAAc,EAAE,cAAc,GAAG,IAAI;IACtE,OAAO,CACH,oBAAC,kBAAkB;QACf,0CAAG,SAAS,CAAI,CAMC,CACxB,CAAC;AACN,CAAC"}
|
|
@@ -7,12 +7,12 @@ declare const _default: import("react-redux").ConnectedComponent<React.FC<any>,
|
|
|
7
7
|
[x: string]: any;
|
|
8
8
|
[x: number]: any;
|
|
9
9
|
[x: symbol]: any;
|
|
10
|
-
context?: React.Context<import("react-redux").ReactReduxContextValue<any, UnknownAction>>;
|
|
11
|
-
store?: import("redux").Store
|
|
10
|
+
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
|
|
11
|
+
store?: import("redux").Store<any, import("redux").UnknownAction, unknown>;
|
|
12
12
|
} | {
|
|
13
13
|
[x: string]: any;
|
|
14
14
|
[x: number]: any;
|
|
15
15
|
[x: symbol]: any;
|
|
16
|
-
store?: import("redux").Store
|
|
16
|
+
store?: import("redux").Store<any, import("redux").UnknownAction, unknown>;
|
|
17
17
|
}>;
|
|
18
18
|
export default _default;
|