@voplus/morpho-csp 10.0.24 → 10.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/data/identity/identity-events/index.d.ts +6 -3
- package/es/data/identity/identity-events/index.js +6 -3
- package/es/data/identity/identity-events/index.js.map +1 -1
- package/es/data/identity/index.d.ts +6 -4
- package/es/data/identity/index.js +6 -4
- package/es/data/identity/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/ContactIdentitySelectDialog/index.d.ts +7 -9
- package/es/modules/corporate/company/identity/components/ContactIdentitySelectDialog/index.js +7 -64
- package/es/modules/corporate/company/identity/components/ContactIdentitySelectDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentifyDetail/index.d.ts +7 -14
- package/es/modules/corporate/company/identity/components/IdentifyDetail/index.js +7 -71
- package/es/modules/corporate/company/identity/components/IdentifyDetail/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentifyProperties/index.d.ts +7 -11
- package/es/modules/corporate/company/identity/components/IdentifyProperties/index.js +7 -61
- package/es/modules/corporate/company/identity/components/IdentifyProperties/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.d.ts +7 -9
- package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.js +7 -27
- package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentityChange/index.d.ts +7 -8
- package/es/modules/corporate/company/identity/components/IdentityChange/index.js +7 -28
- package/es/modules/corporate/company/identity/components/IdentityChange/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentityInformation/index.d.ts +7 -5
- package/es/modules/corporate/company/identity/components/IdentityInformation/index.js +7 -62
- package/es/modules/corporate/company/identity/components/IdentityInformation/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/IdentityItem/index.d.ts +7 -8
- package/es/modules/corporate/company/identity/components/IdentityItem/index.js +7 -38
- package/es/modules/corporate/company/identity/components/IdentityItem/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/index.d.ts +7 -8
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/index.js +7 -18
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/controls/IdentityMenu/index.d.ts +7 -10
- package/es/modules/corporate/company/identity/controls/IdentityMenu/index.js +7 -15
- package/es/modules/corporate/company/identity/controls/IdentityMenu/index.js.map +1 -1
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js +6 -6
- package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js.map +1 -1
- package/package.json +2 -1
- package/es/data/identity/IdentityStore.d.ts +0 -35
- package/es/data/identity/IdentityStore.js +0 -119
- package/es/data/identity/IdentityStore.js.map +0 -1
- package/es/data/identity/hooks.d.ts +0 -6
- package/es/data/identity/hooks.js +0 -14
- package/es/data/identity/hooks.js.map +0 -1
- package/es/data/identity/identity-events/useAutoUpdateListData.d.ts +0 -4
- package/es/data/identity/identity-events/useAutoUpdateListData.js +0 -13
- package/es/data/identity/identity-events/useAutoUpdateListData.js.map +0 -1
- package/es/data/identity/identity-events/useOnDeleteIdentity.d.ts +0 -4
- package/es/data/identity/identity-events/useOnDeleteIdentity.js +0 -16
- package/es/data/identity/identity-events/useOnDeleteIdentity.js.map +0 -1
- package/es/data/identity/identity-events/useOnNewIdentity.d.ts +0 -4
- package/es/data/identity/identity-events/useOnNewIdentity.js +0 -16
- package/es/data/identity/identity-events/useOnNewIdentity.js.map +0 -1
- package/es/data/identity/interfaces.d.ts +0 -26
- package/es/data/identity/interfaces.js +0 -2
- package/es/data/identity/interfaces.js.map +0 -1
- package/es/data/identity/types.d.ts +0 -50
- package/es/data/identity/types.js +0 -2
- package/es/data/identity/types.js.map +0 -1
- package/es/modules/corporate/company/identity/components/ContactIdentitySelectDialog/index.css +0 -89
- package/es/modules/corporate/company/identity/components/IdentifyDetail/index.css +0 -76
- package/es/modules/corporate/company/identity/components/IdentifyProperties/index.css +0 -67
- package/es/modules/corporate/company/identity/components/IdentifyQuickViewDialog/index.css +0 -44
- package/es/modules/corporate/company/identity/components/IdentityInformation/state.d.ts +0 -14
- package/es/modules/corporate/company/identity/components/IdentityInformation/state.js +0 -94
- package/es/modules/corporate/company/identity/components/IdentityInformation/state.js.map +0 -1
- package/es/modules/corporate/company/identity/components/IdentityItem/index.css +0 -45
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step1.d.ts +0 -6
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step1.js +0 -40
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step1.js.map +0 -1
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step2.d.ts +0 -3
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step2.js +0 -52
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step2.js.map +0 -1
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step3.d.ts +0 -3
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step3.js +0 -46
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/Step3.js.map +0 -1
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/index.css +0 -65
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/state.d.ts +0 -44
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/state.js +0 -188
- package/es/modules/corporate/company/identity/components/NewIdentityDialog/state.js.map +0 -1
- package/es/modules/corporate/company/identity/controls/IdentityMenu/index.css +0 -32
|
@@ -1,63 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { FontAwesomeIcon as FAIcon, faPenLineRegular } from "@voplus/morpho-ui/es/faIcons";
|
|
9
|
-
import { InputCountry, observe, UTCDatePicker as DatePicker } from "@voplus/morpho-ui";
|
|
10
|
-
import { useIdentity, useIdentityStore } from "../../../../../../data/identity";
|
|
11
|
-
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
12
|
-
const IdentityInformation = (props) => {
|
|
13
|
-
const { id } = props;
|
|
14
|
-
const identityStore = useIdentityStore();
|
|
15
|
-
const state = useMemo(() => new State(id, identityStore), [id]);
|
|
16
|
-
const identity = useIdentity(id, { reload: true, includes: "permissions" });
|
|
17
|
-
const { user } = useApplicationContext();
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
when(() => identity.loaded === true, () => state.reset(identity));
|
|
20
|
-
}, [id]);
|
|
21
|
-
return observe(() => (React.createElement("div", { className: "identity-information" },
|
|
22
|
-
React.createElement(Skeleton, { active: true, loading: !identity.loaded },
|
|
23
|
-
React.createElement("div", { className: "identity-information-content" },
|
|
24
|
-
React.createElement("div", { className: "identity-information-title" },
|
|
25
|
-
React.createElement("h3", null, "Identity Information"),
|
|
26
|
-
user.can("edit", identity.p) && (React.createElement("div", null, state.editable ? (React.createElement(React.Fragment, null,
|
|
27
|
-
React.createElement(Button, { type: "text", onClick: () => state.reset(identity) }, "Cancel"),
|
|
28
|
-
React.createElement(Button, { type: "link", loading: state.loading, onClick: state.onOk }, "Ok"))) : (React.createElement(Tooltip, { title: "Edit" },
|
|
29
|
-
React.createElement(Button, { type: "link", onClick: onEdit },
|
|
30
|
-
React.createElement(FAIcon, { icon: faPenLineRegular, style: { fontSize: "12px" } }))))))),
|
|
31
|
-
React.createElement(Scrollbars, { autoHide: true },
|
|
32
|
-
React.createElement(Form, { className: "identity-information-info", labelAlign: "left", labelCol: { span: 10 } },
|
|
33
|
-
React.createElement(Form.Item, { label: "Full Name", rules: [{ required: true }] }, state.editable ? (React.createElement(Input, { value: state.value.FullName, onChange: (e) => {
|
|
34
|
-
state.value.FullName = e.target.value;
|
|
35
|
-
} })) : (identity.fullName)),
|
|
36
|
-
React.createElement(Form.Item, { label: "Country / Nationality", rules: [{ required: true }] }, state.editable ? (React.createElement(InputCountry, { defaultValue: state.value.Country, onChange: (v) => (state.value.Country = v) })) : (identity.country)),
|
|
37
|
-
identity.type === "IdentityCard" ? (React.createElement(Form.Item, { label: "Issuing Country", rules: [{ required: true }] }, state.editable ? (React.createElement(InputCountry, { defaultValue: state.value.IssuingCountry, onChange: (v) => (state.value.IssuingCountry = v) })) : (identity.issuingCountry))) : null,
|
|
38
|
-
React.createElement(Form.Item, { label: "Identity Type", rules: [{ required: true }] }, state.editable ? (React.createElement(Select, { value: state.value.Type, onChange: (v) => {
|
|
39
|
-
state.value.Type = v;
|
|
40
|
-
}, options: [
|
|
41
|
-
{ value: "Passport", label: "International Passport" },
|
|
42
|
-
{ value: "IdentityCard", label: "Identify Card" },
|
|
43
|
-
{ value: "BusinessRegistration", label: "Business Registration" },
|
|
44
|
-
] })) : (identity.type)),
|
|
45
|
-
React.createElement(Form.Item, { label: "Identity #", rules: [{ required: true }] }, state.editable ? (React.createElement(Input, { value: state.value.Number, onChange: (e) => {
|
|
46
|
-
state.value.Number = e.target.value;
|
|
47
|
-
} })) : (identity.number)),
|
|
48
|
-
React.createElement(Form.Item, { label: "Expiry Date",
|
|
49
|
-
// name="expiryDate"
|
|
50
|
-
rules: [{ required: state.value.Type === "Passport" }] }, state.editable ? (React.createElement(DatePicker, { style: { width: "100%" }, defaultValue: state.value.ExpiryDate ? utcdayjs(state.value.ExpiryDate) : undefined, onChange: (date, dateString) => (state.value.ExpiryDate = dateString) })) : (React.createElement(UTCShortDate, { value: identity.expiryDate }))))))))));
|
|
51
|
-
/** hover edit IdentityInformation */
|
|
52
|
-
// spec:1799 — CSP: Identity Information edit requires permission and reveals number on entry
|
|
53
|
-
async function onEdit() {
|
|
54
|
-
if (!state.value.Number) {
|
|
55
|
-
await identityStore.reveal(id).then((res) => {
|
|
56
|
-
state.value.Number = res.number;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
state.editable = user.can("edit", identity.p);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
export default IdentityInformation;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { IdentityInformation } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/IdentityInformation";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/IdentityInformation";
|
|
63
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/IdentityInformation/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/IdentityInformation/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,6DAA6D,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,6DAA6D,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export default IdentityItem;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { IdentityItem } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/IdentityItem";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/IdentityItem";
|
|
@@ -1,39 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import classnames from "classnames";
|
|
9
|
-
import "./index.css";
|
|
10
|
-
const IdentityItem = (props) => {
|
|
11
|
-
const { id, active } = props;
|
|
12
|
-
const identity = useIdentity(id);
|
|
13
|
-
const identityStore = useIdentityStore();
|
|
14
|
-
const [hover, setHover] = useState(false);
|
|
15
|
-
let currentTime = new Date().getTime();
|
|
16
|
-
return observe(() => {
|
|
17
|
-
var _a, _b;
|
|
18
|
-
return (React.createElement("div", { className: classnames("identity-item", { active: active }), onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false) },
|
|
19
|
-
React.createElement("div", { className: "identity-info" },
|
|
20
|
-
React.createElement("div", { className: "identity-name" },
|
|
21
|
-
identity.fullName, (_a = identity.number) === null || _a === void 0 ? void 0 :
|
|
22
|
-
_a.toString().slice(-4).padStart((_b = identity.number) === null || _b === void 0 ? void 0 : _b.toString().length, "*")),
|
|
23
|
-
React.createElement("div", { className: "identity-data" },
|
|
24
|
-
identity.country && (React.createElement("span", null,
|
|
25
|
-
React.createElement(FAIcon, { icon: faLocationCircleRegular }),
|
|
26
|
-
identity.country)),
|
|
27
|
-
identity.type && (React.createElement("span", { className: "margin-left-15" },
|
|
28
|
-
React.createElement(FAIcon, { icon: faPassportRegular }),
|
|
29
|
-
identity.type)))),
|
|
30
|
-
currentTime > new Date(identity.expiryDate).getTime() && !hover && (React.createElement(Badge, { status: "error", text: "Expired" })),
|
|
31
|
-
React.createElement("div", { className: classnames("hover-operate-icon", {
|
|
32
|
-
show: hover,
|
|
33
|
-
}) },
|
|
34
|
-
React.createElement(ToolBar, { id: id, showMenu: false },
|
|
35
|
-
React.createElement(Delete, { action: () => identityStore.delete(id) })))));
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
export default IdentityItem;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { IdentityItem } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/IdentityItem";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/IdentityItem";
|
|
39
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/IdentityItem/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/IdentityItem/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,sDAAsD,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,sDAAsD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export default NewIdentityDialog;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { NewIdentityDialog } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/NewIdentityDialog";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/NewIdentityDialog";
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { observe } from "@voplus/morpho-ui";
|
|
9
|
-
import { useUnit } from "@voplus/morpho-org";
|
|
10
|
-
const NewIdentityDialog = (props) => {
|
|
11
|
-
const { id, visible, updateVisible } = props;
|
|
12
|
-
const [state] = useState(new State());
|
|
13
|
-
const unit = useUnit(id);
|
|
14
|
-
state.props = props;
|
|
15
|
-
return observe(() => (React.createElement(LegalContext.Provider, { value: state },
|
|
16
|
-
React.createElement(Modal, { width: 500, title: "", footer: null, wrapClassName: "select-legal-contact-dialog", onCancel: () => updateVisible === null || updateVisible === void 0 ? void 0 : updateVisible(), open: visible }, state.step === 3 ? (React.createElement(Step3, null)) : state.step === 2 ? (React.createElement(Step2, null)) : (React.createElement(Step1, { unitId: unit.id, type: unit.type }))))));
|
|
17
|
-
};
|
|
18
|
-
export default NewIdentityDialog;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { NewIdentityDialog } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/NewIdentityDialog";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/NewIdentityDialog";
|
|
19
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/NewIdentityDialog/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/components/NewIdentityDialog/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,2DAA2D,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
}) => React.JSX.Element;
|
|
10
|
-
export default IdentityMenu;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { IdentityMenu } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/IdentityMenu";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/IdentityMenu";
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const IdentityMenu = (props) => {
|
|
9
|
-
const store = useIdentityStore();
|
|
10
|
-
return observe(() => (React.createElement(NodeMenu, { id: props.id, icon: props.icon, store: store, menus: React.createElement(React.Fragment, null,
|
|
11
|
-
React.createElement(Access, null),
|
|
12
|
-
React.createElement(SubPasteNodeMenu, { style: { left: "-170px" } }),
|
|
13
|
-
React.createElement(Delete, null)) })));
|
|
14
|
-
};
|
|
15
|
-
export default IdentityMenu;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Import { IdentityMenu } from "@voplus/morpho-compliance" instead. This
|
|
3
|
+
* component moved to its own package; this compatibility re-export will be removed in a
|
|
4
|
+
* future release.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@voplus/morpho-compliance/es/components/IdentityMenu";
|
|
7
|
+
export { default } from "@voplus/morpho-compliance/es/components/IdentityMenu";
|
|
16
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/controls/IdentityMenu/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/identity/controls/IdentityMenu/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,sDAAsD,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,sDAAsD,CAAC"}
|
package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js
CHANGED
|
@@ -83,7 +83,7 @@ const TableCellDetail = (props) => {
|
|
|
83
83
|
return observe(() => {
|
|
84
84
|
const officer = useOfficer(record === null || record === void 0 ? void 0 : record.id, { reload: (d) => !d.tags, includes: "tags" });
|
|
85
85
|
const renderContent = () => {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
87
87
|
switch (dataIndex) {
|
|
88
88
|
case "name":
|
|
89
89
|
return (React.createElement("div", { className: "flex items-center gap-3.5" },
|
|
@@ -93,15 +93,15 @@ const TableCellDetail = (props) => {
|
|
|
93
93
|
React.createElement("div", { className: "flex items-center gap-4 text-xs text-font-grey font-medium" },
|
|
94
94
|
React.createElement("div", null,
|
|
95
95
|
React.createElement(FAIcon, { icon: faEnvelopeSolid }),
|
|
96
|
-
(
|
|
96
|
+
(officer.email || ((_b = officer.contact) === null || _b === void 0 ? void 0 : _b.email)) ? (React.createElement("span", { className: "ml-1" }, officer.email || ((_c = officer.contact) === null || _c === void 0 ? void 0 : _c.email))) : (" -")),
|
|
97
97
|
React.createElement("div", null,
|
|
98
98
|
React.createElement(FAIcon, { icon: faPhoneSolid }),
|
|
99
|
-
(
|
|
99
|
+
(officer.phone || ((_d = officer.contact) === null || _d === void 0 ? void 0 : _d.phone)) ? (React.createElement("span", { className: "ml-1" }, officer.phone || ((_e = officer.contact) === null || _e === void 0 ? void 0 : _e.phone))) : (" -"))))));
|
|
100
100
|
case "details":
|
|
101
101
|
return (React.createElement("div", { className: "flex items-center gap-3.5" },
|
|
102
102
|
React.createElement(UnitAvatar, { unit: officer.contact, className: "w-10! h-10! rounded-md! text-sm! text-font-secondary! bg-blue-profile!" }),
|
|
103
103
|
React.createElement("div", { className: "flex flex-col gap-1" },
|
|
104
|
-
((
|
|
104
|
+
((_f = officer.identity) === null || _f === void 0 ? void 0 : _f.fullName) ? (React.createElement("div", { className: "text-font-primary uppercase font-semibold" }, officer.identity.fullName)) : officer.contact ? (React.createElement(UnitNameNoteAlert, { id: officer.contact.id, name: officer.contact.name })) : null,
|
|
105
105
|
React.createElement("div", { className: "flex items-center gap-2 text-xs text-font-grey font-medium" },
|
|
106
106
|
React.createElement("div", { className: "flex items-center gap-0.5" },
|
|
107
107
|
React.createElement(FAIcon, { icon: faCalendarCheckSolid }),
|
|
@@ -118,14 +118,14 @@ const TableCellDetail = (props) => {
|
|
|
118
118
|
case "cease":
|
|
119
119
|
return renderDate(officer.cease);
|
|
120
120
|
case "identity":
|
|
121
|
-
return (React.createElement(React.Fragment, null, ((
|
|
121
|
+
return (React.createElement(React.Fragment, null, ((_g = officer.identity) === null || _g === void 0 ? void 0 : _g.id) ? (React.createElement(IdentityStatus, { id: (_h = officer.identity) === null || _h === void 0 ? void 0 : _h.id, className: "officer-table-item-identity" })) : (React.createElement("span", { className: "flex items-center gap-1 text-font-disabled" },
|
|
122
122
|
React.createElement(FAIcon, { icon: faBanSolid, className: "text-xs" }),
|
|
123
123
|
"Need Identity"))));
|
|
124
124
|
case "menu":
|
|
125
125
|
return (React.createElement("div", { className: "opacity-0 group-hover/row:opacity-100 transition-opacity" },
|
|
126
126
|
React.createElement(ToolBar, { id: record.id, showMenu: false },
|
|
127
127
|
React.createElement(Open, { url: `/officer/${record.id}` }),
|
|
128
|
-
React.createElement(CompanOfficerMenu, { id: record.id, title: "Officer Menu", unitId: (
|
|
128
|
+
React.createElement(CompanOfficerMenu, { id: record.id, title: "Officer Menu", unitId: (_j = officer.contact) === null || _j === void 0 ? void 0 : _j.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }), onChangeContact: (unitId) => store.edit(record.id, {
|
|
129
129
|
data: { ContactId: unitId },
|
|
130
130
|
error: "message",
|
|
131
131
|
}) }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCellDetail.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CA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EAAE,MAAM,EAAE,CAAC,CAAC;QAErF,MAAM,aAAa,GAAG,GAAG,EAAE;;YAC1B,QAAQ,SAAS,EAAE,CAAC;gBACnB,KAAK,MAAM;oBACV,OAAO,CACN,6BAAK,SAAS,EAAC,2BAA2B;wBACzC,oBAAC,UAAU,IACV,IAAI,EAAE,OAAO,CAAC,OAAO,EACrB,SAAS,EAAC,wEAAwE,GACjF;wBACF,6BAAK,SAAS,EAAC,yBAAyB;4BACtC,CAAA,MAAA,OAAO,CAAC,QAAQ,0CAAE,QAAQ,EAAC,CAAC,CAAC,CAC7B,6BAAK,SAAS,EAAC,2CAA2C,IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CACrB,CACN,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CACrB,oBAAC,iBAAiB,IAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,GAAI,CACzE,CAAC,CAAC,CAAC,IAAI;4BACR,6BAAK,SAAS,EAAC,4DAA4D;gCAC1E;oCACC,oBAAC,MAAM,IAAC,IAAI,EAAE,eAAe,GAAI;oCAChC,CAAC,
|
|
1
|
+
{"version":3,"file":"TableCellDetail.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,0DAA0D,CAAC;AAChF,OAAO,OAAO,MAAM,kDAAkD,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;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,EAAE,CAC3B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;oCACrB,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;oCAC3B,KAAK,EAAE,SAAS;iCAChB,CAAC,GAEF,CACO,CACL,CACN,CAAC;gBACH;oBACC,OAAO,QAAQ,CAAC;YAClB,CAAC;QACF,CAAC,CAAC;QAEF,OAAO,+BAAQ,SAAS,IAAG,aAAa,EAAE,CAAM,CAAC;IAClD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voplus/morpho-csp",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.26",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://voplus.visualstudio.com/morpho-csp/_git/morpho-csp"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@voplus/morpho-collaboration-action": "10.x",
|
|
32
|
+
"@voplus/morpho-compliance": "10.x",
|
|
32
33
|
"@voplus/morpho-document": "10.x",
|
|
33
34
|
"@voplus/morpho-finance": "10.x",
|
|
34
35
|
"@voplus/morpho-form": "10.x",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
-
import { CountedMap, Store, StoreActionOptions } from "@voplus/morpho-data";
|
|
3
|
-
import { IdentityCreateOptions, IdentityEditOptions, LoadIdentityOptions } from "./types";
|
|
4
|
-
import { IIdentity } from "./interfaces";
|
|
5
|
-
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
6
|
-
/** Quotation store supply backend functions. */
|
|
7
|
-
export declare class IdentityStore extends Store {
|
|
8
|
-
readonly endpoint: ApiEndPoint;
|
|
9
|
-
/** Name of the store */
|
|
10
|
-
readonly name: string;
|
|
11
|
-
private readonly _identityDeleted;
|
|
12
|
-
private readonly _identityCreated;
|
|
13
|
-
constructor(endpoint: ApiEndPoint);
|
|
14
|
-
/** All currently used identity. */
|
|
15
|
-
readonly items: CountedMap<string, IIdentity>;
|
|
16
|
-
/** Event fires when a delete identity has been deleted. */
|
|
17
|
-
get IdentityDeletedEvent(): import("ste-events").IEvent<IdentityStore, IIdentity>;
|
|
18
|
-
/** Event fires when a new Identity has been created. */
|
|
19
|
-
get IdentityCreatedEvent(): import("ste-events").IEvent<IdentityStore, IIdentity>;
|
|
20
|
-
/** Create a new Identity. */
|
|
21
|
-
create(options: IdentityCreateOptions): Promise<IIdentity>;
|
|
22
|
-
/** Edit an existing item on server. */
|
|
23
|
-
edit(id: string, options: IdentityEditOptions): Promise<any>;
|
|
24
|
-
delete(id: string, options?: any): Promise<IIdentity>;
|
|
25
|
-
reveal(id: string, options?: StoreActionOptions): Promise<{
|
|
26
|
-
number: string;
|
|
27
|
-
}>;
|
|
28
|
-
/** Load a list of documents from server.
|
|
29
|
-
* @param {LoadDocumentListOptions}
|
|
30
|
-
*/
|
|
31
|
-
loadList(options?: LoadDocumentListOptions): Promise<IIdentity[]>;
|
|
32
|
-
load(id: string, options: LoadIdentityOptions): Promise<IIdentity>;
|
|
33
|
-
}
|
|
34
|
-
/** 响应钩子检索 IdentityStore */
|
|
35
|
-
export declare const useIdentityStore: () => IdentityStore;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { RequestBuilder } from "@voplus/api";
|
|
2
|
-
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
|
3
|
-
import { EventDispatcher } from "strongly-typed-events";
|
|
4
|
-
import { observable } from "mobx";
|
|
5
|
-
const StoreName = "IdentityStore";
|
|
6
|
-
/** Quotation store supply backend functions. */
|
|
7
|
-
export class IdentityStore extends Store {
|
|
8
|
-
constructor(endpoint) {
|
|
9
|
-
super();
|
|
10
|
-
Object.defineProperty(this, "endpoint", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: endpoint
|
|
15
|
-
});
|
|
16
|
-
/** Name of the store */
|
|
17
|
-
Object.defineProperty(this, "name", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true,
|
|
21
|
-
value: StoreName
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(this, "_identityDeleted", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: new EventDispatcher()
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(this, "_identityCreated", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true,
|
|
32
|
-
writable: true,
|
|
33
|
-
value: new EventDispatcher()
|
|
34
|
-
});
|
|
35
|
-
/** All currently used identity. */
|
|
36
|
-
Object.defineProperty(this, "items", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true,
|
|
39
|
-
writable: true,
|
|
40
|
-
value: new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }))
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/** Event fires when a delete identity has been deleted. */
|
|
44
|
-
get IdentityDeletedEvent() {
|
|
45
|
-
return this._identityDeleted.asEvent();
|
|
46
|
-
}
|
|
47
|
-
/** Event fires when a new Identity has been created. */
|
|
48
|
-
get IdentityCreatedEvent() {
|
|
49
|
-
return this._identityCreated.asEvent();
|
|
50
|
-
}
|
|
51
|
-
/** Create a new Identity. */
|
|
52
|
-
async create(options) {
|
|
53
|
-
// invariant(options.name, "Name cannot be empty.");
|
|
54
|
-
return this.action(async () => {
|
|
55
|
-
const r = await this.endpoint.post(`/api/identities/create`, new RequestBuilder().json(options.data));
|
|
56
|
-
const t = (await r.json());
|
|
57
|
-
this._identityCreated.dispatch(this, t);
|
|
58
|
-
return t;
|
|
59
|
-
}, options);
|
|
60
|
-
}
|
|
61
|
-
/** Edit an existing item on server. */
|
|
62
|
-
async edit(id, options) {
|
|
63
|
-
return this.action(async () => {
|
|
64
|
-
const r = await this.endpoint.post(`/api/identities/${id}`, new RequestBuilder().json(options.data));
|
|
65
|
-
const t = await r.json();
|
|
66
|
-
this.items.overwrite(t.id, t);
|
|
67
|
-
return t;
|
|
68
|
-
}, options);
|
|
69
|
-
}
|
|
70
|
-
async delete(id, options) {
|
|
71
|
-
await this.action(async () => {
|
|
72
|
-
await this.endpoint.delete(`/api/identities/${id}`);
|
|
73
|
-
}, options);
|
|
74
|
-
const item = this.items.peek(id);
|
|
75
|
-
if (item) {
|
|
76
|
-
this._identityDeleted.dispatch(this, item);
|
|
77
|
-
}
|
|
78
|
-
return item;
|
|
79
|
-
}
|
|
80
|
-
async reveal(id, options) {
|
|
81
|
-
return this.action(async () => {
|
|
82
|
-
const r = await this.endpoint.get(`/api/identities/reveal/${id}`);
|
|
83
|
-
const t = await r.json();
|
|
84
|
-
this.items.overwrite(t.id, t);
|
|
85
|
-
return t;
|
|
86
|
-
}, options !== null && options !== void 0 ? options : {});
|
|
87
|
-
}
|
|
88
|
-
/** Load a list of documents from server.
|
|
89
|
-
* @param {LoadDocumentListOptions}
|
|
90
|
-
*/
|
|
91
|
-
async loadList(options) {
|
|
92
|
-
let query = "";
|
|
93
|
-
if (options === null || options === void 0 ? void 0 : options.Includes) {
|
|
94
|
-
query = query.concat(`includes=${options.Includes}`);
|
|
95
|
-
}
|
|
96
|
-
if (query)
|
|
97
|
-
query = "?".concat(query);
|
|
98
|
-
const r = await this.endpoint.post(`/api/identities${query}`, new RequestBuilder().json(options ? options : { Filters: [] }));
|
|
99
|
-
return (await r.json());
|
|
100
|
-
}
|
|
101
|
-
async load(id, options) {
|
|
102
|
-
let query = "";
|
|
103
|
-
if (options.includes)
|
|
104
|
-
query = query.concat(`includes=${options.includes}`);
|
|
105
|
-
if (query)
|
|
106
|
-
query = "?".concat(query);
|
|
107
|
-
const r = await this.endpoint.get(`/api/identities/${id}${query}`);
|
|
108
|
-
return await r.json();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
/** 响应钩子检索 IdentityStore */
|
|
112
|
-
export const useIdentityStore = () => {
|
|
113
|
-
const context = useApplicationContext();
|
|
114
|
-
if (!context.getService(StoreName)) {
|
|
115
|
-
context.registerService(new IdentityStore(context.api.currentEndPoint));
|
|
116
|
-
}
|
|
117
|
-
return context.getService(StoreName);
|
|
118
|
-
};
|
|
119
|
-
//# sourceMappingURL=IdentityStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityStore.js","sourceRoot":"","sources":["../../../src/data/identity/IdentityStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAsB,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAGnG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,SAAS,GAAG,eAAe,CAAC;AAElC,gDAAgD;AAChD,MAAM,OAAO,aAAc,SAAQ,KAAK;IAMvC,YAAmC,QAAqB;QACvD,KAAK,EAAE,CAAC;QADU;;;;mBAAgB,QAAQ;WAAa;QALxD,wBAAwB;QACR;;;;mBAAe,SAAS;WAAC;QACxB;;;;mBAAmB,IAAI,eAAe,EAA4B;WAAC;QACnE;;;;mBAAmB,IAAI,eAAe,EAA4B;WAAC;QAMpF,mCAAmC;QACnB;;;;mBAAuC,IAAI,UAAU,CACpE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAc,EAC1D,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAGhC,CACD;WAAC;IATF,CAAC;IAWD,2DAA2D;IAC3D,IAAW,oBAAoB;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CACjC,kBAAkB,KAAK,EAAE,EACzB,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAC9D,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAgB,CAAC;IACxC,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAA4B;QACzD,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,OAAO,CAAC,QAAQ;YAAE,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3E,IAAI,KAAK;YAAE,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;QACnE,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;CACD;AAED,2BAA2B;AAC3B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACpC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,eAAe,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAmB,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
|
2
|
-
import { IIdentity } from "./interfaces";
|
|
3
|
-
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
4
|
-
import { LoadIdentityOptions } from ".";
|
|
5
|
-
export declare const useIdentity: (id: string, options?: LoadIdentityOptions) => IIdentity;
|
|
6
|
-
export declare const useIdentityListEffect: (list: ListDataContextState<IIdentity> | null, effect: (list: any[]) => void, options?: LoadDocumentListOptions) => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useListLoaderEffect } from "@voplus/morpho-ui/es/hooks";
|
|
2
|
-
import { useIdentityStore } from "./IdentityStore";
|
|
3
|
-
import { useLoadCountedMapItem } from "@voplus/morpho-data";
|
|
4
|
-
export const useIdentity = (id, options) => {
|
|
5
|
-
options = options ? options : {};
|
|
6
|
-
const store = useIdentityStore();
|
|
7
|
-
return useLoadCountedMapItem(id, store.items, (calculatedOptions) => store.load(id, calculatedOptions), options);
|
|
8
|
-
};
|
|
9
|
-
export const useIdentityListEffect = (list, effect, options) => {
|
|
10
|
-
const deps = options ? options : {};
|
|
11
|
-
const store = useIdentityStore();
|
|
12
|
-
return useListLoaderEffect(list, store.items, effect, () => store.loadList(options), [deps]);
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/identity/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAU,EAAE,OAA6B,EAAE,EAAE;IACxE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA0B,CAAC;IAC1D,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IAEjC,OAAO,qBAAqB,CAC3B,EAAE,EACF,KAAK,CAAC,KAAK,EACX,CAAC,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,EACxD,OAAO,CACP,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA4C,EAC5C,MAA6B,EAC7B,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IACjC,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9F,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IIdentity } from "../interfaces";
|
|
2
|
-
import { ListDataContextState } from "@voplus/morpho-ui/es/data";
|
|
3
|
-
/** React hook to call action when a new Identity has been created. */
|
|
4
|
-
export declare const useAutoUpdateListData: (list: ListDataContextState<any>, shouldUpdate: (d: IIdentity, event: string) => boolean) => void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useOnDeleteIdentity, useOnNewIdentity } from ".";
|
|
2
|
-
/** React hook to call action when a new Identity has been created. */
|
|
3
|
-
export const useAutoUpdateListData = (list, shouldUpdate) => {
|
|
4
|
-
useOnNewIdentity((s, d) => {
|
|
5
|
-
if (shouldUpdate(d, "new"))
|
|
6
|
-
list.union([d]);
|
|
7
|
-
});
|
|
8
|
-
useOnDeleteIdentity((s, d) => {
|
|
9
|
-
if (shouldUpdate(d, "new"))
|
|
10
|
-
list.remove(d.id);
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=useAutoUpdateListData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAutoUpdateListData.js","sourceRoot":"","sources":["../../../../src/data/identity/identity-events/useAutoUpdateListData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAK1D,sEAAsE;AACtE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACpC,IAA+B,EAC/B,YAAsD,EACrD,EAAE;IACH,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACzB,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC5B,IAAI,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IdentityStore } from "../IdentityStore";
|
|
2
|
-
import { IIdentity } from "../interfaces";
|
|
3
|
-
/** React hook to call action when a delete Identity has been created. */
|
|
4
|
-
export declare const useOnDeleteIdentity: (action: (store: IdentityStore, doc: IIdentity) => void) => void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useIdentityStore } from "../IdentityStore";
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
/** React hook to call action when a delete Identity has been created. */
|
|
4
|
-
export const useOnDeleteIdentity = (action) => {
|
|
5
|
-
const store = useIdentityStore();
|
|
6
|
-
const onDeleteIdentity = (store, doc) => {
|
|
7
|
-
action(store, doc);
|
|
8
|
-
};
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
store.IdentityDeletedEvent.subscribe(onDeleteIdentity);
|
|
11
|
-
return () => {
|
|
12
|
-
store.IdentityDeletedEvent.unsubscribe(onDeleteIdentity);
|
|
13
|
-
};
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=useOnDeleteIdentity.js.map
|