@unimaze/billing 0.21.3 → 0.21.4

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 (230) hide show
  1. package/lib/common/components/CommonTranslations.d.ts +1 -29
  2. package/lib/common/components/CommonTranslations.js +4 -32
  3. package/lib/common/components/attachments/Attachment.d.ts +1 -1
  4. package/lib/common/components/attachments/AttachmentModal.d.ts +1 -1
  5. package/lib/common/components/attachments/index.d.ts +1 -1
  6. package/lib/common/components/base-information/AccountingCost.d.ts +1 -1
  7. package/lib/common/components/base-information/OrderReference.d.ts +1 -1
  8. package/lib/common/components/base-information/ProjectReference.d.ts +1 -1
  9. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +2 -1
  10. package/lib/common/components/base-information/ReferenceIdentifiers.js +29 -11
  11. package/lib/common/components/base-information/index.d.ts +10 -1
  12. package/lib/common/components/base-information/index.js +9 -1
  13. package/lib/common/components/billing-lines/BillingCalculations.d.ts +1 -1
  14. package/lib/common/components/billing-lines/BillingLinePreview.d.ts +2 -1
  15. package/lib/common/components/billing-lines/BillingLinePreview.js +4 -2
  16. package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +1 -1
  17. package/lib/common/components/billing-lines/BillingTaxSummary.js +0 -1
  18. package/lib/common/components/billing-lines/CurrencySelector.d.ts +20 -0
  19. package/lib/common/components/billing-lines/CurrencySelector.js +17 -0
  20. package/lib/common/components/billing-lines/DiscountTypeSelector.d.ts +10 -0
  21. package/lib/common/components/billing-lines/DiscountTypeSelector.js +16 -0
  22. package/lib/common/components/billing-lines/NewBillingLines.d.ts +2 -1
  23. package/lib/common/components/billing-lines/NewBillingLines.js +37 -327
  24. package/lib/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
  25. package/lib/common/components/billing-lines/NewNewBillingLines.js +36 -0
  26. package/lib/common/components/billing-lines/SingleBillingLine.d.ts +19 -0
  27. package/lib/common/components/billing-lines/SingleBillingLine.js +262 -0
  28. package/lib/common/components/billing-lines/UnitOfMeasureSelector.d.ts +14 -0
  29. package/lib/common/components/billing-lines/UnitOfMeasureSelector.js +15 -0
  30. package/lib/common/components/billing-lines/cwdwdw.d.ts +1 -0
  31. package/lib/common/components/billing-lines/cwdwdw.js +14 -0
  32. package/lib/common/components/billing-lines/index.d.ts +3 -6
  33. package/lib/common/components/billing-lines/index.js +1 -1
  34. package/lib/common/components/customer/CostCenter.d.ts +1 -1
  35. package/lib/common/components/customer/CustomerContactName.d.ts +1 -1
  36. package/lib/common/components/customer/index.d.ts +1 -1
  37. package/lib/common/components/customer/index.js +6 -4
  38. package/lib/common/components/delivery-location/index.d.ts +1 -1
  39. package/lib/common/components/form-item/index.d.ts +1 -1
  40. package/lib/common/components/input/index.d.ts +1 -1
  41. package/lib/common/components/invoice/index.d.ts +3 -1
  42. package/lib/common/components/invoice/index.js +21 -14
  43. package/lib/common/components/invoice-preview/InvoicePreviewHeader.d.ts +1 -1
  44. package/lib/common/components/invoice-preview/InvoicePreviewHeader.js +7 -8
  45. package/lib/common/components/invoice-preview/index.d.ts +1 -1
  46. package/lib/common/components/invoice-preview/index.js +8 -2
  47. package/lib/common/components/payment-method/index.d.ts +1 -1
  48. package/lib/common/components/payment-method/index.js +22 -7
  49. package/lib/common/components/supplier/CityAutofill.d.ts +1 -1
  50. package/lib/common/components/supplier/index.d.ts +1 -1
  51. package/lib/common/components/welcome-modal/index.d.ts +1 -1
  52. package/lib/common/types/ReceiverRequirements.d.ts +2 -0
  53. package/lib/common/types/ReceiverRequirements.js +2 -0
  54. package/lib/create-invoice/index.d.ts +9 -1
  55. package/lib/create-invoice/index.js +87 -60
  56. package/lib/enums.d.ts +3 -0
  57. package/lib/translations/locales/en.json +7 -10
  58. package/lib/translations/locales/is.json +5 -8
  59. package/lib/translations/locales.d.ts +10 -16
  60. package/lib/unimaze-api-clients/src/mapi/api.d.ts +6664 -0
  61. package/lib/unimaze-api-clients/src/mapi/api.js +4743 -0
  62. package/lib/unimaze-api-clients/src/mapi/base.d.ts +55 -0
  63. package/lib/unimaze-api-clients/src/mapi/base.js +84 -0
  64. package/lib/unimaze-api-clients/src/mapi/configuration.d.ts +63 -0
  65. package/lib/unimaze-api-clients/src/mapi/configuration.js +28 -0
  66. package/lib/unimaze-api-clients/src/mapi/index.d.ts +13 -0
  67. package/lib/unimaze-api-clients/src/mapi/index.js +30 -0
  68. package/lib/unimaze-api-clients/src/rapi/api.d.ts +5015 -0
  69. package/lib/unimaze-api-clients/src/rapi/api.js +5582 -0
  70. package/lib/unimaze-api-clients/src/rapi/base.d.ts +55 -0
  71. package/lib/unimaze-api-clients/src/rapi/base.js +84 -0
  72. package/lib/unimaze-api-clients/src/rapi/configuration.d.ts +63 -0
  73. package/lib/unimaze-api-clients/src/rapi/configuration.js +28 -0
  74. package/lib/unimaze-api-clients/src/rapi/index.d.ts +13 -0
  75. package/lib/unimaze-api-clients/src/rapi/index.js +30 -0
  76. package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +102 -0
  77. package/lib/unimaze-billing/src/common/components/CommonTranslations.js +106 -0
  78. package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +20 -0
  79. package/lib/unimaze-billing/src/common/components/attachments/Attachment.js +164 -0
  80. package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +21 -0
  81. package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +203 -0
  82. package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +27 -0
  83. package/lib/unimaze-billing/src/common/components/attachments/index.js +214 -0
  84. package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +17 -0
  85. package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.js +61 -0
  86. package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +16 -0
  87. package/lib/unimaze-billing/src/common/components/base-information/OrderReference.js +58 -0
  88. package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +14 -0
  89. package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.js +30 -0
  90. package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +48 -0
  91. package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +306 -0
  92. package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +68 -0
  93. package/lib/unimaze-billing/src/common/components/base-information/index.js +178 -0
  94. package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +14 -0
  95. package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +153 -0
  96. package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +21 -0
  97. package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +41 -0
  98. package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +13 -0
  99. package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +134 -0
  100. package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.d.ts +20 -0
  101. package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.js +17 -0
  102. package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.d.ts +10 -0
  103. package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.js +16 -0
  104. package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +129 -0
  105. package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +495 -0
  106. package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
  107. package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.js +36 -0
  108. package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +14 -0
  109. package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +199 -0
  110. package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.d.ts +14 -0
  111. package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.js +15 -0
  112. package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +52 -0
  113. package/lib/unimaze-billing/src/common/components/billing-lines/index.js +104 -0
  114. package/lib/unimaze-billing/src/common/components/component-container/Content.d.ts +7 -0
  115. package/lib/unimaze-billing/src/common/components/component-container/Content.js +13 -0
  116. package/lib/unimaze-billing/src/common/components/component-container/Header.d.ts +9 -0
  117. package/lib/unimaze-billing/src/common/components/component-container/Header.js +28 -0
  118. package/lib/unimaze-billing/src/common/components/component-container/index.d.ts +12 -0
  119. package/lib/unimaze-billing/src/common/components/component-container/index.js +22 -0
  120. package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +17 -0
  121. package/lib/unimaze-billing/src/common/components/customer/CostCenter.js +163 -0
  122. package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +17 -0
  123. package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.js +53 -0
  124. package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.d.ts +7 -0
  125. package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.js +41 -0
  126. package/lib/unimaze-billing/src/common/components/customer/index.d.ts +26 -0
  127. package/lib/unimaze-billing/src/common/components/customer/index.js +168 -0
  128. package/lib/unimaze-billing/src/common/components/date-picker/index.d.ts +21 -0
  129. package/lib/unimaze-billing/src/common/components/date-picker/index.js +23 -0
  130. package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +12 -0
  131. package/lib/unimaze-billing/src/common/components/delivery-location/index.js +89 -0
  132. package/lib/unimaze-billing/src/common/components/editable-cell/index.d.ts +0 -0
  133. package/lib/unimaze-billing/src/common/components/editable-cell/index.js +295 -0
  134. package/lib/unimaze-billing/src/common/components/editable-row/index.d.ts +5 -0
  135. package/lib/unimaze-billing/src/common/components/editable-row/index.js +59 -0
  136. package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +35 -0
  137. package/lib/unimaze-billing/src/common/components/form-item/index.js +60 -0
  138. package/lib/unimaze-billing/src/common/components/index.d.ts +18 -0
  139. package/lib/unimaze-billing/src/common/components/index.js +42 -0
  140. package/lib/unimaze-billing/src/common/components/input/index.d.ts +23 -0
  141. package/lib/unimaze-billing/src/common/components/input/index.js +37 -0
  142. package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +40 -0
  143. package/lib/unimaze-billing/src/common/components/invoice/index.js +52 -0
  144. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
  145. package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +105 -0
  146. package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +16 -0
  147. package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +405 -0
  148. package/lib/unimaze-billing/src/common/components/locale-intl/index.d.ts +0 -0
  149. package/lib/unimaze-billing/src/common/components/locale-intl/index.js +51 -0
  150. package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +76 -0
  151. package/lib/unimaze-billing/src/common/components/payment-method/index.js +356 -0
  152. package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.d.ts +8 -0
  153. package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.js +37 -0
  154. package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
  155. package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
  156. package/lib/unimaze-billing/src/common/components/submit-confirmation/index.d.ts +8 -0
  157. package/lib/unimaze-billing/src/common/components/submit-confirmation/index.js +34 -0
  158. package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +18 -0
  159. package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.js +159 -0
  160. package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +94 -0
  161. package/lib/unimaze-billing/src/common/components/supplier/index.js +334 -0
  162. package/lib/unimaze-billing/src/common/components/tooltip/index.d.ts +7 -0
  163. package/lib/unimaze-billing/src/common/components/tooltip/index.js +15 -0
  164. package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +15 -0
  165. package/lib/unimaze-billing/src/common/components/welcome-modal/index.js +26 -0
  166. package/lib/unimaze-billing/src/common/consts/formLayout.d.ts +74 -0
  167. package/lib/unimaze-billing/src/common/consts/formLayout.js +45 -0
  168. package/lib/unimaze-billing/src/common/consts/validationRules.d.ts +6 -0
  169. package/lib/unimaze-billing/src/common/consts/validationRules.js +69 -0
  170. package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.d.ts +5 -0
  171. package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.js +8 -0
  172. package/lib/unimaze-billing/src/common/enums/index.d.ts +1 -0
  173. package/lib/unimaze-billing/src/common/enums/index.js +8 -0
  174. package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +23 -0
  175. package/lib/unimaze-billing/src/common/types/AppConfiguration.js +2 -0
  176. package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.d.ts +10 -0
  177. package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.js +2 -0
  178. package/lib/unimaze-billing/src/common/types/CommonProps.d.ts +33 -0
  179. package/lib/unimaze-billing/src/common/types/CommonProps.js +2 -0
  180. package/lib/unimaze-billing/src/common/types/DiscountType.d.ts +1 -0
  181. package/lib/unimaze-billing/src/common/types/DiscountType.js +2 -0
  182. package/lib/unimaze-billing/src/common/types/InvoiceFormFields.d.ts +1 -0
  183. package/lib/unimaze-billing/src/common/types/InvoiceFormFields.js +2 -0
  184. package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.d.ts +27 -0
  185. package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.js +2 -0
  186. package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +81 -0
  187. package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +391 -0
  188. package/lib/unimaze-billing/src/common/types/SupplierInfo.d.ts +11 -0
  189. package/lib/unimaze-billing/src/common/types/SupplierInfo.js +2 -0
  190. package/lib/unimaze-billing/src/common/types/index.d.ts +1 -0
  191. package/lib/unimaze-billing/src/common/types/index.js +17 -0
  192. package/lib/unimaze-billing/src/create-credit-note/index.d.ts +9 -0
  193. package/lib/unimaze-billing/src/create-credit-note/index.js +62 -0
  194. package/lib/unimaze-billing/src/create-invoice/IntlLoader.d.ts +11 -0
  195. package/lib/unimaze-billing/src/create-invoice/IntlLoader.js +116 -0
  196. package/lib/unimaze-billing/src/create-invoice/index.d.ts +74 -0
  197. package/lib/unimaze-billing/src/create-invoice/index.js +680 -0
  198. package/lib/unimaze-billing/src/enums.d.ts +11 -0
  199. package/lib/unimaze-billing/src/enums.js +18 -0
  200. package/lib/unimaze-billing/src/index.d.ts +4 -0
  201. package/lib/unimaze-billing/src/index.js +28 -0
  202. package/lib/unimaze-billing/src/translations/locales/en.json +183 -0
  203. package/lib/unimaze-billing/src/translations/locales/is.json +183 -0
  204. package/lib/unimaze-billing/src/translations/locales.d.ts +369 -0
  205. package/lib/unimaze-billing/src/translations/locales.js +11 -0
  206. package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +23 -0
  207. package/lib/unimaze-billing/src/utils/ApiUtility.js +115 -0
  208. package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +22 -0
  209. package/lib/unimaze-billing/src/utils/BillingLineUtility.js +158 -0
  210. package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +9 -0
  211. package/lib/unimaze-billing/src/utils/ConversionUtility.js +223 -0
  212. package/lib/unimaze-billing/src/utils/FileUploadUtility.d.ts +9 -0
  213. package/lib/unimaze-billing/src/utils/FileUploadUtility.js +45 -0
  214. package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +5 -0
  215. package/lib/unimaze-billing/src/utils/IntlUtility.js +55 -0
  216. package/lib/unimaze-billing/src/utils/LocationUtility.d.ts +1 -0
  217. package/lib/unimaze-billing/src/utils/LocationUtility.js +81 -0
  218. package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.d.ts +7 -0
  219. package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.js +26 -0
  220. package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +19 -0
  221. package/lib/unimaze-billing/src/utils/RequirementsUtility.js +189 -0
  222. package/lib/unimaze-billing/src/utils/index.d.ts +2 -0
  223. package/lib/unimaze-billing/src/utils/index.js +8 -0
  224. package/lib/utils/ApiUtility.d.ts +9 -3
  225. package/lib/utils/ApiUtility.js +30 -2
  226. package/lib/utils/BillingLineUtility.d.ts +3 -0
  227. package/lib/utils/BillingLineUtility.js +32 -1
  228. package/lib/utils/RequirementsUtility.d.ts +4 -1
  229. package/lib/utils/RequirementsUtility.js +56 -1
  230. package/package.json +2 -2
