@voplus/morpho-csp 10.0.10 → 10.0.12

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 (121) hide show
  1. package/es/components/CorporateUnitSelectDialog/index.d.ts +1 -1
  2. package/es/components/CorporateUnitSelectDialog/index.js +12 -4
  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 +9 -6
  6. package/es/components/CorporateUnitSelectDialog/state.js.map +1 -1
  7. package/es/components/RegisterTable/index.d.ts +31 -0
  8. package/es/components/RegisterTable/index.js +55 -0
  9. package/es/components/RegisterTable/index.js.map +1 -0
  10. package/es/components/StatusLabel/index.d.ts +36 -0
  11. package/es/components/StatusLabel/index.js +16 -0
  12. package/es/components/StatusLabel/index.js.map +1 -0
  13. package/es/data/clda-form/CLDAFormContent.js +3 -1
  14. package/es/data/clda-form/CLDAFormContent.js.map +1 -1
  15. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js +1 -3
  16. package/es/modules/corporate/background-investigation/risk-profile/controls/RiskProfileLevelLabel/index.js.map +1 -1
  17. package/es/modules/corporate/company/components/CorporateList/index.js +1 -1
  18. package/es/modules/corporate/company/components/CorporateList/index.js.map +1 -1
  19. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.d.ts +13 -1
  20. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js +94 -39
  21. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js.map +1 -1
  22. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.d.ts +0 -1
  23. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js +66 -95
  24. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js.map +1 -1
  25. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js +23 -13
  26. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/ControllerStatusLabel2.js.map +1 -1
  27. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.d.ts +0 -1
  28. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js +1 -8
  29. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.js.map +1 -1
  30. package/es/modules/corporate/company/member-register/components/{MemberTableListCard → MemberTableList}/TableCellDetail.d.ts +13 -1
  31. package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js +125 -0
  32. package/es/modules/corporate/company/member-register/components/MemberTableList/TableCellDetail.js.map +1 -0
  33. package/es/modules/corporate/company/member-register/components/MemberTableList/index.d.ts +2 -3
  34. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js +63 -9
  35. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js.map +1 -1
  36. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.d.ts +21 -0
  37. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js +86 -0
  38. package/es/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.js.map +1 -0
  39. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.d.ts +1 -16
  40. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js +17 -133
  41. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js.map +1 -1
  42. package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js +15 -12
  43. package/es/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.js.map +1 -1
  44. package/es/modules/corporate/company/officer-register/components/{OfficerTableListCard → OfficerTableList}/TableCellDetail.d.ts +13 -1
  45. package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js +140 -0
  46. package/es/modules/corporate/company/officer-register/components/OfficerTableList/TableCellDetail.js.map +1 -0
  47. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.d.ts +2 -3
  48. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js +74 -11
  49. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js.map +1 -1
  50. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.d.ts +23 -0
  51. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js +87 -0
  52. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/OfficerRegisterContainer.js.map +1 -0
  53. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.d.ts +3 -24
  54. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js +22 -140
  55. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js.map +1 -1
  56. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.d.ts +0 -2
  57. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js +20 -37
  58. package/es/modules/corporate/company/officer-register/controls/OfficerStatusLabel/OfficerStatusLabel2.js.map +1 -1
  59. package/es/modules/corporate/company/pages/RegisterTablePage/index.d.ts +10 -0
  60. package/es/modules/corporate/company/pages/RegisterTablePage/index.js +152 -0
  61. package/es/modules/corporate/company/pages/RegisterTablePage/index.js.map +1 -0
  62. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.css +1 -1
  63. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItems/index.js +1 -1
  64. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js +1 -1
  65. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionProperties/index.js.map +1 -1
  66. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js +5 -2
  67. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTabs/index.js.map +1 -1
  68. package/es/modules/corporate/company/share-transactions-register/pages/ShareTransactionDefaultView/index.css +1 -1
  69. package/es/modules/corporate/filing-record/components/FilingList/index.js +1 -1
  70. package/es/modules/corporate/filing-record/components/FilingList/index.js.map +1 -1
  71. package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.d.ts +1 -0
  72. package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.js +1 -0
  73. package/es/modules/corporate/filing-record/filing-year/components/FilingYearCard/index.js.map +1 -1
  74. package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.d.ts +1 -0
  75. package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.js +1 -0
  76. package/es/modules/corporate/filing-record/filing-year/components/FilingYearListCard/index.js.map +1 -1
  77. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.d.ts +10 -0
  78. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.js +48 -0
  79. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/YearNode.js.map +1 -0
  80. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.d.ts +7 -0
  81. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.js +94 -0
  82. package/es/modules/corporate/filing-record/filing-year/components/FilingYearTimeline/index.js.map +1 -0
  83. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.d.ts +33 -0
  84. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.js +121 -0
  85. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/TableCell.js.map +1 -0
  86. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.d.ts +1 -0
  87. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.js +9 -0
  88. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/getDiffDay.js.map +1 -0
  89. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.d.ts +5 -0
  90. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.js +48 -0
  91. package/es/modules/corporate/filing-record/filing-year/components/FilingsTable/index.js.map +1 -0
  92. package/es/modules/corporate/virtual-address/receipents/components/ReceipentsSelect/state.js +1 -2
  93. package/es/modules/corporate/virtual-address/receipents/components/ReceipentsSelect/state.js.map +1 -1
  94. package/es/modules/corporate/virtual-address-mail/components/MailTypeSelect/index.js +10 -10
  95. package/es/modules/corporate/virtual-address-mail/components/MailTypeSelect/index.js.map +1 -1
  96. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js +30 -7
  97. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailItem/index.js.map +1 -1
  98. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js +1 -1
  99. package/es/modules/corporate/virtual-address-mail/components/VirtualAddressMailList/index.js.map +1 -1
  100. package/package.json +2 -1
  101. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.d.ts +0 -13
  102. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js +0 -63
  103. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCellSimple.js.map +0 -1
  104. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.css +0 -122
  105. package/es/modules/corporate/company/controls/CorporateStatusLabel/index.css +0 -22
  106. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js +0 -77
  107. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js.map +0 -1
  108. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.d.ts +0 -13
  109. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js +0 -52
  110. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellSimple.js.map +0 -1
  111. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js +0 -87
  112. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js.map +0 -1
  113. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.d.ts +0 -13
  114. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js +0 -65
  115. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellSimple.js.map +0 -1
  116. package/es/page/RegisterTablePage/Controller.d.ts +0 -3
  117. package/es/page/RegisterTablePage/Controller.js +0 -134
  118. package/es/page/RegisterTablePage/Controller.js.map +0 -1
  119. package/es/page/RegisterTablePage/index.d.ts +0 -3
  120. package/es/page/RegisterTablePage/index.js +0 -63
  121. package/es/page/RegisterTablePage/index.js.map +0 -1
