@unimaze/billing 0.5.0-sjova.0 → 0.6.0-rc.0

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 (71) hide show
  1. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +8 -2
  2. package/lib/common/components/base-information/ReferenceIdentifiers.js +100 -25
  3. package/lib/common/components/base-information/index.d.ts +5 -1
  4. package/lib/common/components/base-information/index.js +28 -71
  5. package/lib/common/components/billing-lines/NewBillingLines.d.ts +3 -1
  6. package/lib/common/components/billing-lines/NewBillingLines.js +8 -8
  7. package/lib/common/components/customer/index.d.ts +3 -1
  8. package/lib/common/components/customer/index.js +1 -1
  9. package/lib/common/components/delivery-location/index.d.ts +6 -2
  10. package/lib/common/components/delivery-location/index.js +5 -24
  11. package/lib/common/components/form-item/index.d.ts +4 -2
  12. package/lib/common/components/form-item/index.js +3 -4
  13. package/lib/common/components/payment-method/index.d.ts +3 -1
  14. package/lib/common/components/payment-method/index.js +60 -24
  15. package/lib/common/components/supplier/index.d.ts +3 -1
  16. package/lib/common/components/supplier/index.js +9 -45
  17. package/lib/common/types/AppConfiguration.d.ts +11 -1
  18. package/lib/common/types/CommonProps.d.ts +3 -0
  19. package/lib/common/types/NewReceiverRequirements.d.ts +25 -0
  20. package/lib/common/types/NewReceiverRequirements.js +2 -0
  21. package/lib/common/types/ReceiverRequirements.d.ts +0 -1
  22. package/lib/common/types/ReceiverRequirements.js +318 -310
  23. package/lib/create-credit-note/index.d.ts +4 -3
  24. package/lib/create-credit-note/index.js +1 -1
  25. package/lib/create-invoice/IntlLoader.js +1 -1
  26. package/lib/create-invoice/index.d.ts +1 -1
  27. package/lib/create-invoice/index.js +28 -8
  28. package/lib/example/src/index.d.ts +1 -0
  29. package/lib/src/common/components/attachments/Attachment.d.ts +18 -0
  30. package/lib/src/common/components/attachments/index.d.ts +6 -0
  31. package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +18 -0
  32. package/lib/src/common/components/base-information/index.d.ts +13 -0
  33. package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  34. package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  35. package/lib/src/common/components/billing-lines/index.d.ts +28 -0
  36. package/lib/src/common/components/component-container/Content.d.ts +7 -0
  37. package/lib/src/common/components/component-container/Header.d.ts +9 -0
  38. package/lib/src/common/components/component-container/index.d.ts +11 -0
  39. package/lib/src/common/components/customer/index.d.ts +18 -0
  40. package/lib/src/common/components/delivery-location/index.d.ts +10 -0
  41. package/lib/src/common/components/editable-cell/index.d.ts +15 -0
  42. package/lib/src/common/components/editable-row/index.d.ts +5 -0
  43. package/lib/src/common/components/form-item/index.d.ts +28 -0
  44. package/lib/src/common/components/index.d.ts +10 -0
  45. package/lib/src/common/components/payment-method/index.d.ts +11 -0
  46. package/lib/src/common/components/payment-method/paymentMethodForConversion.d.ts +9 -0
  47. package/lib/src/common/components/supplier/index.d.ts +12 -0
  48. package/lib/src/common/consts/formLayout.d.ts +74 -0
  49. package/lib/src/common/consts/validationRules.d.ts +6 -0
  50. package/lib/src/common/types/ReceiverRequirements.d.ts +80 -0
  51. package/lib/src/create-invoice/IntlLoader.d.ts +14 -0
  52. package/lib/src/create-invoice/index.d.ts +11 -0
  53. package/lib/src/translations/locales.d.ts +142 -0
  54. package/lib/src/utils/ApiUtility.d.ts +21 -0
  55. package/lib/src/utils/BillingLineUtility.d.ts +10 -0
  56. package/lib/src/utils/ConversionUtility.d.ts +8 -0
  57. package/lib/src/utils/IntlUtility.d.ts +4 -0
  58. package/lib/src/utils/RequirementsUtility.d.ts +6 -0
  59. package/lib/src/utils/index.d.ts +2 -0
  60. package/lib/translations/locales/is.json +3 -3
  61. package/lib/translations/locales.d.ts +3 -3
  62. package/lib/utils/BillingLineUtility.d.ts +1 -1
  63. package/lib/utils/ReferenceIdentifierUtility.d.ts +6 -0
  64. package/lib/utils/ReferenceIdentifierUtility.js +24 -0
  65. package/lib/utils/RequirementsUtility.d.ts +5 -4
  66. package/lib/utils/RequirementsUtility.js +42 -17
  67. package/package.json +2 -2
  68. package/lib/utils/FileUploadUtility.d.ts +0 -7
  69. package/lib/utils/FileUploadUtility.js +0 -26
  70. package/lib/utils/FormatingUtility.d.ts +0 -2
  71. package/lib/utils/FormatingUtility.js +0 -6
