@voplus/morpho-csp 10.0.8 → 10.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/es/components/CorporateUnitSelectDialog/index.d.ts +1 -1
  2. package/es/components/CorporateUnitSelectDialog/index.js +4 -12
  3. package/es/components/CorporateUnitSelectDialog/index.js.map +1 -1
  4. package/es/components/CorporateUnitSelectDialog/state.d.ts +2 -2
  5. package/es/components/CorporateUnitSelectDialog/state.js +6 -9
  6. package/es/components/CorporateUnitSelectDialog/state.js.map +1 -1
  7. package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.js +1 -1
  8. package/es/modules/corporate/background-investigation/risk-match/components/RiskMatchTabs/index.js.map +1 -1
  9. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js +3 -1
  10. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js.map +1 -1
  11. package/es/modules/corporate/company/components/CorporateList/index.js +1 -1
  12. package/es/modules/corporate/company/components/CorporateList/index.js.map +1 -1
  13. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.d.ts +1 -13
  14. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js +39 -94
  15. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js.map +1 -1
  16. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.d.ts +13 -0
  17. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js +63 -0
  18. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js.map +1 -0
  19. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.css +122 -0
  20. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.d.ts +1 -0
  21. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js +95 -66
  22. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js.map +1 -1
  23. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js +13 -23
  24. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js.map +1 -1
  25. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.css +22 -0
  26. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.d.ts +1 -0
  27. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js +8 -1
  28. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js.map +1 -1
  29. package/es/modules/corporate/company/member-register/components/MemberTableList/index.d.ts +3 -2
  30. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js +9 -63
  31. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js.map +1 -1
  32. package/es/modules/corporate/company/member-register/components/{MemberTableList → MemberTableListCard}/TableCellDetail.d.ts +1 -13
  33. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js +77 -0
  34. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js.map +1 -0
  35. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.d.ts +13 -0
  36. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js +52 -0
  37. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js.map +1 -0
  38. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.d.ts +16 -1
  39. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js +133 -17
  40. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js.map +1 -1
  41. package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js +12 -15
  42. package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js.map +1 -1
  43. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.d.ts +3 -2
  44. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js +11 -74
  45. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js.map +1 -1
  46. package/es/modules/corporate/company/officer-register/components/{OfficerTableList → OfficerTableListCard}/TableCellDetail.d.ts +1 -13
  47. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js +87 -0
  48. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js.map +1 -0
  49. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.d.ts +13 -0
  50. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js +65 -0
  51. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js.map +1 -0
  52. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.d.ts +24 -3
  53. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js +140 -22
  54. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js.map +1 -1
  55. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.d.ts +2 -0
  56. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js +37 -20
  57. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js.map +1 -1
  58. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.css +1 -1
  59. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.js +1 -1
  60. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js +1 -1
  61. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js.map +1 -1
  62. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js +2 -5
  63. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js.map +1 -1
  64. package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionDefaultView/index.css +1 -1
  65. package/es/modules/corporate/filing-record/components/FilingList/index.js +1 -1
  66. package/es/modules/corporate/filing-record/components/FilingList/index.js.map +1 -1
  67. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js +7 -26
  68. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js.map +1 -1
  69. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js +1 -1
  70. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js.map +1 -1
  71. package/es/page/RegisterTablePage/Controller.d.ts +3 -0
  72. package/es/page/RegisterTablePage/Controller.js +134 -0
  73. package/es/page/RegisterTablePage/Controller.js.map +1 -0
  74. package/es/page/RegisterTablePage/index.d.ts +3 -0
  75. package/es/page/RegisterTablePage/index.js +63 -0
  76. package/es/page/RegisterTablePage/index.js.map +1 -0
  77. package/package.json +1 -2
  78. package/es/components/RegisterTable/index.d.ts +0 -31
  79. package/es/components/RegisterTable/index.js +0 -55
  80. package/es/components/RegisterTable/index.js.map +0 -1
  81. package/es/components/StatusLabel/index.d.ts +0 -36
  82. package/es/components/StatusLabel/index.js +0 -16
  83. package/es/components/StatusLabel/index.js.map +0 -1
  84. package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js +0 -125
  85. package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js.map +0 -1
  86. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.d.ts +0 -21
  87. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js +0 -86
  88. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js.map +0 -1
  89. package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js +0 -140
  90. package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js.map +0 -1
  91. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.d.ts +0 -23
  92. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js +0 -87
  93. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js.map +0 -1
  94. package/es/modules/corporate/company/pages/RegisterTablePage/index.d.ts +0 -10
  95. package/es/modules/corporate/company/pages/RegisterTablePage/index.js +0 -151
  96. package/es/modules/corporate/company/pages/RegisterTablePage/index.js.map +0 -1
