@voplus/morpho-csp 6.0.116 → 6.0.118

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 (117) hide show
  1. package/es/components/CorporateNavMenu/CorporateNavMenu.d.ts +2 -0
  2. package/es/components/CorporateNavMenu/CorporateNavMenu.js +11 -35
  3. package/es/components/CorporateNavMenu/CorporateNavMenu.js.map +1 -1
  4. package/es/components/IdentityStatus/IdentityStatus2.d.ts +6 -0
  5. package/es/components/IdentityStatus/IdentityStatus2.js +36 -0
  6. package/es/components/IdentityStatus/IdentityStatus2.js.map +1 -0
  7. package/es/components/IdentityStatus/index.d.ts +5 -0
  8. package/es/components/IdentityStatus/index.js +24 -0
  9. package/es/components/IdentityStatus/index.js.map +1 -0
  10. package/es/components/IdentityStatus/index.less +31 -0
  11. package/es/data/controller/interfaces.d.ts +2 -1
  12. package/es/data/corporate/interfaces.d.ts +29 -0
  13. package/es/modules/corporate/company/components/CapitalCard/index.d.ts +2 -1
  14. package/es/modules/corporate/company/components/CapitalCard/index.js +19 -29
  15. package/es/modules/corporate/company/components/CapitalCard/index.js.map +1 -1
  16. package/es/modules/corporate/company/components/CapitalCard/index.less +50 -31
  17. package/es/modules/corporate/company/components/CompanyPageHead/index.d.ts +0 -1
  18. package/es/modules/corporate/company/components/CompanyPageHead/index.js +28 -43
  19. package/es/modules/corporate/company/components/CompanyPageHead/index.js.map +1 -1
  20. package/es/modules/corporate/company/components/SharesCapitalCard/index.d.ts +6 -0
  21. package/es/modules/corporate/company/components/SharesCapitalCard/index.js +26 -0
  22. package/es/modules/corporate/company/components/SharesCapitalCard/index.js.map +1 -0
  23. package/es/modules/corporate/company/components/SharesCapitalCard/state.d.ts +16 -0
  24. package/es/modules/corporate/company/components/SharesCapitalCard/state.js +85 -0
  25. package/es/modules/corporate/company/components/SharesCapitalCard/state.js.map +1 -0
  26. package/es/modules/corporate/company/components/SharesCard2/SharesReportChart.js +3 -22
  27. package/es/modules/corporate/company/components/SharesCard2/SharesReportChart.js.map +1 -1
  28. package/es/modules/corporate/company/components/SharesCard2/index.d.ts +3 -1
  29. package/es/modules/corporate/company/components/SharesCard2/index.js +32 -42
  30. package/es/modules/corporate/company/components/SharesCard2/index.js.map +1 -1
  31. package/es/modules/corporate/company/components/SharesCard2/index.less +58 -15
  32. package/es/modules/corporate/company/components/SharesCard2/state.d.ts +1 -0
  33. package/es/modules/corporate/company/components/SharesCard2/state.js +11 -0
  34. package/es/modules/corporate/company/components/SharesCard2/state.js.map +1 -1
  35. package/es/modules/corporate/company/controller-register/components/ControllerList/index.d.ts +3 -2
  36. package/es/modules/corporate/company/controller-register/components/ControllerList/index.js +6 -6
  37. package/es/modules/corporate/company/controller-register/components/ControllerList/index.js.map +1 -1
  38. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.d.ts +17 -0
  39. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js +77 -0
  40. package/es/modules/corporate/company/controller-register/components/ControllerTableList/TableCell.js.map +1 -0
  41. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.d.ts +15 -0
  42. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js +118 -0
  43. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.js.map +1 -0
  44. package/es/modules/corporate/company/controller-register/components/ControllerTableList/index.less +73 -0
  45. package/es/modules/corporate/company/controller-register/controls/ControllerStatusLabel/index.d.ts +1 -1
  46. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.d.ts +2 -0
  47. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js +5 -5
  48. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js.map +1 -1
  49. package/es/modules/corporate/company/member-register/components/MemberTableList/index.d.ts +7 -0
  50. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js +19 -0
  51. package/es/modules/corporate/company/member-register/components/MemberTableList/index.js.map +1 -0
  52. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCell.d.ts +13 -0
  53. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCell.js +39 -9
  54. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCell.js.map +1 -1
  55. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.d.ts +13 -0
  56. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js +76 -0
  57. package/es/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.js.map +1 -0
  58. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.d.ts +7 -0
  59. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js +26 -44
  60. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.js.map +1 -1
  61. package/es/modules/corporate/company/member-register/components/MemberTableListCard/index.less +30 -16
  62. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.d.ts +7 -0
  63. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js +19 -0
  64. package/es/modules/corporate/company/officer-register/components/OfficerTableList/index.js.map +1 -0
  65. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCell.d.ts +13 -0
  66. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCell.js +40 -10
  67. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCell.js.map +1 -1
  68. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.d.ts +13 -0
  69. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js +82 -0
  70. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCellDetail.js.map +1 -0
  71. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.d.ts +7 -0
  72. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js +41 -56
  73. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.js.map +1 -1
  74. package/es/modules/corporate/company/officer-register/components/OfficerTableListCard/index.less +24 -10
  75. package/es/modules/corporate/company/pages/CompanyPage/Dashboard.js +7 -19
  76. package/es/modules/corporate/company/pages/CompanyPage/Dashboard.js.map +1 -1
  77. package/es/modules/corporate/company/pages/CompanyPage/index.js +4 -4
  78. package/es/modules/corporate/company/pages/CompanyPage/index.js.map +1 -1
  79. package/es/modules/corporate/company/pages/CorporateClientView/Dashboard.js +7 -16
  80. package/es/modules/corporate/company/pages/CorporateClientView/Dashboard.js.map +1 -1
  81. package/es/modules/corporate/company/pages/RegistersPage/index.d.ts +4 -0
  82. package/es/modules/corporate/company/pages/RegistersPage/index.js +42 -0
  83. package/es/modules/corporate/company/pages/RegistersPage/index.js.map +1 -0
  84. package/es/modules/corporate/company/pages/RegistersPage/index.less +63 -0
  85. package/es/modules/corporate/company/share-transactions-register/components/ShareMovementsDataIcon/index.js +1 -0
  86. package/es/modules/corporate/company/share-transactions-register/components/ShareMovementsDataIcon/index.js.map +1 -1
  87. package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.js +1 -0
  88. package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.js.map +1 -1
  89. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.d.ts +3 -2
  90. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.js.map +1 -1
  91. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/Table.d.ts +6 -0
  92. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/Table.js +51 -0
  93. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/Table.js.map +1 -0
  94. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/index.d.ts +7 -0
  95. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/index.js +56 -0
  96. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/index.js.map +1 -0
  97. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/Item/index.less +161 -0
  98. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/index.d.ts +8 -0
  99. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/index.js +88 -0
  100. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/index.js.map +1 -0
  101. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionTableList/index.less +20 -0
  102. package/es/modules/corporate/filing-record/components/FilingTimeLineCard/index.js +2 -2
  103. package/es/modules/corporate/filing-record/components/FilingTimeLineCard/index.js.map +1 -1
  104. package/es/modules/corporate/share-class/components/ShareClassCardList/index.d.ts +7 -0
  105. package/es/modules/corporate/share-class/components/ShareClassCardList/index.js +49 -0
  106. package/es/modules/corporate/share-class/components/ShareClassCardList/index.js.map +1 -0
  107. package/es/modules/corporate/share-class/components/ShareClassCardList/index.less +49 -0
  108. package/es/modules/corporate/share-class/components/ShareClassItemCard/index.d.ts +6 -0
  109. package/es/modules/corporate/share-class/components/ShareClassItemCard/index.js +34 -0
  110. package/es/modules/corporate/share-class/components/ShareClassItemCard/index.js.map +1 -0
  111. package/es/modules/corporate/share-class/components/ShareClassItemCard/index.less +78 -0
  112. package/es/modules/corporate/share-class/pages/ShareClassListPage/index.d.ts +6 -0
  113. package/es/modules/corporate/share-class/pages/ShareClassListPage/index.js +17 -0
  114. package/es/modules/corporate/share-class/pages/ShareClassListPage/index.js.map +1 -0
  115. package/es/modules/corporate/share-class/pages/ShareClassListPage/index.less +8 -0
  116. package/package.json +1 -1
  117. package/es/modules/corporate/company/components/CompanyPageHead/index.less +0 -80
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellDetail.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/TableCellDetail.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,cAAc,EACd,WAAW,EACX,aAAa,GACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,E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AA,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,eAAe,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode } from "react";
2
2
  import { MemberListProps } from "../CompanyMemberList";
