@unimaze/billing 0.21.46 → 0.21.48
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.
- package/lib/common/components/billing-lines/CurrencySelector.d.ts +1 -3
- package/lib/common/components/billing-lines/CurrencySelector.js +45 -8
- package/lib/common/components/billing-lines/NewBillingLines.js +0 -8
- package/lib/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
- package/lib/common/components/billing-lines/NewNewBillingLines.js +36 -0
- package/lib/common/components/billing-lines/SingleBillingLine.js +9 -5
- package/lib/common/components/billing-lines/cwdwdw.d.ts +1 -0
- package/lib/common/components/billing-lines/cwdwdw.js +14 -0
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +109 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +110 -0
- package/lib/translations/locales/is.json +1 -1
- package/lib/unimaze-api-clients/src/mapi/api.d.ts +6664 -0
- package/lib/unimaze-api-clients/src/mapi/api.js +4743 -0
- package/lib/unimaze-api-clients/src/mapi/base.d.ts +55 -0
- package/lib/unimaze-api-clients/src/mapi/base.js +84 -0
- package/lib/unimaze-api-clients/src/mapi/configuration.d.ts +63 -0
- package/lib/unimaze-api-clients/src/mapi/configuration.js +28 -0
- package/lib/unimaze-api-clients/src/mapi/index.d.ts +13 -0
- package/lib/unimaze-api-clients/src/mapi/index.js +30 -0
- package/lib/unimaze-api-clients/src/rapi/api.d.ts +5015 -0
- package/lib/unimaze-api-clients/src/rapi/api.js +5582 -0
- package/lib/unimaze-api-clients/src/rapi/base.d.ts +55 -0
- package/lib/unimaze-api-clients/src/rapi/base.js +84 -0
- package/lib/unimaze-api-clients/src/rapi/configuration.d.ts +63 -0
- package/lib/unimaze-api-clients/src/rapi/configuration.js +28 -0
- package/lib/unimaze-api-clients/src/rapi/index.d.ts +13 -0
- package/lib/unimaze-api-clients/src/rapi/index.js +30 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +74 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.js +78 -0
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +20 -0
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.js +164 -0
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +206 -0
- package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +27 -0
- package/lib/unimaze-billing/src/common/components/attachments/index.js +214 -0
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.js +61 -0
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +16 -0
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.js +58 -0
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.js +30 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +53 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +328 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +77 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.js +186 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +151 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +24 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +61 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +13 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +133 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.d.ts +20 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.js +17 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.d.ts +10 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.js +16 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +134 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +209 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.js +36 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +19 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +275 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.js +15 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +49 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/index.js +104 -0
- package/lib/unimaze-billing/src/common/components/component-container/Content.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/component-container/Content.js +13 -0
- package/lib/unimaze-billing/src/common/components/component-container/Header.d.ts +9 -0
- package/lib/unimaze-billing/src/common/components/component-container/Header.js +28 -0
- package/lib/unimaze-billing/src/common/components/component-container/index.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/component-container/index.js +22 -0
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.js +163 -0
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.js +53 -0
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.js +41 -0
- package/lib/unimaze-billing/src/common/components/customer/index.d.ts +26 -0
- package/lib/unimaze-billing/src/common/components/customer/index.js +166 -0
- package/lib/unimaze-billing/src/common/components/date-picker/index.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/date-picker/index.js +23 -0
- package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/delivery-location/index.js +89 -0
- package/lib/unimaze-billing/src/common/components/editable-cell/index.d.ts +0 -0
- package/lib/unimaze-billing/src/common/components/editable-cell/index.js +295 -0
- package/lib/unimaze-billing/src/common/components/editable-row/index.d.ts +5 -0
- package/lib/unimaze-billing/src/common/components/editable-row/index.js +59 -0
- package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +35 -0
- package/lib/unimaze-billing/src/common/components/form-item/index.js +60 -0
- package/lib/unimaze-billing/src/common/components/index.d.ts +18 -0
- package/lib/unimaze-billing/src/common/components/index.js +42 -0
- package/lib/unimaze-billing/src/common/components/input/index.d.ts +23 -0
- package/lib/unimaze-billing/src/common/components/input/index.js +37 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +42 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.js +59 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +75 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +73 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +104 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +93 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +77 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +58 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +52 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +102 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +196 -0
- package/lib/unimaze-billing/src/common/components/locale-intl/index.d.ts +0 -0
- package/lib/unimaze-billing/src/common/components/locale-intl/index.js +51 -0
- package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +76 -0
- package/lib/unimaze-billing/src/common/components/payment-method/index.js +356 -0
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.d.ts +8 -0
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.js +37 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.d.ts +8 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.js +34 -0
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +18 -0
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.js +159 -0
- package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +94 -0
- package/lib/unimaze-billing/src/common/components/supplier/index.js +334 -0
- package/lib/unimaze-billing/src/common/components/tooltip/index.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/tooltip/index.js +15 -0
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +15 -0
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.js +26 -0
- package/lib/unimaze-billing/src/common/consts/formLayout.d.ts +74 -0
- package/lib/unimaze-billing/src/common/consts/formLayout.js +45 -0
- package/lib/unimaze-billing/src/common/consts/validationRules.d.ts +6 -0
- package/lib/unimaze-billing/src/common/consts/validationRules.js +69 -0
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.d.ts +5 -0
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.js +8 -0
- package/lib/unimaze-billing/src/common/enums/index.d.ts +1 -0
- package/lib/unimaze-billing/src/common/enums/index.js +8 -0
- package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +26 -0
- package/lib/unimaze-billing/src/common/types/AppConfiguration.js +2 -0
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.d.ts +10 -0
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.js +2 -0
- package/lib/unimaze-billing/src/common/types/CommonProps.d.ts +33 -0
- package/lib/unimaze-billing/src/common/types/CommonProps.js +2 -0
- package/lib/unimaze-billing/src/common/types/DiscountType.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/DiscountType.js +2 -0
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.js +2 -0
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.d.ts +27 -0
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.js +2 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +83 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +393 -0
- package/lib/unimaze-billing/src/common/types/SupplierInfo.d.ts +11 -0
- package/lib/unimaze-billing/src/common/types/SupplierInfo.js +2 -0
- package/lib/unimaze-billing/src/common/types/index.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/index.js +17 -0
- package/lib/unimaze-billing/src/create-credit-note/index.d.ts +9 -0
- package/lib/unimaze-billing/src/create-credit-note/index.js +62 -0
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.d.ts +11 -0
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.js +116 -0
- package/lib/unimaze-billing/src/create-invoice/index.d.ts +82 -0
- package/lib/unimaze-billing/src/create-invoice/index.js +710 -0
- package/lib/unimaze-billing/src/enums.d.ts +14 -0
- package/lib/unimaze-billing/src/enums.js +18 -0
- package/lib/unimaze-billing/src/index.d.ts +4 -0
- package/lib/unimaze-billing/src/index.js +28 -0
- package/lib/unimaze-billing/src/translations/locales/en.json +183 -0
- package/lib/unimaze-billing/src/translations/locales/is.json +183 -0
- package/lib/unimaze-billing/src/translations/locales.d.ts +369 -0
- package/lib/unimaze-billing/src/translations/locales.js +11 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +29 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.js +133 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +25 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.js +190 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.js +222 -0
- package/lib/unimaze-billing/src/utils/FileUploadUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/FileUploadUtility.js +45 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +6 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.js +78 -0
- package/lib/unimaze-billing/src/utils/LocationUtility.d.ts +1 -0
- package/lib/unimaze-billing/src/utils/LocationUtility.js +81 -0
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.d.ts +7 -0
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.js +26 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +21 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.js +237 -0
- package/lib/unimaze-billing/src/utils/index.d.ts +2 -0
- package/lib/unimaze-billing/src/utils/index.js +8 -0
- package/lib/utils/RequirementsUtility.d.ts +3 -2
- package/lib/utils/RequirementsUtility.js +12 -2
- package/package.json +1 -1
- package/lib/style/index.css +0 -51
|
@@ -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,74 @@
|
|
|
1
|
+
export declare const commonTranslationMessages: {
|
|
2
|
+
taxCategoryType_label: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
};
|
|
6
|
+
unitOfMeasure_labels_Piece: {
|
|
7
|
+
id: string;
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
};
|
|
10
|
+
unitOfMeasure_labels_Kilogram: {
|
|
11
|
+
id: string;
|
|
12
|
+
defaultMessage: string;
|
|
13
|
+
};
|
|
14
|
+
unitOfMeasure_labels_Month: {
|
|
15
|
+
id: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
};
|
|
18
|
+
unitOfMeasure_labels_Package: {
|
|
19
|
+
id: string;
|
|
20
|
+
defaultMessage: string;
|
|
21
|
+
};
|
|
22
|
+
unitOfMeasure_labels_Year: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
};
|
|
26
|
+
unitOfMeasure_labels_Day: {
|
|
27
|
+
id: string;
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
};
|
|
30
|
+
unitOfMeasure_labels_Hour: {
|
|
31
|
+
id: string;
|
|
32
|
+
defaultMessage: string;
|
|
33
|
+
};
|
|
34
|
+
unitOfMeasure_labels_Kilometre: {
|
|
35
|
+
id: string;
|
|
36
|
+
defaultMessage: string;
|
|
37
|
+
};
|
|
38
|
+
unitOfMeasure_labels_Metre: {
|
|
39
|
+
id: string;
|
|
40
|
+
defaultMessage: string;
|
|
41
|
+
};
|
|
42
|
+
unitOfMeasure_labels_Litre: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
};
|
|
46
|
+
unitOfMeasure_labels_SquareMetre: {
|
|
47
|
+
id: string;
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
};
|
|
50
|
+
unitOfMeasure_labels_CubicMetre: {
|
|
51
|
+
id: string;
|
|
52
|
+
defaultMessage: string;
|
|
53
|
+
};
|
|
54
|
+
unitOfMeasure_labels_Tonne: {
|
|
55
|
+
id: string;
|
|
56
|
+
defaultMessage: string;
|
|
57
|
+
};
|
|
58
|
+
unitOfMeasure_labels_KiloWattHour: {
|
|
59
|
+
id: string;
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
};
|
|
62
|
+
unitOfMeasure_labels_One: {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
};
|
|
66
|
+
saveInformation_label: {
|
|
67
|
+
id: string;
|
|
68
|
+
defaultMessage: string;
|
|
69
|
+
};
|
|
70
|
+
missingRequiredData: {
|
|
71
|
+
id: string;
|
|
72
|
+
defaultMessage: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
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_label: {
|
|
7
|
+
id: "taxCategoryType_label",
|
|
8
|
+
defaultMessage: "{taxCategoryType, select , StandardRated {Standard rated} ReducedRated {Reduced rated} ZeroRated {Zero rated} Exempt {Exempt} OutsideTaxScope {Outside tax scope} ReverseCharged {Reverse charged} FreeExportTaxNotCharged {Free export tax not charged} ExemptEuropeanEconomicArea {Exempt European economic area} ExemptionForResale {Exemption for resale} other {taxCategoryType}}",
|
|
9
|
+
},
|
|
10
|
+
unitOfMeasure_labels_Piece: {
|
|
11
|
+
id: "unitOfMeasure_labels_Piece",
|
|
12
|
+
defaultMessage: "Piece",
|
|
13
|
+
},
|
|
14
|
+
unitOfMeasure_labels_Kilogram: {
|
|
15
|
+
id: "unitOfMeasure_labels_Kilogram",
|
|
16
|
+
defaultMessage: "Kilogram",
|
|
17
|
+
},
|
|
18
|
+
unitOfMeasure_labels_Month: {
|
|
19
|
+
id: "unitOfMeasure_labels_Month",
|
|
20
|
+
defaultMessage: "Month",
|
|
21
|
+
},
|
|
22
|
+
unitOfMeasure_labels_Package: {
|
|
23
|
+
id: "unitOfMeasure_labels_Package",
|
|
24
|
+
defaultMessage: "Package",
|
|
25
|
+
},
|
|
26
|
+
unitOfMeasure_labels_Year: {
|
|
27
|
+
id: "unitOfMeasure_labels_Year",
|
|
28
|
+
defaultMessage: "Year",
|
|
29
|
+
},
|
|
30
|
+
unitOfMeasure_labels_Day: {
|
|
31
|
+
id: "unitOfMeasure_labels_Day",
|
|
32
|
+
defaultMessage: "Day",
|
|
33
|
+
},
|
|
34
|
+
unitOfMeasure_labels_Hour: {
|
|
35
|
+
id: "unitOfMeasure_labels_Hour",
|
|
36
|
+
defaultMessage: "Hour",
|
|
37
|
+
},
|
|
38
|
+
unitOfMeasure_labels_Kilometre: {
|
|
39
|
+
id: "unitOfMeasure_labels_Kilometre",
|
|
40
|
+
defaultMessage: "Kilometre",
|
|
41
|
+
},
|
|
42
|
+
unitOfMeasure_labels_Metre: {
|
|
43
|
+
id: "unitOfMeasure_labels_Metre",
|
|
44
|
+
defaultMessage: "Metre",
|
|
45
|
+
},
|
|
46
|
+
unitOfMeasure_labels_Litre: {
|
|
47
|
+
id: "unitOfMeasure_labels_Litre",
|
|
48
|
+
defaultMessage: "Litre",
|
|
49
|
+
},
|
|
50
|
+
unitOfMeasure_labels_SquareMetre: {
|
|
51
|
+
id: "unitOfMeasure_labels_SquareMetre",
|
|
52
|
+
defaultMessage: "Square metre",
|
|
53
|
+
},
|
|
54
|
+
unitOfMeasure_labels_CubicMetre: {
|
|
55
|
+
id: "unitOfMeasure_labels_CubicMetre",
|
|
56
|
+
defaultMessage: "Cubic metre",
|
|
57
|
+
},
|
|
58
|
+
unitOfMeasure_labels_Tonne: {
|
|
59
|
+
id: "unitOfMeasure_labels_Tonne",
|
|
60
|
+
defaultMessage: "Tonne",
|
|
61
|
+
},
|
|
62
|
+
unitOfMeasure_labels_KiloWattHour: {
|
|
63
|
+
id: "unitOfMeasure_labels_KiloWattHour",
|
|
64
|
+
defaultMessage: "KiloWatt hour",
|
|
65
|
+
},
|
|
66
|
+
unitOfMeasure_labels_One: {
|
|
67
|
+
id: "unitOfMeasure_labels_One",
|
|
68
|
+
defaultMessage: "Unit",
|
|
69
|
+
},
|
|
70
|
+
saveInformation_label: {
|
|
71
|
+
id: "saveInformation_label",
|
|
72
|
+
defaultMessage: "Save information",
|
|
73
|
+
},
|
|
74
|
+
missingRequiredData: {
|
|
75
|
+
id: "missingRequiredData",
|
|
76
|
+
defaultMessage: "Missing required data:",
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -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>;
|
|
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));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
import { FormInstance } from "antd/es/form";
|
|
4
|
+
import { UploadFile } from "antd/es/upload/interface";
|
|
5
|
+
import { AttachmentType } from ".";
|
|
6
|
+
interface AttachmentModalProps extends WrappedComponentProps {
|
|
7
|
+
isModalOpen: boolean;
|
|
8
|
+
setIsModalOpen: (isModalOpen: boolean) => void;
|
|
9
|
+
attachments: AttachmentType[];
|
|
10
|
+
setAttachments: (attachments: AttachmentType[]) => void;
|
|
11
|
+
uploadSizeLimit: number;
|
|
12
|
+
formInstance: FormInstance;
|
|
13
|
+
onRemove: (file: UploadFile) => void;
|
|
14
|
+
onSave: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<AttachmentModalProps, "intl"> & {
|
|
17
|
+
forwardedRef?: React.Ref<any>;
|
|
18
|
+
} & React.RefAttributes<any>> & {
|
|
19
|
+
WrappedComponent: React.ComponentType<AttachmentModalProps>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|