@unimaze/billing 0.20.17 → 0.21.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 (114) hide show
  1. package/lib/common/components/CommonTranslations.d.ts +102 -2
  2. package/lib/common/components/CommonTranslations.js +10 -1
  3. package/lib/common/components/attachments/Attachment.d.ts +6 -4
  4. package/lib/common/components/attachments/Attachment.js +26 -10
  5. package/lib/common/components/attachments/AttachmentModal.d.ts +21 -0
  6. package/lib/common/components/attachments/AttachmentModal.js +195 -0
  7. package/lib/common/components/attachments/index.d.ts +13 -17
  8. package/lib/common/components/attachments/index.js +189 -23
  9. package/lib/common/components/base-information/AccountingCost.d.ts +7 -5
  10. package/lib/common/components/base-information/AccountingCost.js +32 -11
  11. package/lib/common/components/base-information/OrderReference.d.ts +6 -4
  12. package/lib/common/components/base-information/OrderReference.js +31 -14
  13. package/lib/common/components/base-information/ProjectReference.d.ts +9 -5
  14. package/lib/common/components/base-information/ProjectReference.js +8 -6
  15. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +32 -5
  16. package/lib/common/components/base-information/ReferenceIdentifiers.js +126 -83
  17. package/lib/common/components/base-information/index.d.ts +51 -5
  18. package/lib/common/components/base-information/index.js +99 -154
  19. package/lib/common/components/billing-lines/BillingCalculations.d.ts +7 -5
  20. package/lib/common/components/billing-lines/BillingCalculations.js +79 -46
  21. package/lib/common/components/billing-lines/BillingLinePreview.d.ts +21 -0
  22. package/lib/common/components/billing-lines/BillingLinePreview.js +41 -0
  23. package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +6 -4
  24. package/lib/common/components/billing-lines/BillingTaxSummary.js +39 -13
  25. package/lib/common/components/billing-lines/NewBillingLines.d.ts +120 -4
  26. package/lib/common/components/billing-lines/NewBillingLines.js +396 -72
  27. package/lib/common/components/billing-lines/index.d.ts +33 -6
  28. package/lib/common/components/billing-lines/index.js +71 -244
  29. package/lib/common/components/component-container/Content.d.ts +2 -2
  30. package/lib/common/components/component-container/index.d.ts +1 -0
  31. package/lib/common/components/component-container/index.js +1 -1
  32. package/lib/common/components/customer/CostCenter.d.ts +6 -4
  33. package/lib/common/components/customer/CostCenter.js +25 -9
  34. package/lib/common/components/customer/CustomerContactName.d.ts +6 -4
  35. package/lib/common/components/customer/CustomerContactName.js +24 -8
  36. package/lib/common/components/customer/hardCoddedCustomer.js +19 -3
  37. package/lib/common/components/customer/index.d.ts +11 -5
  38. package/lib/common/components/customer/index.js +97 -42
  39. package/lib/common/components/date-picker/index.d.ts +21 -0
  40. package/lib/common/components/date-picker/index.js +23 -0
  41. package/lib/common/components/delivery-location/index.d.ts +6 -4
  42. package/lib/common/components/delivery-location/index.js +20 -4
  43. package/lib/common/components/editable-cell/index.js +2 -2
  44. package/lib/common/components/editable-row/index.d.ts +1 -1
  45. package/lib/common/components/editable-row/index.js +24 -7
  46. package/lib/common/components/form-item/index.d.ts +13 -6
  47. package/lib/common/components/form-item/index.js +16 -20
  48. package/lib/common/components/index.d.ts +10 -0
  49. package/lib/common/components/index.js +30 -8
  50. package/lib/common/components/input/index.d.ts +23 -0
  51. package/lib/common/components/input/index.js +37 -0
  52. package/lib/common/components/invoice/index.d.ts +40 -0
  53. package/lib/common/components/invoice/index.js +52 -0
  54. package/lib/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
  55. package/lib/common/components/invoice-preview/InvoicePreviewHeader.js +105 -0
  56. package/lib/common/components/invoice-preview/index.d.ts +16 -0
  57. package/lib/common/components/invoice-preview/index.js +393 -0
  58. package/lib/common/components/locale-intl/index.d.ts +0 -10
  59. package/lib/common/components/locale-intl/index.js +50 -42
  60. package/lib/common/components/payment-method/index.d.ts +69 -6
  61. package/lib/common/components/payment-method/index.js +145 -57
  62. package/lib/common/components/payment-method/paymentMethodForConversion.js +3 -1
  63. package/lib/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
  64. package/lib/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
  65. package/lib/common/components/submit-confirmation/index.d.ts +8 -0
  66. package/lib/common/components/submit-confirmation/index.js +34 -0
  67. package/lib/common/components/supplier/CityAutofill.d.ts +18 -0
  68. package/lib/common/components/supplier/CityAutofill.js +159 -0
  69. package/lib/common/components/supplier/index.d.ts +79 -5
  70. package/lib/common/components/supplier/index.js +195 -103
  71. package/lib/common/components/tooltip/index.d.ts +7 -0
  72. package/lib/common/components/tooltip/index.js +15 -0
  73. package/lib/common/components/welcome-modal/index.d.ts +15 -0
  74. package/lib/common/components/welcome-modal/index.js +26 -0
  75. package/lib/common/consts/formLayout.js +4 -3
  76. package/lib/common/consts/validationRules.d.ts +1 -1
  77. package/lib/common/consts/validationRules.js +6 -0
  78. package/lib/common/enums/index.js +5 -1
  79. package/lib/common/style/index.css +18 -0
  80. package/lib/common/types/BillingLineMetadataOverride.d.ts +2 -0
  81. package/lib/common/types/CommonProps.d.ts +15 -1
  82. package/lib/common/types/DiscountType.d.ts +1 -0
  83. package/lib/common/types/DiscountType.js +2 -0
  84. package/lib/common/types/ReceiverRequirements.d.ts +1 -1
  85. package/lib/common/types/ReceiverRequirements.js +1 -0
  86. package/lib/common/types/index.js +15 -0
  87. package/lib/create-invoice/IntlLoader.d.ts +0 -6
  88. package/lib/create-invoice/IntlLoader.js +78 -13
  89. package/lib/create-invoice/index.d.ts +65 -4
  90. package/lib/create-invoice/index.js +437 -181
  91. package/lib/enums.d.ts +2 -3
  92. package/lib/enums.js +1 -0
  93. package/lib/index.js +22 -6
  94. package/lib/translations/locales/en.json +181 -0
  95. package/lib/translations/locales/is.json +135 -116
  96. package/lib/translations/locales.d.ts +360 -161
  97. package/lib/translations/locales.js +3 -2
  98. package/lib/utils/ApiUtility.d.ts +4 -4
  99. package/lib/utils/ApiUtility.js +13 -10
  100. package/lib/utils/BillingLineUtility.d.ts +16 -5
  101. package/lib/utils/BillingLineUtility.js +65 -26
  102. package/lib/utils/ConversionUtility.js +15 -7
  103. package/lib/utils/FileUploadUtility.d.ts +4 -2
  104. package/lib/utils/FileUploadUtility.js +28 -9
  105. package/lib/utils/IntlUtility.d.ts +3 -2
  106. package/lib/utils/IntlUtility.js +2 -1
  107. package/lib/utils/LocationUtility.d.ts +1 -0
  108. package/lib/utils/LocationUtility.js +81 -0
  109. package/lib/utils/ReferenceIdentifierUtility.js +2 -1
  110. package/lib/utils/RequirementsUtility.d.ts +9 -7
  111. package/lib/utils/RequirementsUtility.js +46 -22
  112. package/lib/utils/index.js +4 -3
  113. package/package.json +36 -18
  114. package/lib/style/index.css +0 -51
