@voplus/morpho-csp 11.2.9 → 11.3.0-dev.0

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 (210) hide show
  1. package/es/components/LegalContactSelect/index.d.ts +7 -0
  2. package/es/components/LegalContactSelect/index.js +127 -12
  3. package/es/components/LegalContactSelect/index.js.map +1 -1
  4. package/es/data/clda-form/conversion.d.ts +9 -6
  5. package/es/data/clda-form/conversion.js +11 -18
  6. package/es/data/clda-form/conversion.js.map +1 -1
  7. package/es/data/clda-form/identityAdapter.d.ts +60 -0
  8. package/es/data/clda-form/identityAdapter.js +196 -0
  9. package/es/data/clda-form/identityAdapter.js.map +1 -0
  10. package/es/data/clda-form/interfaces.d.ts +20 -1
  11. package/es/data/clda-form/saveFormDraft.d.ts +4 -0
  12. package/es/data/clda-form/saveFormDraft.js +21 -0
  13. package/es/data/clda-form/saveFormDraft.js.map +1 -0
  14. package/es/data/clda-form/types.d.ts +31 -2
  15. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.d.ts +35 -0
  16. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.js +53 -0
  17. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.js.map +1 -0
  18. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/index.js +41 -15
  19. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/index.js.map +1 -1
  20. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.d.ts +59 -1
  21. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.js +244 -15
  22. package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.js.map +1 -1
  23. package/es/modules/corporate/company/components/CorporateOfficerSelect/index.d.ts +5 -0
  24. package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js +13 -7
  25. package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js.map +1 -1
  26. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.d.ts +2 -2
  27. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.js +20 -24
  28. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.js.map +1 -1
  29. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.d.ts +2 -2
  30. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.js +38 -11
  31. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.js.map +1 -1
  32. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.d.ts +3 -3
  33. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.js.map +1 -1
  34. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.d.ts +25 -4
  35. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.js +88 -5
  36. package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.js.map +1 -1
  37. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.d.ts +13 -0
  38. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.js +20 -0
  39. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.js.map +1 -0
  40. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page1.js +28 -28
  41. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page1.js.map +1 -1
  42. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page2.js +3 -4
  43. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page2.js.map +1 -1
  44. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page3.js +16 -9
  45. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page3.js.map +1 -1
  46. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.d.ts +2 -2
  47. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.js +128 -61
  48. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.js.map +1 -1
  49. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.d.ts +2 -2
  50. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.js +119 -24
  51. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.js.map +1 -1
  52. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.d.ts +0 -1
  53. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.js +16 -8
  54. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.js.map +1 -1
  55. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.d.ts +274 -23
  56. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.js +560 -210
  57. package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.js.map +1 -1
  58. package/es/modules/corporate/components/CorporateSelect/index.d.ts +12 -1
  59. package/es/modules/corporate/components/CorporateSelect/index.js +19 -5
  60. package/es/modules/corporate/components/CorporateSelect/index.js.map +1 -1
  61. package/es/modules/corporate/legal-generation/components/AppointOfficer/index.d.ts +6 -1
  62. package/es/modules/corporate/legal-generation/components/AppointOfficer/index.js +3 -2
  63. package/es/modules/corporate/legal-generation/components/AppointOfficer/index.js.map +1 -1
  64. package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.d.ts +6 -1
  65. package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.js +3 -2
  66. package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.js.map +1 -1
  67. package/es/modules/corporate/legal-generation/components/IssueShares/Fields.js +3 -3
  68. package/es/modules/corporate/legal-generation/components/IssueShares/Fields.js.map +1 -1
  69. package/es/modules/corporate/legal-generation/components/IssueShares/interface.d.ts +1 -1
  70. package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.d.ts +16 -1
  71. package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.js +27 -9
  72. package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.js.map +1 -1
  73. package/es/modules/corporate/legal-generation/components/PowerOfAttroney/interface.d.ts +5 -2
  74. package/es/modules/corporate/legal-generation/components/ResignationLetter/Fields.js +1 -1
  75. package/es/modules/corporate/legal-generation/components/ResignationLetter/Fields.js.map +1 -1
  76. package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.d.ts +13 -1
  77. package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.js +24 -6
  78. package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.js.map +1 -1
  79. package/es/modules/corporate/legal-generation/components/ShareTransfer/interface.d.ts +5 -2
  80. package/es/modules/corporate/legal-generation/components/SubmitButton/index.d.ts +11 -3
  81. package/es/modules/corporate/legal-generation/components/SubmitButton/index.js +9 -3
  82. package/es/modules/corporate/legal-generation/components/SubmitButton/index.js.map +1 -1
  83. package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.d.ts +31 -2
  84. package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.js +52 -37
  85. package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.js.map +1 -1
  86. package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.d.ts +27 -2
  87. package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.js +78 -21
  88. package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.js.map +1 -1
  89. package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.d.ts +17 -0
  90. package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.js +36 -0
  91. package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.js.map +1 -0
  92. package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.d.ts +11 -0
  93. package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.js +25 -0
  94. package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.js.map +1 -0
  95. package/es/modules/corporate/legal-generation/fields/state/index.d.ts +7 -0
  96. package/es/modules/corporate/legal-generation/fields/state/index.js +5 -0
  97. package/es/modules/corporate/legal-generation/fields/state/index.js.map +1 -0
  98. package/es/modules/corporate/legal-generation/fields/state/types.d.ts +37 -0
  99. package/es/modules/corporate/legal-generation/fields/state/types.js +27 -0
  100. package/es/modules/corporate/legal-generation/fields/state/types.js.map +1 -0
  101. package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.d.ts +28 -0
  102. package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.js +45 -0
  103. package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.js.map +1 -0
  104. package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.d.ts +31 -0
  105. package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.js +47 -0
  106. package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.js.map +1 -0
  107. package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.d.ts +35 -0
  108. package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.js +36 -0
  109. package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.js.map +1 -0
  110. package/es/modules/corporate/legal-generation/fields/state/useOperateField.d.ts +15 -0
  111. package/es/modules/corporate/legal-generation/fields/state/useOperateField.js +27 -0
  112. package/es/modules/corporate/legal-generation/fields/state/useOperateField.js.map +1 -0
  113. package/es/modules/corporate/legal-generation/form/AppointOfficerForm.d.ts +18 -9
  114. package/es/modules/corporate/legal-generation/form/AppointOfficerForm.js +130 -28
  115. package/es/modules/corporate/legal-generation/form/AppointOfficerForm.js.map +1 -1
  116. package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.d.ts +27 -17
  117. package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.js +112 -24
  118. package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.js.map +1 -1
  119. package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.d.ts +637 -0
  120. package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.js +840 -0
  121. package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.js.map +1 -0
  122. package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.d.ts +23 -0
  123. package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.js +55 -0
  124. package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.js.map +1 -0
  125. package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.js +38 -8
  126. package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.js.map +1 -1
  127. package/es/modules/self-registration/clda-form/components/CLDAContactList/index.js +50 -33
  128. package/es/modules/self-registration/clda-form/components/CLDAContactList/index.js.map +1 -1
  129. package/es/modules/self-registration/clda-form/components/ContactFields/index.d.ts +5 -2
  130. package/es/modules/self-registration/clda-form/components/ContactFields/index.js +6 -3
  131. package/es/modules/self-registration/clda-form/components/ContactFields/index.js.map +1 -1
  132. package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.d.ts +1 -2
  133. package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.js +7 -18
  134. package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.js.map +1 -1
  135. package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.d.ts +1 -2
  136. package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js +7 -18
  137. package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js.map +1 -1
  138. package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.d.ts +1 -2
  139. package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js +7 -18
  140. package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js.map +1 -1
  141. package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.d.ts +1 -2
  142. package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js +7 -18
  143. package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js.map +1 -1
  144. package/es/modules/self-registration/clda-form/components/useContactEditSession.d.ts +35 -0
  145. package/es/modules/self-registration/clda-form/components/useContactEditSession.js +51 -0
  146. package/es/modules/self-registration/clda-form/components/useContactEditSession.js.map +1 -0
  147. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.d.ts +2 -3
  148. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js +60 -12
  149. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js.map +1 -1
  150. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.d.ts +1 -2
  151. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js +3 -5
  152. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js.map +1 -1
  153. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js +7 -21
  154. package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js.map +1 -1
  155. package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js +6 -5
  156. package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js.map +1 -1
  157. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.d.ts +1 -2
  158. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js +23 -28
  159. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js.map +1 -1
  160. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.d.ts +1 -2
  161. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js +11 -24
  162. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js.map +1 -1
  163. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.d.ts +1 -2
  164. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js +13 -8
  165. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js.map +1 -1
  166. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.d.ts +1 -2
  167. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js +11 -24
  168. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js.map +1 -1
  169. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.d.ts +1 -2
  170. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.js +18 -9
  171. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.js.map +1 -1
  172. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.d.ts +1 -2
  173. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js +11 -24
  174. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js.map +1 -1
  175. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.d.ts +1 -2
  176. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js +23 -28
  177. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js.map +1 -1
  178. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.d.ts +2 -3
  179. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js +81 -14
  180. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js.map +1 -1
  181. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.d.ts +1 -2
  182. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js +11 -15
  183. package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js.map +1 -1
  184. package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.d.ts +2 -3
  185. package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js +34 -5
  186. package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js.map +1 -1
  187. package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.d.ts +1 -2
  188. package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js +4 -5
  189. package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js.map +1 -1
  190. package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.d.ts +1 -2
  191. package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js +5 -4
  192. package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js.map +1 -1
  193. package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.d.ts +1 -2
  194. package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js +32 -12
  195. package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js.map +1 -1
  196. package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.d.ts +2 -3
  197. package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js +80 -13
  198. package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js.map +1 -1
  199. package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.d.ts +1 -2
  200. package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js +7 -9
  201. package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js.map +1 -1
  202. package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.d.ts +3 -0
  203. package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js +4 -2
  204. package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js.map +1 -1
  205. package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/Content.js +16 -1
  206. package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/Content.js.map +1 -1
  207. package/es/routes.d.ts +1 -1
  208. package/es/routes.js +4 -2
  209. package/es/routes.js.map +1 -1
  210. package/package.json +4 -4