@@ -1,14 +1,68 @@
1
1
  import React from "react";
2
- import { observe } from "@voplus/morpho-ui";
3
- import MemberTableListCard from "../MemberTableListCard";
4
- import "../../../../../../style/common.css";
2
+ import TableCellDetail, { columnsListDetail, columnsSimpleList } from "./TableCellDetail";
3
+ import { Button, Dropdown } from "antd";
4
+ import { faPrintSolid, faEllipsisVerticalSolid, faTrashSolid, faFilterSolid, faPaperPlaneSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
5
+ import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
6
+ import { observe, useAsideContentContext } from "@voplus/morpho-ui";
7
+ import MemberStatusFilter from "../../controls/MemberStatusFilter";
8
+ import MemberPropertiesView from "../CompanyMemberPropertiesView";
9
+ import RegisterTable from "../../../../../../components/RegisterTable";
10
+ import MemberRegisterContainer from "../MemberTableListCard/MemberRegisterContainer";
5
11
  const MemberTableList = (props) => {
6
- return observe(() => (React.createElement("div", { className: "registers-page-item" },
7
- React.createElement(MemberTableListCard, { ...props, tableDetail: true, listHeaderToolProps: {
8
- searchHeader: true,
9
- preExtra: () => React.createElement(React.Fragment, null),
10
- searchOptions: { placeholder: "Search in register member" },
11
- } }))));
12
+ const asideContext = useAsideContentContext();
13
+ return observe(() => (React.createElement(MemberRegisterContainer, { ...props }, ({ list, state, dataSource, totalCount, setVisible, handleDelete, corporate, user }) => {
14
+ // spec:1756 — CSP: Members register Add, Send Form, and ellipsis actions require corporate edit permission
15
+ const items = [
16
+ {
17
+ key: "print",
18
+ label: (React.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: window.location.origin + `/member/print/${props.corporateId}` }, "Print")),
19
+ icon: React.createElement(FAIcon, { icon: faPrintSolid }),
20
+ },
21
+ {
22
+ key: "delete-register",
23
+ label: React.createElement("span", null, "Delete"),
24
+ icon: React.createElement(FAIcon, { icon: faTrashSolid }),
25
+ onClick: handleDelete,
26
+ },
27
+ ];
28
+ // spec:1759 — CSP: Members register adapts column set based on detail mode and aside availability
29
+ const columns = ((asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent) ? columnsSimpleList : columnsListDetail).map((col) => {
30
+ return {
31
+ ...col,
32
+ onCell: (record, rowIndex) => {
33
+ return {
34
+ record,
35
+ dataIndex: col.dataIndex,
36
+ rowIndex: rowIndex,
37
+ };
38
+ },
39
+ };
40
+ });
41
+ return (React.createElement("div", { className: "h-full flex flex-col" },
42
+ React.createElement(ListHeaderTool, { addAble: false, sortable: false, className: "p-5! [&_.header-tool-space]:gap-3.5 [&_button]:ml-0! [&_.ant-input-outlined]:h-auto! [&_.ant-input-outlined]:bg-bg-blue! [&_.ant-input-outlined]:border-border! [&_.ant-input-outlined:hover]:border-font-secondary! [&_.ant-input-outlined:focus]:border-font-secondary! [&_.ant-input-outlined:focus-within]:border-font-secondary! [&_button]:font-semibold!", searchOptions: { placeholder: "Search in register controller" },
43
+ // spec:1755 — CSP: Members register list filters by parent register and optional Active status
44
+ filterViewProps: {
45
+ icon: (React.createElement(Button, null,
46
+ React.createElement(FAIcon, { icon: faFilterSolid }))),
47
+ columns: [
48
+ React.createElement(MemberStatusFilter, { key: "MemberStatusFilter", defaultValue: props.active ? ["Active"] : [] }),
49
+ ],
50
+ }, rightExtra: () => (React.createElement(React.Fragment, null,
51
+ user.can("edit", corporate.p) && (React.createElement(Button, { icon: React.createElement(FAIcon, { icon: faPaperPlaneSolid }), className: "text-font-primary font-semibold uppercase", onClick: () => setVisible(true) }, "Send Form")),
52
+ React.createElement(Button, { className: "primary-button", onClick: () => (state.addAble = true) }, "+ NEW ENTRY"),
53
+ React.createElement(Dropdown, { trigger: ["click", "hover"], menu: { items } },
54
+ React.createElement(Button, { className: "w-[45px]" },
55
+ React.createElement(FAIcon, { icon: faEllipsisVerticalSolid }))))) }),
56
+ React.createElement(RegisterTable, { columns: columns, dataSource: dataSource, loading: list.loading, onLoadMore: () => list.triggerNextPage(), hasMore: dataSource.length < totalCount, components: {
57
+ body: {
58
+ cell: TableCellDetail,
59
+ },
60
+ }, onRowClick: (record) => {
61
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(MemberPropertiesView, { id: record.id }), {
62
+ span: 12,
63
+ });
64
+ } })));
65
+ })));
12
66
  };