@@ -1,277 +1,104 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
15
18
  var __importStar = (this && this.__importStar) || function (mod) {
16
19
  if (mod && mod.__esModule) return mod;
17
20
  var result = {};
18
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
19
- result["default"] = mod;
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
20
23
  return result;
21
24
  };
22
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
27
  };
25
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.translationMessages = void 0;
26
30
  var React = __importStar(require("react"));
27
- var components_1 = require("../../components");
28
- var icons_1 = require("@ant-design/icons");
29
- // import '@ant-design/compatible/assets/index.css';
30
31
  var antd_1 = require("antd");
32
+ var form_item_1 = __importDefault(require("../form-item"));
31
33
  var react_intl_1 = require("react-intl");
32
- // import {defineMessages} from "react-intl.macro"
33
34
  var NewBillingLines_1 = __importDefault(require("./NewBillingLines"));
34
35
  var BillingCalculations_1 = __importDefault(require("./BillingCalculations"));
35
- var BillingTaxSummary_1 = __importDefault(require("./BillingTaxSummary"));
36
- exports.translationMessages = react_intl_1.defineMessages({
36
+ var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
37
+ var react_use_1 = require("react-use");
38
+ var tooltip_1 = __importDefault(require("../tooltip"));
39
+ exports.translationMessages = (0, react_intl_1.defineMessages)({
37
40
  billingLines_title: {
38
41
  id: "billingLines_title",
39
42
  defaultMessage: "Document lines",
40
43
  },
41
44
  billingLines_tooltip_title: {
42
45
  id: "billingLines_tooltip_title",
43
- defaultMessage: "Item number, Name, Quantity, Unit of measure, Unit price amount Tax category and Discount need to be defined here.\n" + "VAT is automatically applied.\n" +
44
- "Click \"Add a row\" to add a new line",
46
+ defaultMessage: "Item number, Name, Quantity, Unit of measure, Unit price amount Tax category and Discount need to be defined here.\n" +
47
+ "VAT is automatically applied.\n" +
48
+ 'Click "Add a row" to add a new line', // "Hér þarf að skilgreina Vörunr, Nafn, Fjölda, Mælieiningu, Verð pr. einingu og upphæð. Virðisauki reiknast sjálfkrafa. Smelltu á \"Bæta við röð\" til þess að bæta við vörulínu",
49
+ },
50
+ baseInformation_notes: {
51
+ id: "baseInformation_notes",
52
+ defaultMessage: "Notes",
45
53
  },
46
- // billingLines_itemNo: {
47
- // id: "billingLines_itemNo",
48
- // defaultMessage: "Item no",
49
- // },
50
- // billingLines_name: {
51
- // id: "billingLines_name",
52
- // defaultMessage: "Name"
53
- // },
54
- // billingLines_quantity: {
55
- // id: "billingLines_quantity",
56
- // defaultMessage: "Quantity"
57
- // },
58
- // billingLines_unitOfMeasure: {
59
- // id: "billingLines_unitOfMeasure",
60
- // defaultMessage: "Unit of measure"
61
- // },
62
- // billingLines_unitPriceAmount: {
63
- // id: "billingLines_unitPriceAmount",
64
- // defaultMessage: "Unit price amount"
65
- // },
66
- // billingLines_taxCategoryType: {
67
- // id: "billingLines_taxCategoryType",
68
- // defaultMessage: "Tax category"
69
- // },
70
- // billingLines_taxCategoryType_title: {
71
- // id: "billingLines_taxCategoryType_title",
72
- // defaultMessage: "A product can not contain VAT unless a VAT number is present" // Ekki er hægt að leggja virðisauka á vöru nema gefa upp VSK númer
73
- // },
74
- // billingLines_taxCategoryPercentage: {
75
- // id: "billingLines_taxCategoryPercentage",
76
- // defaultMessage: "Tax percentage"
77
- // },
78
- // billingLines_discount: {
79
- // id: "billingLines_discount",
80
- // defaultMessage: "Discount"
81
- // },
82
- // billingLines_lineAmount: {
83
- // id: "billingLines_lineAmount",
84
- // defaultMessage: "Amount"
85
- // },
86
- // billingLines_taxAmount: {
87
- // id: "billingLines_taxAmount",
88
- // defaultMessage: "Tax inclusive amount"
89
- // },
90
54
  billingLines_button_addRow: {
91
55
  id: "billingLines_button_addRow",
92
- defaultMessage: "Add a row"
56
+ defaultMessage: "Add a row",
93
57
  },
94
58
  billingLines_placeholders_itemNo: {
95
59
  id: "billingLines_placeholders_itemNo",
96
- defaultMessage: "Item No"
60
+ defaultMessage: "Item No",
97
61
  },
98
62
  billingLines_placeholders_newItem: {
99
63
  id: "billingLines_placeholders_newItem",
100
- defaultMessage: "New Item"
64
+ defaultMessage: "New Item",
101
65
  },
102
66
  });
103
- var BillingLines = /** @class */ (function (_super) {
104
- __extends(BillingLines, _super);
105
- // columns: EditableColumnProps<BillingLineMetadataOverride>[];
106
- function BillingLines(props) {
107
- return _super.call(this, props) || this;
108
- // this.columns = [
109
- // {
110
- // title: this.props.intl.formatMessage(translationMessages.billingLines_itemNo),
111
- // dataIndex: 'itemNo',
112
- // editable: true,
113
- // width: "12em",
114
- // },
115
- // {
116
- // title: this.props.intl.formatMessage(translationMessages.billingLines_name),
117
- // dataIndex: 'name',
118
- // editable: true,
119
- // },
120
- // {
121
- // title: this.props.intl.formatMessage(translationMessages.billingLines_quantity),
122
- // dataIndex: 'quantity',
123
- // editable: true,
124
- // align: "right",
125
- // },
126
- // {
127
- // title: this.props.intl.formatMessage(translationMessages.billingLines_unitOfMeasure),
128
- // dataIndex: 'unitOfMeasure',
129
- // align: "right",
130
- // editable: true,
131
- // render: ((text, record) => {
132
- // return <span>{this.props.intl.formatMessage(commonTranslationMessages[`unitOfMeasure_labels_${record.unitOfMeasure.value}` as keyof typeof commonTranslationMessages])}</span>
133
- // })
134
- // },
135
- // {
136
- // title: this.props.intl.formatMessage(translationMessages.billingLines_unitPriceAmount),
137
- // dataIndex: 'unitPriceAmount',
138
- // editable: true,
139
- // align: "right",
140
- // render: (text, record) => {
141
- // return icelandicNumberLocaleWorkaroundChrome(record.unitPriceAmount ? record.unitPriceAmount : 0, props.intl);
142
- // }
143
- // // render: this.renderCurrencyColumn,
144
- // },
145
- // {
146
- // title: (
147
- // <Tooltip
148
- // title={this.props.intl.formatMessage(translationMessages.billingLines_taxCategoryType_title)}
149
- // placement={"right"}
150
- // >
151
- // <span>{this.props.intl.formatMessage(translationMessages.billingLines_taxCategoryType)}&nbsp;<QuestionCircleOutlined/></span>
152
- // </Tooltip>
153
- // ),
154
- // dataIndex: 'taxCategoryType',
155
- // align: "right",
156
- // editable: true,
157
- // render: ((text, record) => {
158
- // const taxPercentage = calculateTaxPercentage(TaxCategoryTypeEnum[record.taxCategoryType.value]);
159
- // return <span>{`${this.props.intl.formatMessage(commonTranslationMessages[`taxCategoryType_labels_${record.taxCategoryType.value}` as keyof typeof commonTranslationMessages])} (${taxPercentage}%)`}</span>
160
- // })
161
- // },
162
- // // {
163
- // // title: this.props.intl.formatMessage(translationMessages.billingLines_taxCategoryPercentage),
164
- // // dataIndex: 'taxCategoryPercentage',
165
- // // editable: false,
166
- // // align: "right",
167
- // // render: ((text, record) => {
168
- // // const taxPercentage = calculateTaxPercentage(TaxCategoryTypeEnum[record.taxCategoryType]); // BillingLineMetadataTaxCategoryTypeEnum -> TaxCategoryTypeEnum
169
- // // return <span>{taxPercentage}%</span>
170
- // // })
171
- // // },
172
- // {
173
- // title: this.props.intl.formatMessage(translationMessages.billingLines_discount),
174
- // dataIndex: 'discountValue',
175
- // editable: true,
176
- // align: "right",
177
- // width: "5em",
178
- // render: ((text, record) => {
179
- // return <div>{record.discountValue}</div>
180
- // })
181
- // },
182
- // {
183
- // title: this.props.intl.formatMessage(translationMessages.billingLines_lineAmount),
184
- // dataIndex: 'taxableAmount',
185
- // editable: false,
186
- // align: "right",
187
- // render: (text, record) => {
188
- // const taxableAmount = calculateTaxableAmount(record.discountValue, record.quantity, record.unitPriceAmount);
189
- // return (
190
- // <span>{icelandicNumberLocaleWorkaroundChrome(taxableAmount, props.intl, {style: "decimal"})}</span>
191
- // );
192
- // }
193
- // },
194
- // {
195
- // title: this.props.intl.formatMessage(translationMessages.billingLines_taxAmount),
196
- // dataIndex: 'taxInclusiveAmount',
197
- // editable: false,
198
- // align: "right",
199
- // render: (text, record) => {
200
- // const taxAmount = calculateTaxAmount(calculateTaxableAmount(record.discountValue, record.quantity, record.unitPriceAmount), calculateTaxPercentage(TaxCategoryTypeEnum[record.taxCategoryType.value])); // BillingLineMetadataTaxCategoryTypeEnum -> TaxCategoryTypeEnum
201
- // const taxableAmount = calculateTaxableAmount(record.discountValue, record.quantity, record.unitPriceAmount);
202
- // const taxInclusiveAmount = taxableAmount + taxAmount;
203
- // return (
204
- // <span>{icelandicNumberLocaleWorkaroundChrome(taxInclusiveAmount, props.intl, {style: "decimal"})}</span>
205
- // );
206
- // }
207
- // },
208
- // {
209
- // title: "",
210
- // render: (text, record) => {
211
- // return <>
212
- // <MinusCircleOutlined
213
- // onClick={() => {
214
- // this.props.handleDelete(record.key);
215
- // }}/>
216
- // </>;
217
- // }
218
- // }
219
- // ]
220
- }
221
- // renderCurrencyColumn = (text: string | number) => {
222
- // const currency = this.props.formInstance.getFieldValue(["invoice", "currencyCode"]) ? this.props.formInstance.getFieldValue(["invoice", "currencyCode"]) : "";
223
- // return text + " " + currency;
224
- // };
225
- BillingLines.prototype.render = function () {
226
- // const dataSource = this.props.formInstance.getFieldValue(["invoice", "invoiceLines"]);
227
- // const {dataSource} = this.props;
228
- // const components = {
229
- // body: {
230
- // row: EditableRow,
231
- // cell: EditableCell,
232
- // },
233
- // };
234
- // const columns: ColumnsType<BillingLineMetadataOverride> = this.columns.map(col => {
235
- // if (!col.editable) {
236
- // return col;
237
- // }
238
- // return {
239
- // ...col,
240
- // onCell: (record: BillingLineMetadataOverride) => ({
241
- // record,
242
- // editable: col.editable,
243
- // dataIndex: col.dataIndex,
244
- // title: col.title ? col.title.toString() : "", // TODO: will this work?????
245
- // handleSave: (billingLineMetadataOverrideRecord: BillingLineMetadataOverride, rowIndex: number) => this.props.handleSave(billingLineMetadataOverrideRecord, this.props.formInstance),
246
- // }),
247
- // };
248
- // });
249
- var billingLinesLabelNode = (React.createElement(antd_1.Tooltip, { title: this.props.intl.formatMessage(exports.translationMessages.billingLines_tooltip_title), placement: "right" },
250
- React.createElement("span", null,
251
- this.props.intl.formatMessage(exports.translationMessages.billingLines_title),
252
- "\u00A0",
253
- React.createElement(icons_1.QuestionCircleOutlined, null))));
254
- var currencyCode = this.props.formInstance.getFieldValue(["invoice", "currencyCode"]) ? this.props.formInstance.getFieldValue(["invoice", "currencyCode"]) : "";
255
- var billingLinesFormValues = this.props.formInstance.getFieldsValue(["invoice", "invoiceLines"]);
256
- return (React.createElement(components_1.ComponentContainer, { title: billingLinesLabelNode },
257
- React.createElement(NewBillingLines_1.default, { formInstance: this.props.formInstance, receiverRequirements: this.props.receiverRequirements, outsideVatScope: this.props.outsideVatScope }),
258
- React.createElement(antd_1.Row, { style: { marginTop: "1em" }, align: "top", justify: "space-between", gutter: [16, 16] },
259
- React.createElement(antd_1.Col, { span: 16 },
260
- React.createElement(BillingTaxSummary_1.default
261
- // billingLines={this.props.billingLinesMetadata}
262
- , {
263
- // billingLines={this.props.billingLinesMetadata}
264
- formInstance: this.props.formInstance, outsideVatScope: this.props.outsideVatScope })),
265
- React.createElement(antd_1.Col, { span: 8 },
266
- React.createElement(BillingCalculations_1.default
267
- // billingLinesMetadata={this.props.billingLinesMetadata}
268
- // renderCurrencyColumn={this.renderCurrencyColumn}
269
- , {
270
- // billingLinesMetadata={this.props.billingLinesMetadata}
271
- // renderCurrencyColumn={this.renderCurrencyColumn}
272
- currencyCode: currencyCode, formInstance: this.props.formInstance, outsideVatScope: this.props.outsideVatScope })))));
273
- };
274
- return BillingLines;
275
- }(React.Component));
276
- var BillingLinesIntl = react_intl_1.injectIntl(BillingLines);
67
+ var BillingLines = function (props) {
68
+ var _a;
69
+ var width = (0, react_use_1.useWindowSize)().width;
70
+ var _b = React.useState(false), isMobile = _b[0], setIsMobile = _b[1];
71
+ var token = antd_1.theme.useToken().token;
72
+ React.useEffect(function () {
73
+ if (width < 768) {
74
+ setIsMobile(true);
75
+ }
76
+ else {
77
+ setIsMobile(false);
78
+ }
79
+ }, [width]);
80
+ var currencyCode = props.formInstance.getFieldValue(["invoice", "currencyCode"])
81
+ ? props.formInstance.getFieldValue(["invoice", "currencyCode"])
82
+ : "";
83
+ return (React.createElement(antd_1.Flex, { justify: "center" },
84
+ React.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px", paddingBottom: isMobile ? "20px" : "35px" }, gap: "middle" },
85
+ React.createElement(antd_1.Flex, { gap: isMobile ? "small" : "middle", vertical: true, style: isMobile
86
+ ? {
87
+ width: "100vw",
88
+ backgroundColor: token.colorInfoBg,
89
+ margin: "0 -20px",
90
+ padding: "20px 20px 0 20px",
91
+ }
92
+ : { paddingTop: "20px" } },
93
+ React.createElement(antd_1.Flex, { gap: "small" },
94
+ React.createElement(antd_1.Typography.Title, { level: 5 }, props.intl.formatMessage(exports.translationMessages.billingLines_title)),
95
+ React.createElement(antd_1.Flex, { style: { marginBottom: (_a = token.Typography) === null || _a === void 0 ? void 0 : _a.titleMarginBottom } },
96
+ React.createElement(tooltip_1.default, { title: props.intl.formatMessage(exports.translationMessages.billingLines_tooltip_title) }))),
97
+ React.createElement(NewBillingLines_1.default, { formInstance: props.formInstance, receiverRequirements: props.receiverRequirements, outsideVatScope: props.outsideVatScope })),
98
+ React.createElement(antd_1.Flex, { gap: "middle", vertical: true },
99
+ React.createElement(BillingCalculations_1.default, { currencyCode: currencyCode, formInstance: props.formInstance, outsideVatScope: props.outsideVatScope }),
100
+ React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.notes, defaultLabel: props.intl.formatMessage(exports.translationMessages.baseInformation_notes), defaultIsRequired: false, fieldName: ["invoice", "notes"], style: { marginBottom: 0 } },
101
+ React.createElement(antd_1.Input.TextArea, { placeholder: props.intl.formatMessage(exports.translationMessages.baseInformation_notes) }))))));
102
+ };
103
+ var BillingLinesIntl = (0, react_intl_1.injectIntl)(BillingLines);
277
104
  exports.default = BillingLinesIntl;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { HeightProperty } from "csstype";