3
+ import { ListHeaderToolProps } from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
3
4
  import "./index.less";
4
5
  declare const MemberTableListCard: {
5
6
  (props: MemberListProps & {
@@ -8,6 +9,12 @@ declare const MemberTableListCard: {
8
9
  isHeader?: boolean;
9
10
  title?: ReactNode;
10
11
  };
12
+ /** 头部的btn显示默认样式 还是 card 的样式 */
13
+ type?: "card";
14
+ /** 是否显示详细的table内容 */
15
+ tableDetail?: boolean;
16
+ headerTitle?: ReactNode;
17
+ listHeaderToolProps?: ListHeaderToolProps;
11
18
  }): React.JSX.Element;
12
19
  defaultProps: {};
13
20
  };
@@ -1,5 +1,3 @@
1
- import { faBarsProgress, faReceipt, faThumbtack } from "@fortawesome/pro-solid-svg-icons";
2
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
1
  import { useDeepMemo, useApplicationContext } from "@voplus/morpho-data";
4
2
  import { useAutoUpdateListData } from "@voplus/morpho-document-core";
5
3
  import { observe, useRenderOnChange } from "@voplus/morpho-ui";
@@ -9,19 +7,22 @@ import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/da
9
7
  import UnitsSelectDialog from "@voplus/morpho-org/es/components/UnitsSelectDialog";
