@unimaze/billing 0.21.70 → 1.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.
Files changed (35) hide show
  1. package/lib/common/components/attachments/AttachmentModal.js +1 -0
  2. package/lib/common/components/customer/index.js +1 -1
  3. package/lib/common/components/input/index.d.ts +2 -0
  4. package/lib/common/components/input/index.js +6 -3
  5. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +6 -0
  6. package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +19 -1
  7. package/lib/common/components/invoice-preview/index.d.ts +23 -0
  8. package/lib/common/components/invoice-preview/index.js +17 -1
  9. package/lib/common/components/session-bar/index.d.ts +34 -0
  10. package/lib/common/components/session-bar/index.js +79 -0
  11. package/lib/common/components/supplier/CityAutofill.d.ts +2 -0
  12. package/lib/common/components/supplier/CityAutofill.js +4 -3
  13. package/lib/common/components/supplier/SendOnBehalfOf.d.ts +88 -0
  14. package/lib/common/components/supplier/SendOnBehalfOf.js +281 -0
  15. package/lib/common/components/supplier/index.d.ts +16 -0
  16. package/lib/common/components/supplier/index.js +66 -16
  17. package/lib/common/types/CommonProps.d.ts +14 -0
  18. package/lib/common/types/SellerSelection.d.ts +16 -0
  19. package/lib/common/types/SellerSelection.js +10 -0
  20. package/lib/create-invoice/IntlLoader.js +1 -1
  21. package/lib/create-invoice/index.d.ts +8 -0
  22. package/lib/create-invoice/index.js +121 -41
  23. package/lib/style/index.css +51 -0
  24. package/lib/translations/locales/en.json +23 -0
  25. package/lib/translations/locales/is.json +23 -0
  26. package/lib/translations/locales.d.ts +46 -0
  27. package/lib/utils/ApiUtility.d.ts +9 -2
  28. package/lib/utils/ApiUtility.js +30 -3
  29. package/lib/utils/ConversionUtility.d.ts +6 -2
  30. package/lib/utils/ConversionUtility.js +16 -14
  31. package/lib/utils/WizardSnapshotUtility.d.ts +20 -0
  32. package/lib/utils/WizardSnapshotUtility.js +88 -0
  33. package/package.json +2 -2
  34. package/lib/common/components/attachments/ListAttachments.d.ts +0 -10
  35. package/lib/common/components/attachments/ListAttachments.js +0 -143
@@ -107,6 +107,7 @@ var AttachmentModal = function (props) {
107
107
  }, [isModalOpen, attachments]);
108
108
  (0, react_1.useEffect)(function () {
109
109
  updateSaveButtonState(localAttachments);
110
+ (0, AttachmentsUtility_1.updateFormState)(localAttachments, form);
110
111
  }, [localAttachments]);