@@ -54,7 +54,7 @@ var CreateInvoice = function (props) {
54
54
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 12 } }),
55
55
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 12 } }),
56
56
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 }, xl: { span: 8 } },
57
- react_1.default.createElement(components_1.BaseInformation, { form: form, documentType: "creditNote" })),
57
+ react_1.default.createElement(components_1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: form, documentType: "creditNote", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl })),
58
58
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 }, xl: { span: 16 } }),
59
59
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 }, xl: { span: 24 } }),
60
60
  react_1.default.createElement(antd_1.Col, { span: 24 },
@@ -44,6 +44,6 @@ var CreateInvoice = function (props) {
44
44
  react_intl_1.addLocaleData(en_1.default.concat(sr_1.default, is_1.default));
45
45
  return (react_1.default.createElement(antd_1.ConfigProvider, { locale: andLocale, componentSize: "small" },
46
46
  react_1.default.createElement(react_intl_1.IntlProvider, { locale: languageString, defaultLocale: "en", key: languageString, messages: locales_1.default[languageString] },
47
- react_1.default.createElement(index_1.default, { customers: props.customers, language: languageString, mapiBaseUrl: props.mapiBaseUrl, rapiBaseUrl: props.rapiBaseUrl }))));
47
+ react_1.default.createElement(index_1.default, { customers: props.customers, language: languageString, mapiBaseUrl: props.mapiBaseUrl, rapiBaseUrl: props.rapiBaseUrl, receiverRequirements: props.receiverRequirements, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp }))));
48
48
  };
49
49
  exports.default = CreateInvoice;
@@ -5,7 +5,7 @@ import { CommonProps } from "../common/types/CommonProps";
5
5
  interface Props extends CommonProps, InjectedIntlProps {
6
6
  customers: ProfileOutputWithApiKey[];
7
7
  }
8
- declare const _default: React.ComponentClass<Pick<Props, "customers" | "language" | "mapiBaseUrl" | "rapiBaseUrl">, any> & {
8
+ declare const _default: React.ComponentClass<Pick<Props, "receiverRequirements" | "updateReceiverRequirementsProp" | "rapiBaseUrl" | "customers" | "language" | "mapiBaseUrl">, any> & {
9
9
  WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
10
10
  };
11
11
  export default _default;
@@ -206,6 +206,25 @@ var CreateInvoiceConstructor = function (props) {
206
206
  console.log(error.config);
207
207
  });
208
208
  };
