@unimaze/billing 1.0.1 → 2.0.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.
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { AttachmentType } from "./index";
3
+ import { UploadFile } from "antd/es/upload/interface";
4
+ interface Props {
5
+ attachments: AttachmentType[];
6
+ setIsModalOpen: (isModalOpen: boolean) => void;
7
+ removeFile: (file: UploadFile) => void;
8
+ }
9
+ declare const ListAttachments: React.FC<Props>;
10
+ export default ListAttachments;
@@ -0,0 +1,143 @@
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
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
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);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ var React = __importStar(require("react"));
63
+ var antd_1 = require("antd");
64
+ var icons_1 = require("@ant-design/icons");
65
+ var index_1 = require("./index");
66
+ var react_intl_1 = require("react-intl");
67
+ var FileUploadUtility_1 = require("../../../utils/FileUploadUtility");
68
+ var ListAttachments = function (_a) {
69
+ var attachments = _a.attachments, setIsModalOpen = _a.setIsModalOpen, removeFile = _a.removeFile;
70
+ var _b = React.useState(false), previewOpen = _b[0], setPreviewOpen = _b[1];
71
+ var _c = React.useState(undefined), previewImage = _c[0], setPreviewImage = _c[1];
72
+ var _d = React.useState(""), previewDescription = _d[0], setPreviewDescription = _d[1];
73
+ var _e = React.useState(""), previewPDFUrl = _e[0], setPreviewPDFUrl = _e[1];
74
+ var intl = (0, react_intl_1.useIntl)();
75
+ var token = antd_1.theme.useToken().token;
76
+ var handlePreview = function (file, description) { return __awaiter(void 0, void 0, void 0, function () {
77
+ var reader, _a;
78
+ return __generator(this, function (_b) {
79
+ switch (_b.label) {
80
+ case 0:
81
+ if (!file.originFileObj)
82
+ return [2 /*return*/];
83
+ if (!(file.type === "application/pdf")) return [3 /*break*/, 1];
84
+ reader = new FileReader();
85
+ reader.onload = function (e) {
86
+ var blob = file.originFileObj ? new Blob([file.originFileObj], { type: "application/pdf" }) : null;
87
+ if (blob) {
88
+ var url = URL.createObjectURL(blob);
89
+ setPreviewPDFUrl(url);
90
+ }
91
+ };
92
+ reader.readAsArrayBuffer(file.originFileObj);
93
+ return [3 /*break*/, 4];
94
+ case 1:
95
+ if (!(!file.url && !file.preview)) return [3 /*break*/, 3];
96
+ _a = file;
97
+ return [4 /*yield*/, (0, FileUploadUtility_1.getBase64)(file.originFileObj)];
98
+ case 2:
99
+ _a.preview = (_b.sent());
100
+ _b.label = 3;
101
+ case 3:
102
+ setPreviewImage(file.url || file.preview);
103
+ _b.label = 4;
104
+ case 4:
105
+ setPreviewDescription(description);
106
+ setPreviewOpen(true);
107
+ return [2 /*return*/];
108
+ }
109
+ });
110
+ }); };
111
+ var handleClosePreview = function () {
112
+ if (previewPDFUrl) {
113
+ URL.revokeObjectURL(previewPDFUrl);
114
+ setPreviewPDFUrl("");
115
+ }
116
+ if (previewImage) {
117
+ setPreviewImage("");
118
+ }
119
+ setPreviewDescription("");
120
+ setPreviewOpen(false);
121
+ };
122
+ return (React.createElement(React.Fragment, null,
123
+ React.createElement(antd_1.Flex, { vertical: true, gap: "small" },
124
+ React.createElement(antd_1.Flex, { vertical: true },
125
+ React.createElement(antd_1.Typography.Text, { disabled: true }, intl.formatMessage(index_1.translationMessages.attachment_title))),
126
+ React.createElement(antd_1.Divider, { style: { padding: 0, margin: 0 } }),
127
+ attachments.map(function (attachment) { return (React.createElement(antd_1.Flex, { key: attachment.uid, gap: "middle", justify: "space-between" },
128
+ React.createElement(antd_1.Button, { type: "link", onClick: function () { return handlePreview(attachment.file, attachment.description); }, style: { padding: 0 }, size: "small" },
129
+ React.createElement(icons_1.PaperClipOutlined, { style: { fontSize: token.fontSizeIcon } }),
130
+ attachment.file.name),
131
+ React.createElement(antd_1.Flex, { gap: "middle" },
132
+ React.createElement(icons_1.EditOutlined, { style: { fontSize: token.fontSizeHeading4 }, onClick: function () {
133
+ setIsModalOpen(true);
134
+ } }),
135
+ React.createElement(icons_1.DeleteOutlined, { style: { fontSize: token.fontSizeHeading4 }, onClick: function () {
136
+ removeFile(attachment.file);
137
+ } })))); })),
138
+ React.createElement(antd_1.Modal, { open: previewOpen, onCancel: handleClosePreview, footer: null },
139
+ previewPDFUrl && (React.createElement("iframe", { src: previewPDFUrl, style: { width: "100%", height: "700px", maxHeight: "75vh" } })),
140
+ previewImage && React.createElement(antd_1.Image, { src: previewImage, preview: false }),
141
+ React.createElement(antd_1.Typography.Text, null, previewDescription))));
142
+ };
143
+ exports.default = ListAttachments;
@@ -90,9 +90,9 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
90
90
  },
