@voplus/morpho-csp 4.0.14 → 4.0.16
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/data/clda-form/interfaces.d.ts +14 -10
- package/es/data/clda-form/types.d.ts +13 -10
- package/es/modules/self-registration/clda-form/incorporation/{AddOfficerDialog → company-general/components/AddOfficerDialog}/index.js +29 -17
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.d.ts +8 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js +128 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.less +12 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.d.ts +7 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js +126 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.less +12 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/state.d.ts +21 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/state.js +56 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/state.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.d.ts +12 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.js +125 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.less +131 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.d.ts +12 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js +96 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.less +143 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.d.ts +7 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js +60 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js +69 -10
- package/es/modules/self-registration/clda-form/incorporation/company-general/index.js.map +1 -1
- package/package.json +2 -2
- package/es/modules/self-registration/clda-form/incorporation/AddOfficerDialog/index.js.map +0 -1
- package/es/modules/self-registration/clda-form/incorporation/change-officer/index.d.ts +0 -5
- package/es/modules/self-registration/clda-form/incorporation/change-officer/index.js +0 -261
- package/es/modules/self-registration/clda-form/incorporation/change-officer/index.js.map +0 -1
- package/es/modules/self-registration/clda-form/incorporation/change-officer/index.less +0 -177
- package/es/modules/self-registration/clda-form/incorporation/share-transfer/index.d.ts +0 -4
- package/es/modules/self-registration/clda-form/incorporation/share-transfer/index.js +0 -100
- package/es/modules/self-registration/clda-form/incorporation/share-transfer/index.js.map +0 -1
- package/es/modules/self-registration/clda-form/incorporation/share-transfer/index.less +0 -177
- /package/es/modules/self-registration/clda-form/incorporation/{AddOfficerDialog → company-general/components/AddOfficerDialog}/index.d.ts +0 -0
- /package/es/modules/self-registration/clda-form/incorporation/{AddOfficerDialog → company-general/components/AddOfficerDialog}/index.less +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Button, Col, Divider, Form, Row, Input, Select } from "antd";
|
|
3
|
+
import { UserOutlined } from "@ant-design/icons";
|
|
4
|
+
import { observe } from "@voplus/morpho-ui";
|
|
5
|
+
import { faAddressCard, faEnvelope, faMapMarkerAlt, faPhone, faTrashAlt, faPenToSquare, } from "@fortawesome/pro-light-svg-icons";
|
|
6
|
+
import { clone } from "lodash-es";
|
|
7
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import { useCLDAForm, useCLDAFormStore, } from "../../../../../../../data/clda-form";
|
|
9
|
+
import IdentityChange from "../../../../../../corporate/company/identity/components/IdentityChange";
|
|
10
|
+
import { changeName } from "../../../../../../../data/clda-form/conversion";
|
|
11
|
+
import { useIncorporationFormContext } from "../../../context";
|
|
12
|
+
import Address from "@voplus/morpho-org/es/components/Address";
|
|
13
|
+
import moment from "moment";
|
|
14
|
+
import styles from "./index.less";
|
|
15
|
+
const CompanyGeneralOfficerInfo = (props) => {
|
|
16
|
+
const { formId, officer, contacts } = props;
|
|
17
|
+
const [editable, setEditable] = useState(false);
|
|
18
|
+
const store = useCLDAFormStore();
|
|
19
|
+
const context = useIncorporationFormContext();
|
|
20
|
+
const incorporation = useCLDAForm(props.formId);
|
|
21
|
+
return observe(() => {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
23
|
+
return (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement("div", { className: styles["company-general-officer-info"] },
|
|
25
|
+
React.createElement("div", { className: "company-general-officer-title" },
|
|
26
|
+
React.createElement("div", { className: "company-general-officer-title-info" }, editable ? (React.createElement(Input, { prefix: React.createElement(UserOutlined, null), defaultValue: contacts === null || contacts === void 0 ? void 0 : contacts.name, value: contacts === null || contacts === void 0 ? void 0 : contacts.name, onChange: (e) => (contacts.name = e.target.value) })) : (React.createElement("span", { className: "company-general-officer-name" }, contacts === null || contacts === void 0 ? void 0 : contacts.name))),
|
|
27
|
+
(context ? context.editable : true) && (React.createElement("div", { className: "action-button" },
|
|
28
|
+
contacts.idType === "NewId" && (React.createElement("span", { className: "edit-icon", onClick: () => setEditable(!editable) },
|
|
29
|
+
React.createElement(FontAwesomeIcon, { icon: faPenToSquare }))),
|
|
30
|
+
React.createElement("span", { className: "delete-icon", onClick: props.onDeleteClick },
|
|
31
|
+
React.createElement(FontAwesomeIcon, { icon: faTrashAlt }))))),
|
|
32
|
+
React.createElement(Form, { layout: "horizontal", className: "new-officer-position" },
|
|
33
|
+
React.createElement(Form.Item, { label: "Position" },
|
|
34
|
+
React.createElement(Select, { mode: "tags", style: { width: "100%" }, placeholder: "Tags Mode", defaultValue: officer.positions, onChange: (value) => onChangePosition(value), options: [
|
|
35
|
+
{
|
|
36
|
+
value: "Director",
|
|
37
|
+
label: "Director",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: "Secretary",
|
|
41
|
+
label: "Secretary",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
value: "Auditor",
|
|
45
|
+
label: "Auditor",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
value: "Chief Executive Officer",
|
|
49
|
+
label: "Chief Executive Officer",
|
|
50
|
+
},
|
|
51
|
+
] }))),
|
|
52
|
+
contacts.idType === "NewId" && (React.createElement(React.Fragment, null,
|
|
53
|
+
React.createElement("div", { className: "basic-info" },
|
|
54
|
+
React.createElement(Input, { disabled: !editable, bordered: editable, value: contacts === null || contacts === void 0 ? void 0 : contacts.email, placeholder: "Please enter the email", prefix: React.createElement(FontAwesomeIcon, { icon: faEnvelope }), onChange: (e) => (contacts.email = e.target.value) }),
|
|
55
|
+
React.createElement(Input, { disabled: !editable, bordered: editable, value: contacts === null || contacts === void 0 ? void 0 : contacts.phone, placeholder: "Please enter the phone", prefix: React.createElement(FontAwesomeIcon, { icon: faPhone }), onChange: (e) => (contacts.phone = e.target.value) })),
|
|
56
|
+
React.createElement("div", { className: "company-general-officer-info-content" },
|
|
57
|
+
React.createElement("div", { className: "company-general-officer-info-item" },
|
|
58
|
+
React.createElement("div", { className: "company-general-officer-item-name" },
|
|
59
|
+
React.createElement(FontAwesomeIcon, { icon: faMapMarkerAlt }),
|
|
60
|
+
"Address:"),
|
|
61
|
+
editable ? (React.createElement(Form, { layout: "horizontal" },
|
|
62
|
+
React.createElement(Address, { value: contacts.address, required: ["line1", "city", "postalCode", "country"], onChange: (v) => (contacts.address = v) }))) : (React.createElement(React.Fragment, null,
|
|
63
|
+
React.createElement(Row, null,
|
|
64
|
+
React.createElement(Col, null, (_a = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _a === void 0 ? void 0 : _a.line1)),
|
|
65
|
+
React.createElement(Row, null,
|
|
66
|
+
React.createElement(Col, null, (_b = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _b === void 0 ? void 0 : _b.line2)),
|
|
67
|
+
React.createElement(Row, null,
|
|
68
|
+
React.createElement(Col, null, `${((_c = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _c === void 0 ? void 0 : _c.city) ? (_d = contacts.address) === null || _d === void 0 ? void 0 : _d.city : ""} ${(_e = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _e === void 0 ? void 0 : _e.state} ${(_f = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _f === void 0 ? void 0 : _f.country} ${(_g = contacts === null || contacts === void 0 ? void 0 : contacts.address) === null || _g === void 0 ? void 0 : _g.postalCode}`.trim()))))),
|
|
69
|
+
React.createElement("div", { className: "company-general-officer-info-item" },
|
|
70
|
+
React.createElement("div", { className: "company-general-officer-item-name" },
|
|
71
|
+
React.createElement(FontAwesomeIcon, { icon: faAddressCard }),
|
|
72
|
+
"Identify Info:"),
|
|
73
|
+
editable ? (React.createElement(IdentityChange, { value: contacts === null || contacts === void 0 ? void 0 : contacts.identity, onChange: (v) => (contacts.identity = v) })) : (React.createElement(React.Fragment, null,
|
|
74
|
+
React.createElement(Row, null,
|
|
75
|
+
React.createElement(Col, null, (_h = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _h === void 0 ? void 0 : _h.country)),
|
|
76
|
+
React.createElement(Row, null,
|
|
77
|
+
React.createElement(Col, null, (_j = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _j === void 0 ? void 0 : _j.type)),
|
|
78
|
+
React.createElement(Row, null,
|
|
79
|
+
React.createElement(Col, null, (_k = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _k === void 0 ? void 0 : _k.number)),
|
|
80
|
+
React.createElement(Row, null,
|
|
81
|
+
React.createElement(Col, null,
|
|
82
|
+
"Expiry:",
|
|
83
|
+
((_l = contacts === null || contacts === void 0 ? void 0 : contacts.identity) === null || _l === void 0 ? void 0 : _l.expiryDate) &&
|
|
84
|
+
moment(contacts.identity.expiryDate).format("YYYY-MM-DD"))))),
|
|
85
|
+
editable && (React.createElement(Row, { justify: "end" },
|
|
86
|
+
React.createElement(Button, { onClick: () => setEditable(false) }, "Cancel"),
|
|
87
|
+
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))))))),
|
|
88
|
+
props.officerLength > 1 && React.createElement(Divider, { className: "halvingline" }))));
|
|
89
|
+
});
|
|
90
|
+
async function onChangePosition(position) {
|
|
91
|
+
var _a, _b, _c, _d, _e, _f;
|
|
92
|
+
officer.positions = position;
|
|
93
|
+
if (props.editOption === "NewOfficerAppointments") {
|
|
94
|
+
const officers = (_c = clone((_b = (_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.newOfficerAppointments) === null || _b === void 0 ? void 0 : _b.officers)) !== null && _c !== void 0 ? _c : [];
|
|
95
|
+
const number = officers.findIndex((i) => i.officerId === props.officer.officerId);
|
|
96
|
+
officers[number] = officer;
|
|
97
|
+
await store.edit(formId, {
|
|
98
|
+
data: { NewOfficerAppointments: { Officers: changeName(officers) } },
|
|
99
|
+
error: "message",
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (props.editOption === "RemoveOfficerDetails") {
|
|
103
|
+
const removeOfficers = (_f = clone((_e = (_d = incorporation.content) === null || _d === void 0 ? void 0 : _d.removeOfficerDetails) === null || _e === void 0 ? void 0 : _e.officers)) !== null && _f !== void 0 ? _f : [];
|
|
104
|
+
const number = removeOfficers.findIndex((i) => i.officerId === props.officer.officerId);
|
|
105
|
+
removeOfficers[number] = officer;
|
|
106
|
+
await store.edit(formId, {
|
|
107
|
+
data: { RemoveOfficerDetails: { Officers: changeName(removeOfficers) } },
|
|
108
|
+
error: "message",
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function onSave() {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
const officerContacts = (_b = clone((_a = incorporation.content) === null || _a === void 0 ? void 0 : _a.contacts)) !== null && _b !== void 0 ? _b : [];
|
|
115
|
+
const number = officerContacts.findIndex((i) => i.id === props.officer.officerId);
|
|
116
|
+
officerContacts[number] = contacts;
|
|
117
|
+
await store.edit(formId, {
|
|
118
|
+
data: { Contacts: changeName(officerContacts) },
|
|
119
|
+
error: "message",
|
|
120
|
+
});
|
|
121
|
+
setEditable(false);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
export default CompanyGeneralOfficerInfo;
|
|
125
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/CompanyGeneralOfficerInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACN,aAAa,EACb,UAAU,EACV,cAAc,EACd,OAAO,EACP,UAAU,EACV,aAAa,GACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,K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,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAClF,eAAe,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;QAEnC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YACxB,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE;YAC/C,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;QAEH,WAAW,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.company-general-officer-info {
|
|
4
|
+
:global {
|
|
5
|
+
.company-general-officer-title {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
.company-general-officer-title-info {
|
|
10
|
+
flex: 1;
|
|
11
|
+
|
|
12
|
+
.ant-input-affix-wrapper {
|
|
13
|
+
border-radius: @border-radius;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.company-general-officer-name {
|
|
18
|
+
color: rgba(0, 0, 0, 0.85);
|
|
19
|
+
font-weight: bold;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.action-button {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
|
|
26
|
+
> span {
|
|
27
|
+
margin-left: 6px;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.delete-icon {
|
|
32
|
+
&:hover {
|
|
33
|
+
color: @delete-color;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.edit-icon {
|
|
38
|
+
&:hover {
|
|
39
|
+
color: @primary-color;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.new-officer-position {
|
|
46
|
+
padding-top: 25px;
|
|
47
|
+
padding-right: 3em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.placeholder {
|
|
51
|
+
color: #00000040;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.halvingline {
|
|
55
|
+
margin-bottom: 40px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.basic-info {
|
|
59
|
+
display: flex;
|
|
60
|
+
line-height: 0;
|
|
61
|
+
margin-top: 10px;
|
|
62
|
+
|
|
63
|
+
.ant-input-affix-wrapper {
|
|
64
|
+
flex: 1;
|
|
65
|
+
border-radius: 8px;
|
|
66
|
+
margin-right: 3em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ant-input-affix-wrapper-disabled {
|
|
70
|
+
color: rgba(0, 0, 0, 0.85);
|
|
71
|
+
cursor: auto;
|
|
72
|
+
padding: 4px 0;
|
|
73
|
+
|
|
74
|
+
.ant-input[disabled] {
|
|
75
|
+
color: rgba(0, 0, 0, 0.85);
|
|
76
|
+
cursor: auto;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.basic-val {
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
font-weight: 400;
|
|
83
|
+
color: rgba(0, 0, 0, 0.45);
|
|
84
|
+
margin-right: 15px;
|
|
85
|
+
|
|
86
|
+
.svg-inline--fa {
|
|
87
|
+
margin-right: 5px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.company-general-officer-info-content {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
|
|
96
|
+
> div:nth-child(2) {
|
|
97
|
+
margin-bottom: 10px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.company-general-officer-info-item {
|
|
101
|
+
flex: 1;
|
|
102
|
+
position: relative;
|
|
103
|
+
padding-right: 3em;
|
|
104
|
+
|
|
105
|
+
.buttons {
|
|
106
|
+
position: absolute;
|
|
107
|
+
right: 30px;
|
|
108
|
+
top: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.company-general-officer-item-name {
|
|
112
|
+
padding-bottom: 16px;
|
|
113
|
+
font-size: 16px;
|
|
114
|
+
font-weight: bold;
|
|
115
|
+
|
|
116
|
+
svg {
|
|
117
|
+
margin-right: 5px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.morpho-inline-edit {
|
|
122
|
+
width: 80%;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ant-alert-warning {
|
|
128
|
+
margin-top: 10px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IFormPeopleOptions, ITransfer } from "../../../../../../../data/clda-form";
|
|
3
|
+
declare const TransferItem: (props: {
|
|
4
|
+
transfer: ITransfer;
|
|
5
|
+
contact: IFormPeopleOptions;
|
|
6
|
+
contacts: IFormPeopleOptions[];
|
|
7
|
+
transferLength?: number | undefined;
|
|
8
|
+
onReload?: (() => void) | undefined;
|
|
9
|
+
onSave?: ((transfer: ITransfer, contact?: IFormPeopleOptions) => void) | undefined;
|
|
10
|
+
onDeleteClick?: (() => void) | undefined;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
export default TransferItem;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Button, Col, Divider, Form, Row, Input, Select, InputNumber } from "antd";
|
|
3
|
+
import { UserOutlined } from "@ant-design/icons";
|
|
4
|
+
import { observe } from "@voplus/morpho-ui";
|
|
5
|
+
import { faAddressCard, faEnvelope, faMapMarkerAlt, faPhone, faTrashAlt, faPenToSquare, } from "@fortawesome/pro-light-svg-icons";
|
|
6
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { ColumnItem, ColumnItemCol } from "@voplus/morpho-ui/es/controls/ColumnItem";
|
|
8
|
+
import { useIncorporationFormContext } from "../../../context";
|
|
9
|
+
import IdentityChange from "../../../../../../corporate/company/identity/components/IdentityChange";
|
|
10
|
+
import Address from "@voplus/morpho-org/es/components/Address";
|
|
11
|
+
import moment from "moment";
|
|
12
|
+
import styles from "./index.less";
|
|
13
|
+
const TransferItem = (props) => {
|
|
14
|
+
const { transfer, contact, contacts } = props;
|
|
15
|
+
const [editable, setEditable] = useState(false);
|
|
16
|
+
const context = useIncorporationFormContext();
|
|
17
|
+
const transferor = contacts === null || contacts === void 0 ? void 0 : contacts.filter((c) => c.id === transfer.transforId)[0];
|
|
18
|
+
const existingContacts = contacts === null || contacts === void 0 ? void 0 : contacts.filter((c) => c.idType === "ExistingContactId");
|
|
19
|
+
return observe(() => {
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
21
|
+
return (React.createElement(React.Fragment, null,
|
|
22
|
+
React.createElement("div", { className: styles["company-general-transfer-info"] },
|
|
23
|
+
React.createElement("div", { className: "company-general-transfer-header" },
|
|
24
|
+
React.createElement("div", { className: "company-general-transfer-title" }, "Transferor"),
|
|
25
|
+
(context ? context.editable : true) && (React.createElement("div", { className: "action-button" },
|
|
26
|
+
React.createElement("span", { className: "edit-icon", onClick: () => setEditable(!editable) },
|
|
27
|
+
React.createElement(FontAwesomeIcon, { icon: faPenToSquare })),
|
|
28
|
+
React.createElement("span", { className: "delete-icon", onClick: props.onDeleteClick },
|
|
29
|
+
React.createElement(FontAwesomeIcon, { icon: faTrashAlt }))))),
|
|
30
|
+
React.createElement("div", { className: "company-general-transferor-content" },
|
|
31
|
+
React.createElement(ColumnItem, null,
|
|
32
|
+
React.createElement(ColumnItemCol, { span: 8, title: "Transferor" }, editable ? (React.createElement(Select, { showSearch: true, style: { width: "100%" }, defaultValue: transferor.name, placeholder: "Select a contact", optionFilterProp: "children", onChange: (transforId) => (transfer.transforId = transforId), popupClassName: "add-transfer-select-contact", filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, existingContacts === null || existingContacts === void 0 ? void 0 : existingContacts.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : (React.createElement("span", null, transferor.name))),
|
|
33
|
+
React.createElement(ColumnItemCol, { span: 8, title: "Class" }, editable ? (React.createElement(Select, { placeholder: "Select Share Class", style: { width: "100%" }, value: transfer.shareClass, optionFilterProp: "children", onChange: (value) => (transfer.shareClass = value), filterOption: (input, option) => { var _a; return ((_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : "").toLowerCase().includes(input.toLowerCase()); }, options: [
|
|
34
|
+
{
|
|
35
|
+
value: "Ordinary",
|
|
36
|
+
label: "Ordinary",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "Preference",
|
|
40
|
+
label: "Preference",
|
|
41
|
+
},
|
|
42
|
+
] })) : (React.createElement("span", null, transfer.shareClass))),
|
|
43
|
+
React.createElement(ColumnItemCol, { span: 4, title: "Shares" }, editable ? (React.createElement(InputNumber, { placeholder: "please input Share", value: transfer.shares, style: { width: "100%" }, onChange: (value) => (transfer.shares = value) })) : (React.createElement("span", null, transfer.shares))),
|
|
44
|
+
React.createElement(ColumnItemCol, { span: 4, title: "Considersion" }, editable ? (React.createElement(InputNumber, { placeholder: "please input Considersion", style: { width: "100%" }, value: transfer.consideration, onChange: (value) => (transfer.consideration = value) })) : (React.createElement("span", null, transfer.consideration))))),
|
|
45
|
+
React.createElement("div", { className: "company-general-transfer-title" }, "Transferee"),
|
|
46
|
+
contact.idType === "NewId" ? (React.createElement(React.Fragment, null,
|
|
47
|
+
React.createElement("div", { className: "company-general-transferee" }, editable ? (React.createElement(Input, { prefix: React.createElement(UserOutlined, null), defaultValue: contact === null || contact === void 0 ? void 0 : contact.name, value: contact === null || contact === void 0 ? void 0 : contact.name, onChange: (e) => (contact.name = e.target.value) })) : (React.createElement("span", { className: "company-general-transferee-name" }, contact === null || contact === void 0 ? void 0 : contact.name))),
|
|
48
|
+
React.createElement("div", { className: "basic-info" },
|
|
49
|
+
React.createElement(Input, { disabled: !editable, bordered: editable, value: contact === null || contact === void 0 ? void 0 : contact.email, placeholder: "Please enter the email", prefix: React.createElement(FontAwesomeIcon, { icon: faEnvelope }), onChange: (e) => (contact.email = e.target.value) }),
|
|
50
|
+
React.createElement(Input, { disabled: !editable, bordered: editable, value: contact === null || contact === void 0 ? void 0 : contact.phone, placeholder: "Please enter the phone", prefix: React.createElement(FontAwesomeIcon, { icon: faPhone }), onChange: (e) => (contact.phone = e.target.value) })),
|
|
51
|
+
React.createElement("div", { className: "company-general-transfer-info-content" },
|
|
52
|
+
React.createElement("div", { className: "company-general-transfer-info-item" },
|
|
53
|
+
React.createElement("div", { className: "company-general-transfer-item-name" },
|
|
54
|
+
React.createElement(FontAwesomeIcon, { icon: faMapMarkerAlt }),
|
|
55
|
+
"Address:"),
|
|
56
|
+
editable ? (React.createElement(Form, { layout: "horizontal" },
|
|
57
|
+
React.createElement(Address, { value: contact.address, required: ["line1", "city", "postalCode", "country"], onChange: (v) => (contact.address = v) }))) : (React.createElement(React.Fragment, null,
|
|
58
|
+
React.createElement(Row, null,
|
|
59
|
+
React.createElement(Col, null, (_a = contact === null || contact === void 0 ? void 0 : contact.address) === null || _a === void 0 ? void 0 : _a.line1)),
|
|
60
|
+
React.createElement(Row, null,
|
|
61
|
+
React.createElement(Col, null, (_b = contact === null || contact === void 0 ? void 0 : contact.address) === null || _b === void 0 ? void 0 : _b.line2)),
|
|
62
|
+
React.createElement(Row, null,
|
|
63
|
+
React.createElement(Col, null, `${((_c = contact === null || contact === void 0 ? void 0 : contact.address) === null || _c === void 0 ? void 0 : _c.city) ? (_d = contact.address) === null || _d === void 0 ? void 0 : _d.city : ""} ${(_e = contact === null || contact === void 0 ? void 0 : contact.address) === null || _e === void 0 ? void 0 : _e.state} ${(_f = contact === null || contact === void 0 ? void 0 : contact.address) === null || _f === void 0 ? void 0 : _f.country} ${(_g = contact === null || contact === void 0 ? void 0 : contact.address) === null || _g === void 0 ? void 0 : _g.postalCode}`.trim()))))),
|
|
64
|
+
React.createElement("div", { className: "company-general-transfer-info-item" },
|
|
65
|
+
React.createElement("div", { className: "company-general-transfer-item-name" },
|
|
66
|
+
React.createElement(FontAwesomeIcon, { icon: faAddressCard }),
|
|
67
|
+
"Identify Info:"),
|
|
68
|
+
editable ? (React.createElement(IdentityChange, { value: contact === null || contact === void 0 ? void 0 : contact.identity, onChange: (v) => (contact.identity = v) })) : (React.createElement(React.Fragment, null,
|
|
69
|
+
React.createElement(Row, null,
|
|
70
|
+
React.createElement(Col, null, (_h = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _h === void 0 ? void 0 : _h.country)),
|
|
71
|
+
React.createElement(Row, null,
|
|
72
|
+
React.createElement(Col, null, (_j = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _j === void 0 ? void 0 : _j.type)),
|
|
73
|
+
React.createElement(Row, null,
|
|
74
|
+
React.createElement(Col, null, (_k = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _k === void 0 ? void 0 : _k.number)),
|
|
75
|
+
React.createElement(Row, null,
|
|
76
|
+
React.createElement(Col, null,
|
|
77
|
+
"Expiry:",
|
|
78
|
+
((_l = contact === null || contact === void 0 ? void 0 : contact.identity) === null || _l === void 0 ? void 0 : _l.expiryDate) &&
|
|
79
|
+
moment(contact.identity.expiryDate).format("YYYY-MM-DD"))))))))) : (React.createElement("div", { className: "company-general-transferee" }, editable ? (React.createElement(Select, { showSearch: true, style: { width: "100%", marginBottom: "20px" }, defaultValue: contact === null || contact === void 0 ? void 0 : contact.name, placeholder: "Select a contact", optionFilterProp: "children", onChange: (transferee) => (transfer.transfeeId = transferee), filterOption: (input, option) => (option === null || option === void 0 ? void 0 : option.children.toLowerCase().indexOf(input.toLowerCase())) >= 0 }, contacts === null || contacts === void 0 ? void 0 : contacts.map((item) => (React.createElement(Select.Option, { key: item.id, value: item.id }, item.name))))) : (React.createElement("span", { className: "company-general-transferee-name" }, contact === null || contact === void 0 ? void 0 : contact.name)))),
|
|
80
|
+
editable && (React.createElement(Row, { justify: "end" },
|
|
81
|
+
React.createElement(Button, { onClick: () => {
|
|
82
|
+
var _a;
|
|
83
|
+
setEditable(false);
|
|
84
|
+
(_a = props.onReload) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
85
|
+
} }, "Cancel"),
|
|
86
|
+
React.createElement(Button, { type: "primary", style: { marginLeft: "1rem" }, onClick: onSave }, "Save"))),
|
|
87
|
+
props.transferLength > 1 && React.createElement(Divider, { className: "halvingline" }))));
|
|
88
|
+
});
|
|
89
|
+
async function onSave() {
|
|
90
|
+
var _a;
|
|
91
|
+
setEditable(false);
|
|
92
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, transfer, contact);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
export default TransferItem;
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACN,aAAa,EACb,UAAU,EACV,cAAc,EACd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,CAAQ,CACxE,CACI,CACN;gBACA,QAAQ,IAAI,CACZ,oBAAC,GAAG,IAAC,OAAO,EAAC,KAAK;oBACjB,oBAAC,MAAM,IACN,OAAO,EAAE,GAAG,EAAE;;4BACb,WAAW,CAAC,KAAK,CAAC,CAAC;4BACnB,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;wBACpB,CAAC,aAGO;oBACT,oBAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,WAE5D,CACJ,CACN;gBACA,KAAK,CAAC,cAAe,GAAG,CAAC,IAAI,oBAAC,OAAO,IAAC,SAAS,EAAC,aAAa,GAAG,CAC5D,CACU,CACjB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,UAAU,MAAM;;QACpB,WAAW,CAAC,KAAK,CAAC,CAAC;QAEnB,MAAA,KAAK,CAAC,MAAM,sDAAG,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
|
2
|
+
|
|
3
|
+
.company-general-transfer-info {
|
|
4
|
+
:global {
|
|
5
|
+
.company-general-transfer-header {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
|
|
10
|
+
.action-button {
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
|
|
13
|
+
>span {
|
|
14
|
+
margin-left: 6px;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.delete-icon {
|
|
19
|
+
&:hover {
|
|
20
|
+
color: @delete-color;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.edit-icon {
|
|
25
|
+
&:hover {
|
|
26
|
+
color: @primary-color;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.company-general-transfer-title {
|
|
33
|
+
color: rgba(0, 0, 0, 0.85);
|
|
34
|
+
font-weight: bold;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.company-general-transferor-content {
|
|
39
|
+
margin-bottom: 20px;
|
|
40
|
+
|
|
41
|
+
.custom-column-item___yTecf {
|
|
42
|
+
border-bottom: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.column-item-content {
|
|
46
|
+
&>div:nth-child(2) {
|
|
47
|
+
width: 100%;
|
|
48
|
+
padding-right: 20px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.company-general-transferee {
|
|
54
|
+
padding-right: 3em;
|
|
55
|
+
|
|
56
|
+
.company-general-transferee-name {
|
|
57
|
+
color: rgba(0, 0, 0, 0.85);
|
|
58
|
+
font-size: 16px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.placeholder {
|
|
63
|
+
color: #00000040;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.halvingline {
|
|
67
|
+
margin-bottom: 40px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.basic-info {
|
|
71
|
+
display: flex;
|
|
72
|
+
line-height: 0;
|
|
73
|
+
margin-top: 10px;
|
|
74
|
+
|
|
75
|
+
.ant-input-affix-wrapper {
|
|
76
|
+
flex: 1;
|
|
77
|
+
border-radius: 8px;
|
|
78
|
+
margin-right: 3em;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ant-input-affix-wrapper-disabled {
|
|
82
|
+
color: rgba(0, 0, 0, 0.85);
|
|
83
|
+
cursor: auto;
|
|
84
|
+
padding: 4px 0;
|
|
85
|
+
|
|
86
|
+
.ant-input[disabled] {
|
|
87
|
+
color: rgba(0, 0, 0, 0.85);
|
|
88
|
+
cursor: auto;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.basic-val {
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
color: rgba(0, 0, 0, 0.45);
|
|
96
|
+
margin-right: 15px;
|
|
97
|
+
|
|
98
|
+
.svg-inline--fa {
|
|
99
|
+
margin-right: 5px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.company-general-transfer-info-content {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
|
|
108
|
+
>div:nth-child(2) {
|
|
109
|
+
margin-bottom: 10px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.company-general-transfer-info-item {
|
|
113
|
+
flex: 1;
|
|
114
|
+
position: relative;
|
|
115
|
+
padding-right: 3em;
|
|
116
|
+
|
|
117
|
+
.buttons {
|
|
118
|
+
position: absolute;
|
|
119
|
+
right: 30px;
|
|
120
|
+
top: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.company-general-transfer-item-name {
|
|
124
|
+
padding-bottom: 16px;
|
|
125
|
+
font-size: 16px;
|
|
126
|
+
font-weight: bold;
|
|
127
|
+
|
|
128
|
+
svg {
|
|
129
|
+
margin-right: 5px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.morpho-inline-edit {
|
|
134
|
+
width: 80%;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ant-alert-warning {
|
|
140
|
+
margin-top: 10px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { Modal } from "antd";
|
|
4
|
+
import { changeName } from "../../../../../../../data/clda-form/conversion";
|
|
5
|
+
import { clone } from "lodash-es";
|
|
6
|
+
import { useCLDAForm, useCLDAFormStore, } from "../../../../../../../data/clda-form";
|
|
7
|
+
import TransferItem from "../TransferItem";
|
|
8
|
+
const TransferList = (props) => {
|
|
9
|
+
const store = useCLDAFormStore();
|
|
10
|
+
const incorporation = useCLDAForm(props.id, { reload: true });
|
|
11
|
+
return observe(() => {
|
|
12
|
+
var _a, _b, _c;
|
|
13
|
+
return (React.createElement("div", null, ((_b = (_a = incorporation.content.transferDetails) === null || _a === void 0 ? void 0 : _a.transfers) === null || _b === void 0 ? void 0 : _b.length)
|
|
14
|
+
? (_c = incorporation.content.transferDetails) === null || _c === void 0 ? void 0 : _c.transfers.map((t, i) => {
|
|
15
|
+
var _a, _b, _c;
|
|
16
|
+
return (React.createElement(TransferItem, { key: t.key, transfer: t, contact: (_a = incorporation.content.contacts) === null || _a === void 0 ? void 0 : _a.filter((c) => c.id === t.transfeeId)[0], contacts: incorporation.content.contacts, transferLength: (_c = (_b = incorporation.content.transferDetails) === null || _b === void 0 ? void 0 : _b.transfers) === null || _c === void 0 ? void 0 : _c.length, onReload: props.onReload, onSave: onSave, onDeleteClick: () => deleteTransfer(i) }));
|
|
17
|
+
})
|
|
18
|
+
: null));
|
|
19
|
+
});
|
|
20
|
+
function deleteTransfer(index) {
|
|
21
|
+
return Modal.confirm({
|
|
22
|
+
title: "Do you want to delete this item?",
|
|
23
|
+
async onOk() {
|
|
24
|
+
var _a;
|
|
25
|
+
let transfers = clone((_a = incorporation.content.transferDetails) === null || _a === void 0 ? void 0 : _a.transfers);
|
|
26
|
+
transfers.splice(index, 1);
|
|
27
|
+
await store.edit(props.id, {
|
|
28
|
+
data: { TransferDetails: { Transfers: changeName(transfers) } },
|
|
29
|
+
error: "message",
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async function onSave(transfer, contact) {
|
|
35
|
+
var _a, _b, _c, _d;
|
|
36
|
+
const transfers = (_b = clone((_a = incorporation.content.transferDetails) === null || _a === void 0 ? void 0 : _a.transfers)) !== null && _b !== void 0 ? _b : [];
|
|
37
|
+
const no = transfers === null || transfers === void 0 ? void 0 : transfers.findIndex((i) => i.key === transfer.key);
|
|
38
|
+
transfers[no] = transfer;
|
|
39
|
+
if (contact && contact.idType === "NewId") {
|
|
40
|
+
const transferContacts = (_d = clone((_c = incorporation.content) === null || _c === void 0 ? void 0 : _c.contacts)) !== null && _d !== void 0 ? _d : [];
|
|
41
|
+
const index = transferContacts.findIndex((i) => i.id === (contact === null || contact === void 0 ? void 0 : contact.id));
|
|
42
|
+
transferContacts[index] = contact;
|
|
43
|
+
await store.edit(props.id, {
|
|
44
|
+
data: {
|
|
45
|
+
Contacts: changeName(transferContacts),
|
|
46
|
+
TransferDetails: { Transfers: changeName(transfers) },
|
|
47
|
+
},
|
|
48
|
+
error: "message",
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
await store.edit(props.id, {
|
|
53
|
+
data: { TransferDetails: { Transfers: changeName(transfers) } },
|
|
54
|
+
error: "message",
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
export default TransferList;
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,WAAW,EACX,gBAAgB,GAGhB,MAAM,qCAAqC,CAAC;AAC7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