@@ -1,48 +1,65 @@
1
+ import { SUPPORTED_OFFICER_POSITIONS } from "../form/legalGenerationSubmit";
1
2
  import { Col, Form, Input, Radio, Row, Select } from "antd";
2
3
  import React, { useState } from "react";
3
4
  import Address from "@voplus/morpho-ui/es/controls/Address";
4
5
  import CorporateOfficerSelect from "../../company/components/CorporateOfficerSelect";
5
6
  import CorporateSelect from "../../components/CorporateSelect";
6
7
  import { InputCountry, UTCDatePicker as DatePicker } from "@voplus/morpho-ui";
7
- // spec:1929 — CSP: Forms that name a person offer 'select existing' vs 'enter manually' radio modes
8
- const AppointOfficerFields = () => {
9
- const [operate, setOperate] = useState("Search");
8
+ import IdentityShapeSelect from "@voplus/morpho-compliance/es/components/IdentityShapeSelect";
9
+ import { renderCapturedIdentityColumn } from "./renderCapturedIdentityColumn";
10
+ import { useOperateField } from "./state";
11
+ import { useLegalGenerationIdentityCapture } from "./state/useLegalGenerationIdentityCapture";
12
+ /**
13
+ * A complete blank address: the `Address` control reads its value eagerly, and a story's
14
+ * `<Form initialValues>` seeds the same record so an untouched form does not inject `undefined`.
15
+ */
16
+ export const EMPTY_ADDRESS = {
17
+ line1: "",
18
+ line2: "",
19
+ city: "",
20
+ state: "",
21
+ postalCode: "",
22
+ country: "",
23
+ };
24
+ // spec:1929 — CSP: 需要指定人员的表单提供“选择已有”与“手动录入”两种单选模式
25
+ /** Render the selected or manual appointment fields with their captured identity policies. */
26
+ const AppointOfficerFields = (props) => {
27
+ const { identity, draft, identityFieldErrors, mode: initialMode = "Search", subject = "Person", } = props;
28
+ const company = Form.useWatch("Company");
29
+ const country = Form.useWatch("Country");
30
+ const [mode, setMode] = useState(initialMode);
31
+ // The submitting form composes its branch from `Operate`, so the mode this block renders under is
32
+ // mirrored onto the form value the way the capture is — `onFinish` collects registered fields
33
+ // only (spec:1929, spec:1930).
34
+ useOperateField(mode);
35
+ const { shape, capture, capturedFields, aliasVisible, documentFields } = useLegalGenerationIdentityCapture({ identity, draft, identityFieldErrors });
10
36
  return (React.createElement(React.Fragment, null,
11
37
  React.createElement("h3", null, "Document Details"),
12
- React.createElement(Form.Item, { label: "Company", name: "Company" },
13
- React.createElement(CorporateSelect, null)),
38
+ React.createElement(Form.Item, { label: "Company", name: "Company", rules: [{ required: true, message: "Please select a company" }] },
39
+ React.createElement(CorporateSelect, { disabled: props.companyDisabled })),
14
40
  React.createElement(Form.Item, { label: "Document Date", name: "DocumentDate" },
15
41
  React.createElement(DatePicker, { format: "YYYY/MM/DD" })),
16
42
  React.createElement(Form.Item, { label: "Effective Date", name: "EffectiveDate" },
17
43
  React.createElement(DatePicker, { format: "YYYY/MM/DD" })),
18
44
  React.createElement("h3", null, "New Officer Details"),
19
- React.createElement(Form.Item, { name: "Operate", style: { marginBottom: "10px" } },
20
- React.createElement(Radio.Group, { value: operate, onChange: (e) => setOperate(e.target.value) },
45
+ React.createElement(Form.Item, { style: { marginBottom: "10px" } },
46
+ React.createElement(Radio.Group, { value: mode, onChange: (e) => setMode(e.target.value) },
21
47
  React.createElement(Radio, { value: "Search" }, "Select an existing officer"),
22
48
  React.createElement(Radio, { value: "Create" }, "Enter new officer details manually"))),
23
- operate === "Search" ? (React.createElement(Form.Item, { name: "Officer" },
24
- React.createElement(CorporateOfficerSelect, { corporateId: "" }))) : (React.createElement(React.Fragment, null,
49
+ mode === "Search" ? (React.createElement(Form.Item, { name: "Officer" },
50
+ React.createElement(CorporateOfficerSelect, { corporateId: company?.id ?? company?.Id ?? "" }))) : (React.createElement(React.Fragment, null,
25
51
  React.createElement(Form.Item, { label: "Officer Type", name: "OfficerType" },
26
- React.createElement(Select, { options: [
27
- "Director",
28
- "Managing Director",
29
- "Nominee Director",
30
- "Secretary",
31
- "CEO",
32
- "Partner",
33
- "Owner",
34
- "Auditor",
35
- "Manager",
36
- ].map((type) => {
52
+ React.createElement(Select, { options: SUPPORTED_OFFICER_POSITIONS.map((type) => {
37
53
  return { value: type, label: type };
38
54
  }) })),
39
55
  React.createElement(Row, { gutter: 16 },
40
- React.createElement(Col, { span: 12 },
56
+ React.createElement(Col, { span: aliasVisible ? 8 : 12 },
41
57
  React.createElement(Form.Item, { label: "FullName", name: "FullName" },
42
58
  React.createElement(Input, null))),
43
- React.createElement(Col, { span: 12 },
59
+ renderCapturedIdentityColumn("alias", 8, capturedFields),
60
+ React.createElement(Col, { span: aliasVisible ? 8 : 12 },
44
61
  React.createElement(Form.Item, { label: "Nationality", name: "Country" },
45
- React.createElement(InputCountry, null)))),
62
+ React.createElement(InputCountry, { defaultValue: country })))),
46
63
  React.createElement(Row, { gutter: 16 },
47
64
  React.createElement(Col, { span: 12 },
48
65
  React.createElement(Form.Item, { label: "Email", name: "Email" },
@@ -52,24 +69,22 @@ const AppointOfficerFields = () => {
52
69
  React.createElement(Input, null)))),
53
70
  React.createElement(Row, { gutter: 16 },
54
71
  React.createElement(Col, { span: 12 },
55
- React.createElement(Form.Item, { label: "Identity Type", name: "IdentityType" },
56
- React.createElement(Select, { options: [
57
- { value: "Passport", label: "International Passport" },
58
- { value: "IdentityCard", label: "Identify Card" },
59
- { value: "BusinessRegistration", label: "Business Registration" },
60
- ] }))),
72
+ React.createElement(Form.Item, { label: "Identity Type", required: true },
73
+ React.createElement(IdentityShapeSelect, { subject: subject,
74
+ // The capture restored from a saved document — or the draft the block
75
+ // opened on — is what the picker shows until the user picks again.
76
+ value: shape?.source,
77
+ // spec:3712 — a capture whose shape left the catalog still shows its
78
+ // frozen name instead of silently blanking.
79
+ capturedShapeName: shape?.name, onChange: (next) => capture(next) }))),
61
80
  React.createElement(Col, { span: 12 },
62
81
  React.createElement(Form.Item, { label: "Identity #", name: "IdentityNumber" },
63
82
  React.createElement(Input, null)))),
83
+ documentFields.length > 0 && (React.createElement(Row, { gutter: 16 },
84
+ renderCapturedIdentityColumn("issuingCountry", documentFields.length > 1 ? 12 : 24, capturedFields),
85
+ renderCapturedIdentityColumn("expiryDate", documentFields.length > 1 ? 12 : 24, capturedFields))),
64
86
  React.createElement(Form.Item, { name: "Address", noStyle: true },
65
- React.createElement(Address, { value: {
66
- line1: "",
67
- line2: "",
68
- city: "",
69
- state: "",
70
- postalCode: "",
71
- country: "",
72
- } }))))));
87
+ React.createElement(Address, { value: EMPTY_ADDRESS }))))));
73
88
  };
74
89
  export default AppointOfficerFields;
75
90
  //# sourceMappingURL=AppointOfficerFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppointOfficerFields.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/legal-generation/fields/AppointOfficerFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE9E,oGAAoG;AACpG,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACjC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjD,OAAO,CACN,oBAAC,KAAK,CAAC,QAAQ;QACd,mDAAyB;QACzB,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS;YACxC,oBAAC,eAAe,OAAG,CACR;QACZ,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,cAAc;YACnD,o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AK,OAAG,CACE,CACP,CACD;YACN,oBAAC,IAAI,CAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,OAAO;gBAChC,oBAAC,OAAO,IACP,KAAK,EAAE;wBACN,KAAK,EAAE,EAAE;wBACT,KAAK,EAAE,EAAE;wBACT,IAAI,EAAE,EAAE;wBACR,KAAK,EAAE,EAAE;wBACT,UAAU,EAAE,EAAE;wBACd,OAAO,EAAE,EAAE;qBACX,GACA,CACS,CACI,CACjB,CACe,CACjB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"AppointOfficerFields.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/legal-generation/fields/AppointOfficerFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,mBAAmB,MAAM,6DAA6D,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAK9E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAE9F;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;I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,OAAG,CACE,CACP,CACD;YAQL,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,GAAG,IAAC,MAAM,EAAE,EAAE;gBACb,4BAA4B,CAC5B,gBAAgB,EAChB,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACnC,cAAc,CACd;gBACA,4BAA4B,CAC5B,YAAY,EACZ,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACnC,cAAc,CACd,CACI,CACN;YACD,oBAAC,IAAI,CAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,OAAO;gBAGhC,oBAAC,OAAO,IAAC,KAAK,EAAE,aAAa,GAAI,CACtB,CACI,CACjB,CACe,CACjB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,3 +1,28 @@
1
- import React from "react";
2
- declare const CorporateRepresentativeFields: () => React.JSX.Element;
1
+ import type { ILegalGenerationParentDetails } from "../form/legalGenerationSubmit";
2
+ import type { CapturedShapeFieldValues } from "@voplus/morpho-compliance/es/components/CapturedShapeFields";
3
+ import type { IIdentityCapture } from "./state";
4
+ /** 代表身份与独立母公司文书资料的字段参数。 */
5
+ export interface CorporateRepresentativeFieldsProps {
6
+ /** 已保存母公司副本作为显示基线,不自动提交其全部字段。 */
7
+ parentCompanyBaseline?: {
8
+ parentId: string;
9
+ details: ILegalGenerationParentDetails;
10
+ };
11
+ /** The representative's identity already captured on the document, when re-opening a saved one. */
12
+ identity?: IIdentityCapture;
13
+ /** A reopened document stays with its original company. */
14
+ companyDisabled?: boolean;
15
+ /** An identity-shaped draft awaiting capture, e.g. a wizard step that pre-picks the type. */
16
+ draft?: IIdentityCapture;
17
+ /** Per-field validation messages for the captured identity values. */
18
+ identityFieldErrors?: Partial<Record<keyof CapturedShapeFieldValues, string>>;
19
+ /** Which mode the block opens in; `Create` is the manual-entry branch a capture reopens on.
20
+ * Seeds the radio only — after mount the radio owns the mode and the block reports the branch
21
+ * it renders. */
22
+ mode?: "Search" | "Create";
23
+ /** The subject whose identity types the picker offers (spec:3712). */
24
+ subject?: "Person" | "Organization";
25
+ }
26
+ /** Render the representative capture and independent company/parent fields for the current branch. */
27
+ declare const CorporateRepresentativeFields: (props: CorporateRepresentativeFieldsProps) => JSX.Element;
3
28
  export default CorporateRepresentativeFields;
@@ -1,37 +1,94 @@
1
- import { Checkbox, Form, Input, Radio, Select } from "antd";
2
- import React, { useState } from "react";
1
+ import { ParentCompanyDetailsFields } from "./ParentCompanyDetailsFields";
2
+ import { Checkbox, Col, Form, Input, Radio, Row } from "antd";
3
+ import React, { useEffect, useRef, useState } from "react";
3
4
  import CorporateSelect from "../../components/CorporateSelect";
4
5
  import { InputCountry, UTCDatePicker as DatePicker } from "@voplus/morpho-ui";
5
6
  import LegalContactSelect from "../../../../components/LegalContactSelect";
6
- const CorporateRepresentativeFields = () => {
7
- const [operate, setOperate] = useState("Search");
7
+ import IdentityShapeSelect from "@voplus/morpho-compliance/es/components/IdentityShapeSelect";
8
+ import { renderCapturedIdentityColumn } from "./renderCapturedIdentityColumn";
9
+ import { useOperateField } from "./state";
10
+ import { useLegalGenerationIdentityCapture } from "./state/useLegalGenerationIdentityCapture";
11
+ // spec:1929 — CSP: 需要指定人员的表单提供“选择已有”与“手动录入”两种单选模式
12
+ /** Render the representative capture and independent company/parent fields for the current branch. */
13
+ const CorporateRepresentativeFields = (props) => {
14
+ const { identity, draft, identityFieldErrors, mode: initialMode = "Search", subject = "Person", } = props;
15
+ const form = Form.useFormInstance();
16
+ const company = Form.useWatch("Company", form);
17
+ const companyId = company?.id ?? company?.Id;
18
+ const watchedParent = Form.useWatch("ParentCompany", form);
19
+ const parent = watchedParent ?? form.getFieldValue("ParentCompany");
20
+ const parentId = parent?.id ?? parent?.Id;
21
+ // Form.useWatch hydrates after mount; seed from the form to preserve restored same-company picks.
22
+ const previousCompanyId = useRef(form.getFieldValue("Company")?.id ?? form.getFieldValue("Company")?.Id);
23
+ useEffect(() => {
24
+ const current = form.getFieldValue("Company");
25
+ const currentCompanyId = current?.id ?? current?.Id;
26
+ if (previousCompanyId.current !== currentCompanyId) {
27
+ form.setFieldValue("LegalContact", undefined);
28
+ previousCompanyId.current = currentCompanyId;
29
+ }
30
+ }, [companyId, form]);
31
+ const parentCountry = Form.useWatch("Country", form);
32
+ const representativeCountry = Form.useWatch("RepresentativeCountry", form);
33
+ const [operate, setOperate] = useState(initialMode);
34
+ // The submitting form composes its branch from `Operate`, so the mode this block renders under is
35
+ // mirrored onto the form value the way the capture is — `onFinish` collects registered fields
36
+ // only (spec:1929, spec:1930).
37
+ useOperateField(operate);
38
+ const { shape, capture, capturedFields, aliasVisible, documentFields } = useLegalGenerationIdentityCapture({ identity, draft, identityFieldErrors });
8
39
  return (React.createElement(React.Fragment, null,
9
40
  React.createElement("h3", null, "Document Details"),
10
- React.createElement(Form.Item, { label: "Singapore Company", name: "Company" },
41
+ React.createElement(Form.Item, { label: "Singapore Company", name: "Company", rules: [{ required: true, message: "Please select the Singapore company" }] },
42
+ React.createElement(CorporateSelect, { disabled: props.companyDisabled })),
43
+ React.createElement(Form.Item, { label: "Parent Company", name: "ParentCompany", rules: [
44
+ {
45
+ validator: (_, value) => value?.id ?? value?.Id
46
+ ? Promise.resolve()
47
+ : Promise.reject(new Error("Please select the parent company")),
48
+ },
49
+ ] },
11
50
  React.createElement(CorporateSelect, null)),
12
- React.createElement(Form.Item, { label: "Parent Company", name: "ParentCompany" },
13
- React.createElement(CorporateSelect, null)),
14
- React.createElement(Form.Item, { label: "Parent Company Country", name: "Country" },
15
- React.createElement(InputCountry, null)),
51
+ React.createElement(Form.Item, { label: "Parent Company Country", name: "Country", rules: [
52
+ { required: true, whitespace: true, message: "Please select the parent company country" },
53
+ ] },
54
+ React.createElement(InputCountry, { defaultValue: parentCountry })),
55
+ React.createElement(Form.Item, { name: "ParentCompanyDetails", noStyle: true },
56
+ React.createElement(ParentCompanyDetailsFields, { parentId: parentId, baseline: props.parentCompanyBaseline })),
16
57
  React.createElement(Form.Item, { label: "Document Date", name: "Date" },
17
58
  React.createElement(DatePicker, { format: "YYYY/MM/DD" })),
18
59
  React.createElement(Form.Item, null,
19
- React.createElement(Checkbox, null, "Replace Existing Representative(s)")),
60
+ React.createElement(Checkbox, { disabled: props.companyDisabled }, "Replace Existing Representative(s)")),
20
61
  React.createElement("h3", null, "Representative Detail"),
21
- React.createElement(Form.Item, { name: "Operate", style: { marginBottom: "10px" } },
62
+ React.createElement(Form.Item, { style: { marginBottom: "10px" } },
22
63
  React.createElement(Radio.Group, { value: operate, onChange: (e) => setOperate(e.target.value) },
23
64
  React.createElement(Radio, { value: "Search" }, "Select an contact"),
24
65
  React.createElement(Radio, { value: "Create" }, "Enter new representative detail manually"))),
25
- operate === "Search" ? (React.createElement(Form.Item, { label: "Select a contact", name: "Identity" },
26
- React.createElement(LegalContactSelect, null))) : (React.createElement(React.Fragment, null,
27
- React.createElement(Form.Item, { label: "Name", name: "IdentityName" },
28
- React.createElement(Input, null)),
29
- React.createElement(Form.Item, { label: "Identity Type", name: "IdentityType" },
30
- React.createElement(Select, { options: [
31
- { value: "Passport", label: "International Passport" },
32
- { value: "IdentityCard", label: "Identify Card" },
33
- { value: "BusinessRegistration", label: "Business Registration" },
34
- ] })),
66
+ operate === "Search" ? (React.createElement(Form.Item, { label: "Select a contact", name: "LegalContact" },
67
+ React.createElement(LegalContactSelect, { companyId: company?.id ?? company?.Id }))) : (React.createElement(React.Fragment, null,
68
+ React.createElement(Row, { gutter: 16 },
69
+ React.createElement(Col, { span: aliasVisible ? 12 : 24 },
70
+ React.createElement(Form.Item, { label: "Name", name: "IdentityName" },
71
+ React.createElement(Input, null))),
72
+ renderCapturedIdentityColumn("alias", 12, capturedFields)),
73
+ React.createElement(Form.Item, { label: "Identity Type", required: true },
74
+ React.createElement(IdentityShapeSelect, { subject: subject,
75
+ // The capture restored from a saved document — or the draft the block
76
+ // opened on — is what the picker shows until the user picks again.
77
+ value: shape?.source,
78
+ // spec:3712 — a capture whose shape left the catalog still shows its frozen
79
+ // name instead of silently blanking.
80
+ capturedShapeName: shape?.name, onChange: (next) => capture(next) })),
81
+ documentFields.length > 0 && (React.createElement(Row, { gutter: 16 },
82
+ renderCapturedIdentityColumn("issuingCountry", documentFields.length > 1 ? 12 : 24, capturedFields),
83
+ renderCapturedIdentityColumn("expiryDate", documentFields.length > 1 ? 12 : 24, capturedFields))),
84
+ React.createElement(Form.Item, { label: "Representative Country", name: "RepresentativeCountry", rules: [
85
+ {
86
+ required: true,
87
+ whitespace: true,
88
+ message: "Please select the representative country",
89
+ },
90
+ ] },
91
+ React.createElement(InputCountry, { defaultValue: representativeCountry })),
35
92
  React.createElement(Form.Item, { label: "Identity #", name: "IdentityNumber" },
36
93
  React.createElement(Input, null))))));
37
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CorporateRepresentativeFields.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAE3E,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAC1C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEjD,OAAO,CACN,oBAAC,KAAK,CAAC,QAAQ;QACd,mDAAyB;QAEzB,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAA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AAI,IAAC,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,cAAc;gBACnD,oBAAC,MAAM,IACN,OAAO,EAAE;wBACR,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,wBAAwB,EAAE;wBACtD,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE;wBACjD,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,uBAAuB,EAAE;qBACjE,GACA,CACS;YACZ,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,gBAAgB;gBAClD,oBAAC,KAAK,OAAG,CACE,CACI,CACjB,CACe,CACjB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
1
+ {"version":3,"file":"CorporateRepresentativeFields.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAC3E,OAAO,mBAAmB,MAAM,6DAA6D,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAK9E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAsB9F,kDAAkD;AAClD,sGAA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,CAC1C;YACZ,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,gBAAgB;gBAClD,oBAAC,KAAK,OAAG,CACE,CACI,CACjB,CACe,CACjB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ILegalGenerationParentDetails } from "../form/legalGenerationSubmit";
2
+ /** 文书母公司显示值的受控编辑区,默认值与用户补丁分别保存。 */
3
+ export interface ParentCompanyDetailsFieldsProps {
4
+ /** 当前母公司引用,用来隔离不同公司的局部覆盖值。 */
5
+ parentId?: string;
6
+ /** 服务端已保存副本,只能用于相同母公司的显示默认值。 */
7
+ baseline?: {
8
+ parentId: string;
9
+ details: ILegalGenerationParentDetails;
10
+ };
11
+ /** 已编辑字段;undefined 表示全部沿用保存值或首次采集值。 */
12
+ value?: ILegalGenerationParentDetails;
13
+ /** 将用户明确修改的字段提交给所属表单。 */
14
+ onChange?: (patch: ILegalGenerationParentDetails | undefined) => void;
15
+ }
16
+ /** 保留空串清空和 untouched 省略语义,不读取或修改公司主档。 */
17
+ export declare const ParentCompanyDetailsFields: ({ parentId, baseline, value, onChange, }: ParentCompanyDetailsFieldsProps) => JSX.Element;
@@ -0,0 +1,36 @@
1
+ import React, { useEffect, useRef } from "react";
2
+ import { Form, Input } from "antd";
3
+ /** 五项文书显示字段不增加邮箱、号码或完整性限制。 */
4
+ const FIELDS = [
5
+ ["name", "Parent company name"],
6
+ ["number", "Parent registration / identity number"],
7
+ ["address", "Parent address"],
8
+ ["email", "Parent email"],
9
+ ["phone", "Parent phone"],
10
+ ];
11
+ /** 保留空串清空和 untouched 省略语义,不读取或修改公司主档。 */
12
+ export const ParentCompanyDetailsFields = ({ parentId, baseline, value, onChange, }) => {
13
+ const previousParent = useRef(parentId);
14
+ const changedParent = previousParent.current !== parentId;
15
+ useEffect(() => {
16
+ if (previousParent.current !== parentId) {
17
+ previousParent.current = parentId;
18
+ onChange?.(undefined);
19
+ }
20
+ }, [parentId, onChange]);
21
+ const patch = changedParent ? undefined : value;
22
+ const defaults = baseline && baseline.parentId === parentId ? baseline.details : undefined;
23
+ return (React.createElement("section", { "aria-label": "Parent company details for this document" },
24
+ React.createElement("h3", null, "Parent company details for this document"),
25
+ React.createElement("p", null, "Changes apply only to this document."),
26
+ React.createElement("p", null, "Clearing an edited field leaves it blank in this document."),
27
+ FIELDS.map(([key, label]) => (React.createElement(Form.Item, { key: key, label: label },
28
+ React.createElement(Input, { "aria-label": label,
29
+ // 未选母公司时强制禁用;已选择时继承所属 Form 的保存中状态。
30
+ disabled: !parentId || undefined, value: patch?.[key] ?? defaults?.[key] ?? "", placeholder: patch?.[key] === ""
31
+ ? "Blank in this document"
32
+ : defaults
33
+ ? undefined
34
+ : "Use company details unless edited", onChange: (event) => onChange?.({ ...patch, [key]: event.target.value }) }))))));
35
+ };
36
+ //# sourceMappingURL=ParentCompanyDetailsFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParentCompanyDetailsFields.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAenC,8BAA8B;AAC9B,MAAM,MAAM,GAA0E;IACrF,CAAC,MAAM,EAAE,qBAAqB,CAAC;IAC/B,CAAC,QAAQ,EAAE,uCAAuC,CAAC;IACnD,CAAC,SAAS,EAAE,gBAAgB,CAAC;IAC7B,CAAC,OAAO,EAAE,cAAc,CAAC;IACzB,CAAC,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAC1C,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,GACyB,EAAe,EAA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AAE,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAC7E,CACS,CACZ,CAAC,CACO,CACV,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { CapturedShapeFieldsProps, CapturedShapeFieldValues } from "@voplus/morpho-compliance/es/components/CapturedShapeFields";
2
+ /**
3
+ * Render one captured field within the caller's form/grid and current reactive render.
4
+ * Keeping the policy/value/error reads here preserves observer tracking without a child boundary;
5
+ * Compliance retains control selection and shape-source remount keys.
6
+ * @param field - Captured value and policy key to render.
7
+ * @param span - Column width chosen by the caller's existing row grouping.
8
+ * @param props - Current captured snapshot, values, errors and edit callback.
9
+ * @returns The labelled column, or null when the captured policy omits the field.
10
+ */
11
+ export declare function renderCapturedIdentityColumn(field: keyof CapturedShapeFieldValues, span: number, { shape, values, onChange, fieldErrors }: CapturedShapeFieldsProps): JSX.Element | null;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { Col, Form } from "antd";
3
+ import { FIELD_LABELS, renderCapturedFieldControl, } from "@voplus/morpho-compliance/es/components/CapturedShapeFields";
4
+ /**
5
+ * Render one captured field within the caller's form/grid and current reactive render.
6
+ * Keeping the policy/value/error reads here preserves observer tracking without a child boundary;
7
+ * Compliance retains control selection and shape-source remount keys.
8
+ * @param field - Captured value and policy key to render.
9
+ * @param span - Column width chosen by the caller's existing row grouping.
10
+ * @param props - Current captured snapshot, values, errors and edit callback.
11
+ * @returns The labelled column, or null when the captured policy omits the field.
12
+ */
13
+ // spec:1929 — CSP: 需要指定人员的表单提供“选择已有”与“手动录入”两种单选模式
14
+ // spec:1930 — CSP: 使用“Select existing”模式时,表单发送所选实体的 id;手动模式发送用户键入的字段
15
+ // spec:3848 — CSP: CSP form identities retain their selected shape snapshot
16
+ // spec:3851 — CSP: Legal contact creation creates an owner and identity from a selected shape
17
+ export function renderCapturedIdentityColumn(field, span, { shape, values, onChange, fieldErrors }) {
18
+ const policy = shape?.policies[field] ?? "omitted";
19
+ if (policy === "omitted")
20
+ return null;
21
+ const error = fieldErrors?.[field];
22
+ return (React.createElement(Col, { span: span, key: field },
23
+ React.createElement(Form.Item, { label: FIELD_LABELS[field], required: policy === "mandatory", validateStatus: error ? "error" : undefined, help: error }, renderCapturedFieldControl(field, values[field], (value) => onChange(field, value), shape?.source))));
24
+ }
25
+ //# sourceMappingURL=renderCapturedIdentityColumn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderCapturedIdentityColumn.js","sourceRoot":"","sources":["../../../../../src/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EACN,YAAY,EACZ,0BAA0B,GAC1B,MAAM,6DAA6D,CAAC;AAMrE;;;;;;;;GAQG;AACH,kDAAkD;AAClD,qEAAqE;AACrE,4EAA4E;AAC5E,8FAA8F;AAC9F,MAAM,UAAU,4BAA4B,CAC3C,KAAqC,EACrC,IAAY,EACZ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAA4B;IAElE,MAAM,MAAM,GAAG,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;IACnD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC;IAEnC,OAAO,CACN,oBAAC,GAAG,IAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK;QAC1B,oBAAC,IAAI,CAAC,IAAI,IACT,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,EAC1B,QAAQ,EAAE,MAAM,KAAK,WAAW,EAChC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAC3C,IAAI,EAAE,KAAK,IAEV,0BAA0B,CAC1B,KAAK,EACL,MAAM,CAAC,KAAK,CAAC,EACb,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,EACjC,KAAK,EAAE,MAAM,CACb,CACU,CACP,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type { IIdentityShapeSnapshot } from "./types";
2
+ export type { IIdentityCapture } from "./types";
3
+ export { freezeIdentityShape } from "./types";
4
+ export { IDENTITY_FIELD_NAME, IDENTITY_SHAPE_FIELD_NAME, useCapturedIdentityField, } from "./useCapturedIdentityField";
5
+ export { OPERATE_FIELD_NAME, useOperateField } from "./useOperateField";
6
+ export { useIdentityShapeCapture } from "./useIdentityShapeCapture";
7
+ export type { IdentityShapeCapture } from "./useIdentityShapeCapture";
@@ -0,0 +1,5 @@
1
+ export { freezeIdentityShape } from "./types";
2
+ export { IDENTITY_FIELD_NAME, IDENTITY_SHAPE_FIELD_NAME, useCapturedIdentityField, } from "./useCapturedIdentityField";
3
+ export { OPERATE_FIELD_NAME, useOperateField } from "./useOperateField";
4
+ export { useIdentityShapeCapture } from "./useIdentityShapeCapture";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/legal-generation/fields/state/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EACN,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { CapturedShapeFieldValues } from "@voplus/morpho-compliance/es/components/CapturedShapeFields";
2
+ import type { IIdentityShape } from "@voplus/morpho-compliance/es/data/identityShape";
3
+ /**
4
+ * The frozen shape snapshot a manual-entry block captures onto the identity: the shape's
5
+ * `source`, `name`, `family`, `subject` and per-field `policies`, frozen at capture time.
6
+ *
7
+ * It deliberately keeps the whole shape rather than an id: the block must keep rendering the
8
+ * captured `name` and field policies after the shape is edited or deleted from the catalog
9
+ * (spec:3712), which an id lookup against the live catalog cannot do.
10
+ */
11
+ export type IIdentityShapeSnapshot = IIdentityShape;
12
+ /**
13
+ * Freezes a catalog shape into the snapshot a manual-entry block captures onto the form: a copy of
14
+ * exactly the members a snapshot carries, so a later catalog edit that mutates the catalog's own
15
+ * entry in place can never change what a saved form holds, renders or submits (spec:3848).
16
+ *
17
+ * `revision` is the live catalog's optimistic-concurrency token (spec:3718) and has no meaning on
18
+ * a frozen capture, so the copy deliberately leaves it out.
19
+ *
20
+ * @param shape the catalog shape the user picked.
21
+ * @returns the frozen snapshot of that shape.
22
+ */
23
+ export declare function freezeIdentityShape(shape: IIdentityShape): IIdentityShapeSnapshot;
24
+ /**
25
+ * The complete identity snapshot a manual-entry block captures onto the document: the whole
26
+ * shape — `source`, `name`, `family`, `subject` and per-field `policies` — frozen alongside the
27
+ * values captured under those policies.
28
+ *
29
+ * This is the unit of persistence: saving, reopening and submitting carry this exact record, so
30
+ * the shape is never re-resolved against the shared catalog (spec:3848).
31
+ */
32
+ export interface IIdentityCapture {
33
+ /** The shape as captured; never re-read from the catalog. */
34
+ shape: IIdentityShapeSnapshot;
35
+ /** The identity values captured under `shape`'s policies. */
36
+ values: CapturedShapeFieldValues;
37
+ }
@@ -0,0 +1,27 @@
1
+ // spec:3848 — CSP form identities retain their selected shape snapshot
2
+ /**
3
+ * Freezes a catalog shape into the snapshot a manual-entry block captures onto the form: a copy of
4
+ * exactly the members a snapshot carries, so a later catalog edit that mutates the catalog's own
5
+ * entry in place can never change what a saved form holds, renders or submits (spec:3848).
6
+ *
7
+ * `revision` is the live catalog's optimistic-concurrency token (spec:3718) and has no meaning on
8
+ * a frozen capture, so the copy deliberately leaves it out.
9
+ *
10
+ * @param shape the catalog shape the user picked.
11
+ * @returns the frozen snapshot of that shape.
12
+ */
13
+ export function freezeIdentityShape(shape) {
14
+ return {
15
+ source: shape.source,
16
+ name: shape.name,
17
+ family: shape.family,
18
+ subject: shape.subject,
19
+ builtIn: shape.builtIn,
20
+ policies: {
21
+ alias: shape.policies.alias,
22
+ issuingCountry: shape.policies.issuingCountry,
23
+ expiryDate: shape.policies.expiryDate,
24
+ },
25
+ };
26
+ }
27
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/legal-generation/fields/state/types.ts"],"names":[],"mappings":"AAaA,uEAAuE;AACvE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAqB;IACxD,OAAO;QACN,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE;YACT,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK;YAC3B,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,cAAc;YAC7C,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU;SACrC;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { IIdentityCapture } from "./types";
2
+ /** The parent form field each manual-entry block registers its captured identity under. */
3
+ export declare const IDENTITY_FIELD_NAME = "Identity";
4
+ /**
5
+ * The parent form field carrying the captured shape's `source` number. The blocks' shape pickers
6
+ * read this scalar — not the whole snapshot — so a reopened document's picker shows what was
7
+ * captured while the complete shape stays on {@link IDENTITY_FIELD_NAME} (spec:1929).
8
+ */
9
+ export declare const IDENTITY_SHAPE_FIELD_NAME = "IdentityShape";
10
+ /**
11
+ * Mirrors a manual-entry block's captured identity onto the parent form's value, so the complete
12
+ * snapshot — `source`, `name`, `family`, `subject` and `policies` — reaches the document payload
13
+ * alongside the values captured under those policies, exactly as a capture restored from a saved
14
+ * document does. Going back to editing the identity type clears the field again.
15
+ *
16
+ * The submitting form registers both names as hidden fields, because `onFinish` is handed only the
17
+ * REGISTERED name paths: a value written to the form store alone is invisible to the submit path
18
+ * and would never reach the payload (spec:1930, spec:3848).
19
+ *
20
+ * Because the snapshot is held whole on the form value, submitting and re-saving carry it without
21
+ * re-resolving the shared catalog (spec:3848).
22
+ *
23
+ * The write is guarded by the value the form already holds, so an unrelated parent re-render can
24
+ * never clobber a capture the form has stored.
25
+ *
26
+ * @param capture the block's current capture, or undefined while nothing is captured.
27
+ */
28
+ export declare function useCapturedIdentityField(capture: IIdentityCapture | undefined): void;
@@ -0,0 +1,45 @@
1
+ import { Form } from "antd";
2
+ import { useEffect } from "react";
3
+ /** The parent form field each manual-entry block registers its captured identity under. */
4
+ export const IDENTITY_FIELD_NAME = "Identity";
5
+ // spec:1929 — CSP: 需要指定人员的表单提供“选择已有”与“手动录入”两种单选模式
6
+ /**
7
+ * The parent form field carrying the captured shape's `source` number. The blocks' shape pickers
8
+ * read this scalar — not the whole snapshot — so a reopened document's picker shows what was
9
+ * captured while the complete shape stays on {@link IDENTITY_FIELD_NAME} (spec:1929).
10
+ */
11
+ export const IDENTITY_SHAPE_FIELD_NAME = "IdentityShape";
12
+ // spec:3848 — CSP form identities retain their selected shape snapshot
13
+ /**
14
+ * Mirrors a manual-entry block's captured identity onto the parent form's value, so the complete
15
+ * snapshot — `source`, `name`, `family`, `subject` and `policies` — reaches the document payload
16
+ * alongside the values captured under those policies, exactly as a capture restored from a saved
17
+ * document does. Going back to editing the identity type clears the field again.
18
+ *
19
+ * The submitting form registers both names as hidden fields, because `onFinish` is handed only the
20
+ * REGISTERED name paths: a value written to the form store alone is invisible to the submit path
21
+ * and would never reach the payload (spec:1930, spec:3848).
22
+ *
23
+ * Because the snapshot is held whole on the form value, submitting and re-saving carry it without
24
+ * re-resolving the shared catalog (spec:3848).
25
+ *
26
+ * The write is guarded by the value the form already holds, so an unrelated parent re-render can
27
+ * never clobber a capture the form has stored.
28
+ *
29
+ * @param capture the block's current capture, or undefined while nothing is captured.
30
+ */
31
+ export function useCapturedIdentityField(capture) {
32
+ const form = Form.useFormInstance();
33
+ useEffect(() => {
34
+ if (form.getFieldValue(IDENTITY_FIELD_NAME) !== capture) {
35
+ form.setFieldValue(IDENTITY_FIELD_NAME, capture);
36
+ }
37
+ // The picker's own form value is the picked shape's source number, mirrored from the same
38
+ // capture so the shape the block holds and the shape the payload carries can never disagree.
39
+ const source = capture?.shape.source;
40
+ if (form.getFieldValue(IDENTITY_SHAPE_FIELD_NAME) !== source) {
41
+ form.setFieldValue(IDENTITY_SHAPE_FIELD_NAME, source);
42
+ }
43
+ }, [capture, form]);
44
+ }
45
+ //# sourceMappingURL=useCapturedIdentityField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCapturedIdentityField.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAE9C,kDAAkD;AAClD;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAEzD,uEAAuE;AACvE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAqC;IAC7E,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IAEpC,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,KAAK,OAAO,EAAE,CAAC;YACzD,IAAI,CAAC,aAAa,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;QAED,0FAA0F;QAC1F,6FAA6F;QAC7F,MAAM,MAAM,GAAG,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC;QACrC,IAAI,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,KAAK,MAAM,EAAE,CAAC;YAC9D,IAAI,CAAC,aAAa,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;IACF,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AACrB,CAAC"}