3
2
  interface Props {
4
- height?: HeightProperty<number>;
3
+ height?: any;
4
+ children: React.ReactNode;
5
5
  }
6
6
  declare const Content: React.FC<Props>;
7
7
  export default Content;
@@ -6,6 +6,7 @@ interface Props {
6
6
  action?: React.ReactNode;
7
7
  noPadding?: boolean;
8
8
  noHeader?: boolean;
9
+ children: React.ReactNode;
9
10
  }
10
11
  declare const ComponentContainer: React.FC<Props>;
11
12
  export default ComponentContainer;
@@ -16,7 +16,7 @@ var ComponentContainer = function (props) {
16
16
  react_1.default.createElement(antd_1.Col, { span: 24 },
17
17
  react_1.default.createElement(Header_1.default, { iconProps: iconProps, title: title, action: action }))),
18
18
  react_1.default.createElement(antd_1.Row, null,
19
- react_1.default.createElement(antd_1.Col, { span: 24, className: "" + (noPadding ? '' : 'component_wrapper_padding') },
19
+ react_1.default.createElement(antd_1.Col, { span: 24, className: "".concat(noPadding ? '' : 'component_wrapper_padding') },
20
20
  react_1.default.createElement(Content_1.default, null, props.children)))));
21
21
  };
22
22
  exports.default = ComponentContainer;
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
- import { InjectedIntlProps } from "react-intl";
2
+ import { WrappedComponentProps } from "react-intl";
3
3
  import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
