@celljs/react 3.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/LICENSE +21 -0
- package/README.md +1 -0
- package/cell-cdn.yml +11 -0
- package/cell.yml +8 -0
- package/lib/browser/annotation/app.d.ts +3 -0
- package/lib/browser/annotation/app.d.ts.map +1 -0
- package/lib/browser/annotation/app.js +12 -0
- package/lib/browser/annotation/app.js.map +1 -0
- package/lib/browser/annotation/context.d.ts +3 -0
- package/lib/browser/annotation/context.d.ts.map +1 -0
- package/lib/browser/annotation/context.js +12 -0
- package/lib/browser/annotation/context.js.map +1 -0
- package/lib/browser/annotation/default-layout.d.ts +3 -0
- package/lib/browser/annotation/default-layout.d.ts.map +1 -0
- package/lib/browser/annotation/default-layout.js +12 -0
- package/lib/browser/annotation/default-layout.js.map +1 -0
- package/lib/browser/annotation/icon.d.ts +3 -0
- package/lib/browser/annotation/icon.d.ts.map +1 -0
- package/lib/browser/annotation/icon.js +12 -0
- package/lib/browser/annotation/icon.js.map +1 -0
- package/lib/browser/annotation/index.d.ts +9 -0
- package/lib/browser/annotation/index.d.ts.map +1 -0
- package/lib/browser/annotation/index.js +25 -0
- package/lib/browser/annotation/index.js.map +1 -0
- package/lib/browser/annotation/react-component.d.ts +4 -0
- package/lib/browser/annotation/react-component.d.ts.map +1 -0
- package/lib/browser/annotation/react-component.js +11 -0
- package/lib/browser/annotation/react-component.js.map +1 -0
- package/lib/browser/annotation/route.d.ts +3 -0
- package/lib/browser/annotation/route.d.ts.map +1 -0
- package/lib/browser/annotation/route.js +24 -0
- package/lib/browser/annotation/route.js.map +1 -0
- package/lib/browser/annotation/router.d.ts +3 -0
- package/lib/browser/annotation/router.d.ts.map +1 -0
- package/lib/browser/annotation/router.js +12 -0
- package/lib/browser/annotation/router.js.map +1 -0
- package/lib/browser/annotation/view.d.ts +3 -0
- package/lib/browser/annotation/view.d.ts.map +1 -0
- package/lib/browser/annotation/view.js +11 -0
- package/lib/browser/annotation/view.js.map +1 -0
- package/lib/browser/app/app-protocol.d.ts +2 -0
- package/lib/browser/app/app-protocol.d.ts.map +1 -0
- package/lib/browser/app/app-protocol.js +5 -0
- package/lib/browser/app/app-protocol.js.map +1 -0
- package/lib/browser/app/app.d.ts +9 -0
- package/lib/browser/app/app.d.ts.map +1 -0
- package/lib/browser/app/app.js +41 -0
- package/lib/browser/app/app.js.map +1 -0
- package/lib/browser/app/index.d.ts +3 -0
- package/lib/browser/app/index.d.ts.map +1 -0
- package/lib/browser/app/index.js +19 -0
- package/lib/browser/app/index.js.map +1 -0
- package/lib/browser/context/context-protocol.d.ts +6 -0
- package/lib/browser/context/context-protocol.d.ts.map +1 -0
- package/lib/browser/context/context-protocol.js +6 -0
- package/lib/browser/context/context-protocol.js.map +1 -0
- package/lib/browser/context/context-provider.d.ts +8 -0
- package/lib/browser/context/context-provider.d.ts.map +1 -0
- package/lib/browser/context/context-provider.js +35 -0
- package/lib/browser/context/context-provider.js.map +1 -0
- package/lib/browser/context/context.d.ts +10 -0
- package/lib/browser/context/context.d.ts.map +1 -0
- package/lib/browser/context/context.js +22 -0
- package/lib/browser/context/context.js.map +1 -0
- package/lib/browser/context/index.d.ts +4 -0
- package/lib/browser/context/index.d.ts.map +1 -0
- package/lib/browser/context/index.js +20 -0
- package/lib/browser/context/index.js.map +1 -0
- package/lib/browser/icon/icon-protocol.d.ts +7 -0
- package/lib/browser/icon/icon-protocol.d.ts.map +1 -0
- package/lib/browser/icon/icon-protocol.js +6 -0
- package/lib/browser/icon/icon-protocol.js.map +1 -0
- package/lib/browser/icon/icon.d.ts +2 -0
- package/lib/browser/icon/icon.d.ts.map +1 -0
- package/lib/browser/icon/icon.js +20 -0
- package/lib/browser/icon/icon.js.map +1 -0
- package/lib/browser/icon/index.d.ts +2 -0
- package/lib/browser/icon/index.d.ts.map +1 -0
- package/lib/browser/icon/index.js +18 -0
- package/lib/browser/icon/index.js.map +1 -0
- package/lib/browser/index.d.ts +12 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +28 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/layout/index.d.ts +3 -0
- package/lib/browser/layout/index.d.ts.map +1 -0
- package/lib/browser/layout/index.js +19 -0
- package/lib/browser/layout/index.js.map +1 -0
- package/lib/browser/layout/layout-protocol.d.ts +2 -0
- package/lib/browser/layout/layout-protocol.d.ts.map +1 -0
- package/lib/browser/layout/layout-protocol.js +5 -0
- package/lib/browser/layout/layout-protocol.js.map +1 -0
- package/lib/browser/layout/layout.d.ts +5 -0
- package/lib/browser/layout/layout.d.ts.map +1 -0
- package/lib/browser/layout/layout.js +22 -0
- package/lib/browser/layout/layout.js.map +1 -0
- package/lib/browser/locale/index.d.ts +3 -0
- package/lib/browser/locale/index.d.ts.map +1 -0
- package/lib/browser/locale/index.js +19 -0
- package/lib/browser/locale/index.js.map +1 -0
- package/lib/browser/locale/locale-context.d.ts +8 -0
- package/lib/browser/locale/locale-context.d.ts.map +1 -0
- package/lib/browser/locale/locale-context.js +38 -0
- package/lib/browser/locale/locale-context.js.map +1 -0
- package/lib/browser/locale/locale-protocol.d.ts +2 -0
- package/lib/browser/locale/locale-protocol.d.ts.map +1 -0
- package/lib/browser/locale/locale-protocol.js +5 -0
- package/lib/browser/locale/locale-protocol.js.map +1 -0
- package/lib/browser/module.d.ts +4 -0
- package/lib/browser/module.d.ts.map +1 -0
- package/lib/browser/module.js +6 -0
- package/lib/browser/module.js.map +1 -0
- package/lib/browser/resolver/index.d.ts +3 -0
- package/lib/browser/resolver/index.d.ts.map +1 -0
- package/lib/browser/resolver/index.js +19 -0
- package/lib/browser/resolver/index.js.map +1 -0
- package/lib/browser/resolver/path-resolver.d.ts +6 -0
- package/lib/browser/resolver/path-resolver.d.ts.map +1 -0
- package/lib/browser/resolver/path-resolver.js +28 -0
- package/lib/browser/resolver/path-resolver.js.map +1 -0
- package/lib/browser/resolver/resolver-protocol.d.ts +5 -0
- package/lib/browser/resolver/resolver-protocol.d.ts.map +1 -0
- package/lib/browser/resolver/resolver-protocol.js +5 -0
- package/lib/browser/resolver/resolver-protocol.js.map +1 -0
- package/lib/browser/router/index.d.ts +6 -0
- package/lib/browser/router/index.d.ts.map +1 -0
- package/lib/browser/router/index.js +22 -0
- package/lib/browser/router/index.js.map +1 -0
- package/lib/browser/router/route-metadata-converter-provider.d.ts +7 -0
- package/lib/browser/router/route-metadata-converter-provider.d.ts.map +1 -0
- package/lib/browser/router/route-metadata-converter-provider.js +35 -0
- package/lib/browser/router/route-metadata-converter-provider.js.map +1 -0
- package/lib/browser/router/route-metadata-converter.d.ts +11 -0
- package/lib/browser/router/route-metadata-converter.d.ts.map +1 -0
- package/lib/browser/router/route-metadata-converter.js +51 -0
- package/lib/browser/router/route-metadata-converter.js.map +1 -0
- package/lib/browser/router/route-metadata-provider.d.ts +10 -0
- package/lib/browser/router/route-metadata-provider.d.ts.map +1 -0
- package/lib/browser/router/route-metadata-provider.js +49 -0
- package/lib/browser/router/route-metadata-provider.js.map +1 -0
- package/lib/browser/router/router-protocol.d.ts +24 -0
- package/lib/browser/router/router-protocol.d.ts.map +1 -0
- package/lib/browser/router/router-protocol.js +9 -0
- package/lib/browser/router/router-protocol.js.map +1 -0
- package/lib/browser/router/router.d.ts +3 -0
- package/lib/browser/router/router.d.ts.map +1 -0
- package/lib/browser/router/router.js +53 -0
- package/lib/browser/router/router.js.map +1 -0
- package/lib/browser/shell/index.d.ts +2 -0
- package/lib/browser/shell/index.d.ts.map +1 -0
- package/lib/browser/shell/index.js +18 -0
- package/lib/browser/shell/index.js.map +1 -0
- package/lib/browser/shell/shell.d.ts +7 -0
- package/lib/browser/shell/shell.d.ts.map +1 -0
- package/lib/browser/shell/shell.js +31 -0
- package/lib/browser/shell/shell.js.map +1 -0
- package/lib/browser/slot/index.d.ts +2 -0
- package/lib/browser/slot/index.d.ts.map +1 -0
- package/lib/browser/slot/index.js +18 -0
- package/lib/browser/slot/index.js.map +1 -0
- package/lib/browser/slot/slot.d.ts +4 -0
- package/lib/browser/slot/slot.d.ts.map +1 -0
- package/lib/browser/slot/slot.js +20 -0
- package/lib/browser/slot/slot.js.map +1 -0
- package/lib/browser/widget/index.d.ts +2 -0
- package/lib/browser/widget/index.d.ts.map +1 -0
- package/lib/browser/widget/index.js +18 -0
- package/lib/browser/widget/index.js.map +1 -0
- package/lib/browser/widget/widget-factory.d.ts +6 -0
- package/lib/browser/widget/widget-factory.d.ts.map +1 -0
- package/lib/browser/widget/widget-factory.js +23 -0
- package/lib/browser/widget/widget-factory.js.map +1 -0
- package/lib/hooks/webpack.d.ts +4 -0
- package/lib/hooks/webpack.d.ts.map +1 -0
- package/lib/hooks/webpack.js +166 -0
- package/lib/hooks/webpack.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +4 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +65 -0
- package/src/browser/annotation/app.ts +10 -0
- package/src/browser/annotation/context.ts +10 -0
- package/src/browser/annotation/default-layout.ts +10 -0
- package/src/browser/annotation/icon.ts +10 -0
- package/src/browser/annotation/index.ts +8 -0
- package/src/browser/annotation/react-component.ts +9 -0
- package/src/browser/annotation/route.ts +19 -0
- package/src/browser/annotation/router.ts +10 -0
- package/src/browser/annotation/view.ts +8 -0
- package/src/browser/app/app-protocol.ts +1 -0
- package/src/browser/app/app.tsx +25 -0
- package/src/browser/app/index.ts +2 -0
- package/src/browser/context/context-protocol.ts +8 -0
- package/src/browser/context/context-provider.ts +21 -0
- package/src/browser/context/context.tsx +16 -0
- package/src/browser/context/index.ts +3 -0
- package/src/browser/icon/icon-protocol.ts +9 -0
- package/src/browser/icon/icon.tsx +19 -0
- package/src/browser/icon/index.ts +1 -0
- package/src/browser/index.ts +11 -0
- package/src/browser/layout/index.ts +2 -0
- package/src/browser/layout/layout-protocol.ts +1 -0
- package/src/browser/layout/layout.tsx +10 -0
- package/src/browser/locale/index.ts +2 -0
- package/src/browser/locale/locale-context.tsx +30 -0
- package/src/browser/locale/locale-protocol.ts +1 -0
- package/src/browser/module.ts +4 -0
- package/src/browser/resolver/index.ts +2 -0
- package/src/browser/resolver/path-resolver.ts +13 -0
- package/src/browser/resolver/resolver-protocol.ts +5 -0
- package/src/browser/router/index.ts +5 -0
- package/src/browser/router/route-metadata-converter-provider.ts +19 -0
- package/src/browser/router/route-metadata-converter.ts +34 -0
- package/src/browser/router/route-metadata-provider.tsx +39 -0
- package/src/browser/router/router-protocol.ts +28 -0
- package/src/browser/router/router.tsx +44 -0
- package/src/browser/shell/index.ts +1 -0
- package/src/browser/shell/shell.tsx +16 -0
- package/src/browser/slot/index.ts +1 -0
- package/src/browser/slot/slot.tsx +18 -0
- package/src/browser/widget/index.ts +1 -0
- package/src/browser/widget/widget-factory.ts +13 -0
- package/src/hooks/webpack.ts +243 -0
- package/src/package.spec.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-protocol.js","sourceRoot":"","sources":["../../../src/browser/icon/icon-protocol.ts"],"names":[],"mappings":";;;AAEa,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAEtB,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/browser/icon/icon.tsx"],"names":[],"mappings":"AAMA,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,eAYnC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Icon = void 0;
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const core_1 = require("@celljs/core");
|
|
6
|
+
const icon_protocol_1 = require("./icon-protocol");
|
|
7
|
+
const { useState, useEffect } = React;
|
|
8
|
+
function Icon(iconProps) {
|
|
9
|
+
const [iconNode, setIconNode] = useState([]);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const resolve = async () => {
|
|
12
|
+
const iconResolver = core_1.ContainerUtil.get(icon_protocol_1.IconResolver);
|
|
13
|
+
setIconNode(await iconResolver.resolve(iconProps));
|
|
14
|
+
};
|
|
15
|
+
resolve();
|
|
16
|
+
}, [JSON.stringify(iconProps)]);
|
|
17
|
+
return (React.createElement(React.Fragment, null, iconNode));
|
|
18
|
+
}
|
|
19
|
+
exports.Icon = Icon;
|
|
20
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/browser/icon/icon.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,uCAA6C;AAC7C,mDAA+C;AAE/C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;AAEtC,SAAgB,IAAI,CAAI,SAAY;IAChC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC,CAAC;IAE9D,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;YACvB,MAAM,YAAY,GAAG,oBAAa,CAAC,GAAG,CAAkB,4BAAY,CAAC,CAAC;YACtE,WAAW,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;QACvD,CAAC,CAAC;QACF,OAAO,EAAE,CAAC;IACd,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEhC,OAAO,CAAC,0CAAG,QAAQ,CAAI,CAAC,CAAC;AAC7B,CAAC;AAZD,oBAYC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./icon-protocol"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/icon/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './annotation';
|
|
2
|
+
export * from './app';
|
|
3
|
+
export * from './layout';
|
|
4
|
+
export * from './context';
|
|
5
|
+
export * from './router';
|
|
6
|
+
export * from './shell';
|
|
7
|
+
export * from './resolver';
|
|
8
|
+
export * from './widget';
|
|
9
|
+
export * from './slot';
|
|
10
|
+
export * from './icon';
|
|
11
|
+
export * from './locale';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./annotation"), exports);
|
|
18
|
+
__exportStar(require("./app"), exports);
|
|
19
|
+
__exportStar(require("./layout"), exports);
|
|
20
|
+
__exportStar(require("./context"), exports);
|
|
21
|
+
__exportStar(require("./router"), exports);
|
|
22
|
+
__exportStar(require("./shell"), exports);
|
|
23
|
+
__exportStar(require("./resolver"), exports);
|
|
24
|
+
__exportStar(require("./widget"), exports);
|
|
25
|
+
__exportStar(require("./slot"), exports);
|
|
26
|
+
__exportStar(require("./icon"), exports);
|
|
27
|
+
__exportStar(require("./locale"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,wCAAsB;AACtB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,2CAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./layout-protocol"), exports);
|
|
18
|
+
__exportStar(require("./layout"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/layout/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,2CAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-protocol.d.ts","sourceRoot":"","sources":["../../../src/browser/layout/layout-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,eAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-protocol.js","sourceRoot":"","sources":["../../../src/browser/layout/layout-protocol.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/browser/layout/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,qBACa,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAE5D,MAAM;CAGlB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var EmptyLayout_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EmptyLayout = void 0;
|
|
11
|
+
const React = require("react");
|
|
12
|
+
const annotation_1 = require("../annotation");
|
|
13
|
+
let EmptyLayout = EmptyLayout_1 = class EmptyLayout extends React.Component {
|
|
14
|
+
render() {
|
|
15
|
+
return React.createElement(React.Fragment, null, this.props.children);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
EmptyLayout = EmptyLayout_1 = __decorate([
|
|
19
|
+
(0, annotation_1.DefaultLayout)(EmptyLayout_1, false)
|
|
20
|
+
], EmptyLayout);
|
|
21
|
+
exports.EmptyLayout = EmptyLayout;
|
|
22
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/browser/layout/layout.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,8CAA8C;AAGvC,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,KAAK,CAAC,SAAkC;IAE5D,MAAM;QACX,OAAO,0CAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAI,CAAC;IACtC,CAAC;CACJ,CAAA;AALY,WAAW;IADvB,IAAA,0BAAa,EAAC,aAAW,EAAE,KAAK,CAAC;GACrB,WAAW,CAKvB;AALY,kCAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/locale/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./locale-protocol"), exports);
|
|
18
|
+
__exportStar(require("./locale-context"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/locale/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function LocaleContext({ children }: React.PropsWithChildren): JSX.Element;
|
|
3
|
+
export declare namespace LocaleContext {
|
|
4
|
+
var priority: number;
|
|
5
|
+
}
|
|
6
|
+
export default class {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=locale-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-context.d.ts","sourceRoot":"","sources":["../../../src/browser/locale/locale-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,iBAAiB,eAiBlE;yBAjBe,aAAa;;;AAsB7B,MAAM,CAAC,OAAO;CAAS"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.LocaleContext = void 0;
|
|
10
|
+
const React = require("react");
|
|
11
|
+
const locale_protocol_1 = require("./locale-protocol");
|
|
12
|
+
const react_intl_1 = require("react-intl");
|
|
13
|
+
const core_1 = require("@celljs/core");
|
|
14
|
+
const widget_1 = require("@celljs/widget");
|
|
15
|
+
const annotation_1 = require("../annotation");
|
|
16
|
+
function LocaleContext({ children }) {
|
|
17
|
+
const localeManager = core_1.ContainerUtil.get(widget_1.LocaleManager);
|
|
18
|
+
const [locale, setLocale] = React.useState(localeManager.currentSubject.value);
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
const subscription = localeManager.currentSubject.subscribe(l => setLocale(l));
|
|
21
|
+
return () => subscription.unsubscribe();
|
|
22
|
+
}, []);
|
|
23
|
+
return (React.createElement(react_intl_1.IntlProvider, { locale: (locale === null || locale === void 0 ? void 0 : locale.lang) || navigator.language, messages: locale === null || locale === void 0 ? void 0 : locale.messages, onError: err => {
|
|
24
|
+
const logger = core_1.ContainerUtil.get(core_1.Logger);
|
|
25
|
+
if (err.code !== 'MISSING_TRANSLATION') {
|
|
26
|
+
logger.warn(err);
|
|
27
|
+
}
|
|
28
|
+
} }, children));
|
|
29
|
+
}
|
|
30
|
+
exports.LocaleContext = LocaleContext;
|
|
31
|
+
LocaleContext.priority = locale_protocol_1.LOCALE_REACT_CONTEXT_PRIORITY;
|
|
32
|
+
let default_1 = class {
|
|
33
|
+
};
|
|
34
|
+
default_1 = __decorate([
|
|
35
|
+
(0, annotation_1.Context)(LocaleContext)
|
|
36
|
+
], default_1);
|
|
37
|
+
exports.default = default_1;
|
|
38
|
+
//# sourceMappingURL=locale-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-context.js","sourceRoot":"","sources":["../../../src/browser/locale/locale-context.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,+BAA+B;AAC/B,uDAAkE;AAClE,2CAA0C;AAC1C,uCAAqD;AACrD,2CAA+C;AAC/C,8CAAwC;AAExC,SAAgB,aAAa,CAAC,EAAE,QAAQ,EAA2B;IAC/D,MAAM,aAAa,GAAG,oBAAa,CAAC,GAAG,CAAgB,sBAAa,CAAC,CAAC;IACtE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/E,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IAC5C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,oBAAC,yBAAY,IAAC,MAAM,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;YACjG,MAAM,MAAM,GAAG,oBAAa,CAAC,GAAG,CAAS,aAAM,CAAC,CAAC;YACjD,IAAI,GAAG,CAAC,IAAI,KAAK,qBAAqB,EAAE;gBACpC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACpB;QACL,CAAC,IACI,QAAQ,CACE,CAAC,CAAC;AACzB,CAAC;AAjBD,sCAiBC;AAED,aAAa,CAAC,QAAQ,GAAG,+CAA6B,CAAC;AAGxC,gBAAA;CAAQ,CAAA;AAAR;IADd,IAAA,oBAAO,EAAC,aAAa,CAAC;aACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-protocol.d.ts","sourceRoot":"","sources":["../../../src/browser/locale/locale-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-protocol.js","sourceRoot":"","sources":["../../../src/browser/locale/locale-protocol.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/browser/module.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;;AAGjB,wBAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/browser/module.ts"],"names":[],"mappings":";;AAAA,mBAAiB;AACjB,uCAAwC;AAExC,kBAAe,IAAA,eAAQ,GAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/resolver/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resolver-protocol"), exports);
|
|
18
|
+
__exportStar(require("./path-resolver"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/resolver/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,kDAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-resolver.d.ts","sourceRoot":"","sources":["../../../src/browser/resolver/path-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,qBACa,gBAAiB,YAAW,YAAY;IAGjD,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEhC,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;CAGtC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PathResolverImpl = void 0;
|
|
13
|
+
const resolver_protocol_1 = require("./resolver-protocol");
|
|
14
|
+
const core_1 = require("@celljs/core");
|
|
15
|
+
let PathResolverImpl = class PathResolverImpl {
|
|
16
|
+
resolve(...parts) {
|
|
17
|
+
return core_1.UrlUtil.join(this.path, ...parts.filter(v => !!v));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, core_1.Value)('cell.react.path'),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], PathResolverImpl.prototype, "path", void 0);
|
|
24
|
+
PathResolverImpl = __decorate([
|
|
25
|
+
(0, core_1.Component)(resolver_protocol_1.PathResolver)
|
|
26
|
+
], PathResolverImpl);
|
|
27
|
+
exports.PathResolverImpl = PathResolverImpl;
|
|
28
|
+
//# sourceMappingURL=path-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-resolver.js","sourceRoot":"","sources":["../../../src/browser/resolver/path-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAmD;AACnD,uCAAyD;AAGlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAKzB,OAAO,CAAC,GAAG,KAAe;QACtB,OAAO,cAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAA;AANG;IAAC,IAAA,YAAK,EAAC,iBAAiB,CAAC;;8CACO;AAHvB,gBAAgB;IAD5B,IAAA,gBAAS,EAAC,gCAAY,CAAC;GACX,gBAAgB,CAQ5B;AARY,4CAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver-protocol.d.ts","sourceRoot":"","sources":["../../../src/browser/resolver/resolver-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,eAAyB,CAAC;AAEnD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver-protocol.js","sourceRoot":"","sources":["../../../src/browser/resolver/resolver-protocol.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/browser/router/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./router-protocol"), exports);
|
|
18
|
+
__exportStar(require("./route-metadata-provider"), exports);
|
|
19
|
+
__exportStar(require("./router"), exports);
|
|
20
|
+
__exportStar(require("./route-metadata-converter-provider"), exports);
|
|
21
|
+
__exportStar(require("./route-metadata-converter"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/router/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,4DAA0C;AAC1C,2CAAyB;AACzB,sEAAoD;AACpD,6DAA2C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RouteMetadataConverterProvider, RouteMetadataConverter } from './router-protocol';
|
|
2
|
+
export declare class RouteMetadataConverterProviderImpl implements RouteMetadataConverterProvider {
|
|
3
|
+
protected prioritized: RouteMetadataConverter[];
|
|
4
|
+
protected readonly routeMetadataConverters: RouteMetadataConverter[];
|
|
5
|
+
provide(): RouteMetadataConverter[];
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=route-metadata-converter-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-metadata-converter-provider.d.ts","sourceRoot":"","sources":["../../../src/browser/router/route-metadata-converter-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3F,qBACa,kCAAmC,YAAW,8BAA8B;IAErF,SAAS,CAAC,WAAW,EAAE,sBAAsB,EAAE,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,CAAM;IAE1E,OAAO,IAAI,sBAAsB,EAAE;CAOtC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RouteMetadataConverterProviderImpl = void 0;
|
|
13
|
+
const core_1 = require("@celljs/core");
|
|
14
|
+
const router_protocol_1 = require("./router-protocol");
|
|
15
|
+
let RouteMetadataConverterProviderImpl = class RouteMetadataConverterProviderImpl {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.routeMetadataConverters = [];
|
|
18
|
+
}
|
|
19
|
+
provide() {
|
|
20
|
+
if (!this.prioritized) {
|
|
21
|
+
this.prioritized = core_1.Prioritizeable.prioritizeAllSync(this.routeMetadataConverters).map(c => c.value);
|
|
22
|
+
}
|
|
23
|
+
return this.prioritized;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, core_1.Autowired)(router_protocol_1.RouteMetadataConverter),
|
|
28
|
+
(0, core_1.Optional)(),
|
|
29
|
+
__metadata("design:type", Array)
|
|
30
|
+
], RouteMetadataConverterProviderImpl.prototype, "routeMetadataConverters", void 0);
|
|
31
|
+
RouteMetadataConverterProviderImpl = __decorate([
|
|
32
|
+
(0, core_1.Component)(router_protocol_1.RouteMetadataConverterProvider)
|
|
33
|
+
], RouteMetadataConverterProviderImpl);
|
|
34
|
+
exports.RouteMetadataConverterProviderImpl = RouteMetadataConverterProviderImpl;
|
|
35
|
+
//# sourceMappingURL=route-metadata-converter-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-metadata-converter-provider.js","sourceRoot":"","sources":["../../../src/browser/router/route-metadata-converter-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA8E;AAC9E,uDAA2F;AAGpF,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QAKgB,4BAAuB,GAA6B,EAAE,CAAC;IAS9E,CAAC;IAPG,OAAO;QACH,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAW,GAAG,qBAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACvG;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CAEJ,CAAA;AAVG;IAAC,IAAA,gBAAS,EAAC,wCAAsB,CAAC;IAAE,IAAA,eAAQ,GAAE;;mFAC4B;AALjE,kCAAkC;IAD9C,IAAA,gBAAS,EAAC,gDAA8B,CAAC;GAC7B,kCAAkC,CAc9C;AAdY,gFAAkC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PathResolver } from '../resolver';
|
|
2
|
+
import { RouteMetadata, RouteMetadataConverter } from './router-protocol';
|
|
3
|
+
export declare class DefaultRouteMetadataConverter implements RouteMetadataConverter {
|
|
4
|
+
readonly priority: number;
|
|
5
|
+
protected readonly pathResolver: PathResolver;
|
|
6
|
+
protected readonly defaultLayout: React.ComponentType;
|
|
7
|
+
protected readonly routes: any;
|
|
8
|
+
convert(metadata: RouteMetadata): RouteMetadata;
|
|
9
|
+
protected getMergedConfig(routeMetadata: RouteMetadata): RouteMetadata;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=route-metadata-converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-metadata-converter.d.ts","sourceRoot":"","sources":["../../../src/browser/router/route-metadata-converter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,qBACa,6BAA8B,YAAW,sBAAsB;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAO;IAGhC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAG9C,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC;IAGtD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;IAE/B,OAAO,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa;IAQ/C,SAAS,CAAC,eAAe,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa;CAOzE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DefaultRouteMetadataConverter = void 0;
|
|
13
|
+
const core_1 = require("@celljs/core");
|
|
14
|
+
const layout_1 = require("../layout");
|
|
15
|
+
const resolver_1 = require("../resolver");
|
|
16
|
+
const router_protocol_1 = require("./router-protocol");
|
|
17
|
+
let DefaultRouteMetadataConverter = class DefaultRouteMetadataConverter {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.priority = 500;
|
|
20
|
+
}
|
|
21
|
+
convert(metadata) {
|
|
22
|
+
if (metadata.path) {
|
|
23
|
+
metadata.path = this.pathResolver.resolve(metadata.path);
|
|
24
|
+
}
|
|
25
|
+
metadata.layout = metadata.layout || this.defaultLayout;
|
|
26
|
+
return metadata;
|
|
27
|
+
}
|
|
28
|
+
getMergedConfig(routeMetadata) {
|
|
29
|
+
if (!this.routes || !routeMetadata.path) {
|
|
30
|
+
return routeMetadata;
|
|
31
|
+
}
|
|
32
|
+
return Object.assign(Object.assign({}, routeMetadata), this.routes[routeMetadata.path]);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, core_1.Autowired)(resolver_1.PathResolver),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], DefaultRouteMetadataConverter.prototype, "pathResolver", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, core_1.Autowired)(layout_1.DEFAULT_LAYOUT),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], DefaultRouteMetadataConverter.prototype, "defaultLayout", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, core_1.Value)('cell.react.router.routes'),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], DefaultRouteMetadataConverter.prototype, "routes", void 0);
|
|
47
|
+
DefaultRouteMetadataConverter = __decorate([
|
|
48
|
+
(0, core_1.Component)(router_protocol_1.RouteMetadataConverter)
|
|
49
|
+
], DefaultRouteMetadataConverter);
|
|
50
|
+
exports.DefaultRouteMetadataConverter = DefaultRouteMetadataConverter;
|
|
51
|
+
//# sourceMappingURL=route-metadata-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-metadata-converter.js","sourceRoot":"","sources":["../../../src/browser/router/route-metadata-converter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA2D;AAC3D,sCAA2C;AAC3C,0CAA2C;AAC3C,uDAA0E;AAGnE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAAnC;QACM,aAAQ,GAAW,GAAG,CAAC;IA0BpC,CAAC;IAfG,OAAO,CAAC,QAAuB;QAC3B,IAAI,QAAQ,CAAC,IAAI,EAAE;YACf,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAC5D;QACD,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC;QACxD,OAAO,QAAQ,CAAC;IACpB,CAAC;IAES,eAAe,CAAC,aAA4B;QAClD,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;YACrC,OAAO,aAAa,CAAC;SACxB;QAED,uCAAY,aAAa,GAAK,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,EAAG;IACpE,CAAC;CACJ,CAAA;AAxBG;IAAC,IAAA,gBAAS,EAAC,uBAAY,CAAC;;mEACsB;AAE9C;IAAC,IAAA,gBAAS,EAAC,uBAAc,CAAC;;oEAC4B;AAEtD;IAAC,IAAA,YAAK,EAAC,0BAA0B,CAAC;;6DACH;AAVtB,6BAA6B;IADzC,IAAA,gBAAS,EAAC,wCAAsB,CAAC;GACrB,6BAA6B,CA2BzC;AA3BY,sEAA6B"}
|