13
67
  export default MemberTableList;
14
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,oCAAoC,CAAC;AAE5C,MAAM,eAAe,GAAG,CAAC,KAAuD,EAAE,EAAE;IACnF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,qBAAqB;QACnC,oBAAC,mBAAmB,OACf,KAAK,EACT,WAAW,QACX,mBAAmB,EAAE;gBACpB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,yCAAK;gBACrB,aAAa,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE;aAC3D,GACA,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KA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ACzC,SAAS,EAAC,2CAA2C,EACrD,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,gBAGvB,CACT;oBACD,oBAAC,MAAM,IAAC,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,kBAE/D;oBACT,oBAAC,QAAQ,IAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE;wBACrD,oBAAC,MAAM,IAAC,SAAS,EAAC,UAAU;4BAC3B,oBAAC,MAAM,IAAC,IAAI,EAAE,uBAAuB,GAAI,CACjC,CACC,CACT,CACH,GACA;YAGF,oBAAC,aAAa,IACb,OAAO,EAAE,OAAc,EACvB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EACxC,OAAO,EAAE,UAAU,CAAC,MAAM,GAAG,UAAU,EACvC,UAAU,EAAE;oBACX,IAAI,EAAE;wBACL,IAAI,EAAE,eAAe;qBACrB;iBACD,EACD,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE;oBACtB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,oBAAoB,IAAC,EAAE,EAAE,MAAM,CAAC,EAAG,GAAI,EAAE;wBACjE,IAAI,EAAE,EAAE;qBACR,CAAC,CAAC;gBACJ,CAAC,GACA,CACG,CACN,CAAC;IACH,CAAC,CACwB,CAC1B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React, { ReactNode } from "react";
2
+ import { IMember } from "../../../../../../data/member";
3
+ import { State } from "./state";
4
+ export interface MemberRegisterContainerProps {
5
+ membersRegisterId: string;
6
+ corporateId: string;
7
+ active?: boolean;
8
+ onDelete?: (corporateId: string, membersRegisterId: string) => void;
9
+ children: (context: {
10
+ list: any;
11
+ state: State;
12
+ dataSource: IMember[];
13
+ totalCount: number;
14
+ setVisible: (v: boolean) => void;
15
+ handleDelete: () => void;
16
+ corporate: any;
17
+ user: any;
18
+ }) => ReactNode;
19
+ }
20
+ declare const MemberRegisterContainer: (props: MemberRegisterContainerProps) => React.JSX.Element;
21
+ export default MemberRegisterContainer;
@@ -0,0 +1,86 @@
1
+ import React, { useState } from "react";
2
+ import { useDeepMemo, useApplicationContext } from "@voplus/morpho-data";
3
+ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
4
+ import { useMemberListEffect, useMemberStore } from "../../../../../../data/member";
5
+ import { useAutoUpdateListData } from "@voplus/morpho-document-core";
6
+ import { observe, useRenderOnChange } from "@voplus/morpho-ui";
7
+ import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
8
+ import SelectMemberForm from "../SelectMemberSendForm";
9
+ import MemberQuickViewDialog from "../CompanyMemberQuickView";
10
+ import { State } from "./state";
11
+ import { useCorporate } from "../../../../../../data/corporate";
12
+ import { Modal } from "antd";
13
+ const MemberRegisterContainer = (props) => {
14
+ const { membersRegisterId, corporateId, active, children, onDelete } = props;
15
+ const { user } = useApplicationContext();
16
+ const memberStore = useMemberStore();
17
+ const corporate = useCorporate(corporateId, { includes: "permissions" });
18
+ const [visible, setVisible] = useState(false);
19
+ const [totalCount, setTotalCount] = useState(0);
20
+ const state = useDeepMemo(() => new State(), [membersRegisterId]);
21
+ // spec:1755 — CSP: Members register list filters by parent register and optional Active status
22
+ function filters() {
23
+ let filter = [{ c: "ParentNodeId", o: "=", l: "And", v1: membersRegisterId }];
24
+ if (active) {
25
+ filter.push({ c: "Status", o: "=", l: "And", v1: "Active" });
26
+ }
27
+ return filter;
28
+ }
29
+ const list = useCreateListDataState({
30
+ filterDefaults: {
31
+ filters: filters(),
32
+ includes: "permissions",
33
+ },
34
+ }, [membersRegisterId]);
35
+ useAutoUpdateListData(list, (d) => d.parentId === membersRegisterId);
36
+ useRenderOnChange(() => list.filters.options);
37
+ useMemberListEffect(list, (result, total) => {
38
+ list.union(result);
39
+ setTotalCount(total !== null && total !== void 0 ? total : 0);
40
+ }, {
41
+ Total: true,
42
+ ...list.filters.options,
43
+ });
44
+ // spec:1757 — CSP: Adding a member from the company register selects a unit and creates a member record
45
+ async function onSave(unit) {
46
+ if (unit) {
47
+ const res = await memberStore.create({
48
+ data: { RegisterId: membersRegisterId, UnitId: unit[0].id },
49
+ error: "message",
50
+ });
51
+ list.union([res]);
52
+ }
53
+ state.addAble = false;
54
+ }
55
+ const handleDelete = () => {
56
+ Modal.confirm({
57
+ title: "Confirm Delete",
58
+ content: "Are you sure you want to delete this register?",
59
+ okText: "Delete",
60
+ cancelText: "Cancel",
61
+ onOk: () => onDelete === null || onDelete === void 0 ? void 0 : onDelete(corporateId, membersRegisterId),
62
+ });
63
+ };
64
+ return observe(() => (React.createElement(React.Fragment, null,
65
+ React.createElement(ListDataContext.Provider, { value: list }, children({
66
+ list,
67
+ state,
68
+ dataSource: list.data.map((e, i) => {
69
+ return { key: i, ...e };
70
+ }),
71
+ totalCount,
72
+ setVisible,
73
+ handleDelete,
74
+ corporate,
75
+ user,
76
+ })),
77
+ state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => {
78
+ state.addAble = false;
79
+ } })),
80
+ visible && (React.createElement(SelectMemberForm, { parentId: membersRegisterId, onCancel: () => setVisible(false) })),
81
+ state.visibleQuickView && (React.createElement(MemberQuickViewDialog, { id: state.quickId, visible: true, onCancel: () => {
82
+ state.visibleQuickView = false;
83
+ } })))));
84
+ };
85
+ export default MemberRegisterContainer;
86
+ //# sourceMappingURL=MemberRegisterContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemberRegisterContainer.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/MemberRegisterContainer.tsx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QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,CACpF;QACA,KAAK,CAAC,gBAAgB,IAAI,CAC1B,oBAAC,qBAAqB,IACrB,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,GAAG,EAAE;gBACd,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;YAChC,CAAC,GACA,CACF,CACC,CACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -1,24 +1,9 @@
1
- import React, { ReactNode } from "react";
2
- import { ListHeaderToolProps } from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
1
+ import React from "react";
3
2
  import "./index.css";