@@ -0,0 +1,87 @@
1
+ import { faEllipsisVerticalSolid, faEnvelopeSolid, faPhoneSolid, faReceiptSolid, faBarsProgressSolid, faUserGroupSolid, faCalendarDaysSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
2
+ import { Open } from "@voplus/morpho-document-core/es/controls/ToolBar/buttons";
3
+ import ToolBar from "@voplus/morpho-document-core/es/controls/ToolBar";
4
+ import { observe } from "@voplus/morpho-ui";
5
+ import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
6
+ import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
7
+ import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
8
+ import classnames from "classnames";
9
+ import IdentityStatus from "@voplus/morpho-org/es/modules/verification/IdentityStatus/IdentityStatus2";
10
+ import React from "react";
11
+ import TagView from "@voplus/morpho-org/es/modules/tag/TagView/TagView2";
12
+ import { useOfficerStore, useOfficer } from "../../../../../../data/officer";
13
+ import CompanOfficerMenu from "../../../controls/CompanyRegisterMenu";
14
+ import OfficerStatusLabel from "../../controls/OfficerStatusLabel/OfficerStatusLabel2";
15
+ import "./index.css";
16
+ export const columnsListDetail = [
17
+ {
18
+ title: (React.createElement(React.Fragment, null,
19
+ React.createElement(FAIcon, { icon: faUserGroupSolid }),
20
+ " Officers Name")),
21
+ dataIndex: "name",
22
+ width: "32%",
23
+ },
24
+ {
25
+ title: (React.createElement(React.Fragment, null,
26
+ React.createElement(FAIcon, { icon: faReceiptSolid }),
27
+ " Position")),
28
+ dataIndex: "position",
29
+ },
30
+ {
31
+ title: (React.createElement(React.Fragment, null,
32
+ React.createElement(FAIcon, { icon: faCalendarDaysSolid }),
33
+ " Appointment")),
34
+ dataIndex: "appointment",
35
+ },
36
+ {
37
+ title: (React.createElement(React.Fragment, null,
38
+ React.createElement(FAIcon, { icon: faCalendarDaysSolid }),
39
+ " Cease")),
40
+ dataIndex: "cease",
41
+ },
42
+ {
43
+ title: (React.createElement(React.Fragment, null,
44
+ React.createElement(FAIcon, { icon: faBarsProgressSolid }),
45
+ " Identity Status & Tag")),
46
+ dataIndex: "tags",
47
+ },
48
+ {
49
+ title: " ",
50
+ dataIndex: "menu",
51
+ width: "72px",
52
+ },
53
+ ];
54
+ const TableCellDetail = (props) => {
55
+ const { dataIndex, record, rowIndex, children, ...restProps } = props;
56
+ const store = useOfficerStore();
57
+ return observe(() => {
58
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
59
+ const officer = useOfficer(record === null || record === void 0 ? void 0 : record.id, { reload: (d) => !d.tags, includes: "tags" });
60
+ return (React.createElement("td", { ...restProps }, dataIndex === "name" ? (React.createElement("div", { className: "officer-table-item-info" },
61
+ React.createElement(UnitAvatar, { unit: officer.contact }),
62
+ React.createElement("div", { className: "officer-table-item-name" },
63
+ ((_a = officer.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (officer.identity.fullName) : officer.contact ? (React.createElement(UnitNameNoteAlert, { id: officer.contact.id, name: officer.contact.name })) : null,
64
+ React.createElement("div", { className: "officer-table-item-contact" },
65
+ ((_b = officer.email) !== null && _b !== void 0 ? _b : (_c = officer.contact) === null || _c === void 0 ? void 0 : _c.email) && (React.createElement("div", null,
66
+ React.createElement("span", null,
67
+ React.createElement(FAIcon, { icon: faEnvelopeSolid })), (_d = officer.email) !== null && _d !== void 0 ? _d : (_e = officer.contact) === null || _e === void 0 ? void 0 : _e.email)),
68
+ ((_f = officer.phone) !== null && _f !== void 0 ? _f : (_g = officer.contact) === null || _g === void 0 ? void 0 : _g.phone) && (React.createElement("div", null,
69
+ React.createElement("span", null,
70
+ React.createElement(FAIcon, { icon: faPhoneSolid })), (_h = officer.phone) !== null && _h !== void 0 ? _h : (_j = officer.contact) === null || _j === void 0 ? void 0 : _j.phone)))))) : dataIndex === "position" ? (React.createElement("div", { className: "officer-table-item-position" },
71
+ React.createElement(OfficerStatusLabel, { className: classnames("officer-table-status-label", {
72
+ "need-identity": !officer.identity,
73
+ }), status: !officer.identity ? "NeedIdentity" : officer.status }),
74
+ officer.position)) : dataIndex === "appointment" ? (React.createElement(UTCShortDate, { value: officer.appointment, format: "DD MMM YYYY" })) : dataIndex === "cease" ? (React.createElement(UTCShortDate, { value: officer.cease, format: "DD MMM YYYY" })) : dataIndex === "tags" ? (React.createElement(React.Fragment, null,
75
+ ((_k = officer.identity) === null || _k === void 0 ? void 0 : _k.id) ? (React.createElement(IdentityStatus, { id: (_l = officer.identity) === null || _l === void 0 ? void 0 : _l.id, className: "officer-table-item-identity" })) : (React.createElement("div", { className: "officer-table-needIdentity" },
76
+ React.createElement("span", null),
77
+ "Need Identity")),
78
+ React.createElement(TagView, { id: record.id, tags: officer.tags, editable: false, items: store.items, maxCount: 1 }))) : dataIndex === "menu" ? (React.createElement(ToolBar, { id: record.id, showMenu: false },
79
+ React.createElement(Open, { url: `/officer/${record.id}` }),
80
+ React.createElement(CompanOfficerMenu, { id: record.id, title: "Officer Menu", unitId: (_m = officer.contact) === null || _m === void 0 ? void 0 : _m.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }), onChangeContact: (unitId) => store.edit(record.id, {
81
+ data: { ContactId: unitId },
82
+ error: "message",
83
+ }) }))) : (children)));
84
+ });
85
+ };
86
+ export default TableCellDetail;
87
+ //# sourceMappingURL=TableCellDetail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellDetail.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,mBAA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AAE,MAAA,OAAO,CAAC,QAAQ,0CAAE,EAAE,EAAE,SAAS,EAAC,6BAA6B,GAAG,CACpF,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,4BAA4B;gBAC1C,iCAAa;gCACR,CACN;YACD,oBAAC,OAAO,IACP,EAAE,EAAE,MAAM,CAAC,EAAE,EACb,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,CAAC,GACV,CACA,CACH,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAC1B,oBAAC,OAAO,IAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK;YACtC,oBAAC,IAAI,IAAC,GAAG,EAAE,YAAY,MAAM,CAAC,EAAE,EAAE,GAAI;YACtC,oBAAC,iBAAiB,IACjB,EAAE,EAAE,MAAM,CAAC,EAAE,EACb,KAAK,EAAC,cAAc,EACpB,MAAM,EAAE,MAAA,OAAO,CAAC,OAAO,0CAAE,EAAE,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,QACV,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,uBAAuB,GAAI,EAC/C,eAAe,EAAE,CAAC,MAAM,EAAE,EAAE,CAC3B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;oBACrB,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;oBAC3B,KAAK,EAAE,SAAS;iBAChB,CAAC,GAEF,CACO,CACV,CAAC,CAAC,CAAC,CACH,QAAQ,CACR,CACG,CACL,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ export declare const columnsSimpleList: ({
4
+ title: React.JSX.Element;
5
+ dataIndex: string;
6
+ width?: undefined;
7
+ } | {
8
+ title: string;
9
+ dataIndex: string;
10
+ width: string;
11
+ })[];
12
+ declare const TableCellSimple: (props: any) => React.JSX.Element;
13
+ export default TableCellSimple;
@@ -0,0 +1,65 @@
1
+ import React from "react";
2
+ import { faEllipsisVerticalSolid, faBarsProgressSolid, faUserGroupSolid, faCalendarDaysSolid, faCalendarCheckSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
3
+ import { Tooltip } from "antd";
4
+ import { observe } from "@voplus/morpho-ui";
5
+ import { Open } from "@voplus/morpho-document-core/es/controls/ToolBar/buttons";
6
+ import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
7
+ import IdentityStatus from "@voplus/morpho-org/es/modules/verification/IdentityStatus/IdentityStatus2";
8
+ import { useOfficerStore, useOfficer } from "../../../../../../data/officer";
9
+ import CompanOfficerMenu from "../../../controls/CompanyRegisterMenu";
10
+ import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
11
+ import OfficerStatusLabel from "../../controls/OfficerStatusLabel/OfficerStatusLabel2";
12
+ import ToolBar from "@voplus/morpho-document-core/es/controls/ToolBar";
13
+ import classnames from "classnames";
14
+ import "./index.css";
15
+ export const columnsSimpleList = [
16
+ {
17
+ title: (React.createElement(React.Fragment, null,
18
+ React.createElement(FAIcon, { icon: faUserGroupSolid }),
19
+ " Officers Details")),
20
+ dataIndex: "details",
21
+ // width: "32%",
22
+ },
23
+ {
24
+ title: (React.createElement(React.Fragment, null,
25
+ React.createElement(FAIcon, { icon: faBarsProgressSolid }),
26
+ " Identity Status")),
27
+ dataIndex: "identity",
28
+ },
29
+ {
30
+ title: " ",
31
+ dataIndex: "menu",
32
+ width: "72px",
33
+ },
34
+ ];
35
+ const TableCellSimple = (props) => {
36
+ const { dataIndex, record, rowIndex, children, ...restProps } = props;
37
+ const store = useOfficerStore();
38
+ return observe(() => {
39
+ var _a, _b, _c;
40
+ const officer = useOfficer(record === null || record === void 0 ? void 0 : record.id, { reload: (d) => !d.tags, includes: "tags" });
41
+ return (React.createElement("td", { ...restProps }, dataIndex === "details" ? (React.createElement("div", { className: "officer-table-item-details" },
42
+ React.createElement("div", null, ((_a = officer.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (officer.identity.fullName) : officer.contact ? (React.createElement(UnitNameNoteAlert, { id: officer.contact.id, name: officer.contact.name })) : null),
43
+ React.createElement("div", { className: "officer-table-item-position" },
44
+ React.createElement(OfficerStatusLabel, { className: classnames("officer-table-status-label", {
45
+ "need-identity": !officer.identity,
46
+ }), status: !officer.identity ? "NeedIdentity" : officer.status }),
47
+ officer.position),
48
+ React.createElement("div", { className: "officer-table-item-date" },
49
+ officer.appointment && (React.createElement(Tooltip, { title: "Appointment Date", color: "#868686", className: "appointment" },
50
+ React.createElement("span", { className: "date-icon" },
51
+ React.createElement(FAIcon, { icon: faCalendarCheckSolid })),
52
+ React.createElement(UTCShortDate, { value: officer.appointment, format: "DD MMM YYYY" }))),
53
+ officer.cease && (React.createElement(Tooltip, { title: "Cease Date", color: "#868686" },
54
+ React.createElement("span", { className: "date-icon" },
55
+ React.createElement(FAIcon, { icon: faCalendarDaysSolid })),
56
+ React.createElement(UTCShortDate, { value: officer.cease, format: "DD MMM YYYY" })))))) : dataIndex === "identity" ? (((_b = officer.identity) === null || _b === void 0 ? void 0 : _b.id) ? (React.createElement(IdentityStatus, { id: officer.identity.id })) : null) : dataIndex === "menu" ? (React.createElement(ToolBar, { id: record.id, showMenu: false },
57
+ React.createElement(Open, { url: `/officer/${record.id}` }),
58
+ React.createElement(CompanOfficerMenu, { id: record.id, title: "Officer Menu", unitId: (_c = officer.contact) === null || _c === void 0 ? void 0 : _c.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }), onChangeContact: (unitId) => store.edit(record.id, {
59
+ data: { ContactId: unitId },
60
+ error: "message",
61
+ }) }))) : (children)));
62
+ });
63
+ };
64
+ export default TableCellSimple;
65
+ //# sourceMappingURL=TableCellSimple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellSimple.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,0DAA0D,CAAC;AAChF,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,cAAc,MAAM,2EAA2E,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,kBAAkB,MAAM,uDAAuD,CAAC;AACvF,OAAO,OAAO,MAAM,kDAAkD,CAAC;AACvE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC;QACC,KAAK,EAAE,CACN;YACC,oBAAC,MAAM,IAAC,IAAI,EAAE,gBAAgB,GAAI;gCAChC,CACH;QACD,SAAS,EAAE,SAAS;QACpB,gBAAgB;KAChB;IACD;QACC,KAAK,EAAE,CACN;YACC,oBAAC,MAAM,IAAC,IAAI,EAAE,mBAAmB,GAAI;+BACnC,CACH;QACD,SAAS,EAAE,UAAU;KACrB;IACD;QACC,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,MAAM;KACb;CACD,CAAC;AAEF,MAAM,eAAe,GA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AI,EAAE,uBAAuB,GAAI,EAC/C,eAAe,EAAE,CAAC,MAAM,EAAE,EAAE,CAC3B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;oBACrB,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;oBAC3B,KAAK,EAAE,SAAS;iBAChB,CAAC,GAEF,CACO,CACV,CAAC,CAAC,CAAC,CACH,QAAQ,CACR,CACG,CACL,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,4 +1,25 @@
1
- import React from "react";
2
- import { OfficerTableListProps } from "./OfficerRegisterContainer";
3
- declare const OfficerTableListCard: (props: OfficerTableListProps) => React.JSX.Element;
1
+ import React, { ReactNode } from "react";
2
+ import { ListHeaderToolProps } from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
3
+ import "./index.css";
4
+ export type OfficerListProps = {
5
+ officersRegisterId: string;
6
+ corporateId: string;
7
+ /** 是否显示 send notice */
8
+ sendForm?: boolean;
9
+ isFilterPresent?: boolean;
10
+ tableCardProps?: {
11
+ className?: string;
12
+ isHeader?: boolean;
13
+ title?: ReactNode;
14
+ };
15
+ /** 头部的btn显示默认样式 还是 card 的样式; 是否是card */
16
+ type?: "card";
17
+ /** 是否显示详细的table内容 */
18
+ tableDetail?: boolean;
19
+ listHeaderToolProps?: ListHeaderToolProps;
20
+ onRedirect?: () => void;
21
+ onSelectCorporateUnit?: (params?: any) => void;
22
+ onDelete?: (corporateId: string, officerRegisterId: string) => void;
23
+ };
24
+ declare const OfficerTableListCard: (props: OfficerListProps) => React.JSX.Element;
4
25
  export default OfficerTableListCard;
@@ -1,27 +1,98 @@
1
- import React from "react";
2
- import DocumentTableListCard from "@voplus/morpho-ui/es/components/DocumentTableListCard";
3
- import Scrollbars from "react-custom-scrollbars-2";
4
- import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
5
- import OfficerStatusFilter from "../../controls/OfficerStatusFilter";
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import TableCellDetail, { columnsListDetail } from "./TableCellDetail";
3
+ import TableCellSimple, { columnsSimpleList } from "./TableCellSimple";
6
4
  import TableCell, { columnsList } from "./TableCell";
5
+ import { Badge, Button, Menu, Dropdown, Modal } from "antd";
6
+ import { State } from "./state";
7
+ import { useCorporate } from "../../../../../../data/corporate";
8
+ import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
9
+ import { useOfficerListEffect, useOfficerStore } from "../../../../../../data/officer";
10
+ import { useDeepMemo, useApplicationContext } from "@voplus/morpho-data";
11
+ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
12
+ import { faPrintSolid, faEllipsisVerticalSolid, faTrashSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
13
+ import { useAutoUpdateListData } from "@voplus/morpho-document-core";
14
+ import { observe, useRenderOnChange, useAsideContentContext } from "@voplus/morpho-ui";
15
+ import DocumentTableListCard from "@voplus/morpho-ui/es/components/DocumentTableListCard";
7
16
  import TableListCard from "@voplus/morpho-ui/es/components/TableListCard";
8
- import { observe } from "@voplus/morpho-ui";
17
+ import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
9
18
  import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
10
- import { Badge, Menu, Button } from "antd";
11
- import OfficerRegisterContainer from "./OfficerRegisterContainer";
19
+ import OfficerStatusFilter from "../../controls/OfficerStatusFilter";
20
+ import OfficerPropertiesView from "../OfficerPropertiesView";
21
+ import OfficerQuickViewDialog from "../OfficerQuickView";
22
+ import SelectOfficerForm from "../SelectOfficerForm";
23
+ import Scrollbars from "react-custom-scrollbars-2";
24
+ import classnames from "classnames";
25
+ import "./index.css";
12
26
  const OfficerTableListCard = (props) => {
13
- return observe(() => (React.createElement(OfficerRegisterContainer, { ...props, children: ({ state, totalCount, setVisible, handleDelete, corporate, user }) => {
14
- return (React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: "officer-table-list-header card",
27
+ const { officersRegisterId, corporateId, isFilterPresent, tableDetail } = props;
28
+ const { user } = useApplicationContext();
29
+ const [visible, setVisible] = useState(false);
30
+ const [officerTotal, setOfficerTotal] = useState(0);
31
+ const [height, setHeight] = useState(0);
32
+ const ref = useRef(null);
33
+ const officerStore = useOfficerStore();
34
+ const asideContext = useAsideContentContext();
35
+ const corporate = useCorporate(corporateId, { includes: "permissions" });
36
+ const state = useDeepMemo(() => new State(), [officersRegisterId]);
37
+ /** 建立 ListView 和useDocumentListEffect所需的ListDataState. 会根据state.id重建所以不需reset. */
38
+ const list = useCreateListDataState({
39
+ filterDefaults: {
40
+ filters: filters(),
41
+ includes: "tags,permissions",
42
+ },
43
+ }, [officersRegisterId]);
44
+ useEffect(() => {
45
+ if (ref.current) {
46
+ setHeight(ref.current.offsetHeight);
47
+ }
48
+ }, [ref]);
49
+ /** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
50
+ useAutoUpdateListData(list, (d) => d.parentId === officersRegisterId);
51
+ useRenderOnChange(() => list.filters.options);
52
+ /** 把ListDataState传给useOfficerListEffect,使之可以自動更新loading, hasmore. */
53
+ useOfficerListEffect(list, (result, total) => {
54
+ list.union(result);
55
+ setOfficerTotal(total !== null && total !== void 0 ? total : 0);
56
+ }, {
57
+ Total: true,
58
+ ...list.filters.options,
59
+ });
60
+ // spec:1777 — CSP: Officers table header offers Send Form, Print, and Delete Register actions only with edit permission
61
+ const items = [
62
+ {
63
+ key: "print",
64
+ label: (React.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: window.location.origin + `/officer/print/${corporateId}` }, "Print")),
65
+ icon: React.createElement(FAIcon, { icon: faPrintSolid }),
66
+ },
67
+ {
68
+ key: "delete-register",
69
+ label: React.createElement("span", null, "Delete"),
70
+ icon: React.createElement(FAIcon, { icon: faTrashSolid }),
71
+ onClick: () => {
72
+ Modal.confirm({
73
+ title: "Confirm Delete",
74
+ content: "Are you sure you want to delete this register?",
75
+ okText: "Delete",
76
+ cancelText: "Cancel",
77
+ onOk: () => { var _a; return (_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props, corporateId, officersRegisterId); },
78
+ });
79
+ },
80
+ },
81
+ ];
82
+ return observe(() => (React.createElement(React.Fragment, null,
83
+ React.createElement(ListDataContext.Provider, { value: list },
84
+ React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: classnames("officer-table-list-header", { card: props.type === "card" }),
15
85
  // spec:1778 — CSP: Active officers register defaults to a Present-only filter
16
86
  filterViewProps: {
17
87
  columns: [
18
- React.createElement(OfficerStatusFilter, { key: "OfficerStatusFilter", defaultValue: props.isFilterPresent ? ["Yes"] : [] }),
88
+ React.createElement(OfficerStatusFilter, { key: "OfficerStatusFilter", defaultValue: isFilterPresent ? ["Yes"] : [] }),
19
89
  ],
20
90
  }, preExtra: () => (React.createElement("div", { className: "title" },
21
91
  "Officers Register",
22
92
  " ",
23
- totalCount ? React.createElement(Badge, { count: totalCount, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null,
24
- user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { trigger: ["click"], btnType: "icon", overlay: React.createElement(Menu, { onClick: state.onSelect, items: [
93
+ officerTotal ? React.createElement(Badge, { count: officerTotal, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null,
94
+ props.type !== "card" && user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")),
95
+ user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { trigger: ["click"], btnType: props.type === "card" ? "icon" : "text", overlay: React.createElement(Menu, { onClick: state.onSelect, items: [
25
96
  { key: "Director", label: "Director" },
26
97
  { key: "Managing Director", label: "Managing Director" },
27
98
  { key: "Nominee Director", label: "Nominee Director" },
@@ -33,15 +104,22 @@ const OfficerTableListCard = (props) => {
33
104
  { key: "Auditor", label: "Auditor" },
34
105
  { key: "Manager", label: "Manager" },
35
106
  ] }) })),
36
- user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")))) }) },
37
- React.createElement("div", { className: "officer-table-list-card", style: { height: 298 } },
107
+ props.type !== "card" && user.can("edit", corporate.p) && (React.createElement(Dropdown, { classNames: { root: "officer-table-list-dropdown" }, trigger: ["click", "hover"], menu: { items } },
108
+ React.createElement(Button, null,
109
+ React.createElement(FAIcon, { icon: faEllipsisVerticalSolid })))),
110
+ props.type === "card" && user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")))), ...props.listHeaderToolProps }) },
111
+ React.createElement("div", { ref: ref, className: "officer-table-list-card", style: { height: props.type === "card" ? 298 : "100%" } },
38
112
  React.createElement(Scrollbars, { autoHide: true },
39
113
  React.createElement(TableListCard
40
114
  // spec:1774 — CSP: Officers table renders three column layouts depending on view density
41
115
  , {
42
116
  // spec:1774 — CSP: Officers table renders three column layouts depending on view density
43
117
  tableListProps: {
44
- columns: columnsList.map((col) => {
118
+ columns: (tableDetail
119
+ ? (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
120
+ ? columnsSimpleList
121
+ : columnsListDetail
122
+ : columnsList).map((col) => {
45
123
  return {
46
124
  ...col,
47
125
  onCell: (record, rowIndex) => {
@@ -54,22 +132,62 @@ const OfficerTableListCard = (props) => {
54
132
  };
55
133
  }),
56
134
  components: {
57
- body: { cell: TableCell },
135
+ body: {
136
+ cell: tableDetail
137
+ ? (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
138
+ ? TableCellSimple
139
+ : TableCellDetail
140
+ : TableCell,
141
+ },
58
142
  },
59
- scrollH: 240,
143
+ scrollH: props.type === "card" ? 240 : height - 72,
60
144
  // spec:1775 — CSP: Clicking an officer row opens an aside Properties panel or a Quick View dialog
61
145
  tableProps: {
62
146
  onRow: (record) => {
63
147
  return {
64
148
  onClick: (e) => {
65
- state.quickId = record.id;
66
- state.visibleQuickView = true;
149
+ if (tableDetail) {
150
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(OfficerPropertiesView, { id: record.id }), {
151
+ span: 12,
152
+ });
153
+ }
154
+ else {
155
+ state.quickId = record.id;
156
+ state.visibleQuickView = true;
157
+ }
67
158
  },
68
159
  };
69
160
  },
70
161
  },
71
- } })))));
72
- } })));
162
+ }, ...props.tableCardProps }))))),
163
+ state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => {
164
+ state.addAble = false;
165
+ } })),
166
+ visible && (React.createElement(SelectOfficerForm, { parentId: officersRegisterId, onCancel: () => setVisible(false) })),
167
+ state.visibleQuickView && (React.createElement(OfficerQuickViewDialog, { id: state.quickId, visible: true, onCancel: () => {
168
+ state.visibleQuickView = false;
169
+ } })))));
170
+ function filters() {
171
+ const filter = [
172
+ { c: "ParentNodeId", o: "=", l: "And", v1: officersRegisterId },
173
+ ];
174
+ if (isFilterPresent) {
175
+ filter.push({ c: "Present", o: "=", l: "And", v1: "Yes" });
176
+ }
177
+ return filter;
178
+ }
179
+ /** 新增officerItem */
180
+ async function onSave(unit) {
181
+ /** SelectLegalContactDialog 选择/新增有identity信息的unit */
182
+ if (unit) {
183
+ const res = await officerStore.create({
184
+ data: { RegisterId: officersRegisterId, UnitId: unit[0].id, Position: state.position },
185
+ error: "message",
186
+ });
187
+ list.union([res]);
188
+ }
189
+ state.addAble = false;
190
+ }
73
191
  };
74
192
  export default OfficerTableListCard;
75
193
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,M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H,6BAAK,SAAS,EAAC,yBAAyB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;oBAC9D,oBAAC,UAAU,IAAC,QAAQ;wBACnB,oBAAC,aAAa;wBACb,yFAAyF;;4BAAzF,yFAAyF;4BACzF,cAAc,EAAE;gCACf,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;oCAChC,OAAO;wCACN,GAAG,GAAG;wCACN,MAAM,EAAE,CAAC,MAAW,EAAE,QAAgB,EAAE,EAAE;4CACzC,OAAO;gDACN,MAAM;gDACN,SAAS,EAAE,GAAG,CAAC,SAAS;gDACxB,QAAQ,EAAE,QAAQ;6CAClB,CAAC;wCACH,CAAC;qCACD,CAAC;gCACH,CAAC,CAAC;gCACF,UAAU,EAAE;oCACX,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;iCACzB;gCACD,OAAO,EAAE,GAAG;gCACZ,kGAAkG;gCAClG,UAAU,EAAE;oCACX,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE;wCACjB,OAAO;4CACN,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gDACd,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;gDAC1B,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;4CAC/B,CAAC;yCACD,CAAC;oCACH,CAAC;iCACD;6BACD,GACA,CACU,CACR,CACiB,CACxB,CAAC;QACH,CAAC,GACA,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE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IAAI,eAAe,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,oBAAoB;IACpB,KAAK,UAAU,MAAM,CAAC,IAAmD;QACxE,qDAAqD;QACrD,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC;gBACrC,IAAI,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;gBACtF,KAAK,EAAE,SAAS;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACnB,CAAC;QAED,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
+ import "./index.css";
3
+ export declare function getColor(name: string): string;
2
4
  declare const OfficerStatusLabel: (props: {
3
5
  status?: string;
4
6
  className?: string;
@@ -1,29 +1,46 @@
1
1
  import React from "react";
2
2
  import classnames from "classnames";
3
+ import "./index.css";
4
+ import { Tooltip } from "antd";
5
+ import { faBanSolid, faHourglassSolid, faPenSolid, faCircleCheckSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
3
6
  import { observe } from "@voplus/morpho-ui";
7
+ export function getColor(name) {
8
+ let color = "";
9
+ switch (name) {
10
+ case "Present":
11
+ color = "#217EB2";
12
+ break;
13
+ case "Need Identity":
14
+ color = "#868686";
15
+ break;
16
+ case "Past":
17
+ color = "#B22121";
18
+ break;
19
+ case "Draft":
20
+ color = "#AA8900";
21
+ break;
22
+ default:
23
+ break;
24
+ }
25
+ return color;
26
+ }
4
27
  // spec:1770 — CSP: Officer status icon shows Present, Past, Need Identity, or Draft with distinct iconography
5
28
  const OfficerStatusLabel = (props) => {
6
- const { status, className } = props;
7
- return observe(() => {
8
- const getColors = () => {
9
- switch (status === null || status === void 0 ? void 0 : status.replace(/\s+/g, "")) {
10
- case "Present":
11
- return { text: "text-green-data", dot: "bg-green-data" };
12
- case "Need Identity":
13
- return { text: "text-brown-data", dot: "bg-brown-data" };
14
- case "Past":
15
- return { text: "text-bg-red", dot: "bg-bg-red" };
16
- case "Draft":
17
- return { text: "text-font-grey", dot: "bg-font-grey" };
18
- default:
19
- return { text: "text-font-grey", dot: "bg-font-grey" };
20
- }
29
+ var _a;
30
+ const item = transformStatus((_a = props.status) !== null && _a !== void 0 ? _a : "");
31
+ return observe(() => (React.createElement(Tooltip, { title: item.displayName, color: getColor(item.displayName) },
32
+ React.createElement("span", { className: classnames("officer-status-button2", props.className, item.colorName) }, item.displayName ? (React.createElement(React.Fragment, null,
33
+ item.displayName === "Present" && (React.createElement(FAIcon, { icon: faCircleCheckSolid, color: getColor(item.displayName) })),
34
+ item.displayName === "Need Identity" && (React.createElement(FAIcon, { icon: faBanSolid, color: getColor(item.displayName) })),
35
+ item.displayName === "Past" && (React.createElement(FAIcon, { icon: faHourglassSolid, color: getColor(item.displayName) })),
36
+ item.displayName === "Draft" && (React.createElement(FAIcon, { icon: faPenSolid, color: getColor(item.displayName) })))) : null))));
37
+ function transformStatus(name, displayName) {
38
+ return {
39
+ name: name,
40
+ displayName: displayName || (name === null || name === void 0 ? void 0 : name.split(/(?=[A-Z])/).join(" ")),
41
+ colorName: `${name === null || name === void 0 ? void 0 : name.split(/(?=[A-Z])/).join("-").toLowerCase()}`,
21
42
  };
22
- const colors = getColors();
23
- return status ? (React.createElement("span", { className: classnames("inline-flex items-center gap-1 py-1 rounded-xl text-xs font-bold uppercase", colors.text, className) },
24
- React.createElement("i", { className: classnames("inline-block w-1.5 h-1.5 rounded-full", colors.dot) }),
25
- React.createElement("span", null, status))) : (React.createElement("span", { className: "text-font-primary" }, "__"));
26
- });
43
+ }
27
44
  };
28
45
  export default OfficerStatusLabel;
29
46
  //# sourceMappingURL=OfficerStatusLabel2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OfficerStatusLabel2.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,8GAA8G;AAC9G,MAAM,kBAAkB,GAAG,CAAC,KAA8C,EAAE,EAAE;IAC7E,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEpC,OAAO,OAAO,CAAC,GAAG,EAAE;QACnB,MAAM,SAAS,GAAG,GAAG,EAAE;YACtB,QAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;gBACrC,KAAK,SAAS;oBACb,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;gBAC1D,KAAK,eAAe;oBACnB,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;gBAC1D,KAAK,MAAM;oBACV,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;gBAClD,KAAK,OAAO;oBACX,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;gBACxD;oBACC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;YACzD,CAAC;QACF,CAAC,CAAC;QAEF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,CACf,8BACC,SAAS,EAAE,UAAU,CACpB,4EAA4E,EAC5E,MAAM,CAAC,IAAI,EACX,SAAS,CACT;YAED,2BAAG,SAAS,EAAE,UAAU,CAAC,uCAAuC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAI;YACjF,kCAAO,MAAM,CAAQ,CACf,CACP,CAAC,CAAC,CAAC,CACH,8BAAM,SAAS,EAAC,mBAAmB,SAAU,CAC7C,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"OfficerStatusLabel2.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EACN,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,UAAU,QAAQ,CAAC,IAAY;IACpC,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,SAAS;YACb,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACP,KAAK,eAAe;YACnB,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACP,KAAK,MAAM;YACV,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACP,KAAK,OAAO;YACX,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACP;YACC,MAAM;IACR,CAAC;IACD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E,IAAI;YACV,WAAW,EAAE,WAAW,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;YAC9D,SAAS,EAAE,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CACf,KAAK,CAAC,WAAW,EAClB,IAAI,CAAC,GAAG,EACR,WAAW,EAAE,EAAE;SACjB,CAAC;IACH,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -64,7 +64,7 @@
64
64
  }
65
65
  }
66
66
 
67
- .certificate-content {
67
+ .certificate-conetnt {
68
68
  display: flex;
69
69
  align-items: center;
70
70
  justify-content: space-between;
@@ -145,7 +145,7 @@ const ShareTransactionItems = (props) => {
145
145
  width: "200px",
146
146
  render: (cell) => (React.createElement(InlineEdit, { defaultValue: cell.data.consideration, editable: false, content: ({ store }) => observe(() => {
147
147
  var _a, _b, _c, _d;
148
- return (React.createElement("div", { className: "certificate-content" }, cell.data.newCertificate || ((_a = cell.data.cancelledCertificates) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement("div", { className: "share-transaction-table-share" },
148
+ return (React.createElement("div", { className: "certificate-conetnt" }, cell.data.newCertificate || ((_a = cell.data.cancelledCertificates) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement("div", { className: "share-transaction-table-share" },
149
149
  cell.data.newCertificate && (React.createElement("div", { className: "new-certificate" },
150
150
  ((_b = cell.data.cancelledCertificates) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (React.createElement("div", { className: "new-certificate-title" }, "New")) : null,
151
151
  React.createElement(DocumentReference, { id: (_c = cell.data.newCertificate) === null || _c === void 0 ? void 0 : _c.id }))),
@@ -19,7 +19,7 @@ import VerificationInformation from "@voplus/morpho-org/es/modules/verification/
19
19
  const ShareTransactionProperties = (props) => {
20
20
  /** 加class name 为了方便做integration tests */
21
21
  const classId = "shareTransaction-properties";
22
- const { id, headerVisible, documentProperties, shareTransactionTitle = "SHARE TRANSACTION PROPERTIES", documentTitle = "DOCUMENT PROPERTIES", shareTransactionProperties = [
22
+ const { id, headerVisible, documentProperties, shareTransactionTitle = "SHARETRANSACTION PROPERTIES", documentTitle = "DOCUMENT PROPERTIES", shareTransactionProperties = [
23
23
  { name: "Date" },
24
24
  { name: "Transaction Type" },
25
25
  { name: "Currency" },