209
+ var defaultCustomer;
210
+ if (props.customers.length === 1 && !chosenCustomer) {
211
+ defaultCustomer = props.customers[0];
212
+ setChosenCustomer({
213
+ contact: {
214
+ electronicMail: defaultCustomer.email,
215
+ telephone: defaultCustomer.phoneNumber,
216
+ },
217
+ address: {
218
+ countryCode: defaultCustomer.country,
219
+ city: defaultCustomer.participantLegalAddressCity,
220
+ postalZone: defaultCustomer.participantLegalAddressPostalCode,
221
+ streetNameAndNumber: defaultCustomer.participantLegalAddressStreet,
222
+ },
223
+ identifier: defaultCustomer.participantLegalIsoIdentifier,
224
+ name: defaultCustomer.name
225
+ });
226
+ setChosenCustomerApiKey(props.customers[0].apiKey);
227
+ }
209
228
  return (react_1.default.createElement(antd_1.Spin, { spinning: submitting },
210
229
  react_1.default.createElement(antd_1.Form, __assign({}, formLayout_1.formItemLayout, { form: form, onFinish: handleSubmit, initialValues: {
211
230
  invoice: {
@@ -215,27 +234,28 @@ var CreateInvoiceConstructor = function (props) {
215
234
  countryCode: "IS"
216
235
  },
217
236
  },
218
- customer: {
219
- address: {
237
+ customer: __assign({}, chosenCustomer, { address: {
220
238
  countryCode: "IS"
221
- },
222
- },
239
+ } }),
223
240
  paymentMeans: {
224
241
  type: "DomesticClaim",
225
242
  },
243
+ referenceIdentifiers: [
244
+ {}
245
+ ],
226
246
  },
227
247
  } }),
228
248
  react_1.default.createElement(antd_1.Row, { gutter: [16, 16] },
229
249
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
230
- react_1.default.createElement(components_1.BaseInformation, { form: form, documentType: "invoice" })),
250
+ react_1.default.createElement(components_1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl })),
231
251
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
232
- react_1.default.createElement(components_1.Supplier, { billingLinesDataSource: billingLinesDataSource })),
252
+ react_1.default.createElement(components_1.Supplier, { receiverRequirements: props.receiverRequirements, billingLinesDataSource: billingLinesDataSource })),
233
253
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
234
- react_1.default.createElement(components_1.Customer, { formInstance: form, customers: props.customers, chosenCustomer: chosenCustomer, setChosenCustomer: setChosenCustomer, setChosenCustomerApiKey: setChosenCustomerApiKey })),
254
+ react_1.default.createElement(components_1.Customer, { receiverRequirements: props.receiverRequirements, formInstance: form, customers: props.customers, chosenCustomer: chosenCustomer, setChosenCustomer: setChosenCustomer, setChosenCustomerApiKey: setChosenCustomerApiKey })),
235
255
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 } },
236
256
  react_1.default.createElement(components_1.BillingLines, { setBillingLineMetadata: handleSetBillingLineMetadata, formInstance: form, dataSource: billingLinesDataSource, editableIndex: billingLinesEditableIndex, handleAdd: handleBillingLinesAdd, initialBillingLineData: initialBillingLineData, handleDelete: handleBillingLinesDelete, handleSave: handleBillingLinesSave })),
237
257
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
238
- react_1.default.createElement(components_1.PaymentMethod, { formInstance: form })),
258
+ react_1.default.createElement(components_1.PaymentMethod, { receiverRequirements: props.receiverRequirements, formInstance: form })),
239
259
  react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 16 } },
240
260
  react_1.default.createElement(components_1.Attachments, null)),
