@voplus/morpho-document 6.0.159 → 6.0.161
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/components/DocumentSelectDialog/index.js +6 -5
- package/es/components/DocumentSelectDialog/index.js.map +1 -1
- package/es/components/DocumentTree/index.d.ts +9 -2
- package/es/components/DocumentTree/index.js +52 -52
- package/es/components/DocumentTree/index.js.map +1 -1
- package/es/components/DocumentTree/index.less +20 -3
- package/es/data/quick-access/QuickAccessStore.d.ts +16 -0
- package/es/data/quick-access/QuickAccessStore.js +49 -0
- package/es/data/quick-access/QuickAccessStore.js.map +1 -0
- package/es/data/quick-access/hooks.d.ts +14 -0
- package/es/data/quick-access/hooks.js +20 -0
- package/es/data/quick-access/hooks.js.map +1 -0
- package/es/data/quick-access/index.d.ts +2 -0
- package/es/data/quick-access/index.js +3 -0
- package/es/data/quick-access/index.js.map +1 -0
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.d.ts +1 -1
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.js +1 -1
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.js.map +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.less +3 -0
- package/es/modules/quick-access/AdvanceFilterForm/index.d.ts +11 -0
- package/es/modules/quick-access/AdvanceFilterForm/index.js +138 -0
- package/es/modules/quick-access/AdvanceFilterForm/index.js.map +1 -0
- package/es/modules/quick-access/AdvanceFilterForm/index.less +8 -0
- package/es/modules/quick-access/AdvanceFilterForm/state.d.ts +29 -0
- package/es/modules/quick-access/AdvanceFilterForm/state.js +103 -0
- package/es/modules/quick-access/AdvanceFilterForm/state.js.map +1 -0
- package/es/modules/quick-access/QuickAccessPage/index.d.ts +4 -0
- package/es/modules/quick-access/QuickAccessPage/index.js +46 -0
- package/es/modules/quick-access/QuickAccessPage/index.js.map +1 -0
- package/es/modules/quick-access/QuickAccessPage/index.less +33 -0
- package/es/modules/quick-access/QuickAccessSearchList/index.d.ts +3 -0
- package/es/modules/quick-access/QuickAccessSearchList/index.js +81 -0
- package/es/modules/quick-access/QuickAccessSearchList/index.js.map +1 -0
- package/es/modules/quick-access/QuickAccessSearchList/index.less +184 -0
- package/es/modules/quick-access/QuickAccessSearchList/state.d.ts +20 -0
- package/es/modules/quick-access/QuickAccessSearchList/state.js +129 -0
- package/es/modules/quick-access/QuickAccessSearchList/state.js.map +1 -0
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.js +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.d.ts +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.js +2 -2
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/index.less +11 -7
- package/es/obsolete/DocumentTree/index.d.ts +4 -0
- package/es/obsolete/DocumentTree/index.js +62 -0
- package/es/obsolete/DocumentTree/index.js.map +1 -0
- package/es/obsolete/DocumentTree/index.less +4 -0
- package/es/obsolete/DocumentTree/state.js.map +1 -0
- package/es/routes.d.ts +6 -0
- package/es/routes.js +13 -0
- package/es/routes.js.map +1 -1
- package/package.json +2 -2
- package/es/components/DocumentTree/state.js.map +0 -1
- /package/es/{components → obsolete}/DocumentTree/state.d.ts +0 -0
- /package/es/{components → obsolete}/DocumentTree/state.js +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { action, makeObservable, observable, runInAction } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor(documentStore) {
|
|
5
|
+
Object.defineProperty(this, "documentStore", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: documentStore
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "tagLoading", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: false
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "tagList", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: []
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "selectedUnit", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "selectedUnits", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: []
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(this, "amountFilter", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: {
|
|
40
|
+
c: "",
|
|
41
|
+
o: "=",
|
|
42
|
+
l: "And",
|
|
43
|
+
v1: 0,
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// { c: "", o: "=", l: "And", v1: "" }
|
|
47
|
+
Object.defineProperty(this, "filerOptions", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: []
|
|
52
|
+
});
|
|
53
|
+
makeObservable(this);
|
|
54
|
+
this.loadData();
|
|
55
|
+
}
|
|
56
|
+
updateFilterOptions(c, filter) {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
this.filerOptions = (_a = this.filerOptions) === null || _a === void 0 ? void 0 : _a.filter((option) => option.c !== c);
|
|
59
|
+
if (filter === null || filter === void 0 ? void 0 : filter.v1) {
|
|
60
|
+
(_b = this.filerOptions) === null || _b === void 0 ? void 0 : _b.push(filter);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async loadData() {
|
|
64
|
+
try {
|
|
65
|
+
this.tagLoading = true;
|
|
66
|
+
await this.documentStore.loadTags("").then((res) => {
|
|
67
|
+
runInAction(() => {
|
|
68
|
+
this.tagList = [];
|
|
69
|
+
res === null || res === void 0 ? void 0 : res.map((tag) => this.tagList.push({ lable: tag.name, value: tag.name }));
|
|
70
|
+
this.tagLoading = false;
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
runInAction(() => (this.tagLoading = false));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
__decorate([
|
|
80
|
+
observable
|
|
81
|
+
], State.prototype, "tagLoading", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
observable
|
|
84
|
+
], State.prototype, "tagList", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
observable
|
|
87
|
+
], State.prototype, "selectedUnit", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
observable
|
|
90
|
+
], State.prototype, "selectedUnits", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
observable
|
|
93
|
+
], State.prototype, "amountFilter", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
observable
|
|
96
|
+
], State.prototype, "filerOptions", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
action
|
|
99
|
+
], State.prototype, "updateFilterOptions", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
action
|
|
102
|
+
], State.prototype, "loadData", null);
|
|
103
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/modules/quick-access/AdvanceFilterForm/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAGvE,MAAM,OAAO,KAAK;IAqBjB,YAA2B,aAA4B;QAApC;;;;mBAAQ,aAAa;WAAe;QApBpC;;;;mBAAa,KAAK;WAAC;QACnB;;;;mBAA8C,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,CAAC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC;QAC9C,CAAC;IACF,CAAC;CACD;AAlDmB;IAAlB,UAAU;yCAA2B;AACnB;IAAlB,UAAU;sCAAyD;AAEjD;IAAlB,UAAU;2CAAoD;AAC5C;IAAlB,UAAU;4CAA2D;AACnD;IAAlB,UAAU;2CAWT;AAEiB;IAAlB,UAAU;2CAA2C;AAS/C;IADN,MAAM;gDAON;AAGY;IADZ,MAAM;qCAcN"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Tabs } from "antd";
|
|
3
|
+
import { observe } from "@voplus/morpho-ui";
|
|
4
|
+
import { useLayout } from "@voplus/morpho-data";
|
|
5
|
+
import { useResolvedPath } from "react-router-dom";
|
|
6
|
+
import { faMagnifyingGlass } from "@fortawesome/pro-solid-svg-icons";
|
|
7
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import PageHeadDashboard from "@voplus/morpho-ui/es/components/layout/headers/PageHeadDashboard";
|
|
9
|
+
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
10
|
+
import QuickAccessSearchList from "../QuickAccessSearchList";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
const QuickAccessPage = () => {
|
|
13
|
+
const url = useResolvedPath("").pathname;
|
|
14
|
+
const layout = useLayout();
|
|
15
|
+
const [activeKey, setActiveKey] = useState("search");
|
|
16
|
+
const [asideContext] = useState(AsideContent.createContext());
|
|
17
|
+
const items = [
|
|
18
|
+
{
|
|
19
|
+
key: "search",
|
|
20
|
+
label: "Search",
|
|
21
|
+
children: React.createElement(QuickAccessSearchList, null),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "saved",
|
|
25
|
+
label: "Saved Search",
|
|
26
|
+
disabled: true,
|
|
27
|
+
children: React.createElement("div", null, "Saved Search"),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "history",
|
|
31
|
+
label: "History",
|
|
32
|
+
disabled: true,
|
|
33
|
+
children: React.createElement("div", null, "History"),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
return observe(() => (React.createElement(AsideContent, { context: asideContext },
|
|
37
|
+
React.createElement("div", { className: "quick-access-page" },
|
|
38
|
+
React.createElement(PageHeadDashboard, { avatarIcon: React.createElement(FAIcon, { icon: faMagnifyingGlass }), title: "Search Your Quick Access", description: "All Documents Are At Your Fingertips." }),
|
|
39
|
+
React.createElement(Tabs, { className: "quick-access-page-tabs", activeKey: activeKey, items: items, onChange: onChange })))));
|
|
40
|
+
function onChange(classify) {
|
|
41
|
+
setActiveKey(classify);
|
|
42
|
+
// layout.history.push(`${url}/quick-access/${classify}`);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export default QuickAccessPage;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/quick-access/QuickAccessPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,iBAAiB,MAAM,kEAAkE,CAAC;AACjG,OAAO,YAAY,MAAM,qDAAqD,CAAC;A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DAA0D;IAC3D,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
:global {
|
|
4
|
+
.quick-access-page {
|
|
5
|
+
height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
.quick-access-page-tabs {
|
|
10
|
+
flex: 1;
|
|
11
|
+
|
|
12
|
+
.ant-tabs-nav {
|
|
13
|
+
padding: 0 20px;
|
|
14
|
+
|
|
15
|
+
.ant-tabs-tab {
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
color: #868686;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ant-tabs-tab-active {
|
|
21
|
+
.ant-tabs-tab-btn {
|
|
22
|
+
color: @primary-color;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ant-tabs-ink-bar {
|
|
28
|
+
background-color: @primary-color;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button, Dropdown, Space, Menu } from "antd";
|
|
3
|
+
import { faStar, faChevronDown } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { useDeepMemo } from "@voplus/morpho-data";
|
|
5
|
+
import { State } from "./state";
|
|
6
|
+
import { SearchOutlined } from "@ant-design/icons";
|
|
7
|
+
import { useNodeInfoListEffect, useQuickAccessStore } from "../../../data/quick-access";
|
|
8
|
+
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
|
9
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import InfiniteScrollView from "@voplus/morpho-ui/es/controls/InfiniteScrollView";
|
|
11
|
+
import ObjectItem from "../../../components/QuickAccessSearch/ObjectItem";
|
|
12
|
+
import TimeoutInput from "@voplus/morpho-ui/es/controls/TimeoutInput";
|
|
13
|
+
import AdvanceFilterForm from "../AdvanceFilterForm";
|
|
14
|
+
import styles from "./index.less";
|
|
15
|
+
const QuickAccessSearchList = () => {
|
|
16
|
+
const asideContext = useAsideContentContext();
|
|
17
|
+
const store = useQuickAccessStore();
|
|
18
|
+
const state = useDeepMemo(() => new State(store), []);
|
|
19
|
+
useNodeInfoListEffect((result) => (state.fileTypes = result));
|
|
20
|
+
return observe(() => {
|
|
21
|
+
var _a, _b, _c, _d, _e, _f;
|
|
22
|
+
const menu = (React.createElement(Menu, { onClick: onSelectType, items: (_a = state.fileTypes) === null || _a === void 0 ? void 0 : _a.map((f) => {
|
|
23
|
+
return { key: f.type, label: f.type };
|
|
24
|
+
}) }));
|
|
25
|
+
return (React.createElement("div", { className: styles["quick-access-search-list"] },
|
|
26
|
+
React.createElement("div", { className: "quick-access-search-header" },
|
|
27
|
+
React.createElement(Dropdown, { dropdownRender: () => menu },
|
|
28
|
+
React.createElement(Button, { className: "file-type-dropdown" },
|
|
29
|
+
React.createElement(Space, null,
|
|
30
|
+
React.createElement("span", { className: "file-type" }, (_c = (_b = state.selectedType) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : "File Type"),
|
|
31
|
+
React.createElement(FAIcon, { icon: faChevronDown, color: "#5d5d5d" }),
|
|
32
|
+
React.createElement("div", { className: "longitudinal-dividing-line" })))),
|
|
33
|
+
React.createElement(TimeoutInput, { className: "search-file-name-input", placeholder: "Search file name or no \u2026", prefix: React.createElement(SearchOutlined, { style: { color: "lightgray" } }), value: state.filterNameOption.v1, onIdle: (val) => {
|
|
34
|
+
state.filterNameOption.v1 = val;
|
|
35
|
+
state.loadData(val ? [state.filterNameOption] : []);
|
|
36
|
+
},
|
|
37
|
+
// onFocus={() => (state.historyVisible = true)}
|
|
38
|
+
// onBlur={() => {
|
|
39
|
+
// setTimeout(() => {
|
|
40
|
+
// state.historyVisible = false;
|
|
41
|
+
// }, 200);
|
|
42
|
+
// }}
|
|
43
|
+
onChange: (e) => state.onChangeInput(e.target.value) }),
|
|
44
|
+
state.historyVisible && (React.createElement("div", { className: "quick-access-search-history-card" },
|
|
45
|
+
React.createElement("div", { className: "search-history-card-header" },
|
|
46
|
+
React.createElement(Dropdown, { dropdownRender: () => menu },
|
|
47
|
+
React.createElement(Button, { className: "file-type-dropdown-gray" },
|
|
48
|
+
React.createElement(Space, null,
|
|
49
|
+
React.createElement("span", { className: "file-type" }, (_e = (_d = state.selectedType) === null || _d === void 0 ? void 0 : _d.type) !== null && _e !== void 0 ? _e : "File Type"),
|
|
50
|
+
React.createElement(FAIcon, { icon: faChevronDown, color: "#5d5d5d" }),
|
|
51
|
+
React.createElement("div", { className: "longitudinal-dividing-line" })))),
|
|
52
|
+
React.createElement(TimeoutInput, { className: "search-file-name-input-gray", placeholder: "Search file name or no \u2026", prefix: React.createElement(SearchOutlined, { style: { color: "lightgray" } }), value: state.filterNameOption.v1, onIdle: (val) => {
|
|
53
|
+
state.filterNameOption.v1 = val;
|
|
54
|
+
state.loadData(val ? [state.filterNameOption] : []);
|
|
55
|
+
}, onChange: (e) => state.onChangeInput(e.target.value) })),
|
|
56
|
+
React.createElement("div", { className: "search-history-card-body" }),
|
|
57
|
+
React.createElement("div", { className: "search-history-card-footer" },
|
|
58
|
+
React.createElement(FAIcon, { className: "margin-right-5", icon: faStar }),
|
|
59
|
+
" Save this search"))),
|
|
60
|
+
!(asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent) && (React.createElement(Button, { className: "advance-search-btn", disabled: !((_f = state.selectedType) === null || _f === void 0 ? void 0 : _f.type), onClick: () => asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(AdvanceFilterForm, { filterTypes: state.fileTypes, selectedType: state.selectedType, onFilter: (options) => {
|
|
61
|
+
state.loadData(options !== null && options !== void 0 ? options : []);
|
|
62
|
+
} }), {
|
|
63
|
+
span: 9,
|
|
64
|
+
}) }, "Advance Search"))),
|
|
65
|
+
React.createElement("div", { className: "quick-access-search-content" }, state.initialize ? (React.createElement("div", { className: "search-list-empty" },
|
|
66
|
+
React.createElement("div", null,
|
|
67
|
+
React.createElement("img", { src: "/img/find-file.png", alt: "" }),
|
|
68
|
+
React.createElement("div", { className: "sub-title" }, "Find Files Faster"),
|
|
69
|
+
React.createElement("div", { className: "description-info" },
|
|
70
|
+
"Effortlessly search, filter, and access your files with our ",
|
|
71
|
+
React.createElement("br", null),
|
|
72
|
+
"intuitive search functionality.")))) : (React.createElement(InfiniteScrollView, { empty: state.lists.length === 0, loading: state.loading, hasMore: state.hasMore, loadMore: () => { } }, state.lists.map((item, index) => (React.createElement(ObjectItem, { key: item.id, index: index, id: item.id, type: item.type, objectType: item.objectType }))))))));
|
|
73
|
+
});
|
|
74
|
+
function onSelectType({ key }) {
|
|
75
|
+
var _a;
|
|
76
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
|
|
77
|
+
state.selectedType = (_a = state.fileTypes) === null || _a === void 0 ? void 0 : _a.find((f) => f.type === key);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export default QuickAccessSearchList;
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/quick-access/QuickAccessSearchList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,cAAc,E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U,EAAE,CAAC;QAE3B,KAAK,CAAC,YAAY,GAAG,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;IACnE,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.quick-access-search-list {
|
|
4
|
+
height: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
|
|
8
|
+
:global {
|
|
9
|
+
.quick-access-search-header {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
padding: 20px;
|
|
13
|
+
|
|
14
|
+
.file-type-dropdown {
|
|
15
|
+
margin-left: 0px;
|
|
16
|
+
padding-right: 0px;
|
|
17
|
+
border-right: none;
|
|
18
|
+
border-radius: 5px 0 0 5px;
|
|
19
|
+
|
|
20
|
+
.file-type {
|
|
21
|
+
color: #868686;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.longitudinal-dividing-line {
|
|
27
|
+
height: 21px;
|
|
28
|
+
border: 1px solid #cbcbcb;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
border-color: #cbcbcb;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.search-file-name-input.ant-input-outlined {
|
|
37
|
+
border-left: none;
|
|
38
|
+
margin-right: 20px;
|
|
39
|
+
border-radius: 0 5px 5px 0;
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
border-color: #cbcbcb;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
box-shadow: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:focus-within {
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ant-input:placeholder-shown {
|
|
54
|
+
color: #868686;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.advance-search-btn {
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
color: @primary-color;
|
|
63
|
+
border-color: @primary-color;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.clear-all-btn {
|
|
67
|
+
margin-left: 20px;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
color: #868686;
|
|
70
|
+
border-color: #cbcbcb;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.quick-access-search-history-card {
|
|
74
|
+
position: absolute;
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
width: calc(100% - 50px);
|
|
79
|
+
height: 60vh;
|
|
80
|
+
z-index: 9;
|
|
81
|
+
border-radius: 5px;
|
|
82
|
+
background: #fff;
|
|
83
|
+
box-shadow: 0px 3px 6px #00000029;
|
|
84
|
+
|
|
85
|
+
.search-history-card-header {
|
|
86
|
+
display: flex;
|
|
87
|
+
padding: 10px;
|
|
88
|
+
|
|
89
|
+
.file-type-dropdown-gray {
|
|
90
|
+
margin-left: 0px;
|
|
91
|
+
padding-right: 0px;
|
|
92
|
+
border: none;
|
|
93
|
+
background: #e6e6e6;
|
|
94
|
+
border-radius: 5px 0 0 5px;
|
|
95
|
+
|
|
96
|
+
.file-type {
|
|
97
|
+
color: #868686;
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.longitudinal-dividing-line {
|
|
103
|
+
height: 21px;
|
|
104
|
+
border: 1px solid #cbcbcb;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:hover {
|
|
108
|
+
border-color: #cbcbcb;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.search-file-name-input-gray.ant-input-outlined {
|
|
113
|
+
border: none;
|
|
114
|
+
background: #e6e6e6;
|
|
115
|
+
border-radius: 0 5px 5px 0;
|
|
116
|
+
|
|
117
|
+
&:hover {
|
|
118
|
+
border-color: #cbcbcb;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:focus {
|
|
122
|
+
box-shadow: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:focus-within {
|
|
126
|
+
box-shadow: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ant-input:placeholder-shown {
|
|
130
|
+
color: #868686;
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
font-size: 14px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.search-history-card-footer {
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 60px;
|
|
140
|
+
padding: 0 25px;
|
|
141
|
+
color: #5d5d5d;
|
|
142
|
+
font-weight: bold;
|
|
143
|
+
text-align: end;
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
line-height: 60px;
|
|
146
|
+
border-top: 1px solid #e6e6e6;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.quick-access-search-content {
|
|
152
|
+
height: 100%;
|
|
153
|
+
|
|
154
|
+
.search-list-empty {
|
|
155
|
+
height: 100%;
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
|
|
159
|
+
& > div {
|
|
160
|
+
width: 100%;
|
|
161
|
+
text-align: center;
|
|
162
|
+
|
|
163
|
+
& > img {
|
|
164
|
+
width: 300px;
|
|
165
|
+
margin: 0 auto;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.sub-title {
|
|
169
|
+
margin-top: -20px;
|
|
170
|
+
color: #868686;
|
|
171
|
+
font-weight: bold;
|
|
172
|
+
font-size: 20px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.description-info {
|
|
176
|
+
color: #868686;
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
font-size: 14px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IObject } from "@voplus/morpho-document-core";
|
|
2
|
+
import { INodeInfo, QuickAccessStore } from "../../../data/quick-access";
|
|
3
|
+
import { FilterOption } from "@voplus/morpho-data";
|
|
4
|
+
export declare class State {
|
|
5
|
+
private store?;
|
|
6
|
+
lists: IObject[];
|
|
7
|
+
loading: boolean;
|
|
8
|
+
page: number;
|
|
9
|
+
/** Indicating whether the list is loading new data. */
|
|
10
|
+
hasMore: boolean;
|
|
11
|
+
filterNameOption: FilterOption;
|
|
12
|
+
initialize: boolean;
|
|
13
|
+
historyVisible: boolean;
|
|
14
|
+
fileTypes: INodeInfo[];
|
|
15
|
+
selectedType?: INodeInfo;
|
|
16
|
+
filterOptions?: FilterOption[];
|
|
17
|
+
constructor(store?: QuickAccessStore | undefined);
|
|
18
|
+
onChangeInput(val?: string): void;
|
|
19
|
+
loadData(options: FilterOption[]): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { action, makeObservable, observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor(store) {
|
|
5
|
+
Object.defineProperty(this, "store", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: store
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "lists", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: []
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "loading", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "page", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: 1
|
|
28
|
+
});
|
|
29
|
+
/** Indicating whether the list is loading new data. */
|
|
30
|
+
Object.defineProperty(this, "hasMore", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: true
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "filterNameOption", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: {
|
|
41
|
+
c: "Name",
|
|
42
|
+
o: "contains",
|
|
43
|
+
l: "And",
|
|
44
|
+
v1: "",
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
// 未查询时显示的empty状态
|
|
48
|
+
Object.defineProperty(this, "initialize", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: true
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(this, "historyVisible", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: false
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(this, "fileTypes", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
value: void 0
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(this, "selectedType", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
configurable: true,
|
|
69
|
+
writable: true,
|
|
70
|
+
value: void 0
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(this, "filterOptions", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
configurable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
value: void 0
|
|
77
|
+
});
|
|
78
|
+
makeObservable(this);
|
|
79
|
+
}
|
|
80
|
+
onChangeInput(val) {
|
|
81
|
+
this.initialize = !(val === null || val === void 0 ? void 0 : val.trim());
|
|
82
|
+
this.filterNameOption.v1 = val || "";
|
|
83
|
+
}
|
|
84
|
+
async loadData(options) {
|
|
85
|
+
var _a, _b, _c;
|
|
86
|
+
await ((_a = this.store) === null || _a === void 0 ? void 0 : _a.loadList({
|
|
87
|
+
Includes: (_c = (_b = this.selectedType) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : "",
|
|
88
|
+
Filters: options,
|
|
89
|
+
Page: { Page: this.page, PageSize: this.filterNameOption.v1 ? 20 : 0 },
|
|
90
|
+
}).then((res) => (this.lists = res !== null && res !== void 0 ? res : [])));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
__decorate([
|
|
94
|
+
observable
|
|
95
|
+
], State.prototype, "lists", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
observable
|
|
98
|
+
], State.prototype, "loading", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
observable
|
|
101
|
+
], State.prototype, "page", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
observable
|
|
104
|
+
], State.prototype, "hasMore", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
observable
|
|
107
|
+
], State.prototype, "filterNameOption", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
observable
|
|
110
|
+
], State.prototype, "initialize", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
observable
|
|
113
|
+
], State.prototype, "historyVisible", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
observable
|
|
116
|
+
], State.prototype, "fileTypes", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
observable
|
|
119
|
+
], State.prototype, "selectedType", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
observable
|
|
122
|
+
], State.prototype, "filterOptions", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
action
|
|
125
|
+
], State.prototype, "onChangeInput", null);
|
|
126
|
+
__decorate([
|
|
127
|
+
action
|
|
128
|
+
], State.prototype, "loadData", null);
|
|
129
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/modules/quick-access/QuickAccessSearchList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAK1D,MAAM,OAAO,KAAK;IAoBjB,YAA2B,KAAwB;QAAhC;;;;mBAAQ,KAAK;WAAmB;QAnBhC;;;;mBAAmB,EAAE;WAAC;QACtB;;;;mBAAU,IAAI;WAAC;QACf;;;;mBAAO,CAAC;WAAC;QAC5B,uDAAuD;QACpC;;;;mBAAU,IAAI;WAAC;QAEf;;;;mBAAiC;gBACnD,CAAC,EAAE,MAAM;gBACT,CAAC,EAAE,UAAU;gBACb,CAAC,EAAE,KAAK;gBACR,EAAE,EAAE,EAAE;aACN;WAAC;QACF,iBAAiB;QACE;;;;mBAAa,IAAI;WAAC;QAClB;;;;mBAAiB,KAAK;WAAC;QACvB;;;;;WAAuB;QACvB;;;;;WAAyB;QACzB;;;;;WAA+B;QAGjD,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAGM,aAAa,CAAC,GAAY;QAChC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,EAAE,CAAA,CAAC;QAC/B,IAAI,CAAC,gBAAgB,CAAC,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC;IACtC,CAAC;IAGY,AAAN,KAAK,CAAC,QAAQ,CAAC,OAAuB;;QAC5C,MAAM,CAAA,MAAA,IAAI,CAAC,KAAK,0CACb,QAAQ,CAAC;YACV,QAAQ,EAAE,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,mCAAI,EAAE;YACvC,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;SACtE,EACA,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,EAAE,CAAC,CAAC,CAAA,CAAC;IAC3C,CAAC;CACD;AAvCmB;IAAlB,UAAU;oCAA8B;AACtB;IAAlB,UAAU;sCAAuB;AACf;IAAlB,UAAU;mCAAiB;AAET;IAAlB,UAAU;sCAAuB;AAEf;IAAlB,UAAU;+CAKT;AAEiB;IAAlB,UAAU;yCAA0B;AAClB;IAAlB,UAAU;6CAA+B;AACvB;IAAlB,UAAU;wCAA+B;AACvB;IAAlB,UAAU;2CAAiC;AACzB;IAAlB,UAAU;4CAAuC;AAO3C;IADN,MAAM;0CAIN;AAGY;IADZ,MAAM;qCASN"}
|
|
@@ -39,7 +39,7 @@ const RegisterListHeader = (props) => {
|
|
|
39
39
|
item.label,
|
|
40
40
|
" ",
|
|
41
41
|
(item === null || item === void 0 ? void 0 : item.total) ? ` (${item.total})` : ""))),
|
|
42
|
-
|
|
42
|
+
React.createElement(Divider, { type: "vertical" }))) }));
|
|
43
43
|
});
|
|
44
44
|
function onChangeFilter(item) {
|
|
45
45
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/registered-document/components/RegisteredDocumentListHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;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AAC,EAAE,EAAE;YAChB,aAAa,CAAC,IAAI,CAAC;gBAClB,EAAE,EAAE,CAAC,CAAC,EAAE;gBACR,KAAK,EAAE,CAAC,CAAC,IAAI;gBACb,KAAK,EAAE,CAAC,CAAC,KAAK;aACd,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,CACN,oBAAC,cAAc,IACd,QAAQ,EAAE,KAAK,EACf,aAAa,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,EACnE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,eAAe,EAAE;gBAChB,OAAO,EAAE,CAAC,oBAAC,gBAAgB,IAAC,GAAG,EAAC,kBAAkB,GAAG,CAAC;aACtD,EACD,QAAQ,EAAE,GAAG,EAAE,CAAC,CACf,6BAAK,SAAS,EAAC,qBAAqB;gBAClC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC5B,oBAAC,MAAM,IACN,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE;wBAC3B,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC,EAAE;qBAC9B,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;oBAErC,IAAI,CAAC,KAAK;;oBAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,EAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAC3C,CACT,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/registered-document/components/RegisteredDocumentListHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentPropertiesName } from "../../../../components/DocumentProperties";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export type RegisteredDocumentPropertiesName = "Date" | "Documents
|
|
3
|
+
export type RegisteredDocumentPropertiesName = "Date" | "Documents" | "Types";
|
|
4
4
|
declare const RegisteredDocumentProperties: {
|
|
5
5
|
(props: {
|
|
6
6
|
id: string;
|