10
8
  import AddDropDown2 from "@voplus/morpho-ui/es/components/layout/ListView/controls/AddDropDown2";
11
9
  import { Badge } from "antd";
12
- import React, { useState } from "react";
10
+ import React, { useState, useRef, useEffect } from "react";
13
11
  import MemberStatusFilter from "../../controls/MemberStatusFilter";
14
12
  import { useCorporate } from "../../../../../../data/corporate";
15
13
  import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
16
14
  import { useMemberListEffect, useMemberStore } from "../../../../../../data/member";
17
- import TableCell from "./TableCell";
15
+ import TableCell, { columnsList } from "./TableCell";
16
+ import TableCellDetail, { columnsListDetail } from "./TableCellDetail";
18
17
  import { State } from "../CompanyMemberList/state";
18
+ import classnames from "classnames";
19
19
  import "./index.less";
20
20
  const MemberTableListCard = (props) => {
21
- const { membersRegisterId, corporateId, selectDialog } = props;
22
- const [visible, setVisible] = useState(false);
21
+ const { membersRegisterId, corporateId, selectDialog, tableDetail } = props;
23
22
  const [memberTotal, setMemberTotal] = useState(0);
24
23
  const memberStore = useMemberStore();
24
+ const [height, setHeight] = useState(0);
25
+ const ref = useRef(null);
25
26
  const { user } = useApplicationContext();
26
27
  const corporate = useCorporate(corporateId !== null && corporateId !== void 0 ? corporateId : "", { includes: "permissions" });
27
28
  const state = useDeepMemo(() => new State(), [membersRegisterId]);
@@ -31,40 +32,13 @@ const MemberTableListCard = (props) => {
31
32
  filters: filters(),
32
33
  },
33
34
  }, [membersRegisterId]);
34
- const columnsList = [
35
- {
36
- title: (React.createElement(React.Fragment, null,
37
- React.createElement(FAIcon, { icon: faThumbtack }),
38
- " Members Name")),
39
- dataIndex: "name",
40
- },
41
- {
42
- title: (React.createElement(React.Fragment, null,
43
- React.createElement(FAIcon, { icon: faReceipt }),
44
- " Contact")),
45
- dataIndex: "contact",
46
- width: "30%",
47
- },
48
- {
49
- title: (React.createElement(React.Fragment, null,
50
- React.createElement(FAIcon, { icon: faBarsProgress }),
51
- " Status")),
52
- dataIndex: "status",
53
- width: "18%",
54
- },
55
- {
56
- title: " ",
57
- dataIndex: "menu",
58
- width: "68px",
59
- },
60
- ];
61
35
  const components = {
62
36
  body: {
63
37
  // row: DragTableRow,
64
- cell: TableCell,
38
+ cell: tableDetail ? TableCellDetail : TableCell,
65
39
  },
66
40
  };
