@voplus/morpho-document 6.1.80 → 6.1.81
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/pages/Signature/Envelope/components/RemindersDialog/index.js +18 -22
- package/es/pages/Signature/Envelope/components/RemindersDialog/index.js.map +1 -1
- package/es/pages/Signature/Envelope/components/RemindersDialog/state.d.ts +6 -2
- package/es/pages/Signature/Envelope/components/RemindersDialog/state.js +35 -1
- package/es/pages/Signature/Envelope/components/RemindersDialog/state.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { Form, Modal, Button, message } from "antd";
|
|
2
|
+
import { Form, Modal, Button, Skeleton, message } from "antd";
|
|
3
3
|
import { observe } from "@voplus/morpho-ui";
|
|
4
4
|
import { runInAction } from "mobx";
|
|
5
5
|
import { State } from "./state";
|
|
6
|
-
import {
|
|
6
|
+
import { useEnvelopeStore } from "../../../../../data/envelope";
|
|
7
7
|
import MentionList from "@voplus/morpho-org/es/controls/MentionList";
|
|
8
8
|
import ProseMirror from "@voplus/morpho-text/es/controls/ProseMirror";
|
|
9
9
|
import styles from "./index.less";
|
|
10
10
|
const RemindersDialog = (props) => {
|
|
11
|
-
const [state] = useState(new State());
|
|
12
|
-
const envelope = useEnvelope(props.id, { includes: "unsigned-signers,signers", reload: true });
|
|
13
|
-
state.update(envelope);
|
|
14
11
|
const store = useEnvelopeStore();
|
|
12
|
+
const [state] = useState(new State(props.id, store));
|
|
15
13
|
return observe(() => (React.createElement(Modal, { width: 600, open: true, title: "Reminders Dialog", okText: "Send", className: "reminders-dialog", confirmLoading: state.loading, onCancel: onCancel, onOk: onSubmit },
|
|
16
|
-
React.createElement(
|
|
17
|
-
React.createElement(Form
|
|
18
|
-
React.createElement(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
React.createElement(
|
|
23
|
-
React.createElement("div", { className: "available-role-members
|
|
24
|
-
React.createElement(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
React.createElement(
|
|
28
|
-
|
|
14
|
+
React.createElement(Skeleton, { loading: !state.initialize },
|
|
15
|
+
React.createElement(Form, { className: styles["delegate-dialog-content"], layout: "vertical" },
|
|
16
|
+
React.createElement(Form.Item, { label: "Send Reminder To" },
|
|
17
|
+
React.createElement(MentionList, { contacts: state.selectContacts, onChange: (unit) => runInAction(() => {
|
|
18
|
+
state.selectContacts = unit;
|
|
19
|
+
}) })),
|
|
20
|
+
React.createElement(Form.Item, { label: "Available Signers" },
|
|
21
|
+
React.createElement("div", { className: "available-role-members" },
|
|
22
|
+
React.createElement("div", { className: "available-role-members-content" }, state.filterContacts.length ? (state.filterContacts.map((c) => (React.createElement("div", { className: "role-member-item", key: c.id },
|
|
23
|
+
React.createElement(MentionList, { canEdit: false, contacts: [c] }),
|
|
24
|
+
React.createElement(Button, { className: "role-member-item-btn", type: "link", onClick: () => state.selectContacts.push(c) }, "Select"))))) : (React.createElement("span", { className: "add-info-style" }, "no members"))))),
|
|
25
|
+
React.createElement(Form.Item, { label: "Message" },
|
|
26
|
+
React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true, className: "proseMirror", onChange: (opt) => runInAction(() => (state.params.Message =
|
|
27
|
+
opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML)) })))))));
|
|
29
28
|
function onCancel() {
|
|
30
|
-
state.
|
|
31
|
-
Contacts: [],
|
|
32
|
-
Message: "",
|
|
33
|
-
};
|
|
29
|
+
state.params = state.Params;
|
|
34
30
|
state.loading = false;
|
|
35
31
|
props.onCancel && props.onCancel();
|
|
36
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/pages/Signature/Envelope/components/RemindersDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/pages/Signature/Envelope/components/RemindersDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,WAAW,MAAM,4CAA4C,CAAC;AACrE,OAAO,WAAW,MAAM,6CAA6C,CAAC;AACtE,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,eAAe,GAAG,CAAC,KAA4C,EAAE,EAAE;IACxE,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAErD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,IACL,KAAK,EAAE,GAAG,EACV,IAAI,QACJ,KAAK,EAAC,kBAAkB,EACxB,MAAM,EAAC,MAAM,EACb,SAAS,EAAC,kBAAkB,EAC5B,cAAc,EAAE,KAAK,CAAC,OAAO,EAC7B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ;QAEd,oBAAC,QAAQ,IAAC,OAAO,EAAE,CAAC,KAAK,CAAC,UAAU;YACnC,oBAAC,IAAI,IAAC,SAAS,EAAE,MA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2
2
|
export declare class State {
|
|
3
|
-
|
|
3
|
+
private id;
|
|
4
|
+
private _store;
|
|
5
|
+
constructor(id: string, _store: EnvelopeStore);
|
|
4
6
|
Params: {
|
|
5
7
|
Contacts: string[];
|
|
6
8
|
Message: string;
|
|
@@ -9,7 +11,9 @@ export declare class State {
|
|
|
9
11
|
Contacts: string[];
|
|
10
12
|
Message: string;
|
|
11
13
|
};
|
|
14
|
+
envelop: IEnvelope;
|
|
12
15
|
loading: boolean;
|
|
16
|
+
initialize: boolean;
|
|
13
17
|
contacts: {
|
|
14
18
|
name: string;
|
|
15
19
|
id: string;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { makeObservable, observable, action, computed } from "mobx";
|
|
3
3
|
export class State {
|
|
4
|
-
constructor() {
|
|
4
|
+
constructor(id, _store) {
|
|
5
|
+
Object.defineProperty(this, "id", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: id
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "_store", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: _store
|
|
16
|
+
});
|
|
5
17
|
Object.defineProperty(this, "Params", {
|
|
6
18
|
enumerable: true,
|
|
7
19
|
configurable: true,
|
|
@@ -17,12 +29,24 @@ export class State {
|
|
|
17
29
|
writable: true,
|
|
18
30
|
value: this.Params
|
|
19
31
|
});
|
|
32
|
+
Object.defineProperty(this, "envelop", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: void 0
|
|
37
|
+
});
|
|
20
38
|
Object.defineProperty(this, "loading", {
|
|
21
39
|
enumerable: true,
|
|
22
40
|
configurable: true,
|
|
23
41
|
writable: true,
|
|
24
42
|
value: false
|
|
25
43
|
});
|
|
44
|
+
Object.defineProperty(this, "initialize", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: false
|
|
49
|
+
});
|
|
26
50
|
Object.defineProperty(this, "contacts", {
|
|
27
51
|
enumerable: true,
|
|
28
52
|
configurable: true,
|
|
@@ -36,11 +60,15 @@ export class State {
|
|
|
36
60
|
value: []
|
|
37
61
|
});
|
|
38
62
|
makeObservable(this);
|
|
63
|
+
this._store
|
|
64
|
+
.load(this.id, { includes: "unsigned-signers,signers", reload: true })
|
|
65
|
+
.then((res) => this.update(res));
|
|
39
66
|
}
|
|
40
67
|
update(data) {
|
|
41
68
|
var _a, _b;
|
|
42
69
|
this.selectContacts = (_a = data.unsignedSigners) !== null && _a !== void 0 ? _a : [];
|
|
43
70
|
this.contacts = (_b = data.signers) !== null && _b !== void 0 ? _b : [];
|
|
71
|
+
this.initialize = true;
|
|
44
72
|
}
|
|
45
73
|
get filterContacts() {
|
|
46
74
|
var _a;
|
|
@@ -50,9 +78,15 @@ export class State {
|
|
|
50
78
|
__decorate([
|
|
51
79
|
observable
|
|
52
80
|
], State.prototype, "params", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
observable
|
|
83
|
+
], State.prototype, "envelop", void 0);
|
|
53
84
|
__decorate([
|
|
54
85
|
observable
|
|
55
86
|
], State.prototype, "loading", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
observable
|
|
89
|
+
], State.prototype, "initialize", void 0);
|
|
56
90
|
__decorate([
|
|
57
91
|
observable
|
|
58
92
|
], State.prototype, "contacts", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/pages/Signature/Envelope/components/RemindersDialog/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGpE,MAAM,OAAO,KAAK;IACjB;
|
|
1
|
+
{"version":3,"file":"state.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