@voplus/morpho-csp 1.0.0-dev002

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 (106) hide show
  1. package/changelog.md +0 -0
  2. package/es/Modules.d.ts +6 -0
  3. package/es/Modules.js +17 -0
  4. package/es/Modules.js.map +1 -0
  5. package/es/components/CurrencyView/index.d.ts +9 -0
  6. package/es/components/CurrencyView/index.js +196 -0
  7. package/es/components/CurrencyView/index.js.map +1 -0
  8. package/es/components/CurrencyView/state.d.ts +9 -0
  9. package/es/components/CurrencyView/state.js +206 -0
  10. package/es/components/CurrencyView/state.js.map +1 -0
  11. package/es/components/TableDragRow/FormRowContext.d.ts +4 -0
  12. package/es/components/TableDragRow/FormRowContext.js +5 -0
  13. package/es/components/TableDragRow/FormRowContext.js.map +1 -0
  14. package/es/components/TableDragRow/index.d.ts +3 -0
  15. package/es/components/TableDragRow/index.js +41 -0
  16. package/es/components/TableDragRow/index.js.map +1 -0
  17. package/es/data/metas.d.ts +0 -0
  18. package/es/data/metas.js +1 -0
  19. package/es/data/metas.js.map +1 -0
  20. package/es/data/shareTransaction/ShareTransactionStore.d.ts +12 -0
  21. package/es/data/shareTransaction/ShareTransactionStore.js +17 -0
  22. package/es/data/shareTransaction/ShareTransactionStore.js.map +1 -0
  23. package/es/data/shareTransaction/hooks.d.ts +9 -0
  24. package/es/data/shareTransaction/hooks.js +20 -0
  25. package/es/data/shareTransaction/hooks.js.map +1 -0
  26. package/es/data/shareTransaction/index.d.ts +4 -0
  27. package/es/data/shareTransaction/index.js +5 -0
  28. package/es/data/shareTransaction/index.js.map +1 -0
  29. package/es/data/shareTransaction/interfaces/IShareTransaction.d.ts +20 -0
  30. package/es/data/shareTransaction/interfaces/IShareTransaction.js +1 -0
  31. package/es/data/shareTransaction/interfaces/IShareTransaction.js.map +1 -0
  32. package/es/data/shareTransaction/interfaces/IShareTransactionLine.d.ts +19 -0
  33. package/es/data/shareTransaction/interfaces/IShareTransactionLine.js +1 -0
  34. package/es/data/shareTransaction/interfaces/IShareTransactionLine.js.map +1 -0
  35. package/es/data/shareTransaction/interfaces/index.d.ts +2 -0
  36. package/es/data/shareTransaction/interfaces/index.js +3 -0
  37. package/es/data/shareTransaction/interfaces/index.js.map +1 -0
  38. package/es/data/shareTransaction/metas.d.ts +6 -0
  39. package/es/data/shareTransaction/metas.js +13 -0
  40. package/es/data/shareTransaction/metas.js.map +1 -0
  41. package/es/data/shareTransaction/types/ShareLineCreateOptions.d.ts +12 -0
  42. package/es/data/shareTransaction/types/ShareLineCreateOptions.js +1 -0
  43. package/es/data/shareTransaction/types/ShareLineCreateOptions.js.map +1 -0
  44. package/es/data/shareTransaction/types/ShareTransactionCreateOptions.d.ts +11 -0
  45. package/es/data/shareTransaction/types/ShareTransactionCreateOptions.js +1 -0
  46. package/es/data/shareTransaction/types/ShareTransactionCreateOptions.js.map +1 -0
  47. package/es/data/shareTransaction/types/ShareTransactionEditOptions.d.ts +10 -0
  48. package/es/data/shareTransaction/types/ShareTransactionEditOptions.js +1 -0
  49. package/es/data/shareTransaction/types/ShareTransactionEditOptions.js.map +1 -0
  50. package/es/data/shareTransaction/types/ShareTransactionType.d.ts +1 -0
  51. package/es/data/shareTransaction/types/ShareTransactionType.js +1 -0
  52. package/es/data/shareTransaction/types/ShareTransactionType.js.map +1 -0
  53. package/es/data/shareTransaction/types/index.d.ts +3 -0
  54. package/es/data/shareTransaction/types/index.js +4 -0
  55. package/es/data/shareTransaction/types/index.js.map +1 -0
  56. package/es/modules/legalEntity/shareTransactionsRegister/ShareMovementsDataIcon/index.d.ts +7 -0
  57. package/es/modules/legalEntity/shareTransactionsRegister/ShareMovementsDataIcon/index.js +36 -0
  58. package/es/modules/legalEntity/shareTransactionsRegister/ShareMovementsDataIcon/index.js.map +1 -0
  59. package/es/modules/legalEntity/shareTransactionsRegister/ShareMovementsDataIcon/index.less +11 -0
  60. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.d.ts +4 -0
  61. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.js +70 -0
  62. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.js.map +1 -0
  63. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.less +94 -0
  64. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.d.ts +8 -0
  65. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.js +36 -0
  66. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.js.map +1 -0
  67. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.less +65 -0
  68. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDataContext.d.ts +29 -0
  69. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDataContext.js +64 -0
  70. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDataContext.js.map +1 -0
  71. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDragCell.d.ts +3 -0
  72. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDragCell.js +90 -0
  73. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDragCell.js.map +1 -0
  74. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.d.ts +6 -0
  75. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.js +152 -0
  76. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/index.js.map +1 -0
  77. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.d.ts +7 -0
  78. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.js +85 -0
  79. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.js.map +1 -0
  80. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/index.less +15 -0
  81. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/state.d.ts +7 -0
  82. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/state.js +27 -0
  83. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionList/state.js.map +1 -0
  84. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.d.ts +4 -0
  85. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.js +48 -0
  86. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.js.map +1 -0
  87. package/es/modules/legalEntity/shareTransactionsRegister/ShareTransactionRegisterDefaultView/index.less +22 -0
  88. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.d.ts +13 -0
  89. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.js +34 -0
  90. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/index.js.map +1 -0
  91. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/state.d.ts +8 -0
  92. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/state.js +23 -0
  93. package/es/modules/legalEntity/shareTransactionsRegister/ShareholderSelector/state.js.map +1 -0
  94. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.d.ts +5 -0
  95. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.js +28 -0
  96. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeDropdown/index.js.map +1 -0
  97. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.d.ts +3 -0
  98. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.js +33 -0
  99. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.js.map +1 -0
  100. package/es/modules/legalEntity/shareTransactionsRegister/TransactionTypeFilter/index.less +5 -0
  101. package/es/routes.d.ts +17 -0
  102. package/es/routes.js +38 -0
  103. package/es/routes.js.map +1 -0
  104. package/es/style/common.less +25 -0
  105. package/package.json +68 -0
  106. package/readme.md +0 -0