91
91
  });
92
92
  var ReferenceIdentifiers = function (props) {
93
- var _a, _b, _c, _d, _e, _f;
94
- var _g = (0, react_1.useState)([]), referenceIdentifierValue = _g[0], setReferenceIdentifierValue = _g[1];
95
- var _h = (0, react_1.useState)(false), loadingReferenceIdentifierValues = _h[0], setLoadingReferenceIdentifierValues = _h[1]; // TODO: change this to boolean[] for handling the list
93
+ var _a, _b, _c, _d, _e;
94
+ var _f = (0, react_1.useState)([]), referenceIdentifierValue = _f[0], setReferenceIdentifierValue = _f[1];
95
+ var _g = (0, react_1.useState)(false), loadingReferenceIdentifierValues = _g[0], setLoadingReferenceIdentifierValues = _g[1]; // TODO: change this to boolean[] for handling the list
96
96
  var token = antd_1.theme.useToken().token;
97
97
  var intl = (0, react_intl_1.useIntl)();
98
98
  var referenceIdentifiersHelp = props.referenceIdentifiersHelpText
@@ -195,7 +195,7 @@ var ReferenceIdentifiers = function (props) {
195
195
  fieldHandling = JSON.parse(fieldDefinition_1.properties.handling);
196
196
  }
197
197
  catch (error) {
198
- // tslint:disable-next-line:no-console
198
+ // eslint-disable-next-line no-console
199
199
  console.log(error);
200
200
  }
201
201
  }
@@ -207,7 +207,7 @@ var ReferenceIdentifiers = function (props) {
207
207
  } })));
208
208
  }