111
112
  var updateSaveButtonState = function (updatedLocalAttachments) {
112
113
  var isAttachmentListUnmodified = (0, lodash_1.isEqual)(attachments, updatedLocalAttachments);
@@ -110,7 +110,7 @@ var Customer = function (props) {
110
110
  props.intl.formatMessage(translationMessages.customer_identifier),
111
111
  ":",
112
112
  " ",
113
- chosenCustomer && (0, ConversionUtility_1.convertToReadableKennitala)(chosenCustomer.identifier)),
113
+ chosenCustomer && (0, ConversionUtility_1.getKennitalaFromIsoIdentifier)(chosenCustomer.identifier)),
114
114
  react_1.default.createElement(antd_1.Typography.Text, { className: "ant-form-text", style: { fontSize: 18 }, type: "secondary" },
115
115
  props.intl.formatMessage(translationMessages.customer_address_streetNameAndNumber),
116
116
  ":",
@@ -11,6 +11,8 @@ interface Props extends WrappedComponentProps {
11
11
  value?: string;
12
12
  defaultTooltip?: React.ReactNode;
13
13
  disabled?: boolean;
14
+ /** Shows a lock icon: the value comes from the login or the company register and cannot be changed */
15
+ locked?: boolean;
14
16
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
17
  onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
16
18
  size?: "large" | "middle" | "small";
@@ -9,8 +9,9 @@ var react_intl_1 = require("react-intl");
9
9
  var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
10
10
  var react_use_1 = require("react-use");
11
11
  var tooltip_1 = __importDefault(require("../tooltip"));
12
+ var icons_1 = require("@ant-design/icons");
12
13
  var UmzInput = function (_a) {
13
- var receiverRequirements = _a.receiverRequirements, receiverRequirementsKey = _a.receiverRequirementsKey, defaultPlaceholder = _a.defaultPlaceholder, _b = _a.defaultIsRequired, defaultIsRequired = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, defaultTooltip = _a.defaultTooltip, defaultValue = _a.defaultValue, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, size = _a.size;
14
+ var receiverRequirements = _a.receiverRequirements, receiverRequirementsKey = _a.receiverRequirementsKey, defaultPlaceholder = _a.defaultPlaceholder, _b = _a.defaultIsRequired, defaultIsRequired = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.locked, locked = _d === void 0 ? false : _d, defaultTooltip = _a.defaultTooltip, defaultValue = _a.defaultValue, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, size = _a.size;
14
15
  var isRequired = receiverRequirements && receiverRequirementsKey
15
16
  ? (0, RequirementsUtility_1.getFieldIsRequired)(receiverRequirements, receiverRequirementsKey, defaultIsRequired)
16
17
  : defaultIsRequired;
@@ -21,7 +22,7 @@ var UmzInput = function (_a) {
21
22
  ? (0, RequirementsUtility_1.getFieldLabelOverride)(receiverRequirements, receiverRequirementsKey, defaultPlaceholder)
22
23
  : defaultPlaceholder;
23
24
  var width = (0, react_use_1.useWindowSize)().width;
24
- var _d = react_1.default.useState(false), isMobile = _d[0], setIsMobile = _d[1];
25
+ var _e = react_1.default.useState(false), isMobile = _e[0], setIsMobile = _e[1];
25
26
  react_1.default.useEffect(function () {
26
27
  if (width < 768) {
27
28
  setIsMobile(true);
@@ -31,7 +32,9 @@ var UmzInput = function (_a) {
31
32
  }
32
33
  }, [width]);
33
34
  return (react_1.default.createElement(antd_1.Flex, { gap: "middle" },
34
- react_1.default.createElement(antd_1.Input, { disabled: disabled, placeholder: placeholder, required: isRequired, onChange: onChange, size: size, prefix: isRequired ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, defaultValue: defaultValue, value: value, suffix: !isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle }), onBlur: onBlur, autoComplete: "off" }),
35
+ react_1.default.createElement(antd_1.Input, { disabled: disabled, placeholder: placeholder, required: isRequired, onChange: onChange, size: size, prefix: isRequired ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, defaultValue: defaultValue, value: value, suffix: react_1.default.createElement(react_1.default.Fragment, null,
36
+ locked && react_1.default.createElement(icons_1.LockOutlined, null),
37
+ !isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle })), onBlur: onBlur, autoComplete: "off" }),
35
38
  isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle })));
36
39
  };
37
40
  exports.default = (0, react_intl_1.injectIntl)(UmzInput);
@@ -2,9 +2,15 @@ import { FormInstance } from "antd";
2
2
  import React from "react";
3
3
  import { WrappedComponentProps } from "react-intl";
4
4
  import { PartyMetadata } from "../../../../../unimaze-api-clients/lib/mapi";
5
+ import { LoggedInPerson } from "../../types/CommonProps";
6
+ import { SellerSelection } from "../../types/SellerSelection";
5
7
  interface Props extends WrappedComponentProps {
6
8
  form: FormInstance;
7
9
  chosenCustomer: PartyMetadata;
10
+ sentBy?: {
11
+ person: LoggedInPerson;
12
+ seller: SellerSelection;
13
+ };
8
14
  }
9
15
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
10
16
  forwardedRef?: React.Ref<any>;
