@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.
- 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/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
package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.d.ts
CHANGED
|
@@ -1,52 +1,303 @@
|
|
|
1
1
|
import { IAddress } from "@voplus/morpho-ui/es/data";
|
|
2
2
|
import { IIdentity } from "../../../../../../data/identity";
|
|
3
|
+
import type { StoreApi } from "zustand/vanilla";
|
|
4
|
+
import type { IIdentityShape } from "@voplus/morpho-compliance/es/data/identityShape";
|
|
5
|
+
import type { IdentityShapeCatalogStatus } from "@voplus/morpho-compliance/es/components/IdentityShapeSelect";
|
|
6
|
+
import type { CapturedShapeFieldValues } from "@voplus/morpho-compliance/es/components/CapturedShapeFields";
|
|
7
|
+
/** Host visibility and the completion channel for the legal-contact wizard. */
|
|
3
8
|
export type LegalProps = {
|
|
9
|
+
/** Whether this wizard owns an active visible dialog. */
|
|
4
10
|
visible: boolean;
|
|
11
|
+
/** Reports a completed owner selection or an explicit dialog close. */
|
|
5
12
|
updateVisible?: (unitId?: string) => Promise<void> | void;
|
|
6
13
|
};
|
|
14
|
+
/** The three writes the create path performs, in order — also what a failure names. */
|
|
15
|
+
export type CreateStep = "contact" | "details" | "identity";
|
|
16
|
+
/** The identity-step fields a picked shape's policies can block: the selection itself plus its captured fields. */
|
|
17
|
+
export type IdentityStepErrors = Partial<Record<"shape" | keyof CapturedShapeFieldValues, string>>;
|
|
18
|
+
/**
|
|
19
|
+
* The writes the create sequence performs, as the dialog state needs them. The review step binds
|
|
20
|
+
* them to the identity and unit stores it has, so the order, the named step in flight and what a
|
|
21
|
+
* failure says can stay owned by the state instead of by the step that happens to call them.
|
|
22
|
+
*/
|
|
23
|
+
export interface CreateWrites {
|
|
24
|
+
/** Create the owning contact; rejects when nothing was created. */
|
|
25
|
+
createOwner: () => Promise<{
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}>;
|
|
29
|
+
/** Save contact details; optional name is supplied only for a changed nonblank draft rename. Rejects on write failure. */
|
|
30
|
+
saveDetails: (ownerId: string, name?: string) => Promise<void>;
|
|
31
|
+
/** Create the identity from the created owner and the picked shape's `source` number. */
|
|
32
|
+
createIdentity: (ownerId: string, shape: IIdentityShape) => Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
/** A sequence can complete, fail at a named write, lack a shape, already be running, or lose its review's ownership. */
|
|
35
|
+
export type CreateOutcome = {
|
|
36
|
+
status: "completed";
|
|
37
|
+
ownerId: string;
|
|
38
|
+
} | {
|
|
39
|
+
status: "failed";
|
|
40
|
+
step: CreateStep;
|
|
41
|
+
} | {
|
|
42
|
+
status: "blocked";
|
|
43
|
+
} | {
|
|
44
|
+
status: "busy";
|
|
45
|
+
} | {
|
|
46
|
+
status: "abandoned";
|
|
47
|
+
};
|
|
48
|
+
/** The wizard's dialog state — everything its steps read and write. */
|
|
49
|
+
export interface LegalState {
|
|
50
|
+
/** step of Add Legal Contact */
|
|
51
|
+
step: number;
|
|
52
|
+
/** Search an existing contact or Create a new contact */
|
|
53
|
+
operate: "Search" | "Create";
|
|
54
|
+
/** type of unit of the new officer */
|
|
55
|
+
unitType: string;
|
|
56
|
+
/** id of identity */
|
|
57
|
+
identityId: string;
|
|
58
|
+
/** id of unit of the new officer */
|
|
59
|
+
unitId: string;
|
|
60
|
+
/** */
|
|
61
|
+
fistName: string;
|
|
62
|
+
/** last name */
|
|
63
|
+
lastName: string;
|
|
64
|
+
/** */
|
|
65
|
+
middleName: string;
|
|
66
|
+
/** number of identity of the new officer */
|
|
67
|
+
number: string | number;
|
|
68
|
+
/** country of identity of the new officer */
|
|
69
|
+
country: string;
|
|
70
|
+
/** issuing country captured under the picked shape's policy */
|
|
71
|
+
issuingCountry: string;
|
|
72
|
+
/** alias captured under the picked shape's policy */
|
|
73
|
+
alias: string;
|
|
74
|
+
/** expiryDate of identity of the new officer, when the picked shape captures it */
|
|
75
|
+
expiryDate?: string;
|
|
76
|
+
/** email of unit of the new officer */
|
|
77
|
+
email: string;
|
|
78
|
+
/** phone of unit of the new officer */
|
|
79
|
+
phone: string;
|
|
80
|
+
/** address of unit of the new officer */
|
|
81
|
+
address: IAddress;
|
|
82
|
+
/** list of unit */
|
|
83
|
+
contactList: IIdentity[];
|
|
84
|
+
/** order name by Western or Eastern */
|
|
85
|
+
orderName: string;
|
|
86
|
+
/** key of tabPane of Page4 */
|
|
87
|
+
tabKey: "Contact" | "Identify";
|
|
88
|
+
/** loading of load identity list */
|
|
89
|
+
loading: boolean;
|
|
90
|
+
/** loading of save identity item, and of the create sequence while it runs */
|
|
91
|
+
saving: boolean;
|
|
92
|
+
/** the shape picked for the new identity — its `source` is the number the identity is created with */
|
|
93
|
+
shape?: IIdentityShape;
|
|
94
|
+
/** spec:3717 — the picker's catalog status; the identity step is blocked until it is "ready". */
|
|
95
|
+
catalogStatus: IdentityShapeCatalogStatus;
|
|
96
|
+
/** spec:3713 — the identity-step messages a blocked step shows for the picked shape's policies. */
|
|
97
|
+
shapeErrors: IdentityStepErrors;
|
|
98
|
+
/** spec:3851 — the pre-create disclosure the user accepts before the contact is written. */
|
|
99
|
+
disclosureOpen: boolean;
|
|
100
|
+
/** spec:3851 — the owner the create sequence already created; a retry reuses it. */
|
|
101
|
+
createdOwner: {
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
} | null;
|
|
105
|
+
/** spec:3851 — whether the entered contact details were saved onto the created owner. */
|
|
106
|
+
detailsSaved: boolean;
|
|
107
|
+
/** spec:3851 — the step of the create sequence in flight, named while it runs. */
|
|
108
|
+
savingStep: CreateStep | null;
|
|
109
|
+
/** spec:3851 — the step that failed after the owner was created; the wizard stays open. */
|
|
110
|
+
failedOperation: CreateStep | null;
|
|
111
|
+
/** spec:3851 — the confirmation shown when the user tries to leave an unfinished contact. */
|
|
112
|
+
leaveConfirmOpen: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** The transitions the dialog state's store exposes on top of the state itself. */
|
|
115
|
+
export interface LegalTransitions {
|
|
116
|
+
/** Start a fresh wizard run, dropping everything a previous one left behind. */
|
|
117
|
+
reset: () => void;
|
|
118
|
+
/** Revoke pending submission ownership while keeping directory writes already completed. */
|
|
119
|
+
invalidateSubmission: () => void;
|
|
120
|
+
/** Open the pre-create disclosure. */
|
|
121
|
+
openDisclosure: () => void;
|
|
122
|
+
/** Dismiss the pre-create disclosure without writing anything. */
|
|
123
|
+
closeDisclosure: () => void;
|
|
124
|
+
/** Ask to leave an unfinished contact: the user has to confirm it first. */
|
|
125
|
+
requestLeave: () => void;
|
|
126
|
+
/** Keep editing, dropping the leave confirmation with the state left intact. */
|
|
127
|
+
cancelLeave: () => void;
|
|
128
|
+
/** Gate the identity step on the picked shape's carried-field policies. */
|
|
129
|
+
advanceFromIdentityStep: () => string[];
|
|
130
|
+
/** spec:3851 — Run the ordered writes and deliver completion only while this submission still owns the review. */
|
|
131
|
+
submitCreate: (writes: CreateWrites, onComplete?: (ownerId: string) => void) => Promise<CreateOutcome>;
|
|
132
|
+
}
|
|
133
|
+
/** The dialog state plus its transitions: what the Zustand store below holds. */
|
|
134
|
+
export type LegalStoreState = LegalState & LegalTransitions;
|
|
135
|
+
/** The contact's display name in the picked Western or Eastern order. */
|
|
136
|
+
export declare const fullNameOf: (state: LegalState) => string;
|
|
137
|
+
/** The captured values projected onto the keys the shape policies are keyed by. */
|
|
138
|
+
export declare const capturedValuesOf: (state: LegalState) => CapturedShapeFieldValues;
|
|
139
|
+
/** Whether a captured definition applies to the wizard's current owner kind. */
|
|
140
|
+
export declare const isShapeApplicableTo: (shape: IIdentityShape, unitType: string) => boolean;
|
|
141
|
+
/**
|
|
142
|
+
* spec:3851 — what the identity step still needs: a picked shape (its `source` is the number the
|
|
143
|
+
* identity is created with), and a value for every captured field that shape's policies mark
|
|
144
|
+
* mandatory. A field the shape omits or leaves optional is never required.
|
|
145
|
+
*/
|
|
146
|
+
export declare const identityStepErrorsOf: (state: LegalState) => IdentityStepErrors;
|
|
147
|
+
/** spec:3851 — what leaving now keeps in the contact directory, so the confirmation can say it exactly. */
|
|
148
|
+
export declare const leaveDescriptionOf: (state: LegalState) => string;
|
|
149
|
+
/**
|
|
150
|
+
* The dialog state's store. A pure UI store, so it is a Zustand store and not a MobX one: every
|
|
151
|
+
* wizard step goes through it — the facade below for the property-shaped reads and writes the
|
|
152
|
+
* steps have always used, and `useLegalContext` for a re-render on each write.
|
|
153
|
+
*/
|
|
154
|
+
export declare const createLegalStore: () => StoreApi<LegalStoreState>;
|
|
155
|
+
/** The store the wizard's `State` facade drives, and the handle the dialog renders inside. */
|
|
156
|
+
export type LegalStore = ReturnType<typeof createLegalStore>;
|
|
157
|
+
/**
|
|
158
|
+
* The wizard's dialog state. The state itself lives in a Zustand store (`createLegalStore`); this
|
|
159
|
+
* facade keeps the property-shaped reads and writes the steps have always used — `legal.email =
|
|
160
|
+
* value`, `legal.step += 1` — writing straight through to the store, and owns the two things that
|
|
161
|
+
* belong to the dialog's host rather than to the state: its props, and the callback a finished
|
|
162
|
+
* contact is reported to.
|
|
163
|
+
*/
|
|
7
164
|
export declare class State {
|
|
165
|
+
/** The store every read and write of this dialog state goes through. */
|
|
166
|
+
readonly store: LegalStore;
|
|
167
|
+
/** The dialog's host props: whether it is open, and the channel it reports back through. */
|
|
8
168
|
props: LegalProps;
|
|
169
|
+
/** @param store - the store to drive. The default is a whole fresh wizard, so `new State()` is one. */
|
|
170
|
+
constructor(store?: LegalStore);
|
|
171
|
+
/** The current state, read for every property below. */
|
|
172
|
+
private get snapshot();
|
|
9
173
|
/** step of Add Legal Contact */
|
|
10
|
-
|
|
174
|
+
get step(): LegalState["step"];
|
|
175
|
+
set step(value: number);
|
|
11
176
|
/** Search an existing contact or Create a new contact */
|
|
12
|
-
|
|
177
|
+
get operate(): LegalState["operate"];
|
|
178
|
+
set operate(value: "Search" | "Create");
|
|
13
179
|
/** type of unit of the new officer */
|
|
14
|
-
|
|
180
|
+
get unitType(): LegalState["unitType"];
|
|
181
|
+
set unitType(value: string);
|
|
15
182
|
/** id of identity */
|
|
16
|
-
|
|
183
|
+
get identityId(): LegalState["identityId"];
|
|
184
|
+
set identityId(value: string);
|
|
17
185
|
/** id of unit of the new officer */
|
|
18
|
-
|
|
186
|
+
get unitId(): LegalState["unitId"];
|
|
187
|
+
set unitId(value: string);
|
|
19
188
|
/** */
|
|
20
|
-
|
|
189
|
+
get fistName(): LegalState["fistName"];
|
|
190
|
+
set fistName(value: string);
|
|
21
191
|
/** last name */
|
|
22
|
-
|
|
192
|
+
get lastName(): LegalState["lastName"];
|
|
193
|
+
set lastName(value: string);
|
|
23
194
|
/** */
|
|
24
|
-
|
|
195
|
+
get middleName(): LegalState["middleName"];
|
|
196
|
+
set middleName(value: string);
|
|
25
197
|
/** number of identity of the new officer */
|
|
26
|
-
|
|
198
|
+
get number(): LegalState["number"];
|
|
199
|
+
set number(value: string | number);
|
|
27
200
|
/** country of identity of the new officer */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
201
|
+
get country(): LegalState["country"];
|
|
202
|
+
set country(value: string);
|
|
203
|
+
/** issuing country captured under the picked shape's policy */
|
|
204
|
+
get issuingCountry(): LegalState["issuingCountry"];
|
|
205
|
+
set issuingCountry(value: string);
|
|
206
|
+
/** alias captured under the picked shape's policy */
|
|
207
|
+
get alias(): LegalState["alias"];
|
|
208
|
+
set alias(value: string);
|
|
209
|
+
/** expiryDate of identity of the new officer, when the picked shape captures it */
|
|
210
|
+
get expiryDate(): LegalState["expiryDate"];
|
|
211
|
+
set expiryDate(value: string | undefined);
|
|
33
212
|
/** email of unit of the new officer */
|
|
34
|
-
|
|
213
|
+
get email(): LegalState["email"];
|
|
214
|
+
set email(value: string);
|
|
35
215
|
/** phone of unit of the new officer */
|
|
36
|
-
|
|
216
|
+
get phone(): LegalState["phone"];
|
|
217
|
+
set phone(value: string);
|
|
37
218
|
/** address of unit of the new officer */
|
|
38
|
-
|
|
219
|
+
get address(): LegalState["address"];
|
|
220
|
+
set address(value: IAddress);
|
|
39
221
|
/** list of unit */
|
|
40
|
-
|
|
222
|
+
get contactList(): LegalState["contactList"];
|
|
223
|
+
set contactList(value: IIdentity[]);
|
|
41
224
|
/** order name by Western or Eastern */
|
|
42
|
-
|
|
225
|
+
get orderName(): LegalState["orderName"];
|
|
226
|
+
set orderName(value: string);
|
|
43
227
|
/** key of tabPane of Page4 */
|
|
44
|
-
|
|
228
|
+
get tabKey(): LegalState["tabKey"];
|
|
229
|
+
set tabKey(value: "Contact" | "Identify");
|
|
45
230
|
/** loading of load identity list */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
231
|
+
get loading(): LegalState["loading"];
|
|
232
|
+
set loading(value: boolean);
|
|
233
|
+
/** loading of save identity item, and of the create sequence while it runs */
|
|
234
|
+
get saving(): LegalState["saving"];
|
|
235
|
+
set saving(value: boolean);
|
|
236
|
+
/** the shape picked for the new identity — its `source` is the number the identity is created with */
|
|
237
|
+
get shape(): LegalState["shape"];
|
|
238
|
+
set shape(value: IIdentityShape | undefined);
|
|
239
|
+
/** spec:3717 — the picker's catalog status; the identity step is blocked until it is "ready". */
|
|
240
|
+
get catalogStatus(): LegalState["catalogStatus"];
|
|
241
|
+
set catalogStatus(value: IdentityShapeCatalogStatus);
|
|
242
|
+
/** spec:3713 — the identity-step messages a blocked step shows for the picked shape's policies. */
|
|
243
|
+
get shapeErrors(): LegalState["shapeErrors"];
|
|
244
|
+
set shapeErrors(value: IdentityStepErrors);
|
|
245
|
+
/** spec:3851 — the pre-create disclosure the user accepts before the contact is written. */
|
|
246
|
+
get disclosureOpen(): LegalState["disclosureOpen"];
|
|
247
|
+
set disclosureOpen(value: boolean);
|
|
248
|
+
/** spec:3851 — the owner the create sequence already created; a retry reuses it. */
|
|
249
|
+
get createdOwner(): LegalState["createdOwner"];
|
|
250
|
+
set createdOwner(value: {
|
|
251
|
+
id: string;
|
|
252
|
+
name: string;
|
|
253
|
+
} | null);
|
|
254
|
+
/** spec:3851 — whether the entered contact details were saved onto the created owner. */
|
|
255
|
+
get detailsSaved(): LegalState["detailsSaved"];
|
|
256
|
+
set detailsSaved(value: boolean);
|
|
257
|
+
/** spec:3851 — the step of the create sequence in flight, named while it runs. */
|
|
258
|
+
get savingStep(): LegalState["savingStep"];
|
|
259
|
+
set savingStep(value: CreateStep | null);
|
|
260
|
+
/** spec:3851 — the step that failed after the owner was created; the wizard stays open. */
|
|
261
|
+
get failedOperation(): LegalState["failedOperation"];
|
|
262
|
+
set failedOperation(value: CreateStep | null);
|
|
263
|
+
/** spec:3851 — the confirmation shown when the user tries to leave an unfinished contact. */
|
|
264
|
+
get leaveConfirmOpen(): LegalState["leaveConfirmOpen"];
|
|
265
|
+
set leaveConfirmOpen(value: boolean);
|
|
266
|
+
/** The contact's display name in the picked Western or Eastern order. */
|
|
49
267
|
get fullName(): string;
|
|
268
|
+
/** The captured values projected onto the keys the shape policies are keyed by. */
|
|
269
|
+
get capturedValues(): CapturedShapeFieldValues;
|
|
270
|
+
/** What leaving now keeps in the contact directory, so the confirmation can say it exactly. */
|
|
271
|
+
get leaveDescription(): string;
|
|
272
|
+
/** Start a fresh wizard run. */
|
|
273
|
+
reset: () => void;
|
|
274
|
+
/** spec:3851 — Revoke an abandoned review's pending result without discarding saved directory data. */
|
|
275
|
+
invalidateSubmission: () => void;
|
|
276
|
+
/** Open the pre-create disclosure. */
|
|
277
|
+
openDisclosure: () => void;
|
|
278
|
+
/** Dismiss the pre-create disclosure without writing anything. */
|
|
279
|
+
closeDisclosure: () => void;
|
|
280
|
+
/** spec:3851 — ask to leave: with nothing created the dialog just closes, with a contact
|
|
281
|
+
* already created the user confirms first, because that contact stays in the directory. */
|
|
282
|
+
requestLeave: () => void;
|
|
283
|
+
/** spec:3851 — keep editing: drop the leave confirmation so the wizard stays open for a retry. */
|
|
284
|
+
cancelLeave: () => void;
|
|
285
|
+
/** spec:3851 — leave the unfinished contact behind: it stays in the directory with whatever was
|
|
286
|
+
* saved for it, and no identity is selected for the calling workflow. */
|
|
287
|
+
leave: () => void;
|
|
288
|
+
/** spec:3851 — gate the identity step on the picked shape's captured-field policies. */
|
|
289
|
+
advanceFromIdentityStep: () => string[];
|
|
290
|
+
/**
|
|
291
|
+
* spec:3851 — run the ordered create sequence, then report a finished contact back through the
|
|
292
|
+
* dialog's own result channel. Only a created identity advances the calling workflow; a contact
|
|
293
|
+
* left behind by a failure or by leaving is never reported as a selection.
|
|
294
|
+
*/
|
|
295
|
+
submitCreate: (writes: CreateWrites) => Promise<CreateOutcome>;
|
|
50
296
|
}
|
|
51
297
|
export declare const LegalContext: import("react").Context<State>;
|
|
298
|
+
/**
|
|
299
|
+
* The dialog state for the calling step. The same hook subscribes the step to every write of that
|
|
300
|
+
* state, so a step re-renders when the wizard advances, when the shape catalog answers, or when a
|
|
301
|
+
* create sequence reports the step it is on — no observable wrapper required.
|
|
302
|
+
*/
|
|
52
303
|
export declare const useLegalContext: () => State;
|