4
4
  import { FormInstance } from "antd/es/form";
5
- interface Props extends InjectedIntlProps {
5
+ interface Props extends WrappedComponentProps {
6
6
  receiverRequirements: NewReceiverRequirements;
7
7
  updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void;
8
8
  rapiBaseUrl: string;
9
9
  formInstance: FormInstance;
10
10
  legalIdentifier: string;
11
11
  }
12
- declare const _default: React.ComponentClass<Pick<Props, "formInstance" | "receiverRequirements" | "updateReceiverRequirementsProp" | "rapiBaseUrl" | "legalIdentifier">, any> & {
13
- WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
12
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
13
+ forwardedRef?: React.Ref<any> | undefined;
14
+ } & React.RefAttributes<any>> & {
15
+ WrappedComponent: React.ComponentType<Props>;
14
16
  };
15
17
  export default _default;
@@ -1,9 +1,25 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __importStar = (this && this.__importStar) || function (mod) {
3
19
  if (mod && mod.__esModule) return mod;
4
20
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
7
23
  return result;
8
24
  };
9
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -108,7 +124,7 @@ var translationMessages = {
108
124
  // : {}
109
125
  //
110
126
  // return <Select
111
- // dropdownMatchSelectWidth={false}
127
+ // popupMatchSelectWidth={false}
112
128
  // allowClear
113
129
  // {...selectProps}
114
130
  // placeholder={getFieldPlaceholderOverride(receiverRequirements,AvailableFields["customer.locationIdentifier"], constCenterPlaceholderSearch)}
@@ -133,15 +149,15 @@ var translationMessages = {
133
149
  // }
134
150
  // }
135
151
  var CostCenter = function (props) {
136
- var _a = react_1.useState(""), costCenterHandlingValidationStatus = _a[0], setCostCenterHandlingValidationStatus = _a[1];
137
- var _b = react_1.useState({}), costCenterFieldProps = _b[0], setCostCenterFieldProps = _b[1];
138
- var _c = react_1.useState(false), loadingCostCenterValues = _c[0], setLoadingCostCenterValues = _c[1];
139
- var costCenterFieldDefinition = RequirementsUtility_1.getFieldRequirements(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["customer.locationIdentifier"]);
152
+ var _a = (0, react_1.useState)(""), costCenterHandlingValidationStatus = _a[0], setCostCenterHandlingValidationStatus = _a[1];
153
+ var _b = (0, react_1.useState)({}), costCenterFieldProps = _b[0], setCostCenterFieldProps = _b[1];
154
+ var _c = (0, react_1.useState)(false), loadingCostCenterValues = _c[0], setLoadingCostCenterValues = _c[1];
155
+ var costCenterFieldDefinition = (0, RequirementsUtility_1.getFieldRequirements)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["customer.locationIdentifier"]);
140
156
  if (costCenterFieldDefinition) {
141
- return (react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.locationIdentifier"], defaultLabel: props.intl.formatMessage(translationMessages.baseInformation_costCenter), defaultIsRequired: false, fieldName: ["invoice", "customer", "locationIdentifier"], validateStatus: costCenterHandlingValidationStatus }, RequirementsUtility_1.getInput(costCenterFieldDefinition, ["invoice", "customer", "locationIdentifier"], "handleCostCenterValidation", props.legalIdentifier, props.formInstance, props.rapiBaseUrl, props.receiverRequirements, props.updateReceiverRequirementsProp, setCostCenterFieldProps, costCenterFieldProps, setLoadingCostCenterValues, loadingCostCenterValues, setCostCenterHandlingValidationStatus, true)));
157
+ return (react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.locationIdentifier"], defaultLabel: props.intl.formatMessage(translationMessages.baseInformation_costCenter), defaultIsRequired: false, fieldName: ["invoice", "customer", "locationIdentifier"], validateStatus: costCenterHandlingValidationStatus }, (0, RequirementsUtility_1.getInput)(costCenterFieldDefinition, ["invoice", "customer", "locationIdentifier"], "handleCostCenterValidation", props.legalIdentifier, props.formInstance, props.rapiBaseUrl, props.receiverRequirements, props.updateReceiverRequirementsProp, setCostCenterFieldProps, costCenterFieldProps, setLoadingCostCenterValues, loadingCostCenterValues, setCostCenterHandlingValidationStatus, props.intl.formatMessage(translationMessages.baseInformation_costCenter), true)));
142
158
  }
143
159
  else {
144
160
  return null;
145
161
  }
146
162
  };
147
- exports.default = react_intl_1.injectIntl(CostCenter);
163
+ exports.default = (0, react_intl_1.injectIntl)(CostCenter);
@@ -1,15 +1,17 @@
1
1
  import * as React from 'react';
2
- import { InjectedIntlProps } from "react-intl";
2
+ import { WrappedComponentProps } from "react-intl";
3
3
  import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
4
4
  import { FormInstance } from "antd/es/form";
5
- interface CustomerContactNameProps extends InjectedIntlProps {
5
+ interface CustomerContactNameProps extends WrappedComponentProps {
6
6
  receiverRequirements: NewReceiverRequirements;
7
7
  updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void;
8
8
  rapiBaseUrl: string;
9
9
  formInstance: FormInstance;
10
10
  legalIdentifier: string;
11
11
  }
12
- declare const _default: React.ComponentClass<Pick<CustomerContactNameProps, "formInstance" | "receiverRequirements" | "updateReceiverRequirementsProp" | "rapiBaseUrl" | "legalIdentifier">, any> & {
13
- WrappedComponent: React.ComponentType<CustomerContactNameProps & InjectedIntlProps>;
12
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<CustomerContactNameProps, "intl"> & {
13
+ forwardedRef?: React.Ref<any> | undefined;
14
+ } & React.RefAttributes<any>> & {
15
+ WrappedComponent: React.ComponentType<CustomerContactNameProps>;
14
16
  };
15
17
  export default _default;
@@ -1,9 +1,25 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __importStar = (this && this.__importStar) || function (mod) {
3
19
  if (mod && mod.__esModule) return mod;
4
20
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
7
23
  return result;
8
24
  };
9
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -23,15 +39,15 @@ var translationMessages = {
23
39
  },
24
40
  };
25
41
  var CustomerContactName = function (props) {
26
- var _a = react_1.useState(""), customerContactNameHandlingValidationStatus = _a[0], setCustomerContactNameHandlingValidationStatus = _a[1];
27
- var _b = react_1.useState({}), customerContactNameFieldProps = _b[0], setCustomerContactNameFieldProps = _b[1];
28
- var _c = react_1.useState(false), loadingCustomerContactNameValues = _c[0], setLoadingCustomerContactNameValues = _c[1];
29
- var customerContactNameFieldDefinition = RequirementsUtility_1.getFieldRequirements(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["customer.contact.name"]);
42
+ var _a = (0, react_1.useState)(""), customerContactNameHandlingValidationStatus = _a[0], setCustomerContactNameHandlingValidationStatus = _a[1];
43
+ var _b = (0, react_1.useState)({}), customerContactNameFieldProps = _b[0], setCustomerContactNameFieldProps = _b[1];
44
+ var _c = (0, react_1.useState)(false), loadingCustomerContactNameValues = _c[0], setLoadingCustomerContactNameValues = _c[1];
45
+ var customerContactNameFieldDefinition = (0, RequirementsUtility_1.getFieldRequirements)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["customer.contact.name"]);
30
46
  if (customerContactNameFieldDefinition) {
31
- return (React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.contact.name"], defaultLabel: props.intl.formatMessage(translationMessages.baseInformation_customerContactName), defaultIsRequired: false, fieldName: ["invoice", "customer", "contact", "name"], validateStatus: customerContactNameHandlingValidationStatus }, RequirementsUtility_1.getInput(customerContactNameFieldDefinition, ["invoice", "customer", "contact", "name"], "handleCostCenterValidation", props.legalIdentifier, props.formInstance, props.rapiBaseUrl, props.receiverRequirements, props.updateReceiverRequirementsProp, setCustomerContactNameFieldProps, customerContactNameFieldProps, setLoadingCustomerContactNameValues, loadingCustomerContactNameValues, setCustomerContactNameHandlingValidationStatus, true)));
47
+ return (React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.contact.name"], defaultIsRequired: false, fieldName: ["invoice", "customer", "contact", "name"], validateStatus: customerContactNameHandlingValidationStatus }, (0, RequirementsUtility_1.getInput)(customerContactNameFieldDefinition, ["invoice", "customer", "contact", "name"], "handleCostCenterValidation", props.legalIdentifier, props.formInstance, props.rapiBaseUrl, props.receiverRequirements, props.updateReceiverRequirementsProp, setCustomerContactNameFieldProps, customerContactNameFieldProps, setLoadingCustomerContactNameValues, loadingCustomerContactNameValues, setCustomerContactNameHandlingValidationStatus, props.intl.formatMessage(translationMessages.baseInformation_customerContactName), true)));
32
48
  }
33
49
  else {
34
50
  return null;
35
51
  }
36
52
  };
37
- exports.default = react_intl_1.injectIntl(CustomerContactName);
53
+ exports.default = (0, react_intl_1.injectIntl)(CustomerContactName);
@@ -1,9 +1,25 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __importStar = (this && this.__importStar) || function (mod) {
3
19
  if (mod && mod.__esModule) return mod;
4
20
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
7
23
  return result;
8
24
  };
9
25
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -17,7 +33,7 @@ var Customer = function (props) {
17
33
  " (",
18
34
  participantLegalIsoIdentifier,
19
35
  ")"),
20
- React.createElement("div", null, participantLegalAddressPostalCode + " " + participantLegalAddressCity),
36
+ React.createElement("div", null, "".concat(participantLegalAddressPostalCode, " ").concat(participantLegalAddressCity)),
21
37
  React.createElement("div", null, participantLegalAddressStreet),
22
38
  React.createElement("div", null, country),
23
39
  React.createElement("div", null, email)));
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { InjectedIntlProps } from "react-intl";
1
+ import React from "react";
2
+ import { WrappedComponentProps } from "react-intl";
3
3
  import { FormInstance } from "antd/es/form";
4
4
  import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
5
5
  import { ProfileOutputWithApiKey } from "../../types/AppConfiguration";
6
6
  import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
7
- interface Props extends InjectedIntlProps {
7
+ interface Props extends WrappedComponentProps {
8
8
  receiverRequirements: NewReceiverRequirements;
9
9
  customers: ProfileOutputWithApiKey[];
10
10
  formInstance: FormInstance;
@@ -13,8 +13,14 @@ interface Props extends InjectedIntlProps {
13
13
  setChosenCustomerApiKey: (chosenCustomerApiKey: string) => void;
14
14
  rapiBaseUrl: string;
15
15
  updateReceiverRequirementsProp: (newReceiverRequirements: NewReceiverRequirements) => void;
16
+ validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
17
+ isSaveFieldValuesSelected: boolean;
18
+ onSaveFieldValuesChange: () => void;
19
+ isActiveStep: boolean;
16
20
  }
17
- declare const CustomerIntl: React.ComponentClass<Pick<Props, "formInstance" | "receiverRequirements" | "updateReceiverRequirementsProp" | "rapiBaseUrl" | "customers" | "chosenCustomer" | "setChosenCustomer" | "setChosenCustomerApiKey">, any> & {
18
- WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
21
+ declare const CustomerIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
22
+ forwardedRef?: React.Ref<any> | undefined;
23
+ } & React.RefAttributes<any>> & {
24
+ WrappedComponent: React.ComponentType<Props>;
19
25
  };
20
26
  export default CustomerIntl;