@unimaze/billing 0.20.16 → 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.
- package/lib/common/components/CommonTranslations.d.ts +102 -2
- package/lib/common/components/CommonTranslations.js +10 -1
- package/lib/common/components/attachments/Attachment.d.ts +6 -4
- package/lib/common/components/attachments/Attachment.js +26 -10
- package/lib/common/components/attachments/AttachmentModal.d.ts +21 -0
- package/lib/common/components/attachments/AttachmentModal.js +195 -0
- package/lib/common/components/attachments/index.d.ts +13 -17
- package/lib/common/components/attachments/index.js +189 -23
- package/lib/common/components/base-information/AccountingCost.d.ts +7 -5
- package/lib/common/components/base-information/AccountingCost.js +32 -11
- package/lib/common/components/base-information/OrderReference.d.ts +6 -4
- package/lib/common/components/base-information/OrderReference.js +31 -14
- package/lib/common/components/base-information/ProjectReference.d.ts +9 -5
- package/lib/common/components/base-information/ProjectReference.js +8 -6
- package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +32 -5
- package/lib/common/components/base-information/ReferenceIdentifiers.js +126 -83
- package/lib/common/components/base-information/index.d.ts +51 -5
- package/lib/common/components/base-information/index.js +99 -154
- package/lib/common/components/billing-lines/BillingCalculations.d.ts +7 -5
- package/lib/common/components/billing-lines/BillingCalculations.js +79 -46
- package/lib/common/components/billing-lines/BillingLinePreview.d.ts +21 -0
- package/lib/common/components/billing-lines/BillingLinePreview.js +41 -0
- package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +6 -4
- package/lib/common/components/billing-lines/BillingTaxSummary.js +39 -13
- package/lib/common/components/billing-lines/NewBillingLines.d.ts +120 -4
- package/lib/common/components/billing-lines/NewBillingLines.js +396 -72
- package/lib/common/components/billing-lines/index.d.ts +33 -6
- package/lib/common/components/billing-lines/index.js +71 -244
- package/lib/common/components/component-container/Content.d.ts +2 -2
- package/lib/common/components/component-container/index.d.ts +1 -0
- package/lib/common/components/component-container/index.js +1 -1
- package/lib/common/components/customer/CostCenter.d.ts +6 -4
- package/lib/common/components/customer/CostCenter.js +25 -9
- package/lib/common/components/customer/CustomerContactName.d.ts +6 -4
- package/lib/common/components/customer/CustomerContactName.js +24 -8
- package/lib/common/components/customer/hardCoddedCustomer.js +19 -3
- package/lib/common/components/customer/index.d.ts +11 -5
- package/lib/common/components/customer/index.js +97 -42
- package/lib/common/components/date-picker/index.d.ts +21 -0
- package/lib/common/components/date-picker/index.js +23 -0
- package/lib/common/components/delivery-location/index.d.ts +6 -4
- package/lib/common/components/delivery-location/index.js +20 -4
- package/lib/common/components/editable-cell/index.js +2 -2
- package/lib/common/components/editable-row/index.d.ts +1 -1
- package/lib/common/components/editable-row/index.js +24 -7
- package/lib/common/components/form-item/index.d.ts +13 -6
- package/lib/common/components/form-item/index.js +16 -20
- package/lib/common/components/index.d.ts +10 -0
- package/lib/common/components/index.js +30 -8
- package/lib/common/components/input/index.d.ts +23 -0
- package/lib/common/components/input/index.js +37 -0
- package/lib/common/components/invoice/index.d.ts +40 -0
- package/lib/common/components/invoice/index.js +52 -0
- package/lib/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
- package/lib/common/components/invoice-preview/InvoicePreviewHeader.js +105 -0
- package/lib/common/components/invoice-preview/index.d.ts +16 -0
- package/lib/common/components/invoice-preview/index.js +393 -0
- package/lib/common/components/locale-intl/index.d.ts +0 -10
- package/lib/common/components/locale-intl/index.js +50 -42
- package/lib/common/components/payment-method/index.d.ts +69 -6
- package/lib/common/components/payment-method/index.js +145 -57
- package/lib/common/components/payment-method/paymentMethodForConversion.js +3 -1
- package/lib/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
- package/lib/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
- package/lib/common/components/submit-confirmation/index.d.ts +8 -0
- package/lib/common/components/submit-confirmation/index.js +34 -0
- package/lib/common/components/supplier/CityAutofill.d.ts +18 -0
- package/lib/common/components/supplier/CityAutofill.js +159 -0
- package/lib/common/components/supplier/index.d.ts +79 -5
- package/lib/common/components/supplier/index.js +195 -103
- package/lib/common/components/tooltip/index.d.ts +7 -0
- package/lib/common/components/tooltip/index.js +15 -0
- package/lib/common/components/welcome-modal/index.d.ts +15 -0
- package/lib/common/components/welcome-modal/index.js +26 -0
- package/lib/common/consts/formLayout.js +4 -3
- package/lib/common/consts/validationRules.d.ts +1 -1
- package/lib/common/consts/validationRules.js +6 -0
- package/lib/common/enums/index.js +5 -1
- package/lib/common/style/index.css +18 -0
- package/lib/common/types/BillingLineMetadataOverride.d.ts +2 -0
- package/lib/common/types/CommonProps.d.ts +15 -1
- package/lib/common/types/DiscountType.d.ts +1 -0
- package/lib/common/types/DiscountType.js +2 -0
- package/lib/common/types/ReceiverRequirements.d.ts +1 -1
- package/lib/common/types/ReceiverRequirements.js +1 -0
- package/lib/common/types/index.js +15 -0
- package/lib/create-invoice/IntlLoader.d.ts +0 -6
- package/lib/create-invoice/IntlLoader.js +78 -13
- package/lib/create-invoice/index.d.ts +65 -4
- package/lib/create-invoice/index.js +437 -181
- package/lib/enums.d.ts +2 -3
- package/lib/enums.js +1 -0
- package/lib/index.js +22 -6
- package/lib/translations/locales/en.json +181 -0
- package/lib/translations/locales/is.json +135 -116
- package/lib/translations/locales.d.ts +360 -161
- package/lib/translations/locales.js +3 -2
- package/lib/utils/ApiUtility.d.ts +4 -4
- package/lib/utils/ApiUtility.js +13 -10
- package/lib/utils/BillingLineUtility.d.ts +16 -5
- package/lib/utils/BillingLineUtility.js +65 -26
- package/lib/utils/ConversionUtility.js +15 -7
- package/lib/utils/FileUploadUtility.d.ts +4 -2
- package/lib/utils/FileUploadUtility.js +28 -9
- package/lib/utils/IntlUtility.d.ts +3 -2
- package/lib/utils/IntlUtility.js +2 -1
- package/lib/utils/LocationUtility.d.ts +1 -0
- package/lib/utils/LocationUtility.js +81 -0
- package/lib/utils/ReferenceIdentifierUtility.js +2 -1
- package/lib/utils/RequirementsUtility.d.ts +9 -7
- package/lib/utils/RequirementsUtility.js +46 -22
- package/lib/utils/index.js +4 -3
- package/package.json +36 -18
- package/lib/style/index.css +0 -51
|
@@ -10,10 +10,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
13
22
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
24
|
};
|
|
16
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.getRequiredTooltipMessage = exports.getInput = exports.debouncedHandleSearchValues = exports.handleValueValidation = exports.getFieldIsRequired = exports.getFieldPlaceholderOverride = exports.getFieldLabelTooltipOverride = exports.getFieldLabelOverride = exports.getFieldRequirements = void 0;
|
|
17
27
|
var react_1 = __importDefault(require("react"));
|
|
18
28
|
var lodash_1 = require("lodash");
|
|
19
29
|
var axios_1 = __importDefault(require("axios"));
|
|
@@ -42,15 +52,17 @@ var antd_1 = require("antd");
|
|
|
42
52
|
// }
|
|
43
53
|
// return defaultLabel;
|
|
44
54
|
// };
|
|
45
|
-
|
|
55
|
+
var getFieldRequirements = function (receiverRequirements, key) {
|
|
46
56
|
return receiverRequirements ? receiverRequirements.fieldDefinitions.find(function (field) { return field.key === key; }) : undefined;
|
|
47
57
|
};
|
|
48
|
-
exports.
|
|
49
|
-
|
|
58
|
+
exports.getFieldRequirements = getFieldRequirements;
|
|
59
|
+
var getFieldLabelOverride = function (receiverRequirements, key, defaultLabel) {
|
|
60
|
+
var fieldRequirement = (0, exports.getFieldRequirements)(receiverRequirements, key);
|
|
50
61
|
return fieldRequirement && fieldRequirement.properties.hasOwnProperty("label") ? fieldRequirement.properties.label : defaultLabel;
|
|
51
62
|
};
|
|
52
|
-
exports.
|
|
53
|
-
|
|
63
|
+
exports.getFieldLabelOverride = getFieldLabelOverride;
|
|
64
|
+
var getFieldLabelTooltipOverride = function (receiverRequirements, key, defaultLabelTooltip) {
|
|
65
|
+
var fieldRequirement = (0, exports.getFieldRequirements)(receiverRequirements, key);
|
|
54
66
|
if (fieldRequirement && fieldRequirement.properties.hasOwnProperty("handling")) {
|
|
55
67
|
if (fieldRequirement.properties.handling) {
|
|
56
68
|
var handling = JSON.parse(fieldRequirement.properties.handling);
|
|
@@ -63,18 +75,21 @@ exports.getFieldLabelTooltipOverride = function (receiverRequirements, key, defa
|
|
|
63
75
|
return defaultLabelTooltip;
|
|
64
76
|
}
|
|
65
77
|
};
|
|
66
|
-
exports.
|
|
78
|
+
exports.getFieldLabelTooltipOverride = getFieldLabelTooltipOverride;
|
|
79
|
+
var getFieldPlaceholderOverride = function (fieldRequirement, defaultPlaceholder) {
|
|
67
80
|
if (fieldRequirement.properties.handling) {
|
|
68
81
|
var handling = JSON.parse(fieldRequirement.properties.handling);
|
|
69
82
|
return handling.placeholder ? handling.placeholder : defaultPlaceholder;
|
|
70
83
|
}
|
|
71
84
|
return defaultPlaceholder ? defaultPlaceholder : "";
|
|
72
85
|
};
|
|
73
|
-
exports.
|
|
74
|
-
|
|
86
|
+
exports.getFieldPlaceholderOverride = getFieldPlaceholderOverride;
|
|
87
|
+
var getFieldIsRequired = function (receiverRequirements, key, defaultIsRequired) {
|
|
88
|
+
var fieldRequirement = (0, exports.getFieldRequirements)(receiverRequirements, key);
|
|
75
89
|
var fieldCardinality = fieldRequirement && fieldRequirement.properties.hasOwnProperty("cardinality") && fieldRequirement.properties.cardinality;
|
|
76
90
|
return fieldCardinality ? cardinalityToRequired(fieldCardinality) || defaultIsRequired : defaultIsRequired;
|
|
77
91
|
};
|
|
92
|
+
exports.getFieldIsRequired = getFieldIsRequired;
|
|
78
93
|
var cardinalityToRequired = function (cardinality) {
|
|
79
94
|
switch (cardinality) {
|
|
80
95
|
case "0..0":
|
|
@@ -83,18 +98,18 @@ var cardinalityToRequired = function (cardinality) {
|
|
|
83
98
|
case "1..1":
|
|
84
99
|
return true;
|
|
85
100
|
default:
|
|
86
|
-
throw new Error("Cardinality \""
|
|
101
|
+
throw new Error("Cardinality \"".concat(cardinality, "\" is not supported"));
|
|
87
102
|
}
|
|
88
103
|
};
|
|
89
|
-
exports.handleValueValidation = lodash_1.debounce(function (isoNumber, fieldName, value, rapiBaseUrl, namePath, setValidationStatus, formInstance, callName) {
|
|
104
|
+
exports.handleValueValidation = (0, lodash_1.debounce)(function (isoNumber, fieldName, value, rapiBaseUrl, namePath, setValidationStatus, formInstance, callName) {
|
|
90
105
|
if (value.length === 0) {
|
|
91
106
|
setValidationStatus("");
|
|
92
107
|
formInstance.resetFields([namePath]);
|
|
93
108
|
}
|
|
94
109
|
else {
|
|
95
|
-
var searchUrl = rapiBaseUrl +
|
|
110
|
+
var searchUrl = rapiBaseUrl + "/api/v1/requirements/".concat(isoNumber, "/").concat(fieldName, "/values/validate?value=").concat(encodeURIComponent(value));
|
|
96
111
|
setValidationStatus("validating");
|
|
97
|
-
axios_1.default.get(searchUrl, { cancelToken: ApiUtility_1.getCancelToken(callName) })
|
|
112
|
+
axios_1.default.get(searchUrl, { cancelToken: (0, ApiUtility_1.getCancelToken)(callName) })
|
|
98
113
|
.then(function (response) {
|
|
99
114
|
response.data ? setValidationStatus("success") : setValidationStatus("error");
|
|
100
115
|
})
|
|
@@ -109,15 +124,15 @@ var handleValueSearch = function (searchValue, fieldDefinition, setLoadingValues
|
|
|
109
124
|
if (!loadingValues) {
|
|
110
125
|
setLoadingValues(true);
|
|
111
126
|
}
|
|
112
|
-
axios_1.default.get(searchUrl, { cancelToken: ApiUtility_1.getCancelToken(callName) })
|
|
127
|
+
axios_1.default.get(searchUrl, { cancelToken: (0, ApiUtility_1.getCancelToken)(callName) })
|
|
113
128
|
.then(function (response) {
|
|
114
129
|
setLoadingValues(false);
|
|
115
|
-
var updatedFieldDefinitions = receiverRequirements.fieldDefinitions
|
|
130
|
+
var updatedFieldDefinitions = __spreadArray([], receiverRequirements.fieldDefinitions, true);
|
|
116
131
|
var key = overwrittenFieldDefinitionKey ? overwrittenFieldDefinitionKey : fieldDefinition.key;
|
|
117
132
|
var index = updatedFieldDefinitions.findIndex(function (x) { return x.key === key; });
|
|
118
|
-
var updatedFieldDefinition = __assign({}, updatedFieldDefinitions[index], { properties: __assign({}, updatedFieldDefinitions[index].properties, { values: response.data.value }) });
|
|
133
|
+
var updatedFieldDefinition = __assign(__assign({}, updatedFieldDefinitions[index]), { properties: __assign(__assign({}, updatedFieldDefinitions[index].properties), { values: response.data.value }) });
|
|
119
134
|
updatedFieldDefinitions.splice(index, 1, updatedFieldDefinition);
|
|
120
|
-
var newReceiverRequirements = __assign({}, receiverRequirements, { fieldDefinitions: updatedFieldDefinitions });
|
|
135
|
+
var newReceiverRequirements = __assign(__assign({}, receiverRequirements), { fieldDefinitions: updatedFieldDefinitions });
|
|
121
136
|
updateReceiverRequirementsProp(newReceiverRequirements);
|
|
122
137
|
})
|
|
123
138
|
.catch(function (error) {
|
|
@@ -125,16 +140,16 @@ var handleValueSearch = function (searchValue, fieldDefinition, setLoadingValues
|
|
|
125
140
|
});
|
|
126
141
|
}
|
|
127
142
|
};
|
|
128
|
-
exports.debouncedHandleSearchValues = lodash_1.debounce(handleValueSearch, 500);
|
|
129
|
-
|
|
143
|
+
exports.debouncedHandleSearchValues = (0, lodash_1.debounce)(handleValueSearch, 500);
|
|
144
|
+
var getInput = function (fieldDefinition, namePath, validationCallName, legalIdentifier, formInstance, rapiBaseUrl, receiverRequirements, updateReceiverRequirementsProp, setAccountingCostFieldProps, accountingCostFieldProps, setLoadingAccountingCostValues, loadingAccountingCostValues, setHandlingValidationStatus, defaultPlaceholder, allowClearSelect) {
|
|
130
145
|
var handling = null;
|
|
131
146
|
if (fieldDefinition.properties.handling) {
|
|
132
147
|
handling = JSON.parse(fieldDefinition.properties.handling);
|
|
133
148
|
}
|
|
134
|
-
var placeholder = exports.
|
|
149
|
+
var placeholder = (0, exports.getFieldLabelOverride)(receiverRequirements, fieldDefinition.key, defaultPlaceholder);
|
|
135
150
|
if (handling && handling.shouldBeValidated) {
|
|
136
151
|
return (react_1.default.createElement(antd_1.Input, { onBlur: function (event) {
|
|
137
|
-
exports.handleValueValidation(legalIdentifier, fieldDefinition.name, event.currentTarget.value, rapiBaseUrl, namePath, setHandlingValidationStatus, formInstance, validationCallName);
|
|
152
|
+
(0, exports.handleValueValidation)(legalIdentifier, fieldDefinition.name, event.currentTarget.value, rapiBaseUrl, namePath, setHandlingValidationStatus, formInstance, validationCallName);
|
|
138
153
|
}, placeholder: placeholder }));
|
|
139
154
|
}
|
|
140
155
|
else if (fieldDefinition.properties.values) {
|
|
@@ -143,12 +158,12 @@ exports.getInput = function (fieldDefinition, namePath, validationCallName, lega
|
|
|
143
158
|
showSearch: true,
|
|
144
159
|
filterOption: false,
|
|
145
160
|
onSearch: function (searchValue) {
|
|
146
|
-
exports.debouncedHandleSearchValues(searchValue, fieldDefinition, setLoadingAccountingCostValues, loadingAccountingCostValues, receiverRequirements, updateReceiverRequirementsProp, "getAccountingCOstValues", rapiBaseUrl);
|
|
161
|
+
(0, exports.debouncedHandleSearchValues)(searchValue, fieldDefinition, setLoadingAccountingCostValues, loadingAccountingCostValues, receiverRequirements, updateReceiverRequirementsProp, "getAccountingCOstValues", rapiBaseUrl);
|
|
147
162
|
},
|
|
148
163
|
loading: loadingAccountingCostValues,
|
|
149
164
|
}
|
|
150
165
|
: {};
|
|
151
|
-
return (react_1.default.createElement(antd_1.Select, __assign({
|
|
166
|
+
return (react_1.default.createElement(antd_1.Select, __assign({ popupMatchSelectWidth: false, allowClear: allowClearSelect }, selectProps, { placeholder: placeholder }), fieldDefinition.properties.values.map(function (op) {
|
|
152
167
|
return react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: op.key }, op.name);
|
|
153
168
|
})));
|
|
154
169
|
}
|
|
@@ -156,3 +171,12 @@ exports.getInput = function (fieldDefinition, namePath, validationCallName, lega
|
|
|
156
171
|
return (react_1.default.createElement(antd_1.Input, { allowClear: allowClearSelect, placeholder: placeholder }));
|
|
157
172
|
}
|
|
158
173
|
};
|
|
174
|
+
exports.getInput = getInput;
|
|
175
|
+
var getRequiredTooltipMessage = function (title, fieldNames) {
|
|
176
|
+
return (react_1.default.createElement("div", null,
|
|
177
|
+
react_1.default.createElement(antd_1.Row, null, title),
|
|
178
|
+
react_1.default.createElement(antd_1.Row, { wrap: false },
|
|
179
|
+
react_1.default.createElement("div", { className: "flex_direction_column", style: { minWidth: "100px" } },
|
|
180
|
+
react_1.default.createElement("ul", { style: { paddingLeft: "20px" } }, fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.map(function (fieldName) { return react_1.default.createElement("li", null, fieldName); }))))));
|
|
181
|
+
};
|
|
182
|
+
exports.getRequiredTooltipMessage = getRequiredTooltipMessage;
|
package/lib/utils/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.submitDocument = exports.submitInvoice = exports.convertToInvoiceMetadataInput = void 0;
|
|
3
4
|
var ConversionUtility_1 = require("./ConversionUtility");
|
|
4
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "convertToInvoiceMetadataInput", { enumerable: true, get: function () { return ConversionUtility_1.convertToInvoiceMetadataInput; } }); /*, convertToCreditNoteMetadataInput*/
|
|
5
6
|
var ApiUtility_1 = require("./ApiUtility");
|
|
6
|
-
exports
|
|
7
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "submitInvoice", { enumerable: true, get: function () { return ApiUtility_1.submitInvoice; } });
|
|
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": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -8,29 +8,34 @@
|
|
|
8
8
|
"lib/**/*"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@ant-design/compatible": "
|
|
11
|
+
"@ant-design/compatible": "latest",
|
|
12
12
|
"@unimaze/api-clients": "3.1.1",
|
|
13
13
|
"antd-mask-input": "^0.1.13",
|
|
14
|
+
"dayjs": "^1.11.10",
|
|
14
15
|
"lodash": "^4.17.21",
|
|
15
16
|
"react-hot-loader": "^4.12.20",
|
|
16
|
-
"react-intl": "
|
|
17
|
+
"react-intl": "3.12.1",
|
|
18
|
+
"react-use": "^17.5.0",
|
|
17
19
|
"reaptcha": "^1.7.2",
|
|
18
20
|
"uuid": "latest"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
23
|
+
"@formatjs/cli": "^6.0.4",
|
|
21
24
|
"@hot-loader/react-dom": "^16.13.0+4.12.20",
|
|
22
25
|
"@types/lodash": "^4.14.149",
|
|
23
|
-
"@types/react": "
|
|
24
|
-
"@types/react-dom": "
|
|
25
|
-
"@types/react-intl": "2.3.18",
|
|
26
|
+
"@types/react": "17.0.83",
|
|
27
|
+
"@types/react-dom": "17.0.25",
|
|
26
28
|
"@types/uuid": "latest",
|
|
27
|
-
"antd": "
|
|
29
|
+
"antd": "^5.15.2",
|
|
28
30
|
"awesome-typescript-loader": "^5.2.1",
|
|
29
31
|
"axios": "^0.20.0",
|
|
30
32
|
"babel-loader": "^8.1.0",
|
|
33
|
+
"babel-plugin-formatjs": "^10.5.16",
|
|
34
|
+
"babel-plugin-react-intl": "^8.2.25",
|
|
31
35
|
"copyfiles": "^2.2.0",
|
|
32
36
|
"cross-env": "^7.0.2",
|
|
33
37
|
"css-loader": "^3.5.1",
|
|
38
|
+
"eslint-plugin-formatjs": "^4.13.3",
|
|
34
39
|
"file-loader": "^6.0.0",
|
|
35
40
|
"less": "^3.11.1",
|
|
36
41
|
"less-loader": "^5.0.0",
|
|
@@ -38,34 +43,34 @@
|
|
|
38
43
|
"mini-css-extract-plugin": "^0.9.0",
|
|
39
44
|
"npm-watch": "^0.6.0",
|
|
40
45
|
"open-browser-webpack-plugin": "^0.0.5",
|
|
41
|
-
"react": "
|
|
42
|
-
"react-dom": "
|
|
46
|
+
"react": "17.0.2",
|
|
47
|
+
"react-dom": "17.0.2",
|
|
43
48
|
"rimraf": "^3.0.2",
|
|
44
49
|
"style-loader": "^1.1.3",
|
|
45
50
|
"tslint": "^6.1.1",
|
|
46
51
|
"tslint-config-prettier": "^1.18.0",
|
|
47
|
-
"typescript": "
|
|
52
|
+
"typescript": "4",
|
|
48
53
|
"url-loader": "^4.0.0",
|
|
49
54
|
"webpack": "^4.42.1",
|
|
50
55
|
"webpack-cli": "^3.3.11",
|
|
51
56
|
"webpack-dev-server": "^3.10.3"
|
|
52
57
|
},
|
|
53
58
|
"peerDependencies": {
|
|
54
|
-
"antd": "
|
|
55
|
-
"axios": "^0.
|
|
56
|
-
"react": "
|
|
57
|
-
"react-dom": "
|
|
59
|
+
"antd": "^5.15.2",
|
|
60
|
+
"axios": "^0.20.0",
|
|
61
|
+
"react": "17.0.2",
|
|
62
|
+
"react-dom": "17.0.2"
|
|
58
63
|
},
|
|
59
64
|
"resolutions": {
|
|
60
|
-
"@types/react": "
|
|
61
|
-
"@types/react-dom": "
|
|
65
|
+
"@types/react": "17.0.83",
|
|
66
|
+
"@types/react-dom": "17.0.25"
|
|
62
67
|
},
|
|
63
68
|
"watch": {
|
|
64
69
|
"build": {
|
|
65
70
|
"patterns": [
|
|
66
71
|
"src"
|
|
67
72
|
],
|
|
68
|
-
"extensions": "ts,tsx,less"
|
|
73
|
+
"extensions": "ts,tsx,less,json"
|
|
69
74
|
}
|
|
70
75
|
},
|
|
71
76
|
"scripts": {
|
|
@@ -83,7 +88,20 @@
|
|
|
83
88
|
"examples": "webpack-dev-server --hot --mode development --config example/webpack.config.js",
|
|
84
89
|
"examples:clean": "rimraf example/dist",
|
|
85
90
|
"examples:build": "webpack -d --mode development --config example/webpack.config.js",
|
|
86
|
-
"start": "yarn run examples"
|
|
91
|
+
"start": "yarn run examples",
|
|
92
|
+
"localize": "yarn run localize:extract && yarn run localize:compile && yarn localize:mergeTranslations",
|
|
93
|
+
"localize:extract": "formatjs extract \"src/**/*.{ts,tsx}\" --ignore \"./src/**/*.{d,test}.{ts,tsx}\" --out-file src/translations/source/strings.json --id-interpolation-pattern [sha512:contenthash:base64:6] --extract-source-location",
|
|
94
|
+
"localize:compile": "formatjs compile src/translations/source/strings.json --out-file src/translations/locales/en.json",
|
|
95
|
+
"localize:mergeTranslations": "node mergeTranslations.cjs"
|
|
96
|
+
},
|
|
97
|
+
"eslintConfig": {
|
|
98
|
+
"extends": "react-app",
|
|
99
|
+
"plugins": [
|
|
100
|
+
"formatjs"
|
|
101
|
+
],
|
|
102
|
+
"rules": {
|
|
103
|
+
"formatjs/no-offset": "error"
|
|
104
|
+
}
|
|
87
105
|
},
|
|
88
106
|
"author": "",
|
|
89
107
|
"license": "SEE LICENSE IN LICENSE.txt",
|
package/lib/style/index.css
DELETED
|
@@ -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 */
|