@voplus/morpho-csp 1.0.0-dev003 → 1.0.0-dev004

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.
Files changed (139) hide show
  1. package/es/data/corporate/CorporateStore.d.ts +24 -0
  2. package/es/data/corporate/CorporateStore.js +43 -0
  3. package/es/data/corporate/CorporateStore.js.map +1 -0
  4. package/es/data/corporate/hooks.d.ts +10 -0
  5. package/es/data/corporate/hooks.js +14 -0
  6. package/es/data/corporate/hooks.js.map +1 -0
  7. package/es/data/corporate/index.d.ts +4 -0
  8. package/es/data/corporate/index.js +5 -0
  9. package/es/data/corporate/index.js.map +1 -0
  10. package/es/data/corporate/interfaces.d.ts +26 -0
  11. package/es/data/corporate/interfaces.js +1 -0
  12. package/es/data/corporate/interfaces.js.map +1 -0
  13. package/es/data/corporate/types.d.ts +11 -0
  14. package/es/data/corporate/types.js +1 -0
  15. package/es/data/corporate/types.js.map +1 -0
  16. package/es/modules/corporate/CorporateDefaultView/index.d.ts +3 -0
  17. package/es/modules/corporate/CorporateDefaultView/index.js +18 -0
  18. package/es/modules/corporate/CorporateDefaultView/index.js.map +1 -0
  19. package/es/modules/corporate/DocumentIconList/index.d.ts +7 -0
  20. package/es/modules/corporate/DocumentIconList/index.js +32 -0
  21. package/es/modules/corporate/DocumentIconList/index.js.map +1 -0
  22. package/es/modules/corporate/DocumentIconList/index.less +14 -0
  23. package/es/modules/corporate/company/CompanyDefaultView/index.d.ts +7 -0
  24. package/es/modules/corporate/company/CompanyDefaultView/index.js +43 -0
  25. package/es/modules/corporate/company/CompanyDefaultView/index.js.map +1 -0
  26. package/es/modules/corporate/company/CompanyDefaultView/index.less +25 -0
  27. package/es/modules/corporate/company/CompanyDetailsView/index.d.ts +6 -0
  28. package/es/modules/corporate/company/CompanyDetailsView/index.js +91 -0
  29. package/es/modules/corporate/company/CompanyDetailsView/index.js.map +1 -0
  30. package/es/modules/corporate/company/CompanyDetailsView/index.less +36 -0
  31. package/es/modules/corporate/company/CompanyDetailsView/state.d.ts +20 -0
  32. package/es/modules/corporate/company/CompanyDetailsView/state.js +40 -0
  33. package/es/modules/corporate/company/CompanyDetailsView/state.js.map +1 -0
  34. package/es/modules/corporate/company/Identity/IdentifyDetail/index.d.ts +6 -0
  35. package/es/modules/corporate/company/Identity/IdentifyDetail/index.js +31 -0
  36. package/es/modules/corporate/company/Identity/IdentifyDetail/index.js.map +1 -0
  37. package/es/modules/corporate/company/Identity/IdentifyDetail/index.less +22 -0
  38. package/es/modules/corporate/company/Identity/IdentityInformation/index.d.ts +5 -0
  39. package/es/modules/corporate/company/Identity/IdentityInformation/index.js +59 -0
  40. package/es/modules/corporate/company/Identity/IdentityInformation/index.js.map +1 -0
  41. package/es/modules/corporate/company/Identity/IdentityInformation/state.d.ts +15 -0
  42. package/es/modules/corporate/company/Identity/IdentityInformation/state.js +38 -0
  43. package/es/modules/corporate/company/Identity/IdentityInformation/state.js.map +1 -0
  44. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.d.ts +3 -0
  45. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.js +36 -0
  46. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.js.map +1 -0
  47. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.d.ts +3 -0
  48. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.js +16 -0
  49. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.js.map +1 -0
  50. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.d.ts +3 -0
  51. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.js +32 -0
  52. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.js.map +1 -0
  53. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.d.ts +3 -0
  54. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.js +32 -0
  55. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.js.map +1 -0
  56. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.d.ts +3 -0
  57. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.js +33 -0
  58. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.js.map +1 -0
  59. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.d.ts +7 -0
  60. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.js +65 -0
  61. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.js.map +1 -0
  62. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/index.less +55 -0
  63. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/state.d.ts +37 -0
  64. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/state.js +71 -0
  65. package/es/modules/corporate/company/Identity/SelectLegalContactDialog/state.js.map +1 -0
  66. package/es/modules/corporate/company/Identity/data/IdentityStore.d.ts +23 -0
  67. package/es/modules/corporate/company/Identity/data/IdentityStore.js +55 -0
  68. package/es/modules/corporate/company/Identity/data/IdentityStore.js.map +1 -0
  69. package/es/modules/corporate/company/Identity/data/hooks.d.ts +13 -0
  70. package/es/modules/corporate/company/Identity/data/hooks.js +31 -0
  71. package/es/modules/corporate/company/Identity/data/hooks.js.map +1 -0
  72. package/es/modules/corporate/company/Identity/data/index.d.ts +4 -0
  73. package/es/modules/corporate/company/Identity/data/index.js +5 -0
  74. package/es/modules/corporate/company/Identity/data/index.js.map +1 -0
  75. package/es/modules/corporate/company/Identity/data/interfaces.d.ts +17 -0
  76. package/es/modules/corporate/company/Identity/data/interfaces.js +1 -0
  77. package/es/modules/corporate/company/Identity/data/interfaces.js.map +1 -0
  78. package/es/modules/corporate/company/Identity/data/types.d.ts +16 -0
  79. package/es/modules/corporate/company/Identity/data/types.js +1 -0
  80. package/es/modules/corporate/company/Identity/data/types.js.map +1 -0
  81. package/es/modules/corporate/company/Officer/ContactInformation/index.d.ts +6 -0
  82. package/es/modules/corporate/company/Officer/ContactInformation/index.js +54 -0
  83. package/es/modules/corporate/company/Officer/ContactInformation/index.js.map +1 -0
  84. package/es/modules/corporate/company/Officer/ContactInformation/state.d.ts +20 -0
  85. package/es/modules/corporate/company/Officer/ContactInformation/state.js +30 -0
  86. package/es/modules/corporate/company/Officer/ContactInformation/state.js.map +1 -0
  87. package/es/modules/corporate/company/Officer/OfficerDefaultView/index.d.ts +6 -0
  88. package/es/modules/corporate/company/Officer/OfficerDefaultView/index.js +33 -0
  89. package/es/modules/corporate/company/Officer/OfficerDefaultView/index.js.map +1 -0
  90. package/es/modules/corporate/company/Officer/OfficerDefaultView/index.less +48 -0
  91. package/es/modules/corporate/company/Officer/OfficerInformation/index.d.ts +3 -0
  92. package/es/modules/corporate/company/Officer/OfficerInformation/index.js +15 -0
  93. package/es/modules/corporate/company/Officer/OfficerInformation/index.js.map +1 -0
  94. package/es/modules/corporate/company/OfficerRegister/OfficerList/index.d.ts +7 -0
  95. package/es/modules/corporate/company/OfficerRegister/OfficerList/index.js +83 -0
  96. package/es/modules/corporate/company/OfficerRegister/OfficerList/index.js.map +1 -0
  97. package/es/modules/corporate/company/OfficerRegister/OfficerList/index.less +15 -0
  98. package/es/modules/corporate/company/OfficerRegister/OfficerList/state.d.ts +7 -0
  99. package/es/modules/corporate/company/OfficerRegister/OfficerList/state.js +23 -0
  100. package/es/modules/corporate/company/OfficerRegister/OfficerList/state.js.map +1 -0
  101. package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.d.ts +6 -0
  102. package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.js +51 -0
  103. package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.js.map +1 -0
  104. package/es/modules/corporate/company/OfficerRegister/OfficerRegisterDefaultView/index.less +20 -0
  105. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.d.ts +3 -0
  106. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.js +20 -0
  107. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.js.map +1 -0
  108. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/index.less +5 -0
  109. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/state.d.ts +10 -0
  110. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/state.js +25 -0
  111. package/es/modules/corporate/company/OfficerRegister/OfficerStatusFilter/state.js.map +1 -0
  112. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.js.map +1 -1
  113. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.js +12 -8
  114. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.js.map +1 -1
  115. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.less +2 -2
  116. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.js +1 -1
  117. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.js.map +1 -1
  118. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.js +16 -20
  119. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.js.map +1 -1
  120. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.js +11 -6
  121. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.js.map +1 -1
  122. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.less +2 -6
  123. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.js +4 -2
  124. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.js.map +1 -1
  125. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.js +2 -2
  126. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.js.map +1 -1
  127. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.js +8 -14
  128. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.js.map +1 -1
  129. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/state.d.ts +10 -0
  130. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/state.js +34 -0
  131. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/state.js.map +1 -0
  132. package/es/routes.d.ts +6 -0
  133. package/es/routes.js +14 -1
  134. package/es/routes.js.map +1 -1
  135. package/es/style/common.less +6 -0
  136. package/package.json +11 -20
  137. package/es/data/metas.d.ts +0 -0
  138. package/es/data/metas.js +0 -1
  139. package/es/data/metas.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ :global {
2
+ .identity-detail {
3
+ .operate-record {
4
+ padding-top: 5px;
5
+ }
6
+ .identity-information {
7
+ display: flex;
8
+ justify-content: space-between;
9
+ .hover-edit-btn {
10
+ display: none;
11
+ height: auto;
12
+ }
13
+ }
14
+ .document-icon-view_list {
15
+ margin: 0;
16
+ }
17
+ &:hover .identity-information .hover-edit-btn {
18
+ display: block;
19
+ cursor: pointer;
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const IdentityInformation: (props: {
3
+ id: string;
4
+ }) => JSX.Element;
5
+ export default IdentityInformation;
@@ -0,0 +1,59 @@
1
+ import { Button, DatePicker, Form, Input, Select, Skeleton, Tooltip, message } from "@voplus/antd";
2
+ import { useIdentity, useIdentityStore } from "../data";
3
+ import React, { useState } from "react";
4
+ import { EditOutlined } from "@ant-design/icons";
5
+ import { InputCountry } from "@voplus/morpho-ui";
6
+ import { State } from "./state";
7
+ import moment from "moment";
8
+ import { useObserver } from "mobx-react-lite";
9
+ const IdentityInformation = (props) => {
10
+ const { id } = props;
11
+ const [state] = useState(new State());
12
+ const identityStore = useIdentityStore();
13
+ const identity = useIdentity(id, { reload: true });
14
+ return useObserver(() => (React.createElement(React.Fragment, null, identity.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
15
+ React.createElement("div", { className: "identity-information" },
16
+ React.createElement("h3", null, "Identity Information"),
17
+ React.createElement("div", null, state.editable ? (React.createElement(React.Fragment, null,
18
+ React.createElement(Button, { type: "text", onClick: () => (state.editable = false) }, "Cancel"),
19
+ React.createElement(Button, { type: "link", loading: state.loading, onClick: onOk }, "Ok"))) : (React.createElement(Tooltip, { title: "Edit" },
20
+ React.createElement(Button, { type: "link", onClick: onEdit },
21
+ React.createElement(EditOutlined, null)))))),
22
+ React.createElement(Form, { labelAlign: "left", labelCol: { span: 5 } },
23
+ React.createElement(Form.Item, { label: "Country", name: "Country", rules: [{ required: true }] }, state.editable ? (React.createElement(InputCountry, { defaultValue: state.Country, onChange: (v) => (state.Country = v) })) : (identity.country)),
24
+ React.createElement(Form.Item, { label: "Identity Type", name: "identifyType", rules: [{ required: true }] }, state.editable ? (React.createElement(Select, { defaultValue: state.Type, value: state.Type, onChange: v => (state.Type = v) },
25
+ React.createElement(Select.Option, { value: "International Passport" }, "International Passport"),
26
+ React.createElement(Select.Option, { value: "Identify Card" }, "Identify Card"))) : (identity.type)),
27
+ React.createElement(Form.Item, { label: "Identity #", name: "identity", rules: [{ required: true }] }, state.editable ? (React.createElement(Input, { value: state.Number, defaultValue: state.Number, onChange: e => (state.Number = e.target.value) })) : (identity.number)),
28
+ React.createElement(Form.Item, { label: "Expiry Date", name: "expiryDate", rules: [{ required: state.Type === "International Passport" }] }, state.editable ? (React.createElement(DatePicker, { defaultValue: state.ExpiryDate, value: state.ExpiryDate, onChange: date => (state.ExpiryDate = date || moment()) })) : (moment(identity.expiryDate).format("YYYY-MM-DD")))))))));
29
+ /** hover edit IdentityInformation */
30
+ function onEdit() {
31
+ const { number, country, type, expiryDate } = identity;
32
+ state.Number = number || "";
33
+ state.Country = country || "";
34
+ state.Type = type || "International Passport";
35
+ state.ExpiryDate = moment(expiryDate);
36
+ state.editable = true;
37
+ }
38
+ /** save Identity information */
39
+ async function onOk() {
40
+ if (!state.Number ||
41
+ !state.Country ||
42
+ (state.Type === "International Passport" && !state.ExpiryDate))
43
+ return message.warn("Identity information required");
44
+ console.log(state, "state");
45
+ const { Number, Country, Type, ExpiryDate } = state;
46
+ const Options = {
47
+ Number,
48
+ Country,
49
+ Type,
50
+ ExpiryDate: moment(ExpiryDate).format("YYYY-MM-DD HH:mm:ss")
51
+ };
52
+ state.loading = true;
53
+ await identityStore.edit(id, Options);
54
+ state.loading = false;
55
+ return (state.editable = false);
56
+ }
57
+ };
58
+ export default IdentityInformation;
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/IdentityInformation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EAER,OAAO,EACP,OAAO,EACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,mBAAmB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACrD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAEtC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IAEzC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,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AC,UAAU,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC;SAC5D,CAAC;QACF,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,aAAa,CAAC,IAAI,CAAC,EAAE,EAAE,OAAc,CAAC,CAAC;QAC7C,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;IACjC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import moment from "moment";
2
+ export declare class State {
3
+ /** hover on edit */
4
+ editable: boolean;
5
+ /** */
6
+ Number: number | string;
7
+ /** */
8
+ Type: string;
9
+ /** */
10
+ Country: string;
11
+ /** */
12
+ ExpiryDate: moment.Moment;
13
+ /** loading of save */
14
+ loading: boolean;
15
+ }
@@ -0,0 +1,38 @@
1
+ import { __decorate } from "tslib";
2
+ import moment from "moment";
3
+ import { observable } from "mobx";
4
+ export class State {
5
+ constructor() {
6
+ /** hover on edit */
7
+ this.editable = false;
8
+ /** */
9
+ this.Number = "";
10
+ /** */
11
+ this.Type = "";
12
+ /** */
13
+ this.Country = "";
14
+ /** */
15
+ this.ExpiryDate = moment();
16
+ /** loading of save */
17
+ this.loading = false;
18
+ }
19
+ }
20
+ __decorate([
21
+ observable
22
+ ], State.prototype, "editable", void 0);
23
+ __decorate([
24
+ observable
25
+ ], State.prototype, "Number", void 0);
26
+ __decorate([
27
+ observable
28
+ ], State.prototype, "Type", void 0);
29
+ __decorate([
30
+ observable
31
+ ], State.prototype, "Country", void 0);
32
+ __decorate([
33
+ observable
34
+ ], State.prototype, "ExpiryDate", void 0);
35
+ __decorate([
36
+ observable
37
+ ], State.prototype, "loading", void 0);
38
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/IdentityInformation/state.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,OAAO,KAAK;IAAlB;QACC,oBAAoB;QACD,aAAQ,GAAG,KAAK,CAAC;QACpC,MAAM;QACa,WAAM,GAAoB,EAAE,CAAC;QAChD,MAAM;QACa,SAAI,GAAG,EAAE,CAAC;QAC7B,MAAM;QACa,YAAO,GAAG,EAAE,CAAC;QAChC,MAAM;QACa,eAAU,GAAkB,MAAM,EAAE,CAAC;QACxD,sBAAsB;QACH,YAAO,GAAG,KAAK,CAAC;IACpC,CAAC;CAAA;AAXY;IAAX,UAAU;uCAAyB;AAExB;IAAX,UAAU;qCAAqC;AAEpC;IAAX,UAAU;mCAAkB;AAEjB;IAAX,UAAU;sCAAqB;AAEpB;IAAX,UAAU;yCAA6C;AAE5C;IAAX,UAAU;sCAAwB"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Page1: () => JSX.Element;
3
+ export default Page1;
@@ -0,0 +1,36 @@
1
+ import { Divider, Radio, Select } from "@voplus/antd";
2
+ import { useUnitListEffect } from "@voplus/morpho-org";
3
+ import React from "react";
4
+ import { useLegalContext } from "./state";
5
+ import { useObserver } from "mobx-react-lite";
6
+ const Page1 = () => {
7
+ const legalContext = useLegalContext();
8
+ useUnitListEffect(null, list => {
9
+ legalContext.unitList = list || [];
10
+ });
11
+ return useObserver(() => {
12
+ var _a;
13
+ return (React.createElement(React.Fragment, null,
14
+ React.createElement("div", { className: "select-legal-contact_title" }, "Select Legal Contact"),
15
+ React.createElement("div", { className: "select-legal-contact_content" },
16
+ React.createElement(Radio.Group, { value: legalContext.operate, onChange: e => (legalContext.operate = e.target.value) },
17
+ React.createElement(Radio, { value: "Search", className: "padding-bottom-20" }, "Search an existing contact"),
18
+ React.createElement(Select, { value: (_a = legalContext.unit) === null || _a === void 0 ? void 0 : _a.id, showSearch: true, filterOption: filterItems, optionLabelProp: "title", onSelect: onSelect, style: { width: "100%" } }, legalContext.unitList.map(i => (React.createElement(Select.Option, { key: i.id, value: i.id, title: i.name }, i.name)))),
19
+ React.createElement(Divider, { plain: true }, "or"),
20
+ React.createElement(Radio, { value: "Create" }, "Create a new contact")))));
21
+ });
22
+ function filterItems(input, option) {
23
+ return option.title.toLowerCase().includes(input.toLowerCase());
24
+ }
25
+ /** select unit */
26
+ function onSelect(id) {
27
+ const unit = legalContext.unitList.find(x => x.id === id);
28
+ if (unit) {
29
+ legalContext.unit = unit;
30
+ legalContext.identity.unitId = unit.id;
31
+ }
32
+ console.log(legalContext.unit, "unit");
33
+ }
34
+ };
35
+ export default Page1;
36
+ //# sourceMappingURL=Page1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page1.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/SelectLegalContactDialog/Page1.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAS,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,KAAK,GAAG,GAAG,EAAE;IAClB,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;QAC9B,YAAY,CAAC,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,GAAG,EAAE;;QAAC,OAAA,CACxB,oBAAC,KAAK,CAAC,QAAQ;YACd,6BAAK,SAAS,EAAC,4BAA4B,2BAA2B;YACtE,6BAAK,SAAS,EAAC,8BAA8B;gBAC5C,oBAAC,KAAK,CAAC,KAAK,IACX,KA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C,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;SACvC;QAED,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;AACF,CAAC,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Page2: () => JSX.Element;
3
+ export default Page2;
@@ -0,0 +1,16 @@
1
+ import { Radio } from "@voplus/antd";
2
+ import React from "react";
3
+ import { useLegalContext } from "./state";
4
+ import { useObserver } from "mobx-react-lite";
5
+ const Page2 = () => {
6
+ const legalContext = useLegalContext();
7
+ return useObserver(() => (React.createElement(React.Fragment, null,
8
+ React.createElement("div", { className: "select-legal-contact_title" }, "Create Legal Contact"),
9
+ React.createElement("div", { className: "select-legal-contact_content" },
10
+ React.createElement("h4", null, "Choose the type of contact are creating"),
11
+ React.createElement(Radio.Group, { value: legalContext.unitType, onChange: e => (legalContext.unitType = e.target.value) },
12
+ React.createElement(Radio, { value: "People", style: { padding: "10px 0" } }, "People"),
13
+ React.createElement(Radio, { value: "Organization", style: { padding: "10px 0" } }, "Organization"))))));
14
+ };
15
+ export default Page2;
16
+ //# sourceMappingURL=Page2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page2.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/SelectLegalContactDialog/Page2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,KAAK,GAAG,GAAG,EAAE;IAClB,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ;QACd,6BAAK,SAAS,EAAC,4BAA4B,2BAA2B;QACtE,6BAAK,SAAS,EAAC,8BAA8B;YAC5C,0EAAgD;YAChD,oBAAC,KAAK,CAAC,KAAK,IACX,KAAK,EAAE,YAAY,CAAC,QAAQ,EAC5B,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;gBAEvD,oBAAC,KAAK,IAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,aAE1C;gBACR,oBAAC,KAAK,IAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,mBAEhD,CACK,CACT,CACU,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Page3: () => JSX.Element;
3
+ export default Page3;
@@ -0,0 +1,32 @@
1
+ import { Divider, Form, Input, Radio } from "@voplus/antd";
2
+ import React from "react";
3
+ import { useLegalContext } from "./state";
4
+ import { useObserver } from "mobx-react-lite";
5
+ const Page3 = () => {
6
+ const legalContext = useLegalContext();
7
+ return useObserver(() => (React.createElement(React.Fragment, null,
8
+ React.createElement("div", { className: "select-legal-contact_title" }, "Input Name"),
9
+ React.createElement("div", { className: "select-legal-contact_content" }, legalContext.unitType === "Organization" ? (React.createElement(React.Fragment, null,
10
+ React.createElement("h4", { style: { marginBottom: "10px" } }, "Name of the Organization"),
11
+ React.createElement(Input, { value: legalContext.identity.fistName, onChange: e => (legalContext.identity.fistName = e.target.value) }))) : (React.createElement(React.Fragment, null,
12
+ React.createElement("h4", null, "Please choose correct name order and input name of the contact"),
13
+ React.createElement(Divider, { plain: true, style: { margin: "15px 0" } }),
14
+ React.createElement("div", null, "Full Name Order"),
15
+ React.createElement(Radio.Group, { value: legalContext.orderName, onChange: e => (legalContext.orderName = e.target.value) },
16
+ React.createElement(Radio, { value: "Western", style: { padding: "10px 0" } }, "Fist Middle Last ( Western )"),
17
+ React.createElement(Radio, { value: "Eastern", style: { padding: "10px 0" } }, "Last First ( Eastern )")),
18
+ React.createElement(Divider, { plain: true, style: { margin: "15px 0" } }),
19
+ React.createElement("div", null, "Displayed Full Name"),
20
+ React.createElement("div", { className: "full-name-displayed" }, legalContext.fullName),
21
+ React.createElement(Form, { labelCol: { span: 6 }, labelAlign: "left", colon: false, className: "padding-top-15" },
22
+ React.createElement(Form.Item, { label: "First Name", name: "fistName", rules: [{ required: true, message: "Please input your First Name!" }] },
23
+ React.createElement(Input, { value: legalContext.identity.fistName, onChange: e => (legalContext.identity.fistName = e.target.value) })),
24
+ React.createElement(Form.Item, { label: "Last Name", name: "lastName", rules: [{ required: true, message: "Please input Last Name!" }] },
25
+ React.createElement(Input, { value: legalContext.identity.lastName, onChange: e => (legalContext.identity.lastName = e.target.value) })),
26
+ React.createElement(Form.Item, { label: React.createElement("div", { style: { lineHeight: "15px" } },
27
+ "Middle Name",
28
+ React.createElement("span", { style: { display: "block" } }, "(Optional)")) },
29
+ React.createElement(Input, { value: legalContext.identity.middleName, onChange: e => (legalContext.identity.middleName = e.target.value) })))))))));
30
+ };
31
+ export default Page3;
32
+ //# sourceMappingURL=Page3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page3.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/SelectLegalContactDialog/Page3.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,KAAK,GAAG,GAAG,EAAE;IAClB,MAAM,YAAY,GAA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AAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GACjE,CACS,CACN,CACS,CACjB,CACI,CACU,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Page4: () => JSX.Element;
3
+ export default Page4;
@@ -0,0 +1,32 @@
1
+ import { DatePicker, Form, Input, Select, Tabs } from "@voplus/antd";
2
+ import Address from "@voplus/morpho-org/es/components/Address";
3
+ import { InputCountry } from "@voplus/morpho-ui";
4
+ import React from "react";
5
+ import { useLegalContext } from "./state";
6
+ import { useObserver } from "mobx-react-lite";
7
+ const Page4 = () => {
8
+ const legalContext = useLegalContext();
9
+ return useObserver(() => (React.createElement(React.Fragment, null,
10
+ React.createElement(Tabs, { activeKey: legalContext.tabKey, tabPosition: "left", onChange: (key) => (legalContext.tabKey = key) },
11
+ React.createElement(Tabs.TabPane, { tab: "Contact Info", key: "Contact" },
12
+ React.createElement(Form, { layout: "vertical" },
13
+ React.createElement(Form.Item, { label: "E-mail" },
14
+ React.createElement(Input, { value: legalContext.identity.email, onChange: e => (legalContext.identity.email = e.target.value) })),
15
+ React.createElement(Form.Item, { label: "Phone" },
16
+ React.createElement(Input, { value: legalContext.identity.phone, onChange: e => (legalContext.identity.phone = e.target.value) })),
17
+ React.createElement(Address, { value: legalContext.identity.address, onChange: v => (legalContext.identity.address = v) }))),
18
+ React.createElement(Tabs.TabPane, { tab: "Identify Info", key: "Identify" },
19
+ React.createElement(Form, { layout: "vertical" },
20
+ React.createElement(Form.Item, { label: legalContext.unitType === "Organization" ? "Country of Registration" : "Country", name: "country", rules: [{ required: true }] },
21
+ React.createElement(InputCountry, { defaultValue: legalContext.identity.country, onChange: (country) => (legalContext.identity.country = country) })),
22
+ legalContext.unitType === "People" && (React.createElement(Form.Item, { label: "Identify Type", name: "identifyType", rules: [{ required: true }] },
23
+ React.createElement(Select, { defaultValue: legalContext.identity.type, value: legalContext.identity.type, onChange: value => (legalContext.identity.type = value) },
24
+ React.createElement(Select.Option, { value: "International Passport" }, "International Passport"),
25
+ React.createElement(Select.Option, { value: "Identify Card" }, "Identify Card")))),
26
+ React.createElement(Form.Item, { label: legalContext.unitType === "Organization" ? "Registration #" : "Identify #", name: "identity", rules: [{ required: true }] },
27
+ React.createElement(Input, { defaultValue: legalContext.identity.number, value: legalContext.identity.number, onChange: e => (legalContext.identity.number = e.target.value) })),
28
+ legalContext.unitType === "People" && (React.createElement(Form.Item, { label: "Expiry Date", name: "expiryDate", rules: [{ required: legalContext.identity.type === "International Passport" }] },
29
+ React.createElement(DatePicker, { defaultValue: legalContext.identity.expiryDate, value: legalContext.identity.expiryDate, onChange: date => (legalContext.identity.expiryDate = date || null) })))))))));
30
+ };
31
+ export default Page4;
32
+ //# sourceMappingURL=Page4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page4.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/SelectLegalContactDialog/Page4.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,KAAK,GAAG,GAAG,EAAE;IAClB,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ;QACd,oBAAC,IAAI,IACJ,SAAS,EAAE,YAAY,CAAC,MAAM,EAC9B,WAAW,EAAC,MAAM,EAClB,QAAQ,EAAE,CAAC,GAA2B,E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AQ,KAAK,QAAQ,IAAI,CACtC,oBAAC,IAAI,CAAC,IAAI,IACT,KAAK,EAAC,aAAa,EACnB,IAAI,EAAC,YAAY,EACjB,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,wBAAwB,EAAE,CAAC;wBAE9E,oBAAC,UAAU,IACV,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,UAA2B,EAC/D,KAAK,EAAE,YAAY,CAAC,QAAQ,CAAC,UAAU,EACvC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,GAAG,IAAI,IAAI,IAAI,CAAC,GAClE,CACS,CACZ,CACK,CACO,CACT,CACS,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Page5: () => JSX.Element;
3
+ export default Page5;
@@ -0,0 +1,33 @@
1
+ import { Form } from "@voplus/antd";
2
+ import React from "react";
3
+ import moment from "moment";
4
+ import { useLegalContext } from "./state";
5
+ import { useObserver } from "mobx-react-lite";
6
+ const Page5 = () => {
7
+ const legalContext = useLegalContext();
8
+ return useObserver(() => {
9
+ var _a, _b, _c, _d, _e;
10
+ return (React.createElement(React.Fragment, null,
11
+ React.createElement("div", { className: "select-legal-contact_content page5" },
12
+ React.createElement("div", { className: "full-name" }, legalContext.fullName),
13
+ React.createElement("div", { className: "padding-bottom-20" },
14
+ legalContext.identity.country,
15
+ "\uFF08",
16
+ legalContext.identity.number,
17
+ legalContext.identity.expiryDate
18
+ ? " expiryDate:" + moment(legalContext.identity.expiryDate).format("YYYY-MM-DD")
19
+ : "",
20
+ "\uFF09"),
21
+ React.createElement(Form, { labelCol: { span: 4 }, labelAlign: "left", colon: false },
22
+ React.createElement(Form.Item, { label: "Phone" }, legalContext.identity.phone),
23
+ React.createElement(Form.Item, { label: "Email" }, legalContext.identity.email),
24
+ React.createElement(Form.Item, { label: "Address" },
25
+ ((_a = legalContext.identity.address) === null || _a === void 0 ? void 0 : _a.line1) ? legalContext.identity.address.line1 + ", " : "",
26
+ ((_b = legalContext.identity.address) === null || _b === void 0 ? void 0 : _b.line2) ? legalContext.identity.address.line2 + ", " : "",
27
+ ((_c = legalContext.identity.address) === null || _c === void 0 ? void 0 : _c.city) ? legalContext.identity.address.city + ", " : "",
28
+ ((_d = legalContext.identity.address) === null || _d === void 0 ? void 0 : _d.state) ? legalContext.identity.address.state + ", " : "", (_e = legalContext.identity.address) === null || _e === void 0 ? void 0 :
29
+ _e.country)))));
30
+ });
31
+ };
32
+ export default Page5;
33
+ //# sourceMappingURL=Page5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Page5.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/SelectLegalContactDialog/Page5.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,KAAK,GAAG,GAAG,EAAE;IAClB,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO,WAAW,CAAC,GAAG,EAAE;;QAAC,OAAA,CACxB,oBAAC,KAAK,CAAC,QAAQ;YAEd,6BAAK,SAAS,EAAC,oCAAoC;gBAClD,6BAAK,SAAS,EAAC,WAAW,IAAE,YAAY,CAAC,QAAQ,CAAO;gBAExD,6BAAK,SAAS,EAAC,mBAAmB;oBAChC,YAAY,CAAC,QAAQ,CAAC,OAAO;;oBAAG,YAAY,CAAC,QAAQ,CAAC,MAAM;oBAC5D,YAAY,CAAC,QAAQ,CAAC,UAAU;wBAChC,CAAC,CAAC,cAAc,G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;AACF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const SelectLegalContactDialog: (props: {
4
+ visible: boolean;
5
+ updateVisible?: () => void;
6
+ }) => JSX.Element;
7
+ export default SelectLegalContactDialog;
@@ -0,0 +1,65 @@
1
+ import "./index.less";
2
+ import { Button, Modal, message } from "@voplus/antd";
3
+ import { useIdentityStore } from "../data";
4
+ import { LegalContext, State } from "./state";
5
+ import React, { useState } from "react";
6
+ import Page1 from "./Page1";
7
+ import Page2 from "./Page2";
8
+ import Page3 from "./Page3";
9
+ import Page4 from "./Page4";
10
+ import Page5 from "./Page5";
11
+ import { useObserver } from "mobx-react-lite";
12
+ const SelectLegalContactDialog = (props) => {
13
+ const { visible, updateVisible } = props;
14
+ const [state] = useState(new State());
15
+ const identityStore = useIdentityStore();
16
+ return useObserver(() => (React.createElement(LegalContext.Provider, { value: state },
17
+ React.createElement(Modal, { width: 500, title: "", footer: null, closable: false, wrapClassName: "select-legal-contact-dialog", visible: visible },
18
+ state.step === 5 ? (React.createElement(Page5, null)) : state.step === 4 ? (React.createElement(Page4, null)) : state.step === 3 ? (React.createElement(Page3, null)) : state.step === 2 ? (React.createElement(Page2, null)) : (React.createElement(Page1, null)),
19
+ React.createElement("div", { className: "select-legal-contact_footer" },
20
+ React.createElement(Button, { size: "middle", onClick: back }, state.step === 1 ? "Cancel" : "Back"),
21
+ React.createElement(Button, { size: "middle", type: "primary", onClick: state.step === 5 ? create : next }, state.step === 5 ? "Create" : "Next"))))));
22
+ /** 回退上一个步骤, 如果是create existing contact 的, 无Page2跟Page3, 回退只有Page1跟Page4 */
23
+ function back() {
24
+ if (state.step === 1)
25
+ return;
26
+ state.operate === "Search" ? (state.step = state.step === 5 ? 4 : 1) : (state.step -= 1);
27
+ }
28
+ /** 下一个步骤, 如果是 create existing contact, 跳过Page2跟Page3 */
29
+ function next() {
30
+ var _a;
31
+ if (state.operate === "Search" && state.step === 1) {
32
+ return !((_a = state.unit) === null || _a === void 0 ? void 0 : _a.id) ? message.warn("Please Select existing Contact") : (state.step = 4);
33
+ }
34
+ if (state.step === 4 && (!state.identity.number || !state.identity.country)) {
35
+ message.warn(state.identity.unitType === "Organization"
36
+ ? "Country && Registration are required"
37
+ : "Country && Identify are required");
38
+ /** 如果 Identify Info 为空, 则跳转 Identify Tab */
39
+ return (state.tabKey = "Identify");
40
+ }
41
+ return (state.step += 1);
42
+ }
43
+ /** create a new contact */
44
+ async function create() {
45
+ const { unitId, number, country, expiryDate, type, unitType, email, phone } = state.identity;
46
+ let Option = {
47
+ FullName: state.fullName,
48
+ Number: number,
49
+ Country: country,
50
+ ExpiryDate: expiryDate,
51
+ Type: type,
52
+ Email: email,
53
+ Phone: phone
54
+ };
55
+ Option =
56
+ state.operate === "Search"
57
+ ? { ...Option, ...{ UnitId: unitId } }
58
+ : { ...Option, ...{ UnitType: unitType } };
59
+ await identityStore.create(Option);
60
+ if (updateVisible)
61
+ updateVisible();
62
+ }
63
+ };
64
+ export default SelectLegalContactDialog;
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/Identity/SelectLegalContactDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EACN,MAAM,EAKN,KAAK,EAIL,OAAO,EACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAA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AAG,UAAU,CAAC,CAAC;SACnC;QACD,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;IAC1B,CAAC;IACD,2BAA2B;IAC3B,KAAK,UAAU,MAAM;QACpB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC7F,IAAI,MAAM,GAAG;YACZ,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,UAAU;YACtB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACZ,CAAC;QACF,MAAM;YACL,KAAK,CAAC,OAAO,KAAK,QAAQ;gBACzB,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;gBACtC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC;QAE7C,MAAM,aAAa,CAAC,MAAM,CAAC,MAAa,CAAC,CAAC;QAC1C,IAAI,aAAa;YAAE,aAAa,EAAE,CAAC;IACpC,CAAC;AACF,CAAC,CAAC;AACF,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,55 @@
1
+ :global {
2
+ .select-legal-contact-dialog {
3
+ .ant-modal-body {
4
+ padding: 20px 0;
5
+ }
6
+ h3,
7
+ h4 {
8
+ margin-bottom: 0;
9
+ }
10
+ .select-legal-contact_title {
11
+ padding: 0 20px 15px 20px;
12
+ color: rgba(0, 0, 0, 0.85);
13
+ font-weight: 500;
14
+ font-size: 16px;
15
+ line-height: 17px;
16
+ border-bottom: 1px solid #f0f0f0;
17
+ }
18
+ .select-legal-contact_content {
19
+ padding: 15px 20px;
20
+ &.page5 {
21
+ padding: 15px 30px;
22
+ }
23
+ .ant-radio-group,
24
+ .ant-radio-wrapper {
25
+ display: block;
26
+ }
27
+ .full-name-displayed {
28
+ padding: 10px 0;
29
+ border-bottom: 1px solid #f0f0f0;
30
+ }
31
+ .full-name {
32
+ padding-bottom: 8px;
33
+ color: rgba(0, 0, 0, 0.85);
34
+ font-weight: 500;
35
+ font-size: 16px;
36
+ }
37
+ .padding-top-15 {
38
+ padding-top: 15px;
39
+ }
40
+ }
41
+ .ant-tabs .ant-tabs-tabpane {
42
+ padding: 0 20px;
43
+ }
44
+ .ant-form .ant-form-item {
45
+ margin-bottom: 20px;
46
+ }
47
+ .select-legal-contact_footer {
48
+ padding: 0 20px;
49
+ text-align: right;
50
+ & .ant-btn {
51
+ margin-left: 10px;
52
+ }
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,37 @@
1
+ /// <reference types="react" />
2
+ import { IAddress, IUnit } from "@voplus/morpho-org";
3
+ import moment from "moment";
4
+ export declare class State {
5
+ /** step of Add Legal Contact */
6
+ step: number;
7
+ /** Search an existing contact or Create a new contact */
8
+ operate: "Search" | "Create";
9
+ /** type of unit */
10
+ unitType: string;
11
+ /** list of unit */
12
+ unitList: IUnit[];
13
+ /** unit */
14
+ unit: IUnit;
15
+ /** order name by Western or Eastern */
16
+ orderName: string;
17
+ /** key of tabPane of Page4 */
18
+ tabKey: "Contact" | "Identify";
19
+ /** Option of create new identity */
20
+ identity: {
21
+ unitId?: string;
22
+ fistName: string;
23
+ lastName: string;
24
+ middleName: string;
25
+ number: number | string;
26
+ email?: string;
27
+ phone?: string;
28
+ country: string;
29
+ expiryDate: moment.Moment | null;
30
+ type: string;
31
+ unitType?: "Person" | "Organization";
32
+ address: IAddress;
33
+ };
34
+ get fullName(): string;
35
+ }
36
+ export declare const LegalContext: import("react").Context<State>;
37
+ export declare const useLegalContext: () => State;
@@ -0,0 +1,71 @@
1
+ import { __decorate } from "tslib";
2
+ import { computed, observable } from "mobx";
3
+ import { createContext, useContext } from "react";
4
+ import { toJS } from "mobx";
5
+ export class State {
6
+ constructor() {
7
+ /** step of Add Legal Contact */
8
+ this.step = 1;
9
+ /** Search an existing contact or Create a new contact */
10
+ this.operate = "Search";
11
+ /** type of unit */
12
+ this.unitType = "People";
13
+ /** list of unit */
14
+ this.unitList = [];
15
+ /** order name by Western or Eastern */
16
+ this.orderName = "Western";
17
+ /** key of tabPane of Page4 */
18
+ this.tabKey = "Contact";
19
+ /** Option of create new identity */
20
+ this.identity = {
21
+ unitId: "",
22
+ fistName: "",
23
+ lastName: "",
24
+ middleName: "",
25
+ number: "",
26
+ country: "",
27
+ expiryDate: null,
28
+ type: "International Passport",
29
+ unitType: "Person",
30
+ address: { line1: "", line2: "", city: "", state: "", postalCode: "", country: "" }
31
+ };
32
+ }
33
+ get fullName() {
34
+ if (this.operate === "Search")
35
+ return this.unit ? this.unit.name : "";
36
+ const { fistName, lastName, middleName } = toJS(this.identity);
37
+ return this.orderName === "Western"
38
+ ? (fistName || "") + " " + (middleName || "") + " " + (lastName || "")
39
+ : (lastName || "") + " " + (fistName || "");
40
+ }
41
+ }
42
+ __decorate([
43
+ observable
44
+ ], State.prototype, "step", void 0);
45
+ __decorate([
46
+ observable
47
+ ], State.prototype, "operate", void 0);
48
+ __decorate([
49
+ observable
50
+ ], State.prototype, "unitType", void 0);
51
+ __decorate([
52
+ observable
53
+ ], State.prototype, "unitList", void 0);
54
+ __decorate([
55
+ observable
56
+ ], State.prototype, "unit", void 0);
57
+ __decorate([
58
+ observable
59
+ ], State.prototype, "orderName", void 0);
60
+ __decorate([
61
+ observable
62
+ ], State.prototype, "tabKey", void 0);
63
+ __decorate([
64
+ observable
65
+ ], State.prototype, "identity", void 0);
66
+ __decorate([
67
+ computed
68
+ ], State.prototype, "fullName", null);
69
+ export const LegalContext = createContext(null);
70
+ export const useLegalContext = () => useContext(LegalContext);
71
+ //# sourceMappingURL=state.js.map