@powerhousedao/design-system 6.0.0-dev.235 → 6.0.0-dev.236

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 (151) hide show
  1. package/dist/{button-C8doazjv.d.ts → button-DIE3LLBZ.d.ts} +1 -1
  2. package/dist/{button-C8doazjv.d.ts.map → button-DIE3LLBZ.d.ts.map} +1 -1
  3. package/dist/{character-counter-BWoglM2P.d.ts → character-counter-BZ-4xC7Q.d.ts} +1 -1
  4. package/dist/{character-counter-BWoglM2P.d.ts.map → character-counter-BZ-4xC7Q.d.ts.map} +1 -1
  5. package/dist/{checkbox-D9rmZ1dJ.d.ts → checkbox-BgS8z46p.d.ts} +3 -3
  6. package/dist/{checkbox-D9rmZ1dJ.d.ts.map → checkbox-BgS8z46p.d.ts.map} +1 -1
  7. package/dist/{checkbox-base-CZo-4eL0.d.ts → checkbox-base-Bh08IVG2.d.ts} +1 -1
  8. package/dist/{checkbox-base-CZo-4eL0.d.ts.map → checkbox-base-Bh08IVG2.d.ts.map} +1 -1
  9. package/dist/{command-DrrnJuvu.d.ts → command-EVLVv94t.d.ts} +8 -8
  10. package/dist/{command-DrrnJuvu.d.ts.map → command-EVLVv94t.d.ts.map} +1 -1
  11. package/dist/connect/index.d.ts +1266 -3
  12. package/dist/connect/index.d.ts.map +1 -0
  13. package/dist/connect/index.js +8193 -2
  14. package/dist/connect/index.js.map +1 -0
  15. package/dist/{content-DJVuhrPq.d.ts → content-ZWaCzypo.d.ts} +2 -2
  16. package/dist/{content-DJVuhrPq.d.ts.map → content-ZWaCzypo.d.ts.map} +1 -1
  17. package/dist/{enum-field-C-HqOUUb.d.ts → enum-field-CU6jo1T9.d.ts} +4 -4
  18. package/dist/{enum-field-C-HqOUUb.d.ts.map → enum-field-CU6jo1T9.d.ts.map} +1 -1
  19. package/dist/{form-CKRKn0TQ.d.ts → form-6Lmx7pU_.d.ts} +1 -1
  20. package/dist/{form-CKRKn0TQ.d.ts.map → form-6Lmx7pU_.d.ts.map} +1 -1
  21. package/dist/{form-description-CYkcMEzm.d.ts → form-description-Bsurk7mm.d.ts} +1 -1
  22. package/dist/{form-description-CYkcMEzm.d.ts.map → form-description-Bsurk7mm.d.ts.map} +1 -1
  23. package/dist/{form-group-C8kL6pdZ.d.ts → form-group-B092xF-f.d.ts} +1 -1
  24. package/dist/form-group-B092xF-f.d.ts.map +1 -0
  25. package/dist/{form-label-b6nQi0XO.d.ts → form-label-CURXUfpb.d.ts} +1 -1
  26. package/dist/{form-label-b6nQi0XO.d.ts.map → form-label-CURXUfpb.d.ts.map} +1 -1
  27. package/dist/{form-message-Dq72nBXz.d.ts → form-message-BeAVBzjc.d.ts} +1 -1
  28. package/dist/{form-message-Dq72nBXz.d.ts.map → form-message-BeAVBzjc.d.ts.map} +1 -1
  29. package/dist/{form-server-error-message-DXbaiTfF.d.ts → form-server-error-message-CbKMtocn.d.ts} +1 -1
  30. package/dist/{form-server-error-message-DXbaiTfF.d.ts.map → form-server-error-message-CbKMtocn.d.ts.map} +1 -1
  31. package/dist/{id-autocomplete-D_0Y3vO6.d.ts → id-autocomplete-DGTfhFRw.d.ts} +2 -2
  32. package/dist/{id-autocomplete-D_0Y3vO6.d.ts.map → id-autocomplete-DGTfhFRw.d.ts.map} +1 -1
  33. package/dist/{id-autocomplete-input-container-BBPnEQKE.d.ts → id-autocomplete-input-container-DefHskQg.d.ts} +2 -2
  34. package/dist/{id-autocomplete-input-container-BBPnEQKE.d.ts.map → id-autocomplete-input-container-DefHskQg.d.ts.map} +1 -1
  35. package/dist/{id-autocomplete-list-yagWAecF.d.ts → id-autocomplete-list-C5uiH5nJ.d.ts} +2 -2
  36. package/dist/{id-autocomplete-list-yagWAecF.d.ts.map → id-autocomplete-list-C5uiH5nJ.d.ts.map} +1 -1
  37. package/dist/{id-autocomplete-list-option-BtGmT-PL.d.ts → id-autocomplete-list-option-CyF3v8IB.d.ts} +2 -2
  38. package/dist/{id-autocomplete-list-option-BtGmT-PL.d.ts.map → id-autocomplete-list-option-CyF3v8IB.d.ts.map} +1 -1
  39. package/dist/{index-C8XGTcEE.d.ts → index-DoFR9kRM.d.ts} +4 -67
  40. package/dist/index-DoFR9kRM.d.ts.map +1 -0
  41. package/dist/index.d.ts +3 -3
  42. package/dist/{input-BpEQjaWV.d.ts → input-BMf1G8BP.d.ts} +1 -1
  43. package/dist/{input-BpEQjaWV.d.ts.map → input-BMf1G8BP.d.ts.map} +1 -1
  44. package/dist/{json-viewer-DaTgmzkS.d.ts → json-viewer-DD7b-PP2.d.ts} +1 -1
  45. package/dist/{json-viewer-DaTgmzkS.d.ts.map → json-viewer-DD7b-PP2.d.ts.map} +1 -1
  46. package/dist/{message-list-C4mPpBBa.d.ts → message-list-DDi6OrSM.d.ts} +2 -2
  47. package/dist/{message-list-C4mPpBBa.d.ts.map → message-list-DDi6OrSM.d.ts.map} +1 -1
  48. package/dist/{popover-XSBOuSih.d.ts → popover-BXlVJZZW.d.ts} +1 -1
  49. package/dist/{popover-XSBOuSih.d.ts.map → popover-BXlVJZZW.d.ts.map} +1 -1
  50. package/dist/{radio-eL0Oy86J.d.ts → radio-YzIhzpRk.d.ts} +1 -1
  51. package/dist/{radio-eL0Oy86J.d.ts.map → radio-YzIhzpRk.d.ts.map} +1 -1
  52. package/dist/{radio-group-Bkli6nUz.d.ts → radio-group-D2NSfihe.d.ts} +1 -1
  53. package/dist/{radio-group-Bkli6nUz.d.ts.map → radio-group-D2NSfihe.d.ts.map} +1 -1
  54. package/dist/{radio-group-field-CvEiKxgz.d.ts → radio-group-field-maxYxQ6A.d.ts} +2 -2
  55. package/dist/{radio-group-field-CvEiKxgz.d.ts.map → radio-group-field-maxYxQ6A.d.ts.map} +1 -1
  56. package/dist/{search-autocomplete-BJJkrZ1i.d.ts → search-autocomplete-CfSjqceY.d.ts} +2 -2
  57. package/dist/{search-autocomplete-BJJkrZ1i.d.ts.map → search-autocomplete-CfSjqceY.d.ts.map} +1 -1
  58. package/dist/{select-field-DTnErvyf.d.ts → select-field-U8KSDxbg.d.ts} +2 -2
  59. package/dist/{select-field-DTnErvyf.d.ts.map → select-field-U8KSDxbg.d.ts.map} +1 -1
  60. package/dist/{selected-content-BFFMrHZW.d.ts → selected-content-iwV6vmSI.d.ts} +2 -2
  61. package/dist/{selected-content-BFFMrHZW.d.ts.map → selected-content-iwV6vmSI.d.ts.map} +1 -1
  62. package/dist/{splitted-input-diff-BuvB5vhe.d.ts → splitted-input-diff-DSME-KaQ.d.ts} +2 -2
  63. package/dist/{splitted-input-diff-BuvB5vhe.d.ts.map → splitted-input-diff-DSME-KaQ.d.ts.map} +1 -1
  64. package/dist/style.css +3 -133
  65. package/dist/{text-field-DQ89eiZL.d.ts → text-field-Cxpz1D2u.d.ts} +3 -3
  66. package/dist/{text-field-DQ89eiZL.d.ts.map → text-field-Cxpz1D2u.d.ts.map} +1 -1
  67. package/dist/{text-input-diff-K3kzOkxj.d.ts → text-input-diff-bO84di00.d.ts} +2 -2
  68. package/dist/{text-input-diff-K3kzOkxj.d.ts.map → text-input-diff-bO84di00.d.ts.map} +1 -1
  69. package/dist/{text-input-C_Dl2L8-.d.ts → text-input-t0uGOMAO.d.ts} +3 -3
  70. package/dist/{text-input-C_Dl2L8-.d.ts.map → text-input-t0uGOMAO.d.ts.map} +1 -1
  71. package/dist/{tooltip-CsucyiCV.d.ts → tooltip-Db1dLIxg.d.ts} +1 -1
  72. package/dist/{tooltip-CsucyiCV.d.ts.map → tooltip-Db1dLIxg.d.ts.map} +1 -1
  73. package/dist/{types-C04Q_Fan.d.ts → types-BDeBOEOj.d.ts} +1 -1
  74. package/dist/{types-C04Q_Fan.d.ts.map → types-BDeBOEOj.d.ts.map} +1 -1
  75. package/dist/{types-BTq-St7H.d.ts → types-BLss8ZBX.d.ts} +1 -1
  76. package/dist/{types-BTq-St7H.d.ts.map → types-BLss8ZBX.d.ts.map} +1 -1
  77. package/dist/{types-Bsn62tJB.d.ts → types-BzoMu6VB.d.ts} +1 -1
  78. package/dist/{types-Bsn62tJB.d.ts.map → types-BzoMu6VB.d.ts.map} +1 -1
  79. package/dist/ui/components/button/button.d.ts +1 -1
  80. package/dist/ui/components/character-counter/character-counter.d.ts +1 -1
  81. package/dist/ui/components/checkbox/checkbox-base.d.ts +1 -1
  82. package/dist/ui/components/checkbox/checkbox.d.ts +1 -1
  83. package/dist/ui/components/command/command.d.ts +1 -1
  84. package/dist/ui/components/enum-field/enum-field.d.ts +1 -1
  85. package/dist/ui/components/enum-field/types.d.ts +1 -1
  86. package/dist/ui/components/form/form.d.ts +1 -1
  87. package/dist/ui/components/form-description/form-description.d.ts +1 -1
  88. package/dist/ui/components/form-group/form-group.d.ts +1 -1
  89. package/dist/ui/components/form-label/form-label.d.ts +1 -1
  90. package/dist/ui/components/form-message/form-message.d.ts +1 -1
  91. package/dist/ui/components/form-message/form-server-error-message.d.ts +1 -1
  92. package/dist/ui/components/form-message/message-list.d.ts +1 -1
  93. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.d.ts +1 -1
  94. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.d.ts +1 -1
  95. package/dist/ui/components/id-autocomplete/id-autocomplete-list.d.ts +1 -1
  96. package/dist/ui/components/id-autocomplete/id-autocomplete.d.ts +1 -1
  97. package/dist/ui/components/id-autocomplete/types.d.ts +1 -1
  98. package/dist/ui/components/id-autocomplete/use-id-autocomplete.d.ts +1 -1
  99. package/dist/ui/components/index.d.ts +36 -36
  100. package/dist/ui/components/input/input.d.ts +1 -1
  101. package/dist/ui/components/input/splitted-input-diff.d.ts +1 -1
  102. package/dist/ui/components/input/subcomponent/text-diff.d.ts +1 -1
  103. package/dist/ui/components/json-viewer/json-viewer.d.ts +1 -1
  104. package/dist/ui/components/popover/popover.d.ts +1 -1
  105. package/dist/ui/components/radio-group-field/radio-group-field.d.ts +1 -1
  106. package/dist/ui/components/radio-group-field/radio-group.d.ts +1 -1
  107. package/dist/ui/components/radio-group-field/radio.d.ts +1 -1
  108. package/dist/ui/components/search-autocomplete/index.d.ts +3 -3
  109. package/dist/ui/components/search-autocomplete/search-autocomplete.d.ts +1 -1
  110. package/dist/ui/components/search-autocomplete/types.d.ts +1 -1
  111. package/dist/ui/components/search-autocomplete/use-search-autocomplete.d.ts +1 -1
  112. package/dist/ui/components/select-field/content.d.ts +1 -1
  113. package/dist/ui/components/select-field/select-field.d.ts +1 -1
  114. package/dist/ui/components/select-field/selected-content.d.ts +1 -1
  115. package/dist/ui/components/select-field/subcomponents/CommandItemList.d.ts +1 -1
  116. package/dist/ui/components/select-field/use-select-field.d.ts +1 -1
  117. package/dist/ui/components/text-field/text-field.d.ts +1 -1
  118. package/dist/ui/components/text-input/text-input-diff.d.ts +1 -1
  119. package/dist/ui/components/text-input/text-input.d.ts +1 -1
  120. package/dist/ui/components/text-input/types.d.ts +1 -1
  121. package/dist/ui/components/tooltip/tooltip.d.ts +1 -1
  122. package/dist/ui/components/types.d.ts +1 -1
  123. package/dist/ui/components/value-transformer/value-transformer.d.ts +1 -1
  124. package/dist/ui/components/with-field-validation/with-field-validation.d.ts +1 -1
  125. package/dist/ui/index.d.ts +38 -38
  126. package/dist/ui/lib/date-picker.d.ts +1 -1
  127. package/dist/ui/lib/shared-value-transformers.d.ts +1 -1
  128. package/dist/ui/lib/types.d.ts +1 -1
  129. package/dist/ui/types.d.ts +2 -2
  130. package/dist/{use-id-autocomplete-DrTVtqMy.d.ts → use-id-autocomplete-BRzpIF4U.d.ts} +2 -2
  131. package/dist/{use-id-autocomplete-DrTVtqMy.d.ts.map → use-id-autocomplete-BRzpIF4U.d.ts.map} +1 -1
  132. package/dist/{use-search-autocomplete-IfcQ_gKh.d.ts → use-search-autocomplete-ZLxfAC6X.d.ts} +2 -2
  133. package/dist/{use-search-autocomplete-IfcQ_gKh.d.ts.map → use-search-autocomplete-ZLxfAC6X.d.ts.map} +1 -1
  134. package/dist/{value-transformer-2yvrA5Rp.d.ts → value-transformer-MGhQTCdM.d.ts} +2 -2
  135. package/dist/{value-transformer-2yvrA5Rp.d.ts.map → value-transformer-MGhQTCdM.d.ts.map} +1 -1
  136. package/dist/{with-field-validation-Bd0Nq4k-.d.ts → with-field-validation-DWMigXJz.d.ts} +2 -2
  137. package/dist/{with-field-validation-Bd0Nq4k-.d.ts.map → with-field-validation-DWMigXJz.d.ts.map} +1 -1
  138. package/package.json +4 -13
  139. package/dist/connect-BSkeWkEI.js +0 -8340
  140. package/dist/connect-BSkeWkEI.js.map +0 -1
  141. package/dist/form-group-C8kL6pdZ.d.ts.map +0 -1
  142. package/dist/index-C8XGTcEE.d.ts.map +0 -1
  143. package/dist/index-VqN1Wx2S.d.ts +0 -1201
  144. package/dist/index-VqN1Wx2S.d.ts.map +0 -1
  145. package/dist/rwa/index.d.ts +0 -791
  146. package/dist/rwa/index.d.ts.map +0 -1
  147. package/dist/rwa/index.js +0 -2686
  148. package/dist/rwa/index.js.map +0 -1
  149. /package/dist/{index--okzibnx.d.ts → index-BN8Gwmlj.d.ts} +0 -0
  150. /package/dist/{index-E7Wvm5uX.d.ts → index-Dw5cCt-A.d.ts} +0 -0
  151. /package/dist/{index-J3R2mDFQ.d.ts → index-qM4PwHTs.d.ts} +0 -0
