@voplus/morpho-csp 11.2.8 → 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.
- package/es/components/LegalContactSelect/index.d.ts +7 -0
- package/es/components/LegalContactSelect/index.js +127 -12
- package/es/components/LegalContactSelect/index.js.map +1 -1
- package/es/data/clda-form/conversion.d.ts +9 -6
- package/es/data/clda-form/conversion.js +11 -18
- package/es/data/clda-form/conversion.js.map +1 -1
- package/es/data/clda-form/identityAdapter.d.ts +60 -0
- package/es/data/clda-form/identityAdapter.js +196 -0
- package/es/data/clda-form/identityAdapter.js.map +1 -0
- package/es/data/clda-form/interfaces.d.ts +20 -1
- package/es/data/clda-form/saveFormDraft.d.ts +4 -0
- package/es/data/clda-form/saveFormDraft.js +21 -0
- package/es/data/clda-form/saveFormDraft.js.map +1 -0
- package/es/data/clda-form/types.d.ts +31 -2
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.d.ts +35 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.js +53 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/index.js +41 -15
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/index.js.map +1 -1
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.d.ts +59 -1
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.js +244 -15
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.js.map +1 -1
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.d.ts +5 -0
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js +13 -7
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.js +20 -24
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.js +38 -11
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.d.ts +3 -3
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.d.ts +25 -4
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.js +88 -5
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.d.ts +13 -0
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.js +20 -0
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.js.map +1 -0
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page1.js +28 -28
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page1.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page2.js +3 -4
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page2.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page3.js +16 -9
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page3.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.js +128 -61
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.js +119 -24
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.d.ts +0 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.js +16 -8
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.d.ts +274 -23
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.js +560 -210
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.js.map +1 -1
- package/es/modules/corporate/components/CorporateSelect/index.d.ts +12 -1
- package/es/modules/corporate/components/CorporateSelect/index.js +19 -5
- package/es/modules/corporate/components/CorporateSelect/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeReminderScheduleList/index.js +9 -6
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeReminderScheduleList/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/AppointOfficer/index.d.ts +6 -1
- package/es/modules/corporate/legal-generation/components/AppointOfficer/index.js +3 -2
- package/es/modules/corporate/legal-generation/components/AppointOfficer/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.d.ts +6 -1
- package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.js +3 -2
- package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/IssueShares/Fields.js +3 -3
- package/es/modules/corporate/legal-generation/components/IssueShares/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/IssueShares/interface.d.ts +1 -1
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.d.ts +16 -1
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.js +27 -9
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/interface.d.ts +5 -2
- package/es/modules/corporate/legal-generation/components/ResignationLetter/Fields.js +1 -1
- package/es/modules/corporate/legal-generation/components/ResignationLetter/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.d.ts +13 -1
- package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.js +24 -6
- package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/ShareTransfer/interface.d.ts +5 -2
- package/es/modules/corporate/legal-generation/components/SubmitButton/index.d.ts +11 -3
- package/es/modules/corporate/legal-generation/components/SubmitButton/index.js +9 -3
- package/es/modules/corporate/legal-generation/components/SubmitButton/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.d.ts +31 -2
- package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.js +52 -37
- package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.js.map +1 -1
- package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.d.ts +27 -2
- package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.js +78 -21
- package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.js.map +1 -1
- package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.d.ts +17 -0
- package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.js +36 -0
- package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.d.ts +11 -0
- package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.js +25 -0
- package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/index.d.ts +7 -0
- package/es/modules/corporate/legal-generation/fields/state/index.js +5 -0
- package/es/modules/corporate/legal-generation/fields/state/index.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/types.d.ts +37 -0
- package/es/modules/corporate/legal-generation/fields/state/types.js +27 -0
- package/es/modules/corporate/legal-generation/fields/state/types.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.d.ts +28 -0
- package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.js +45 -0
- package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.d.ts +31 -0
- package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.js +47 -0
- package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.d.ts +35 -0
- package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.js +36 -0
- package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useOperateField.d.ts +15 -0
- package/es/modules/corporate/legal-generation/fields/state/useOperateField.js +27 -0
- package/es/modules/corporate/legal-generation/fields/state/useOperateField.js.map +1 -0
- package/es/modules/corporate/legal-generation/form/AppointOfficerForm.d.ts +18 -9
- package/es/modules/corporate/legal-generation/form/AppointOfficerForm.js +130 -28
- package/es/modules/corporate/legal-generation/form/AppointOfficerForm.js.map +1 -1
- package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.d.ts +27 -17
- package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.js +112 -24
- package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.js.map +1 -1
- package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.d.ts +637 -0
- package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.js +840 -0
- package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.js.map +1 -0
- package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.d.ts +23 -0
- package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.js +55 -0
- package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.js.map +1 -0
- package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.js +38 -8
- package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/CLDAContactList/index.js +50 -33
- package/es/modules/self-registration/clda-form/components/CLDAContactList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/ContactFields/index.d.ts +5 -2
- package/es/modules/self-registration/clda-form/components/ContactFields/index.js +6 -3
- package/es/modules/self-registration/clda-form/components/ContactFields/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/useContactEditSession.d.ts +35 -0
- package/es/modules/self-registration/clda-form/components/useContactEditSession.js +51 -0
- package/es/modules/self-registration/clda-form/components/useContactEditSession.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js +60 -12
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js +3 -5
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js +7 -21
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js +6 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js +23 -28
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js +11 -24
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js +13 -8
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js +11 -24
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.js +18 -9
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js +11 -24
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js +23 -28
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js +81 -14
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js +11 -15
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js +34 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js +4 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js +5 -4
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js +32 -12
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js +80 -13
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js +7 -9
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.d.ts +3 -0
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js +4 -2
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/Content.js +16 -1
- package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/Content.js.map +1 -1
- package/es/routes.d.ts +1 -1
- package/es/routes.js +4 -2
- package/es/routes.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/legal-generation/components/SubmitButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/legal-generation/components/SubmitButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,+EAA+E;AAC/E,0CAA0C;AAC1C;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,EAAqB,EAAE,EAAE;IAC/D,OAAO,CACN,oBAAC,IAAI,CAAC,IAAI;QACT,oBAAC,MAAM,IACN,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAC,QAAQ,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,eAGtB;QACT,oBAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,OAAO,qBAE7C,CACE,CACZ,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import type { CapturedShapeFieldValues } from "@voplus/morpho-compliance/es/components/CapturedShapeFields";
|
|
2
|
+
import type { IIdentityCapture } from "./state";
|
|
3
|
+
/**
|
|
4
|
+
* A complete blank address: the `Address` control reads its value eagerly, and a story's
|
|
5
|
+
* `<Form initialValues>` seeds the same record so an untouched form does not inject `undefined`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const EMPTY_ADDRESS: {
|
|
8
|
+
line1: string;
|
|
9
|
+
line2: string;
|
|
10
|
+
city: string;
|
|
11
|
+
state: string;
|
|
12
|
+
postalCode: string;
|
|
13
|
+
country: string;
|
|
14
|
+
};
|
|
15
|
+
export interface AppointOfficerFieldsProps {
|
|
16
|
+
/** The identity already captured on the document, when re-opening a saved one. */
|
|
17
|
+
identity?: IIdentityCapture;
|
|
18
|
+
/** A reopened document stays with its original company. */
|
|
19
|
+
companyDisabled?: boolean;
|
|
20
|
+
/** An identity-shaped draft awaiting capture, e.g. a wizard step that pre-picks the type. */
|
|
21
|
+
draft?: IIdentityCapture;
|
|
22
|
+
/** Per-field validation messages for the captured identity values. */
|
|
23
|
+
identityFieldErrors?: Partial<Record<keyof CapturedShapeFieldValues, string>>;
|
|
24
|
+
/** Which mode the block opens in; `Create` is the manual-entry branch. Seeds the radio only —
|
|
25
|
+
* after mount the radio owns the mode and the block reports the chosen branch it renders. */
|
|
26
|
+
mode?: "Search" | "Create";
|
|
27
|
+
/** The subject whose identity types the picker offers (spec:3712). */
|
|
28
|
+
subject?: "Person" | "Organization";
|
|
29
|
+
}
|
|
30
|
+
/** Render the selected or manual appointment fields with their captured identity policies. */
|
|
31
|
+
declare const AppointOfficerFields: (props: AppointOfficerFieldsProps) => JSX.Element;
|
|
3
32
|
export default AppointOfficerFields;
|
|
@@ -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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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,
|
|
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, {
|
|
20
|
-
React.createElement(Radio.Group, { 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
|
-
|
|
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
|
-
|
|
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,
|
|
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",
|
|
56
|
-
React.createElement(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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;
|
|
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,OAA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BACrE,4CAA4C;4BAC5C,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAC9B,QAAQ,EAAE,CAAC,IAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAChD,CACS,CACP;gBACN,oBAAC,GAAG,IAAC,IAAI,EAAE,EAAE;oBACZ,oBAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,gBAAgB;wBAClD,oBAAC,KAAK,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
|
|
2
|
-
|
|
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 {
|
|
2
|
-
import
|
|
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
|
-
|
|
7
|
-
|
|
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: "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
React.createElement(InputCountry,
|
|
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,
|
|
60
|
+
React.createElement(Checkbox, { disabled: props.companyDisabled }, "Replace Existing Representative(s)")),
|
|
20
61
|
React.createElement("h3", null, "Representative Detail"),
|
|
21
|
-
React.createElement(Form.Item, {
|
|
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: "
|
|
26
|
-
React.createElement(LegalContactSelect,
|
|
27
|
-
React.createElement(
|
|
28
|
-
React.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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,
|
|
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,sGAAsG;AACtG,MAAM,6BAA6B,GAA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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,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O,KAAK;gBACjB,mCAAmC;gBACnC,QAAQ,EAAE,CAAC,QAAQ,IAAI,SAAS,EAChC,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAC5C,WAAW,EACV,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE;oBAClB,CAAC,CAAC,wBAAwB;oBAC1B,CAAC,CAAC,QAAQ;wBACV,CAAC,CAAC,SAAS;wBACX,CAAC,CAAC,mCAAmC,EAEvC,QAAQ,EAAE,CAAC,KAAK,EAAQ,EAAE,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;
|