4
3
  export type MemberListProps = {
5
4
  membersRegisterId: string;
6
5
  corporateId: string;
7
- /** 选中的 Corporate Unit list */
8
- /** 是否需要filter Status active */
9
6
  active?: boolean;
10
- tableCardProps?: {
11
- className?: string;
12
- isHeader?: boolean;
13
- title?: ReactNode;
14
- };
15
- /** 头部的btn显示默认样式 还是 card 的样式 */
16
- type?: "card";
17
- /** 是否显示详细的table内容 */
18
- tableDetail?: boolean;
19
- listHeaderToolProps?: ListHeaderToolProps;
20
- onRedirect?: () => void;
21
- onSelectCorporateUnit?: (params?: any) => void;
22
7
  onDelete?: (corporateId: string, membersRegisterId: string) => void;
23
8
  };
24
9
  declare const MemberTableListCard: (props: MemberListProps) => React.JSX.Element;
@@ -1,87 +1,19 @@
1
- import React, { useState, useRef, useEffect } from "react";
2
- import TableCellSimple, { columnsSimpleList } from "./TableCellSimple";
3
- import TableCellDetail, { columnsListDetail } from "./TableCellDetail";
1
+ import React from "react";
4
2
  import TableCell, { columnsList } from "./TableCell";
5
- import { Badge, Button, Dropdown, Modal } from "antd";
6
- import { State } from "./state";
7
- import { useCorporate } from "../../../../../../data/corporate";
8
- import { faPrintSolid, faEllipsisVerticalSolid, faTrashSolid, FontAwesomeIcon as FAIcon, } from "@voplus/morpho-ui/es/faIcons";
3
+ import { Badge, Button } from "antd";
9
4
  import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