@@ -32,9 +32,23 @@ var react_intl_1 = require("react-intl");
32
32
  var index_1 = require("./index");
33
33
  var colors_1 = require("@ant-design/colors");
34
34
  var dayjs_1 = __importStar(require("dayjs"));
35
+ var SellerSelection_1 = require("../../types/SellerSelection");
36
+ var getSentByRole = function (sentBy) {
37
+ if (!sentBy) {
38
+ return undefined;
39
+ }
40
+ if (sentBy.seller.isSelf) {
41
+ return index_1.translationMessages.invoicePreview_roleSelf;
42
+ }
43
+ if (sentBy.seller.roles.includes(SellerSelection_1.PROCURATION)) {
44
+ return index_1.translationMessages.invoicePreview_roleProcuration;
45
+ }
46
+ return index_1.translationMessages.invoicePreview_roleGranted;
47
+ };
35
48
  var InvoicePreviewCustomerSupplierInfoBox = function (props) {
36
49
  var _a, _b, _c;
37
50
  var token = antd_1.theme.useToken().token;
51
+ var sentByRole = getSentByRole(props.sentBy);
38
52
  var issueDate = props.form.getFieldValue(["invoice", "issueDate"]);
39
53
  var dueDate = props.form.getFieldValue(["invoice", "dueDate"]);
40
54
  return (react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, title: react_1.default.createElement(antd_1.Row, null,
@@ -78,6 +92,10 @@ var InvoicePreviewCustomerSupplierInfoBox = function (props) {
78
92
  " ",
79
93
  props.form.getFieldValue(["invoice", "supplier", "address", "city"])),
80
94
  props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]))),
81
- props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"])))))));
95
+ props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]))),
96
+ props.sentBy && sentByRole && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", italic: true }, props.intl.formatMessage(index_1.translationMessages.invoicePreview_sentBy, {
97
+ name: props.sentBy.person.name,
98
+ role: props.intl.formatMessage(sentByRole),
99
+ })))))));
82
100
  };
83
101
  exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewCustomerSupplierInfoBox);
@@ -3,6 +3,8 @@ import React from "react";
3
3
  import { FormInstance } from "antd";
4
4
  import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
5
5
  import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
6
+ import { LoggedInPerson } from "../../types/CommonProps";
7
+ import { SellerSelection } from "../../types/SellerSelection";
6
8
  export declare const translationMessages: {
7
9
  customer_title: {
8
10
  id: string;
@@ -100,11 +102,32 @@ export declare const translationMessages: {
100
102
  id: string;
101
103
  defaultMessage: string;
102
104
  };
105
+ invoicePreview_sentBy: {
106
+ id: string;
107
+ defaultMessage: string;
108
+ };
109
+ invoicePreview_roleSelf: {
110
+ id: string;
111
+ defaultMessage: string;
112
+ };
113
+ invoicePreview_roleProcuration: {
114
+ id: string;
115
+ defaultMessage: string;
116
+ };
117
+ invoicePreview_roleGranted: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ };
103
121
  };
104
122
  interface Props extends WrappedComponentProps {
105
123
  recieverRequirements: NewReceiverRequirements;
106
124
  form: FormInstance;
107
125
  chosenCustomer: PartyMetadata;
126
+ /** The logged-in person and the seller they send for, shown when the portal requires login */
127
+ sentBy?: {
128
+ person: LoggedInPerson;
129
+ seller: SellerSelection;
130
+ };
108
131
  }
109
132
  declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
110
133
  forwardedRef?: React.Ref<any>;
@@ -110,6 +110,22 @@ exports.translationMessages = (0, react_intl_1.defineMessages)({
110
110
  id: "invoicePreview_VATof",
111
111
  defaultMessage: "VAT of",
112
112
  },
113
+ invoicePreview_sentBy: {
114
+ id: "invoicePreview_sentBy",
115
+ defaultMessage: "Sent by {name} ({role})",
116
+ },
117
+ invoicePreview_roleSelf: {
118
+ id: "invoicePreview_roleSelf",
119
+ defaultMessage: "on own behalf",
120
+ },
121
+ invoicePreview_roleProcuration: {
122
+ id: "invoicePreview_roleProcuration",
123
+ defaultMessage: "procuration holder",
124
+ },
125
+ invoicePreview_roleGranted: {
126
+ id: "invoicePreview_roleGranted",
127
+ defaultMessage: "power of attorney",
128
+ },
113
129
  });