209
209
  if (fieldDefinition_1.properties.hasOwnProperty("values") &&
210
- fieldDefinition_1.properties.values /*&& fieldDefinition.properties.values.length > 0*/) {
210
+ fieldDefinition_1.properties.values /* && fieldDefinition.properties.values.length > 0 */) {
211
211
  var selectProps = fieldDefinition_1.properties.hasOwnProperty("href")
212
212
  ? {
213
213
  showSearch: true,
@@ -238,7 +238,7 @@ var ReferenceIdentifiers = function (props) {
238
238
  };
239
239
  var referenceIdentifiersDefinitions = (0, ReferenceIdentifierUtility_1.getReferenceIdentifierFieldDefinitions)(props.receiverRequirements);
240
240
  var getSingleReferenceIdentifierInput = function () {
241
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
241
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
242
242
  var fieldHandling = null;
243
243
  var fieldDefinition = referenceIdentifiersDefinitions[0];
244
244
  var singleReferenceIdentifierLabel = fieldDefinition.properties.label;
@@ -252,7 +252,7 @@ var ReferenceIdentifiers = function (props) {
252
252
  // Condition 1 - If referenceidentifier should not show field values (options to choose from), but we need to validate
253
253
  // Test: Always with "Should be validated" checked. Then test both mandatory and optional
254
254
  if (fieldHandling && fieldHandling.shouldBeValidated) {
255
- props.setReferenceIdentifierIsMandatory((_d = (((_c = (_b = (_a = props.receiverRequirements) === null || _a === void 0 ? void 0 : _a.fieldDefinitions) === null || _b === void 0 ? void 0 : _b[0].properties) === null || _c === void 0 ? void 0 : _c.cardinality) === "1..1")) !== null && _d !== void 0 ? _d : false);
255
+ props.setReferenceIdentifierIsMandatory(((_c = (_b = (_a = props.receiverRequirements) === null || _a === void 0 ? void 0 : _a.fieldDefinitions) === null || _b === void 0 ? void 0 : _b[0].properties) === null || _c === void 0 ? void 0 : _c.cardinality) === "1..1");
256
256
  return (react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "singleReferenceIdentifier", "value"], validateStatus: props.referenceIdentifierValidateStatus, rules: [
257
257
  {
258
258
  validator: (0, validationRules_1.noWhitespaceValidator)(intl)
@@ -264,7 +264,7 @@ var ReferenceIdentifiers = function (props) {
264
264
  }
265
265
  if (fieldDefinition.properties.hasOwnProperty("values") && fieldDefinition.properties.values) {
266
266
  // Condition 2 - If referenceidentifier has field values (options to choose from)
267
- props.setReferenceIdentifierIsMandatory((_h = (((_g = (_f = (_e = props.receiverRequirements) === null || _e === void 0 ? void 0 : _e.fieldDefinitions) === null || _f === void 0 ? void 0 : _f[0].properties) === null || _g === void 0 ? void 0 : _g.cardinality) === "1..1")) !== null && _h !== void 0 ? _h : false);
267
+ props.setReferenceIdentifierIsMandatory(((_f = (_e = (_d = props.receiverRequirements) === null || _d === void 0 ? void 0 : _d.fieldDefinitions) === null || _e === void 0 ? void 0 : _e[0].properties) === null || _f === void 0 ? void 0 : _f.cardinality) === "1..1");
268
268
  var selectProps = fieldDefinition.properties.hasOwnProperty("href")
269
269
  ? {
270
270
  showSearch: true,
@@ -286,7 +286,7 @@ var ReferenceIdentifiers = function (props) {
286
286
  }
287
287
  else {
288
288
  // Condition 3
289
- props.setReferenceIdentifierIsMandatory((_m = (((_l = (_k = (_j = props.receiverRequirements) === null || _j === void 0 ? void 0 : _j.fieldDefinitions) === null || _k === void 0 ? void 0 : _k[0].properties) === null || _l === void 0 ? void 0 : _l.cardinality) === "1..1")) !== null && _m !== void 0 ? _m : false);
289
+ props.setReferenceIdentifierIsMandatory(((_j = (_h = (_g = props.receiverRequirements) === null || _g === void 0 ? void 0 : _g.fieldDefinitions) === null || _h === void 0 ? void 0 : _h[0].properties) === null || _j === void 0 ? void 0 : _j.cardinality) === "1..1");
290
290
  return (react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "singleReferenceIdentifier", "value"], rules: [
291
291
  {
292
292
  validator: (0, validationRules_1.noWhitespaceValidator)(intl)
@@ -310,8 +310,8 @@ var ReferenceIdentifiers = function (props) {
310
310
  }
311
311
  else {
312
312
  // Many reference identifiers
313
- props.setReferenceIdentifierIsMandatory((_d = (((_c = (_b = (_a = props.receiverRequirements) === null || _a === void 0 ? void 0 : _a.fieldDefinitions) === null || _b === void 0 ? void 0 : _b[0].properties) === null || _c === void 0 ? void 0 : _c.cardinality) === "1..1")) !== null && _d !== void 0 ? _d : false);
314
- var isAnyRefRequired = Boolean((_f = (_e = props.receiverRequirements) === null || _e === void 0 ? void 0 : _e.fieldDefinitions) === null || _f === void 0 ? void 0 : _f.find(function (item) { var _a; return ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.cardinality) === "1..1"; }));
313
+ props.setReferenceIdentifierIsMandatory(((_c = (_b = (_a = props.receiverRequirements) === null || _a === void 0 ? void 0 : _a.fieldDefinitions) === null || _b === void 0 ? void 0 : _b[0].properties) === null || _c === void 0 ? void 0 : _c.cardinality) === "1..1");
314
+ var isAnyRefRequired = Boolean((_e = (_d = props.receiverRequirements) === null || _d === void 0 ? void 0 : _d.fieldDefinitions) === null || _e === void 0 ? void 0 : _e.find(function (item) { var _a; return ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.cardinality) === "1..1"; }));
315
315
  props.setReferenceIdentifierIsMandatory(isAnyRefRequired);
316
316
  return (react_1.default.createElement(antd_1.Form.List, { name: ["invoice", "referenceIdentifiers"] }, function (fields, _a) {
317
317
  var add = _a.add, remove = _a.remove;
@@ -1,15 +1,15 @@
1
1
  import React from "react";
2
2
  import { WrappedComponentProps } from "react-intl";
3
3
  import { FormInstance } from "antd/es/form";
4
- import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
4
+ import { PartyWithTaxInfoMetadata } from "@unimaze/api-clients/lib/mapi";
5
5
  import { PortalConfigurationCustomer } from "@unimaze/api-clients/lib/rapi";
6
6
  import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
7
7
  interface Props extends WrappedComponentProps {
8
8
  receiverRequirements: NewReceiverRequirements;
9
9
  customers: PortalConfigurationCustomer[];
10
10
  formInstance: FormInstance;
11
- chosenCustomer: PartyMetadata | undefined;
12
- setChosenCustomer: (chosenCustomer: PartyMetadata) => void;
11
+ chosenCustomer: PartyWithTaxInfoMetadata | undefined;
12
+ setChosenCustomer: (chosenCustomer: PartyWithTaxInfoMetadata) => void;
13
13
  rapiBaseUrl: string;
14
14
  updateReceiverRequirementsProp: (newReceiverRequirements: NewReceiverRequirements) => void;
15
15
  isSaveFieldValuesSelected: boolean;
@@ -5,7 +5,7 @@ import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
5
5
  import { ValidateStatus } from "antd/es/form/FormItem";
6
6
  import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
7
7
  import { LanguageProp } from "../../types/CommonProps";
8
- import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
8
+ import { PartyWithTaxInfoMetadata } from "@unimaze/api-clients/lib/mapi";
9
9
  interface Props extends WrappedComponentProps {
10
10
  form: FormInstance;
11
11
  receiverRequirements: NewReceiverRequirements;
@@ -16,7 +16,7 @@ interface Props extends WrappedComponentProps {
16
16
  referenceIdentifiersLabelText?: string;
17
17
  referenceIdentifiersHelpText?: string;
18
18
  referenceIdentifierValidateStatus: ValidateStatus;
19
- chosenCustomer: PartyMetadata;
19
+ chosenCustomer: PartyWithTaxInfoMetadata;
20
20
  setReferenceIdentifierValidateStatus: (referenceIdentifierValidateStatus: ValidateStatus) => void;
21
21
  dueDateMinimumOffset: number;
22
22
  billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
@@ -1,12 +1,12 @@
1
1
  import { FormInstance } from "antd";
2
2
  import React from "react";
3
3
  import { WrappedComponentProps } from "react-intl";
4
- import { PartyMetadata } from "../../../../../unimaze-api-clients/lib/mapi";
4
+ import { PartyWithTaxInfoMetadata } from "@unimaze/api-clients/lib/mapi";
5
5
  import { LoggedInPerson } from "../../types/CommonProps";
6
6
  import { SellerSelection } from "../../types/SellerSelection";
7
7
  interface Props extends WrappedComponentProps {
8
8
  form: FormInstance;
9
- chosenCustomer: PartyMetadata;
9
+ chosenCustomer: PartyWithTaxInfoMetadata;
10
10
  sentBy?: {
11
11
  person: LoggedInPerson;
12
12
  seller: SellerSelection;
@@ -2,7 +2,7 @@ import { WrappedComponentProps } from "react-intl";
2
2
  import React from "react";
3
3
  import { FormInstance } from "antd";
4
4
  import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
5
- import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
5
+ import { PartyWithTaxInfoMetadata } from "@unimaze/api-clients/lib/mapi";
6
6
  import { LoggedInPerson } from "../../types/CommonProps";
7
7
  import { SellerSelection } from "../../types/SellerSelection";
8
8
  export declare const translationMessages: {
@@ -122,7 +122,7 @@ export declare const translationMessages: {
122
122
  interface Props extends WrappedComponentProps {
123
123
  recieverRequirements: NewReceiverRequirements;
124
124
  form: FormInstance;
125
- chosenCustomer: PartyMetadata;
125
+ chosenCustomer: PartyWithTaxInfoMetadata;
126
126
  /** The logged-in person and the seller they send for, shown when the portal requires login */
127
127
  sentBy?: {
128
128
  person: LoggedInPerson;
@@ -742,7 +742,7 @@ var CreateInvoiceConstructor = function (props) {
742
742
  validateFields();
743
743
  }, 0);
744
744
  } }, formLayout_1.formItemLayout, { form: form, onFinish: function (_values) { return handleSubmit(_values); }, onFinishFailed: function (error) {
745
- // tslint:disable-next-line:no-console
745
+ // eslint-disable-next-line no-console
746
746
  console.log(error);
747
747
  }, initialValues: formData }),
748
748
  react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "currencyCode"], hidden: true }),
@@ -1,4 +1,4 @@
1
- import { BillingLineMetadata, InvoiceMetadataInput, PartyMetadata } from "@unimaze/api-clients/lib/mapi";
1
+ import { BillingLineMetadata, InvoiceMetadataInput, PartyWithTaxInfoMetadata } from "@unimaze/api-clients/lib/mapi";
2
2
  import { Store } from "antd/es/form/interface";
3
3
  import { PortalConfigurationCustomer } from "@unimaze/api-clients/lib/rapi";
4
4
  import { PaymentMeansMetadata } from "@unimaze/api-clients/lib/mapi/api";
@@ -8,6 +8,6 @@ declare const getIdentifierWithPrefix: (identifier?: string | null) => string;
8
8
  declare const getKennitalaFromIsoIdentifier: (isoIdentifier?: string | null, options?: {
9
9
  dashed?: boolean;
10
10
  }) => string;
11
- declare const convertToInvoiceMetadataInput: (formValues: Store, invoiceLinesWithCalculations: BillingLineMetadata[], paymentMethod: PaymentMeansMetadata, chosenCustomer: PartyMetadata) => InvoiceMetadataInput;
12
- declare const profileOutputToPartyMetadata: (customer: PortalConfigurationCustomer) => PartyMetadata;
11
+ declare const convertToInvoiceMetadataInput: (formValues: Store, invoiceLinesWithCalculations: BillingLineMetadata[], paymentMethod: PaymentMeansMetadata, chosenCustomer: PartyWithTaxInfoMetadata) => InvoiceMetadataInput;
12
+ declare const profileOutputToPartyMetadata: (customer: PortalConfigurationCustomer) => PartyWithTaxInfoMetadata;
13
13
  export { convertToInvoiceMetadataInput, profileOutputToPartyMetadata, getIdentifierWithPrefix, getKennitalaFromIsoIdentifier, stripToDigits };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.submitDocument = exports.submitInvoice = exports.convertToInvoiceMetadataInput = void 0;
4
4
  var ConversionUtility_1 = require("./ConversionUtility");
5
- Object.defineProperty(exports, "convertToInvoiceMetadataInput", { enumerable: true, get: function () { return ConversionUtility_1.convertToInvoiceMetadataInput; } }); /*, convertToCreditNoteMetadataInput*/
5
+ Object.defineProperty(exports, "convertToInvoiceMetadataInput", { enumerable: true, get: function () { return ConversionUtility_1.convertToInvoiceMetadataInput; } }); /* , convertToCreditNoteMetadataInput */
6
6
  var ApiUtility_1 = require("./ApiUtility");
7
7
  Object.defineProperty(exports, "submitInvoice", { enumerable: true, get: function () { return ApiUtility_1.submitInvoice; } });
8
8
  Object.defineProperty(exports, "submitDocument", { enumerable: true, get: function () { return ApiUtility_1.submitDocument; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "dependencies": {
11
11
  "@ant-design/compatible": "latest",
12
- "@unimaze/api-clients": "4.0.0",
12
+ "@unimaze/api-clients": "5.0.0",
13
13
  "antd-mask-input": "^0.1.13",
14
14
  "chardet": "^2.2.0",
15
15
  "dayjs": "^1.11.10",
@@ -21,6 +21,7 @@
21
21
  "uuid": "latest"
22
22
  },
23
23
  "devDependencies": {
24
+ "@eslint/js": "^9.39.5",
24
25
  "@formatjs/cli": "^6.0.4",
25
26
  "@hot-loader/react-dom": "^16.13.0+4.12.20",
26
27
  "@types/lodash": "^4.14.149",
@@ -36,8 +37,11 @@
36
37
  "copyfiles": "^2.2.0",
37
38
  "cross-env": "^7.0.2",
38
39
  "css-loader": "^3.5.1",
39
- "eslint-plugin-formatjs": "^4.13.3",
40
+ "eslint": "^9.39.5",
41
+ "eslint-plugin-formatjs": "^4.14.0",
42
+ "eslint-plugin-react-hooks": "^5.2.0",
40
43
  "file-loader": "^6.0.0",
44
+ "globals": "^17.14.0",
41
45
  "less": "^3.11.1",
42
46
  "less-loader": "^5.0.0",
43
47
  "less-watch-compiler": "^1.14.1",
@@ -48,9 +52,8 @@
48
52
  "react-dom": "17.0.2",
49
53
  "rimraf": "^3.0.2",
50
54
  "style-loader": "^1.1.3",
51
- "tslint": "^6.1.1",
52
- "tslint-config-prettier": "^1.18.0",
53
55
  "typescript": "4",
56
+ "typescript-eslint": "^8.73.0",
54
57
  "url-loader": "^4.0.0",
55
58
  "webpack": "^4.42.1",
56
59
  "webpack-cli": "^3.3.11",
@@ -72,7 +75,8 @@
72
75
  "build": "tsc",
73
76
  "build: watch": "tsc -w",
74
77
  "postbuild": "copyfiles -V -u 1 src/**/*.css lib",
75
- "lint": "tslint -p tsconfig.json",
78
+ "lint": "eslint src",
79
+ "lint:fix": "eslint src --fix",
76
80
  "prepare": "yarn build",
77
81
  "prepublishOnly": "yarn test && yarn run lint",
78
82
  "preversion": "yarn run lint",
@@ -87,15 +91,6 @@
87
91
  "localize:compile": "formatjs compile src/translations/source/strings.json --out-file src/translations/locales/en.json",
88
92
  "localize:mergeTranslations": "node mergeTranslations.cjs"
89
93
  },
90
- "eslintConfig": {
91
- "extends": "react-app",
92
- "plugins": [
93
- "formatjs"
94
- ],
95
- "rules": {
96
- "formatjs/no-offset": "error"
97
- }
98
- },
99
94
  "author": "",
100
95
  "license": "SEE LICENSE IN LICENSE.txt",
101
96
  "repository": {
@@ -1,51 +0,0 @@
1
- .component_header {
2
- height: 3.3em;
3
- background-color: #fff;
4
- border-bottom: solid 1px #d9d9d9;
5
- border-radius: 4px 4px 0 0;
6
- display: flex;
7
- align-items: center;
8
- justify-content: space-between;
9
- padding: 1em 2em;
10
- }
11
- .component_header_title {
12
- font-size: 1.1em;
13
- }
14
- .component_header_title > span > i {
15
- font-size: 20px;
16
- }
17
- .header_icon {
18
- font-size: 1.5em;
19
- margin-right: 0.75em;
20
- color: #1890ff;
21
- }
22
- .header_right {
23
- display: flex;
24
- justify-content: flex-end;
25
- }
26
- @media screen and (max-width: 768px) {
27
- .header_right {
28
- justify-content: flex-start;
29
- }
30
- }
31
- .header_right > button {
32
- margin-bottom: unset !important;
33
- }
34
- .component_body {
35
- border-radius: 0 0 4px 4px;
36
- }
37
- .component_wrapper {
38
- align-self: stretch;
39
- height: 100%;
40
- background-color: #fff;
41
- border: solid 1px #d9d9d9;
42
- border-radius: 4px;
43
- }
44
- .component_wrapper_padding {
45
- padding: 1em;
46
- }
47
- .umz_noValidationMessage .ant-form-item-explain {
48
- height: 20px !important;
49
- visibility: hidden !important;
50
- }
51
- /*# sourceMappingURL=index.css.map */