10
- import { useDeepMemo, useApplicationContext } from "@voplus/morpho-data";
11
- import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
12
- import { useMemberListEffect, useMemberStore } from "../../../../../../data/member";
13
- import { useAutoUpdateListData } from "@voplus/morpho-document-core";
14
- import { observe, useRenderOnChange, useAsideContentContext } from "@voplus/morpho-ui";
5
+ import { observe } from "@voplus/morpho-ui";
15
6
  import DocumentTableListCard from "@voplus/morpho-ui/es/components/DocumentTableListCard";
16
7
  import TableListCard from "@voplus/morpho-ui/es/components/TableListCard";
17
- import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
18
8
  import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
19
9
  import MemberStatusFilter from "../../controls/MemberStatusFilter";
20
- import MemberQuickViewDialog from "../CompanyMemberQuickView";
21
- import MemberPropertiesView from "../CompanyMemberPropertiesView";
22
- import SelectMemberForm from "../SelectMemberSendForm";
23
10
  import Scrollbars from "react-custom-scrollbars-2";
24
11
  import classnames from "classnames";
25
12
  import "./index.css";
13
+ import MemberRegisterContainer from "./MemberRegisterContainer";
26
14
  const MemberTableListCard = (props) => {
27
- const { membersRegisterId, corporateId, tableDetail } = props;
28
- const { user } = useApplicationContext();
29
- const [visible, setVisible] = useState(false);
30
- const [memberTotal, setMemberTotal] = useState(0);
31
- const [height, setHeight] = useState(0);
32
- const ref = useRef(null);
33
- const asideContext = useAsideContentContext();
34
- const memberStore = useMemberStore();
35
- const corporate = useCorporate(corporateId, { includes: "permissions" });
36
- const state = useDeepMemo(() => new State(), [membersRegisterId]);
37
- /** 建立 ListView 和useDocumentListEffect所需的ListDataState. 会根据state.id重建所以不需reset. */
38
- const list = useCreateListDataState({
39
- filterDefaults: {
40
- filters: filters(),
41
- includes: "permissions",
42
- },
43
- }, [membersRegisterId]);
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 === membersRegisterId);
51
- useRenderOnChange(() => list.filters.options);
52
- /** 把ListDataState传给useMemberListEffect,使之可以自動更新loading, hasmore. */
53
- useMemberListEffect(list, (result, total) => {
54
- list.union(result);
55
- setMemberTotal(total !== null && total !== void 0 ? total : 0);
56
- }, {
57
- Total: true,
58
- ...list.filters.options,
59
- });
60
- // spec:1756 — CSP: Members register Add, Send Form, and ellipsis actions require corporate edit permission
61
- const items = [
62
- {
63
- key: "print",
64
- label: (React.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: window.location.origin + `/member/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, membersRegisterId); },
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("member-table-list-header", { card: props.type === "card" }),
15
+ return observe(() => (React.createElement(MemberRegisterContainer, { ...props, children: ({ state, totalCount, setVisible, handleDelete, corporate, user }) => {
16
+ return (React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: classnames("member-table-list-header card"),
85
17
  // spec:1755 — CSP: Members register list filters by parent register and optional Active status
86
18
  filterViewProps: {
87
19
  columns: [
@@ -90,27 +22,19 @@ const MemberTableListCard = (props) => {
90
22
  }, preExtra: () => (React.createElement("div", { className: "title" },
91
23
  "Members Register",
92
24
  " ",
93
- memberTotal ? React.createElement(Badge, { count: memberTotal, 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, { btnType: props.type === "card" ? "icon" : "text", onClick: () => {
25
+ totalCount ? React.createElement(Badge, { count: totalCount, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null,
26
+ user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { btnType: "icon", onClick: () => {
96
27
  state.addAble = true;
97
28
  } })),
98
- props.type !== "card" && user.can("edit", corporate.p) && (React.createElement(Dropdown, { classNames: { root: "member-table-list-dropdown" }, menu: { items }, trigger: ["click", "hover"] },
99
- React.createElement(Button, null,
100
- React.createElement(FAIcon, { icon: faEllipsisVerticalSolid })))),
101
- props.type === "card" && user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")))), ...props.listHeaderToolProps }) },
102
- React.createElement("div", { ref: ref, className: "member-table-list-card", style: { height: props.type === "card" ? 298 : "100%" } },
29
+ user.can("edit", corporate.p) && (React.createElement(Button, { className: "send-form-btn", onClick: () => setVisible(true) }, "Send Form")))) }) },
30
+ React.createElement("div", { className: "member-table-list-card", style: { height: 298 } },
103
31
  React.createElement(Scrollbars, { autoHide: true },
104
32
  React.createElement(TableListCard
105
33
  // spec:1759 — CSP: Members register adapts column set based on detail mode and aside availability
106
34
  , {
107
35
  // spec:1759 — CSP: Members register adapts column set based on detail mode and aside availability
108
36
  tableListProps: {
109
- columns: (tableDetail
110
- ? (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
111
- ? columnsSimpleList
112
- : columnsListDetail
113
- : columnsList).map((col) => {
37
+ columns: columnsList.map((col) => {
114
38
  return {
115
39
  ...col,
116
40
  onCell: (record, rowIndex) => {
@@ -123,62 +47,22 @@ const MemberTableListCard = (props) => {
123
47
  };
124
48
  }),
125
49
  components: {
126
- body: {
127
- cell: tableDetail
128
- ? (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
129
- ? TableCellSimple
130
- : TableCellDetail
131
- : TableCell,
132
- },
50
+ body: { cell: TableCell },
133
51
  },
134
- scrollH: props.type === "card" ? 240 : height - 72,
52
+ scrollH: 240,
135
53
  // spec:1758 — CSP: Members register row click opens quick view, or aside properties view in detail mode
136
54
  tableProps: {
137
55
  onRow: (record) => {
138
56
  return {
139
57
  onClick: (e) => {
140
- if (tableDetail) {
141
- asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(MemberPropertiesView, { id: record.id }), {
142
- span: 12,
143
- });
144
- }
145
- else {
146
- state.quickId = record.id;
147
- state.visibleQuickView = true;
148
- }
58
+ state.quickId = record.id;
59
+ state.visibleQuickView = true;
149
60
  },
150
61
  };
151
62
  },
152
63
  },
153
- }, ...props.tableCardProps }))))),
154
- state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => {
155
- state.addAble = false;
156
- } })),
157
- visible && (React.createElement(SelectMemberForm, { parentId: membersRegisterId, onCancel: () => setVisible(false) })),
158
- state.visibleQuickView && (React.createElement(MemberQuickViewDialog, { id: state.quickId, visible: true, onCancel: () => {
159
- state.visibleQuickView = false;
160
- } })))));
161
- // spec:1755 — CSP: Members register list filters by parent register and optional Active status
162
- function filters() {
163
- let filter = [{ c: "ParentNodeId", o: "=", l: "And", v1: membersRegisterId }];
164
- if (props.active) {
165
- filter.push({ c: "Status", o: "=", l: "And", v1: "Active" });
166
- }
167
- return filter;
168
- }
169
- // spec:1757 — CSP: Adding a member from the company register selects a unit and creates a member record
170
- /** 新增memberItem */
171
- async function onSave(unit) {
172
- /** SelectLegalContactDialog 选择/新增有identity信息的unit */
173
- if (unit) {
174
- const res = await memberStore.create({
175
- data: { RegisterId: membersRegisterId, UnitId: unit[0].id },
176
- error: "message",
177
- });
178
- list.union([res]);
179
- }
180
- state.addAble = false;
181
- }
64
+ } })))));
65
+ } })));
182
66
  };
183
67
  export default MemberTableListCard;
184
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/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,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EACN,YAAY,EACZ,uBAAuB,EACvB,YAAY,EACZ,eAAe,IAAI,MAAM,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,cAEN,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAAgB,WAAW,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,C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,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,wGAAwG;IACxG,mBAAmB;IACnB,KAAK,UAAU,MAAM,CAAC,IAAmD;QACxE,qDAAqD;QACrD,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC;gBACpC,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC3D,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,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,aAAa,MAAM,+CAA+C,CAAC;AAC1E,OAAO,YAAY,MAAM,uEAAuE,CAAC;AACjG,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,aA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C,IAAI,CACjC,oBAAC,MAAM,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,gBAExD,CACT,CACC,CACH,GACA;gBAGH,6BAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;oBAC7D,oBAAC,UAAU,IAAC,QAAQ;wBACnB,oBAAC,aAAa;wBACb,kGAAkG;;4BAAlG,kGAAkG;4BAClG,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,wGAAwG;gCACxG,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,mBAAmB,CAAC"}
@@ -1,20 +1,23 @@
1
1
  import React from "react";
2
- import classnames from "classnames";
3
2
  import "./index.css";
3
+ import StatusLabel from "../../../../../../components/StatusLabel";
4
4
  import { observe } from "@voplus/morpho-ui";
5
5
  const MemberStatusLabel = (props) => {
6
- var _a;
7
- const item = transformStatus((_a = props.status) !== null && _a !== void 0 ? _a : "");
8
- return observe(() => (React.createElement("div", { className: classnames("member-status-button", props.className, item.colorName) }, item.displayName ? (React.createElement(React.Fragment, null,
9
- React.createElement("span", null),
10
- item.displayName)) : null)));
11
- function transformStatus(name, displayName) {
12
- return {
13
- name: name,
14
- displayName: displayName || (name === null || name === void 0 ? void 0 : name.split(/(?=[A-Z])/).join(" ")),
15
- colorName: `${name === null || name === void 0 ? void 0 : name.split(/(?=[A-Z])/).join("-").toLowerCase()}`,
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 "Active":
11
+ return { bg: "bg-bg-green-data", text: "text-green-data", dot: "bg-green-data" };
12
+ case "NeedIdentity":
13
+ return { bg: "bg-bg-brown-data", text: "text-brown-data", dot: "bg-brown-data" };
14
+ default:
15
+ return { bg: "bg-bg-grey", text: "text-font-grey", dot: "bg-font-grey" };
16
+ }
16
17
  };
17
- }
18
+ const colors = getColors();
19
+ return React.createElement(StatusLabel, { status: status, className: className, colors: colors });
20
+ });
18
21
  };
19
22
  export default MemberStatusLabel;
20
23
  //# sourceMappingURL=MemberStatusLabel2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MemberStatusLabel2.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.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,mBAAmB,CAAC;AAE5C,MAAM,iBAAiB,GAAG,CAAC,KAA8C,EAAE,EAAE;;IAC5E,MAAM,IAAI,GAAG,eAAe,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC;IAEjD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAE,UAAU,CAAC,sBAAsB,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IACjF,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB;QACC,iCAAa;QACZ,IAAI,CAAC,WAAW,CACf,CACH,CAAC,CAAC,CAAC,IAAI,CACH,CACN,CAAC,CAAC;IAEH,SAAS,eAAe,CAAC,IAAY,EAAE,WAAoB;QAC1D,OAAO;YACN,IAAI,EAAE,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,iBAAiB,CAAC"}
1
+ {"version":3,"file":"MemberStatusLabel2.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/controls/MemberStatusLabel/MemberStatusLabel2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,aAAa,CAAC;AACrB,OAAO,WAAW,MAAM,0CAA0C,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,iBAAiB,GAAG,CAAC,KAA8C,EAAE,EAAE;IAC5E,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,QAAQ;oBACZ,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;gBAClF,KAAK,cAAc;oBAClB,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC;gBAClF;oBACC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;YAC3E,CAAC;QACF,CAAC,CAAC;QAEF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,OAAO,oBAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IAC9E,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,5 +1,17 @@
1
1
  import React from "react";
2
- import "./index.css";
2
+ export declare const columnsSimpleList: ({
3
+ title: React.JSX.Element;
4
+ dataIndex: string;
5
+ width: string;
6
+ } | {
7
+ title: React.JSX.Element;
8
+ dataIndex: string;
9
+ width?: undefined;
10
+ } | {
11
+ title: string;
12
+ dataIndex: string;
13
+ width: string;
14
+ })[];
3
15
  export declare const columnsListDetail: ({
4
16
  title: React.JSX.Element;
5
17
  dataIndex: string;