@unimaze/billing 0.21.3 → 0.21.5

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 +275 -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 +4 -1
  227. package/lib/utils/BillingLineUtility.js +36 -4
  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,55 @@
1
+ /**
2
+ * Unimaze\'s Registry web API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Configuration } from "./configuration";
13
+ import { AxiosInstance } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: any;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ name: "RequiredError";
54
+ constructor(field: string, msg?: string);
55
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ // tslint:disable
3
+ /**
4
+ * Unimaze\'s Registry web API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __extends = (this && this.__extends) || (function () {
15
+ var extendStatics = function (d, b) {
16
+ extendStatics = Object.setPrototypeOf ||
17
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19
+ return extendStatics(d, b);
20
+ };
21
+ return function (d, b) {
22
+ if (typeof b !== "function" && b !== null)
23
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24
+ extendStatics(d, b);
25
+ function __() { this.constructor = d; }
26
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
27
+ };
28
+ })();
29
+ var __importDefault = (this && this.__importDefault) || function (mod) {
30
+ return (mod && mod.__esModule) ? mod : { "default": mod };
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
34
+ // Some imports not used depending on template conditions
35
+ // @ts-ignore
36
+ var axios_1 = __importDefault(require("axios"));
37
+ exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
38
+ /**
39
+ *
40
+ * @export
41
+ */
42
+ exports.COLLECTION_FORMATS = {
43
+ csv: ",",
44
+ ssv: " ",
45
+ tsv: "\t",
46
+ pipes: "|",
47
+ };
48
+ /**
49
+ *
50
+ * @export
51
+ * @class BaseAPI
52
+ */
53
+ var BaseAPI = /** @class */ (function () {
54
+ function BaseAPI(configuration, basePath, axios) {
55
+ if (basePath === void 0) { basePath = exports.BASE_PATH; }
56
+ if (axios === void 0) { axios = axios_1.default; }
57
+ this.basePath = basePath;
58
+ this.axios = axios;
59
+ if (configuration) {
60
+ this.configuration = configuration;
61
+ this.basePath = configuration.basePath || this.basePath;
62
+ }
63
+ }
64
+ return BaseAPI;
65
+ }());
66
+ exports.BaseAPI = BaseAPI;
67
+ ;
68
+ /**
69
+ *
70
+ * @export
71
+ * @class RequiredError
72
+ * @extends {Error}
73
+ */
74
+ var RequiredError = /** @class */ (function (_super) {
75
+ __extends(RequiredError, _super);
76
+ function RequiredError(field, msg) {
77
+ var _this = _super.call(this, msg) || this;
78
+ _this.field = field;
79
+ _this.name = "RequiredError";
80
+ return _this;
81
+ }
82
+ return RequiredError;
83
+ }(Error));
84
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Unimaze\'s Registry web API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export interface ConfigurationParameters {
13
+ apiKey?: string | ((name: string) => string);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | ((name?: string, scopes?: string[]) => string);
17
+ basePath?: string;
18
+ baseOptions?: any;
19
+ }
20
+ export declare class Configuration {
21
+ /**
22
+ * parameter for apiKey security
23
+ * @param name security name
24
+ * @memberof Configuration
25
+ */
26
+ apiKey?: string | ((name: string) => string);
27
+ /**
28
+ * parameter for basic security
29
+ *
30
+ * @type {string}
31
+ * @memberof Configuration
32
+ */
33
+ username?: string;
34
+ /**
35
+ * parameter for basic security
36
+ *
37
+ * @type {string}
38
+ * @memberof Configuration
39
+ */
40
+ password?: string;
41
+ /**
42
+ * parameter for oauth2 security
43
+ * @param name security name
44
+ * @param scopes oauth2 scope
45
+ * @memberof Configuration
46
+ */
47
+ accessToken?: string | ((name?: string, scopes?: string[]) => string);
48
+ /**
49
+ * override base path
50
+ *
51
+ * @type {string}
52
+ * @memberof Configuration
53
+ */
54
+ basePath?: string;
55
+ /**
56
+ * base options for axios calls
57
+ *
58
+ * @type {any}
59
+ * @memberof Configuration
60
+ */
61
+ baseOptions?: any;
62
+ constructor(param?: ConfigurationParameters);
63
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // tslint:disable
3
+ /**
4
+ * Unimaze\'s Registry web API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Configuration = void 0;
16
+ var Configuration = /** @class */ (function () {
17
+ function Configuration(param) {
18
+ if (param === void 0) { param = {}; }
19
+ this.apiKey = param.apiKey;
20
+ this.username = param.username;
21
+ this.password = param.password;
22
+ this.accessToken = param.accessToken;
23
+ this.basePath = param.basePath;
24
+ this.baseOptions = param.baseOptions;
25
+ }
26
+ return Configuration;
27
+ }());
28
+ exports.Configuration = Configuration;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Unimaze\'s Registry web API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from "./api";
13
+ export * from "./configuration";
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ // tslint:disable
3
+ /**
4
+ * Unimaze\'s Registry web API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ __exportStar(require("./api"), exports);
30
+ __exportStar(require("./configuration"), exports);
@@ -0,0 +1,102 @@
1
+ export declare const commonTranslationMessages: {
2
+ taxCategoryType_labels_StandardRated: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ taxCategoryType_labels_ReducedRated: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ taxCategoryType_labels_ZeroRated: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ taxCategoryType_labels_Exempt: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ taxCategoryType_labels_OutsideTaxScope: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
22
+ taxCategoryType_labels_ReverseCharged: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ taxCategoryType_labels_FreeExportTaxNotCharged: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ taxCategoryType_labels_ExemptEuropeanEconomicArea: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ unitOfMeasure_labels_Piece: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ unitOfMeasure_labels_Kilogram: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ unitOfMeasure_labels_Month: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ unitOfMeasure_labels_Package: {
47
+ id: string;
48
+ defaultMessage: string;
49
+ };
50
+ unitOfMeasure_labels_Year: {
51
+ id: string;
52
+ defaultMessage: string;
53
+ };
54
+ unitOfMeasure_labels_Day: {
55
+ id: string;
56
+ defaultMessage: string;
57
+ };
58
+ unitOfMeasure_labels_Hour: {
59
+ id: string;
60
+ defaultMessage: string;
61
+ };
62
+ unitOfMeasure_labels_Kilometre: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ };
66
+ unitOfMeasure_labels_Metre: {
67
+ id: string;
68
+ defaultMessage: string;
69
+ };
70
+ unitOfMeasure_labels_Litre: {
71
+ id: string;
72
+ defaultMessage: string;
73
+ };
74
+ unitOfMeasure_labels_SquareMetre: {
75
+ id: string;
76
+ defaultMessage: string;
77
+ };
78
+ unitOfMeasure_labels_CubicMetre: {
79
+ id: string;
80
+ defaultMessage: string;
81
+ };
82
+ unitOfMeasure_labels_Tonne: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ };
86
+ unitOfMeasure_labels_KiloWattHour: {
87
+ id: string;
88
+ defaultMessage: string;
89
+ };
90
+ unitOfMeasure_labels_One: {
91
+ id: string;
92
+ defaultMessage: string;
93
+ };
94
+ saveInformation_label: {
95
+ id: string;
96
+ defaultMessage: string;
97
+ };
98
+ missingRequiredData: {
99
+ id: string;
100
+ defaultMessage: string;
101
+ };
102
+ };
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonTranslationMessages = void 0;
4
+ var react_intl_1 = require("react-intl");
5
+ exports.commonTranslationMessages = (0, react_intl_1.defineMessages)({
6
+ taxCategoryType_labels_StandardRated: {
7
+ id: "taxCategoryType_labels_StandardRated",
8
+ defaultMessage: "Standard rated",
9
+ },
10
+ taxCategoryType_labels_ReducedRated: {
11
+ id: "taxCategoryType_labels_ReducedRated",
12
+ defaultMessage: "Reduced rated",
13
+ },
14
+ taxCategoryType_labels_ZeroRated: {
15
+ id: "taxCategoryType_labels_ZeroRated",
16
+ defaultMessage: "Zero rated",
17
+ },
18
+ taxCategoryType_labels_Exempt: {
19
+ id: "taxCategoryType_labels_Exempt",
20
+ defaultMessage: "Exempt",
21
+ },
22
+ taxCategoryType_labels_OutsideTaxScope: {
23
+ id: "taxCategoryType_labels_OutsideTaxScope",
24
+ defaultMessage: "Outside tax scope",
25
+ },
26
+ taxCategoryType_labels_ReverseCharged: {
27
+ id: "taxCategoryType_labels_ReverseCharged",
28
+ defaultMessage: "Reverse charged",
29
+ },
30
+ taxCategoryType_labels_FreeExportTaxNotCharged: {
31
+ id: "taxCategoryType_labels_FreeExportTaxNotCharged",
32
+ defaultMessage: "Free export tax not charged",
33
+ },
34
+ taxCategoryType_labels_ExemptEuropeanEconomicArea: {
35
+ id: "taxCategoryType_labels_ExemptEuropeanEconomicArea",
36
+ defaultMessage: "Exempt European economic area",
37
+ },
38
+ unitOfMeasure_labels_Piece: {
39
+ id: "unitOfMeasure_labels_Piece",
40
+ defaultMessage: "Piece",
41
+ },
42
+ unitOfMeasure_labels_Kilogram: {
43
+ id: "unitOfMeasure_labels_Kilogram",
44
+ defaultMessage: "Kilogram",
45
+ },
46
+ unitOfMeasure_labels_Month: {
47
+ id: "unitOfMeasure_labels_Month",
48
+ defaultMessage: "Month",
49
+ },
50
+ unitOfMeasure_labels_Package: {
51
+ id: "unitOfMeasure_labels_Package",
52
+ defaultMessage: "Package",
53
+ },
54
+ unitOfMeasure_labels_Year: {
55
+ id: "unitOfMeasure_labels_Year",
56
+ defaultMessage: "Year",
57
+ },
58
+ unitOfMeasure_labels_Day: {
59
+ id: "unitOfMeasure_labels_Day",
60
+ defaultMessage: "Day",
61
+ },
62
+ unitOfMeasure_labels_Hour: {
63
+ id: "unitOfMeasure_labels_Hour",
64
+ defaultMessage: "Hour",
65
+ },
66
+ unitOfMeasure_labels_Kilometre: {
67
+ id: "unitOfMeasure_labels_Kilometre",
68
+ defaultMessage: "Kilometre",
69
+ },
70
+ unitOfMeasure_labels_Metre: {
71
+ id: "unitOfMeasure_labels_Metre",
72
+ defaultMessage: "Metre",
73
+ },
74
+ unitOfMeasure_labels_Litre: {
75
+ id: "unitOfMeasure_labels_Litre",
76
+ defaultMessage: "Litre",
77
+ },
78
+ unitOfMeasure_labels_SquareMetre: {
79
+ id: "unitOfMeasure_labels_SquareMetre",
80
+ defaultMessage: "Square metre",
81
+ },
82
+ unitOfMeasure_labels_CubicMetre: {
83
+ id: "unitOfMeasure_labels_CubicMetre",
84
+ defaultMessage: "Cubic metre",
85
+ },
86
+ unitOfMeasure_labels_Tonne: {
87
+ id: "unitOfMeasure_labels_Tonne",
88
+ defaultMessage: "Tonne",
89
+ },
90
+ unitOfMeasure_labels_KiloWattHour: {
91
+ id: "unitOfMeasure_labels_KiloWattHour",
92
+ defaultMessage: "KiloWatt hour",
93
+ },
94
+ unitOfMeasure_labels_One: {
95
+ id: "unitOfMeasure_labels_One",
96
+ defaultMessage: "One",
97
+ },
98
+ saveInformation_label: {
99
+ id: "saveInformation_label",
100
+ defaultMessage: "Save information",
101
+ },
102
+ missingRequiredData: {
103
+ id: "missingRequiredData",
104
+ defaultMessage: "Missing required data:",
105
+ },
106
+ });
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { FormInstance } from "antd/es/form";
4
+ import { ValidateStatus } from "antd/lib/form/FormItem";
5
+ import { UploadFile } from "antd/es/upload/interface";
6
+ interface Props extends WrappedComponentProps {
7
+ fieldName: "file1" | "file2" | "file3";
8
+ formInstance: FormInstance;
9
+ uploadSizeLimit: number;
10
+ file: UploadFile[];
11
+ setFile: (file: UploadFile[]) => void;
12
+ attachmentFieldValidation: ValidateStatus;
13
+ setAttachmentFieldValidation: (attachmentFieldValidation: ValidateStatus) => void;
14
+ }
15
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
16
+ forwardedRef?: React.Ref<any> | undefined;
17
+ } & React.RefAttributes<any>> & {
18
+ WrappedComponent: React.ComponentType<Props>;
19
+ };
20
+ export default _default;
@@ -0,0 +1,164 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ var React = __importStar(require("react"));
38
+ // import '@ant-design/compatible/assets/index.css';
39
+ var antd_1 = require("antd");
40
+ var react_intl_1 = require("react-intl");
41
+ var formLayout_1 = require("../../consts/formLayout");
42
+ var FileUploadUtility_1 = require("../../../utils/FileUploadUtility");
43
+ var translationMessages = (0, react_intl_1.defineMessages)({
44
+ attachment_labels_Reference: {
45
+ id: "attachment_labels_Reference",
46
+ defaultMessage: "Reference",
47
+ },
48
+ attachment_labels_Reference_requiredMessage: {
49
+ id: "attachment_labels_Reference_requiredMessage",
50
+ defaultMessage: "Please input the reference",
51
+ },
52
+ attachment_labels_Description: {
53
+ id: "attachment_labels_Description",
54
+ defaultMessage: "Description",
55
+ },
56
+ attachment_labels_Description_requiredMessage: {
57
+ id: "attachment_labels_Description_requiredMessage",
58
+ defaultMessage: "Please input the description",
59
+ },
60
+ attachment_labels_File: {
61
+ id: "attachment_labels_File",
62
+ defaultMessage: "File",
63
+ },
64
+ attachment_labels_uploadFileMsg: {
65
+ id: "attachment_labels_uploadFileMsg",
66
+ defaultMessage: "Click or drag file to this area to upload",
67
+ },
68
+ attachment_labels_descriptionErrorMsg: {
69
+ id: "attachment_labels_descriptionErrorMsg",
70
+ defaultMessage: "Description must not match to another file description",
71
+ },
72
+ attachment_error_fileTooLarge: {
73
+ id: "attachment_error_fileTooLarge",
74
+ defaultMessage: "File size must be less than {uploadSizeLimit}KB",
75
+ },
76
+ attachment_error_fileWrongType: {
77
+ id: "attachment_error_fileWrongType",
78
+ defaultMessage: "Wrong file type",
79
+ },
80
+ attachment_error_fileFailedToUpload: {
81
+ id: "attachment_error_fileFailedToUpload",
82
+ defaultMessage: "File failed to upload",
83
+ },
84
+ });
85
+ var Attachment = function (props) {
86
+ var fieldName = props.fieldName;
87
+ var handleRemoveFile = function () {
88
+ props.setFile([]);
89
+ props.setAttachmentFieldValidation("");
90
+ };
91
+ var normFile = function (e) {
92
+ if (Array.isArray(e)) {
93
+ return e;
94
+ }
95
+ props.setFile(e && e.fileList);
96
+ return e && e.fileList;
97
+ };
98
+ var returnOtherFieldNames = function (fn) {
99
+ switch (fn) {
100
+ case "file1":
101
+ return ["file2", "file3"];
102
+ case "file2":
103
+ return ["file1", "file3"];
104
+ case "file3":
105
+ return ["file1", "file2"];
106
+ }
107
+ };
108
+ var attachmentLabelsDescriptionErrorMsg = props.intl.formatMessage(translationMessages.attachment_labels_descriptionErrorMsg);
109
+ var verifyTheAttachment = function (info, uploadSizeLimit, formInstance) {
110
+ if (info.file.status === "removed")
111
+ return;
112
+ props.setAttachmentFieldValidation("validating");
113
+ var ifFileIsValid = (0, FileUploadUtility_1.reportIfFileIsValid)(info.file, uploadSizeLimit, {
114
+ uploadErrorToLarge: props.intl.formatMessage(translationMessages.attachment_error_fileTooLarge, { uploadSizeLimit: uploadSizeLimit / 1024 }),
115
+ uploadErrorWrongType: props.intl.formatMessage(translationMessages.attachment_error_fileWrongType),
116
+ uploadFailed: props.intl.formatMessage(translationMessages.attachment_error_fileFailedToUpload), // "failed",
117
+ });
118
+ if (!ifFileIsValid) {
119
+ formInstance.resetFields(["attachments", "".concat(props.fieldName), "file"]);
120
+ props.setAttachmentFieldValidation("error");
121
+ props.setFile([]);
122
+ }
123
+ else {
124
+ props.setAttachmentFieldValidation("success");
125
+ props.setFile([info.file]);
126
+ }
127
+ };
128
+ return (React.createElement(React.Fragment, null,
129
+ React.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemVerticalLayout, { label: props.intl.formatMessage(translationMessages.attachment_labels_File), name: ["attachments", "".concat(fieldName), "file"], valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: props.attachmentFieldValidation }),
130
+ React.createElement(antd_1.Upload.Dragger, { name: "attachment:".concat(fieldName), multiple: false, onRemove: handleRemoveFile, onChange: function (info) {
131
+ verifyTheAttachment(info, props.uploadSizeLimit, props.formInstance);
132
+ }, beforeUpload: function (file) { return false; }, fileList: props.file },
133
+ React.createElement("p", null, props.intl.formatMessage(translationMessages.attachment_labels_uploadFileMsg)))),
134
+ React.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemVerticalLayout, { label: props.intl.formatMessage(translationMessages.attachment_labels_Description), name: ["attachments", "".concat(fieldName), "description"], rules: [
135
+ {
136
+ required: props.file.length > 0,
137
+ message: props.intl.formatMessage(translationMessages.attachment_labels_Description_requiredMessage),
138
+ },
139
+ function (_a) {
140
+ var getFieldValue = _a.getFieldValue;
141
+ return ({
142
+ validator: function (rule, value) {
143
+ if (!value || getFieldValue(["attachments", returnOtherFieldNames(fieldName)[0], "description"]) !== value) {
144
+ return Promise.resolve();
145
+ }
146
+ return Promise.reject(attachmentLabelsDescriptionErrorMsg);
147
+ }
148
+ });
149
+ },
150
+ function (_a) {
151
+ var getFieldValue = _a.getFieldValue;
152
+ return ({
153
+ validator: function (rule, value) {
154
+ if (!value || getFieldValue(["attachments", returnOtherFieldNames(fieldName)[1], "description"]) !== value) {
155
+ return Promise.resolve();
156
+ }
157
+ return Promise.reject(attachmentLabelsDescriptionErrorMsg);
158
+ }
159
+ });
160
+ },
161
+ ] }),
162
+ React.createElement(antd_1.Input, null))));
163
+ };
164
+ exports.default = (0, react_intl_1.injectIntl)(React.memo(Attachment));