@celljs/shell 3.8.0 → 3.9.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/esm/browser/annotation/index.d.ts +2 -0
- package/esm/browser/annotation/index.js +3 -0
- package/esm/browser/annotation/index.js.map +1 -0
- package/esm/browser/annotation/left-area.d.ts +1 -0
- package/esm/browser/annotation/left-area.js +8 -0
- package/esm/browser/annotation/left-area.js.map +1 -0
- package/esm/browser/annotation/top-area.d.ts +1 -0
- package/esm/browser/annotation/top-area.js +8 -0
- package/esm/browser/annotation/top-area.js.map +1 -0
- package/esm/browser/apps/app-service.d.ts +10 -0
- package/esm/browser/apps/app-service.js +52 -0
- package/esm/browser/apps/app-service.js.map +1 -0
- package/esm/browser/apps/apps.d.ts +12 -0
- package/esm/browser/apps/apps.js +38 -0
- package/esm/browser/apps/apps.js.map +1 -0
- package/esm/browser/apps/index.d.ts +2 -0
- package/esm/browser/apps/index.js +3 -0
- package/esm/browser/apps/index.js.map +1 -0
- package/esm/browser/area/area-protocol.d.ts +17 -0
- package/esm/browser/area/area-protocol.js +19 -0
- package/esm/browser/area/area-protocol.js.map +1 -0
- package/esm/browser/area/index.d.ts +3 -0
- package/esm/browser/area/index.js +4 -0
- package/esm/browser/area/index.js.map +1 -0
- package/esm/browser/area/left/index.d.ts +1 -0
- package/esm/browser/area/left/index.js +2 -0
- package/esm/browser/area/left/index.js.map +1 -0
- package/esm/browser/area/left/left.d.ts +4 -0
- package/esm/browser/area/left/left.js +27 -0
- package/esm/browser/area/left/left.js.map +1 -0
- package/esm/browser/area/top/index.d.ts +1 -0
- package/esm/browser/area/top/index.js +2 -0
- package/esm/browser/area/top/index.js.map +1 -0
- package/esm/browser/area/top/top.d.ts +4 -0
- package/esm/browser/area/top/top.js +27 -0
- package/esm/browser/area/top/top.js.map +1 -0
- package/esm/browser/index.d.ts +4 -0
- package/esm/browser/index.js +5 -0
- package/esm/browser/index.js.map +1 -0
- package/esm/browser/layout/index.d.ts +1 -0
- package/esm/browser/layout/index.js +2 -0
- package/esm/browser/layout/index.js.map +1 -0
- package/esm/browser/layout/layout.d.ts +5 -0
- package/esm/browser/layout/layout.js +60 -0
- package/esm/browser/layout/layout.js.map +1 -0
- package/esm/browser/module.d.ts +3 -0
- package/esm/browser/module.js +4 -0
- package/esm/browser/module.js.map +1 -0
- package/esm/browser/tool/account.d.ts +4 -0
- package/esm/browser/tool/account.js +51 -0
- package/esm/browser/tool/account.js.map +1 -0
- package/esm/browser/tool/app-set.d.ts +4 -0
- package/esm/browser/tool/app-set.js +40 -0
- package/esm/browser/tool/app-set.js.map +1 -0
- package/esm/browser/tool/index.d.ts +4 -0
- package/esm/browser/tool/index.js +5 -0
- package/esm/browser/tool/index.js.map +1 -0
- package/esm/browser/tool/logo.d.ts +4 -0
- package/esm/browser/tool/logo.js +23 -0
- package/esm/browser/tool/logo.js.map +1 -0
- package/esm/browser/tool/settings.d.ts +4 -0
- package/esm/browser/tool/settings.js +49 -0
- package/esm/browser/tool/settings.js.map +1 -0
- package/esm/common/index.d.ts +1 -0
- package/esm/common/index.js +2 -0
- package/esm/common/index.js.map +1 -0
- package/esm/common/shell-protocol.d.ts +18 -0
- package/esm/common/shell-protocol.js +2 -0
- package/esm/common/shell-protocol.js.map +1 -0
- package/esm/node/index.d.ts +0 -0
- package/esm/node/index.js +2 -0
- package/esm/node/index.js.map +1 -0
- package/esm/node/module.d.ts +2 -0
- package/esm/node/module.js +3 -0
- package/esm/node/module.js.map +1 -0
- package/esm/package.json +3 -0
- package/package.json +78 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/annotation/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LeftArea: (component?: any, rebind?: boolean) => (target: any) => any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactComponent } from '@celljs/react';
|
|
2
|
+
import { LEFT_AREA } from '../area/area-protocol.js';
|
|
3
|
+
export const LeftArea = function (component, rebind = true) {
|
|
4
|
+
return (t) => {
|
|
5
|
+
ReactComponent(LEFT_AREA, component || t, rebind)(t);
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=left-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"left-area.js","sourceRoot":"","sources":["../../../src/browser/annotation/left-area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,MAAM,QAAQ,GACjB,UAAU,SAAe,EAAE,MAAM,GAAG,IAAI;IACpC,OAAO,CAAC,CAAM,EAAE,EAAE;QACd,cAAc,CAAC,SAAS,EAAE,SAAS,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TopArea: (component?: any, rebind?: boolean) => (target: any) => any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactComponent } from '@celljs/react';
|
|
2
|
+
import { TOP_AREA } from '../area/area-protocol.js';
|
|
3
|
+
export const TopArea = function (component, rebind = true) {
|
|
4
|
+
return (t) => {
|
|
5
|
+
ReactComponent(TOP_AREA, component || t, rebind)(t);
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=top-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-area.js","sourceRoot":"","sources":["../../../src/browser/annotation/top-area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,CAAC,MAAM,OAAO,GAChB,UAAU,SAAe,EAAE,MAAM,GAAG,IAAI;IACpC,OAAO,CAAC,CAAM,EAAE,EAAE;QACd,cAAc,CAAC,QAAQ,EAAE,SAAS,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppService, Category, AppInfo } from '../../common/index.js';
|
|
2
|
+
export declare class AppServiceImpl implements AppService {
|
|
3
|
+
protected readonly apps: {
|
|
4
|
+
[id: string]: AppInfo;
|
|
5
|
+
};
|
|
6
|
+
protected readonly categories: {
|
|
7
|
+
[id: string]: Category;
|
|
8
|
+
};
|
|
9
|
+
load(): Promise<Category[]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { AppService } from '../../common/index.js';
|
|
11
|
+
import { Component, Prioritizeable, Value } from '@celljs/core';
|
|
12
|
+
let AppServiceImpl = class AppServiceImpl {
|
|
13
|
+
async load() {
|
|
14
|
+
const categoryMap = new Map();
|
|
15
|
+
const parsedCategories = Object.keys(this.categories || {}).map(key => {
|
|
16
|
+
const category = { ...this.categories[key] };
|
|
17
|
+
category.id = key;
|
|
18
|
+
category.priority = 500;
|
|
19
|
+
category.apps = category.apps || [];
|
|
20
|
+
categoryMap.set(key, category);
|
|
21
|
+
return category;
|
|
22
|
+
});
|
|
23
|
+
const parsedApps = Object.keys(this.apps || {}).map(key => {
|
|
24
|
+
const app = { ...this.apps[key] };
|
|
25
|
+
app.id = key;
|
|
26
|
+
app.priority = 500;
|
|
27
|
+
return app;
|
|
28
|
+
});
|
|
29
|
+
const sortedCategories = Prioritizeable.prioritizeAllSync(parsedCategories).map(c => c.value);
|
|
30
|
+
const sortedApps = Prioritizeable.prioritizeAllSync(parsedApps).map(c => c.value);
|
|
31
|
+
for (const app of sortedApps) {
|
|
32
|
+
const category = categoryMap.get(app.categoryId);
|
|
33
|
+
if (category) {
|
|
34
|
+
category.apps.push(app);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return sortedCategories;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
__decorate([
|
|
41
|
+
Value('cell.shell.apps'),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], AppServiceImpl.prototype, "apps", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
Value('cell.shell.categories'),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], AppServiceImpl.prototype, "categories", void 0);
|
|
48
|
+
AppServiceImpl = __decorate([
|
|
49
|
+
Component(AppService)
|
|
50
|
+
], AppServiceImpl);
|
|
51
|
+
export { AppServiceImpl };
|
|
52
|
+
//# sourceMappingURL=app-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-service.js","sourceRoot":"","sources":["../../../src/browser/apps/app-service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;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,EAAE,CAAC;YAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjD,IAAI,QAAQ,EAAE,CAAC;gBACX,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;CAEJ,CAAA;AAhCsB;IADlB,KAAK,CAAC,iBAAiB,CAAC;;4CAC0B;AAGhC;IADlB,KAAK,CAAC,uBAAuB,CAAC;;kDAC2B;AANjD,cAAc;IAD1B,SAAS,CAAC,UAAU,CAAC;GACT,cAAc,CAmC1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Category, AppInfo } from '../../common/index.js';
|
|
2
|
+
export declare function Apps({ size }: {
|
|
3
|
+
size?: string;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export declare function AppCategory({ category, size }: {
|
|
6
|
+
category: Category;
|
|
7
|
+
size: string;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
export declare function AppItem({ app, size }: {
|
|
10
|
+
app: AppInfo;
|
|
11
|
+
size: string;
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Grid, Box, Text, ResponsiveContext } from 'grommet';
|
|
3
|
+
import { ContainerUtil } from '@celljs/core';
|
|
4
|
+
import { AppService } from '../../common/index.js';
|
|
5
|
+
import { Icon } from '@celljs/grommet';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
const { useState, useEffect, useContext } = React;
|
|
8
|
+
export function Apps({ size }) {
|
|
9
|
+
size = size || useContext(ResponsiveContext);
|
|
10
|
+
const [categories, setCategories] = useState([]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const loadApps = async () => {
|
|
13
|
+
const appService = ContainerUtil.get(AppService);
|
|
14
|
+
const data = await appService.load();
|
|
15
|
+
setCategories(data);
|
|
16
|
+
};
|
|
17
|
+
loadApps();
|
|
18
|
+
}, []);
|
|
19
|
+
return (React.createElement(Box, { direction: "column", pad: "small", gap: "small", alignContent: "start" }, categories.map(c => (React.createElement(AppCategory, { key: c.id, size: size, category: c })))));
|
|
20
|
+
}
|
|
21
|
+
export function AppCategory({ category, size }) {
|
|
22
|
+
const intl = useIntl();
|
|
23
|
+
const apps = category.apps || [];
|
|
24
|
+
return (React.createElement(Box, null,
|
|
25
|
+
React.createElement(Text, { weight: "bold", textAlign: size === 'small' ? 'center' : 'start', size: size, margin: { bottom: size } }, intl.formatMessage({ id: category.name })),
|
|
26
|
+
React.createElement(Box, { border: { side: 'top', color: 'light-2' } }),
|
|
27
|
+
React.createElement(Grid, { rows: size === 'small' ? 'xsmall' : 'small', columns: size === 'small' ? 'xsmall' : 'small' }, apps.map(app => (React.createElement(AppItem, { key: app.id, size: size, app: app }))))));
|
|
28
|
+
}
|
|
29
|
+
export function AppItem({ app, size }) {
|
|
30
|
+
const intl = useIntl();
|
|
31
|
+
const onClick = () => {
|
|
32
|
+
window.location.href = app.url;
|
|
33
|
+
};
|
|
34
|
+
return (React.createElement(Box, { justify: "center", align: "center", hoverIndicator: true, onClick: onClick },
|
|
35
|
+
React.createElement(Icon, { icon: app.icon, size: size === 'small' ? 'medium' : 'large' }),
|
|
36
|
+
React.createElement(Text, { size: size, margin: { top: size } }, intl.formatMessage({ id: app.name }))));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.js","sourceRoot":"","sources":["../../../src/browser/apps/apps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,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AAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,GAAG;QACpE,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,IAAG,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,IAAI,EAAC,CAAC,CAAQ,CACnF,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/apps/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const TOP_AREA: unique symbol;
|
|
2
|
+
export declare const LEFT_AREA: unique symbol;
|
|
3
|
+
export declare enum AreaType {
|
|
4
|
+
TopArea = "Top",
|
|
5
|
+
SecondaryTopArea = "SecondaryTop",
|
|
6
|
+
TertiaryTopArea = "TertiaryTop",
|
|
7
|
+
LeftArea = "Left",
|
|
8
|
+
TopLeftArea = "TopLeft",
|
|
9
|
+
TopRightArea = "TopRight",
|
|
10
|
+
LeftHeaderArea = "LeftHeader",
|
|
11
|
+
LeftFooterArea = "LeftFooter",
|
|
12
|
+
LeftBodyArea = "LeftBody",
|
|
13
|
+
NavArea = "Nav",
|
|
14
|
+
SettingsArea = "Settings",
|
|
15
|
+
AccountArea = "Account",
|
|
16
|
+
BottomArea = "Bottom"
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const TOP_AREA = Symbol('TOP_AREA');
|
|
2
|
+
export const LEFT_AREA = Symbol('LEFT_AREA');
|
|
3
|
+
export var AreaType;
|
|
4
|
+
(function (AreaType) {
|
|
5
|
+
AreaType["TopArea"] = "Top";
|
|
6
|
+
AreaType["SecondaryTopArea"] = "SecondaryTop";
|
|
7
|
+
AreaType["TertiaryTopArea"] = "TertiaryTop";
|
|
8
|
+
AreaType["LeftArea"] = "Left";
|
|
9
|
+
AreaType["TopLeftArea"] = "TopLeft";
|
|
10
|
+
AreaType["TopRightArea"] = "TopRight";
|
|
11
|
+
AreaType["LeftHeaderArea"] = "LeftHeader";
|
|
12
|
+
AreaType["LeftFooterArea"] = "LeftFooter";
|
|
13
|
+
AreaType["LeftBodyArea"] = "LeftBody";
|
|
14
|
+
AreaType["NavArea"] = "Nav";
|
|
15
|
+
AreaType["SettingsArea"] = "Settings";
|
|
16
|
+
AreaType["AccountArea"] = "Account";
|
|
17
|
+
AreaType["BottomArea"] = "Bottom";
|
|
18
|
+
})(AreaType || (AreaType = {}));
|
|
19
|
+
//# sourceMappingURL=area-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area-protocol.js","sourceRoot":"","sources":["../../../src/browser/area/area-protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAE7C,MAAM,CAAN,IAAY,QAcX;AAdD,WAAY,QAAQ;IAChB,2BAAe,CAAA;IACf,6CAAiC,CAAA;IACjC,2CAA+B,CAAA;IAC/B,6BAAiB,CAAA;IACjB,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,yCAA6B,CAAA;IAC7B,yCAA6B,CAAA;IAC7B,qCAAyB,CAAA;IACzB,2BAAe,CAAA;IACf,qCAAyB,CAAA;IACzB,mCAAuB,CAAA;IACvB,iCAAqB,CAAA;AACzB,CAAC,EAdW,QAAQ,KAAR,QAAQ,QAcnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/area/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './left.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/browser/area/left/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Nav, Sidebar } from 'grommet';
|
|
9
|
+
import { ConfigUtil } from '@celljs/core';
|
|
10
|
+
import { AreaType } from '../area-protocol.js';
|
|
11
|
+
import { Slot } from '@celljs/react';
|
|
12
|
+
import { Widget } from '@celljs/widget';
|
|
13
|
+
export function LeftArea(props) {
|
|
14
|
+
props = { ...(ConfigUtil.get('cell.shell.leftArea') || {}), ...props };
|
|
15
|
+
return (React.createElement(Sidebar, { animation: "fadeIn", pad: "medium", background: "white", width: "250px", footer: React.createElement(Slot, { area: AreaType.LeftFooterArea }), ...props },
|
|
16
|
+
React.createElement(Slot, { area: AreaType.LeftHeaderArea }),
|
|
17
|
+
React.createElement(Nav, { gap: "none" },
|
|
18
|
+
React.createElement(Slot, { area: AreaType.NavArea }),
|
|
19
|
+
React.createElement(Slot, { area: AreaType.LeftBodyArea }))));
|
|
20
|
+
}
|
|
21
|
+
let default_1 = class {
|
|
22
|
+
};
|
|
23
|
+
default_1 = __decorate([
|
|
24
|
+
Widget({ area: AreaType.LeftArea, component: LeftArea })
|
|
25
|
+
], default_1);
|
|
26
|
+
export default default_1;
|
|
27
|
+
//# sourceMappingURL=left.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"left.js","sourceRoot":"","sources":["../../../../src/browser/area/left/left.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,OAAO,EAAY,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,MAAM,UAAU,QAAQ,CAAC,KAAe;IACpC,KAAK,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;IAEvE,OAAO,CACH,oBAAC,OAAO,IAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAC,QAAQ,EAAC,UAAU,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EACrE,MAAM,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,GAAI,KAC3C,KAAK;QAET,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,GAAI;QACvC,oBAAC,GAAG,IAAC,GAAG,EAAC,MAAM;YACX,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,GAAI;YAChC,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,GAAI,CACnC,CACA,CACb,CAAC;AACN,CAAC;AAGc,gBAAA;CAAQ,CAAA;AAAR;IADd,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;aAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './top.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/browser/area/top/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Box, Nav } from 'grommet';
|
|
9
|
+
import { ConfigUtil } from '@celljs/core';
|
|
10
|
+
import { AreaType } from '../area-protocol.js';
|
|
11
|
+
import { Slot } from '@celljs/react';
|
|
12
|
+
import { Widget } from '@celljs/widget';
|
|
13
|
+
export function TopArea(props) {
|
|
14
|
+
props = { ...ConfigUtil.get('cell.shell.topArea'), ...props };
|
|
15
|
+
return (React.createElement(Nav, { direction: "row", pad: { vertical: 'small', horizontal: 'medium' }, elevation: "xsmall", justify: "between", ...props },
|
|
16
|
+
React.createElement(Box, { direction: "row", gap: "small" },
|
|
17
|
+
React.createElement(Slot, { area: AreaType.TopLeftArea })),
|
|
18
|
+
React.createElement(Box, { direction: "row", gap: "small" },
|
|
19
|
+
React.createElement(Slot, { area: AreaType.TopRightArea }))));
|
|
20
|
+
}
|
|
21
|
+
let default_1 = class {
|
|
22
|
+
};
|
|
23
|
+
default_1 = __decorate([
|
|
24
|
+
Widget({ area: AreaType.TopArea, component: TopArea })
|
|
25
|
+
], default_1);
|
|
26
|
+
export default default_1;
|
|
27
|
+
//# sourceMappingURL=top.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top.js","sourceRoot":"","sources":["../../../../src/browser/area/top/top.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,GAAG,EAAY,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,MAAM,UAAU,OAAO,CAAC,KAAe;IACnC,KAAK,GAAG,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;IAE9D,OAAO,CACH,oBAAC,GAAG,IAAC,SAAS,EAAC,KAAK,EAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,KAAK,KAAK;QACjH,oBAAC,GAAG,IAAC,SAAS,EAAC,KAAK,EAAC,GAAG,EAAC,OAAO;YAC5B,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAI,CAClC;QACN,oBAAC,GAAG,IAAC,SAAS,EAAC,KAAK,EAAC,GAAG,EAAC,OAAO;YAC5B,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,YAAY,GAAI,CACnC,CACJ,CACT,CAAC;AACN,CAAC;AAGc,gBAAA;CAAQ,CAAA;AAAR;IADd,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;aAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './layout.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { DefaultLayout, Slot } from '@celljs/react';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { AreaType } from '../area/index.js';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
import { Box } from 'grommet';
|
|
12
|
+
const StyledWraper = styled.div `
|
|
13
|
+
left: 0;
|
|
14
|
+
position: absolute;
|
|
15
|
+
right: 0;
|
|
16
|
+
top: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
z-index: 2;
|
|
20
|
+
`;
|
|
21
|
+
const StyledSidebar = styled.div `
|
|
22
|
+
left: 0;
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 76px;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
z-index: 1;
|
|
27
|
+
`;
|
|
28
|
+
const StyledMain = styled.div `
|
|
29
|
+
left: 250px;
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 0;
|
|
32
|
+
top: 70px;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
z-index: 0;
|
|
36
|
+
`;
|
|
37
|
+
export function TopLeftLayout({ children }) {
|
|
38
|
+
return (React.createElement(StyledWraper, null,
|
|
39
|
+
React.createElement(Slot, { area: AreaType.TopArea }),
|
|
40
|
+
React.createElement(StyledSidebar, null,
|
|
41
|
+
React.createElement(Slot, { area: AreaType.LeftArea })),
|
|
42
|
+
React.createElement(StyledMain, null,
|
|
43
|
+
children,
|
|
44
|
+
React.createElement(Slot, { area: AreaType.BottomArea }))));
|
|
45
|
+
}
|
|
46
|
+
export function MultiTopLayout({ children }) {
|
|
47
|
+
return (React.createElement(Box, null,
|
|
48
|
+
React.createElement(Slot, { area: AreaType.TopArea }),
|
|
49
|
+
React.createElement(Slot, { area: AreaType.SecondaryTopArea }),
|
|
50
|
+
React.createElement(Slot, { area: AreaType.TertiaryTopArea }),
|
|
51
|
+
children,
|
|
52
|
+
React.createElement(Slot, { area: AreaType.BottomArea })));
|
|
53
|
+
}
|
|
54
|
+
let default_1 = class {
|
|
55
|
+
};
|
|
56
|
+
default_1 = __decorate([
|
|
57
|
+
DefaultLayout(TopLeftLayout)
|
|
58
|
+
], default_1);
|
|
59
|
+
export default default_1;
|
|
60
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/browser/layout/layout.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QA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,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,eAAe,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Avatar, Drop, Box } from 'grommet';
|
|
9
|
+
import { ConfigUtil, ContainerUtil } from '@celljs/core';
|
|
10
|
+
import { Widget } from '@celljs/widget';
|
|
11
|
+
import { AreaType } from '../area/index.js';
|
|
12
|
+
import styled from 'styled-components';
|
|
13
|
+
import { Slot } from '@celljs/react';
|
|
14
|
+
import { UserManager } from '@celljs/security/lib/browser';
|
|
15
|
+
import { NavItem, Icon } from '@celljs/grommet';
|
|
16
|
+
const StyledAccount = styled.div `
|
|
17
|
+
width: 200px;
|
|
18
|
+
max-height: 450px;
|
|
19
|
+
padding-top: 12px;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
right: 0;
|
|
22
|
+
`;
|
|
23
|
+
export function Account(props) {
|
|
24
|
+
// eslint-disable-next-line no-null/no-null
|
|
25
|
+
const targetRef = React.useRef(null);
|
|
26
|
+
const loginUserManager = ContainerUtil.get(UserManager);
|
|
27
|
+
const [show, setShow] = React.useState(false);
|
|
28
|
+
const [user, setUser] = React.useState(loginUserManager.userInfoSubject.value);
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
const subscription = loginUserManager.userInfoSubject.subscribe(u => setUser(u));
|
|
31
|
+
return () => subscription.unsubscribe();
|
|
32
|
+
}, []);
|
|
33
|
+
const { icon, login, ...rest } = ConfigUtil.get('cell.shell.account');
|
|
34
|
+
props = { ...rest, ...props };
|
|
35
|
+
if (!user) {
|
|
36
|
+
const { label, ...loginRest } = login;
|
|
37
|
+
return (React.createElement(NavItem, { label: label, size: "medium", ...loginRest }));
|
|
38
|
+
}
|
|
39
|
+
return (React.createElement(Box, { ref: targetRef },
|
|
40
|
+
React.createElement(Avatar, { hoverIndicator: true, title: user.nickname, style: { margin: '12px' }, size: 'small', onClick: () => setShow(true), ...props, src: user.avatar || props.src }, React.createElement(Icon, { icon: user.avatar || icon })),
|
|
41
|
+
targetRef.current && show && (React.createElement(Drop, { target: targetRef.current, style: { margin: '20px 0' }, elevation: "large", align: { top: 'bottom', right: 'right' }, onEsc: () => setShow(false), onClickOutside: () => setShow(false) },
|
|
42
|
+
React.createElement(StyledAccount, null,
|
|
43
|
+
React.createElement(Slot, { area: AreaType.AccountArea }))))));
|
|
44
|
+
}
|
|
45
|
+
let default_1 = class {
|
|
46
|
+
};
|
|
47
|
+
default_1 = __decorate([
|
|
48
|
+
Widget({ area: AreaType.TopRightArea, component: Account, priority: 100 })
|
|
49
|
+
], default_1);
|
|
50
|
+
export default default_1;
|
|
51
|
+
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/browser/tool/account.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAe,IAAI,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAA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
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Button, Drop } from 'grommet';
|
|
9
|
+
import { ConfigUtil } from '@celljs/core';
|
|
10
|
+
import { Icon } from '@celljs/grommet';
|
|
11
|
+
import { Widget } from '@celljs/widget';
|
|
12
|
+
import { AreaType } from '../area/index.js';
|
|
13
|
+
import { Apps } from '../apps/index.js';
|
|
14
|
+
import styled from 'styled-components';
|
|
15
|
+
const { Fragment } = React;
|
|
16
|
+
const StyledAppSet = styled.div `
|
|
17
|
+
width: 320px;
|
|
18
|
+
max-height: 450px;
|
|
19
|
+
padding-top: 12px;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
`;
|
|
22
|
+
export function AppSet(props) {
|
|
23
|
+
// eslint-disable-next-line no-null/no-null
|
|
24
|
+
const targetRef = React.useRef(null);
|
|
25
|
+
const [show, setShow] = React.useState(false);
|
|
26
|
+
const { icon, ...rest } = ConfigUtil.get('cell.shell.appSet');
|
|
27
|
+
props = { ...rest, ...props };
|
|
28
|
+
return (React.createElement(Fragment, null,
|
|
29
|
+
React.createElement(Button, { ref: targetRef, hoverIndicator: true, onClick: () => setShow(true), ...props, icon: React.createElement(Icon, { icon: icon }) }),
|
|
30
|
+
targetRef.current && show && (React.createElement(Drop, { target: targetRef.current, style: { marginTop: '20px' }, elevation: "large", align: { top: 'bottom', right: 'right' }, onEsc: () => setShow(false), onClickOutside: () => setShow(false) },
|
|
31
|
+
React.createElement(StyledAppSet, null,
|
|
32
|
+
React.createElement(Apps, { size: "small" }))))));
|
|
33
|
+
}
|
|
34
|
+
let default_1 = class {
|
|
35
|
+
};
|
|
36
|
+
default_1 = __decorate([
|
|
37
|
+
Widget({ area: AreaType.TopRightArea, component: AppSet, priority: 200 })
|
|
38
|
+
], default_1);
|
|
39
|
+
export default default_1;
|
|
40
|
+
//# sourceMappingURL=app-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-set.js","sourceRoot":"","sources":["../../../src/browser/tool/app-set.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;AAE3B,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK9B,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,KAAkB;IACrC,2CAA2C;IAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC9D,KAAK,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;IAC9B,OAAO,CACH,oBAAC,QAAQ;QACL,oBAAC,MAAM,IAAC,GAAG,EAAE,SAAS,EAAE,cAAc,QAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAM,KAAK,EAAE,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAG,GAAG;QAC3G,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,CAC1B,oBAAC,IAAI,IACD,MAAM,EAAE,SAAS,CAAC,OAAQ,EAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAC5B,SAAS,EAAC,OAAO,EACjB,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAC,EACvC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAC3B,cAAc,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YAEpC,oBAAC,YAAY;gBACT,oBAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAE,CACT,CACZ,CACV,CACM,CACd,CAAC;AACN,CAAC;AAGc,gBAAA;CAAQ,CAAA;AAAR;IADd,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;aACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/tool/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { ConfigUtil } from '@celljs/core';
|
|
9
|
+
import { Widget } from '@celljs/widget';
|
|
10
|
+
import { AreaType } from '../area/index.js';
|
|
11
|
+
import { NavItem, Icon } from '@celljs/grommet';
|
|
12
|
+
export function Logo(props) {
|
|
13
|
+
const { label, icon, ...rest } = ConfigUtil.get('cell.shell.logo');
|
|
14
|
+
props = { ...rest, ...props };
|
|
15
|
+
return (React.createElement(NavItem, { size: "medium", gap: "xsmall", label: label, icon: React.createElement(Icon, { icon: icon }), hoverIndicator: false, activatable: false, ...props }));
|
|
16
|
+
}
|
|
17
|
+
let default_1 = class {
|
|
18
|
+
};
|
|
19
|
+
default_1 = __decorate([
|
|
20
|
+
Widget({ area: AreaType.TopLeftArea, component: Logo, priority: 1000 })
|
|
21
|
+
], default_1);
|
|
22
|
+
export default default_1;
|
|
23
|
+
//# sourceMappingURL=logo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/browser/tool/logo.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAgB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,UAAU,IAAI,CAAC,KAAmB;IACpC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnE,KAAK,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;IAC9B,OAAO,CAAC,oBAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,KAAM,KAAK,GAAG,CAAC,CAAC;AAClJ,CAAC;AAGc,gBAAA;CAAQ,CAAA;AAAR;IADd,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;aACjD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Button, Drop, Box } from 'grommet';
|
|
9
|
+
import { ConfigUtil, ContainerUtil } from '@celljs/core';
|
|
10
|
+
import { Icon, ThemeBox, LocaleMenu } from '@celljs/grommet';
|
|
11
|
+
import { Widget, ThemeManager } from '@celljs/widget';
|
|
12
|
+
import { AreaType } from '../area/index.js';
|
|
13
|
+
import styled from 'styled-components';
|
|
14
|
+
import { Slot } from '@celljs/react';
|
|
15
|
+
const { Fragment } = React;
|
|
16
|
+
const StyledSettings = styled.div `
|
|
17
|
+
width: 300px;
|
|
18
|
+
max-height: 450px;
|
|
19
|
+
padding-top: 12px;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
right: 0;
|
|
22
|
+
`;
|
|
23
|
+
export function Settings(props) {
|
|
24
|
+
// eslint-disable-next-line no-null/no-null
|
|
25
|
+
const targetRef = React.useRef(null);
|
|
26
|
+
const [show, setShow] = React.useState(false);
|
|
27
|
+
const { icon, ...rest } = ConfigUtil.get('cell.shell.settings');
|
|
28
|
+
props = { ...rest, ...props };
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
const themeManager = ContainerUtil.get(ThemeManager);
|
|
31
|
+
const subscription = themeManager.currentSubject.subscribe(t => setShow(false));
|
|
32
|
+
return () => subscription.unsubscribe();
|
|
33
|
+
}, []);
|
|
34
|
+
return (React.createElement(Fragment, null,
|
|
35
|
+
React.createElement(Button, { ref: targetRef, hoverIndicator: true, onClick: () => setShow(true), ...props, icon: React.createElement(Icon, { icon: icon }) }),
|
|
36
|
+
targetRef.current && show && (React.createElement(Drop, { target: targetRef.current, style: { marginTop: '20px' }, elevation: "large", align: { top: 'bottom', right: 'right' }, onEsc: () => setShow(false), onClickOutside: () => setShow(false) },
|
|
37
|
+
React.createElement(StyledSettings, null,
|
|
38
|
+
React.createElement(Box, null,
|
|
39
|
+
React.createElement(Slot, { area: AreaType.SettingsArea })))))));
|
|
40
|
+
}
|
|
41
|
+
let default_1 = class {
|
|
42
|
+
};
|
|
43
|
+
default_1 = __decorate([
|
|
44
|
+
Widget({ area: AreaType.SettingsArea, component: LocaleMenu, priority: 200 }),
|
|
45
|
+
Widget({ area: AreaType.SettingsArea, component: ThemeBox, priority: 300 }),
|
|
46
|
+
Widget({ area: AreaType.TopRightArea, component: Settings, priority: 300 })
|
|
47
|
+
], default_1);
|
|
48
|
+
export default default_1;
|
|
49
|
+
//# sourceMappingURL=settings.js.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E,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;aACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './shell-protocol.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const AppService: unique symbol;
|
|
2
|
+
export interface AppInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
categoryId: string;
|
|
7
|
+
priority: number;
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Category {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
priority: number;
|
|
14
|
+
apps: AppInfo[];
|
|
15
|
+
}
|
|
16
|
+
export interface AppService {
|
|
17
|
+
load(): Promise<Category[]>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-protocol.js","sourceRoot":"","sources":["../../src/common/shell-protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/node/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,eAAe,QAAQ,EAAE,CAAC"}
|
package/esm/package.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/shell",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -18,22 +18,23 @@
|
|
|
18
18
|
"typings": "lib/common/index.d.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"lib",
|
|
21
|
+
"esm",
|
|
21
22
|
"src",
|
|
22
23
|
"cell.yml",
|
|
23
24
|
"cell-locale.yml"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
|
-
"build": "tsc -b",
|
|
27
|
-
"clean": "rm -rf lib *.tsbuildinfo",
|
|
27
|
+
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
28
|
+
"clean": "rm -rf lib esm *.tsbuildinfo",
|
|
28
29
|
"test": "bun test --preload reflect-metadata ./lib",
|
|
29
30
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@celljs/core": "3.
|
|
33
|
-
"@celljs/grommet": "3.
|
|
34
|
-
"@celljs/react": "3.
|
|
35
|
-
"@celljs/security": "3.
|
|
36
|
-
"@celljs/widget": "3.
|
|
33
|
+
"@celljs/core": "3.9.0",
|
|
34
|
+
"@celljs/grommet": "3.9.0",
|
|
35
|
+
"@celljs/react": "3.9.0",
|
|
36
|
+
"@celljs/security": "3.9.0",
|
|
37
|
+
"@celljs/widget": "3.9.0",
|
|
37
38
|
"grommet": "^2.25.1",
|
|
38
39
|
"react": "^18.2.0",
|
|
39
40
|
"react-intl": "^6.0.5",
|
|
@@ -42,5 +43,74 @@
|
|
|
42
43
|
},
|
|
43
44
|
"publishConfig": {
|
|
44
45
|
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"webpack": "./lib/common/index.js",
|
|
50
|
+
"import": "./esm/common/index.js",
|
|
51
|
+
"default": "./lib/common/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./package.json": "./package.json",
|
|
54
|
+
"./lib/browser": {
|
|
55
|
+
"webpack": "./lib/browser/index.js",
|
|
56
|
+
"import": "./esm/browser/index.js",
|
|
57
|
+
"default": "./lib/browser/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./lib/browser/annotation": {
|
|
60
|
+
"webpack": "./lib/browser/annotation/index.js",
|
|
61
|
+
"import": "./esm/browser/annotation/index.js",
|
|
62
|
+
"default": "./lib/browser/annotation/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./lib/browser/apps": {
|
|
65
|
+
"webpack": "./lib/browser/apps/index.js",
|
|
66
|
+
"import": "./esm/browser/apps/index.js",
|
|
67
|
+
"default": "./lib/browser/apps/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./lib/browser/area": {
|
|
70
|
+
"webpack": "./lib/browser/area/index.js",
|
|
71
|
+
"import": "./esm/browser/area/index.js",
|
|
72
|
+
"default": "./lib/browser/area/index.js"
|
|
73
|
+
},
|
|
74
|
+
"./lib/browser/area/left": {
|
|
75
|
+
"webpack": "./lib/browser/area/left/index.js",
|
|
76
|
+
"import": "./esm/browser/area/left/index.js",
|
|
77
|
+
"default": "./lib/browser/area/left/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./lib/browser/area/top": {
|
|
80
|
+
"webpack": "./lib/browser/area/top/index.js",
|
|
81
|
+
"import": "./esm/browser/area/top/index.js",
|
|
82
|
+
"default": "./lib/browser/area/top/index.js"
|
|
83
|
+
},
|
|
84
|
+
"./lib/browser/layout": {
|
|
85
|
+
"webpack": "./lib/browser/layout/index.js",
|
|
86
|
+
"import": "./esm/browser/layout/index.js",
|
|
87
|
+
"default": "./lib/browser/layout/index.js"
|
|
88
|
+
},
|
|
89
|
+
"./lib/browser/tool": {
|
|
90
|
+
"webpack": "./lib/browser/tool/index.js",
|
|
91
|
+
"import": "./esm/browser/tool/index.js",
|
|
92
|
+
"default": "./lib/browser/tool/index.js"
|
|
93
|
+
},
|
|
94
|
+
"./lib/common": {
|
|
95
|
+
"webpack": "./lib/common/index.js",
|
|
96
|
+
"import": "./esm/common/index.js",
|
|
97
|
+
"default": "./lib/common/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./lib/node": {
|
|
100
|
+
"webpack": "./lib/node/index.js",
|
|
101
|
+
"import": "./esm/node/index.js",
|
|
102
|
+
"default": "./lib/node/index.js"
|
|
103
|
+
},
|
|
104
|
+
"./lib/*.js": {
|
|
105
|
+
"webpack": "./lib/*.js",
|
|
106
|
+
"import": "./esm/*.js",
|
|
107
|
+
"default": "./lib/*.js"
|
|
108
|
+
},
|
|
109
|
+
"./lib/*": {
|
|
110
|
+
"webpack": "./lib/*.js",
|
|
111
|
+
"import": "./esm/*.js",
|
|
112
|
+
"default": "./lib/*.js"
|
|
113
|
+
},
|
|
114
|
+
"./*": "./*"
|
|
45
115
|
}
|
|
46
116
|
}
|