@dgui/react-native 0.3.1 → 1.0.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/dist/Components/Drawers/Tabs/Context/Scene.d.ts +2 -2
- package/dist/Components/Drawers/Tabs/Context/Scene.js +1 -1
- package/dist/Components/Drawers/Tabs/Context/index.d.ts +1 -1
- package/dist/Components/Drawers/Tabs/Context/index.js +1 -1
- package/dist/Components/Drawers/Tabs/Scene.d.ts +1 -1
- package/dist/Components/Drawers/Tabs/Scene.js +2 -2
- package/dist/Components/Drawers/Tabs/index.js +1 -1
- package/dist/Components/Drawers/index.d.ts +2 -2
- package/dist/Components/Drawers/index.js +1 -1
- package/dist/Components/NativeAppBar/index.js +1 -1
- package/dist/Components/NativeDrawer/index.js +1 -1
- package/dist/Components/NativeDrawerBar/index.js +1 -1
- package/dist/Components/NativeTab/index.js +1 -1
- package/dist/Components/Tabs/Scene.d.ts +1 -1
- package/dist/Components/Tabs/Scene.js +1 -1
- package/dist/Components/Tabs/index.js +1 -1
- package/dist/Generics/NativeCarousel/NativeCarousel.js +1 -1
- package/dist/Generics/NativeCarousel/NativeHorse.d.ts +1 -1
- package/dist/Generics/NativeGateway/NativeGatewayDest.d.ts +1 -1
- package/dist/Generics/NativeGateway/NativeGatewayProvider.js +1 -1
- package/dist/ReactNativeDigest.js +1 -1
- package/package.json +19 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const SceneSwiperSlide: import("react").NamedExoticComponent<SceneProps>;
|
|
3
3
|
export type SceneProps = {
|
|
4
|
-
drawerId: string;
|
|
5
|
-
tabId: string;
|
|
4
|
+
readonly drawerId: string;
|
|
5
|
+
readonly tabId: string;
|
|
6
6
|
};
|
|
7
7
|
export default SceneSwiperSlide;
|
|
@@ -11,7 +11,7 @@ const Scene = ({ tabId, drawerId }) => {
|
|
|
11
11
|
const gatewayId = (0, react_1.useMemo)(() => {
|
|
12
12
|
return `drawer-${drawerId}-${tabId}`;
|
|
13
13
|
}, []);
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeHorse,
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeHorse, { swipe: swipe, children: (0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGatewayDest, { gatewayId: gatewayId }) }));
|
|
15
15
|
};
|
|
16
16
|
Scene.displayName = 'NativeDrawerTabsSceneContextScene';
|
|
17
17
|
const SceneSwiperSlide = (0, react_1.memo)(Scene);
|
|
@@ -3,5 +3,5 @@ import { type NativeCarouselProps } from '../../../../Generics/NativeCarousel';
|
|
|
3
3
|
declare const _default: import("react").NamedExoticComponent<ContextProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export type ContextProps = NativeCarouselProps & {
|
|
6
|
-
drawerId: string;
|
|
6
|
+
readonly drawerId: string;
|
|
7
7
|
};
|
|
@@ -45,7 +45,7 @@ const Context = ({ drawerId, tabIndex: givenTabIndex, onSelectTab }) => {
|
|
|
45
45
|
drawerId,
|
|
46
46
|
tabOrder
|
|
47
47
|
]);
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeCarousel,
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeCarousel, { onSelectTab: handleSelectTab, swipe: false, tabIndex: tabIndex, children: tabs }));
|
|
49
49
|
};
|
|
50
50
|
Context.displayName = 'NativeDrawerTabsSceneContext';
|
|
51
51
|
exports.default = (0, react_1.memo)(Context);
|
|
@@ -15,9 +15,9 @@ const Scene = ({ drawerId }) => {
|
|
|
15
15
|
const gatewayId = (0, react_1.useMemo)(() => {
|
|
16
16
|
return `drawer-${drawerId}`;
|
|
17
17
|
}, []);
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeHorse,
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeHorse, { swipe: swipe, children: tabId ?
|
|
19
19
|
((0, jsx_runtime_1.jsx)(Context_1.default, { drawerId: drawerId })) :
|
|
20
|
-
((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGatewayDest, { gatewayId: gatewayId })) }))
|
|
20
|
+
((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGatewayDest, { gatewayId: gatewayId })) }));
|
|
21
21
|
};
|
|
22
22
|
Scene.displayName = 'NativeDrawerTabsScene';
|
|
23
23
|
const SceneSwiperSlide = (0, react_1.memo)(Scene);
|
|
@@ -44,7 +44,7 @@ const Drawers = ({ tabIndex: givenDrawerIndex, onSelectTab: onSelectDrawer }) =>
|
|
|
44
44
|
}, [
|
|
45
45
|
drawerOrder
|
|
46
46
|
]);
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeCarousel,
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeCarousel, { onSelectTab: handleSelectTab, tabIndex: drawerIndex, children: drawers }));
|
|
48
48
|
};
|
|
49
49
|
Drawers.displayName = 'NativeDrawerTabs';
|
|
50
50
|
exports.default = (0, react_1.memo)(Drawers);
|
|
@@ -2,6 +2,6 @@ import { type FunctionComponent, type PropsWithChildren } from 'react';
|
|
|
2
2
|
declare const Drawers: FunctionComponent<DrawersProps>;
|
|
3
3
|
export default Drawers;
|
|
4
4
|
export type DrawersProps = PropsWithChildren<{
|
|
5
|
-
drawerIndex?: number;
|
|
6
|
-
onSelectDrawer?: (drawerIndex: number) => void;
|
|
5
|
+
readonly drawerIndex?: number;
|
|
6
|
+
readonly onSelectDrawer?: (drawerIndex: number) => void;
|
|
7
7
|
}>;
|
|
@@ -17,7 +17,7 @@ const Drawers = ({ children, drawerIndex, onSelectDrawer }) => {
|
|
|
17
17
|
drawerIndex,
|
|
18
18
|
onSelectDrawer
|
|
19
19
|
]);
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(react_native_shared_1.NativeBaseDrawers,
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(react_native_shared_1.NativeBaseDrawers, { drawerContent: appBar, open: drawerOpen, children: children }));
|
|
21
21
|
};
|
|
22
22
|
Drawers.displayName = 'NativeDrawers';
|
|
23
23
|
exports.default = Drawers;
|
|
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const NativeGateway_1 = require("../../Generics/NativeGateway");
|
|
5
5
|
const react_native_shared_1 = require("@dgui/react-native-shared");
|
|
6
6
|
const NativeAppBar = ({ children }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway,
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway, { gatewayId: 'ReactNativeDigestAppBar', children: children !== null && children !== void 0 ? children : (0, jsx_runtime_1.jsx)(react_native_shared_1.AppBar, {}) }));
|
|
8
8
|
};
|
|
9
9
|
NativeAppBar.displayName = 'NativeAppBar';
|
|
10
10
|
exports.default = NativeAppBar;
|
|
@@ -32,7 +32,7 @@ const NativeDrawer = (_a) => {
|
|
|
32
32
|
removeDrawer(drawerId);
|
|
33
33
|
};
|
|
34
34
|
}, []);
|
|
35
|
-
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway,
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway, { gatewayId: gatewayId, children: children }));
|
|
36
36
|
};
|
|
37
37
|
NativeDrawer.displayName = 'NativeDrawer';
|
|
38
38
|
exports.default = NativeDrawer;
|
|
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const NativeGateway_1 = require("../../Generics/NativeGateway");
|
|
5
5
|
const react_native_shared_1 = require("@dgui/react-native-shared");
|
|
6
6
|
const NativeDrawerBar = ({ children }) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway,
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway, { gatewayId: 'ReactNativeDigestDrawerBar', children: children !== null && children !== void 0 ? children : (0, jsx_runtime_1.jsx)(react_native_shared_1.DrawerBar, {}) }));
|
|
8
8
|
};
|
|
9
9
|
NativeDrawerBar.displayName = 'NativeDrawerBar';
|
|
10
10
|
exports.default = NativeDrawerBar;
|
|
@@ -30,7 +30,7 @@ const NativeTab = (_a) => {
|
|
|
30
30
|
removeTab(tabId);
|
|
31
31
|
};
|
|
32
32
|
}, []);
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway,
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGateway, { gatewayId: gatewayId, children: children }));
|
|
34
34
|
};
|
|
35
35
|
NativeTab.displayName = 'NativeTab';
|
|
36
36
|
exports.default = NativeTab;
|
|
@@ -11,7 +11,7 @@ const Scene = ({ tabId }) => {
|
|
|
11
11
|
const gatewayId = (0, react_1.useMemo)(() => {
|
|
12
12
|
return `tab-${tabId}`;
|
|
13
13
|
}, []);
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeHorse,
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeHorse, { swipe: swipe, children: (0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGatewayDest, { gatewayId: gatewayId }) }));
|
|
15
15
|
};
|
|
16
16
|
const SceneSwiperSlide = (0, react_1.memo)(Scene);
|
|
17
17
|
SceneSwiperSlide.displayName = 'SceneSwiperSlide';
|
|
@@ -45,6 +45,6 @@ const Tabs = ({ tabIndex: givenTabIndex, onSelectTab }) => {
|
|
|
45
45
|
}, [
|
|
46
46
|
tabOrder
|
|
47
47
|
]);
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeCarousel,
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(NativeCarousel_1.NativeCarousel, { onSelectTab: handleSelectTab, tabIndex: tabIndex, children: tabs }));
|
|
49
49
|
};
|
|
50
50
|
exports.default = (0, react_1.memo)(Tabs);
|
|
@@ -33,7 +33,7 @@ const NativeCarousel = ({ children, onSelectTab, swipe = true, tabIndex = 0 }) =
|
|
|
33
33
|
}, [
|
|
34
34
|
tabIndex
|
|
35
35
|
]);
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(react_native_pager_view_1.default,
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(react_native_pager_view_1.default, { initialPage: tabIndex, offscreenPageLimit: OFFSCREEN_LIMIT, onPageSelected: handlePageSelected, overScrollMode: OVERSCROLL_MODE, overdrag: OVERDRAG, pageMargin: PAGE_MARGIN, ref: pager, scrollEnabled: swipe, style: styles.pagerView, children: children }));
|
|
37
37
|
};
|
|
38
38
|
NativeCarousel.displayName = 'NativeCarousel';
|
|
39
39
|
exports.default = NativeCarousel;
|
|
@@ -2,5 +2,5 @@ import { type FunctionComponent, type PropsWithChildren } from 'react';
|
|
|
2
2
|
declare const NativeHorse: FunctionComponent<NativeHorseProps>;
|
|
3
3
|
export default NativeHorse;
|
|
4
4
|
export type NativeHorseProps = PropsWithChildren<{
|
|
5
|
-
swipe?: boolean;
|
|
5
|
+
readonly swipe?: boolean;
|
|
6
6
|
}>;
|
|
@@ -4,5 +4,5 @@ import { type ViewStyle } from 'react-native';
|
|
|
4
4
|
declare const NativeGatewayDest: FunctionComponent<NativeGatewayDestProps>;
|
|
5
5
|
export default NativeGatewayDest;
|
|
6
6
|
export type NativeGatewayDestProps = GatewayDestProps & {
|
|
7
|
-
style?: ViewStyle;
|
|
7
|
+
readonly style?: ViewStyle;
|
|
8
8
|
};
|
|
@@ -82,7 +82,7 @@ const NativeGatewayProvider = ({ children: providerChildren }) => {
|
|
|
82
82
|
removeContainer,
|
|
83
83
|
unregister
|
|
84
84
|
]);
|
|
85
|
-
return ((0, jsx_runtime_1.jsx)(NativeGatewayContext_1.default.Provider,
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(NativeGatewayContext_1.default.Provider, { value: value, children: providerChildren }));
|
|
86
86
|
};
|
|
87
87
|
NativeGatewayProvider.displayName = 'NativeGatewayProvider';
|
|
88
88
|
exports.default = NativeGatewayProvider;
|
|
@@ -15,7 +15,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
const ReactNativeDigest = ({ children, drawerIndex, onSelectDrawer, onSelectTab, tabIndex }) => {
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(Providers_1.default, { children: [(0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGatewayDest, { gatewayId: 'ReactNativeDigestAppBar', style: styles.appbar }), (0, jsx_runtime_1.jsx)(Drawers_1.default,
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(Providers_1.default, { children: [(0, jsx_runtime_1.jsx)(NativeGateway_1.NativeGatewayDest, { gatewayId: 'ReactNativeDigestAppBar', style: styles.appbar }), (0, jsx_runtime_1.jsx)(Drawers_1.default, { drawerIndex: drawerIndex, onSelectDrawer: onSelectDrawer, children: (0, jsx_runtime_1.jsx)(Tabs_1.default, { onSelectTab: onSelectTab, tabIndex: tabIndex }) }), children] }));
|
|
19
19
|
};
|
|
20
20
|
ReactNativeDigest.displayName = 'ReactNativeDigest';
|
|
21
21
|
exports.default = ReactNativeDigest;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dgui/react-native",
|
|
3
3
|
"title": "Digested React GUI Native Components",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "1.0.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"description": "Native Components for a boilerplate React GUI",
|
|
8
8
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
@@ -43,35 +43,35 @@
|
|
|
43
43
|
"set:version": "npm version --allow-same-version --no-commit-hooks --no-git-tag-version --no-workspaces-update $(npm --silent view $(node -p \"require('./package.json').name\") version)"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@digest/eslint-config-jest": "^4.2.
|
|
47
|
-
"@digest/eslint-config-react": "^4.2.
|
|
48
|
-
"@digest/eslint-config-typescript": "^4.2.
|
|
49
|
-
"@digest/jest-junit": "^4.2.
|
|
50
|
-
"@digest/jest-react": "^4.2.
|
|
51
|
-
"@digest/jest-typescript": "^4.2.
|
|
52
|
-
"@digest/typescript": "^4.2.
|
|
53
|
-
"@types/jest": "^29.5.
|
|
54
|
-
"@types/react": "^18.
|
|
55
|
-
"@types/react-native": "^0.
|
|
46
|
+
"@digest/eslint-config-jest": "^4.2.5",
|
|
47
|
+
"@digest/eslint-config-react": "^4.2.5",
|
|
48
|
+
"@digest/eslint-config-typescript": "^4.2.5",
|
|
49
|
+
"@digest/jest-junit": "^4.2.5",
|
|
50
|
+
"@digest/jest-react": "^4.2.5",
|
|
51
|
+
"@digest/jest-typescript": "^4.2.5",
|
|
52
|
+
"@digest/typescript": "^4.2.5",
|
|
53
|
+
"@types/jest": "^29.5.3",
|
|
54
|
+
"@types/react": "^18.2.17",
|
|
55
|
+
"@types/react-native": "^0.72.2",
|
|
56
56
|
"@types/react-test-renderer": "^18.0.0",
|
|
57
57
|
"cross-env": "^7.0.3",
|
|
58
|
-
"jest-environment-jsdom": "^29.
|
|
58
|
+
"jest-environment-jsdom": "^29.6.2",
|
|
59
59
|
"jest-environment-jsdom-global": "^4.0.0",
|
|
60
60
|
"npm-run-all": "^4.1.5",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
|
-
"react-native": "^0.
|
|
62
|
+
"react-native": "^0.72.3",
|
|
63
63
|
"react-native-pager-view": "^7.0.0-rc.0",
|
|
64
|
-
"react-native-reanimated": "^3.1
|
|
64
|
+
"react-native-reanimated": "^3.4.1",
|
|
65
65
|
"react-test-renderer": "^18.2.0",
|
|
66
|
-
"rimraf": "^5.0.
|
|
66
|
+
"rimraf": "^5.0.1"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@dgui/react-native-shared": "^0.0
|
|
70
|
-
"@dgui/react-shared": "^0.0
|
|
69
|
+
"@dgui/react-native-shared": "^1.0.0",
|
|
70
|
+
"@dgui/react-shared": "^1.0.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
74
|
-
"react-native": "^0.
|
|
74
|
+
"react-native": "^0.72.0",
|
|
75
75
|
"react-native-pager-view": "^6.0.0 || ^7.0.0-rc.0",
|
|
76
76
|
"react-native-reanimated": "^2.0.0 || ^3.0.0"
|
|
77
77
|
},
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"react-native",
|
|
84
84
|
"typescript"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "ac0d0964d66c9c11f50b625d5ca5aec4e20bb72a"
|
|
87
87
|
}
|