114
130
  var InvoicePreview = function (props) {
115
131
  var token = antd_1.theme.useToken().token;
@@ -121,7 +137,7 @@ var InvoicePreview = function (props) {
121
137
  react_1.default.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px" } },
122
138
  react_1.default.createElement(antd_1.Row, { gutter: [20, 20] },
123
139
  react_1.default.createElement(antd_1.Col, { span: 24 },
124
- react_1.default.createElement(InvoicePreviewCustomerSupplierInfoBox_1.default, { form: props.form, chosenCustomer: props.chosenCustomer })),
140
+ react_1.default.createElement(InvoicePreviewCustomerSupplierInfoBox_1.default, { form: props.form, chosenCustomer: props.chosenCustomer, sentBy: props.sentBy })),
125
141
  react_1.default.createElement(antd_1.Col, { span: 24 },
126
142
  react_1.default.createElement(InvoicePreviewInvoiceLines_1.default, { form: props.form })),
127
143
  react_1.default.createElement(antd_1.Col, { span: 24 },
@@ -0,0 +1,34 @@
1
+ import * as React from "react";
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { LoggedInPerson } from "../../types/CommonProps";
4
+ import { SellerSelection } from "../../types/SellerSelection";
5
+ export declare const translationMessages: {
6
+ sessionBar_onBehalfOf: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ sessionBar_change: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ sessionBar_delegations: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ };
19
+ interface Props extends WrappedComponentProps {
20
+ person: LoggedInPerson;
21
+ seller: SellerSelection | null;
22
+ /** Shows "Change", which goes back to the supplier step and keeps the other steps */
23
+ canChangeSeller: boolean;
24
+ onChangeSeller: () => void;
25
+ /** Link to the delegation pages, shown only to procuration holders */
26
+ delegationsUrl?: string;
27
+ isMobile?: boolean;
28
+ }
29
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
30
+ forwardedRef?: React.Ref<any>;
31
+ } & React.RefAttributes<any>> & {
32
+ WrappedComponent: React.ComponentType<Props>;
33
+ };
34
+ export default _default;
@@ -0,0 +1,79 @@
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
26
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
27
+ if (ar || !(i in from)) {
28
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
29
+ ar[i] = from[i];
30
+ }
31
+ }
32
+ return to.concat(ar || Array.prototype.slice.call(from));
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.translationMessages = void 0;
36
+ var React = __importStar(require("react"));
37
+ var antd_1 = require("antd");
38
+ var icons_1 = require("@ant-design/icons");
39
+ var react_intl_1 = require("react-intl");
40
+ exports.translationMessages = (0, react_intl_1.defineMessages)({
41
+ sessionBar_onBehalfOf: {
42
+ id: "sessionBar_onBehalfOf",
43
+ defaultMessage: "on behalf of {seller}",
44
+ },
45
+ sessionBar_change: {
46
+ id: "sessionBar_change",
47
+ defaultMessage: "Change",
48
+ },
49
+ sessionBar_delegations: {
50
+ id: "sessionBar_delegations",
51
+ defaultMessage: "Powers of attorney",
52
+ },
53
+ });
54
+ /** Who is logged in and for whom the invoice is sent, on every step of a portal that requires login */
55
+ var SessionBar = function (props) {
56
+ var onBehalfOf = props.seller && !props.seller.isSelf
57
+ ? props.intl.formatMessage(exports.translationMessages.sessionBar_onBehalfOf, { seller: props.seller.name })
58
+ : undefined;
59
+ var changeLabel = props.intl.formatMessage(exports.translationMessages.sessionBar_change);
60
+ var delegationsLabel = props.intl.formatMessage(exports.translationMessages.sessionBar_delegations);
61
+ if (props.isMobile) {
62
+ var items = __spreadArray(__spreadArray(__spreadArray([], (onBehalfOf ? [{ key: "seller", label: onBehalfOf, disabled: true }] : []), true), (props.canChangeSeller ? [{ key: "change", label: changeLabel, onClick: props.onChangeSeller }] : []), true), (props.delegationsUrl ? [{ key: "delegations", label: React.createElement("a", { href: props.delegationsUrl }, delegationsLabel) }] : []), true);
63
+ return (React.createElement(antd_1.Flex, { justify: "end", style: { width: "100%", padding: "0 20px" } },
64
+ React.createElement(antd_1.Dropdown, { menu: { items: items }, trigger: ["click"], disabled: items.length === 0 },
65
+ React.createElement(antd_1.Button, { type: "text", icon: React.createElement(icons_1.UserOutlined, null) }, props.person.name))));
66
+ }
67
+ return (React.createElement(antd_1.Flex, { justify: "end", align: "center", gap: "small", wrap: "wrap", style: { width: "100%", maxWidth: "900px" } },
68
+ React.createElement(antd_1.Typography.Text, null, props.person.name),
69
+ onBehalfOf && React.createElement(antd_1.Typography.Text, { type: "secondary" },
70
+ "\u00B7 ",
71
+ onBehalfOf),
72
+ props.canChangeSeller && (React.createElement(antd_1.Typography.Link, { onClick: props.onChangeSeller },
73
+ "\u00B7 ",
74
+ changeLabel)),
75
+ props.delegationsUrl && (React.createElement(antd_1.Typography.Link, { href: props.delegationsUrl },
76
+ "\u00B7 ",
77
+ delegationsLabel))));
78
+ };
79
+ exports.default = (0, react_intl_1.injectIntl)(SessionBar);
@@ -6,6 +6,8 @@ interface Props extends WrappedComponentProps {
6
6
  receiverRequirements: NewReceiverRequirements;
7
7
  form: FormInstance;
8
8
  disabled: boolean;
9
+ /** Shows lock icons: the address comes from the company register */
10
+ locked?: boolean;
9
11
  defaultIsRequired?: boolean;
10
12
  defaultPlaceholder?: string;
11
13
  defaultValue?: string;
@@ -62,6 +62,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
62
62
  var React = __importStar(require("react"));
63
63
  var LocationUtility_1 = require("../../../utils/LocationUtility");
64
64
  var antd_1 = require("antd");
65
+ var icons_1 = require("@ant-design/icons");
65
66
  var react_intl_1 = require("react-intl");
66
67
  var __1 = require("..");
67
68
  var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
@@ -153,10 +154,10 @@ var CityAutocomplete = function (props) {
153
154
  React.createElement(antd_1.AutoComplete, { style: { width: "100%" }, options: citiesAndPostcodes.map(function (item) { return ({
154
155
  value: "".concat(item.place_name, "--").concat(item.postal_code),
155
156
  label: "".concat(item.place_name, ", ").concat(item.postal_code),
156
- }); }), onSearch: handleSearch, onSelect: function (value) { return handleCitySelect(value); }, value: inputValue, placeholder: props.defaultPlaceholder },
157
- React.createElement(antd_1.Input, { required: isRequired, value: inputValue })))),
157
+ }); }), onSearch: handleSearch, onSelect: function (value) { return handleCitySelect(value); }, value: inputValue, placeholder: props.defaultPlaceholder, disabled: props.disabled },
158
+ React.createElement(antd_1.Input, { required: isRequired, value: inputValue, suffix: props.locked ? React.createElement(icons_1.LockOutlined, null) : React.createElement("span", null) })))),
158
159
  React.createElement(antd_1.Col, { span: isMobile ? 24 : 6 },
159
160
  React.createElement(__1.UmzFormItem, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["supplier.address.postalZone"], defaultLabel: props.intl.formatMessage(translationMessages.supplier_address_zip_postalZone), defaultIsRequired: true, fieldName: ["invoice", "supplier", "address", "postalZone"], name: ["invoice", "supplier", "address", "postalZone"] },
160
- React.createElement(__1.UmzInput, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["supplier.address.postalZone"], defaultIsRequired: true, disabled: props.disabled, defaultPlaceholder: props.intl.formatMessage(translationMessages.supplier_address_zip_postalZone), value: selectedPostalZone })))));
161
+ React.createElement(__1.UmzInput, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["supplier.address.postalZone"], defaultIsRequired: true, disabled: props.disabled, locked: props.locked, defaultPlaceholder: props.intl.formatMessage(translationMessages.supplier_address_zip_postalZone), value: selectedPostalZone })))));
161
162
  };