@@ -1,791 +0,0 @@
1
- import { $n as Combobox } from "../index-VqN1Wx2S.js";
2
- import { T as DivProps, Z as Modal, lt as PowerhouseButtonProps } from "../index-C8XGTcEE.js";
3
- import * as react from "react";
4
- import React$1, { ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, JSX, ReactElement, ReactNode, RefObject } from "react";
5
- import * as react_jsx_runtime0 from "react/jsx-runtime";
6
- import * as react_hook_form0 from "react-hook-form";
7
- import { Control, ControllerProps, FieldErrors, FieldValues, FormState, Path, UseFormRegister, UseFormWatch } from "react-hook-form";
8
- import { InputMaybe, Maybe, Scalars } from "@powerhousedao/shared/document-model";
9
- import { NumericFormat } from "react-number-format";
10
- import * as mathjs from "mathjs";
11
- import * as natural_orderby0 from "natural-orderby";
12
- import { Identifier, Order } from "natural-orderby";
13
-
14
- //#region src/rwa/components/accounts-table.d.ts
15
- declare function AccountsTable(): react_jsx_runtime0.JSX.Element;
16
- //#endregion
17
- //#region src/rwa/components/assets-table.d.ts
18
- declare function AssetsTable(): react_jsx_runtime0.JSX.Element;
19
- //#endregion
20
- //#region src/rwa/components/button.d.ts
21
- declare const RWAButton: React.FC<PowerhouseButtonProps>;
22
- //#endregion
23
- //#region src/rwa/components/create-item-modal.d.ts
24
- type RWACreateItemModalProps = ComponentPropsWithoutRef<typeof Modal> & {
25
- readonly open: boolean;
26
- readonly tableName: TableName;
27
- readonly onOpenChange: (open: boolean) => void;
28
- };
29
- declare const RWACreateItemModal: react.NamedExoticComponent<RWACreateItemModalProps>;
30
- //#endregion
31
- //#region src/rwa/constants/dependent-items.d.ts
32
- type DependentItemProps = {
33
- dependentTableName: TableName;
34
- dependentItems: {
35
- id: string;
36
- label: string;
37
- }[];
38
- }[];
39
- declare function useDependentItemProps(tableName: TableName, itemId: string | null | undefined): DependentItemProps;
40
- declare function makeDependentServiceProviderFeeTypesList(itemId: string, serviceProviderFeeTypes: ServiceProviderFeeType[]): {
41
- id: string;
42
- label: string;
43
- }[];
44
- declare function makeDependentAssetsList(tableName: "FIXED_INCOME_TYPE" | "SPV", itemId: string, assets: FixedIncome[]): {
45
- id: string;
46
- label: string;
47
- }[];
48
- declare function makeDependentTransactionsList(tableName: "ASSET" | "ACCOUNT" | "SERVICE_PROVIDER_FEE_TYPE", itemId: string, transactions: GroupTransaction[]): {
49
- id: string;
50
- label: string;
51
- }[];
52
- //#endregion
53
- //#region src/rwa/components/delete-item-modal.d.ts
54
- type RWADeleteItemModalProps = ComponentPropsWithoutRef<typeof Modal> & {
55
- readonly tableName: TableName;
56
- readonly dependentItemProps: DependentItemProps;
57
- };
58
- declare const RWADeleteItemModal: react.NamedExoticComponent<RWADeleteItemModalProps>;
59
- //#endregion
60
- //#region src/rwa/components/modal-components.d.ts
61
- declare const modals: {
62
- createItem: react.NamedExoticComponent<RWACreateItemModalProps>;
63
- deleteItem: react.NamedExoticComponent<RWADeleteItemModalProps>;
64
- };
65
- //#endregion
66
- //#region src/rwa/components/types.d.ts
67
- type Modals = typeof modals;
68
- type ModalType = keyof Modals;
69
- type ModalPropsMapping = { [K in ModalType]: React.ComponentProps<Modals[K]> };
70
- type MapModalProps<T> = { [K in keyof T]: Omit<T[K], "open" | "onOpenChange"> };
71
- type ModalProps = MapModalProps<ModalPropsMapping>;
72
- type ModalContextValue = {
73
- showModal: <T extends ModalType>(modalType: T, props?: ModalProps[T]) => void;
74
- closeModal: () => void;
75
- };
76
- //#endregion
77
- //#region src/rwa/constants/transactions.d.ts
78
- declare const ASSET_PURCHASE = "AssetPurchase";
79
- declare const ASSET_SALE = "AssetSale";
80
- declare const PRINCIPAL_DRAW = "PrincipalDraw";
81
- declare const PRINCIPAL_RETURN = "PrincipalReturn";
82
- declare const INTEREST_INCOME = "InterestIncome";
83
- declare const INTEREST_PAYMENT = "InterestPayment";
84
- declare const FEES_INCOME = "FeesIncome";
85
- declare const FEES_PAYMENT = "FeesPayment";
86
- declare const principalGroupTransactions: readonly ["PrincipalDraw", "PrincipalReturn"];
87
- declare const assetGroupTransactions: readonly ["AssetPurchase", "AssetSale"];
88
- declare const feesTransactions: readonly ["FeesIncome", "FeesPayment"];
89
- declare const interestTransactions: readonly ["InterestIncome", "InterestPayment"];
90
- declare const allGroupTransactionTypes: readonly ["PrincipalDraw", "PrincipalReturn", "AssetPurchase", "AssetSale", "FeesIncome", "FeesPayment", "InterestIncome", "InterestPayment"];
91
- declare const groupTransactionTypeLabels: {
92
- readonly AssetPurchase: "Asset purchase";
93
- readonly AssetSale: "Asset sale";
94
- readonly PrincipalDraw: "Principal draw";
95
- readonly PrincipalReturn: "Principal return";
96
- readonly InterestIncome: "Interest income";
97
- readonly InterestPayment: "Interest payment";
98
- readonly FeesIncome: "Fees income";
99
- readonly FeesPayment: "Fees payment";
100
- };
101
- //#endregion
102
- //#region src/rwa/types/state.d.ts
103
- type RealWorldAssetsState = {
104
- accounts: Account[];
105
- fixedIncomeTypes: FixedIncomeType[];
106
- portfolio: Asset[];
107
- principalLenderAccountId: string;
108
- serviceProviderFeeTypes: ServiceProviderFeeType[];
109
- spvs: SPV[];
110
- transactions: GroupTransaction[];
111
- };
112
- type AssetType = "Cash" | "FixedIncome";
113
- type FixedIncome = {
114
- CUSIP: Maybe<Scalars["String"]["output"]>;
115
- ISIN: Maybe<Scalars["String"]["output"]>;
116
- assetProceeds: Scalars["Float"]["output"];
117
- coupon: Maybe<Scalars["Float"]["output"]>;
118
- fixedIncomeTypeId: Scalars["ID"]["output"];
119
- id: Scalars["ID"]["output"];
120
- maturity: Maybe<Scalars["DateTime"]["output"]>;
121
- name: Scalars["String"]["output"];
122
- notional: Scalars["Float"]["output"];
123
- purchaseDate: Scalars["DateTime"]["output"];
124
- purchasePrice: Scalars["Float"]["output"];
125
- purchaseProceeds: Scalars["Float"]["output"];
126
- realizedSurplus: Scalars["Float"]["output"];
127
- salesProceeds: Scalars["Float"]["output"];
128
- spvId: Scalars["ID"]["output"];
129
- totalDiscount: Scalars["Float"]["output"];
130
- type: AssetType;
131
- };
132
- type CashAsset = {
133
- id: string;
134
- type: AssetType;
135
- spvId: string;
136
- currency: string;
137
- balance: number;
138
- };
139
- type Asset = CashAsset | FixedIncome;
140
- type FixedIncomeType = {
141
- id: string;
142
- name: string;
143
- };
144
- type SPV = {
145
- id: string;
146
- name: string;
147
- };
148
- type AssetGroupTransactionType = (typeof assetGroupTransactions)[number];
149
- type GroupTransactionType = (typeof allGroupTransactionTypes)[number];
150
- type GroupTransaction = {
151
- cashBalanceChange: Scalars["Float"]["output"];
152
- cashTransaction: BaseTransaction;
153
- entryTime: Scalars["DateTime"]["output"];
154
- fees: Maybe<Array<TransactionFee>>;
155
- fixedIncomeTransaction: Maybe<BaseTransaction>;
156
- id: Scalars["ID"]["output"];
157
- serviceProviderFeeTypeId: Maybe<Scalars["ID"]["output"]>;
158
- txRef: Maybe<Scalars["String"]["output"]>;
159
- type: GroupTransactionType;
160
- unitPrice: Maybe<Scalars["Float"]["output"]>;
161
- };
162
- type TransactionFee = {
163
- id: string;
164
- amount: number;
165
- serviceProviderFeeTypeId: string;
166
- };
167
- type BaseTransaction = {
168
- accountId: Maybe<Scalars["ID"]["output"]>;
169
- amount: Scalars["Float"]["output"];
170
- assetId: Scalars["ID"]["output"];
171
- assetType: AssetType;
172
- counterPartyAccountId: Maybe<Scalars["ID"]["output"]>;
173
- entryTime: Scalars["DateTime"]["output"];
174
- id: Scalars["ID"]["output"];
175
- settlementTime: Maybe<Scalars["DateTime"]["output"]>;
176
- tradeTime: Maybe<Scalars["DateTime"]["output"]>;
177
- };
178
- type ServiceProviderFeeType = {
179
- accountId: string;
180
- feeType: string;
181
- id: string;
182
- name: string;
183
- };
184
- type Account = {
185
- id: string;
186
- label?: string | null;
187
- reference: string;
188
- };
189
- //#endregion
190
- //#region src/rwa/constants/names.d.ts
191
- declare const tableNames: {
192
- readonly SERVICE_PROVIDER_FEE_TYPE: "SERVICE_PROVIDER_FEE_TYPE";
193
- readonly FIXED_INCOME_TYPE: "FIXED_INCOME_TYPE";
194
- readonly ACCOUNT: "ACCOUNT";
195
- readonly TRANSACTION: "TRANSACTION";
196
- readonly ASSET: "ASSET";
197
- readonly SPV: "SPV";
198
- };
199
- declare const tableLabels: Record<TableName, string>;
200
- declare const editorStateKeysByTableName: {
201
- readonly SERVICE_PROVIDER_FEE_TYPE: "serviceProviderFeeTypes";
202
- readonly FIXED_INCOME_TYPE: "fixedIncomeTypes";
203
- readonly ACCOUNT: "accounts";
204
- readonly TRANSACTION: "transactions";
205
- readonly ASSET: "portfolio";
206
- readonly SPV: "spvs";
207
- };
208
- declare const deleteEditorActionInputsByTableName: {
209
- readonly SERVICE_PROVIDER_FEE_TYPE: "DELETE_SERVICE_PROVIDER_FEE_TYPE";
210
- readonly FIXED_INCOME_TYPE: "DELETE_FIXED_INCOME_TYPE";
211
- readonly ACCOUNT: "DELETE_ACCOUNT";
212
- readonly TRANSACTION: "DELETE_TRANSACTION";
213
- readonly ASSET: "DELETE_ASSET";
214
- readonly SPV: "DELETE_SPV";
215
- };
216
- //#endregion
217
- //#region src/rwa/types/table.d.ts
218
- type ColumnCountByTableWidth = Record<number, number>;
219
- type SortDirection = "asc" | "desc";
220
- type ItemData = string | number | Date | null | undefined;
221
- type Item = Record<string, any>;
222
- type TableItem<TItem extends Item> = TItem & {
223
- id: string;
224
- itemNumber: number;
225
- moreDetails?: null;
226
- };
227
- type TableColumn = {
228
- key: string;
229
- label: ReactNode | null;
230
- allowSorting?: boolean;
231
- isSpecialColumn?: boolean;
232
- isNumberColumn?: boolean;
233
- decimalScale?: number;
234
- displayTime?: boolean;
235
- };
236
- type TableBaseProps = {
237
- columns: TableColumn[];
238
- ref: RefObject<HTMLDivElement | null>;
239
- tableData: TableItemType<TableName>[] | undefined;
240
- renderRow: (item: TableItemType<TableName>, columns: TableColumn[], index: number) => JSX.Element;
241
- onClickSort: (key: string, direction: SortDirection) => void;
242
- children?: ReactNode;
243
- footer?: ReactNode;
244
- headerRef: RefObject<HTMLTableSectionElement | null>;
245
- maxHeight?: string;
246
- hasSelectedItem?: boolean;
247
- specialFirstRow?: (columns: TableColumn[]) => JSX.Element;
248
- specialLastRow?: (columns: TableColumn[]) => JSX.Element;
249
- };
250
- type TableProps = {
251
- tableName: TableName;
252
- tableData: TableItemType<TableName>[] | undefined;
253
- columnCountByTableWidth?: ColumnCountByTableWidth;
254
- sortHandler: (column: Identifier<TableItemType<TableName>>, direction: Order) => void;
255
- specialFirstRow?: (columns: TableColumn[]) => JSX.Element;
256
- specialLastRow?: (columns: TableColumn[]) => JSX.Element;
257
- };
258
- type Operation = "view" | "create" | "edit" | null;
259
- type GroupTransactionsTableData = GroupTransaction & {
260
- typeLabel: string;
261
- asset: string | null | undefined;
262
- quantity: number | null | undefined;
263
- cashAmount: number | null | undefined;
264
- totalFees: number;
265
- cashBalanceChange: number;
266
- };
267
- type ServiceProviderFeeTypeTableData = ServiceProviderFeeType & {
268
- accountName: string | null | undefined;
269
- accountReference: string | null | undefined;
270
- };
271
- type AssetsTableData = FixedIncome & {
272
- currentValue: number | null | undefined;
273
- };
274
- type TableDataByTableName = {
275
- SERVICE_PROVIDER_FEE_TYPE: ServiceProviderFeeTypeTableData;
276
- FIXED_INCOME_TYPE: FixedIncomeType;
277
- ACCOUNT: Account;
278
- TRANSACTION: GroupTransactionsTableData;
279
- ASSET: AssetsTableData;
280
- SPV: SPV;
281
- };
282
- type TableName = keyof typeof tableNames;
283
- type TableItemType<TTableName extends TableName> = TableItem<TableDataByTableName[TTableName]>;
284
- //#endregion
285
- //#region src/rwa/types/form.d.ts
286
- type AssetFormInputs = {
287
- id?: string;
288
- fixedIncomeTypeId?: string | null;
289
- spvId?: string | null;
290
- maturity?: string | null;
291
- name?: string | null;
292
- ISIN?: string | null;
293
- CUSIP?: string | null;
294
- coupon?: number | null;
295
- };
296
- type ServiceProviderFeeTypeFormInputs = {
297
- id?: string;
298
- name?: string | null;
299
- feeType?: string | null;
300
- accountId?: string | null;
301
- };
302
- type TransactionFeeInput = {
303
- id?: string;
304
- amount?: number | null;
305
- serviceProviderFeeTypeId?: string | null;
306
- };
307
- type GroupTransactionFormInputs = {
308
- id?: string;
309
- type?: GroupTransactionType | null;
310
- entryTime?: string | null;
311
- fixedIncomeId?: string | null;
312
- fees?: TransactionFeeInput[] | null;
313
- cashAmount?: number | null;
314
- fixedIncomeAmount?: number | null;
315
- serviceProviderFeeTypeId?: string | null;
316
- txRef?: string | null;
317
- };
318
- type AccountFormInputs = {
319
- id?: string;
320
- label?: string | null;
321
- reference?: string | null;
322
- };
323
- type SPVFormInputs = {
324
- id?: string;
325
- name?: string | null;
326
- };
327
- type FixedIncomeTypeFormInputs = {
328
- id?: string;
329
- name?: string | null;
330
- };
331
- type FormHookProps = {
332
- tableName: TableName;
333
- tableItem?: TableItemType<TableName> | null;
334
- operation: Operation;
335
- };
336
- //#endregion
337
- //#region src/rwa/types/actions.d.ts
338
- type FormInputsByTableName = {
339
- ASSET: AssetFormInputs;
340
- TRANSACTION: GroupTransactionFormInputs;
341
- ACCOUNT: AccountFormInputs;
342
- FIXED_INCOME_TYPE: FixedIncomeTypeFormInputs;
343
- SERVICE_PROVIDER_FEE_TYPE: ServiceProviderFeeTypeFormInputs;
344
- SPV: SPVFormInputs;
345
- };
346
- type ActionOutputByTableName = {
347
- ASSET: FixedIncome;
348
- TRANSACTION: GroupTransaction;
349
- ACCOUNT: Account;
350
- FIXED_INCOME_TYPE: FixedIncomeType;
351
- SERVICE_PROVIDER_FEE_TYPE: ServiceProviderFeeType;
352
- SPV: SPV;
353
- };
354
- interface CreateOrEditAction<TOperation extends "CREATE" | "EDIT", TTableName extends TableName> {
355
- type: `${TOperation}_${TTableName}`;
356
- payload: FormInputsByTableName[TTableName];
357
- }
358
- interface DeleteAction<TTableName extends TableName> {
359
- type: `DELETE_${TTableName}`;
360
- payload: {
361
- id: string;
362
- };
363
- }
364
- type EditorAction = CreateOrEditAction<"CREATE", TableName> | CreateOrEditAction<"EDIT", TableName> | DeleteAction<TableName>;
365
- type ActionOutputFor<A extends EditorAction> = A["type"] extends `${infer Action}_${infer Entity}` ? Action extends "DELETE" ? undefined : ActionOutputByTableName[Entity & keyof ActionOutputByTableName] : never;
366
- type TableNameFor<A extends EditorAction> = A["type"] extends `${infer _Action}_${infer Entity}` ? Entity & keyof TableDataByTableName : never;
367
- type EditorDispatcher = <TEditorAction extends EditorAction>(action: TEditorAction) => ActionOutputFor<TEditorAction>;
368
- //#endregion
369
- //#region src/rwa/components/cash-balance-change.d.ts
370
- declare function CashBalanceChange(props: {
371
- readonly control: Control<GroupTransactionFormInputs>;
372
- }): react_jsx_runtime0.JSX.Element;
373
- //#endregion
374
- //#region src/rwa/components/editor.d.ts
375
- declare function RWAEditor(): react_jsx_runtime0.JSX.Element;
376
- //#endregion
377
- //#region src/rwa/components/entry-time-label.d.ts
378
- declare function EntryTimeLabel({
379
- control
380
- }: {
381
- control: Control<GroupTransactionFormInputs>;
382
- }): string | null;
383
- //#endregion
384
- //#region src/rwa/components/fee-transactions-table.d.ts
385
- type Props$12 = {
386
- readonly canHaveTransactionFees: boolean;
387
- readonly serviceProviderFeeTypes: ServiceProviderFeeType[];
388
- readonly serviceProviderFeeTypeOptions: {
389
- label: string;
390
- value: string;
391
- }[];
392
- readonly showCreateServiceProviderFeeTypeModal: () => void;
393
- readonly control: Control<GroupTransactionFormInputs>;
394
- readonly errors: FieldErrors<GroupTransactionFormInputs>;
395
- readonly isViewOnly: boolean;
396
- };
397
- declare function FeeTransactionsTable(props: Props$12): react_jsx_runtime0.JSX.Element | null;
398
- //#endregion
399
- //#region src/rwa/components/form-inputs.d.ts
400
- type Input$2 = {
401
- label: string;
402
- Input: ComponentType;
403
- inputLabel?: ReactNode;
404
- };
405
- type Props$11 = {
406
- readonly inputs: Input$2[];
407
- };
408
- declare function FormInputs(props: Props$11): react_jsx_runtime0.JSX.Element;
409
- //#endregion
410
- //#region src/rwa/components/form-row.d.ts
411
- interface RWAFormRowProps extends DivProps {
412
- readonly label?: React.ReactNode;
413
- readonly value?: React.ReactNode;
414
- }
415
- declare const RWAFormRow: React.FC<RWAFormRowProps>;
416
- //#endregion
417
- //#region src/rwa/components/formatted-number.d.ts
418
- type Props$10 = Omit<ComponentPropsWithoutRef<typeof NumericFormat>, "displayType"> & {
419
- readonly currency?: "USD";
420
- };
421
- declare function FormattedNumber(props: Props$10): react_jsx_runtime0.JSX.Element;
422
- //#endregion
423
- //#region src/rwa/components/group-transactions-table.d.ts
424
- declare function GroupTransactionsTable(): react_jsx_runtime0.JSX.Element;
425
- //#endregion
426
- //#region src/rwa/components/header-label.d.ts
427
- interface RWATableHeaderLabelProps extends DivProps {
428
- readonly label?: React.ReactNode;
429
- }
430
- declare const RWATableHeaderLabel: React.FC<RWATableHeaderLabelProps>;
431
- //#endregion
432
- //#region src/rwa/components/item-details.d.ts
433
- type Props$9 = {
434
- readonly tableName: TableName;
435
- };
436
- declare const ItemDetails: react.NamedExoticComponent<Props$9>;
437
- //#endregion
438
- //#region src/rwa/components/modal-context.d.ts
439
- declare const ModalContext: react.Context<ModalContextValue>;
440
- //#endregion
441
- //#region src/rwa/components/modal-form-inputs.d.ts
442
- type Input$1 = {
443
- label: string;
444
- Input: ComponentType;
445
- };
446
- type Props$8 = {
447
- readonly inputs: Input$1[];
448
- };
449
- declare function ModalFormInputs(props: Props$8): react_jsx_runtime0.JSX.Element;
450
- //#endregion
451
- //#region src/rwa/components/modal-manager.d.ts
452
- declare const ModalManager: React$1.FC<{
453
- readonly children?: React$1.ReactNode;
454
- }>;
455
- //#endregion
456
- //#region src/rwa/components/text-input.d.ts
457
- type Props$7 = Omit<ComponentPropsWithRef<"input">, "type"> & {
458
- readonly defaultValue?: string | number | null | undefined;
459
- readonly errorMessage?: string;
460
- readonly labelClassName?: string;
461
- readonly inputClassName?: string;
462
- readonly errorMessageClassName?: string;
463
- };
464
- declare const RWATableTextInput: react.ForwardRefExoticComponent<Omit<Props$7, "ref"> & react.RefAttributes<HTMLInputElement>>;
465
- //#endregion
466
- //#region src/rwa/components/number-input.d.ts
467
- type Props$6<ControlInputs extends FieldValues> = ComponentPropsWithRef<typeof RWATableTextInput> & {
468
- readonly name: Path<ControlInputs>;
469
- readonly control: Control<ControlInputs>;
470
- readonly disabled?: boolean;
471
- readonly currency?: "USD";
472
- readonly numericFormatProps?: ComponentPropsWithRef<typeof NumericFormat>;
473
- readonly rules?: ControllerProps<ControlInputs>["rules"];
474
- readonly errorMessage?: string;
475
- readonly errorMessageClassName?: string;
476
- };
477
- declare function RWANumberInput<ControlInputs extends FieldValues>(props: Props$6<ControlInputs>): react_jsx_runtime0.JSX.Element;
478
- //#endregion
479
- //#region src/rwa/components/other-tab.d.ts
480
- declare function OtherTab(): react_jsx_runtime0.JSX.Element;
481
- //#endregion
482
- //#region src/rwa/components/portfolio-tab.d.ts
483
- declare function PortfolioTab(): react_jsx_runtime0.JSX.Element;
484
- //#endregion
485
- //#region src/rwa/components/rwa-tab-content.d.ts
486
- type Props$5 = {
487
- readonly label: ReactNode;
488
- readonly description: ReactNode;
489
- readonly children: ReactNode;
490
- };
491
- declare function RwaTabContent(props: Props$5): react_jsx_runtime0.JSX.Element;
492
- //#endregion
493
- //#region src/rwa/components/select.d.ts
494
- type RWATableSelectProps<ControlInputs extends FieldValues> = Omit<ComponentPropsWithoutRef<typeof Combobox>, "options" | "required"> & {
495
- readonly options: {
496
- label: string;
497
- value: string;
498
- }[];
499
- readonly disabled?: boolean;
500
- readonly name: Path<ControlInputs>;
501
- readonly control: Control<ControlInputs>;
502
- readonly rules?: ControllerProps<ControlInputs>["rules"];
503
- readonly errorMessage?: string;
504
- readonly errorMessageClassName?: string;
505
- };
506
- declare function RWATableSelect<ControlInputs extends FieldValues>(props: RWATableSelectProps<ControlInputs>): react_jsx_runtime0.JSX.Element;
507
- //#endregion
508
- //#region src/rwa/components/table-base.d.ts
509
- /**
510
- * Base table component
511
- *
512
- * @type TItem - Table item type, any record with an "id" field and any string keys
513
- * @type TableColumn - Specifies how to render a column. Must have a `key` which is a key of TItem, and a `label` which is the column header
514
- * @param tableData - Array of data to display, data must satisfy TItem
515
- * @param columns - Array of columns to display, column must satisfy TableColumn. The columns will be displayed in the order they are provided. Use the `useColumnPriority` hook to handle dropping columns for smaller screens.
516
- * @param children - Content to render above the table rows
517
- * @param footer - Content to render below the table rows
518
- * @param renderRow - Function to render a row, must return a React element
519
- * @param onClickSort - Function to handle sorting, called with key and direction
520
- * @param hasExpandedRow - Whether the table has an expanded row
521
- * @param specialFirstRow - Function to render a special first row (like the cash asset for instance), must return a React element
522
- */
523
- declare function TableBase(props: TableBaseProps): react_jsx_runtime0.JSX.Element;
524
- //#endregion
525
- //#region src/rwa/components/table-cell.d.ts
526
- declare const RWATableCell: React.FC<ComponentPropsWithoutRef<"td">>;
527
- declare function ItemNumberCell(props: {
528
- readonly itemNumber: number;
529
- }): react_jsx_runtime0.JSX.Element;
530
- declare function MoreDetailsCell(props: {
531
- readonly isSelected: boolean;
532
- readonly tableName: TableName;
533
- readonly tableItem: TableItemType<TableName>;
534
- }): react_jsx_runtime0.JSX.Element;
535
- //#endregion
536
- //#region src/rwa/components/table-row.d.ts
537
- type RWATableRowProps = ComponentPropsWithRef<"tr">;
538
- declare const RWATableRow: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & react.RefAttributes<HTMLTableRowElement>>;
539
- //#endregion
540
- //#region src/rwa/components/table-with-form.d.ts
541
- type Props$4 = {
542
- readonly tableName: TableName;
543
- readonly specialFirstRow?: (columns: TableColumn[]) => React.JSX.Element;
544
- readonly specialLastRow?: (columns: TableColumn[]) => React.JSX.Element;
545
- };
546
- declare function TableWithForm(props: Props$4): react_jsx_runtime0.JSX.Element;
547
- //#endregion
548
- //#region src/rwa/components/table.d.ts
549
- declare function Table(props: TableProps): react_jsx_runtime0.JSX.Element;
550
- //#endregion
551
- //#region src/rwa/components/tabs.d.ts
552
- declare function RWATabs(): react_jsx_runtime0.JSX.Element;
553
- //#endregion
554
- //#region src/rwa/components/transaction-reference.d.ts
555
- declare const TransactionReference: react.ForwardRefExoticComponent<Omit<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type"> & {
556
- readonly defaultValue?: string | number | null | undefined;
557
- readonly errorMessage?: string;
558
- readonly labelClassName?: string;
559
- readonly inputClassName?: string;
560
- readonly errorMessageClassName?: string;
561
- }, "ref"> & react.RefAttributes<HTMLInputElement> & {
562
- readonly control: Control<GroupTransactionFormInputs>;
563
- }, "ref"> & react.RefAttributes<HTMLInputElement>>;
564
- //#endregion
565
- //#region src/rwa/components/transactions-tab.d.ts
566
- declare function TransactionsTab(): react_jsx_runtime0.JSX.Element;
567
- //#endregion
568
- //#region src/rwa/components/unit-price.d.ts
569
- declare function UnitPrice(props: {
570
- readonly control: Control<GroupTransactionFormInputs>;
571
- readonly isViewOnly: boolean;
572
- }): react_jsx_runtime0.JSX.Element;
573
- //#endregion
574
- //#region src/rwa/components/use-modal.d.ts
575
- declare const useModal: () => ModalContextValue;
576
- //#endregion
577
- //#region src/rwa/constants/columns.d.ts
578
- type ColumnsByTableName = { [K in TableName]: TableColumn[] };
579
- declare const columnsByTableName: ColumnsByTableName;
580
- //#endregion
581
- //#region src/rwa/constants/table.d.ts
582
- declare const defaultColumnCountByTableWidth: {
583
- 1520: number;
584
- 1394: number;
585
- 1239: number;
586
- 1112: number;
587
- 984: number;
588
- };
589
- declare const cashTransactionSignByTransactionType: Record<GroupTransactionType, -1 | 1>;
590
- declare const assetTransactionSignByTransactionType: {
591
- readonly AssetSale: -1;
592
- readonly AssetPurchase: 1;
593
- };
594
- declare function getStateKeyForTableName(tableName: TableName): keyof RealWorldAssetsState;
595
- declare function getTableNameFor<A extends EditorAction>(action: A): TableNameFor<A>;
596
- declare function getActionOperationType<A extends EditorAction>(action: A): "CREATE" | "EDIT" | "DELETE";
597
- //#endregion
598
- //#region src/rwa/context/editor-context.d.ts
599
- type RWAEditorContextProps = {
600
- readonly isAllowedToCreateDocuments: boolean;
601
- readonly isAllowedToEditDocuments: boolean;
602
- readonly canUndo: boolean;
603
- readonly canRedo: boolean;
604
- readonly onSwitchboardLinkClick: (() => void) | undefined;
605
- readonly onExport: () => void;
606
- readonly onClose: () => void;
607
- readonly onShowRevisionHistory: () => void;
608
- };
609
- type TEditorContext = RWAEditorContextProps & RealWorldAssetsState & {
610
- readonly cashAsset: CashAsset;
611
- readonly fixedIncomes: FixedIncome[];
612
- readonly selectedTableItem: TableItemType<TableName> | null;
613
- readonly selectedTableName: TableName | null;
614
- readonly operation: Operation;
615
- readonly viewItem: (item: TableItemType<TableName>, tableName: TableName) => void;
616
- readonly createItem: (tableName: TableName) => void;
617
- readonly editItem: (item: TableItemType<TableName>, tableName: TableName) => void;
618
- readonly clearSelected: () => void;
619
- readonly getIsFormOpen: (tableName: TableName) => boolean;
620
- readonly handleAction: (action: EditorAction) => void;
621
- readonly handleUndo: () => void;
622
- readonly handleRedo: () => void;
623
- };
624
- declare function RWAEditorContextProvider(props: RWAEditorContextProps & {
625
- readonly children: ReactNode;
626
- readonly state: RealWorldAssetsState;
627
- readonly editorDispatcher: EditorDispatcher;
628
- readonly undo: () => void;
629
- readonly redo: () => void;
630
- }): react_jsx_runtime0.JSX.Element;
631
- declare function useEditorContext(): TEditorContext;
632
- //#endregion
633
- //#region src/rwa/hooks/useColumnPriority.d.ts
634
- type Props$3<TColumn extends TableColumn> = {
635
- columns: TColumn[] | undefined;
636
- columnCountByTableWidth: ColumnCountByTableWidth;
637
- tableContainerRef: RefObject<HTMLDivElement | null>;
638
- hasItemNumberColumn?: boolean;
639
- hasMoreDetailsColumn?: boolean;
640
- };
641
- /**
642
- * Hook to handle dropping columns for smaller screens.
643
- *
644
- * @param columns - Array of columns to display, column must satisfy TableColumn. The columns will be displayed in the order they are provided.
645
- * @param columnCountByTableWidth - Object that specifies how many columns to show at different screen widths
646
- * @param tableContainerRef - Ref to the table container element
647
- * @param hasIndexColumn - When true, adds an "index" column with the index of the row as the _first column_. This column is exempt from being dropped.
648
- * @param hasMoreDetailsColumn - When true, adds a "more details" column as the _last column_. This column is exempt from being dropped. This column has no header label by default.
649
- */
650
- declare function useColumnPriority<TColumn extends TableColumn>(props: Props$3<TColumn>): TColumn[];
651
- declare function getColumnCount(parentElementWidth: number, columnCountByTableWidth: Record<number, number>): number;
652
- //#endregion
653
- //#region src/rwa/hooks/useDefaultFormValues.d.ts
654
- declare function useDefaultFormValues(args: {
655
- tableName: TableName;
656
- tableItem?: TableItemType<TableName> | null;
657
- fixedIncomeTypes: FixedIncomeType[];
658
- spvs: SPV[];
659
- accounts: Account[];
660
- }): GroupTransactionFormInputs | SPVFormInputs | AccountFormInputs;
661
- //#endregion
662
- //#region src/rwa/hooks/useFormInputs.d.ts
663
- type Input = {
664
- label: string;
665
- Input: () => string | React.JSX.Element;
666
- inputLabel?: ReactNode | null;
667
- };
668
- type Props$2 = {
669
- tableName: TableName;
670
- tableItem: TableItemType<TableName> | undefined | null;
671
- operation: Operation;
672
- formState: FormState<FormInputsByTableName[TableName]>;
673
- register: UseFormRegister<FormInputsByTableName[TableName]>;
674
- watch: UseFormWatch<FormInputsByTableName[TableName]>;
675
- control: Control<FormInputsByTableName[TableName]>;
676
- };
677
- declare function useFormInputs(props: Props$2): {
678
- inputs: Input[];
679
- additionalInputs?: ReactElement;
680
- };
681
- //#endregion
682
- //#region src/rwa/hooks/useSortTableItems.d.ts
683
- /**
684
- * Takes a list of items and returns a sorted list of items and a sort descriptor.
685
- * @param items - The list of items to sort.
686
- * @returns An object containing the sorted items and a sort handler func
687
- */
688
- declare function useSortTableItems<TItem extends Item, TTableData extends TableItem<TItem>>(items: TTableData[] | undefined): {
689
- readonly sortedItems: TTableData[] | undefined;
690
- readonly sortHandler: (column: Identifier<TTableData>, direction: Order) => void;
691
- };
692
- //#endregion
693
- //#region src/rwa/hooks/useSubmit.d.ts
694
- type Props$1 = {
695
- operation: Operation;
696
- tableName: TableName;
697
- tableItem?: TableItemType<TableName> | null;
698
- };
699
- declare function useSubmit(props: Props$1): {
700
- register: react_hook_form0.UseFormRegister<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
701
- reset: react_hook_form0.UseFormReset<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
702
- watch: react_hook_form0.UseFormWatch<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
703
- control: react_hook_form0.Control<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs, any, GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
704
- formState: react_hook_form0.FormState<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
705
- submit: (e?: React.BaseSyntheticEvent) => Promise<void>;
706
- };
707
- //#endregion
708
- //#region src/rwa/hooks/useTableData.d.ts
709
- declare function useTableData<TTableName extends TableName>(tableName: TTableName): {
710
- readonly tableData: TableItemType<TTableName>[];
711
- readonly sortHandler: (column: natural_orderby0.Identifier<TableItemType<TTableName>>, direction: natural_orderby0.Order) => void;
712
- };
713
- //#endregion
714
- //#region src/rwa/hooks/useTableForm.d.ts
715
- declare function useTableForm(props: FormHookProps): {
716
- submit: (e?: React.BaseSyntheticEvent) => Promise<void>;
717
- reset: react_hook_form0.UseFormReset<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
718
- register: react_hook_form0.UseFormRegister<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
719
- control: react_hook_form0.Control<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs, any, GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
720
- formInputs: {
721
- inputs: {
722
- label: string;
723
- Input: () => string | React.JSX.Element;
724
- inputLabel?: react.ReactNode | null;
725
- }[];
726
- additionalInputs?: react.ReactElement;
727
- };
728
- formState: react_hook_form0.FormState<GroupTransactionFormInputs | AssetFormInputs | SPVFormInputs | ServiceProviderFeeTypeFormInputs | FixedIncomeTypeFormInputs | AccountFormInputs>;
729
- };
730
- //#endregion
731
- //#region src/rwa/hooks/useTableHeight.d.ts
732
- type Props = {
733
- selectedItemNumber: number | undefined;
734
- tableContainerRef: RefObject<HTMLDivElement | null>;
735
- rowRefs: RefObject<(HTMLTableRowElement | null)[]>;
736
- headerRef: RefObject<HTMLTableSectionElement | null>;
737
- hasSpecialLastRow?: boolean;
738
- };
739
- declare function useTableHeight(props: Props): string;
740
- //#endregion
741
- //#region src/rwa/utils/calculations.d.ts
742
- type NumericKeys<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
743
- declare function sumTotalForProperty<T extends Record<string, any>>(items: T[], property: NumericKeys<T>): number;
744
- declare const math: mathjs.MathJsInstance;
745
- declare function calculateCurrentValue(props: {
746
- asset: FixedIncome | undefined;
747
- transactions: GroupTransaction[];
748
- fixedIncomeTypes: FixedIncomeType[];
749
- currentDate?: Date;
750
- }): number | null;
751
- declare function calculateSumQuantity(transactions: GroupTransaction[]): mathjs.BigNumber;
752
- //#endregion
753
- //#region src/rwa/utils/date.d.ts
754
- declare function formatDateForDisplay(date: Date | string, displayTime?: boolean, isUTC?: boolean): string;
755
- declare function isISODate(str: string): boolean;
756
- declare function getTimeZone(): string;
757
- declare function isoDateStringToDateInput(isoDateString: string, withTime?: boolean): string;
758
- //#endregion
759
- //#region src/rwa/utils/form.d.ts
760
- declare function makeFixedIncomeOptionLabel(fixedIncome: FixedIncome): string;
761
- //#endregion
762
- //#region src/rwa/utils/table.d.ts
763
- declare function handleDateInTable(maybeDate: string | Date, displayTime?: boolean): string;
764
- declare function handleTableDatum(datum: ItemData, decimalScale?: number, displayTime?: boolean): string | react_jsx_runtime0.JSX.Element;
765
- declare function calculateUnitPrice(cashAmount: InputMaybe<number>, fixedIncomeAmount: InputMaybe<number>): number;
766
- declare function calculateCashBalanceChange(transactionType: InputMaybe<GroupTransactionType>, cashAmount: InputMaybe<number>, fees: InputMaybe<TransactionFeeInput[]>): number;
767
- declare function makeFixedIncomeTypesTableData(state: RealWorldAssetsState): TableItemType<"FIXED_INCOME_TYPE">[];
768
- declare function makeSPVsTableData(state: RealWorldAssetsState): TableItemType<"SPV">[];
769
- declare function makeAssetsTableData(state: RealWorldAssetsState): TableItemType<"ASSET">[];
770
- declare function makeGroupTransactionsTableData(state: RealWorldAssetsState): TableItemType<"TRANSACTION">[];
771
- declare function makeAccountsTableData(state: RealWorldAssetsState): TableItemType<"ACCOUNT">[];
772
- declare function makeServiceProviderFeeTypesTableData(state: RealWorldAssetsState): TableItemType<"SERVICE_PROVIDER_FEE_TYPE">[];
773
- declare function makeTableData(tableName: TableName, state: RealWorldAssetsState): TableItemType<"TRANSACTION">[] | TableItemType<"ACCOUNT">[] | TableItemType<"FIXED_INCOME_TYPE">[];
774
- declare const tableDataMakersByTableName: {
775
- readonly ASSET: typeof makeAssetsTableData;
776
- readonly TRANSACTION: typeof makeGroupTransactionsTableData;
777
- readonly ACCOUNT: typeof makeAccountsTableData;
778
- readonly FIXED_INCOME_TYPE: typeof makeFixedIncomeTypesTableData;
779
- readonly SERVICE_PROVIDER_FEE_TYPE: typeof makeServiceProviderFeeTypesTableData;
780
- readonly SPV: typeof makeSPVsTableData;
781
- };
782
- //#endregion
783
- //#region src/rwa/utils/validators.d.ts
784
- declare function isAssetGroupTransactionType(type: GroupTransactionType): type is AssetGroupTransactionType;
785
- declare function isFixedIncomeAsset(asset: Asset | undefined | null): asset is FixedIncome;
786
- declare function isCashAsset(asset: Asset | undefined | null): asset is CashAsset;
787
- declare function getFixedIncomeAssets(portfolio: Asset[]): FixedIncome[];
788
- declare function getCashAsset(portfolio: Asset[]): CashAsset;
789
- //#endregion
790
- export { ASSET_PURCHASE, ASSET_SALE, Account, AccountFormInputs, AccountsTable, ActionOutputByTableName, ActionOutputFor, Asset, AssetFormInputs, AssetGroupTransactionType, AssetType, AssetsTable, AssetsTableData, BaseTransaction, CashAsset, CashBalanceChange, ColumnCountByTableWidth, ColumnsByTableName, DependentItemProps, EditorAction, EditorDispatcher, EntryTimeLabel, FEES_INCOME, FEES_PAYMENT, FeeTransactionsTable, FixedIncome, FixedIncomeType, FixedIncomeTypeFormInputs, FormHookProps, FormInputs, FormInputsByTableName, FormattedNumber, GroupTransaction, GroupTransactionFormInputs, GroupTransactionType, GroupTransactionsTable, GroupTransactionsTableData, INTEREST_INCOME, INTEREST_PAYMENT, Item, ItemData, ItemDetails, ItemNumberCell, MapModalProps, ModalContext, ModalContextValue, ModalFormInputs, ModalManager, ModalProps, ModalPropsMapping, ModalType, Modals, MoreDetailsCell, Operation, OtherTab, PRINCIPAL_DRAW, PRINCIPAL_RETURN, PortfolioTab, RWAButton, RWACreateItemModal, RWACreateItemModalProps, RWADeleteItemModal, RWADeleteItemModalProps, RWAEditor, RWAEditorContextProps, RWAEditorContextProvider, RWAFormRow, RWAFormRowProps, RWANumberInput, RWATableCell, RWATableHeaderLabel, RWATableHeaderLabelProps, RWATableRow, RWATableRowProps, RWATableSelect, RWATableSelectProps, RWATableTextInput, RWATabs, RealWorldAssetsState, RwaTabContent, SPV, SPVFormInputs, ServiceProviderFeeType, ServiceProviderFeeTypeFormInputs, ServiceProviderFeeTypeTableData, SortDirection, Table, TableBase, TableBaseProps, TableColumn, TableDataByTableName, TableItem, TableItemType, TableName, TableNameFor, TableProps, TableWithForm, TransactionFee, TransactionFeeInput, TransactionReference, TransactionsTab, UnitPrice, allGroupTransactionTypes, assetGroupTransactions, assetTransactionSignByTransactionType, calculateCashBalanceChange, calculateCurrentValue, calculateSumQuantity, calculateUnitPrice, cashTransactionSignByTransactionType, columnsByTableName, defaultColumnCountByTableWidth, deleteEditorActionInputsByTableName, editorStateKeysByTableName, feesTransactions, formatDateForDisplay, getActionOperationType, getCashAsset, getColumnCount, getFixedIncomeAssets, getStateKeyForTableName, getTableNameFor, getTimeZone, groupTransactionTypeLabels, handleDateInTable, handleTableDatum, interestTransactions, isAssetGroupTransactionType, isCashAsset, isFixedIncomeAsset, isISODate, isoDateStringToDateInput, makeDependentAssetsList, makeDependentServiceProviderFeeTypesList, makeDependentTransactionsList, makeFixedIncomeOptionLabel, makeTableData, math, modals, principalGroupTransactions, sumTotalForProperty, tableDataMakersByTableName, tableLabels, tableNames, useColumnPriority, useDefaultFormValues, useDependentItemProps, useEditorContext, useFormInputs, useModal, useSortTableItems, useSubmit, useTableData, useTableForm, useTableHeight };
791
- //# sourceMappingURL=index.d.ts.map