@common-stack/client-react 0.5.1-alpha.2 → 0.5.1-alpha.3
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/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interfaces/menu.d.ts +1 -6
- package/lib/interfaces/menu.js +0 -5
- package/lib/interfaces/menu.js.map +1 -1
- package/lib/route/get-routes.js +2 -2
- package/lib/route/old/get-menus.js +2 -2
- package/lib/route/react-navigation/get-navigation-utils.js +2 -2
- package/lib/route/root-navigation.d.ts +2 -0
- package/lib/route/root-navigation.js +9 -0
- package/lib/route/root-navigation.js.map +1 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { ClientTypes } from '@common-stack/client-core';
|
|
|
2
2
|
export * from './connector';
|
|
3
3
|
export * from './router-factory';
|
|
4
4
|
export * from './route';
|
|
5
|
-
export * from './route/
|
|
5
|
+
export * from './route/root-navigation';
|
|
6
6
|
export * from './utils';
|
|
7
7
|
export * from './interfaces';
|
|
8
8
|
export * from './plugin-area';
|
package/lib/index.js
CHANGED
|
@@ -20,7 +20,7 @@ Object.defineProperty(exports, "ClientTypes", { enumerable: true, get: function
|
|
|
20
20
|
__exportStar(require("./connector"), exports);
|
|
21
21
|
__exportStar(require("./router-factory"), exports);
|
|
22
22
|
__exportStar(require("./route"), exports);
|
|
23
|
-
__exportStar(require("./route/
|
|
23
|
+
__exportStar(require("./route/root-navigation"), exports);
|
|
24
24
|
__exportStar(require("./utils"), exports);
|
|
25
25
|
__exportStar(require("./interfaces"), exports);
|
|
26
26
|
__exportStar(require("./plugin-area"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAwD;AAA/C,0GAAA,WAAW,OAAA;AACpB,8CAA4B;AAC5B,mDAAiC;AACjC,0CAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAwD;AAA/C,0GAAA,WAAW,OAAA;AACpB,8CAA4B;AAC5B,mDAAiC;AACjC,0CAAwB;AACxB,0DAAwC;AACxC,0CAAwB;AACxB,+CAA6B;AAC7B,gDAA8B;AAC9B,4DAA0C;AAC1C,8CAA4B"}
|
package/lib/interfaces/menu.d.ts
CHANGED
package/lib/interfaces/menu.js
CHANGED
|
@@ -8,10 +8,5 @@ var IMenuPosition;
|
|
|
8
8
|
IMenuPosition["MIDDLE"] = "MIDDLE";
|
|
9
9
|
IMenuPosition["LOWER"] = "LOWER";
|
|
10
10
|
IMenuPosition["BOTTOM"] = "BOTTOM";
|
|
11
|
-
IMenuPosition["Logo"] = "LOGO";
|
|
12
|
-
IMenuPosition["Upper"] = "UPPER";
|
|
13
|
-
IMenuPosition["Middle"] = "MIDDLE";
|
|
14
|
-
IMenuPosition["Lower"] = "LOWER";
|
|
15
|
-
IMenuPosition["Bottom"] = "BOTTOM";
|
|
16
11
|
})(IMenuPosition = exports.IMenuPosition || (exports.IMenuPosition = {}));
|
|
17
12
|
//# sourceMappingURL=menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/interfaces/menu.tsx"],"names":[],"mappings":";;;AAsGA,IAAY,
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/interfaces/menu.tsx"],"names":[],"mappings":";;;AAsGA,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,kCAAiB,CAAA;AACrB,CAAC,EANW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAMxB"}
|
package/lib/route/get-routes.js
CHANGED
|
@@ -31,13 +31,13 @@ function getRoutes(path, routeData, authWrapper = null) {
|
|
|
31
31
|
return menuPath.indexOf(searchPath) === 0 || menuPath === path;
|
|
32
32
|
});
|
|
33
33
|
const mappedMenuPaths = routes.map(mPath => {
|
|
34
|
-
return Object.assign({ route: mPath, position: interfaces_1.IMenuPosition.
|
|
34
|
+
return Object.assign({ route: mPath, position: interfaces_1.IMenuPosition.MIDDLE }, routeData[mPath]);
|
|
35
35
|
});
|
|
36
36
|
const root = {
|
|
37
37
|
// just to satisfy types added following
|
|
38
38
|
// TOOD need to correct types so we don't have to enter them.
|
|
39
39
|
name: 'root',
|
|
40
|
-
position: interfaces_1.IMenuPosition.
|
|
40
|
+
position: interfaces_1.IMenuPosition.LOGO,
|
|
41
41
|
};
|
|
42
42
|
mappedMenuPaths.forEach(routeItem => {
|
|
43
43
|
const children = routeItem.route.split('/');
|
|
@@ -25,13 +25,13 @@ function getMenus(path, menuData) {
|
|
|
25
25
|
return menuPath.indexOf(searchPath) === 0 || menuPath === path;
|
|
26
26
|
});
|
|
27
27
|
const mappedMenuPaths = routes.map(mPath => {
|
|
28
|
-
return Object.assign({ route: mPath, position: interfaces_1.IMenuPosition.
|
|
28
|
+
return Object.assign({ route: mPath, position: interfaces_1.IMenuPosition.MIDDLE }, menuData[mPath]);
|
|
29
29
|
});
|
|
30
30
|
const root = {
|
|
31
31
|
// just to satisfy types added following
|
|
32
32
|
// TOOD need to correct types so we don't have to enter them.
|
|
33
33
|
name: 'root',
|
|
34
|
-
position: interfaces_1.IMenuPosition.
|
|
34
|
+
position: interfaces_1.IMenuPosition.LOGO,
|
|
35
35
|
};
|
|
36
36
|
mappedMenuPaths.forEach(menutItem => {
|
|
37
37
|
const children = menutItem.route.split('/');
|
|
@@ -50,13 +50,13 @@ function getNavigation(path, routeData, authWrapper) {
|
|
|
50
50
|
return menuPath.indexOf(searchPath) === 0 || menuPath === path;
|
|
51
51
|
});
|
|
52
52
|
const mappedMenuPaths = childrens.map(mPath => {
|
|
53
|
-
return Object.assign({ route: mPath, position: interfaces_1.IMenuPosition.
|
|
53
|
+
return Object.assign({ route: mPath, position: interfaces_1.IMenuPosition.MIDDLE }, routeData[mPath]);
|
|
54
54
|
});
|
|
55
55
|
const root = {
|
|
56
56
|
// just to satisfy types added following
|
|
57
57
|
// TOOD need to correct types so we don't have to enter them.
|
|
58
58
|
name: 'root',
|
|
59
|
-
position: interfaces_1.IMenuPosition.
|
|
59
|
+
position: interfaces_1.IMenuPosition.LOGO,
|
|
60
60
|
};
|
|
61
61
|
mappedMenuPaths.forEach(routeItem => {
|
|
62
62
|
var _a, _b, _c;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.navigate = exports.navigationRef = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.navigationRef = (0, react_1.createRef)();
|
|
6
|
+
function navigate(name, params) {
|
|
7
|
+
}
|
|
8
|
+
exports.navigate = navigate;
|
|
9
|
+
//# sourceMappingURL=root-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-navigation.js","sourceRoot":"","sources":["../../src/route/root-navigation.tsx"],"names":[],"mappings":";;;AAAA,iCAAkC;AAErB,QAAA,aAAa,GAAQ,IAAA,iBAAS,GAAE,CAAA;AAE7C,SAAgB,QAAQ,CAAC,IAAY,EAAE,MAAa;AAEpD,CAAC;AAFD,4BAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@common-stack/client-react",
|
|
3
|
-
"version": "0.5.1-alpha.
|
|
3
|
+
"version": "0.5.1-alpha.3",
|
|
4
4
|
"description": "browser plugin for git",
|
|
5
5
|
"homepage": "https://github.com/cdmbase/fullstack-pro#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "7dd4d1dcf70ebd886dcc9c2869f24586d65a3c2b",
|
|
52
52
|
"typescript": {
|
|
53
53
|
"definition": "lib/index.d.ts"
|
|
54
54
|
}
|