162
163
  exports.default = (0, react_intl_1.injectIntl)(CityAutocomplete);
@@ -0,0 +1,88 @@
1
+ import * as React from "react";
2
+ import { WrappedComponentProps } from "react-intl";
3
+ import { BusinessEntity, BusinessEntityCollectionResource } from "@unimaze/api-clients/lib/rapi";
4
+ import { LoggedInPerson } from "../../types/CommonProps";
5
+ import { SellerSelection } from "../../types/SellerSelection";
6
+ export declare const translationMessages: {
7
+ sendOnBehalf_title: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ };
11
+ sendOnBehalf_self: {
12
+ id: string;
13
+ defaultMessage: string;
14
+ };
15
+ sendOnBehalf_company: {
16
+ id: string;
17
+ defaultMessage: string;
18
+ };
19
+ sendOnBehalf_companyIdentifier: {
20
+ id: string;
21
+ defaultMessage: string;
22
+ };
23
+ sendOnBehalf_lookup: {
24
+ id: string;
25
+ defaultMessage: string;
26
+ };
27
+ sendOnBehalf_procuration: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ };
31
+ sendOnBehalf_granted: {
32
+ id: string;
33
+ defaultMessage: string;
34
+ };
35
+ sendOnBehalf_notAllowed: {
36
+ id: string;
37
+ defaultMessage: string;
38
+ };
39
+ sendOnBehalf_notFound: {
40
+ id: string;
41
+ defaultMessage: string;
42
+ };
43
+ sendOnBehalf_selectCompany: {
44
+ id: string;
45
+ defaultMessage: string;
46
+ };
47
+ sendOnBehalf_otherCompany: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ };
51
+ sendOnBehalf_procurationTag: {
52
+ id: string;
53
+ defaultMessage: string;
54
+ };
55
+ sendOnBehalf_grantedTag: {
56
+ id: string;
57
+ defaultMessage: string;
58
+ };
59
+ sendOnBehalf_lostTag: {
60
+ id: string;
61
+ defaultMessage: string;
62
+ };
63
+ };
64
+ interface Props extends WrappedComponentProps {
65
+ rapiBaseUrl: string;
66
+ accessToken: string;
67
+ loggedInPerson: LoggedInPerson;
68
+ isMobile?: boolean;
69
+ /** The seller to select first, e.g. the one chosen before a re-login; it is checked again */
70
+ initialSeller?: {
71
+ isSelf: boolean;
72
+ isoIdentifier: string;
73
+ };
74
+ /** Called with the verified seller, or nulls when the person may not send for the chosen seller */
75
+ onSellerChange: (seller: BusinessEntity | null, selection: SellerSelection | null) => void;
76
+ /** The person's companies (procuration or delegation), each re-checked by Registry */
77
+ onRepresentedCompaniesChange?: (companies: BusinessEntityCollectionResource[]) => void;
78
+ /** True when the access token is about to expire */
79
+ isSessionExpiring: () => boolean;
80
+ /** Saves the wizard and logs the person in again */
81
+ onSessionExpired: () => void;
82
+ }
83
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
84
+ forwardedRef?: React.Ref<any>;
85
+ } & React.RefAttributes<any>> & {
86
+ WrappedComponent: React.ComponentType<Props>;
87
+ };
88
+ export default _default;