@unimaze/billing 0.1.2-rc.10 → 0.1.2-rc.3

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 (95) hide show
  1. package/README.md +3 -11
  2. package/lib/common/components/attachments/Attachment.d.ts +2 -8
  3. package/lib/common/components/attachments/Attachment.js +7 -33
  4. package/lib/common/components/attachments/index.d.ts +2 -9
  5. package/lib/common/components/attachments/index.js +6 -15
  6. package/lib/common/components/base-information/index.d.ts +3 -6
  7. package/lib/common/components/base-information/index.js +81 -100
  8. package/lib/common/components/billing-lines/index.d.ts +20 -6
  9. package/lib/common/components/billing-lines/index.js +22 -106
  10. package/lib/common/components/component-container/style/index.d.ts +1 -0
  11. package/lib/common/components/component-container/style/index.js +3 -0
  12. package/lib/common/components/delivery-location/index.d.ts +2 -5
  13. package/lib/common/components/delivery-location/index.js +11 -43
  14. package/lib/common/components/editable-cell/index.js +9 -7
  15. package/lib/common/components/index.d.ts +5 -10
  16. package/lib/common/components/index.js +8 -20
  17. package/lib/common/components/issuer/index.d.ts +7 -0
  18. package/lib/common/components/{customer/hardCoddedCustomer.js → issuer/index.js} +8 -5
  19. package/lib/common/components/payer/index.d.ts +3 -0
  20. package/lib/common/components/payer/index.js +51 -0
  21. package/lib/common/components/payment-method/index.d.ts +3 -6
  22. package/lib/common/components/payment-method/index.js +17 -57
  23. package/lib/common/consts/validationRules.js +7 -0
  24. package/lib/common/enums/index.d.ts +1 -1
  25. package/lib/common/enums/index.js +4 -2
  26. package/lib/common/types/ReceiverRequirements.d.ts +17 -72
  27. package/lib/common/types/ReceiverRequirements.js +14 -350
  28. package/lib/create-credit-note/index.d.ts +2 -1
  29. package/lib/create-credit-note/index.js +11 -5
  30. package/lib/create-invoice/index.d.ts +2 -1
  31. package/lib/create-invoice/index.js +17 -77
  32. package/lib/example/src/index.d.ts +1 -1
  33. package/lib/index.js +0 -5
  34. package/lib/src/common/components/base-information/index.d.ts +3 -6
  35. package/lib/src/common/components/billing-lines/index.d.ts +20 -6
  36. package/lib/src/common/components/delivery-location/index.d.ts +2 -5
  37. package/lib/src/common/components/issuer/index.d.ts +7 -0
  38. package/lib/src/common/components/payer/index.d.ts +3 -0
  39. package/lib/src/common/components/payment-method/index.d.ts +3 -6
  40. package/lib/src/common/types/ReceiverRequirements.d.ts +17 -72
  41. package/lib/src/create-invoice/index.d.ts +2 -1
  42. package/lib/src/utils/ApiUtility.d.ts +1 -8
  43. package/lib/src/utils/ConversionUtility.d.ts +2 -3
  44. package/lib/src/utils/index.d.ts +1 -1
  45. package/lib/style/index.css +1222 -0
  46. package/lib/style/index.d.ts +1 -0
  47. package/lib/style/index.js +3 -0
  48. package/lib/utils/ApiUtility.d.ts +1 -8
  49. package/lib/utils/ApiUtility.js +1 -17
  50. package/lib/utils/ConversionUtility.d.ts +2 -3
  51. package/lib/utils/ConversionUtility.js +62 -116
  52. package/lib/utils/index.d.ts +1 -1
  53. package/lib/utils/index.js +0 -1
  54. package/package.json +7 -12
  55. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +0 -6
  56. package/lib/common/components/base-information/ReferenceIdentifiers.js +0 -40
  57. package/lib/common/components/billing-lines/BillingCalculations.d.ts +0 -11
  58. package/lib/common/components/billing-lines/BillingCalculations.js +0 -61
  59. package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +0 -10
  60. package/lib/common/components/billing-lines/BillingTaxSummary.js +0 -51
  61. package/lib/common/components/billing-lines/billingLIneFormData.d.ts +0 -7
  62. package/lib/common/components/billing-lines/billingLIneFormData.js +0 -63
  63. package/lib/common/components/customer/hardCoddedCustomer.d.ts +0 -7
  64. package/lib/common/components/customer/index.d.ts +0 -6
  65. package/lib/common/components/customer/index.js +0 -93
  66. package/lib/common/components/form-item/index.d.ts +0 -21
  67. package/lib/common/components/form-item/index.js +0 -27
  68. package/lib/common/components/locale-intl/index.d.ts +0 -10
  69. package/lib/common/components/locale-intl/index.js +0 -45
  70. package/lib/common/components/supplier/index.d.ts +0 -6
  71. package/lib/common/components/supplier/index.js +0 -93
  72. package/lib/src/common/components/attachments/Attachment.d.ts +0 -21
  73. package/lib/src/common/components/attachments/index.d.ts +0 -10
  74. package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +0 -6
  75. package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +0 -11
  76. package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +0 -10
  77. package/lib/src/common/components/billing-lines/billingLIneFormData.d.ts +0 -7
  78. package/lib/src/common/components/customer/index.d.ts +0 -6
  79. package/lib/src/common/components/form-item/index.d.ts +0 -21
  80. package/lib/src/common/components/index.d.ts +0 -10
  81. package/lib/src/common/components/locale-intl/index.d.ts +0 -10
  82. package/lib/src/common/components/supplier/index.d.ts +0 -6
  83. package/lib/src/translations/locales.d.ts +0 -74
  84. package/lib/src/utils/BillingLineUtility.d.ts +0 -8
  85. package/lib/src/utils/RequirementsUtility.d.ts +0 -5
  86. package/lib/src/utils/billingLineFormData.d.ts +0 -7
  87. package/lib/translations/locales/is.json +0 -70
  88. package/lib/translations/locales.d.ts +0 -74
  89. package/lib/translations/locales.js +0 -10
  90. package/lib/utils/BillingLineUtility.d.ts +0 -8
  91. package/lib/utils/BillingLineUtility.js +0 -66
  92. package/lib/utils/RequirementsUtility.d.ts +0 -5
  93. package/lib/utils/RequirementsUtility.js +0 -23
  94. package/lib/utils/billingLineFormData.d.ts +0 -7
  95. package/lib/utils/billingLineFormData.js +0 -63
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { wapi2 } from "@unimaze/api-clients";
3
+ interface Props {
4
+ issuer: wapi2.ProfileOutput;
5
+ }
6
+ declare const Issuer: React.FC<Props>;
7
+ export default Issuer;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const Payer: React.FC;
3
+ export default Payer;
@@ -1,6 +1,3 @@
1
- import React from 'react';
2
- import { InjectedIntlProps } from "react-intl";
3
- declare const _default: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
4
- WrappedComponent: React.ComponentType<InjectedIntlProps>;
5
- };
6
- export default _default;
1
+ /// <reference types="react" />
2
+ declare const PaymentMethod: () => JSX.Element;
3
+ export default PaymentMethod;
@@ -1,81 +1,26 @@
1
- interface Values {
2
- key?: string;
3
- label?: string;
4
- values?: Values[];
1
+ interface KeyValuePair {
2
+ key: string;
3
+ value: string;
5
4
  }
6
- interface FieldRequirement extends Values {
5
+ interface FieldRequirement {
6
+ label: string;
7
+ key: string;
7
8
  isRequired: boolean;
9
+ values?: KeyValuePair[];
8
10
  }
9
11
  declare type ReceiverRequirements = {
10
12
  [key in AvailableFields]?: FieldRequirement;
11
13
  };
12
14
  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.priceAmount" = "invoiceLines.priceAmount",
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"
15
+ 'invoiceNo' = "invoiceNo",
16
+ 'issueDate' = "issueDate",
17
+ 'dueDate' = "dueDate",
18
+ 'currencyCode' = "currencyCode",
19
+ 'payer.name' = "payer.name",
20
+ 'payer.identifier' = "payer.identifier",
21
+ 'customer.name' = "customer.name",
22
+ 'customer.identifier' = "customer.identifier"
79
23
  }
80
- export { ReceiverRequirements, FieldRequirement };
24
+ export { ReceiverRequirements };
81
25
  export declare const receiverRequirementsObject: ReceiverRequirements;
26
+ export declare const getReceiverRequirements: (recRequirements: ReceiverRequirements, key: AvailableFields) => FieldRequirement;
@@ -1,9 +1,10 @@
1
+ import "antd/dist/antd.compact.css";
1
2
  import "../style/index.css";
2
3
  import React from "react";
3
4
  import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
4
5
  import { CommonProps } from "../common/types/CommonProps";
5
6
  interface Props extends CommonProps {
6
- customer: ProfileOutput;
7
+ issuer: ProfileOutput;
7
8
  }
8
9
  /**
9
10
  * Component for creating a form for creating an invoice and submitting it to the MAPI transaction services
@@ -10,12 +10,5 @@ interface CreateSubmitInvoice {
10
10
  services?: string[];
11
11
  invoiceMetadataInput?: InvoiceMetadataInput;
12
12
  }
13
- interface AttachDocument {
14
- messageId: string;
15
- name: string;
16
- contentType: string;
17
- more: boolean;
18
- }
19
- declare const submitDocument: (data: any, attachDocument: AttachDocument, mapiBaseUrl: string, apiKey?: string | undefined) => AxiosPromise<mapi.MessageOutput>;
20
13
  declare const submitInvoice: (createSubmitInvoice: CreateSubmitInvoice, mapiBaseUrl: string, apiKey?: string | undefined, callName?: string | undefined, language?: LanguageProp) => AxiosPromise<mapi.MessageOutput>;
21
- export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument };
14
+ export { submitInvoice, CreateSubmitInvoice };
@@ -1,5 +1,4 @@
1
- import { BillingLineMetadata, InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
1
+ import { InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
2
2
  import { Store } from "antd/es/form/interface";
3
- import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
4
- declare const convertToInvoiceMetadataInput: (formValues: Store, billingLines: BillingLineMetadata[], customer?: ProfileOutput | undefined) => InvoiceMetadataInput;
3
+ declare const convertToInvoiceMetadataInput: (formValues: Store) => InvoiceMetadataInput;
5
4
  export { /*convertToCreditNoteMetadataInput,*/ convertToInvoiceMetadataInput };
@@ -1,2 +1,2 @@
1
1
  export { convertToInvoiceMetadataInput } from "./ConversionUtility";
2
- export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument } from "./ApiUtility";
2
+ export { submitInvoice, CreateSubmitInvoice } from "./ApiUtility";