@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,295 @@
1
+ "use strict";
2
+ // import React, {useState, useContext, MutableRefObject} from "react";
3
+ // import {Form, Input, InputNumber, Select, message} from "antd";
4
+ //
5
+ // import {
6
+ // BillingLineMetadataTaxCategoryTypeEnum,
7
+ // UnitOfMeasureMetadataUnitEnum
8
+ // } from "@unimaze/api-clients/lib/mapi/models";
9
+ //
10
+ // import {validationRules, ValidationRulesObject} from "../../consts/validationRules";
11
+ // import {BillingLineMetadataOverride} from "../../types/BillingLineMetadataOverride";
12
+ // import {EditableContext} from "../editable-row";
13
+ // import {FormInstance} from "antd/lib/form";
14
+ // import {calculateTaxPercentage} from "../../../utils/BillingLineUtility";
15
+ // import {TaxCategoryTypeEnum} from "@unimaze/api-clients/lib/mapi/api";
16
+ // import {defineMessages, injectIntl, WrappedComponentProps} from "react-intl";
17
+ // import {returnDecimalSeparatorForLocale} from "../../../utils/IntlUtility";
18
+ //
19
+ // export const commonTranslationMessages = defineMessages({
20
+ // taxCategoryType_labels_StandardRated: {
21
+ // id: "taxCategoryType_labels_StandardRated",
22
+ // defaultMessage: "Standard rated",
23
+ // },
24
+ // taxCategoryType_labels_ReducedRated: {
25
+ // id: "taxCategoryType_labels_ReducedRated",
26
+ // defaultMessage: "Reduced rated",
27
+ // },
28
+ // taxCategoryType_labels_ZeroRated: {
29
+ // id: "taxCategoryType_labels_ZeroRated",
30
+ // defaultMessage: "Zero rated",
31
+ // },
32
+ // taxCategoryType_labels_Exempt: {
33
+ // id: "taxCategoryType_labels_Exempt",
34
+ // defaultMessage: "Exempt",
35
+ // },
36
+ // taxCategoryType_labels_OutsideTaxScope: {
37
+ // id: "taxCategoryType_labels_OutsideTaxScope",
38
+ // defaultMessage: "Outside tax scope",
39
+ // },
40
+ // unitOfMeasure_labels_Piece: {
41
+ // id: "unitOfMeasure_labels_Piece",
42
+ // defaultMessage: "Piece",
43
+ // },
44
+ // unitOfMeasure_labels_Kilogram: {
45
+ // id: "unitOfMeasure_labels_Kilogram",
46
+ // defaultMessage: "Kilogram",
47
+ // },
48
+ // unitOfMeasure_labels_Month: {
49
+ // id: "unitOfMeasure_labels_Month",
50
+ // defaultMessage: "Month",
51
+ // },
52
+ // unitOfMeasure_labels_Package: {
53
+ // id: "unitOfMeasure_labels_Package",
54
+ // defaultMessage: "Package",
55
+ // },
56
+ // unitOfMeasure_labels_Year: {
57
+ // id: "unitOfMeasure_labels_Year",
58
+ // defaultMessage: "Year",
59
+ // },
60
+ // unitOfMeasure_labels_Day: {
61
+ // id: "unitOfMeasure_labels_Day",
62
+ // defaultMessage: "Day",
63
+ // },
64
+ // unitOfMeasure_labels_Hour: {
65
+ // id: "unitOfMeasure_labels_Hour",
66
+ // defaultMessage: "Hour",
67
+ // },
68
+ // unitOfMeasure_labels_Kilometre: {
69
+ // id: "unitOfMeasure_labels_Kilometre",
70
+ // defaultMessage: "Kilometre",
71
+ // },
72
+ // unitOfMeasure_labels_Metre: {
73
+ // id: "unitOfMeasure_labels_Metre",
74
+ // defaultMessage: "Metre",
75
+ // },
76
+ // unitOfMeasure_labels_Litre: {
77
+ // id: "unitOfMeasure_labels_Litre",
78
+ // defaultMessage: "Litre",
79
+ // },
80
+ // unitOfMeasure_labels_SquareMetre: {
81
+ // id: "unitOfMeasure_labels_SquareMetre",
82
+ // defaultMessage: "Square metre",
83
+ // },
84
+ // unitOfMeasure_labels_CubicMetre: {
85
+ // id: "unitOfMeasure_labels_CubicMetre",
86
+ // defaultMessage: "Cubic metre",
87
+ // },
88
+ // unitOfMeasure_labels_Tonne: {
89
+ // id: "unitOfMeasure_labels_Tonne",
90
+ // defaultMessage: "Tonne",
91
+ // },
92
+ // unitOfMeasure_labels_KiloWattHour: {
93
+ // id: "unitOfMeasure_labels_KiloWattHour",
94
+ // defaultMessage: "KiloWatt hour",
95
+ // },
96
+ // unitOfMeasure_labels_One: {
97
+ // id: "unitOfMeasure_labels_One",
98
+ // defaultMessage: "One",
99
+ // },
100
+ // });
101
+ //
102
+ // const validationTranslationMessages = defineMessages({
103
+ // rulesMessages_name_required: {
104
+ // id: "rulesMessages_name_required",
105
+ // defaultMessage: "Please insert item name",
106
+ // },
107
+ // rulesMessages_unitOfMeasure_required: {
108
+ // id: "rulesMessages_unitOfMeasure_required",
109
+ // defaultMessage: "Please choose unit of measure",
110
+ // },
111
+ // rulesMessages_unitPriceAmount_required: {
112
+ // id: "rulesMessages_unitPriceAmount_required",
113
+ // defaultMessage: "Please fill in unit price amount",
114
+ // },
115
+ // rulesMessages_unitPriceAmount_type: {
116
+ // id: "rulesMessages_unitPriceAmount_type",
117
+ // defaultMessage: "Unit price amount must be a number",
118
+ // },
119
+ // rulesMessages_taxCategoryType_required: {
120
+ // id: "rulesMessages_taxCategoryType_required",
121
+ // defaultMessage: "Please choose tax category type",
122
+ // },
123
+ // rulesMessages_discountValue_pattern: {
124
+ // id: "rulesMessages_discountValue_pattern",
125
+ // defaultMessage: "Please use only numbers characters and percentage character at the end",
126
+ // },
127
+ // });
128
+ //
129
+ // interface EditableCellProps extends WrappedComponentProps {
130
+ // record: BillingLineMetadataOverride;
131
+ // handleSave: (billingLineMetadata: BillingLineMetadataOverride) => void;
132
+ // // title: string;
133
+ // dataIndex: keyof Omit<BillingLineMetadataOverride, 'key'>;
134
+ // editable: boolean;
135
+ // index: number;
136
+ // }
137
+ //
138
+ // const EditableCell: React.FC<EditableCellProps> = (props) => {
139
+ // const {
140
+ // editable,
141
+ // dataIndex,
142
+ // // title,
143
+ // record,
144
+ // index,
145
+ // handleSave,
146
+ // children,
147
+ // ...restProps
148
+ // } = props;
149
+ //
150
+ // const [editing, setEditing] = useState<boolean>(true);
151
+ // let input: Select<any> | Input | null = null;
152
+ // const form = useContext<FormInstance>(EditableContext);
153
+ //
154
+ // const toggleEdit = (): void => {
155
+ // setEditing(!editing);
156
+ // if (!editing && input) input.focus();
157
+ // };
158
+ //
159
+ // const save = async () => {
160
+ // try {
161
+ // const values = await form.validateFields();
162
+ // toggleEdit();
163
+ // handleSave({...record, ...values});
164
+ // } catch (errInfo) {
165
+ // message.error(errInfo)
166
+ // }
167
+ // };
168
+ //
169
+ // const getCorrectInputNode = (dataIdx: keyof BillingLineMetadataOverride): React.ReactChild => {
170
+ // switch (dataIdx) {
171
+ // case "quantity":
172
+ // case "unitPriceAmount":
173
+ // return <InputNumber step={1}
174
+ // decimalSeparator={returnDecimalSeparatorForLocale(localStorage.getItem("languageString"))}
175
+ // // ref={node => (input = node)}
176
+ // // onPressEnter={save}
177
+ // onBlur={save}
178
+ // />;
179
+ //
180
+ // case "discountValue":
181
+ // return <Input onBlur={save}/>
182
+ // case "unitOfMeasure":
183
+ // return (
184
+ // <Select
185
+ // dropdownMatchSelectWidth={false}
186
+ // ref={node => (input = node)}
187
+ // // defaultActiveFirstOption
188
+ // // onSelect={save}
189
+ // labelInValue
190
+ // onChange={save}
191
+ // >
192
+ // {Object.keys(UnitOfMeasureMetadataUnitEnum).map(unitOfMeasure => {
193
+ // if (unitOfMeasure !== "Rec20" && unitOfMeasure !== "Rec21")
194
+ // return (
195
+ // <Select.Option
196
+ // value={unitOfMeasure}
197
+ // // title={unitOfMeasure}
198
+ // key={unitOfMeasure}
199
+ // >
200
+ // {/*{unitOfMeasure}*/}
201
+ // {props.intl.formatMessage(commonTranslationMessages[`unitOfMeasure_labels_${unitOfMeasure}` as keyof typeof commonTranslationMessages])}
202
+ // </Select.Option>
203
+ // )
204
+ // })}
205
+ // </Select>
206
+ // );
207
+ // case "taxCategoryType":
208
+ // return (
209
+ // <Select
210
+ // dropdownMatchSelectWidth={false}
211
+ // ref={node => (input = node)}
212
+ // // defaultActiveFirstOption
213
+ // labelInValue
214
+ // // onSelect={save}
215
+ // onChange={save}
216
+ // >
217
+ // {Object.keys(TaxCategoryTypeEnum).map(taxCategoryType => {
218
+ // const taxPercentage = calculateTaxPercentage(TaxCategoryTypeEnum[taxCategoryType as TaxCategoryTypeEnum]);
219
+ //
220
+ // return (
221
+ // <Select.Option
222
+ // value={taxCategoryType}
223
+ // key={taxCategoryType}
224
+ // >
225
+ // {/*{`${taxCategoryType} (${taxPercentage}%)`}*/}
226
+ // {`${props.intl.formatMessage(commonTranslationMessages[`taxCategoryType_labels_${taxCategoryType}` as keyof typeof commonTranslationMessages])} (${taxPercentage}%)`}
227
+ // </Select.Option>
228
+ // )
229
+ // })}
230
+ // </Select>
231
+ // );
232
+ // default:
233
+ // return <Input
234
+ // ref={node => (input = node)}
235
+ // // onPressEnter={save}
236
+ // onBlur={save}
237
+ // />;
238
+ //
239
+ // }
240
+ // };
241
+ //
242
+ // const renderCell = () => {
243
+ // const inputNode: React.ReactChild = getCorrectInputNode(dataIndex);
244
+ //
245
+ // const rules = (validationRules as ValidationRulesObject)[dataIndex];
246
+ //
247
+ // const translatableRules = rules && rules.map(singleRule => {
248
+ // return {
249
+ // ...singleRule,
250
+ // message: singleRule.message && props.intl.formatMessage(validationTranslationMessages[`rulesMessages_${singleRule.message}` as keyof typeof validationTranslationMessages])
251
+ // }
252
+ // })
253
+ //
254
+ // return editing ? (
255
+ // <Form.Item
256
+ // style={{margin: 0}}
257
+ // rules={translatableRules}
258
+ // name={dataIndex}
259
+ // initialValue={record[dataIndex]}
260
+ // >
261
+ // {inputNode}
262
+ // </Form.Item>
263
+ // ) : (
264
+ // <div
265
+ // className="editable-cell-value-wrap"
266
+ // // style={{paddingRight: 24}}
267
+ // onClick={toggleEdit}
268
+ // >
269
+ // {children}
270
+ // </div>
271
+ // );
272
+ // // return (
273
+ // // <Form.Item
274
+ // // style={{margin: 0}}
275
+ // // rules={rules}
276
+ // // name={dataIndex}
277
+ // // initialValue={record[dataIndex]}
278
+ // // >
279
+ // // {inputNode}
280
+ // // </Form.Item>
281
+ // // )
282
+ // };
283
+ //
284
+ // return (
285
+ // <td {...restProps}>
286
+ // {editable ? (
287
+ // <EditableContext.Consumer>{renderCell}</EditableContext.Consumer>
288
+ // ) : (
289
+ // children
290
+ // )}
291
+ // </td>
292
+ // );
293
+ // };
294
+ // const EditableCellIntl = injectIntl(EditableCell);
295
+ // export default EditableCellIntl;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { FormInstance } from "antd/lib/form";
3
+ export declare const EditableContext: React.Context<FormInstance<any>>;
4
+ declare const EditableRow: ({ index, ...props }: any) => React.JSX.Element;
5
+ export default EditableRow;
@@ -0,0 +1,59 @@
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 __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.EditableContext = void 0;
49
+ var React = __importStar(require("react"));
50
+ var antd_1 = require("antd");
51
+ exports.EditableContext = React.createContext({});
52
+ var EditableRow = function (_a) {
53
+ var index = _a.index, props = __rest(_a, ["index"]);
54
+ var form = antd_1.Form.useForm()[0];
55
+ return React.createElement(antd_1.Form, { form: form, component: false },
56
+ React.createElement(exports.EditableContext.Provider, { value: form },
57
+ React.createElement("tr", __assign({}, props))));
58
+ };
59
+ exports.default = EditableRow;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { AvailableFields } from "../../types/ReceiverRequirements";
3
+ import { NamePath, Rule } from "rc-field-form/lib/interface";
4
+ import { WrappedComponentProps } from "react-intl";
5
+ import { FormItemProps } from "antd/lib/form/FormItem";
6
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
7
+ export declare const translationMessages: {
8
+ formItem_required_errorMessage: {
9
+ id: string;
10
+ defaultMessage: string;
11
+ };
12
+ };
13
+ interface StringMap {
14
+ [key: string]: string;
15
+ }
16
+ interface Props extends WrappedComponentProps, FormItemProps {
17
+ receiverRequirements: NewReceiverRequirements;
18
+ receiverRequirementsKey: AvailableFields;
19
+ defaultLabel?: React.ReactNode | string;
20
+ defaultLabelTooltip?: React.ReactNode;
21
+ defaultIsRequired: boolean;
22
+ fieldName: NamePath;
23
+ additionalRules?: Rule[];
24
+ style?: React.CSSProperties;
25
+ initialValue?: StringMap | string | number;
26
+ verticalLabels?: boolean;
27
+ onlyLabelOnFirstInList?: boolean;
28
+ index?: number;
29
+ }
30
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
31
+ forwardedRef?: React.Ref<any> | undefined;
32
+ } & React.RefAttributes<any>> & {
33
+ WrappedComponent: React.ComponentType<Props>;
34
+ };
35
+ export default _default;
@@ -0,0 +1,60 @@
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 __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
25
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
26
+ if (ar || !(i in from)) {
27
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
28
+ ar[i] = from[i];
29
+ }
30
+ }
31
+ return to.concat(ar || Array.prototype.slice.call(from));
32
+ };
33
+ var __importDefault = (this && this.__importDefault) || function (mod) {
34
+ return (mod && mod.__esModule) ? mod : { "default": mod };
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.translationMessages = void 0;
38
+ var react_1 = __importDefault(require("react"));
39
+ var antd_1 = require("antd");
40
+ var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
41
+ var react_intl_1 = require("react-intl");
42
+ var formLayout_1 = require("../../consts/formLayout");
43
+ exports.translationMessages = (0, react_intl_1.defineMessages)({
44
+ formItem_required_errorMessage: {
45
+ id: "formItem_required_errorMessage",
46
+ defaultMessage: "This field is required",
47
+ },
48
+ });
49
+ var UmzFormItem = function (props) {
50
+ var children = props.children, onlyLabelOnFirstInList = props.onlyLabelOnFirstInList, index = props.index, defaultLabel = props.defaultLabel, defaultIsRequired = props.defaultIsRequired, initialValue = props.initialValue, additionalRules = props.additionalRules, verticalLabels = props.verticalLabels, fieldName = props.fieldName, receiverRequirementsKey = props.receiverRequirementsKey, style = props.style, defaultLabelTooltip = props.defaultLabelTooltip, intl = props.intl, receiverRequirements = props.receiverRequirements, rest = __rest(props, ["children", "onlyLabelOnFirstInList", "index", "defaultLabel", "defaultIsRequired", "initialValue", "additionalRules", "verticalLabels", "fieldName", "receiverRequirementsKey", "style", "defaultLabelTooltip", "intl", "receiverRequirements"]);
51
+ var isRequired = (0, RequirementsUtility_1.getFieldIsRequired)(receiverRequirements, receiverRequirementsKey, defaultIsRequired);
52
+ return (react_1.default.createElement(antd_1.Form.Item, __assign({}, verticalLabels ? formLayout_1.formItemVerticalLayout : formLayout_1.formItemLayout, { name: fieldName, rules: __spreadArray([
53
+ {
54
+ required: isRequired,
55
+ message: intl.formatMessage(exports.translationMessages.formItem_required_errorMessage),
56
+ }
57
+ ], (additionalRules || []) // if the array is undefined
58
+ , true), style: style, initialValue: initialValue }, rest), children));
59
+ };
60
+ exports.default = (0, react_intl_1.injectIntl)(UmzFormItem);
@@ -0,0 +1,18 @@
1
+ import InvoicePreviewHeader from "./invoice-preview/InvoicePreviewHeader";
2
+ export { InvoicePreviewHeader };
3
+ export { default as Attachments } from "./attachments";
4
+ export { default as BaseInformation } from "./base-information";
5
+ export { default as BillingLines } from "./billing-lines";
6
+ export { default as ComponentContainer } from "./component-container";
7
+ export { default as Customer } from "./customer";
8
+ export { default as DeliveryLocation } from "./delivery-location";
9
+ export { default as PaymentMethod } from "./payment-method";
10
+ export { default as Supplier } from "./supplier";
11
+ export { default as UmzFormItem } from "./form-item";
12
+ export { default as UmzInput } from "./input";
13
+ export { default as UmzDatePicker } from "./date-picker";
14
+ export { default as WelcomeModal } from "./welcome-modal";
15
+ export { default as Invoice } from "./invoice";
16
+ export { default as InvoicePreview } from "./invoice-preview";
17
+ export { default as SubmitConfirmation } from "./submit-confirmation";
18
+ export { default as UmzTooltip } from "./tooltip";
@@ -0,0 +1,42 @@
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
+ exports.UmzTooltip = exports.SubmitConfirmation = exports.InvoicePreview = exports.Invoice = exports.WelcomeModal = exports.UmzDatePicker = exports.UmzInput = exports.UmzFormItem = exports.Supplier = exports.PaymentMethod = exports.DeliveryLocation = exports.Customer = exports.ComponentContainer = exports.BillingLines = exports.BaseInformation = exports.Attachments = exports.InvoicePreviewHeader = void 0;
7
+ var InvoicePreviewHeader_1 = __importDefault(require("./invoice-preview/InvoicePreviewHeader"));
8
+ exports.InvoicePreviewHeader = InvoicePreviewHeader_1.default;
9
+ var attachments_1 = require("./attachments");
10
+ Object.defineProperty(exports, "Attachments", { enumerable: true, get: function () { return __importDefault(attachments_1).default; } });
11
+ var base_information_1 = require("./base-information");
12
+ Object.defineProperty(exports, "BaseInformation", { enumerable: true, get: function () { return __importDefault(base_information_1).default; } });
13
+ var billing_lines_1 = require("./billing-lines");
14
+ Object.defineProperty(exports, "BillingLines", { enumerable: true, get: function () { return __importDefault(billing_lines_1).default; } });
15
+ var component_container_1 = require("./component-container");
16
+ Object.defineProperty(exports, "ComponentContainer", { enumerable: true, get: function () { return __importDefault(component_container_1).default; } });
17
+ var customer_1 = require("./customer");
18
+ Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return __importDefault(customer_1).default; } });
19
+ var delivery_location_1 = require("./delivery-location");
20
+ Object.defineProperty(exports, "DeliveryLocation", { enumerable: true, get: function () { return __importDefault(delivery_location_1).default; } });
21
+ // export {default as EditableCell} from "./editable-cell";
22
+ // export {default as EditableRow} from "./editable-row";
23
+ var payment_method_1 = require("./payment-method");
24
+ Object.defineProperty(exports, "PaymentMethod", { enumerable: true, get: function () { return __importDefault(payment_method_1).default; } });
25
+ var supplier_1 = require("./supplier");
26
+ Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return __importDefault(supplier_1).default; } });
27
+ var form_item_1 = require("./form-item");
28
+ Object.defineProperty(exports, "UmzFormItem", { enumerable: true, get: function () { return __importDefault(form_item_1).default; } });
29
+ var input_1 = require("./input");
30
+ Object.defineProperty(exports, "UmzInput", { enumerable: true, get: function () { return __importDefault(input_1).default; } });
31
+ var date_picker_1 = require("./date-picker");
32
+ Object.defineProperty(exports, "UmzDatePicker", { enumerable: true, get: function () { return __importDefault(date_picker_1).default; } });
33
+ var welcome_modal_1 = require("./welcome-modal");
34
+ Object.defineProperty(exports, "WelcomeModal", { enumerable: true, get: function () { return __importDefault(welcome_modal_1).default; } });
35
+ var invoice_1 = require("./invoice");
36
+ Object.defineProperty(exports, "Invoice", { enumerable: true, get: function () { return __importDefault(invoice_1).default; } });
37
+ var invoice_preview_1 = require("./invoice-preview");
38
+ Object.defineProperty(exports, "InvoicePreview", { enumerable: true, get: function () { return __importDefault(invoice_preview_1).default; } });
39
+ var submit_confirmation_1 = require("./submit-confirmation");
40
+ Object.defineProperty(exports, "SubmitConfirmation", { enumerable: true, get: function () { return __importDefault(submit_confirmation_1).default; } });
41
+ var tooltip_1 = require("./tooltip");
42
+ Object.defineProperty(exports, "UmzTooltip", { enumerable: true, get: function () { return __importDefault(tooltip_1).default; } });
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
4
+ import { AvailableFields } from "../../types/ReceiverRequirements";
5
+ interface Props extends WrappedComponentProps {
6
+ receiverRequirements?: NewReceiverRequirements;
7
+ receiverRequirementsKey?: AvailableFields;
8
+ defaultPlaceholder?: string;
9
+ defaultIsRequired?: boolean;
10
+ defaultValue?: string;
11
+ value?: string;
12
+ defaultTooltip?: React.ReactNode;
13
+ disabled?: boolean;
14
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
16
+ size?: "large" | "middle" | "small";
17
+ }
18
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
19
+ forwardedRef?: React.Ref<any> | undefined;
20
+ } & React.RefAttributes<any>> & {
21
+ WrappedComponent: React.ComponentType<Props>;
22
+ };
23
+ export default _default;
@@ -0,0 +1,37 @@
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 antd_1 = require("antd");
7
+ var react_1 = __importDefault(require("react"));
8
+ var react_intl_1 = require("react-intl");
9
+ var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
10
+ var react_use_1 = require("react-use");
11
+ var tooltip_1 = __importDefault(require("../tooltip"));
12
+ var UmzInput = function (_a) {
13
+ var receiverRequirements = _a.receiverRequirements, receiverRequirementsKey = _a.receiverRequirementsKey, defaultPlaceholder = _a.defaultPlaceholder, _b = _a.defaultIsRequired, defaultIsRequired = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, defaultTooltip = _a.defaultTooltip, defaultValue = _a.defaultValue, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, size = _a.size;
14
+ var isRequired = receiverRequirements && receiverRequirementsKey
15
+ ? (0, RequirementsUtility_1.getFieldIsRequired)(receiverRequirements, receiverRequirementsKey, defaultIsRequired)
16
+ : defaultIsRequired;
17
+ var tooltipTitle = receiverRequirements && receiverRequirementsKey
18
+ ? (0, RequirementsUtility_1.getFieldLabelTooltipOverride)(receiverRequirements, receiverRequirementsKey, defaultTooltip)
19
+ : defaultTooltip;
20
+ var placeholder = receiverRequirements && receiverRequirementsKey && defaultPlaceholder
21
+ ? (0, RequirementsUtility_1.getFieldLabelOverride)(receiverRequirements, receiverRequirementsKey, defaultPlaceholder)
22
+ : defaultPlaceholder;
23
+ var width = (0, react_use_1.useWindowSize)().width;
24
+ var _d = react_1.default.useState(false), isMobile = _d[0], setIsMobile = _d[1];
25
+ react_1.default.useEffect(function () {
26
+ if (width < 768) {
27
+ setIsMobile(true);
28
+ }
29
+ else {
30
+ setIsMobile(false);
31
+ }
32
+ }, [width]);
33
+ return (react_1.default.createElement(antd_1.Flex, { gap: "middle" },
34
+ react_1.default.createElement(antd_1.Input, { disabled: disabled, placeholder: placeholder, required: isRequired, onChange: onChange, size: size, prefix: isRequired ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, defaultValue: defaultValue, value: value, suffix: !isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle }), onBlur: onBlur, autoComplete: "off" }),
35
+ isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle })));
36
+ };
37
+ exports.default = (0, react_intl_1.injectIntl)(UmzInput);
@@ -0,0 +1,40 @@
1
+ import React from "react";
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { FormInstance } from "antd";
4
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
5
+ import { ValidateStatus } from "antd/es/form/FormItem";
6
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
7
+ import { LanguageProp } from "../../types/CommonProps";
8
+ import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
9
+ interface Props extends WrappedComponentProps {
10
+ form: FormInstance;
11
+ receiverRequirements: NewReceiverRequirements;
12
+ documentType: "creditNote" | "invoice";
13
+ updateReceiverRequirementsProp: (newReceiverRequirements: NewReceiverRequirements) => void;
14
+ rapiBaseUrl: string;
15
+ legalIdentifier: string;
16
+ referenceIdentifiersLabelText?: string;
17
+ referenceIdentifiersHelpText?: string;
18
+ referenceIdentifierValidateStatus: ValidateStatus;
19
+ chosenCustomer: PartyMetadata;
20
+ setReferenceIdentifierValidateStatus: (referenceIdentifierValidateStatus: ValidateStatus) => void;
21
+ dueDateMinimumOffset: number;
22
+ billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
23
+ outsideVatScope: boolean;
24
+ uploadSizeLimit: number;
25
+ attachmentTooltipText?: {
26
+ is: string;
27
+ en: string;
28
+ };
29
+ languageString: LanguageProp;
30
+ validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
31
+ isSaveFieldValuesSelected: boolean;
32
+ onSaveFieldValuesChange: () => void;
33
+ isActiveStep: boolean;
34
+ }
35
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
36
+ forwardedRef?: React.Ref<any> | undefined;
37
+ } & React.RefAttributes<any>> & {
38
+ WrappedComponent: React.ComponentType<Props>;
39
+ };
40
+ export default _default;