@voplus/morpho-csp 1.3.5 → 1.3.7

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 (119) hide show
  1. package/es/components/CorporateUnitSelectDialog/index.d.ts +12 -0
  2. package/es/components/CorporateUnitSelectDialog/index.js +33 -0
  3. package/es/components/CorporateUnitSelectDialog/index.js.map +1 -0
  4. package/es/components/CorporateUnitSelectDialog/index.less +36 -0
  5. package/es/components/CorporateUnitSelectDialog/state.d.ts +65 -0
  6. package/es/components/CorporateUnitSelectDialog/state.js +263 -0
  7. package/es/components/CorporateUnitSelectDialog/state.js.map +1 -0
  8. package/es/components/CorporateUnitSortableTree/index.d.ts +10 -0
  9. package/es/components/CorporateUnitSortableTree/index.js +87 -0
  10. package/es/components/CorporateUnitSortableTree/index.js.map +1 -0
  11. package/es/components/CorporateUnitSortableTree/state.d.ts +62 -0
  12. package/es/components/CorporateUnitSortableTree/state.js +220 -0
  13. package/es/components/CorporateUnitSortableTree/state.js.map +1 -0
  14. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.d.ts +3 -0
  15. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js +22 -0
  16. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js.map +1 -0
  17. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +4 -0
  18. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +84 -0
  19. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +1 -0
  20. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +319 -0
  21. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +3 -0
  22. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +21 -0
  23. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +1 -0
  24. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +4 -0
  25. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.d.ts +4 -0
  26. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js +23 -0
  27. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +1 -0
  28. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +3 -0
  29. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js +58 -0
  30. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +1 -0
  31. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.less +45 -0
  32. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +3 -0
  33. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js +73 -0
  34. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +1 -0
  35. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less +12 -0
  36. package/es/data/corporate/interfaces.d.ts +3 -0
  37. package/es/data/corporate/types.d.ts +3 -0
  38. package/es/data/share-certificate/ShareCertificateStore.d.ts +2 -0
  39. package/es/data/share-certificate/ShareCertificateStore.js +15 -1
  40. package/es/data/share-certificate/ShareCertificateStore.js.map +1 -1
  41. package/es/data/share-certificate/interfaces.d.ts +3 -0
  42. package/es/data/share-certificate/types.d.ts +2 -0
  43. package/es/modules/corporate/company/components/CompanyDetailsView/index.js +11 -46
  44. package/es/modules/corporate/company/components/CompanyDetailsView/index.js.map +1 -1
  45. package/es/modules/corporate/company/components/CompanyProperties/Properties.d.ts +7 -0
  46. package/es/modules/corporate/company/components/CompanyProperties/Properties.js +68 -0
  47. package/es/modules/corporate/company/components/CompanyProperties/Properties.js.map +1 -0
  48. package/es/modules/corporate/company/components/CompanyProperties/index.d.ts +9 -3
  49. package/es/modules/corporate/company/components/CompanyProperties/index.js +18 -86
  50. package/es/modules/corporate/company/components/CompanyProperties/index.js.map +1 -1
  51. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.d.ts +6 -2
  52. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js +10 -5
  53. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js.map +1 -1
  54. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.less +9 -1
  55. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.d.ts +10 -4
  56. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js +37 -11
  57. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js.map +1 -1
  58. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.less +15 -12
  59. package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.d.ts +1 -0
  60. package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js +9 -0
  61. package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js.map +1 -1
  62. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.d.ts +6 -2
  63. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js +13 -6
  64. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js.map +1 -1
  65. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.less +8 -1
  66. package/es/modules/corporate/company/officer-register/components/OfficerList/index.d.ts +9 -4
  67. package/es/modules/corporate/company/officer-register/components/OfficerList/index.js +34 -8
  68. package/es/modules/corporate/company/officer-register/components/OfficerList/index.js.map +1 -1
  69. package/es/modules/corporate/company/officer-register/components/OfficerList/state.d.ts +1 -0
  70. package/es/modules/corporate/company/officer-register/components/OfficerList/state.js +9 -0
  71. package/es/modules/corporate/company/officer-register/components/OfficerList/state.js.map +1 -1
  72. package/es/modules/corporate/company/pages/CompanyDefaultView/index.js +1 -1
  73. package/es/modules/corporate/company/pages/CompanyDefaultView/index.js.map +1 -1
  74. package/es/modules/corporate/company/pages/CompanyPage/CompanySetting.d.ts +7 -0
  75. package/es/modules/corporate/company/pages/CompanyPage/CompanySetting.js +25 -0
  76. package/es/modules/corporate/company/pages/CompanyPage/CompanySetting.js.map +1 -0
  77. package/es/modules/corporate/company/pages/CompanyPage/index.js +6 -3
  78. package/es/modules/corporate/company/pages/CompanyPage/index.js.map +1 -1
  79. package/es/modules/corporate/company/pages/CompanyPage/index.less +6 -0
  80. package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.d.ts +7 -0
  81. package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.js +34 -0
  82. package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.js.map +1 -0
  83. package/es/modules/corporate/company/share-transactions-register/components/ShareTablePreview/index.less +10 -0
  84. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.d.ts +0 -4
  85. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.js +21 -42
  86. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.js.map +1 -1
  87. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionItem/index.less +30 -70
  88. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.d.ts +0 -2
  89. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.js +3 -3
  90. package/es/modules/corporate/company/share-transactions-register/components/ShareTransactionList/index.js.map +1 -1
  91. package/es/modules/corporate/share-certificate/components/ShareCertificate/index.js +28 -21
  92. package/es/modules/corporate/share-certificate/components/ShareCertificate/index.js.map +1 -1
  93. package/es/modules/corporate/share-certificate/components/ShareCertificate/index.less +18 -6
  94. package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.d.ts +1 -1
  95. package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.js +24 -0
  96. package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.js.map +1 -1
  97. package/es/modules/corporate/share-certificate/components/ShareCertificateQuickViewDialog/index.js +3 -3
  98. package/es/modules/corporate/share-certificate/components/ShareCertificateQuickViewDialog/index.js.map +1 -1
  99. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js +4 -1
  100. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js.map +1 -1
  101. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.d.ts +8 -0
  102. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js +22 -0
  103. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js.map +1 -0
  104. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.d.ts +8 -0
  105. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js +22 -0
  106. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js.map +1 -0
  107. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.d.ts +2 -0
  108. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.js +3 -0
  109. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.js.map +1 -0
  110. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.d.ts +3 -0
  111. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.js +56 -0
  112. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.js.map +1 -0
  113. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.less +54 -0
  114. package/es/obsolete/OfficerRegisterDefaultView/index.js +1 -1
  115. package/es/obsolete/OfficerRegisterDefaultView/index.js.map +1 -1
  116. package/es/routes.d.ts +6 -0
  117. package/es/routes.js +13 -0
  118. package/es/routes.js.map +1 -1
  119. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ import React, { Children, cloneElement } from "react";