@@ -0,0 +1,19 @@
1
+ export interface IShareTransactionLine {
2
+ /** Index of the line. */
3
+ sequence: number;
4
+ /** Id of the line. */
5
+ id: number;
6
+ /** Shareholder of the line */
7
+ shareholder: {
8
+ id: string;
9
+ name: string;
10
+ };
11
+ /** ShareType of line*/
12
+ class: string;
13
+ /** Consideration of the line */
14
+ consideration: number;
15
+ /** Shares of the line */
16
+ shares: number;
17
+ /** Currency of the line */
18
+ currency: string;
19
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=IShareTransactionLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IShareTransactionLine.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/interfaces/IShareTransactionLine.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./IShareTransactionLine";
2
+ export * from "./IShareTransaction";
@@ -0,0 +1,3 @@
1
+ export * from "./IShareTransactionLine";
2
+ export * from "./IShareTransaction";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DefaultDocumentTypeMeta } from "@voplus/morpho-document";
2
+ /** Meta information for Meeting document. */
3
+ export declare class ShareTransactionTypeMeta extends DefaultDocumentTypeMeta {
4
+ static TypeName: string;
5
+ get name(): string;
6
+ }
@@ -0,0 +1,13 @@
1
+ import { DefaultDocumentTypeMeta } from "@voplus/morpho-document";
2
+ /** Meta information for Meeting document. */
3
+ let ShareTransactionTypeMeta = /** @class */ (() => {
4
+ class ShareTransactionTypeMeta extends DefaultDocumentTypeMeta {
5
+ get name() {
6
+ return ShareTransactionTypeMeta.TypeName;
7
+ }
8
+ }
9
+ ShareTransactionTypeMeta.TypeName = "ShareTransaction";
10
+ return ShareTransactionTypeMeta;
11
+ })();
12
+ export { ShareTransactionTypeMeta };
13
+ //# sourceMappingURL=metas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metas.js","sourceRoot":"","sources":["../../../src/data/shareTransaction/metas.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,6CAA6C;AAC7C;IAAA,MAAa,wBAAyB,SAAQ,uBAAuB;QAGpE,IAAW,IAAI;YACd,OAAO,wBAAwB,CAAC,QAAQ,CAAC;QAC1C,CAAC;;IAJa,iCAAQ,GAAG,kBAAkB,CAAC;IAK7C,+BAAC;KAAA;SANY,wBAAwB"}
@@ -0,0 +1,12 @@
1
+ export declare type ShareLineCreateOptions = {
2
+ /** Shareholder of the new share line. */
3
+ Shareholder?: string;
4
+ /** Consideration of the new share line */
5
+ Consideration: number;
6
+ /** Currency of the new share line.*/
7
+ Currency: string;
8
+ /** Shares of the new share line. */
9
+ Shares: number;
10
+ /** Type of share line(Ordinary | Preference | undefined )*/
11
+ Class: string;
12
+ };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ShareLineCreateOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShareLineCreateOptions.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/types/ShareLineCreateOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { CreateDocumentOptions } from "@voplus/morpho-document/es/data/DocumentStore";
2
+ import { ShareTransactionType } from "./ShareTransactionType";
3
+ export declare type ShareTransactionCreateOptions = {
4
+ ParentId: string;
5
+ /** ShareTransactionType of the ShareTransaction */
6
+ TransactionType: ShareTransactionType;
7
+ /** Currency of the ShareTransaction */
8
+ Currency: string;
9
+ /** DateTime of the ShareTransaction */
10
+ Date?: Date;
11
+ } & CreateDocumentOptions;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ShareTransactionCreateOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShareTransactionCreateOptions.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/types/ShareTransactionCreateOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { EditDocumentOptions } from "@voplus/morpho-document/es/data/DocumentStore";
2
+ import { ShareLineCreateOptions } from "./ShareLineCreateOptions";
3
+ export declare type ShareTransactionEditOptions = {
4
+ /** Currency of the ShareTransaction */
5
+ Currency?: string;
6
+ /** DateTime of the ShareTransaction. */
7
+ Date?: Date;
8
+ /** Array of lines to be updated */
9
+ Lines?: ShareLineCreateOptions[];
10
+ } & EditDocumentOptions;
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ShareTransactionEditOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShareTransactionEditOptions.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/types/ShareTransactionEditOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare type ShareTransactionType = "Allotment" | "Transfer" | "Cancel" | "Convert" | "Consolidate" | "Divide" | "Import" | "Others";
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ShareTransactionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShareTransactionType.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/types/ShareTransactionType.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from "./ShareTransactionCreateOptions";
2
+ export * from "./ShareTransactionEditOptions";
3
+ export * from "./ShareTransactionType";
@@ -0,0 +1,4 @@
1
+ export * from "./ShareTransactionCreateOptions";
2
+ export * from "./ShareTransactionEditOptions";
3
+ export * from "./ShareTransactionType";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data/shareTransaction/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ import { IShareTransactionLine } from "../../../../data/shareTransaction";
4
+ declare const ShareMovementsDataIcon: (props: {
5
+ lines: IShareTransactionLine[];
6
+ }) => JSX.Element;
7
+ export default ShareMovementsDataIcon;
@@ -0,0 +1,36 @@
1
+ import "./index.less";
2
+ import { Popover, Table } from "@voplus/antd";
3
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
+ import React from "react";
5
+ import { faTable } from "@fortawesome/pro-light-svg-icons";
6
+ const columns = [
7
+ {
8
+ title: "Shareholder",
9
+ dataIndex: "shareholder",
10
+ render: (text, record) => record.shareholder.name
11
+ },
12
+ {
13
+ title: "Share Type",
14
+ dataIndex: "class"
15
+ },
16
+ {
17
+ title: "Shares",
18
+ dataIndex: "shares"
19
+ },
20
+ {
21
+ title: "Currency",
22
+ dataIndex: "currency"
23
+ },
24
+ {
25
+ title: "Consideration",
26
+ dataIndex: "consideration"
27
+ }
28
+ ];
29
+ const ShareMovementsDataIcon = (props) => {
30
+ const { lines } = props;
31
+ const content = React.createElement(Table, { columns: columns, rowKey: "id", dataSource: lines, pagination: false });
32
+ return (React.createElement(Popover, { placement: "topLeft", title: "ShareTransaction Lines", content: content, overlayClassName: "share-movements-data-popover" },
33
+ React.createElement(FAIcon, { icon: faTable, className: "share-movements-data-icon" })));
34
+ };
35
+ export default ShareMovementsDataIcon;
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/legalEntity/shareTransactionsRegister/ShareMovementsDataIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,OAAO,GAAG;IACf;QACC,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,aAAa;QACxB,MAAM,EAAE,CAAC,IAAS,EAAE,MAA6B,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI;KAC7E;IACD;QACC,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE,OAAO;KAClB;IACD;QACC,KAAK,EAAE,QAAQ;QACf,SAAS,EAAE,QAAQ;KACnB;IACD;QACC,KAAK,EAAE,UAAU;QACjB,SAAS,EAAE,UAAU;KACrB;IACD;QACC,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,eAAe;KAC1B;CACD,CAAC;AACF,MAAM,sBAAsB,GAAG,CAAC,KAAyC,EAAE,EAAE;IAC5E,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,MAAM,OAAO,GAAG,oBAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAC,IAAI,EAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,GAAI,CAAC;IAC9F,OAAO,CACN,oBAAC,OAAO,IACP,SAAS,EAAC,SAAS,EACnB,KAAK,EAAC,wBAAwB,EAC9B,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAC,8BAA8B;QAE/C,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC,2BAA2B,GAAG,CACtD,CACV,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ :global {
2
+ .share-movements-data-popover {
3
+ .ant-table-thead > tr > th,
4
+ .ant-table-tbody > tr > td {
5
+ padding: 10px 15px;
6
+ }
7
+ }
8
+ .share-movements-data-icon {
9
+ cursor: pointer;
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const ShareTransactionDefaultView: () => JSX.Element;
4
+ export default ShareTransactionDefaultView;
@@ -0,0 +1,70 @@
1
+ import "./index.less";
2
+ import { AsideContent, InlineEdit } from "@voplus/morpho-ui";
3
+ import { useShareTransaction, useShareTransactionStore } from "../../../../data/shareTransaction";
4
+ import React, { useEffect, useState } from "react";
5
+ import { useRouteMatch } from "react-router";
6
+ import CurrencyView from "../../../../components/CurrencyView";
7
+ import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
8
+ import DocumentName from "@voplus/morpho-document/es/components/DocumentName";
9
+ import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
10
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
11
+ import RichTextEditor from "@voplus/morpho-ui/es/controls/RichTextEditor";
12
+ import ShareTransactionItems from "../ShareTransactionItems";
13
+ import { Skeleton } from "@voplus/antd";
14
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar";
15
+ import { faEdit } from "@fortawesome/pro-light-svg-icons";
16
+ import moment from "moment";
17
+ import { useObserver } from "mobx-react-lite";
18
+ import { useTabItem } from "@voplus/morpho-data";
19
+ const ShareTransactionDefaultView = () => {
20
+ const match = useRouteMatch();
21
+ const id = match.params.id;
22
+ const [reload, setReload] = useState(true);
23
+ const shareTransaction = useShareTransaction(id, { reload, includes: "tags" });
24
+ const shareStore = useShareTransactionStore();
25
+ const tab = useTabItem();
26
+ tab.title = (shareTransaction && shareTransaction.name) || "";
27
+ const [asideContext] = useState(AsideContent.createContext());
28
+ useEffect(() => {
29
+ asideContext.openAside(AsideElement, { span: 11 });
30
+ }, []);
31
+ const AsideElement = (React.createElement("div", { className: "csp-default-view_aside" },
32
+ React.createElement(DocumentTabs, { id: id })));
33
+ return useObserver(() => (React.createElement(AsideContent, { context: asideContext },
34
+ React.createElement("div", { className: "csp-default-view share-transaction-default-view" },
35
+ React.createElement("div", { className: "share-transaction-header" }, shareTransaction.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
36
+ React.createElement(DocumentName, { id: id, inlineEdit: true, includes: "tags" }),
37
+ React.createElement(ToolBar, { id: id, reload: true, includes: "tags", expand: true, onExpand: () => asideContext.asideContent
38
+ ? asideContext.closeAside()
39
+ : asideContext.openAside(AsideElement, { span: 12 }), onLock: () => shareStore.edit(id, {
40
+ Status: "Readonly"
41
+ }), onUnlock: () => shareStore.edit(id, {
42
+ Status: "Normal"
43
+ }), onReLoad: onReLoad })))),
44
+ shareTransaction.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement("div", { className: "shareTransaction-item-info" },
45
+ React.createElement("div", null,
46
+ React.createElement("div", { className: "bold" }, "Date"),
47
+ React.createElement(InlineEdit, { editor: DateInputEditor, editable: !shareTransaction.readonly, defaultValue: moment(shareTransaction.date), content: v => (React.createElement(React.Fragment, null, v.store.value ? moment(v.store.value).format("YYYY-MM-DD") : "Add DateTime")), onSave: (v) => v
48
+ ? shareStore.edit(id, {
49
+ Date: new Date(v)
50
+ })
51
+ : null })),
52
+ React.createElement("div", null,
53
+ React.createElement("div", { className: "bold" }, "TransactionType"),
54
+ React.createElement("span", { className: "transaction-type" }, shareTransaction.transactionType)),
55
+ React.createElement("div", null,
56
+ React.createElement("div", { className: "bold" }, "Currency"),
57
+ React.createElement(CurrencyView, { readonly: shareTransaction.readonly, currency: shareTransaction.currency, onChange: currency => shareStore.edit(id, { Currency: currency }) })))),
58
+ shareTransaction.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(ShareTransactionItems, { data: shareTransaction })),
59
+ React.createElement("div", { style: { paddingTop: "15px" } }, shareTransaction.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(RichTextEditor, { readOnly: shareTransaction.readonly, editable: false, content: shareTransaction.description || "", placeholder: shareTransaction.readonly ? ("") : (React.createElement("span", null,
60
+ React.createElement(FAIcon, { icon: faEdit }),
61
+ "Add Description")), onSave: v => shareStore.edit(id, { Description: v }) })))))));
62
+ function onReLoad() {
63
+ setReload(false);
64
+ setTimeout(() => {
65
+ setReload(true);
66
+ }, 100);
67
+ }
68
+ };
69
+ export default ShareTransactionDefaultView;
70
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/legalEntity/shareTransactionsRegister/ShareTransactionDefaultView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAGN,mBAAmB,EACnB,wBAAwB,EACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAmB,aAAa,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,eAAe,MAAM,kEAAkE,CAAC;AAC/F,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAC1E,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,OAAO,MAAM,6CAA6C,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,2BAA2B,GAAG,GAAG,EAAE;IACxC,MAAM,KAAK,GAAG,aAAa,EAAkB,CAAC;IAC9C,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CA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AU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,94 @@
1
+ @import "../../../../style/common.less";
2
+ :global {
3
+ .share-transaction-default-view {
4
+ padding: 10px 20px;
5
+ .share-transaction-header {
6
+ display: flex;
7
+ justify-content: space-between;
8
+ .ant-input {
9
+ width: 26vw;
10
+ }
11
+ }
12
+ .shareTransaction-item-info {
13
+ display: flex;
14
+ padding: 15px 0;
15
+ margin: 0 -10px;
16
+ > div {
17
+ flex: 1;
18
+ color: #000;
19
+ padding: 0 10px;
20
+ }
21
+ .bold {
22
+ font-weight: 500;
23
+ font-size: 15px;
24
+ padding-bottom: 10px;
25
+ }
26
+ .morpho-inline-edit {
27
+ display: inline-block;
28
+
29
+ .svg-inline--fa {
30
+ margin-right: 5px;
31
+ }
32
+ }
33
+ .ant-select {
34
+ width: 130px !important;
35
+ }
36
+ }
37
+ .ant-table {
38
+ .ant-table-container {
39
+ overflow-x: auto;
40
+ }
41
+ .ant-input-number {
42
+ width: 100%;
43
+ }
44
+ .ant-table-thead > tr > th {
45
+ padding: 10px;
46
+ }
47
+ .ant-table-tbody > tr > td {
48
+ padding: 5px 10px;
49
+ min-width: 120px;
50
+ height: 54px;
51
+ &.column-dnd {
52
+ min-width: 40px;
53
+ text-align: center;
54
+ }
55
+ }
56
+ .editable-cell-wrap {
57
+ display: flex;
58
+ justify-content: space-between;
59
+ align-items: center;
60
+ > div {
61
+ flex: 1;
62
+ }
63
+ .ant-empty {
64
+ width: 100%;
65
+ }
66
+ }
67
+ .ant-table-footer {
68
+ display: flex;
69
+ justify-content: space-between;
70
+ align-items: center;
71
+ padding: 10px 0;
72
+ .operate {
73
+ flex: 1;
74
+ .cancel {
75
+ color: #666;
76
+ }
77
+ }
78
+ .total {
79
+ display: inline-block;
80
+ min-width: calc((100% - 40px) / 5);
81
+ padding-left: 10px;
82
+ span {
83
+ margin-left: 5px;
84
+ font-size: 15px;
85
+ font-weight: 500;
86
+ }
87
+ & + .total {
88
+ margin-left: calc((100% - 40px) / 5);
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const ShareTransactionItem: (props: {
4
+ id: string;
5
+ connectDragSource?: any;
6
+ className?: string;
7
+ }) => JSX.Element;
8
+ export default ShareTransactionItem;
@@ -0,0 +1,36 @@
1
+ import "./index.less";
2
+ import React, { useState } from "react";
3
+ import { useShareTransaction, useShareTransactionStore } from "../../../../data/shareTransaction";
4
+ import CurrencyView from "../../../../components/CurrencyView";
5
+ import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
6
+ import DocumentName from "@voplus/morpho-document/es/components/DocumentName";
7
+ import { InlineEdit } from "@voplus/morpho-ui";
8
+ import ShareMovementsDataIcon from "../ShareMovementsDataIcon";
9
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar";
10
+ import classnames from "classnames";
11
+ import moment from "moment";
12
+ import { useObserver } from "mobx-react-lite";
13
+ const ShareTransactionItem = (props) => {
14
+ const { id, connectDragSource, className } = props;
15
+ const shareTransaction = useShareTransaction(id, {
16
+ reload: (i) => !i.tags || !i.transactionType,
17
+ includes: "tags"
18
+ });
19
+ const [hover, setHover] = useState(false);
20
+ const shareStore = useShareTransactionStore();
21
+ return useObserver(() => (React.createElement("div", { className: classnames("shareTransaction-item", className, { hover }), onMouseOver: () => setHover(true), onMouseLeave: () => setHover(false) },
22
+ React.createElement(DocumentName, { id: id, includes: "tags" }),
23
+ React.createElement("div", { className: "shareTransaction-item-info" },
24
+ React.createElement(InlineEdit, { editor: DateInputEditor, editable: !shareTransaction.readonly, defaultValue: shareTransaction.date ? moment(shareTransaction.date) : undefined, content: v => (React.createElement("span", { className: "transaction-date" }, v.store.value ? moment(v.store.value).format("DD MMM YYYY") : "Add DateTime")), onSave: (v) => v
25
+ ? shareStore.edit(id, {
26
+ Date: new Date(v)
27
+ })
28
+ : null }),
29
+ React.createElement("span", { className: "transaction-type" }, shareTransaction.transactionType),
30
+ React.createElement(CurrencyView, { currency: shareTransaction.currency, readonly: shareTransaction.readonly, className: "transaction-currency", onChange: currency => shareStore.edit(id, { Currency: currency }) }),
31
+ !!(shareTransaction.lines && shareTransaction.lines.length) && (React.createElement(ShareMovementsDataIcon, { lines: shareTransaction.lines }))),
32
+ React.createElement("div", { className: "hover-operate-icon" },
33
+ React.createElement(ToolBar, { id: id, includes: "tags", size: "middle", url: `/shareTransactions/${id}` })))));
34
+ };
35
+ export default ShareTransactionItem;
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/legalEntity/shareTransactionsRegister/ShareTransactionItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAEN,mBAAmB,EACnB,wBAAwB,EACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,eAAe,MAAM,kEAAkE,CAAC;AAC/F,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,OAAO,MAAM,6CAA6C,CAAC;AAClE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,oBAAoB,GAAG,CAAC,KAI7B,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,G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AU,CAAC,IAAI,CAAC,EAAE,EAAE;wBACpB,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC;qBAChB,CAAC;oBACJ,CAAC,CAAC,IAAI,GAEP;YACF,8BAAM,SAAS,EAAC,kBAAkB,IAAE,gBAAgB,CAAC,eAAe,CAAQ;YAC5E,oBAAC,YAAY,IACZ,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,EACnC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,EACnC,SAAS,EAAC,sBAAsB,EAChC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,GAChE;YACD,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,IAAI,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAC/D,oBAAC,sBAAsB,IAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,GAAI,CACzD,CACI;QACN,6BAAK,SAAS,EAAC,oBAAoB;YAClC,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,sBAAsB,EAAE,EAAE,GAAI,CAC7E,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,65 @@
1
+ :global {
2
+ .shareTransaction-item {
3
+ position: relative;
4
+ flex: 1;
5
+ padding: 0 20px 10px 20px;
6
+ line-height: 28px;
7
+ &.shareTransaction-item-first {
8
+ padding-top: 10px;
9
+ }
10
+ .task-move,
11
+ .clock {
12
+ display: inline-block;
13
+ margin-right: 5px;
14
+ width: 14px;
15
+ }
16
+ .task-move {
17
+ cursor: move;
18
+ color: #000;
19
+ }
20
+ .shareTransaction-item-info {
21
+ .morpho-inline-edit {
22
+ display: inline-block;
23
+ min-width: 110px;
24
+ // margin-right: 30px;
25
+ }
26
+ .clock {
27
+ margin-right: 5px;
28
+ }
29
+ .transaction-date {
30
+ cursor: pointer;
31
+ }
32
+ .transaction-type {
33
+ display: inline-block;
34
+ width: 100px;
35
+ }
36
+ .transaction-currency {
37
+ display: inline-block;
38
+ width: 90px;
39
+ cursor: pointer;
40
+ .ant-select {
41
+ width: 100px !important;
42
+ }
43
+ }
44
+ }
45
+
46
+ .hover-operate-icon {
47
+ position: absolute;
48
+ display: none;
49
+ top: 50%;
50
+ right: 20px;
51
+ margin-top: -16px;
52
+ }
53
+ &.hover {
54
+ .file-name,
55
+ .transaction-currency,
56
+ .share-movements-data-icon,
57
+ .transaction-date {
58
+ opacity: 0.5;
59
+ }
60
+ .hover-operate-icon {
61
+ display: block;
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ export declare class TableDataContextState {
3
+ props: any;
4
+ /** Array of new lines to be added. */
5
+ InvoiceLine: {
6
+ shareholder: string;
7
+ consideration: number;
8
+ currency: string;
9
+ shares: number;
10
+ };
11
+ /** Id of Delete of line */
12
+ hoverKey: number;
13
+ /** lines of invoice */
14
+ invoiceLines: any[];
15
+ /** loading of saving */
16
+ loading: boolean;
17
+ /** Total of shares of line */
18
+ get sharesTotal(): any;
19
+ /** Total of shares of line */
20
+ get considerationTotal(): any;
21
+ /** readonly */
22
+ get readonly(): boolean;
23
+ /** Is Adding */
24
+ get isAdding(): boolean;
25
+ }
26
+ /** React context for TableDataContextState. */
27
+ export declare const TableDataContext: import("react").Context<any>;
28
+ /** React hook to retrieve the nearest TableDataContext. */
29
+ export declare const useTableDataContext: () => any;
@@ -0,0 +1,64 @@
1
+ import { __decorate } from "tslib";
2
+ import { computed, observable } from "mobx";
3
+ import { createContext, useContext } from "react";
4
+ let TableDataContextState = /** @class */ (() => {
5
+ class TableDataContextState {
6
+ constructor() {
7
+ /** Array of new lines to be added. */
8
+ this.InvoiceLine = {
9
+ shareholder: "",
10
+ consideration: 0,
11
+ currency: "",
12
+ shares: 0
13
+ };
14
+ /** lines of invoice */
15
+ this.invoiceLines = [];
16
+ /** loading of saving */
17
+ this.loading = false;
18
+ }
19
+ /** Total of shares of line */
20
+ get sharesTotal() {
21
+ return this.invoiceLines.reduce((total, line) => Number.parseFloat((total + line.shares).toFixed(2)), 0);
22
+ }
23
+ /** Total of shares of line */
24
+ get considerationTotal() {
25
+ return this.invoiceLines.reduce((total, line) => Number.parseFloat((total + line.consideration).toFixed(2)), 0);
26
+ }
27
+ /** readonly */
28
+ get readonly() {
29
+ return this.props && this.props.data && !!this.props.data.readonly;
30
+ }
31
+ /** Is Adding */
32
+ get isAdding() {
33
+ return this.invoiceLines.some(({ added }) => !!added);
34
+ }
35
+ }
36
+ __decorate([
37
+ observable
38
+ ], TableDataContextState.prototype, "hoverKey", void 0);
39
+ __decorate([
40
+ observable
41
+ ], TableDataContextState.prototype, "invoiceLines", void 0);
42
+ __decorate([
43
+ observable
44
+ ], TableDataContextState.prototype, "loading", void 0);
45
+ __decorate([
46
+ computed
47
+ ], TableDataContextState.prototype, "sharesTotal", null);
48
+ __decorate([
49
+ computed
50
+ ], TableDataContextState.prototype, "considerationTotal", null);
51
+ __decorate([
52
+ computed
53
+ ], TableDataContextState.prototype, "readonly", null);
54
+ __decorate([
55
+ computed
56
+ ], TableDataContextState.prototype, "isAdding", null);
57
+ return TableDataContextState;
58
+ })();
59
+ export { TableDataContextState };
60
+ /** React context for TableDataContextState. */
61
+ export const TableDataContext = createContext(null);
62
+ /** React hook to retrieve the nearest TableDataContext. */
63
+ export const useTableDataContext = () => useContext(TableDataContext);
64
+ //# sourceMappingURL=TableDataContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableDataContext.js","sourceRoot":"","sources":["../../../../../src/modules/legalEntity/shareTransactionsRegister/ShareTransactionItems/TableDataContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AAClD,OAAO,EA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