67
- const columns = columnsList.map((col) => {
41
+ const columns = (tableDetail ? columnsListDetail : columnsList).map((col) => {
68
42
  return {
69
43
  ...col,
70
44
  onCell: (record, rowIndex) => {
@@ -76,6 +50,11 @@ const MemberTableListCard = (props) => {
76
50
  },
77
51
  };
78
52
  });
53
+ useEffect(() => {
54
+ if (ref.current) {
55
+ setHeight(ref.current.offsetHeight);
56
+ }
57
+ }, [ref]);
79
58
  /** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
80
59
  useAutoUpdateListData(list, (d) => d.parentId === membersRegisterId);
81
60
  useRenderOnChange(() => list.filters.options);
@@ -89,15 +68,18 @@ const MemberTableListCard = (props) => {
89
68
  });
90
69
  return observe(() => (React.createElement(React.Fragment, null,
91
70
  React.createElement(ListDataContext.Provider, { value: list },
92
- React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: "member-table-list-header", filterViewProps: {
93
- columns: [
94
- React.createElement(MemberStatusFilter, { key: "MemberStatusFilter", defaultValue: ["Active"] }),
95
- ],
96
- }, preExtra: () => (React.createElement("div", { className: "title" },
97
- "Members Register",
98
- " ",
99
- memberTotal ? React.createElement(Badge, { count: memberTotal, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null, user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { btnType: "icon", onClick: () => (state.addAble = true) })))) }) },
100
- React.createElement(TableListCard, { tableListProps: { columns: columns, components: components }, ...props.tableCardProps }))),
71
+ React.createElement(DocumentTableListCard, { isHeader: true, header: React.createElement(React.Fragment, null,
72
+ props.headerTitle,
73
+ React.createElement(ListHeaderTool, { addAble: false, sortable: false, searchHeader: false, className: classnames("member-table-list-header", { card: props.type === "card" }), filterViewProps: {
74
+ columns: [
75
+ React.createElement(MemberStatusFilter, { key: "MemberStatusFilter", defaultValue: ["Active"] }),
76
+ ],
77
+ }, preExtra: () => (React.createElement("div", { className: "title" },
78
+ "Members Register",
79
+ " ",
80
+ memberTotal ? React.createElement(Badge, { count: memberTotal, overflowCount: 99 }) : null)), rightExtra: () => (React.createElement(React.Fragment, null, user.can("edit", corporate.p) && (React.createElement(AddDropDown2, { btnType: props.type === "card" ? "icon" : "text", onClick: () => (state.addAble = true) })))), ...props.listHeaderToolProps })) },
81
+ React.createElement("div", { className: "member-table-list-card", ref: ref },
82
+ React.createElement(TableListCard, { tableListProps: { columns: columns, components: components, scrollH: height }, ...props.tableCardProps })))),
101
83
  state.addAble && (React.createElement(UnitsSelectDialog, { type: "click", multiSelect: false, onSelect: onSave, onCancel: () => (state.addAble = false) })))));
102
84
  function filters() {
103
85
  let filter = [];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/member-register/components/MemberTableListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAgB,WAAW,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,aAAa,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,YAAY,MAAM,uEAAuE,CAAC;AACjG,OAAO,EAAE,KAAK,EAAgB,MAAM,MAAM,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,EAAW,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OA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EAAE,EAAE,iBAAiB,EAAE;gBAC9D,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE;aAC/C,CAAC;QACH,CAAC;QAED,IAAI,YAAY,IAAI,WAAW,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,mBAAmB;IACnB,KAAK,UAAU,MAAM,CAAC,IAAkD;QACvE,qDAAqD;QACrD,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC;gBACpC,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC5D,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,mBAAmB,CAAC,YAAY,GAAG,EAAE,CAAC;AAEtC,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,EAAgB,WAAW,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,qBAAqB,MAAM,uDAAuD,CAAC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,MAAM,CAAC,IAAkD;QACvE,qDAAqD;QACrD,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,MAAM,CAAC;gBACpC,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC5D,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,mBAAmB,CAAC,YAAY,GAAG,EAAE,CAAC;AAEtC,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,10 @@
1
1
  :global {
2
+ .member-table-list-card {
3
+ height: 100%;
4
+ .tools-card-content .ant-table-wrapper .tool-bar .ant-btn {
5
+ padding: 0;
6
+ }
7
+ }
2
8
  .member-table-item-info {
3
9
  color: #5d5d5d;
4
10
  font-weight: 500;
@@ -31,30 +37,38 @@
31
37
  margin-right: 5px;
32
38
  }
33
39
  }
40
+ .member-table-item-email,
41
+ .member-table-item-phone {
42
+ color: #5d5d5d;
43
+ }
34
44
  .member-table-list-header.list-view-header-tool {
35
45
  padding: 0;
36
46
  flex: 1;
47
+ &.card {
48
+ .header-tool-space {
49
+ .filter-view-menu-icon {
50
+ font-size: 18px;
51
+ color: #cbcbcb;
52
+ border: none;
53
+ box-shadow: none;
54
+ margin-right: 7px;
55
+ &:hover {
56
+ color: #217eb2;
57
+ }
58
+ }
59
+ .send-form-btn {
60
+ color: #217eb2;
61
+ border-color: #217eb2;
62
+ padding-left: 10px;
63
+ padding-right: 10px;
64
+ }
65
+ }
66
+ }
37
67
  .header-tool-space {
38
68
  display: flex;
39
69
  .title {
40
70
  flex: 1;
41
71
  }
42
- .filter-view-menu-icon {
43
- font-size: 18px;
44
- color: #cbcbcb;
45
- border: none;
46
- box-shadow: none;
47
- margin-right: 7px;
48
- &:hover {
49
- color: #217eb2;
50
- }
51
- }
52
- .send-form-btn {
53
- color: #217eb2;
54
- border-color: #217eb2;
55
- padding-left: 10px;
56
- padding-right: 10px;
57
- }
58
72
  }
59
73
  }
60
74
  }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "../../../pages/RegistersPage/index.less";
3
+ declare const OfficerTableList: (props: {
4
+ corporateId: string;
5
+ officersRegisterId: string;
6
+ }) => React.JSX.Element;
7
+ export default OfficerTableList;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import OfficerTableListCard from "../OfficerTableListCard";
4
+ import dayjs from "dayjs";
5
+ import "../../../pages/RegistersPage/index.less";
6
+ const OfficerTableList = (props) => {
7
+ return observe(() => (React.createElement("div", { className: "registers-page-item" },
8
+ React.createElement(OfficerTableListCard, { corporateId: props.corporateId, officersRegisterId: props.officersRegisterId, tableDetail: true, headerTitle: React.createElement("div", { className: "registers-item-info" },
9
+ React.createElement("div", { className: "title" }, "Officers Register List"),
10
+ React.createElement("div", { className: "last-updated-time" },
11
+ "Lates Update on ",
12
+ dayjs().format("DD MMM YYYY"))), listHeaderToolProps: {
13
+ searchHeader: true,
14
+ preExtra: () => React.createElement(React.Fragment, null),
15
+ searchOptions: { placeholder: "Search in register officer" },
16
+ } }))));
17
+ };
18
+ export default OfficerTableList;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,yCAAyC,CAAC;AAEjD,MAAM,gBAAgB,GAAG,CAAC,KAA0D,EAAE,EAAE;IACvF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,qBAAqB;QACnC,oBAAC,oBAAoB,IACpB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAC5C,WAAW,QACX,WAAW,EACV,6BAAK,SAAS,EAAC,qBAAqB;gBACnC,6BAAK,SAAS,EAAC,OAAO,6BAA6B;gBACnD,6BAAK,SAAS,EAAC,mBAAmB;;oBAAkB,KAAK,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAO,CACnF,EAEP,mBAAmB,EAAE;gBACpB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,yCAAK;gBACrB,aAAa,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE;aAC5D,GACA,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,4 +1,17 @@
1
1
  import React from "react";
2
2
  import "./index.less";
3
+ export declare const columnsList: ({
4
+ title: React.JSX.Element;
5
+ dataIndex: string;
6
+ width?: undefined;
7
+ } | {
8
+ title: React.JSX.Element;
9
+ dataIndex: string;
10
+ width: string;
11
+ } | {
12
+ title: string;
13
+ dataIndex: string;
14
+ width: string;
15
+ })[];
3
16
  declare const TableCell: (props: any) => React.JSX.Element;
4
17
  export default TableCell;
@@ -1,24 +1,50 @@
1
- import { faEllipsisVertical } from "@fortawesome/pro-solid-svg-icons";
1
+ import { faBarsProgress, faReceipt, faThumbtack, faEllipsisVertical, } from "@fortawesome/pro-solid-svg-icons";
2
2
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
- import { useMetaStore } from "@voplus/morpho-document-core";
4
3
  import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
5
4
  import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
6
5
  import ItemFunction from "@voplus/morpho-org/es/controls/ItemFunction";
7
6
  import { observe } from "@voplus/morpho-ui";
7
+ import { useOfficerStore } from "../../../../../../data/officer";
8
8
  import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
9
9
  import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
10
+ import CompanOfficerMenu from "../../../controls/CompanyRegisterMenu";
10
11
  import classnames from "classnames";
11
12
  import React from "react";
12
- import { useOfficerStore } from "../../../../../../data/officer";
13
13
  import OfficerStatusLabel from "../../controls/OfficerStatusLabel";
14
14
  import OfficerQuickViewDialog from "../OfficerQuickView";
15
15
  import "./index.less";
16
+ export const columnsList = [
17
+ {
18
+ title: (React.createElement(React.Fragment, null,
19
+ React.createElement(FAIcon, { icon: faThumbtack }),
20
+ " Officer Name")),
21
+ dataIndex: "name",
22
+ },
23
+ {
24
+ title: (React.createElement(React.Fragment, null,
25
+ React.createElement(FAIcon, { icon: faReceipt }),
26
+ " Position")),
27
+ dataIndex: "position",
28
+ width: "30%",
29
+ },
30
+ {
31
+ title: (React.createElement(React.Fragment, null,
32
+ React.createElement(FAIcon, { icon: faBarsProgress }),
33
+ " Status")),
34
+ dataIndex: "status",
35
+ width: "18%",
36
+ },
37
+ {
38
+ title: " ",
39
+ dataIndex: "menu",
40
+ width: "68px",
41
+ },
42
+ ];
16
43
  const TableCell = (props) => {
17
44
  const { dataIndex, record, rowIndex, children, ...restProps } = props;
18
45
  const store = useOfficerStore();
19
- const meta = useMetaStore();
20
46
  return observe(() => {
21
- var _a;
47
+ var _a, _b;
22
48
  return (React.createElement("td", { ...restProps }, dataIndex === "name" ? (React.createElement(ItemFunction, { className: "officer-table-item-info", onClick: props.onClick, quickViewDialog: (onCancel) => (React.createElement(OfficerQuickViewDialog, { id: record.id, visible: true, onCancel: onCancel })) },
23
49
  React.createElement(UnitAvatar, { unit: record.contact }),
24
50
  React.createElement("div", { className: "officer-table-item-name" }, ((_a = record.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (record.identity.fullName) : record.contact ? (React.createElement(UnitNameNoteAlert, { id: record.contact.id, name: record.contact.name })) : null))) : dataIndex === "position" ? (React.createElement("div", { className: "officer-table-item-position" }, record.position)) : dataIndex === "status" ? (React.createElement("div", { style: { display: "flex" } },
@@ -26,11 +52,15 @@ const TableCell = (props) => {
26
52
  "need-identity": !record.identity,
27
53
  }), status: !record.identity
28
54
  ? "Need Identity Info"
29
- : record.status && record.identity && "Present" }))) : dataIndex === "menu" ? (React.createElement(ToolBar, { id: record.id, moreProps: {
30
- buttonProps: { size: "middle" },
31
- icon: React.createElement(FAIcon, { icon: faEllipsisVertical }),
32
- } },
33
- React.createElement(Open, { size: "middle", url: `/officer/${record.id}` }))) : (children)));
55
+ : record.status && record.identity && "Present" }))) : dataIndex === "menu" ? (React.createElement(ToolBar, { showMenu: false },
56
+ React.createElement(Open, { url: `/officer/${record.id}` }),
57
+ React.createElement(CompanOfficerMenu, { id: record.id, title: "Officer Menu", unitId: (_b = record.contact) === null || _b === void 0 ? void 0 : _b.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }), onChangeContact: () => {
58
+ var _a;
59
+ return store.edit(record.id, {
60
+ data: { ContactId: (_a = record.contact) === null || _a === void 0 ? void 0 : _a.id },
61
+ error: "message",
62
+ });
63
+ } }))) : (children)));
34
64
  });
35
65
  };
36
66
  export default TableCell;
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CA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S,CAAC"}
1
+ {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../../../src/modules/corporate/company/officer-register/components/OfficerTableListCard/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EACd,SAAS,EACT,WAAW,EACX,kBAAkB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,YAAY,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,UAAU,MAAM,8DAA8D,CAAC;AACtF,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,sBAAsB,MAAM,qBAAqB,CAAC;AACzD,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;QACC,KAAK,EAAE,CACN;YACC,oBAAC,MAAM,IAAC,IAAI,EAAE,WAAW,GAAI;4BAC3B,CACH;QACD,SAAS,EAAE,MAAM;KACjB;IACD;QACC,KAAK,EAAE,CACN;YACC,oBAAC,MAAM,IAAC,IAAI,EAAE,SAAS,GAAI;wBACzB,CACH;QACD,SAAS,EAAE,UAAU;QACrB,KAAK,EAAE,KAAK;KACZ;IACD;QACC,KAAK,EAAE,CACN;YACC,oBAAC,MAAM,IAAC,IAAI,EAAE,cAAc,GAAI;sBAC9B,CACH;QACD,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,KAAK;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
5
+ dataIndex: string;
6
+ width?: undefined;
7
+ } | {
8
+ title: string;
9
+ dataIndex: string;
10
+ width: string;
11
+ })[];
12
+ declare const TableCellDetail: (props: any) => React.JSX.Element;
13
+ export default TableCellDetail;
@@ -0,0 +1,82 @@
1
+ import { faEllipsisVertical, faEnvelope, faPhone, faReceipt, faBarsProgress, faUserGroup, faCircleCheck, } from "@fortawesome/pro-solid-svg-icons";
2
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
+ import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
4
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
5
+ import ItemFunction from "@voplus/morpho-org/es/controls/ItemFunction";
6
+ import { observe } from "@voplus/morpho-ui";
7
+ import UnitAvatar from "@voplus/morpho-org/es/components/UnitAvatar/LoadedUnitAvatar";
8
+ import UnitNameNoteAlert from "@voplus/morpho-org/es/components/UnitNameNoteAlert";
9
+ import classnames from "classnames";
10
+ import IdentityStatus from "../../../../../../components/IdentityStatus";
11
+ import React from "react";
12
+ import { useOfficerStore } from "../../../../../../data/officer";
13
+ import CompanOfficerMenu from "../../../controls/CompanyRegisterMenu";
14
+ import OfficerStatusLabel from "../../controls/OfficerStatusLabel";
15
+ import OfficerPropertiesView from "../OfficerPropertiesView";
16
+ import "./index.less";
17
+ export const columnsListDetail = [
18
+ {
19
+ title: (React.createElement(React.Fragment, null,
20
+ React.createElement(FAIcon, { icon: faUserGroup }),
21
+ " Officers Name")),
22
+ dataIndex: "name",
23
+ },
24
+ {
25
+ title: (React.createElement(React.Fragment, null,
26
+ React.createElement(FAIcon, { icon: faEnvelope }),
27
+ " Email")),
28
+ dataIndex: "email",
29
+ },
30
+ {
31
+ title: (React.createElement(React.Fragment, null,
32
+ React.createElement(FAIcon, { icon: faPhone }),
33
+ " Contact Number")),
34
+ dataIndex: "phone",
35
+ },
36
+ {
37
+ title: (React.createElement(React.Fragment, null,
38
+ React.createElement(FAIcon, { icon: faReceipt }),
39
+ " Position")),
40
+ dataIndex: "position",
41
+ },
42
+ {
43
+ title: (React.createElement(React.Fragment, null,
44
+ React.createElement(FAIcon, { icon: faCircleCheck }),
45
+ " Identity Status")),
46
+ dataIndex: "identity",
47
+ },
48
+ {
49
+ title: (React.createElement(React.Fragment, null,
50
+ React.createElement(FAIcon, { icon: faBarsProgress }),
51
+ " Status")),
52
+ dataIndex: "status",
53
+ },
54
+ {
55
+ title: " ",
56
+ dataIndex: "menu",
57
+ width: "68px",
58
+ },
59
+ ];
60
+ const TableCellDetail = (props) => {
61
+ const { dataIndex, record, rowIndex, children, ...restProps } = props;
62
+ const store = useOfficerStore();
63
+ return observe(() => {
64
+ var _a, _b, _c, _d, _e;
65
+ return (React.createElement("td", { ...restProps }, dataIndex === "name" ? (React.createElement(ItemFunction, { className: "officer-table-item-info", onClick: props.onClick, propertiesView: React.createElement(OfficerPropertiesView, { id: record.id }) },
66
+ React.createElement(UnitAvatar, { unit: record.contact }),
67
+ React.createElement("div", { className: "officer-table-item-name" }, ((_a = record.identity) === null || _a === void 0 ? void 0 : _a.fullName) ? (record.identity.fullName) : record.contact ? (React.createElement(UnitNameNoteAlert, { id: record.contact.id, name: record.contact.name })) : null))) : dataIndex === "email" ? (React.createElement("span", { className: "officer-table-item-email" }, (_b = record.contact) === null || _b === void 0 ? void 0 : _b.email)) : dataIndex === "phone" ? (React.createElement("span", { className: "officer-table-item-phone" }, (_c = record.contact) === null || _c === void 0 ? void 0 : _c.phone)) : dataIndex === "position" ? (React.createElement("div", { className: "officer-table-item-position" }, record.position)) : dataIndex === "identity" ? (React.createElement(IdentityStatus, { id: (_d = record.identity) === null || _d === void 0 ? void 0 : _d.id })) : dataIndex === "status" ? (React.createElement("div", { style: { display: "flex" } },
68
+ React.createElement(OfficerStatusLabel, { className: classnames("officer-table-status-label", {
69
+ "need-identity": !record.identity,
70
+ }), status: !record.identity ? "Need Identity Info" : record.status }))) : dataIndex === "menu" ? (React.createElement(ToolBar, { showMenu: false },
71
+ React.createElement(Open, { url: `/officer/${record.id}` }),
72
+ React.createElement(CompanOfficerMenu, { id: record.id, title: "Officer Menu", unitId: (_e = record.contact) === null || _e === void 0 ? void 0 : _e.id, store: store, closeAside: true, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }), onChangeContact: () => {
73
+ var _a;
74
+ return store.edit(record.id, {
75
+ data: { ContactId: (_a = record.contact) === null || _a === void 0 ? void 0 : _a.id },
76
+ error: "message",
77
+ });
78
+ } }))) : (children)));
79
+ });
80
+ };
81
+ export default TableCellDetail;
82
+ //# 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,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,WAAW,EACX,aAAa,GACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,YAAY,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,UAAU,MAAM,8DAA8D,CAAC;AACtF,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,MAAM,6CAA6C,CAAC;AACzE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,qBAAqB,MAAM,0BAA0B,C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AAS,EAAE,UAAU,CAAC,4BAA4B,EAAE;oBACnD,eAAe,EAAE,CAAC,MAAM,CAAC,QAAQ;iBACjC,CAAC,EACF,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAC9D,CACG,CACN,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CAC1B,oBAAC,OAAO,IAAC,QAAQ,EAAE,KAAK;YACvB,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,MAAM,CAAC,OAAO,0CAAE,EAAE,EAC1B,KAAK,EAAE,KAAK,EACZ,UAAU,QACV,IAAI,EAAE,oBAAC,MAAM,IAAC,IAAI,EAAE,kBAAkB,GAAI,EAC1C,eAAe,EAAE,GAAG,EAAE;;oBACrB,OAAA,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;wBACrB,IAAI,EAAE,EAAE,SAAS,EAAE,MAAA,MAAM,CAAC,OAAO,0CAAE,EAAE,EAAE;wBACvC,KAAK,EAAE,SAAS;qBAChB,CAAC,CAAA;iBAAA,GAEF,CACO,CACV,CAAC,CAAC,CAAC,CACH,QAAQ,CACR,CACG,CACL,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,eAAe,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode } from "react";
2
2
  import { OfficerListProps } from "../OfficerList";
3
+ import { ListHeaderToolProps } from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
3
4
  import "./index.less";
4
5
  declare const OfficerTableListCard: {
5
6
  (props: OfficerListProps & {
@@ -8,6 +9,12 @@ declare const OfficerTableListCard: {
8
9
  isHeader?: boolean;
9
10
  title?: ReactNode;
10
11
  };
12
+ /** 头部的btn显示默认样式 还是 card 的样式 */
13
+ type?: "card";
14
+ /** 是否显示详细的table内容 */
15
+ tableDetail?: boolean;
16
+ headerTitle?: ReactNode;
17
+ listHeaderToolProps?: ListHeaderToolProps;
11
18
  }): React.JSX.Element;
12
19
  defaultProps: {};
13
20
  };