@voplus/morpho-workspace 6.1.21 → 6.1.23
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/es/modules/notification/components/AllNewNotificationItem/index.js +10 -11
- package/es/modules/notification/components/AllNewNotificationItem/index.js.map +1 -1
- package/es/modules/notification/components/AllNewNotificationItem/index.less +11 -16
- package/es/modules/notification/components/AllNewNotificationList/index.d.ts +0 -3
- package/es/modules/notification/components/AllNewNotificationList/index.js +20 -34
- package/es/modules/notification/components/AllNewNotificationList/index.js.map +1 -1
- package/es/modules/notification/components/AllNewNotificationTableItem/index.d.ts +7 -0
- package/es/modules/notification/components/AllNewNotificationTableItem/index.js +33 -0
- package/es/modules/notification/components/AllNewNotificationTableItem/index.js.map +1 -0
- package/es/modules/notification/components/AllNewNotificationTableItem/index.less +39 -0
- package/es/modules/notification/components/AllNewNotificationTableList/index.d.ts +29 -0
- package/es/modules/notification/components/AllNewNotificationTableList/index.js +90 -0
- package/es/modules/notification/components/AllNewNotificationTableList/index.js.map +1 -0
- package/es/modules/notification/components/NotificationOverview/index.d.ts +2 -2
- package/es/modules/notification/components/NotificationOverview/index.js +15 -8
- package/es/modules/notification/components/NotificationOverview/index.js.map +1 -1
- package/es/modules/notification/components/NotificationOverview/state.d.ts +6 -0
- package/es/modules/notification/components/NotificationOverview/state.js +47 -0
- package/es/modules/notification/components/NotificationOverview/state.js.map +1 -0
- package/es/modules/notification/pages/NotificationListPage/index.js +24 -31
- package/es/modules/notification/pages/NotificationListPage/index.js.map +1 -1
- package/es/modules/notification/pages/NotificationListPage/state.d.ts +3 -0
- package/es/modules/notification/pages/NotificationListPage/state.js +40 -1
- package/es/modules/notification/pages/NotificationListPage/state.js.map +1 -1
- package/es/modules/tasks/components/TaskOverview/index.d.ts +4 -3
- package/es/modules/tasks/components/TaskOverview/index.js +22 -12
- package/es/modules/tasks/components/TaskOverview/index.js.map +1 -1
- package/es/modules/tasks/components/TaskOverview/state.d.ts +8 -0
- package/es/modules/tasks/components/TaskOverview/state.js +65 -0
- package/es/modules/tasks/components/TaskOverview/state.js.map +1 -0
- package/es/modules/tasks/pages/TaskListPage/index.js +26 -31
- package/es/modules/tasks/pages/TaskListPage/index.js.map +1 -1
- package/es/modules/tasks/pages/TaskListPage/state.d.ts +7 -2
- package/es/modules/tasks/pages/TaskListPage/state.js +84 -13
- package/es/modules/tasks/pages/TaskListPage/state.js.map +1 -1
- package/es/modules/work/components/WorkOverview/index.d.ts +4 -4
- package/es/modules/work/components/WorkOverview/index.js +24 -12
- package/es/modules/work/components/WorkOverview/index.js.map +1 -1
- package/es/modules/work/components/WorkOverview/state.d.ts +8 -0
- package/es/modules/work/components/WorkOverview/state.js +65 -0
- package/es/modules/work/components/WorkOverview/state.js.map +1 -0
- package/es/modules/work/pages/WorkListPage2/index.js +9 -19
- package/es/modules/work/pages/WorkListPage2/index.js.map +1 -1
- package/es/modules/work/pages/WorkListPage2/state.d.ts +7 -2
- package/es/modules/work/pages/WorkListPage2/state.js +86 -24
- package/es/modules/work/pages/WorkListPage2/state.js.map +1 -1
- package/es/modules/work/work-error/components/WorkErrorPropertiesView/index.js +6 -5
- package/es/modules/work/work-error/components/WorkErrorPropertiesView/index.js.map +1 -1
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.d.ts +4 -2
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.js +20 -10
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.js.map +1 -1
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/state.d.ts +8 -0
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/state.js +63 -0
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/state.js.map +1 -0
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/index.js +26 -23
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/index.js.map +1 -1
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/state.d.ts +7 -2
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/state.js +92 -19
- package/es/modules/work/work-schedule/pages/WorkScheduleListPage/state.js.map +1 -1
- package/es/modules/work/work-type/components/WorkTypeHeader/index.d.ts +1 -0
- package/es/modules/work/work-type/components/WorkTypeHeader/index.js +3 -2
- package/es/modules/work/work-type/components/WorkTypeHeader/index.js.map +1 -1
- package/es/modules/work/work-type/components/WorkTypePropertiesView/index.js +1 -1
- package/es/modules/work/work-type/components/WorkTypePropertiesView/index.js.map +1 -1
- package/package.json +1 -1
- package/es/modules/notification/components/NotificationOverview/index.less +0 -24
- package/es/modules/tasks/components/TaskOverview/index.less +0 -49
- package/es/modules/work/components/WorkOverview/index.less +0 -49
- package/es/modules/work/work-schedule/components/WorkScheduleOverview/index.less +0 -58
- /package/es/modules/notification/components/{AllNewNotificationList → AllNewNotificationTableList}/index.less +0 -0
@@ -1,24 +1,36 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useState } from "react";
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
3
3
|
import OverviewItem from "@voplus/morpho-ui/es/controls/PanelOverview/OverviewItem";
|
4
4
|
import OverviewAll from "@voplus/morpho-ui/es/controls/PanelOverview/OverviewAll";
|
5
5
|
import DueItem from "@voplus/morpho-ui/es/controls/PanelOverview/DueItem";
|
6
6
|
import { Scrollbars } from "react-custom-scrollbars-2";
|
7
|
-
import { faPlus, faCheck, faBarsProgress, faLock } from "@fortawesome/pro-solid-svg-icons";
|
8
7
|
import PanelOverview from "@voplus/morpho-ui/es/controls/PanelOverview";
|
8
|
+
import classnames from "classnames";
|
9
|
+
import { State } from "./state";
|
9
10
|
import dayjs from "dayjs";
|
10
|
-
import "./index.less";
|
11
11
|
const WorkOverview = (props) => {
|
12
|
-
const {
|
12
|
+
const { actives, dueActives, onOverviewItemClick, onDueItemClick } = props;
|
13
|
+
const [state] = useState(new State());
|
14
|
+
state.update(actives, dueActives);
|
13
15
|
return observe(() => (React.createElement(Scrollbars, { autoHide: true },
|
14
|
-
React.createElement(PanelOverview, { className: "work-overview", overviewAll: React.createElement(OverviewAll, { total: 20, description: "Total All Works" }), overviewList: React.createElement(React.Fragment, null,
|
15
|
-
React.createElement(OverviewItem, { className: "
|
16
|
-
React.createElement(OverviewItem, {
|
17
|
-
React.createElement(OverviewItem, { className: "
|
18
|
-
React.createElement(OverviewItem, { className: "
|
19
|
-
React.createElement(
|
20
|
-
React.createElement(
|
21
|
-
React.createElement(DueItem, { className: "
|
16
|
+
React.createElement(PanelOverview, { className: "work-overview", overviewAll: React.createElement(OverviewAll, { className: classnames({ active: state.actives.includes("All") }), total: 20, description: "Total All Works", onClick: () => onClick("All") }), overviewList: React.createElement(React.Fragment, null,
|
17
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Draft") }), total: 20, description: "Draft", onClick: () => onClick("Draft") }),
|
18
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("New") }), total: 20, description: "New", onClick: () => onClick("New") }),
|
19
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Rejected") }), total: 20, description: "Rejected", onClick: () => onClick("Rejected") }),
|
20
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Active") }), total: 20, description: "Active", onClick: () => onClick("Active") }),
|
21
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Done") }), total: 20, description: "Done", onClick: () => onClick("Done") }),
|
22
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Closed") }), total: 20, description: "Closed", onClick: () => onClick("Closed") })), nodeTitle: "DUE OF WORKS", dueList: React.createElement(React.Fragment, null,
|
23
|
+
React.createElement(DueItem, { className: classnames({ active: state.dueActives === "overdue" }), title: "Overdue", type: "Works", description: dayjs().format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("overdue") }),
|
24
|
+
React.createElement(DueItem, { className: classnames("week", { active: state.dueActives === "week" }), title: "This Week", type: "Works", description: dayjs().endOf("week").format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("week") }),
|
25
|
+
React.createElement(DueItem, { className: classnames("month", { active: state.dueActives === "month" }), title: "This Month", type: "Works", description: dayjs().endOf("month").format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("month") })) }))));
|
26
|
+
function onDueClick(dueAct) {
|
27
|
+
state.onDueClick(dueAct);
|
28
|
+
onDueItemClick === null || onDueItemClick === void 0 ? void 0 : onDueItemClick(state.dueActives);
|
29
|
+
}
|
30
|
+
function onClick(status) {
|
31
|
+
state.onClick(status);
|
32
|
+
onOverviewItemClick === null || onOverviewItemClick === void 0 ? void 0 : onOverviewItemClick(state.actives);
|
33
|
+
}
|
22
34
|
};
|
23
35
|
export default WorkOverview;
|
24
36
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkOverview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkOverview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,YAAY,MAAM,0DAA0D,CAAC;AACpF,OAAO,WAAW,MAAM,yDAAyD,CAAC;AAClF,OAAO,OAAO,MAAM,qDAAqD,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,aAAa,MAAM,6CAA6C,CAAC;AACxE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;IACjD,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAA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,KAAK,MAAM,EAAE,CAAC,EACtE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EACxD,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,GAChC;gBACF,oBAAC,OAAO,IACP,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,EAAE,CAAC,EACxE,KAAK,EAAC,YAAY,EAClB,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EACzD,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,GACjC,CACA,GAEH,CACU,CACb,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,MAAc;QACjC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,OAAO,CAAC,MAAc;QAC9B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { action, makeObservable, observable } from "mobx";
|
3
|
+
export class State {
|
4
|
+
constructor() {
|
5
|
+
Object.defineProperty(this, "actives", {
|
6
|
+
enumerable: true,
|
7
|
+
configurable: true,
|
8
|
+
writable: true,
|
9
|
+
value: []
|
10
|
+
});
|
11
|
+
Object.defineProperty(this, "dueActives", {
|
12
|
+
enumerable: true,
|
13
|
+
configurable: true,
|
14
|
+
writable: true,
|
15
|
+
value: void 0
|
16
|
+
});
|
17
|
+
makeObservable(this);
|
18
|
+
}
|
19
|
+
update(currents, dueActives) {
|
20
|
+
if (JSON.stringify(currents) !== JSON.stringify(this.actives)) {
|
21
|
+
this.actives = currents !== null && currents !== void 0 ? currents : [];
|
22
|
+
}
|
23
|
+
if (dueActives !== this.dueActives) {
|
24
|
+
this.dueActives = dueActives;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
onClick(status) {
|
28
|
+
if (status === "All") {
|
29
|
+
this.actives = [status];
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
if (this.actives.includes("All")) {
|
33
|
+
this.actives = [status];
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
if (this.actives.includes(status)) {
|
37
|
+
this.actives = this.actives.filter((item) => item !== status);
|
38
|
+
}
|
39
|
+
else {
|
40
|
+
const actives = Array.isArray(this.actives) ? [...this.actives, status] : [status];
|
41
|
+
this.actives = actives;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
onDueClick(dueAct) {
|
47
|
+
this.dueActives = dueAct;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
__decorate([
|
51
|
+
observable
|
52
|
+
], State.prototype, "actives", void 0);
|
53
|
+
__decorate([
|
54
|
+
observable
|
55
|
+
], State.prototype, "dueActives", void 0);
|
56
|
+
__decorate([
|
57
|
+
action
|
58
|
+
], State.prototype, "update", null);
|
59
|
+
__decorate([
|
60
|
+
action
|
61
|
+
], State.prototype, "onClick", null);
|
62
|
+
__decorate([
|
63
|
+
action
|
64
|
+
], State.prototype, "onDueClick", null);
|
65
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkOverview/state.ts"],"names":[],"mappings":";AA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AC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;oBACnF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;gBACxB,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAEc,UAAU,CAAC,MAAc;QACvC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;IAC1B,CAAC;CACD;AApCmB;IAAlB,UAAU;sCAA+B;AACvB;IAAlB,UAAU;yCAA4B;AAMxB;IAAd,MAAM;mCAON;AAEc;IAAd,MAAM;oCAeN;AAEc;IAAd,MAAM;uCAEN"}
|
@@ -9,8 +9,7 @@ import WorkPanel from "../../components/WorkPanel";
|
|
9
9
|
import { State } from "./state";
|
10
10
|
import styles from "./index.less";
|
11
11
|
import { useApplicationContext } from "@voplus/morpho-data";
|
12
|
-
import
|
13
|
-
import FilterStatusLabel from "@voplus/morpho-ui/es/controls/FilterStatusLabel";
|
12
|
+
import FilterLabel from "@voplus/morpho-ui/es/controls/FilterLabel";
|
14
13
|
import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
|
15
14
|
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog2/ActivityLog2";
|
16
15
|
const WorkListPage = (props) => {
|
@@ -18,22 +17,13 @@ const WorkListPage = (props) => {
|
|
18
17
|
const [state] = useState(new State(props.contactId));
|
19
18
|
const [activeKey, setActiveKey] = useState("WorkList");
|
20
19
|
return observe(() => {
|
21
|
-
var _a;
|
22
|
-
return (React.createElement(DefaultViewLayout, { className: styles["work-list-page"], header: React.createElement(PageHeadDashboard, { avatarIcon: React.createElement(FAIcon, { icon: faBriefcase }), title: "Works", upAble: true, description: "Your tasks: prioritize and complete your work" }), propertiesWidth: "295px", properties: React.createElement(WorkPanel
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
// }}
|
29
|
-
, {
|
30
|
-
// overviewProps={{
|
31
|
-
// onOverviewItemClick: (s) =>
|
32
|
-
// state.onFilterOptions([{ c: "WorkStatus", o: "=", l: "And", v1: s }]),
|
33
|
-
// onTodayClick: () => state.onTodayClick(),
|
34
|
-
// onDueItemClick: (d: any) => state.onFilterOptions(state.date(d)),
|
35
|
-
// }}
|
36
|
-
workFilterProps: {
|
20
|
+
var _a, _b, _c;
|
21
|
+
return (React.createElement(DefaultViewLayout, { className: styles["work-list-page"], header: React.createElement(PageHeadDashboard, { avatarIcon: React.createElement(FAIcon, { icon: faBriefcase }), title: "Works", upAble: true, description: "Your tasks: prioritize and complete your work" }), propertiesWidth: "295px", properties: React.createElement(WorkPanel, { overviewProps: {
|
22
|
+
actives: state.status,
|
23
|
+
dueActives: state.dueActives,
|
24
|
+
onOverviewItemClick: (s) => state.onOverviewItemClick(s),
|
25
|
+
onDueItemClick: (d) => state.onDueItemClick(d),
|
26
|
+
}, workFilterProps: {
|
37
27
|
onFilter(options) {
|
38
28
|
state.onFilterOptions(options);
|
39
29
|
},
|
@@ -54,7 +44,7 @@ const WorkListPage = (props) => {
|
|
54
44
|
contactId: (_a = props.contactId) !== null && _a !== void 0 ? _a : context.user.info.unit.id,
|
55
45
|
} })) : null)),
|
56
46
|
},
|
57
|
-
], onChange: (key) => setActiveKey(key), tabBarExtraContent: activeKey === "WorkList" ? (React.createElement(
|
47
|
+
], onChange: (key) => setActiveKey(key), tabBarExtraContent: activeKey === "WorkList" ? (React.createElement("div", { className: "list-tabBar-filter" }, ((_b = state.status) === null || _b === void 0 ? void 0 : _b.includes("All")) ? ("Showed: Total All Works") : ((_c = state.status) === null || _c === void 0 ? void 0 : _c.length) || state.dueActives ? (React.createElement(FilterLabel, { status: state.status.concat(state.dueActives ? [state.dueActives] : []), maxCount: 2, onFilter: (s) => state.onFilterLabel(s) })) : undefined)) : undefined })));
|
58
48
|
});
|
59
49
|
};
|
60
50
|
export default WorkListPage;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/pages/WorkListPage2/index.tsx"],"names":[],"mappings":"AAAA,O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CACN,CAAC,CAAC,CAAC,SAAS,GAEb,CACiB,CACpB,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -3,8 +3,13 @@ export declare class State {
|
|
3
3
|
private contactId?;
|
4
4
|
/** 默认值 */
|
5
5
|
filerOptions?: FilterOption[];
|
6
|
+
status: string[];
|
7
|
+
dueActives?: "overdue" | "week" | "month";
|
6
8
|
constructor(contactId?: string | undefined);
|
7
9
|
onFilterOptions(options?: FilterOption[]): void;
|
8
|
-
|
9
|
-
|
10
|
+
onDueItemClick(d: "overdue" | "week" | "month"): void;
|
11
|
+
onOverviewItemClick(s?: string[]): void;
|
12
|
+
onFilterLabel(s?: string): void;
|
13
|
+
get statusFilerOptions(): FilterOption[];
|
14
|
+
get dateFilerOptions(): FilterOption[];
|
10
15
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { action, makeObservable, observable } from "mobx";
|
2
|
+
import { action, makeObservable, observable, computed, toJS } from "mobx";
|
3
3
|
import dayjs from "dayjs";
|
4
4
|
export class State {
|
5
5
|
constructor(contactId) {
|
@@ -16,50 +16,112 @@ export class State {
|
|
16
16
|
writable: true,
|
17
17
|
value: void 0
|
18
18
|
});
|
19
|
+
Object.defineProperty(this, "status", {
|
20
|
+
enumerable: true,
|
21
|
+
configurable: true,
|
22
|
+
writable: true,
|
23
|
+
value: []
|
24
|
+
});
|
25
|
+
Object.defineProperty(this, "dueActives", {
|
26
|
+
enumerable: true,
|
27
|
+
configurable: true,
|
28
|
+
writable: true,
|
29
|
+
value: void 0
|
30
|
+
});
|
19
31
|
makeObservable(this);
|
20
32
|
this.onFilterOptions([
|
21
33
|
{ c: "WorkStatus", o: "contains", l: "And", v1: JSON.stringify(["New", "Active"]) },
|
22
34
|
]);
|
23
35
|
}
|
24
36
|
onFilterOptions(options) {
|
25
|
-
var _a, _b
|
37
|
+
var _a, _b;
|
26
38
|
this.filerOptions = options !== null && options !== void 0 ? options : [];
|
27
|
-
if (!((_a = this.filerOptions) === null || _a === void 0 ? void 0 : _a.
|
28
|
-
(_b = this.filerOptions) === null || _b === void 0 ? void 0 : _b.push({
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
39
|
+
if (this.contactId && !((_a = this.filerOptions) === null || _a === void 0 ? void 0 : _a.some((item) => item.c === "Contact"))) {
|
40
|
+
(_b = this.filerOptions) === null || _b === void 0 ? void 0 : _b.push({ c: "Contact", o: "=", l: "And", v1: this.contactId });
|
41
|
+
}
|
42
|
+
}
|
43
|
+
onDueItemClick(d) {
|
44
|
+
this.dueActives = d;
|
45
|
+
if (this.status.includes("All"))
|
46
|
+
this.status = [];
|
47
|
+
this.onFilterOptions(this.statusFilerOptions.concat(this.dateFilerOptions));
|
48
|
+
}
|
49
|
+
onOverviewItemClick(s) {
|
50
|
+
this.status = s !== null && s !== void 0 ? s : [];
|
51
|
+
if (this.status.includes("All"))
|
52
|
+
this.dueActives = undefined;
|
53
|
+
this.onFilterOptions(this.statusFilerOptions.concat(this.dateFilerOptions));
|
54
|
+
}
|
55
|
+
onFilterLabel(s) {
|
56
|
+
if (s) {
|
57
|
+
if (s === "overdue" || s === "week" || s === "month") {
|
58
|
+
this.dueActives = undefined;
|
59
|
+
}
|
60
|
+
let status = toJS(this.status);
|
61
|
+
status = status === null || status === void 0 ? void 0 : status.filter((i) => i !== s);
|
62
|
+
this.onOverviewItemClick(status);
|
34
63
|
}
|
35
|
-
|
36
|
-
|
64
|
+
else {
|
65
|
+
this.status = [];
|
66
|
+
this.dueActives = undefined;
|
67
|
+
this.onFilterOptions();
|
37
68
|
}
|
38
69
|
}
|
39
|
-
|
40
|
-
let
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
70
|
+
get statusFilerOptions() {
|
71
|
+
let f = [];
|
72
|
+
if (this.status.includes("All"))
|
73
|
+
return f;
|
74
|
+
let status = toJS(this.status);
|
75
|
+
if (status === null || status === void 0 ? void 0 : status.length)
|
76
|
+
f.push({ c: "WorkStatus", o: "contains", l: "And", v1: JSON.stringify(status) });
|
77
|
+
return f;
|
46
78
|
}
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
79
|
+
get dateFilerOptions() {
|
80
|
+
let f = [];
|
81
|
+
if (this.status.includes("All"))
|
82
|
+
return f;
|
83
|
+
if (this.dueActives) {
|
84
|
+
if (this.dueActives === "overdue") {
|
85
|
+
f = [{ c: "DueDate", o: "<=", l: "And", v1: dayjs().format("YYYY-MM-DD") }];
|
86
|
+
}
|
87
|
+
else {
|
88
|
+
const v1 = dayjs()
|
89
|
+
.startOf(this.dueActives)
|
90
|
+
.format("YYYY-MM-DD HH:mm:ss");
|
91
|
+
const v2 = dayjs()
|
92
|
+
.endOf(this.dueActives)
|
93
|
+
.format("YYYY-MM-DD HH:mm:ss");
|
94
|
+
f = [{ c: "DueDate", o: "between", l: "And", v1: v1, v2: v2 }];
|
95
|
+
}
|
96
|
+
}
|
97
|
+
return f;
|
51
98
|
}
|
52
99
|
}
|
53
100
|
__decorate([
|
54
101
|
observable
|
55
102
|
], State.prototype, "filerOptions", void 0);
|
103
|
+
__decorate([
|
104
|
+
observable
|
105
|
+
], State.prototype, "status", void 0);
|
106
|
+
__decorate([
|
107
|
+
observable
|
108
|
+
], State.prototype, "dueActives", void 0);
|
56
109
|
__decorate([
|
57
110
|
action
|
58
111
|
], State.prototype, "onFilterOptions", null);
|
59
112
|
__decorate([
|
60
113
|
action
|
61
|
-
], State.prototype, "
|
114
|
+
], State.prototype, "onDueItemClick", null);
|
115
|
+
__decorate([
|
116
|
+
action
|
117
|
+
], State.prototype, "onOverviewItemClick", null);
|
62
118
|
__decorate([
|
63
119
|
action
|
64
|
-
], State.prototype, "
|
120
|
+
], State.prototype, "onFilterLabel", null);
|
121
|
+
__decorate([
|
122
|
+
computed
|
123
|
+
], State.prototype, "statusFilerOptions", null);
|
124
|
+
__decorate([
|
125
|
+
computed
|
126
|
+
], State.prototype, "dateFilerOptions", null);
|
65
127
|
//# sourceMappingURL=state.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/pages/WorkListPage2/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/work/pages/WorkListPage2/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,KAAK;IAMjB,YAA2B,SAAkB;QAA1B;;;;mBAAQ,SAAS;WAAS;QAL7C,UAAU;QACS;;;;;WAA8B;QAC9B;;;;mBAAmB,EAAE;WAAC;QACtB;;;;;WAA0C;QAG5D,cAAc,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,eAAe,CAAC;YACpB,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,EAAE;SACnF,CAAC,CAAC;IACJ,CAAC;IAEc,eAAe,CAAC,OAAwB;;QACtD,IAAI,CAAC,YAAY,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;QAElC,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,SAAS,CAAC,CAAA,EAAE,CAAC;YAChF,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,CAAC,EAAE,CAAC,EA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C,IAAI,CAAC,UAAiB,CAAC;qBAC7B,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBAChC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YAChE,CAAC;QACF,CAAC;QAED,OAAO,CAAC,CAAC;IACV,CAAC;CACD;AA7EmB;IAAlB,UAAU;2CAAsC;AAC9B;IAAlB,UAAU;qCAA8B;AACtB;IAAlB,UAAU;yCAAkD;AAS9C;IAAd,MAAM;4CAMN;AAEc;IAAd,MAAM;2CAIN;AAEc;IAAd,MAAM;gDAIN;AAEc;IAAd,MAAM;0CAaN;AAES;IAAT,QAAQ;+CASR;AAES;IAAT,QAAQ;6CAmBR"}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import React, { useMemo } from "react";
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
2
3
|
import { Skeleton, Tag } from "antd";
|
3
4
|
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
5
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
4
6
|
import { useWorkError, useWorkErrorStore } from "../../../../../data/workerror";
|
5
|
-
import
|
7
|
+
import { Open, Close } from "@voplus/morpho-org/es/controls/ToolBar/items";
|
8
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
6
9
|
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
7
10
|
import AvatarList from "@voplus/morpho-org/es/components/AvatarList";
|
8
|
-
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
9
|
-
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
10
11
|
import WorkErrorMenu from "../../controls/WorkErrorMenu";
|
11
|
-
import
|
12
|
+
import WorkErrorTabs from "../WorkErrorTabs";
|
12
13
|
import styles from "./index.less";
|
13
|
-
import { useApplicationContext } from "@voplus/morpho-data";
|
14
14
|
const WorkErrorPropertiesView = (props) => {
|
15
15
|
const { id } = props;
|
16
16
|
const view = useMemo(() => new ViewContextData("PropertiesView"), []);
|
@@ -27,6 +27,7 @@ const WorkErrorPropertiesView = (props) => {
|
|
27
27
|
React.createElement(Tag, { color: "purple" }, workerror.severity)),
|
28
28
|
React.createElement(ToolBar, { id: props.id, showMenu: false },
|
29
29
|
React.createElement(Open, { size: "small", url: `/work-error/${props.id}` }),
|
30
|
+
React.createElement(Close, null),
|
30
31
|
React.createElement(WorkErrorMenu, { id: props.id, closeAside: true }))),
|
31
32
|
React.createElement("div", { className: "workerror-date" },
|
32
33
|
React.createElement(UTCShortDate, { value: workerror.due, format: "DD MMM YYYY" })),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-error/components/WorkErrorPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-error/components/WorkErrorPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,qBAAqB,E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wBAEN,oBAAC,OAAO,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK;4BACrC,oBAAC,IAAI,IAAC,IAAI,EAAC,OAAO,EAAC,GAAG,EAAE,eAAe,KAAK,CAAC,EAAE,EAAE,GAAI;4BACrD,oBAAC,KAAK,OAAG;4BACT,oBAAC,aAAa,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,GAAI,CACxC,CACL;oBACN,6BAAK,SAAS,EAAC,gBAAgB;wBAC9B,oBAAC,YAAY,IAAC,KAAK,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAC,aAAa,GAAG,CACtD;oBACN,oBAAC,UAAU,IACV,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EACxC,IAAI,EAAE,SAAS,CAAC,OAAO,IAAI,EAAE,EAC7B,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE;4BACjB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;wBAChE,CAAC,GACA,CACG,CACI;YACX,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,SAAG,CAC9B,CACgB,CACvB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import "./index.less";
|
3
2
|
export type WorkScheduleOverviewProps = {
|
4
|
-
|
3
|
+
actives?: string[];
|
4
|
+
dueActives?: string;
|
5
|
+
onOverviewItemClick?: (status?: string[]) => void;
|
6
|
+
onDueItemClick?: (date?: string) => void;
|
5
7
|
};
|
6
8
|
declare const WorkScheduleOverview: (props: WorkScheduleOverviewProps) => React.JSX.Element;
|
7
9
|
export default WorkScheduleOverview;
|
@@ -1,22 +1,32 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useState } from "react";
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
3
3
|
import DueItem from "@voplus/morpho-ui/es/controls/PanelOverview/DueItem";
|
4
4
|
import OverviewItem from "@voplus/morpho-ui/es/controls/PanelOverview/OverviewItem";
|
5
5
|
import OverviewAll from "@voplus/morpho-ui/es/controls/PanelOverview/OverviewAll";
|
6
6
|
import { Scrollbars } from "react-custom-scrollbars-2";
|
7
|
-
import { faPlus, faClock } from "@fortawesome/pro-solid-svg-icons";
|
8
7
|
import PanelOverview from "@voplus/morpho-ui/es/controls/PanelOverview";
|
8
|
+
import classnames from "classnames";
|
9
|
+
import { State } from "./state";
|
9
10
|
import dayjs from "dayjs";
|
10
|
-
import "./index.less";
|
11
11
|
const WorkScheduleOverview = (props) => {
|
12
|
-
const { onOverviewItemClick } = props;
|
12
|
+
const { actives, dueActives, onOverviewItemClick, onDueItemClick } = props;
|
13
|
+
const [state] = useState(new State());
|
14
|
+
state.update(actives, dueActives);
|
13
15
|
return observe(() => (React.createElement(Scrollbars, { autoHide: true },
|
14
|
-
React.createElement(PanelOverview, { className: "work-schedule-overview", overviewAll: React.createElement(OverviewAll, { total: 20, description: "Total All Work Schedule" }), overviewList: React.createElement(React.Fragment, null,
|
15
|
-
React.createElement(OverviewItem, {
|
16
|
-
React.createElement(OverviewItem, { className: "
|
17
|
-
React.createElement(DueItem, { title: "Overdue", type: "Works", description: dayjs().format("DD MMM YYYY"), total: 20 }),
|
18
|
-
React.createElement(DueItem, { className: "week", title: "This Week", type: "Works", description: dayjs().endOf("week").format("DD MMM YYYY"), total: 20 }),
|
19
|
-
React.createElement(DueItem, { className: "month", title: "This Month", type: "Works", description: dayjs().endOf("month").format("DD MMM YYYY"), total: 20 })) }))));
|
16
|
+
React.createElement(PanelOverview, { className: "work-schedule-overview", overviewAll: React.createElement(OverviewAll, { className: classnames({ active: state.actives.includes("All") }), total: 20, description: "Total All Work Schedule", onClick: () => onClick("All") }), overviewList: React.createElement(React.Fragment, null,
|
17
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("WorkCreated") }), total: 20, description: "Work Created", onClick: () => onClick("WorkCreated") }),
|
18
|
+
React.createElement(OverviewItem, { className: classnames({ active: state.actives.includes("Unscheduled") }), total: 20, description: "Unscheduled", onClick: () => onClick("Unscheduled") })), nodeTitle: "DUE OF WORKS SCHEDULE", dueList: React.createElement(React.Fragment, null,
|
19
|
+
React.createElement(DueItem, { className: classnames({ active: state.dueActives === "overdue" }), title: "Overdue", type: "Works", description: dayjs().format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("overdue") }),
|
20
|
+
React.createElement(DueItem, { className: classnames("week", { active: state.dueActives === "week" }), title: "This Week", type: "Works", description: dayjs().endOf("week").format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("week") }),
|
21
|
+
React.createElement(DueItem, { className: classnames("month", { active: state.dueActives === "month" }), title: "This Month", type: "Works", description: dayjs().endOf("month").format("DD MMM YYYY"), total: 20, onClick: () => onDueClick("month") })) }))));
|
22
|
+
function onDueClick(dueAct) {
|
23
|
+
state.onDueClick(dueAct);
|
24
|
+
onDueItemClick === null || onDueItemClick === void 0 ? void 0 : onDueItemClick(state.dueActives);
|
25
|
+
}
|
26
|
+
function onClick(status) {
|
27
|
+
state.onClick(status);
|
28
|
+
onOverviewItemClick === null || onOverviewItemClick === void 0 ? void 0 : onOverviewItemClick(state.actives);
|
29
|
+
}
|
20
30
|
};
|
21
31
|
export default WorkScheduleOverview;
|
22
32
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleOverview/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleOverview/index.tsx"],"names":[],"mappings":"AAAA,OAA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WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EACzD,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,GACjC,CACA,GAEH,CACU,CACb,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,MAAc;QACjC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,OAAO,CAAC,MAAc;QAC9B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { action, makeObservable, observable } from "mobx";
|
3
|
+
export class State {
|
4
|
+
constructor() {
|
5
|
+
Object.defineProperty(this, "actives", {
|
6
|
+
enumerable: true,
|
7
|
+
configurable: true,
|
8
|
+
writable: true,
|
9
|
+
value: []
|
10
|
+
});
|
11
|
+
Object.defineProperty(this, "dueActives", {
|
12
|
+
enumerable: true,
|
13
|
+
configurable: true,
|
14
|
+
writable: true,
|
15
|
+
value: void 0
|
16
|
+
});
|
17
|
+
makeObservable(this);
|
18
|
+
}
|
19
|
+
update(currents, dueActives) {
|
20
|
+
if (JSON.stringify(currents) !== JSON.stringify(this.actives)) {
|
21
|
+
this.actives = currents !== null && currents !== void 0 ? currents : [];
|
22
|
+
}
|
23
|
+
if (dueActives !== this.dueActives) {
|
24
|
+
this.dueActives = dueActives;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
onClick(status) {
|
28
|
+
this.actives = [status];
|
29
|
+
// if (status === "All") {
|
30
|
+
// this.actives = [status];
|
31
|
+
// } else {
|
32
|
+
// if (this.actives.includes("All")) {
|
33
|
+
// this.actives = [status];
|
34
|
+
// } else {
|
35
|
+
// if (this.actives.includes(status)) {
|
36
|
+
// this.actives = this.actives.filter((item) => item !== status);
|
37
|
+
// } else {
|
38
|
+
// const actives = Array.isArray(this.actives) ? [...this.actives, status] : [status];
|
39
|
+
// this.actives = actives;
|
40
|
+
// }
|
41
|
+
// }
|
42
|
+
// }
|
43
|
+
}
|
44
|
+
onDueClick(dueAct) {
|
45
|
+
this.dueActives = dueAct;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
__decorate([
|
49
|
+
observable
|
50
|
+
], State.prototype, "actives", void 0);
|
51
|
+
__decorate([
|
52
|
+
observable
|
53
|
+
], State.prototype, "dueActives", void 0);
|
54
|
+
__decorate([
|
55
|
+
action
|
56
|
+
], State.prototype, "update", null);
|
57
|
+
__decorate([
|
58
|
+
action
|
59
|
+
], State.prototype, "onClick", null);
|
60
|
+
__decorate([
|
61
|
+
action
|
62
|
+
], State.prototype, "onDueClick", null);
|
63
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/work/work-schedule/components/WorkScheduleOverview/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAO,KAAK;IAIjB;QAHmB;;;;mBAAoB,EAAE;WAAC;QACvB;;;;;WAAoB;QAGtC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAEc,MAAM,CAAC,QAAmB,EAAE,UAAmB;QAC7D,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,OAAO,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;QAC/B,CAAC;QACD,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC9B,CAAC;IACF,CAAC;IAEc,OAAO,CAAC,MAAc;QACpC,IAAI,CAAC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;QACxB,0BAA0B;QAC1B,4BAA4B;QAC5B,WAAW;QACX,uCAAuC;QACvC,6BAA6B;QAC7B,YAAY;QACZ,yCAAyC;QACzC,oEAAoE;QACpE,aAAa;QACb,yFAAyF;QACzF,6BAA6B;QAC7B,MAAM;QACN,KAAK;QACL,IAAI;IACL,CAAC;IAEc,UAAU,CAAC,MAAc;QACvC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;IAC1B,CAAC;CACD;AArCmB;IAAlB,UAAU;sCAA+B;AACvB;IAAlB,UAAU;yCAA4B;AAMxB;IAAd,MAAM;mCAON;AAEc;IAAd,MAAM;oCAgBN;AAEc;IAAd,MAAM;uCAEN"}
|