241
261
  react_1.default.createElement(antd_1.Row, { style: { width: "100%", padding: "8px" }, justify: "end" },
@@ -0,0 +1 @@
1
+ import "antd/dist/antd.compact.css";
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ interface Props extends InjectedIntlProps {
4
+ fieldName: "file1" | "file2" | "file3";
5
+ }
6
+ interface States {
7
+ file: any[];
8
+ }
9
+ declare class Attachment extends React.Component<Props, States> {
10
+ constructor(props: Props);
11
+ handleRemoveFile: () => void;
12
+ normFile: (e: any) => any;
13
+ render(): JSX.Element;
14
+ }
15
+ declare const _default: React.ComponentClass<Pick<Props & React.RefAttributes<Attachment>, "ref" | "key" | "fieldName">, any> & {
16
+ WrappedComponent: React.ComponentType<Props & React.RefAttributes<Attachment> & InjectedIntlProps>;
17
+ };
18
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ declare const AttachmentGroupIntl: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
4
+ WrappedComponent: React.ComponentType<InjectedIntlProps>;
5
+ };
6
+ export default AttachmentGroupIntl;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { InjectedIntlProps } from "react-intl";
3
+ import { StoreValue } from "rc-field-form/lib/interface";
4
+ interface FieldData {
5
+ name: number;
6
+ key: number;
7
+ fieldKey: number;
8
+ }
9
+ export declare const translationMessages: ReactIntl.Messages<"referenceIdentifiers_labels_addButton" | "referenceIdentifiers_labels_referenceIdentifier" | "referenceIdentifiers_labels_referenceIdentifier_title" | "referenceIdentifiers_labels_carNumber" | "referenceIdentifiers_labels_identifier" | "referenceIdentifiers_labels_propertyNumber">;
10
+ interface Props extends InjectedIntlProps {
11
+ fields: FieldData[];
12
+ add: (defaultValue?: StoreValue) => void;
13
+ remove: (index: number) => void;
14
+ }
15
+ declare const _default: React.ComponentClass<Pick<Props, "remove" | "fields" | "add">, any> & {
16
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
17
+ };
18
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { FormInstance } from "antd/es/form";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
5
+ interface Props extends InjectedIntlProps {
6
+ receiverRequirements: NewReceiverRequirements;
7
+ form: FormInstance;
8
+ documentType: "creditNote" | "invoice";
9
+ }
10
+ declare const BaseInformationIntl: React.ComponentClass<Pick<Props, "form" | "receiverRequirements" | "documentType">, any> & {
11
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
12
+ };
13
+ export default BaseInformationIntl;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ interface Props extends InjectedIntlProps {
5
+ billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
6
+ currencyCode: string;
7
+ }
8
+ declare const _default: React.ComponentClass<Pick<Props, "currencyCode" | "billingLinesMetadata">, any> & {
9
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ interface Props extends InjectedIntlProps {
5
+ billingLines: BillingLineMetadataOverride[] | undefined;
6
+ }
7
+ declare const _default: React.ComponentClass<Pick<Props, "billingLines">, any> & {
8
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { BillingLineMetadata } from "@unimaze/api-clients/lib/mapi/models";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
5
+ import { FormInstance } from "antd/es/form";
6
+ export interface TaxCategoryTypeWithPercentageEnum {
7
+ value: "StandardRated" | "ReducedRated" | "ZeroRated" | "Exempt";
8
+ label: string;
9
+ }
10
+ export interface UnitOfMeasureLabelInValueEnum {
11
+ value: "Piece" | "Kilogram" | "Month" | "Package" | "Year" | "Day" | "Hour" | "Kilometre" | "Metre" | "Litre" | "SquareMetre" | "CubicMetre" | "Tonne" | "KiloWattHour" | "One" | "Rec20" | "Rec21";
12
+ label: string;
13
+ }
14
+ interface Props extends InjectedIntlProps {
15
+ formInstance: FormInstance;
16
+ setBillingLineMetadata: (formInstance: FormInstance, billingLineMetadata: BillingLineMetadata[]) => void;
17
+ dataSource: BillingLineMetadataOverride[];
18
+ handleDelete: (index: number) => void;
19
+ handleAdd: (billingLineToAdd: BillingLineMetadataOverride) => void;
20
+ handleSave: (row: BillingLineMetadataOverride, formInstance: FormInstance) => void;
21
+ initialBillingLineData: BillingLineMetadataOverride;
22
+ editableIndex: number;
23
+ }
24
+ export declare const translationMessages: ReactIntl.Messages<"billingLines_title" | "billingLines_tooltip_title" | "billingLines_itemNo" | "billingLines_name" | "billingLines_quantity" | "billingLines_unitOfMeasure" | "billingLines_unitPriceAmount" | "billingLines_taxCategoryType" | "billingLines_taxCategoryType_title" | "billingLines_taxCategoryPercentage" | "billingLines_discount" | "billingLines_lineAmount" | "billingLines_taxAmount" | "billingLines_button_addRow" | "billingLines_placeholders_itemNo" | "billingLines_placeholders_newItem">;
25
+ declare const BillingLinesIntl: React.ComponentClass<Pick<Props, "formInstance" | "setBillingLineMetadata" | "dataSource" | "handleDelete" | "handleAdd" | "handleSave" | "initialBillingLineData" | "editableIndex">, any> & {
26
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
27
+ };
28
+ export default BillingLinesIntl;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { HeightProperty } from "csstype";
3
+ interface Props {
4
+ height?: HeightProperty<number>;
5
+ }
6
+ declare const Content: React.FC<Props>;
7
+ export default Content;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { IconProps } from "@ant-design/compatible/es/icon";
3
+ interface HeaderProps {
4
+ iconProps?: IconProps;
5
+ title?: string | React.ReactNode;
6
+ action?: React.ReactNode;
7
+ }
8
+ declare const Header: React.FC<HeaderProps>;
9
+ export default Header;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IconProps } from "@ant-design/compatible/es/icon";
3
+ interface Props {
4
+ iconProps?: IconProps;
5
+ title?: string | React.ReactNode;
6
+ action?: React.ReactNode;
7
+ noPadding?: boolean;
8
+ noHeader?: boolean;
9
+ }
10
+ declare const ComponentContainer: React.FC<Props>;
11
+ export default ComponentContainer;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ import { FormInstance } from "antd/es/form";
4
+ import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
5
+ import { ProfileOutputWithApiKey } from "../../types/AppConfiguration";
6
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
7
+ interface Props extends InjectedIntlProps {
8
+ receiverRequirements: NewReceiverRequirements;
9
+ customers: ProfileOutputWithApiKey[];
10
+ formInstance: FormInstance;
11
+ chosenCustomer: PartyMetadata | undefined;
12
+ setChosenCustomer: (chosenCustomer: PartyMetadata) => void;
13
+ setChosenCustomerApiKey: (chosenCustomerApiKey: string) => void;
14
+ }
15
+ declare const CustomerIntl: React.ComponentClass<Pick<Props, "customers" | "receiverRequirements" | "chosenCustomer" | "setChosenCustomer" | "setChosenCustomerApiKey" | "formInstance">, any> & {
16
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
17
+ };
18
+ export default CustomerIntl;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
4
+ interface Props extends InjectedIntlProps {
5
+ receiverRequirements: NewReceiverRequirements;
6
+ }
7
+ declare const DeliveryLocationIntl: React.ComponentClass<Pick<Props, "receiverRequirements">, any> & {
8
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
9
+ };
10
+ export default DeliveryLocationIntl;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ export declare const commonTranslationMessages: ReactIntl.Messages<"taxCategoryType_labels_StandardRated" | "taxCategoryType_labels_ReducedRated" | "taxCategoryType_labels_ZeroRated" | "taxCategoryType_labels_Exempt" | "unitOfMeasure_labels_Piece" | "unitOfMeasure_labels_Kilogram" | "unitOfMeasure_labels_Month" | "unitOfMeasure_labels_Package" | "unitOfMeasure_labels_Year" | "unitOfMeasure_labels_Day" | "unitOfMeasure_labels_Hour" | "unitOfMeasure_labels_Kilometre" | "unitOfMeasure_labels_Metre" | "unitOfMeasure_labels_Litre" | "unitOfMeasure_labels_SquareMetre" | "unitOfMeasure_labels_CubicMetre" | "unitOfMeasure_labels_Tonne" | "unitOfMeasure_labels_KiloWattHour" | "unitOfMeasure_labels_One">;
5
+ interface EditableCellProps extends InjectedIntlProps {
6
+ record: BillingLineMetadataOverride;
7
+ handleSave: (billingLineMetadata: BillingLineMetadataOverride) => void;
8
+ dataIndex: keyof Omit<BillingLineMetadataOverride, 'key'>;
9
+ editable: boolean;
10
+ index: number;
11
+ }
12
+ declare const EditableCellIntl: React.ComponentClass<Pick<EditableCellProps, "handleSave" | "record" | "dataIndex" | "editable" | "index">, any> & {
13
+ WrappedComponent: React.ComponentType<EditableCellProps & InjectedIntlProps>;
14
+ };
15
+ 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>;
4
+ declare const EditableRow: ({ index, ...props }: any) => JSX.Element;
5
+ export default EditableRow;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { AvailableFields } from "../../types/ReceiverRequirements";
3
+ import { NamePath, Rule } from "rc-field-form/lib/interface";
4
+ import { InjectedIntlProps } from "react-intl";
5
+ import { FormItemProps } from "antd/lib/form/FormItem";
6
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
7
+ export declare const translationMessages: ReactIntl.Messages<"formItem_required_errorMessage">;
8
+ interface StringMap {
9
+ [key: string]: string;
10
+ }
11
+ interface Props extends InjectedIntlProps, FormItemProps {
12
+ receiverRequirements: NewReceiverRequirements;
13
+ receiverRequirementsKey: AvailableFields;
14
+ defaultLabel: React.ReactNode | string;
15
+ defaultLabelTooltip?: React.ReactNode;
16
+ defaultIsRequired: boolean;
17
+ fieldName: NamePath;
18
+ additionalRules?: Rule[];
19
+ style?: React.CSSProperties;
20
+ initialValue?: StringMap;
21
+ verticalLabels?: boolean;
22
+ onlyLabelOnFirstInList?: boolean;
23
+ index?: number;
24
+ }
25
+ declare const _default: React.ComponentClass<Pick<Props, "label" | "style" | "children" | "receiverRequirements" | "name" | "prefixCls" | "className" | "id" | "onReset" | "validateTrigger" | "required" | "index" | "dependencies" | "getValueFromEvent" | "normalize" | "rules" | "shouldUpdate" | "trigger" | "validateFirst" | "valuePropName" | "getValueProps" | "messageVariables" | "initialValue" | "isListField" | "htmlFor" | "fieldName" | "receiverRequirementsKey" | "defaultLabel" | "defaultLabelTooltip" | "defaultIsRequired" | "additionalRules" | "verticalLabels" | "onlyLabelOnFirstInList" | "noStyle" | "hasFeedback" | "validateStatus" | "fieldKey" | "colon" | "labelAlign" | "labelCol" | "wrapperCol" | "help" | "extra">, any> & {
26
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
27
+ };
28
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export { default as Attachments } from "./attachments";
2
+ export { default as BaseInformation } from "./base-information";
3
+ export { default as BillingLines } from "./billing-lines";
4
+ export { default as ComponentContainer } from "./component-container";
5
+ export { default as Customer } from "./customer";
6
+ export { default as DeliveryLocation } from "./delivery-location";
7
+ export { default as EditableCell } from "./editable-cell";
8
+ export { default as EditableRow } from "./editable-row";
9
+ export { default as PaymentMethod } from "./payment-method";
10
+ export { default as Supplier } from "./supplier";
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ import { FormInstance } from "antd/es/form";
4
+ export declare const translationMessages: ReactIntl.Messages<"paymentMethod_title" | "paymentMethod_labels_domesticTransfer_bankNo" | "paymentMethod_labels_domesticTransfer_accountType" | "paymentMethod_labels_domesticTransfer_accountNo" | "paymentMethod_labels_domesticTransfer_paymentReference" | "paymentMethod_labels_icelandicClaim_bankNo" | "paymentMethod_labels_icelandicClaim_claimNo" | "paymentMethod_labels_methods_undefined" | "paymentMethod_labels_methods_mutuallyAgreed" | "paymentMethod_labels_methods_domesticTransfer" | "paymentMethod_labels_methods_domesticClaim" | "paymentMethod_rules_number" | "paymentMethod_rules_Length">;
5
+ interface Props extends InjectedIntlProps {
6
+ formInstance: FormInstance;
7
+ }
8
+ declare const _default: React.ComponentClass<Pick<Props, "formInstance">, any> & {
9
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { PaymentMeansType } from "@unimaze/api-clients/lib/mapi";
2
+ import { TransferMetadata, ClaimMetadata } from '@unimaze/api-clients/lib/mapi/models';
3
+ import { Store } from 'antd/es/form/interface';
4
+ export interface IPaymentMeans {
5
+ type: PaymentMeansType;
6
+ domesticTransfer?: TransferMetadata | undefined;
7
+ domesticClaim?: ClaimMetadata | undefined;
8
+ }
9
+ export declare const PaymentMethodFormData: (formData: Store) => IPaymentMeans;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
4
+ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
5
+ interface Props extends InjectedIntlProps {
6
+ receiverRequirements: NewReceiverRequirements;
7
+ billingLinesDataSource: BillingLineMetadataOverride[];
8
+ }
9
+ declare const SupplierIntl: React.ComponentClass<Pick<Props, "receiverRequirements" | "billingLinesDataSource">, any> & {
10
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
11
+ };
12
+ export default SupplierIntl;
@@ -0,0 +1,74 @@
1
+ declare const formItemLayout: {
2
+ labelCol: {
3
+ xs: {
4
+ span: number;
5
+ };
6
+ sm: {
7
+ span: number;
8
+ };
9
+ md: {
10
+ span: number;
11
+ };
12
+ lg: {
13
+ span: number;
14
+ };
15
+ xxl: {
16
+ span: number;
17
+ };
18
+ };
19
+ wrapperCol: {
20
+ xs: {
21
+ span: number;
22
+ };
23
+ sm: {
24
+ span: number;
25
+ };
26
+ md: {
27
+ span: number;
28
+ };
29
+ lg: {
30
+ span: number;
31
+ };
32
+ xxl: {
33
+ span: number;
34
+ };
35
+ };
36
+ };
37
+ declare const formItemVerticalLayout: {
38
+ labelCol: {
39
+ span: number;
40
+ };
41
+ wrapperCol: {
42
+ span: number;
43
+ };
44
+ };
45
+ declare const fullWidthInput: {
46
+ wrapperCol: {
47
+ span: number;
48
+ };
49
+ };
50
+ declare const formItemLayoutWithOutLabel: {
51
+ wrapperCol: {
52
+ xs: {
53
+ span: number;
54
+ offset: number;
55
+ };
56
+ sm: {
57
+ span: number;
58
+ offset: number;
59
+ };
60
+ md: {
61
+ span: number;
62
+ offset: number;
63
+ };
64
+ lg: {
65
+ span: number;
66
+ offset: number;
67
+ };
68
+ xxl: {
69
+ span: number;
70
+ offset: number;
71
+ };
72
+ };
73
+ };
74
+ export { formItemLayout, formItemVerticalLayout, fullWidthInput, formItemLayoutWithOutLabel };
@@ -0,0 +1,6 @@
1
+ import { BillingLineMetadataOverride } from "../types/BillingLineMetadataOverride";
2
+ import { RuleObject } from "rc-field-form/lib/interface";
3
+ export declare type ValidationRulesObject = {
4
+ [key in keyof Omit<BillingLineMetadataOverride, 'key'>]: RuleObject[];
5
+ };
6
+ export declare const validationRules: ValidationRulesObject;
@@ -0,0 +1,80 @@
1
+ interface Values {
2
+ key?: string;
3
+ label?: string;
4
+ values?: Values[];
5
+ }
6
+ interface FieldRequirement extends Values {
7
+ isRequired: boolean;
8
+ }
9
+ declare type ReceiverRequirements = {
10
+ [key in AvailableFields]?: FieldRequirement;
11
+ };
12
+ export declare enum AvailableFields {
13
+ "invoiceNo" = "invoiceNo",
14
+ "issueDate" = "issueDate",
15
+ "dueDate" = "dueDate",
16
+ "graceDate" = "graceDate",
17
+ "currencyCode" = "currencyCode",
18
+ "notes" = "notes",
19
+ "accountingCost" = "accountingCost",
20
+ "buyerReference" = "buyerReference",
21
+ "orderReference.documentNo" = "orderReference.documentNo",
22
+ "billingReferences.invoices" = "billingReferences.invoices",
23
+ "billingReferences.documentNo" = "billingReferences.documentNo",
24
+ "billingReferences.issueDate" = "billingReferences.issueDate",
25
+ "billingReferences.creditNotes" = "billingReferences.creditNotes",
26
+ "referenceIdentifiers.type" = "referenceIdentifiers.type",
27
+ "referenceIdentifiers.code" = "referenceIdentifiers.code",
28
+ "referenceIdentifiers.value" = "referenceIdentifiers.value",
29
+ "referenceIdentifiers" = "referenceIdentifiers",
30
+ "supplier.vatNumber" = "supplier.vatNumber",
31
+ "supplier.address.streetNameAndNumber" = "supplier.address.streetNameAndNumber",
32
+ "supplier.address.city" = "supplier.address.city",
33
+ "supplier.address.postalZone" = "supplier.address.postalZone",
34
+ "supplier.address.countryCode" = "supplier.address.countryCode",
35
+ "supplier.contact.name" = "supplier.contact.name",
36
+ "supplier.contact.electronicMail" = "supplier.contact.electronicMail",
37
+ "supplier.contact.telephone" = "supplier.contact.telephone",
38
+ "supplier.name" = "supplier.name",
39
+ "supplier.identifier" = "supplier.identifier",
40
+ "customer.address.streetNameAndNumber" = "customer.address.streetNameAndNumber",
41
+ "customer.address.city" = "customer.address.city",
42
+ "customer.address.postalZone" = "customer.address.postalZone",
43
+ "customer.address.countryCode" = "customer.address.countryCode",
44
+ "customer.contact.name" = "customer.contact.name",
45
+ "customer.contact.electronicMail" = "customer.contact.electronicMail",
46
+ "customer.contact.telephone" = "customer.contact.telephone",
47
+ "customer.name" = "customer.name",
48
+ "customer.identifier" = "customer.identifier",
49
+ "customer.locationIdentifier" = "customer.locationIdentifier",
50
+ "payee.name" = "payee.name",
51
+ "payee.identifier" = "payee.identifier",
52
+ "payee.sepaBankIdentification" = "payee.sepaBankIdentification",
53
+ "invoiceLines.itemNo" = "invoiceLines.itemNo",
54
+ "invoiceLines.name" = "invoiceLines.name",
55
+ "invoiceLines.quantity" = "invoiceLines.quantity",
56
+ "invoiceLines.uniteOfMeasure.unit" = "invoiceLines.unitOfMeasure.unit",
57
+ "invoiceLines.uniteOfMeasure.code" = "invoiceLines.unitOfMeasure.code",
58
+ "invoiceLines.unitPriceAmount" = "invoiceLines.unitPriceAmount",
59
+ "invoiceLines.taxCategoryType" = "invoiceLines.taxCategoryType",
60
+ "invoiceLines.taxableAmount" = "invoiceLines.taxableAmount",
61
+ "invoiceLines.taxAmount" = "invoiceLines.taxAmount",
62
+ "invoiceLines.taxPercentage" = "invoiceLines.taxPercentage",
63
+ "invoiceLines.discountValue" = "invoiceLines.discountValue",
64
+ "paymentTerms.note" = "paymentTerms.note",
65
+ "paymentMeans.type" = "paymentMeans.type",
66
+ "paymentMeans.internationalTransfer" = "paymentMeans.internationalTransfer",
67
+ "paymentMeans.domesticTransfer" = "paymentMeans.domesticTransfer",
68
+ "paymentMeans.domesticClaim" = "paymentMeans.domesticClaim",
69
+ "delivery.partyName" = "delivery.partyName",
70
+ "delivery.locationIdentifier" = "delivery.locationIdentifier",
71
+ "delivery.address.streetNameAndNumber" = "delivery.address.streetNameAndNumber",
72
+ "delivery.address.city" = "delivery.address.city",
73
+ "delivery.address.postalZone" = "delivery.address.postalZone",
74
+ "delivery.address.countryCode" = "delivery.address.countryCode",
75
+ "delivery.actualDeliveryDate" = "delivery.actualDeliveryDate",
76
+ "prepaidAmount" = "prepaidAmount",
77
+ "payableAmount" = "payableAmount",
78
+ "payableRoundingAmount" = "payableRoundingAmount"
79
+ }
80
+ export { ReceiverRequirements, FieldRequirement };
@@ -0,0 +1,14 @@
1
+ import "../style/index.css";
2
+ import React from "react";
3
+ import { CommonProps } from "../common/types/CommonProps";
4
+ import { ProfileOutputWithApiKey } from "../common/types/AppConfiguration";
5
+ interface Props extends CommonProps {
6
+ customers: ProfileOutputWithApiKey[];
7
+ }
8
+ /**
9
+ * Component for creating a form for creating an invoice and submitting it to the MAPI transaction services
10
+ *
11
+ * @component
12
+ */
13
+ declare const CreateInvoice: React.FC<Props>;
14
+ export default CreateInvoice;
@@ -0,0 +1,11 @@
1
+ import { ProfileOutputWithApiKey } from "../common/types/AppConfiguration";
2
+ import React from "react";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ import { CommonProps } from "../common/types/CommonProps";
5
+ interface Props extends CommonProps, InjectedIntlProps {
6
+ customers: ProfileOutputWithApiKey[];
7
+ }
8
+ declare const _default: React.ComponentClass<Pick<Props, "customers" | "language" | "mapiBaseUrl" | "rapiBaseUrl" | "receiverRequirements">, any> & {
9
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
10
+ };
11
+ export default _default;