@voplus/morpho-document 6.0.156 → 6.0.158
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/ViewFrame/ViewFrameHeader/ViewIcons.js +14 -2
- package/es/components/ViewFrame/ViewFrameHeader/ViewIcons.js.map +1 -1
- package/es/data/document-register/interfaces.d.ts +7 -1
- package/es/data/document-register/types.d.ts +6 -0
- package/es/data/registered-document/interfaces.d.ts +2 -0
- package/es/data/registered-document/types.d.ts +3 -4
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.d.ts +1 -1
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.js +37 -16
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.js.map +1 -1
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/index.less +10 -0
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.d.ts +17 -0
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.js +82 -0
- package/es/modules/document-register/components/AddRegisterDocumentsTypeDialog/state.js.map +1 -0
- package/es/modules/document-register/components/DocumentRegisterTypesSelect/index.d.ts +6 -0
- package/es/modules/document-register/components/DocumentRegisterTypesSelect/index.js +16 -0
- package/es/modules/document-register/components/DocumentRegisterTypesSelect/index.js.map +1 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.d.ts +7 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.js +49 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.js.map +1 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/index.less +45 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/state.d.ts +14 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/state.js +60 -0
- package/es/modules/document-register/components/QuickFilterAccessDialog/state.js.map +1 -0
- package/es/modules/document-register/pages/DocumentRegisterDefaultView/index.js +1 -1
- package/es/modules/document-register/pages/DocumentRegisterDefaultView/index.js.map +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.js +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.js.map +1 -1
- package/es/modules/document-register/pages/DocumentRegisterListPage/index.less +3 -0
- package/es/modules/document-register/pages/DocumentRegisterSettings/index.d.ts +1 -1
- package/es/modules/document-register/pages/DocumentRegisterSettings/index.js +51 -26
- package/es/modules/document-register/pages/DocumentRegisterSettings/index.js.map +1 -1
- package/es/modules/message-template/components/MessageTemplateProperties/index.js +1 -1
- package/es/modules/message-template/components/MessageTemplateProperties/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.d.ts +6 -3
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.js +22 -56
- package/es/modules/registered-document/components/RegisteredDocumentListHeader/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentNewForm/index.d.ts +0 -1
- package/es/modules/registered-document/components/RegisteredDocumentNewForm/index.js +3 -4
- package/es/modules/registered-document/components/RegisteredDocumentNewForm/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 +8 -6
- package/es/modules/registered-document/components/RegisteredDocumentProperties/index.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/TableCellDetail.js +3 -5
- package/es/modules/registered-document/components/RegisteredDocumentTableList/TableCellDetail.js.map +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/index.js +16 -14
- package/es/modules/registered-document/components/RegisteredDocumentTableList/index.js.map +1 -1
- package/es/modules/registered-document/components/TypesView/index.d.ts +10 -0
- package/es/modules/registered-document/components/TypesView/index.js +49 -0
- package/es/modules/registered-document/components/TypesView/index.js.map +1 -0
- package/es/modules/registered-document/components/TypesView/index.less +59 -0
- package/es/modules/registered-document/components/TypesView/state.d.ts +21 -0
- package/es/modules/registered-document/components/TypesView/state.js +71 -0
- package/es/modules/registered-document/components/TypesView/state.js.map +1 -0
- package/package.json +1 -1
- package/es/modules/registered-document/components/RegisteredDocumentTableList/state.d.ts +0 -22
- package/es/modules/registered-document/components/RegisteredDocumentTableList/state.js +0 -136
- package/es/modules/registered-document/components/RegisteredDocumentTableList/state.js.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Button, Popover, Tag, Select } from "antd";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { State } from "./state";
|
|
4
|
+
import { useDocumentRegister } from "../../../../data/document-register";
|
|
5
|
+
import { useRegisteredDocumentStore } from "../../../../data/registered-document";
|
|
6
|
+
import classnames from "classnames";
|
|
7
|
+
import { observe } from "@voplus/morpho-ui";
|
|
8
|
+
import { runInAction } from "mobx";
|
|
9
|
+
import "./index.less";
|
|
10
|
+
const TypesView = (props) => {
|
|
11
|
+
const { id, parentId, types, editable, className } = props;
|
|
12
|
+
const store = useRegisteredDocumentStore();
|
|
13
|
+
const [state] = useState(new State());
|
|
14
|
+
const documentRegister = useDocumentRegister(parentId);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
runInAction(() => (state.types = types || []));
|
|
17
|
+
}, [types]);
|
|
18
|
+
const content = observe(() => {
|
|
19
|
+
var _a;
|
|
20
|
+
return (React.createElement("div", { className: "add-type-dialog" },
|
|
21
|
+
React.createElement(Select, { mode: "multiple", style: { width: "100%" }, value: state.selectVal, placeholder: "Select Document Register Types", options: (_a = documentRegister.types) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
22
|
+
return {
|
|
23
|
+
label: item.name,
|
|
24
|
+
value: item.id,
|
|
25
|
+
disabled: state.types.find((i) => i.id === item.id) ? true : false,
|
|
26
|
+
};
|
|
27
|
+
}), onChange: (value) => (state.selectVal = value) }),
|
|
28
|
+
React.createElement("div", { className: "add-type-dialog-footer" },
|
|
29
|
+
React.createElement(Button, { type: "link", className: "cancel", onClick: state.onCancel }, "Cancel"),
|
|
30
|
+
React.createElement(Button, { type: "link", loading: state.loading, onClick: onOk }, "Ok"))));
|
|
31
|
+
});
|
|
32
|
+
return observe(() => (React.createElement("div", { className: classnames(className, "type-view") },
|
|
33
|
+
state.types.map((type) => (React.createElement(Tag, { key: type.id }, type.name))),
|
|
34
|
+
editable && (React.createElement(Popover, { content: content, title: "", trigger: "click", open: state.visible, onOpenChange: state.onVisibleChange },
|
|
35
|
+
React.createElement("span", { className: classnames("add-type-btn") }, "Add Types"))))));
|
|
36
|
+
async function onOk() {
|
|
37
|
+
state.loading = true;
|
|
38
|
+
await store.edit(id, { data: { Types: state.selectVal }, error: "message" });
|
|
39
|
+
runInAction(() => {
|
|
40
|
+
state.loading = false;
|
|
41
|
+
});
|
|
42
|
+
state.onCancel();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
TypesView.defaultProps = {
|
|
46
|
+
editable: true,
|
|
47
|
+
};
|
|
48
|
+
export default TypesView;
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/registered-document/components/TypesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,EAAiB,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC1C,MAAM,EAAE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,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
:global {
|
|
4
|
+
.add-type-dialog {
|
|
5
|
+
width: 336px;
|
|
6
|
+
.ant-tag {
|
|
7
|
+
margin-bottom: 10px;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
.add-type-dialog-footer {
|
|
13
|
+
text-align: right;
|
|
14
|
+
padding-top: 5px;
|
|
15
|
+
.ant-btn {
|
|
16
|
+
height: 28px;
|
|
17
|
+
padding: 0;
|
|
18
|
+
font-size: 15px;
|
|
19
|
+
}
|
|
20
|
+
.cancel {
|
|
21
|
+
margin-right: 10px;
|
|
22
|
+
color: #888;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.ant-select {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.type-view {
|
|
31
|
+
.ant-tag {
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
height: 24px;
|
|
34
|
+
line-height: 24px;
|
|
35
|
+
color: @default-border-color;
|
|
36
|
+
border-radius: @border-radius;
|
|
37
|
+
margin-right: 10px;
|
|
38
|
+
margin-bottom: 10px;
|
|
39
|
+
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
.anticon-close {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
&:hover .anticon-close {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.add-type-btn {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
color: #cbcbcb;
|
|
53
|
+
line-height: 24px;
|
|
54
|
+
text-decoration: underline;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
margin-bottom: 10px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ITypeLineOptions } from "../../../../data/document-register";
|
|
2
|
+
export type TypeViewProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
parentId: string;
|
|
5
|
+
types?: ITypeLineOptions[];
|
|
6
|
+
/** editable of new tag */
|
|
7
|
+
editable?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare class State {
|
|
11
|
+
/** porps list of types */
|
|
12
|
+
types: ITypeLineOptions[];
|
|
13
|
+
selectVal: number[];
|
|
14
|
+
/** loading */
|
|
15
|
+
loading: boolean;
|
|
16
|
+
/** visible of AddTypesDialog */
|
|
17
|
+
visible: boolean;
|
|
18
|
+
constructor();
|
|
19
|
+
onVisibleChange: (visible: boolean) => void;
|
|
20
|
+
onCancel: () => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { action, makeObservable, observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** porps list of types */
|
|
6
|
+
Object.defineProperty(this, "types", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: []
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "selectVal", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
/** loading */
|
|
19
|
+
Object.defineProperty(this, "loading", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: false
|
|
24
|
+
});
|
|
25
|
+
/** visible of AddTypesDialog */
|
|
26
|
+
Object.defineProperty(this, "visible", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: false
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(this, "onVisibleChange", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: (visible) => {
|
|
37
|
+
this.visible = !!visible;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "onCancel", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: () => {
|
|
45
|
+
this.visible = false;
|
|
46
|
+
this.selectVal = [];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
makeObservable(this);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
__decorate([
|
|
53
|
+
observable
|
|
54
|
+
], State.prototype, "types", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
observable
|
|
57
|
+
], State.prototype, "selectVal", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
observable
|
|
60
|
+
], State.prototype, "loading", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
observable
|
|
63
|
+
], State.prototype, "visible", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
action
|
|
66
|
+
// show or hide AddTypeDialog
|
|
67
|
+
], State.prototype, "onVisibleChange", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
action
|
|
70
|
+
], State.prototype, "onCancel", void 0);
|
|
71
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/registered-document/components/TypesView/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAW1D,MAAM,OAAO,KAAK;IASjB;QARA,0BAA0B;QACP;;;;mBAA4B,EAAE;WAAC;QAC/B;;;;;WAAoB;QACvC,cAAc;QACK;;;;mBAAU,KAAK;WAAC;QACnC,iCAAiC;QACd;;;;mBAAU,KAAK;WAAC;QAQ5B;;;;mBAAkB,CAAC,OAAgB,EAAE,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;YAC1B,CAAC;WAAC;QAEa;;;;mBAAW,GAAG,EAAE;gBAC9B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;gBACrB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;YACrB,CAAC;WAAC;QAZD,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CAYD;AArBmB;IAAlB,UAAU;oCAAuC;AAC/B;IAAlB,UAAU;wCAA4B;AAEpB;IAAlB,UAAU;sCAAwB;AAEhB;IAAlB,UAAU;sCAAwB;AAQ5B;IAFN,MAAM;IACP,6BAA6B;8CAG3B;AAEa;IAAd,MAAM;uCAGL"}
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
3
|
-
export declare class RegisteredDocumentListState {
|
|
4
|
-
private ParentId;
|
|
5
|
-
constructor(ParentId: string);
|
|
6
|
-
/** status All list Total */
|
|
7
|
-
registerTotals: Record<string, number>;
|
|
8
|
-
updateRegisterTotal(oldStatus: string, status: string): void;
|
|
9
|
-
/** list all Options */
|
|
10
|
-
get nAllOptions(): LoadDocumentListOptions;
|
|
11
|
-
/** list board Options */
|
|
12
|
-
get nBoardOptions(): LoadDocumentListOptions;
|
|
13
|
-
/** list amg Options */
|
|
14
|
-
get nAmgOptions(): LoadDocumentListOptions;
|
|
15
|
-
/** list members Options */
|
|
16
|
-
get nMembersOptions(): LoadDocumentListOptions;
|
|
17
|
-
/** list Others Options */
|
|
18
|
-
get nOthersOptions(): LoadDocumentListOptions;
|
|
19
|
-
getTotal(status: string): number | null;
|
|
20
|
-
}
|
|
21
|
-
export declare const RegisteredDocumentListContext: React.Context<RegisteredDocumentListState | null>;
|
|
22
|
-
export declare const useRegisteredDocumentListContext: () => RegisteredDocumentListState;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import React, { useContext } from "react";
|
|
3
|
-
import { action, computed, observable, makeObservable } from "mobx";
|
|
4
|
-
export class RegisteredDocumentListState {
|
|
5
|
-
constructor(ParentId) {
|
|
6
|
-
Object.defineProperty(this, "ParentId", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true,
|
|
10
|
-
value: ParentId
|
|
11
|
-
});
|
|
12
|
-
/** status All list Total */
|
|
13
|
-
Object.defineProperty(this, "registerTotals", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: {
|
|
18
|
-
all: 0,
|
|
19
|
-
board: 0,
|
|
20
|
-
amg: 0,
|
|
21
|
-
members: 0,
|
|
22
|
-
others: 0,
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
makeObservable(this);
|
|
26
|
-
}
|
|
27
|
-
updateRegisterTotal(oldStatus, status) {
|
|
28
|
-
this.registerTotals[oldStatus.toLowerCase()]--;
|
|
29
|
-
this.registerTotals[status.toLowerCase()]++;
|
|
30
|
-
}
|
|
31
|
-
/** list all Options */
|
|
32
|
-
get nAllOptions() {
|
|
33
|
-
return {
|
|
34
|
-
Total: true,
|
|
35
|
-
List: false,
|
|
36
|
-
Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: this.ParentId }],
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/** list board Options */
|
|
40
|
-
get nBoardOptions() {
|
|
41
|
-
return {
|
|
42
|
-
Total: true,
|
|
43
|
-
List: false,
|
|
44
|
-
Filters: [
|
|
45
|
-
{ c: "ParentNodeId", o: "=", l: "And", v1: this.ParentId },
|
|
46
|
-
{ c: "Status", o: "=", l: "And", v1: "Board Resolution" },
|
|
47
|
-
],
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/** list amg Options */
|
|
51
|
-
get nAmgOptions() {
|
|
52
|
-
return {
|
|
53
|
-
Total: true,
|
|
54
|
-
List: false,
|
|
55
|
-
Filters: [
|
|
56
|
-
{ c: "ParentNodeId", o: "=", l: "And", v1: this.ParentId },
|
|
57
|
-
{ c: "Status", o: "=", l: "And", v1: "AMG" },
|
|
58
|
-
],
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
/** list members Options */
|
|
62
|
-
get nMembersOptions() {
|
|
63
|
-
return {
|
|
64
|
-
Total: true,
|
|
65
|
-
List: false,
|
|
66
|
-
Filters: [
|
|
67
|
-
{ c: "ParentNodeId", o: "=", l: "And", v1: this.ParentId },
|
|
68
|
-
{ c: "Status", o: "=", l: "And", v1: "Members" },
|
|
69
|
-
],
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/** list Others Options */
|
|
73
|
-
get nOthersOptions() {
|
|
74
|
-
return {
|
|
75
|
-
Total: true,
|
|
76
|
-
List: false,
|
|
77
|
-
Filters: [
|
|
78
|
-
{ c: "ParentNodeId", o: "=", l: "And", v1: this.ParentId },
|
|
79
|
-
{ c: "Status", o: "=", l: "And", v1: "Others" },
|
|
80
|
-
],
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
getTotal(status) {
|
|
84
|
-
switch (status) {
|
|
85
|
-
case "all": {
|
|
86
|
-
return this.registerTotals.all;
|
|
87
|
-
}
|
|
88
|
-
case "board": {
|
|
89
|
-
return this.registerTotals.board;
|
|
90
|
-
}
|
|
91
|
-
case "amg": {
|
|
92
|
-
return this.registerTotals.amg;
|
|
93
|
-
}
|
|
94
|
-
case "members": {
|
|
95
|
-
return this.registerTotals.members;
|
|
96
|
-
}
|
|
97
|
-
case "others": {
|
|
98
|
-
return this.registerTotals.others;
|
|
99
|
-
}
|
|
100
|
-
default:
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
__decorate([
|
|
106
|
-
observable
|
|
107
|
-
], RegisteredDocumentListState.prototype, "registerTotals", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
action
|
|
110
|
-
], RegisteredDocumentListState.prototype, "updateRegisterTotal", null);
|
|
111
|
-
__decorate([
|
|
112
|
-
computed
|
|
113
|
-
], RegisteredDocumentListState.prototype, "nAllOptions", null);
|
|
114
|
-
__decorate([
|
|
115
|
-
computed
|
|
116
|
-
], RegisteredDocumentListState.prototype, "nBoardOptions", null);
|
|
117
|
-
__decorate([
|
|
118
|
-
computed
|
|
119
|
-
], RegisteredDocumentListState.prototype, "nAmgOptions", null);
|
|
120
|
-
__decorate([
|
|
121
|
-
computed
|
|
122
|
-
], RegisteredDocumentListState.prototype, "nMembersOptions", null);
|
|
123
|
-
__decorate([
|
|
124
|
-
computed
|
|
125
|
-
], RegisteredDocumentListState.prototype, "nOthersOptions", null);
|
|
126
|
-
__decorate([
|
|
127
|
-
action
|
|
128
|
-
], RegisteredDocumentListState.prototype, "getTotal", null);
|
|
129
|
-
export const RegisteredDocumentListContext = React.createContext(null);
|
|
130
|
-
export const useRegisteredDocumentListContext = () => {
|
|
131
|
-
const context = useContext(RegisteredDocumentListContext);
|
|
132
|
-
if (context == null)
|
|
133
|
-
throw new Error("Menu Context not found. Please use <RegisteredDocumentListContext.Provider value={}/>");
|
|
134
|
-
return context;
|
|
135
|
-
};
|
|
136
|
-
//# sourceMappingURL=state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/registered-document/components/RegisteredDocumentTableList/state.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAGpE,MAAM,OAAO,2BAA2B;IACvC,YAA2B,QAAgB;QAAxB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