@@ -0,0 +1,199 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ var React = __importStar(require("react"));
41
+ var react_1 = require("react");
42
+ var antd_1 = require("antd");
43
+ var form_item_1 = __importDefault(require("../form-item"));
44
+ var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
45
+ var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
46
+ var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
47
+ var UnitOfMeasureSelector_1 = __importDefault(require("./UnitOfMeasureSelector"));
48
+ var CurrencySelector_1 = __importDefault(require("./CurrencySelector"));
49
+ var IntlUtility_1 = require("../../../utils/IntlUtility");
50
+ var enums_1 = require("../../../enums");
51
+ var CommonTranslations_1 = require("../CommonTranslations");
52
+ var tooltip_1 = __importDefault(require("../tooltip"));
53
+ var DiscountTypeSelector_1 = __importDefault(require("./DiscountTypeSelector"));
54
+ var formLayout_1 = require("../../consts/formLayout");
55
+ var icons_1 = require("@ant-design/icons");
56
+ var NewBillingLines_1 = require("./NewBillingLines");
57
+ var BillingLinePreview_1 = __importDefault(require("./BillingLinePreview"));
58
+ var mapi_1 = require("../../../../../unimaze-api-clients/src/mapi");
59
+ var SingleBillingLine = function (props) {
60
+ var fieldName = props.fieldName, index = props.index, intl = props.intl;
61
+ var _a = React.useState(false), isMobile = _a[0], setIsMobile = _a[1];
62
+ var _b = React.useState(false), isCurrencyDisabled = _b[0], setIsCurrencyDisabled = _b[1];
63
+ var _c = React.useState(), taxCatType = _c[0], setTaxCatType = _c[1];
64
+ var _d = React.useState("PERCENTAGE"), discountType = _d[0], setDiscountType = _d[1];
65
+ var _e = (0, react_1.useState)(undefined), addNewLinesTooltip = _e[0], setAddNewLinesTooltip = _e[1];
66
+ var _f = React.useState(true), isSaveButtonDisabled = _f[0], setIsSaveButtonDisabled = _f[1];
67
+ var _g = (0, react_1.useState)(false), isEditing = _g[0], setIsEditing = _g[1];
68
+ var fieldValues1 = props.formInstance.getFieldsValue([
69
+ ["invoice", "invoiceLines", fieldName],
70
+ ]);
71
+ var removeBillingLine = function (id) {
72
+ // remove(index);
73
+ // const newBillingLines = billingLineData.filter((lineData) => lineData.key !== id);
74
+ // setBillingLineData(newBillingLines);
75
+ };
76
+ var editBillingLine = function (id) {
77
+ if (id) {
78
+ // setIdOfLineForEdit(id);
79
+ }
80
+ };
81
+ var addBillingLine = function () {
82
+ var fieldValues = props.formInstance.getFieldsValue(["invoice", "invoiceLines"]);
83
+ if (fieldValues &&
84
+ fieldValues.invoice &&
85
+ fieldValues.invoice.invoiceLines &&
86
+ fieldValues.invoice.invoiceLines[fieldName]) {
87
+ var _a = fieldValues.invoice.invoiceLines[fieldName], name_1 = _a.name, taxableAmount = _a.taxableAmount, quantity = _a.quantity, unitOfMeasure = _a.unitOfMeasure, unitPriceAmount = _a.unitPriceAmount, taxCategoryType = _a.taxCategoryType, discountValue = _a.discountValue, _discountType = _a.discountType, currencyCode = _a.currencyCode;
88
+ var unit = unitOfMeasure.unit;
89
+ var billingLineId = "billingLine-".concat(name_1, "-").concat(fieldName);
90
+ var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(taxCategoryType);
91
+ var taxAmount = (0, BillingLineUtility_1.calculateTaxAmount)(taxableAmount, taxPercentage);
92
+ var newBillingLineData = {
93
+ key: fieldName,
94
+ name: name_1,
95
+ taxableAmount: taxableAmount,
96
+ taxPercentage: taxPercentage,
97
+ taxAmount: taxAmount,
98
+ quantity: quantity,
99
+ // TODO: fix this
100
+ unitOfMeasure: {
101
+ value: mapi_1.Units.CubicMetre,
102
+ label: unit
103
+ },
104
+ unitPriceAmount: unitPriceAmount,
105
+ taxCategoryType: taxCategoryType,
106
+ discountValue: discountValue,
107
+ discountType: _discountType,
108
+ currencyCode: currencyCode,
109
+ onDelete: function () {
110
+ removeBillingLine(fieldName);
111
+ },
112
+ onEdit: function () {
113
+ editBillingLine(fieldName);
114
+ }
115
+ };
116
+ // setBillingLineData([...billingLineData, newBillingLineData]);
117
+ //
118
+ // add();
119
+ }
120
+ };
121
+ var getTaxableAmount = function () {
122
+ var fieldValues = props.formInstance.getFieldsValue([
123
+ ["invoice", "invoiceLines", fieldName],
124
+ ]);
125
+ if (fieldValues &&
126
+ fieldValues.invoice &&
127
+ fieldValues.invoice.invoiceLines &&
128
+ fieldValues.invoice.invoiceLines[fieldName]) {
129
+ var _a = fieldValues.invoice.invoiceLines[fieldName], discountValue = _a.discountValue, quantity = _a.quantity, unitPriceAmount = _a.unitPriceAmount;
130
+ var taxableAmount = (0, BillingLineUtility_1.calculateTaxableAmount)(discountValue, quantity, unitPriceAmount, discountType);
131
+ props.formInstance.setFields([
132
+ {
133
+ name: ["invoice", "invoiceLines", fieldName, "taxableAmount"],
134
+ value: taxableAmount,
135
+ },
136
+ ]);
137
+ return taxableAmount;
138
+ }
139
+ return 0;
140
+ };
141
+ var currencySelectorCallbackFunction = function (currency) {
142
+ return (React.createElement(antd_1.Select.Option, { value: currency.key, title: currency.name, key: currency.key }, currency.name));
143
+ };
144
+ var currencySelectorOnSelect = function (value) {
145
+ props.formInstance.setFieldsValue({ invoice: { currencyCode: value } });
146
+ };
147
+ var discountTypeSelectorOnSelectHandle = function (value) { return setDiscountType(value); };
148
+ var editingRender = (React.createElement(antd_1.Flex, { vertical: true,
149
+ // style={field.name !== fields.length - 1 ? {display: "none"} : {}}
150
+ key: "invoiceLine-".concat(index) },
151
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.itemNo"], defaultIsRequired: false, fieldName: [fieldName, "itemNo"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_itemNo), verticalLabels: true, onlyLabelOnFirstInList: true }, (0, BillingLineUtility_1.getCorrectInputNode)("itemNo", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_itemNo), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.itemNo"], false))),
152
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.name"], defaultIsRequired: true, fieldName: [fieldName, "name"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_name), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("name", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_name), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.name"], true))),
153
+ React.createElement(antd_1.Row, { gutter: 20 },
154
+ React.createElement(antd_1.Col, { span: 12 },
155
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.quantity"], defaultIsRequired: true, fieldName: [fieldName, "quantity"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_quantity), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("quantity", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_quantity), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.quantity"], true), React.createElement(UnitOfMeasureSelector_1.default, { receiverRequirements: props.receiverRequirements, fieldName: fieldName, mobile: isMobile })))),
156
+ React.createElement(antd_1.Col, { span: 12 },
157
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], defaultIsRequired: true, fieldName: [fieldName, "unitPriceAmount"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), verticalLabels: true, onlyLabelOnFirstInList: true, index: index }, (0, BillingLineUtility_1.getCorrectInputNode)("unitPriceAmount", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitPriceAmount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.unitPriceAmount"], true), React.createElement(CurrencySelector_1.default, { receiverRequirements: props.receiverRequirements, fieldName: fieldName, formInstance: props.formInstance, currencies: (0, RequirementsUtility_1.getCurrencies)(props.receiverRequirements, intl), mobile: isMobile, onSelect: currencySelectorOnSelect, disabled: isCurrencyDisabled, callbackfn: currencySelectorCallbackFunction }))))),
158
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.taxableAmount"], defaultIsRequired: false, fieldName: [fieldName, "taxableAmount"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_lineAmount), verticalLabels: true, onlyLabelOnFirstInList: true, index: index },
159
+ React.createElement(antd_1.InputNumber, { style: { width: "100%" }, disabled: true, defaultValue: (0, IntlUtility_1.icelandicNumberLocaleWorkaroundChrome)(getTaxableAmount(), props.intl) })),
160
+ React.createElement(antd_1.Row, { gutter: 20 },
161
+ React.createElement(antd_1.Col, { span: 12 },
162
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.taxCategoryType"], defaultIsRequired: true, fieldName: [fieldName, "taxCategoryType"], name: [fieldName, "taxCategoryType"], initialValue: taxCatType, verticalLabels: true, onlyLabelOnFirstInList: true, index: index },
163
+ React.createElement(antd_1.Flex, { gap: "middle", align: "center" },
164
+ React.createElement(antd_1.Select, { style: isMobile ? { maxWidth: "80%" } : {}, value: taxCatType, onChange: function (value) {
165
+ var _a;
166
+ setTaxCatType(value);
167
+ props.formInstance.setFieldsValue({
168
+ invoice: {
169
+ invoiceLines: (_a = {},
170
+ _a[index] = {
171
+ taxCategoryType: value,
172
+ },
173
+ _a),
174
+ },
175
+ });
176
+ }, placeholder: (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.taxCategoryType"], true) ? (React.createElement(React.Fragment, null,
177
+ React.createElement(antd_1.Typography.Text, { type: "danger" }, "*"),
178
+ " ",
179
+ props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_taxCategoryType))) : (props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_taxCategoryType)), popupMatchSelectWidth: false }, Object.keys(enums_1.AvailableTaxCategoryTypeEnum).map(function (taxCategoryType) {
180
+ var taxPercentage = (0, BillingLineUtility_1.calculateTaxPercentage)(enums_1.AvailableTaxCategoryTypeEnum[taxCategoryType]);
181
+ return (React.createElement(antd_1.Select.Option, { disabled: (0, BillingLineUtility_1.getTaxCategoryDisabled)(enums_1.AvailableTaxCategoryTypeEnum[taxCategoryType], props.outsideVatScope), value: taxCategoryType, title: taxCategoryType, key: taxCategoryType }, "".concat(props.intl.formatMessage(CommonTranslations_1.commonTranslationMessages["taxCategoryType_labels_".concat(taxCategoryType)]), " (").concat(taxPercentage, "%)")));
182
+ })),
183
+ " ",
184
+ React.createElement(tooltip_1.default, { title: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_taxCategoryType_title) })))),
185
+ React.createElement(antd_1.Col, { span: 12 },
186
+ React.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], defaultIsRequired: false, fieldName: [fieldName, "discountValue"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount), verticalLabels: true, onlyLabelOnFirstInList: true, defaultLabelTooltip: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount_helpText), index: index },
187
+ React.createElement(antd_1.Flex, { gap: "middle", align: "center" },
188
+ (0, BillingLineUtility_1.getCorrectInputNode)("discountValue", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], false), React.createElement(DiscountTypeSelector_1.default, { fieldName: fieldName, initialValue: discountType, onSelect: discountTypeSelectorOnSelectHandle, formInstance: props.formInstance })),
189
+ React.createElement(tooltip_1.default, { title: (0, RequirementsUtility_1.getFieldLabelTooltipOverride)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.discountValue"], props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_discount_helpText)) }))))),
190
+ React.createElement(antd_1.Form.Item, __assign({}, formLayout_1.fullWidthInput),
191
+ React.createElement(antd_1.Tooltip, { title: addNewLinesTooltip },
192
+ React.createElement(antd_1.Button, { type: "primary", onClick: addBillingLine, style: { width: "100%" }, disabled: isSaveButtonDisabled },
193
+ React.createElement(icons_1.CheckCircleOutlined, null),
194
+ props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_labels_addButton))))));
195
+ return (React.createElement(React.Fragment, null, isEditing
196
+ ? editingRender
197
+ : React.createElement(BillingLinePreview_1.default, { name: props.fieldName, discountValue: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.discountValue, discountType: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.discountType, taxCategoryType: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.taxCategoryType, currencyCode: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.currencyCode, onEdit: function () { setIsEditing(true); }, quantity: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.quantity, taxableAmount: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.taxableAmount, unitPriceAmount: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.unitPriceAmount, unit: fieldValues1 === null || fieldValues1 === void 0 ? void 0 : fieldValues1.unitPriceAmount, onDelete: function () { setIsEditing(true); } })));
198
+ };
199
+ exports.default = SingleBillingLine;
@@ -0,0 +1,14 @@
1
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import React from "react";
4
+ interface Props extends WrappedComponentProps {
5
+ receiverRequirements: NewReceiverRequirements;
6
+ fieldName: any;
7
+ mobile: boolean;
8
+ }
9
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
10
+ forwardedRef?: React.Ref<any>;
11
+ } & React.RefAttributes<any>> & {
12
+ WrappedComponent: React.ComponentType<Props>;
13
+ };
14
+ export default _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_intl_1 = require("react-intl");
7
+ var form_item_1 = __importDefault(require("../form-item"));
8
+ var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
9
+ var BillingLineUtility_1 = require("../../../utils/BillingLineUtility");
10
+ var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
11
+ var react_1 = __importDefault(require("react"));
12
+ var NewBillingLines_1 = require("./NewBillingLines");
13
+ var api_1 = require("@unimaze/api-clients/lib/mapi/api");
14
+ var UnitOfMeasureSelector = function (props) { return react_1.default.createElement(form_item_1.default, { className: "umz_noValidationMessage", receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["invoiceLines.uniteOfMeasure.unit"], defaultIsRequired: true, fieldName: [props.fieldName, "unitOfMeasure", "unit"], defaultLabel: props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitOfMeasure), verticalLabels: true, onlyLabelOnFirstInList: true, style: { marginBottom: "-2px" }, initialValue: api_1.Units.One }, (0, BillingLineUtility_1.getCorrectInputNode)("unitOfMeasure", props.intl, props.intl.formatMessage(NewBillingLines_1.translationMessages.billingLines_unitOfMeasure), (0, RequirementsUtility_1.getFieldIsRequired)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["invoiceLines.uniteOfMeasure.unit"], true), undefined, props.mobile)); };
15
+ exports.default = (0, react_intl_1.injectIntl)(UnitOfMeasureSelector);
@@ -0,0 +1,52 @@
1
+ import * as React from "react";
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
4
+ import { FormInstance } from "antd/es/form";
5
+ import { TaxCategoryTypeEnum, Units } from "@unimaze/api-clients/lib/mapi/api";
6
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
7
+ export interface TaxCategoryTypeWithPercentageEnum {
8
+ value: TaxCategoryTypeEnum;
9
+ label: string;
10
+ }
11
+ export interface UnitOfMeasureLabelInValueEnum {
12
+ value: Units;
13
+ label: string;
14
+ }
15
+ interface Props extends WrappedComponentProps {
16
+ formInstance: FormInstance;
17
+ billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
18
+ receiverRequirements: NewReceiverRequirements;
19
+ outsideVatScope: boolean;
20
+ }
21
+ export declare const translationMessages: {
22
+ billingLines_title: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ billingLines_tooltip_title: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ baseInformation_notes: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ billingLines_button_addRow: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ billingLines_placeholders_itemNo: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ billingLines_placeholders_newItem: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ };
47
+ declare const BillingLinesIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
48
+ forwardedRef?: React.Ref<any> | undefined;
49
+ } & React.RefAttributes<any>> & {
50
+ WrappedComponent: React.ComponentType<Props>;
51
+ };
52
+ export default BillingLinesIntl;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.translationMessages = void 0;
30
+ var React = __importStar(require("react"));
31
+ var antd_1 = require("antd");
32
+ var form_item_1 = __importDefault(require("../form-item"));
33
+ var react_intl_1 = require("react-intl");
34
+ var NewBillingLines_1 = __importDefault(require("./NewBillingLines"));
35
+ var BillingCalculations_1 = __importDefault(require("./BillingCalculations"));
36
+ var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
37
+ var react_use_1 = require("react-use");
38
+ var tooltip_1 = __importDefault(require("../tooltip"));
39
+ exports.translationMessages = (0, react_intl_1.defineMessages)({
40
+ billingLines_title: {
41
+ id: "billingLines_title",
42
+ defaultMessage: "Document lines",
43
+ },
44
+ billingLines_tooltip_title: {
45
+ id: "billingLines_tooltip_title",
46
+ defaultMessage: "Item number, Name, Quantity, Unit of measure, Unit price amount Tax category and Discount need to be defined here.\n" +
47
+ "VAT is automatically applied.\n" +
48
+ 'Click "Add a row" to add a new line', // "Hér þarf að skilgreina Vörunr, Nafn, Fjölda, Mælieiningu, Verð pr. einingu og upphæð. Virðisauki reiknast sjálfkrafa. Smelltu á \"Bæta við röð\" til þess að bæta við vörulínu",
49
+ },
50
+ baseInformation_notes: {
51
+ id: "baseInformation_notes",
52
+ defaultMessage: "Notes",
53
+ },
54
+ billingLines_button_addRow: {
55
+ id: "billingLines_button_addRow",
56
+ defaultMessage: "Add a row",
57
+ },
58
+ billingLines_placeholders_itemNo: {
59
+ id: "billingLines_placeholders_itemNo",
60
+ defaultMessage: "Item No",
61
+ },
62
+ billingLines_placeholders_newItem: {
63
+ id: "billingLines_placeholders_newItem",
64
+ defaultMessage: "New Item",
65
+ },
66
+ });
67
+ var BillingLines = function (props) {
68
+ var _a;
69
+ var width = (0, react_use_1.useWindowSize)().width;
70
+ var _b = React.useState(false), isMobile = _b[0], setIsMobile = _b[1];
71
+ var token = antd_1.theme.useToken().token;
72
+ React.useEffect(function () {
73
+ if (width < 768) {
74
+ setIsMobile(true);
75
+ }
76
+ else {
77
+ setIsMobile(false);
78
+ }
79
+ }, [width]);
80
+ var currencyCode = props.formInstance.getFieldValue(["invoice", "currencyCode"])
81
+ ? props.formInstance.getFieldValue(["invoice", "currencyCode"])
82
+ : "";
83
+ return (React.createElement(antd_1.Flex, { justify: "center" },
84
+ React.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px", paddingBottom: isMobile ? "20px" : "35px" }, gap: "middle" },
85
+ React.createElement(antd_1.Flex, { gap: isMobile ? "small" : "middle", vertical: true, style: isMobile
86
+ ? {
87
+ width: "100vw",
88
+ backgroundColor: token.colorInfoBg,
89
+ margin: "0 -20px",
90
+ padding: "20px 20px 0 20px",
91
+ }
92
+ : { paddingTop: "20px" } },
93
+ React.createElement(antd_1.Flex, { gap: "small" },
94
+ React.createElement(antd_1.Typography.Title, { level: 5 }, props.intl.formatMessage(exports.translationMessages.billingLines_title)),
95
+ React.createElement(antd_1.Flex, { style: { marginBottom: (_a = token.Typography) === null || _a === void 0 ? void 0 : _a.titleMarginBottom } },
96
+ React.createElement(tooltip_1.default, { title: props.intl.formatMessage(exports.translationMessages.billingLines_tooltip_title) }))),
97
+ React.createElement(NewBillingLines_1.default, { formInstance: props.formInstance, receiverRequirements: props.receiverRequirements, outsideVatScope: props.outsideVatScope })),
98
+ React.createElement(antd_1.Flex, { gap: "middle", vertical: true },
99
+ React.createElement(BillingCalculations_1.default, { currencyCode: currencyCode, formInstance: props.formInstance, outsideVatScope: props.outsideVatScope }),
100
+ React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.notes, defaultLabel: props.intl.formatMessage(exports.translationMessages.baseInformation_notes), defaultIsRequired: false, fieldName: ["invoice", "notes"], style: { marginBottom: 0 } },
101
+ React.createElement(antd_1.Input.TextArea, { placeholder: props.intl.formatMessage(exports.translationMessages.baseInformation_notes) }))))));
102
+ };
103
+ var BillingLinesIntl = (0, react_intl_1.injectIntl)(BillingLines);
104
+ exports.default = BillingLinesIntl;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ height?: any;
4
+ children: React.ReactNode;
5
+ }
6
+ declare const Content: React.FC<Props>;
7
+ export default Content;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = __importDefault(require("react"));
7
+ var Content = function (props) {
8
+ var cssStyle = {
9
+ height: props.height ? props.height : undefined,
10
+ };
11
+ return (react_1.default.createElement("div", { className: "component_body", style: cssStyle }, props.children));
12
+ };
13
+ exports.default = Content;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { IconProps } from "@ant-design/compatible/es/icon";
3
+ interface HeaderProps {
4
+ iconProps?: IconProps;
5
+ title?: string | React.ReactNode;
6
+ action?: React.ReactNode;
7
+ }
8
+ declare const Header: React.FC<HeaderProps>;
9
+ export default Header;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var react_1 = __importDefault(require("react"));
18
+ var compatible_1 = require("@ant-design/compatible");
19
+ var Header = function (props) {
20
+ return (react_1.default.createElement("div", { className: "component_header" },
21
+ react_1.default.createElement("div", null,
22
+ react_1.default.createElement("span", null, props.iconProps
23
+ ? react_1.default.createElement(compatible_1.Icon, __assign({}, props.iconProps, { className: "header_icon" }))
24
+ : null),
25
+ react_1.default.createElement("span", { className: "component_header_title" }, props.title)),
26
+ react_1.default.createElement("div", { className: "header_right" }, props.action)));
27
+ };
28
+ exports.default = Header;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { IconProps } from "@ant-design/compatible/es/icon";
3
+ interface Props {
4
+ iconProps?: IconProps;
5
+ title?: string | React.ReactNode;
6
+ action?: React.ReactNode;
7
+ noPadding?: boolean;
8
+ noHeader?: boolean;
9
+ children: React.ReactNode;
10
+ }
11
+ declare const ComponentContainer: React.FC<Props>;
12
+ export default ComponentContainer;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = __importDefault(require("react"));
7
+ var antd_1 = require("antd");
8
+ var Header_1 = __importDefault(require("./Header"));
9
+ var Content_1 = __importDefault(require("./Content"));
10
+ var ComponentContainer = function (props) {
11
+ var iconProps = props.iconProps, title = props.title, action = props.action, noPadding = props.noPadding;
12
+ return (react_1.default.createElement("div", { className: "component_wrapper" },
13
+ props.noHeader
14
+ ? null
15
+ : react_1.default.createElement(antd_1.Row, { align: "stretch" },
16
+ react_1.default.createElement(antd_1.Col, { span: 24 },
17
+ react_1.default.createElement(Header_1.default, { iconProps: iconProps, title: title, action: action }))),
18
+ react_1.default.createElement(antd_1.Row, null,
19
+ react_1.default.createElement(antd_1.Col, { span: 24, className: "".concat(noPadding ? '' : 'component_wrapper_padding') },
20
+ react_1.default.createElement(Content_1.default, null, props.children)))));
21
+ };
22
+ exports.default = ComponentContainer;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
4
+ import { FormInstance } from "antd/es/form";
5
+ interface Props extends WrappedComponentProps {
6
+ receiverRequirements: NewReceiverRequirements;
7
+ updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void;
8
+ rapiBaseUrl: string;
9
+ formInstance: FormInstance;
10
+ legalIdentifier: string;
11
+ }
12
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
13
+ forwardedRef?: React.Ref<any> | undefined;
14
+ } & React.RefAttributes<any>> & {
15
+ WrappedComponent: React.ComponentType<Props>;
16
+ };
17
+ export default _default;