2
+ import styles from "./tree-node-renderer.less";
3
+ const FileThemeTreeNodeRenderer = (props) => {
4
+ const { children, listIndex, swapFrom, swapLength, swapDepth, scaffoldBlockPxWidth, lowerSiblingCounts, connectDropTarget, isOver, draggedNode, canDrop, treeIndex, treeId, // Delete from otherProps
5
+ getPrevRow, // Delete from otherProps
6
+ node, // Delete from otherProps
7
+ path, // Delete from otherProps
8
+ rowDirection, ...otherProps } = props;
9
+ return connectDropTarget(React.createElement("div", { ...otherProps, className: styles.node }, Children.map(children, (child) => cloneElement(child, {
10
+ isOver,
11
+ canDrop,
12
+ draggedNode,
13
+ lowerSiblingCounts,
14
+ listIndex,
15
+ swapFrom,
16
+ swapLength,
17
+ swapDepth,
18
+ }))));
19
+ };
20
+ export default FileThemeTreeNodeRenderer;
21
+ //# sourceMappingURL=tree-node-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-node-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,YAAY,EAAE,MAAM,OAAO,CAAC;AAIjE,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,yBAAyB,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC5E,MAAM,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,OAAO,EACP,SAAS,EACT,MAAM,EAAE,yBAAyB;IACjC,UAAU,EAAE,yBAAyB;IACrC,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EACZ,GAAG,UAAU,EACb,GAAG,KAAK,CAAC;IACV,OAAO,iBAAiB,CACvB,gCAAS,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,IACzC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CACjC,YAAY,CAAC,KAAK,EAAE;QACnB,MAAM;QACN,OAAO;QACP,WAAW;QACX,kBAAkB;QAClB,SAAS;QACT,QAAQ;QACR,UAAU;QACV,SAAS;KACT,CAAC,CACF,CACI,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,4 @@
1
+ .node {
2
+ min-width: 100%;
3
+ position: relative;
4
+ }
@@ -0,0 +1,4 @@
1
+ import "@voplus/react-sortable-tree/style.css";
2
+ import { ThemeProps } from "@voplus/react-sortable-tree";
3
+ declare const SortableTreeUnitTheme: ThemeProps;
4
+ export default SortableTreeUnitTheme;
@@ -0,0 +1,23 @@
1
+ // Can override the following:
2
+ //
3
+ // style: PropTypes.shape({}),
4
+ // innerStyle: PropTypes.shape({}),
5
+ // reactVirtualizedListProps: PropTypes.shape({}),
6
+ // scaffoldBlockPxWidth: PropTypes.number,
7
+ // slideRegionSize: PropTypes.number,
8
+ // rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
9
+ // treeNodeRenderer: PropTypes.func,
10
+ // nodeContentRenderer: PropTypes.func,
11
+ // placeholderRenderer: PropTypes.func,
12
+ import "@voplus/react-sortable-tree/style.css";
13
+ import nodeContentRenderer from "./node-content-renderer";
14
+ import treeNodeRenderer from "./tree-node-renderer";
15
+ const SortableTreeUnitTheme = {
16
+ nodeContentRenderer,
17
+ treeNodeRenderer,
18
+ scaffoldBlockPxWidth: 44,
19
+ rowHeight: 85,
20
+ slideRegionSize: 50,
21
+ };
22
+ export default SortableTreeUnitTheme;
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,8BAA8B;AAC9B,mCAAmC;AACnC,kDAAkD;AAClD,0CAA0C;AAC1C,qCAAqC;AACrC,sEAAsE;AACtE,oCAAoC;AACpC,uCAAuC;AACvC,uCAAuC;AAEvC,OAAO,uCAAuC,CAAC;AAG/C,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,qBAAqB,GAAe;IACzC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { NodeRenderer } from "@voplus/react-sortable-tree";
2
+ declare const FileThemeNodeContentRenderer: NodeRenderer;
3
+ export default FileThemeNodeContentRenderer;
@@ -0,0 +1,58 @@
1
+ import React, { useState } from "react";
2
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
+ import { Spin } from "@voplus/antd";
4
+ import UnitItem from "@voplus/morpho-org/es/components/UnitItem";
5
+ import classnames from "classnames";
6
+ import { faBars } from "@fortawesome/pro-light-svg-icons";
7
+ import styles from "./node-content-renderer.less";
8
+ /**
9
+ * Check if a node is a descendant of another node.
10
+ *
11
+ * @param {!Object} older - Potential ancestor of younger node
12
+ * @param {!Object} younger - Potential descendant of older node
13
+ *
14
+ * @return {boolean}
15
+ */
16
+ function isDescendant(older, younger) {
17
+ return (!!older.children &&
18
+ typeof older.children !== "function" &&
19
+ older.children.some((child) => child === younger || isDescendant(child, younger)));
20
+ }
21
+ const FileThemeNodeContentRenderer = (props) => {
22
+ const { scaffoldBlockPxWidth, toggleChildrenVisibility, connectDragPreview, connectDragSource, isDragging, canDrop, canDrag, node, title, subtitle, draggedNode, path, treeIndex, isSearchMatch, isSearchFocus, icons, buttons, className, style, didDrop, lowerSiblingCounts, listIndex, swapFrom, swapLength, swapDepth, treeId, // Not needed, but preserved for other renderers
23
+ isOver, // Not needed, but preserved for other renderers
24
+ parentNode, // Needed for dndManager
25
+ rowDirection, ...otherProps } = props;
26
+ const [isHover, setIsHover] = useState(false);
27
+ const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);
28
+ const isLandingPadActive = !didDrop && isDragging;
29
+ const buttonStyle = { left: -0.5 * scaffoldBlockPxWidth };
30
+ const handle = (React.createElement(React.Fragment, null, canDrag && (React.createElement(React.Fragment, null, node.childrenListLoading && node.expanded ? (
31
+ // Show a loading symbol on the handle when the children are expanded
32
+ React.createElement("div", { className: styles["doc-moveHandle"] },
33
+ React.createElement(Spin, null))) : (
34
+ // Show the handle used to initiate a drag-and-drop
35
+ connectDragSource(React.createElement("div", { className: styles["doc-moveHandle"] },
36
+ React.createElement(FAIcon, { icon: faBars })), {
37
+ dropEffect: "copy",
38
+ }))))));
39
+ return (React.createElement("div", { style: { height: "100%" }, className: styles["theme-nodeContent"], ...otherProps },
40
+ toggleChildrenVisibility &&
41
+ node.children &&
42
+ (node.children.length > 0 || typeof node.children === "function") && (React.createElement("div", null,
43
+ React.createElement("button", { type: "button", "aria-label": node.expanded ? "Collapse" : "Expand", className: classnames(node.expanded ? "rst__collapseButton" : "rst__expandButton"), style: buttonStyle, onClick: () => toggleChildrenVisibility({
44
+ node,
45
+ path,
46
+ treeIndex,
47
+ }) }),
48
+ node.expanded && !isDragging && (React.createElement("div", { style: { width: scaffoldBlockPxWidth }, className: classnames("rst__lineChildren") })))),
49
+ React.createElement("div", { className: classnames("rst__rowWrapper") }, connectDragPreview(React.createElement("div", { className: classnames("doc-row", isLandingPadActive && "rst__rowLandingPad", isLandingPadActive && !canDrop && "rst__rowCancelPad", isSearchMatch && "rst__rowSearchMatch", isSearchFocus && "rst__rowSearchFocus", className), style: {
50
+ opacity: isDraggedDescendant ? 0.5 : 1,
51
+ ...style,
52
+ } },
53
+ handle,
54
+ React.createElement("div", { className: classnames("doc-rowContents", !canDrag && "rst__rowContentsDragDisabled") },
55
+ React.createElement(UnitItem, { id: node.id, type: "tree", className: "unit-tree-item" })))))));
56
+ };
57
+ export default FileThemeNodeContentRenderer;
58
+ //# sourceMappingURL=node-content-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-content-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,QAAQ,MAAM,2CAA2C,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAElD;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,KAAU,EAAE,OAAY;IAC7C,OAAO,CACN,CAAC,CAAC,KAAK,CAAC,QAAQ;QAChB,OAAO,KAAK,CAAC,QAAQ,KAAK,UAAU;QACpC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CACtF,CAAC;AACH,CAAC;AAED,MAAM,4BAA4B,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC/E,MAAM,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,SAAS,EACT,aAAa,EACb,aAAa,EACb,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAAK,EACL,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,MAAM,EAAE,gDAAgD;I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ccccc;
6
+ }
7
+ .rst__lineChildren::after {
8
+ background-color: #cccccc;
9
+ }
10
+ .doc-row {
11
+ height: 100%;
12
+ white-space: nowrap;
13
+ display: flex;
14
+ border: solid #bbb 1px;
15
+ box-shadow: 0 2px 2px -2px;
16
+ padding: 0 5px 0 10px;
17
+ border-radius: 2px;
18
+ .doc-rowContents {
19
+ position: relative;
20
+ height: 100%;
21
+ min-width: 230px;
22
+ flex: 1 0 auto;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: space-between;
26
+ cursor: pointer;
27
+ }
28
+ .unit-tree-item {
29
+ min-width: 100%;
30
+ margin: 0;
31
+ border-bottom: none;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ .doc-moveHandle {
37
+ width: 20px;
38
+ font-size: 20px;
39
+ color: #ccc;
40
+ cursor: move;
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ z-index: 1;
45
+ }
@@ -0,0 +1,3 @@
1
+ import { TreeRenderer } from "@voplus/react-sortable-tree";
2
+ declare const FileThemeTreeNodeRenderer: TreeRenderer;
3
+ export default FileThemeTreeNodeRenderer;
@@ -0,0 +1,73 @@
1
+ import React, { Children, cloneElement } from "react";
2
+ import classnames from "classnames";
3
+ import styles from "./tree-node-renderer.less";
4
+ const FileThemeTreeNodeRenderer = (props) => {
5
+ const { children, listIndex, swapFrom, swapLength, swapDepth, scaffoldBlockPxWidth, lowerSiblingCounts, connectDropTarget, isOver, draggedNode, canDrop, treeIndex, treeId, // Delete from otherProps
6
+ getPrevRow, // Delete from otherProps
7
+ node, // Delete from otherProps
8
+ path, // Delete from otherProps
9
+ rowDirection, ...otherProps } = props;
10
+ // Construct the scaffold representing the structure of the tree
11
+ const scaffoldBlockCount = lowerSiblingCounts.length;
12
+ const scaffold = [];
13
+ lowerSiblingCounts.forEach((lowerSiblingCount, i) => {
14
+ let lineClass = "";
15
+ if (lowerSiblingCount > 0) {
16
+ // At this level in the tree, the nodes had sibling nodes further down
17
+ if (listIndex === 0) {
18
+ // Top-left corner of the tree
19
+ lineClass = "rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom";
20
+ }
21
+ else if (i === scaffoldBlockCount - 1) {
22
+ // Last scaffold block in the row, right before the row content
23
+ lineClass = "rst__lineHalfHorizontalRight rst__lineFullVertical";
24
+ }
25
+ else {
26
+ // Simply connecting the line extending down to the next sibling on this level
27
+ lineClass = "rst__lineFullVertical";
28
+ }
29
+ }
30
+ else if (listIndex === 0) {
31
+ // Top-left corner of the tree, but has no siblings
32
+ lineClass = "rst__lineHalfHorizontalRight";
33
+ }
34
+ else if (i === scaffoldBlockCount - 1) {
35
+ // The last or only node in this level of the tree
36
+ lineClass = "rst__lineHalfVerticalTop rst__lineHalfHorizontalRight";
37
+ }
38
+ scaffold.push(React.createElement("div", { key: `pre_${1 + i}`, style: { width: scaffoldBlockPxWidth }, className: classnames("rst__lineBlock", lineClass) }));
39
+ if (treeIndex !== listIndex && i === swapDepth) {
40
+ // This row has been shifted, and is at the depth of
41
+ // the line pointing to the new destination
42
+ let highlightLineClass = "";
43
+ if (listIndex === swapFrom + swapLength - 1) {
44
+ // This block is on the bottom (target) line
45
+ // This block points at the target block (where the row will go when released)
46
+ highlightLineClass = "rst__highlightBottomLeftCorner";
47
+ }
48
+ else if (treeIndex === swapFrom) {
49
+ // This block is on the top (source) line
50
+ highlightLineClass = "rst__highlightTopLeftCorner";
51
+ }
52
+ else {
53
+ // This block is between the bottom and top
54
+ highlightLineClass = "rst__highlightLineVertical";
55
+ }
56
+ const style = {
57
+ width: scaffoldBlockPxWidth,
58
+ left: scaffoldBlockPxWidth * i,
59
+ };
60
+ scaffold.push(React.createElement("div", { key: i, style: style, className: classnames("rst__absoluteLineBlock", highlightLineClass) }));
61
+ }
62
+ });
63
+ const style = { left: scaffoldBlockPxWidth * scaffoldBlockCount };
64
+ return connectDropTarget(React.createElement("div", { ...otherProps, className: classnames("rst__node", styles["documenet-node"]) },
65
+ scaffold,
66
+ React.createElement("div", { className: "rst__nodeContent", style: style }, Children.map(children, (child) => cloneElement(child, {
67
+ isOver,
68
+ canDrop,
69
+ draggedNode,
70
+ })))));
71
+ };
72
+ export default FileThemeTreeNodeRenderer;
73
+ //# sourceMappingURL=tree-node-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-node-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,yBAAyB,GAAiB,CAAC,KAAwB,EAAE,EAAE;IAC5E,MAAM,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,OAAO,EACP,SAAS,EACT,MAAM,EAAE,yBAAyB;IACjC,UAAU,EAAE,yBAAyB;IACrC,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,YAAY,EACZ,GAAG,UAAU,EACb,GAAG,KAAK,CAAC;IAEV,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAAC;IACrD,MAAM,QAAQ,GAAQ,EAAE,CAAC;IACzB,kBAAkB,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,SAAS,GAAG,EAAE,CAAC;QACnB,IAAI,iBAAiB,GAAG,CAAC,EAAE;YAC1B,sEAAsE;YAEtE,IAAI,SAAS,KAAK,CAAC,EAAE;gBACpB,8BAA8B;gBAC9B,SAAS,GAAG,0DAA0D,CAAC;aACvE;iBAAM,IAAI,CAAC,KAAK,kBAAkB,GAAG,CAAC,EAAE;gBACxC,+DA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AAM,KAAK,GAAG,EAAE,IAAI,EAAE,oBAAoB,GAAG,kBAAkB,EAAE,CAAC;IAClE,OAAO,iBAAiB,CACvB,gCAAS,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC/E,QAAQ;QAET,6BAAK,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,KAAK,IAC5C,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CACjC,YAAY,CAAC,KAAK,EAAE;YACnB,MAAM;YACN,OAAO;YACP,WAAW;SACX,CAAC,CACF,CACI,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,12 @@
1
+ .documenet-node {
2
+ :global {
3
+ .rst__lineHalfHorizontalRight::before,
4
+ .rst__lineFullVertical::after,
5
+ .rst__lineHalfVerticalTop::after,
6
+ .rst__lineHalfVerticalBottom::after {
7
+ position: absolute;
8
+ content: "";
9
+ background-color: #cccccc !important;
10
+ }
11
+ }
12
+ }
@@ -33,4 +33,7 @@ export interface ICorporate extends ILoadable {
33
33
  id: string;
34
34
  type: string;
35
35
  }[];
36
+ shareSettings: {
37
+ numberSequence: number;
38
+ };
36
39
  }
@@ -24,6 +24,9 @@ export declare type CorporateEditDataOptions = {
24
24
  LiabilityType?: string;
25
25
  CorporateStatus?: string;
26
26
  FYE?: Date;
27
+ Settings?: {
28
+ ShareNumberSequence?: number;
29
+ };
27
30
  };
28
31
  export declare type CorporateEditOptions = {
29
32
  data: CorporateEditDataOptions;
@@ -10,6 +10,8 @@ export declare class ShareCertificateStore extends DocumentTypeStore<IShareCerti
10
10
  sharecertSign(id: string, options: {
11
11
  image: string;
12
12
  } & StoreActionOptions): Promise<void>;
13
+ sendSignees(id: string, options: StoreActionOptions): Promise<void>;
14
+ sendShareholder(id: string, options: StoreActionOptions): Promise<void>;
13
15
  }
14
16
  /** React hook to retrieve ShareCertificateStore */
15
17
  export declare const useShareCertificateStore: () => ShareCertificateStore;
@@ -16,7 +16,21 @@ export class ShareCertificateStore extends DocumentTypeStore {
16
16
  }
17
17
  async sharecertSign(id, options) {
18
18
  await this.action(async () => {
19
- const r = await this.endpoint.post(`/api/csp/shares/certificates/${id}/sign`, new RequestBuilder().json(JSON.stringify(options.image)));
19
+ const r = await this.endpoint.post(`/api/csp/shares/certificates/${id}/sign`, new RequestBuilder().json(options.image));
20
+ const t = await r.json();
21
+ this._documents.items.overwrite(t.id, t);
22
+ }, options);
23
+ }
24
+ async sendSignees(id, options) {
25
+ await this.action(async () => {
26
+ const r = await this.endpoint.post(`/api/csp/shares/certificates/${id}/send-signees`);
27
+ const t = await r.json();
28
+ this._documents.items.overwrite(t.id, t);
29
+ }, options);
30
+ }
31
+ async sendShareholder(id, options) {
32
+ await this.action(async () => {
33
+ const r = await this.endpoint.post(`/api/csp/shares/certificates/${id}/send-shareholders`);
20
34
  const t = await r.json();
21
35
  this._documents.items.overwrite(t.id, t);
22
36
  }, options);
@@ -1 +1 @@
1
- {"version":3,"file":"ShareCertificateStore.js","sourceRoot":"","sources":["../../../src/data/share-certificate/ShareCertificateStore.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAsB,MAAM,qBAAqB,CAAC;AAErE,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,OAAO,qBAAsB,SAAQ,iBAO1C;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,8BAA8B,EAAE,SAAS,CAAC,CAAC;QAJ5D,wBAAwB;QACxB;;;;mBAA+B,SAAS;WAAC;IAIzC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,EAAU,EAAE,OAA+C;QACrF,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC5B,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACjC,gCAAgC,EAAE,OAAO,EACzC,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CACxD,CAAC;YACF,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;YACzB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC1C,CAAC,EAAE,OAAO,CAAC,CAAC;IACb,CAAC;CACD;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC5C,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,UAAU,CAChB,SAAS,EACT,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAC9E,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"ShareCertificateStore.js","sourceRoot":"","sources":["../../../src/data/share-certificate/ShareCertificateStore.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,GAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAsB,MAAM,qBAAqB,CAAC;AAErE,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,OAAO,qBAAsB,SAAQ,iBAO1C;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,8BAA8B,EAAE,SAAS,CAAC,CAAC;QAJ5D,wBAAwB;QACxB;;;;mBAA+B,SA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AC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC1C,CAAC,EAAE,OAAO,CAAC,CAAC;IACb,CAAC;CACD;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC5C,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,UAAU,CAChB,SAAS,EACT,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAC9E,CAAC;AACH,CAAC,CAAC"}
@@ -31,4 +31,7 @@ export interface IShareCertificate extends IDocument {
31
31
  signature1Date: string;
32
32
  signature2: string;
33
33
  signature2Date: string;
34
+ verifyURL: string;
35
+ certificateDate: string;
36
+ paymentText: string;
34
37
  }
@@ -11,4 +11,6 @@ export declare type EditShareCertificateOptions = {
11
11
  CertificateType?: ShareCertificateType;
12
12
  Signee1?: string;
13
13
  Signee2?: string;
14
+ CertificateDate?: string;
15
+ PaymentText?: string;
14
16
  };
@@ -1,22 +1,14 @@
1
1
  import "./index.less";
2
- import { useCorporate, useCorporateStore, } from "../../../../../data/corporate";
3
2
  import { Descriptions, Table, Timeline } from "@voplus/antd";
3
+ import Properties from "../CompanyProperties/Properties";
4
4
  import Card from "@voplus/morpho-ui/es/controls/Card";
5
5
  import Column from "@voplus/antd/es/table/Column";
6
- import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
7
6
  import Header from "../../../../../components/Header";
8
- import { InlineEdit } from "@voplus/morpho-ui";
9
- import InlineEditAddress from "../InlineEditAddress";
10
- import InlineEditCountry from "../InlineEditCountry";
11
- import InlineEditType from "../InlineEditType";
12
7
  import React from "react";
13
8
  import Scrollbars from "react-custom-scrollbars";
14
- import moment from "moment";
15
9
  import { observe } from "@voplus/morpho-ui";
16
10
  const CompanyDetailsView = (props) => {
17
11
  const { id } = props;
18
- const corporate = useCorporate(id, { includes: "registers" });
19
- const corporateStore = useCorporateStore();
20
12
  const capital = [
21
13
  {
22
14
  Id: "1",
@@ -27,36 +19,21 @@ const CompanyDetailsView = (props) => {
27
19
  },
28
20
  ];
29
21
  const guaranteed = [{ Id: "1", Currency: "SGD", Amount: "$50,000" }];
22
+ const companyProperties = [
23
+ "Country of Registration",
24
+ "Type",
25
+ "Liability Type",
26
+ "Registration Number",
27
+ "Registration Date",
28
+ "Registered Address",
29
+ ];
30
30
  return observe(() => (React.createElement(React.Fragment, null,
31
31
  React.createElement(Header, { text: "Company Details" }),
32
32
  React.createElement("div", { className: "company-details-view" },
33
33
  React.createElement(Scrollbars, { autoHide: true },
34
34
  React.createElement(Card, { shadow: true, className: "card-company" },
35
- React.createElement(Descriptions, { title: "Company" },
36
- React.createElement(Descriptions.Item, { label: "Country of Registration" },
37
- React.createElement(InlineEditCountry, { country: corporate.jurisdiction, list: corporate.allowedJurisdictions, onChange: (country) => save({
38
- Jurisdiction: country,
39
- }) })),
40
- React.createElement(Descriptions.Item, { label: "Type" },
41
- React.createElement(InlineEditType, { type: corporate.corporateType, list: ["Proprietorship", "Company", "Partnership"], readonly: !corporate.allowEdit, onSave: (value) => save({
42
- CorporateType: value,
43
- }) })),
44
- React.createElement(Descriptions.Item, { label: "Liability Type" },
45
- React.createElement(InlineEditType, { type: corporate.liabilityType, list: ["Unlimited", "LimitedByShares", "LimitedByGuarantee"], readonly: !corporate.allowEdit, onSave: (value) => save({
46
- LiabilityType: value,
47
- }) })),
48
- React.createElement(Descriptions.Item, { label: "Registration Number" },
49
- React.createElement(InlineEdit, { defaultValue: corporate.registrationNumber, editable: corporate.allowEdit, content: (v) => React.createElement("div", null, v.store.value || "No Registration Number"), onSave: (value) => value &&
50
- value !== corporate.registrationNumber &&
51
- save({
52
- RegistrationNumber: value,
53
- }) })),
54
- React.createElement(Descriptions.Item, { label: "Registration Date" },
55
- React.createElement(InlineEdit, { defaultValue: moment(corporate.registrationDate), editable: corporate.allowEdit, content: (v) => (React.createElement("span", null, v ? moment(v.store.value).format("YYYY-MM-DD") : "No Registration Date")), editor: DateInputEditor, onSave: changeRegistrationDate })),
56
- React.createElement(Descriptions.Item, { label: "Registered Address" },
57
- React.createElement(InlineEditAddress, { address: corporate.registeredAddress, readonly: !corporate.allowEdit, modal: true, onChange: (address) => save({
58
- RegisteredAddress: address,
59
- }) })))),
35
+ React.createElement(Descriptions, { title: "Company" }, companyProperties.map((item, index) => (React.createElement(Descriptions.Item, { key: index, label: item },
36
+ React.createElement(Properties, { id: id, propertiesName: item })))))),
60
37
  React.createElement(Card, { shadow: true },
61
38
  React.createElement("div", { className: "company-amount-title" }, "Capital / Guaranteed Amount"),
62
39
  React.createElement("h4", null, "Capital"),
@@ -76,18 +53,6 @@ const CompanyDetailsView = (props) => {
76
53
  React.createElement(Timeline.Item, null, "Solve initial network problems 2015-09-01"),
77
54
  React.createElement(Timeline.Item, null, "Technical testing 2015-09-01"),
78
55
  React.createElement(Timeline.Item, null, "Network problems being solved 2015-09-01"))))))));
79
- function changeRegistrationDate(v) {
80
- // date未变更不保存
81
- if ((corporate === null || corporate === void 0 ? void 0 : corporate.registrationDate) && moment(v).isSame(corporate.registrationDate, "day"))
82
- return;
83
- save({ RegistrationDate: v });
84
- }
85
- async function save(options) {
86
- await corporateStore.edit(id, {
87
- data: options,
88
- error: "message",
89
- });
90
- }
91
56
  };
92
57
  export default CompanyDetailsView;
93
58
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CompanyDetailsView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAEN,YAAY,EACZ,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,MAAM,MAAM,8BAA8B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;IACtC,CAAC;IACD,KAAK,UAAU,IAAI,CAAC,OAAiC;QACpD,MAAM,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE;YAC7B,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CompanyDetailsView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,UAAqC,MAAM,iCAAiC,CAAC;AAEpF,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,kBAAkB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACpD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,MAAM,OAAO,GAAG;QACf;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,UAAU;YACjB,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,SAAS;SACvB;KACD,CAAC;IACF,MAAM,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACrE,MAAM,iBAAiB,GAAG;QACzB,yBAAyB;QACzB,MAAM;QACN,gBAAgB;QAChB,qBAAqB;QACrB,mBAAmB;QACnB,oBAAoB;KACpB,CAAC;IAEF,OAAO,OAAO,CAAC,GAA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IAAI,EAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAE,KAAK,EAAE,QAAQ;wBACnF,oBAAC,MAAM,IAAC,KAAK,EAAC,UAAU,EAAC,SAAS,EAAC,UAAU,EAAC,GAAG,EAAC,UAAU,GAAG;wBAC/D,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAC,QAAQ,GAAG,CAClD,CACF;gBACP,oBAAC,IAAI,IAAC,MAAM;oBACX,6BAAK,SAAS,EAAC,wBAAwB,qBAAqB;oBAC5D,oBAAC,QAAQ;wBACR,oBAAC,QAAQ,CAAC,IAAI,4CAAkD;wBAChE,oBAAC,QAAQ,CAAC,IAAI,oDAA0D;wBACxE,oBAAC,QAAQ,CAAC,IAAI,uCAA6C;wBAC3D,oBAAC,QAAQ,CAAC,IAAI,mDAAyD,CAC7D,CACL,CACK,CACR,CACU,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare type CompanyPropertiesName = "Country of Registration" | "Type" | "Liability Type" | "Registration Number" | "Registration Date" | "Registered Address" | "Corporate Status" | "FYE";
3
+ declare const Properties: (props: {
4
+ id: string;
5
+ propertiesName: CompanyPropertiesName;
6
+ }) => JSX.Element;
7
+ export default Properties;
@@ -0,0 +1,68 @@
1
+ import { useCorporate, useCorporateStore, } from "../../../../../data/corporate";
2
+ import { InlineEdit, observe } from "@voplus/morpho-ui";
3
+ import CorporateStatusLabel from "../../controls/CorporateStatusLabel";
4
+ import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
5
+ import InlineEditAddress from "../InlineEditAddress";
6
+ import InlineEditCountry from "../InlineEditCountry";
7
+ import InlineEditType from "../InlineEditType";
8
+ import React from "react";
9
+ import moment from "moment";
10
+ const Properties = (props) => {
11
+ const { id, propertiesName } = props;
12
+ const corporate = useCorporate(id, { includes: "registers" });
13
+ const corporateStore = useCorporateStore();
14
+ return observe(() => React.createElement(React.Fragment, null, renderProp(propertiesName)));
15
+ function renderProp(name) {
16
+ switch (name) {
17
+ case "Country of Registration":
18
+ return (React.createElement(InlineEditCountry, { country: corporate.jurisdiction, list: corporate.allowedJurisdictions, onChange: (country) => save({
19
+ Jurisdiction: country,
20
+ }) }));
21
+ case "Type":
22
+ return (React.createElement(InlineEditType, { type: corporate.corporateType, list: ["Proprietorship", "Company", "Partnership"], readonly: !corporate.allowEdit, onSave: (value) => save({
23
+ CorporateType: value,
24
+ }) }));
25
+ case "Liability Type":
26
+ return (React.createElement(InlineEditType, { type: corporate.liabilityType, list: ["Unlimited", "LimitedByShares", "LimitedByGuarantee"], readonly: !corporate.allowEdit, onSave: (value) => save({
27
+ LiabilityType: value,
28
+ }) }));
29
+ case "Registration Number":
30
+ return (React.createElement(InlineEdit, { defaultValue: corporate.registrationNumber, editable: corporate.allowEdit, content: (v) => v.store.value ? (React.createElement("span", null, v.store.value)) : (React.createElement("span", { className: "add-info-style" }, "No Registration Number")), onSave: (value) => value &&
31
+ value !== corporate.registrationNumber &&
32
+ save({
33
+ RegistrationNumber: value,
34
+ }) }));
35
+ case "Registration Date":
36
+ return (React.createElement(InlineEdit, { defaultValue: moment(corporate.registrationDate), editable: corporate.allowEdit, content: (v) => corporate.registrationDate ? (React.createElement("span", null, moment(corporate.registrationDate).format("DD MMM yyyy"))) : (React.createElement("span", { className: "add-info-style" }, "No Registration Date")), editor: DateInputEditor, onSave: changeRegistrationDate }));
37
+ case "Registered Address":
38
+ return (React.createElement(InlineEditAddress, { address: corporate.registeredAddress, readonly: !corporate.allowEdit, modal: true, onChange: (address) => save({
39
+ RegisteredAddress: address,
40
+ }) }));
41
+ case "Corporate Status":
42
+ return (React.createElement(CorporateStatusLabel, { status: corporate.corporateStatus, editable: true, onChange: (status) => save({
43
+ CorporateStatus: status,
44
+ }) }));
45
+ case "FYE":
46
+ return (React.createElement(InlineEdit, { defaultValue: (corporate === null || corporate === void 0 ? void 0 : corporate.fYE) ? moment(corporate === null || corporate === void 0 ? void 0 : corporate.fYE) : undefined, editable: corporate.allowEdit, content: (v) => (corporate === null || corporate === void 0 ? void 0 : corporate.fYE) ? (React.createElement("span", null, moment(corporate === null || corporate === void 0 ? void 0 : corporate.fYE).format("DD MMM"))) : (React.createElement("span", { className: "add-info-style" }, "Add FYE")), editor: DateInputEditor, onSave: changeFYEDate }));
47
+ }
48
+ }
49
+ async function save(options) {
50
+ await corporateStore.edit(id, {
51
+ data: options,
52
+ error: "message",
53
+ });
54
+ }
55
+ function changeRegistrationDate(v) {
56
+ // date未变更不保存
57
+ if ((corporate === null || corporate === void 0 ? void 0 : corporate.registrationDate) && moment(v).isSame(corporate.registrationDate, "day"))
58
+ return;
59
+ save({ RegistrationDate: v });
60
+ }
61
+ function changeFYEDate(v) {
62
+ if ((corporate === null || corporate === void 0 ? void 0 : corporate.fYE) && moment(v).isSame(corporate.fYE, "day"))
63
+ return;
64
+ save({ FYE: v !== null ? v : "" });
65
+ }
66
+ };
67
+ export default Properties;
68
+ //# sourceMappingURL=Properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Properties.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/company/components/CompanyProperties/Properties.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGN,YAAY,EACZ,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,oBAAoB,MAAM,qCAAqC,CAAC;AACvE,OAAO,eAAe,MAAM,kEAAkE,CAAC;AAC/F,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAY5B,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AAC,MAAM,CAAC,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC;YAAE,OAAO;QAC/F,IAAI,CAAC,EAAE,gBAAgB,EAAE,CAAQ,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,aAAa,CAAC,CAAgB;QACtC,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,GAAG,KAAI,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC;YAAE,OAAO;QACrE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAE,CAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,5 +1,11 @@
1
1
  /// <reference types="react" />
2
- declare const CompanyPropertiesCard: (props: {
3
- id: string;
4
- }) => JSX.Element;
2
+ declare const CompanyPropertiesCard: {
3
+ (props: {
4
+ id: string;
5
+ companyProperties?: string[];
6
+ }): JSX.Element;
7
+ defaultProps: {
8
+ companyProperties: string[];
9
+ };
10
+ };
5
11
  export default CompanyPropertiesCard;