@commercetools-frontend/react-notifications 22.38.3 → 22.39.1
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.
|
@@ -61,7 +61,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
|
|
|
61
61
|
var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
|
|
62
62
|
|
|
63
63
|
// NOTE: This string will be replaced on build time with the package version.
|
|
64
|
-
var version = "22.
|
|
64
|
+
var version = "22.39.1";
|
|
65
65
|
|
|
66
66
|
const Context = /*#__PURE__*/react.createContext(() => null);
|
|
67
67
|
function NotificationProviderForCustomComponent(props) {
|
|
@@ -83,8 +83,9 @@ function filterDataAttributes(obj) {
|
|
|
83
83
|
|
|
84
84
|
var messages = reactIntl.defineMessages({
|
|
85
85
|
hideNotification: {
|
|
86
|
-
id:
|
|
87
|
-
|
|
86
|
+
id: 'Notification.hideNotification',
|
|
87
|
+
description: 'Label for button to hide notification',
|
|
88
|
+
defaultMessage: 'Hide notification'
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
|
|
@@ -240,127 +241,157 @@ Notification.displayName = 'Notification';
|
|
|
240
241
|
|
|
241
242
|
var apiErrorMessages = reactIntl.defineMessages({
|
|
242
243
|
General: {
|
|
243
|
-
id:
|
|
244
|
-
|
|
244
|
+
id: 'ApiError.General',
|
|
245
|
+
description: 'A general error message, usually because of internal application problems. The user should not know the details of the error.',
|
|
246
|
+
defaultMessage: 'Sorry, but there seems to be something wrong. Please try again. If you are seeing this message for the second time, please contact our support team.'
|
|
245
247
|
},
|
|
246
248
|
// Custom API Error messages (without a matching error.code)
|
|
247
249
|
OverlappingPrices: {
|
|
248
|
-
id:
|
|
249
|
-
|
|
250
|
+
id: 'ApiError.OverlappingPrices',
|
|
251
|
+
description: '',
|
|
252
|
+
defaultMessage: 'Sorry, but a price with these details already exists. Please amend the price details so that they do not overlap with another price before saving.'
|
|
250
253
|
},
|
|
251
254
|
ConcurrentModificationBulkEdit: {
|
|
252
|
-
id:
|
|
253
|
-
|
|
255
|
+
id: 'ApiError.ConcurrentModificationBulkEdit',
|
|
256
|
+
description: 'User does a bulk update but someone else has saved changes for that element',
|
|
257
|
+
defaultMessage: 'Sorry, but we were unable to save your changes as someone else made changes to this same source while you were editing.'
|
|
254
258
|
},
|
|
255
259
|
// API errors
|
|
256
260
|
ConcurrentModification: {
|
|
257
|
-
id:
|
|
258
|
-
|
|
261
|
+
id: 'ApiError.ConcurrentModification',
|
|
262
|
+
description: 'User edits form and clicks Save but someone else has saved changes for this element while they were editing',
|
|
263
|
+
defaultMessage: 'Sorry, but we were unable to save your changes as someone else made changes to this same source while you were editing. Please refresh the page and re-enter your changes.'
|
|
259
264
|
},
|
|
260
265
|
DuplicateAttributeValue: {
|
|
261
|
-
id:
|
|
262
|
-
|
|
266
|
+
id: 'ApiError.DuplicateAttributeValue',
|
|
267
|
+
description: 'User tries to enter the same attribute value for an attribute with the Unique constraint',
|
|
268
|
+
defaultMessage: 'This value has already been used for another variant. The "{name}" value must be unique for all variants for this product. Please enter a different value.'
|
|
263
269
|
},
|
|
264
270
|
DuplicateAttributeValues: {
|
|
265
|
-
id:
|
|
266
|
-
|
|
271
|
+
id: 'ApiError.DuplicateAttributeValues',
|
|
272
|
+
description: 'User tries to enter existing attribute values for a combination of attributes with the CombinationUnique constraint',
|
|
273
|
+
defaultMessage: 'This combination has already been used for another variant. The combination of these attributes must be unique across all variants. Please enter a different version.'
|
|
267
274
|
},
|
|
268
275
|
DuplicateField: {
|
|
269
|
-
id:
|
|
270
|
-
|
|
276
|
+
id: 'ApiError.DuplicateField',
|
|
277
|
+
description: 'The given field must be unique across the project',
|
|
278
|
+
defaultMessage: 'The value for the field "{field}" has already been used. Please choose another value for this field.'
|
|
271
279
|
},
|
|
272
280
|
DuplicateSlug: {
|
|
273
|
-
id:
|
|
274
|
-
|
|
281
|
+
id: 'ApiError.DuplicateSlug',
|
|
282
|
+
description: 'User tries to create a resource with an already existing slug',
|
|
283
|
+
defaultMessage: '"{slugValue}" is already in use. Please enter a new slug value for this product.'
|
|
275
284
|
},
|
|
276
285
|
DuplicatePriceScope: {
|
|
277
|
-
id:
|
|
278
|
-
|
|
286
|
+
id: 'ApiError.DuplicatePriceScope',
|
|
287
|
+
description: 'User tries to create a price with the exact same values as for an already existing price',
|
|
288
|
+
defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel and valid dates is unique per price.'
|
|
279
289
|
},
|
|
280
290
|
DuplicateStandalonePriceScope: {
|
|
281
|
-
id:
|
|
282
|
-
|
|
291
|
+
id: 'ApiError.DuplicateStandalonePriceScope',
|
|
292
|
+
description: 'User tries to create a standalone price with the exact same values as for an already existing standalone price',
|
|
293
|
+
defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel and validity date must be unique for each price per SKU.'
|
|
283
294
|
},
|
|
284
295
|
DuplicateVariantValues: {
|
|
285
|
-
id:
|
|
286
|
-
|
|
296
|
+
id: 'ApiError.DuplicateVariantValues',
|
|
297
|
+
description: 'User tries to generate a variant with the same SKU or attribute values',
|
|
298
|
+
defaultMessage: 'The same variant already exists for this product. Please enter different values for the fields.'
|
|
287
299
|
},
|
|
288
300
|
InvalidDateRange: {
|
|
289
|
-
id:
|
|
290
|
-
|
|
301
|
+
id: 'ApiError.InvalidDateRange',
|
|
302
|
+
description: 'User tries to input an invalid date range',
|
|
303
|
+
defaultMessage: 'The value entered for the field {field} is invalid. The start date must be before the end date'
|
|
291
304
|
},
|
|
292
305
|
InvalidField: {
|
|
293
|
-
id:
|
|
294
|
-
|
|
306
|
+
id: 'ApiError.InvalidField',
|
|
307
|
+
description: 'User enters an invalid value for a field.',
|
|
308
|
+
defaultMessage: 'The value entered is not valid for the field "{field}".'
|
|
295
309
|
},
|
|
296
310
|
InvalidSlug: {
|
|
297
|
-
id:
|
|
298
|
-
|
|
311
|
+
id: 'ApiError.InvalidSlug',
|
|
312
|
+
description: 'User enters an invalid value for the product slug',
|
|
313
|
+
defaultMessage: 'Slugs may only contain alphanumeric (0-9A-Z) characters, underscores and hyphens and must have a length between 2 and 256 characters.'
|
|
299
314
|
},
|
|
300
315
|
OverlappingPriceValidity: {
|
|
301
|
-
id:
|
|
302
|
-
|
|
316
|
+
id: 'ApiError.OverlappingPriceValidity',
|
|
317
|
+
description: 'Returned when a given price validity period conflicts with an existing one',
|
|
318
|
+
defaultMessage: 'Another price with overlapping validity dates exists. Each price combination needs to have unique validity dates.'
|
|
303
319
|
},
|
|
304
320
|
OverlappingStandalonePriceValidity: {
|
|
305
|
-
id:
|
|
306
|
-
|
|
321
|
+
id: 'ApiError.OverlappingStandalonePriceValidity',
|
|
322
|
+
description: 'Returned when a given standalone price validity period conflicts with an existing one',
|
|
323
|
+
defaultMessage: 'Another price with overlapping validity dates exists. Each price combination needs to have unique validity dates.'
|
|
307
324
|
},
|
|
308
325
|
PendingOperation: {
|
|
309
|
-
id:
|
|
310
|
-
|
|
326
|
+
id: 'ApiError.PendingOperation',
|
|
327
|
+
description: 'User tries to start a new process when one is already underway',
|
|
328
|
+
defaultMessage: 'Sorry, but we are still processing the previous request. Please try again once it is complete.'
|
|
311
329
|
},
|
|
312
330
|
ResourceNotFound: {
|
|
313
|
-
id:
|
|
314
|
-
|
|
331
|
+
id: 'ApiError.ResourceNotFound',
|
|
332
|
+
description: 'System cannot find the functionality or screen that the user is trying to access.',
|
|
333
|
+
defaultMessage: 'Sorry, but we cannot find what you are looking for.'
|
|
315
334
|
},
|
|
316
335
|
ReferenceExists: {
|
|
317
|
-
id:
|
|
318
|
-
|
|
336
|
+
id: 'ApiError.ReferenceExists',
|
|
337
|
+
description: 'User tries to delete an element that has an existing reference to it from another element',
|
|
338
|
+
defaultMessage: 'Can not delete a source while it is referenced from at least one "{referencedBy}".'
|
|
319
339
|
},
|
|
320
340
|
RequiredField: {
|
|
321
|
-
id:
|
|
322
|
-
|
|
341
|
+
id: 'ApiError.RequiredField',
|
|
342
|
+
description: 'User does not enter a required field',
|
|
343
|
+
defaultMessage: '"{field}" is a required field. Please enter a value.'
|
|
323
344
|
},
|
|
324
345
|
RequiredFields: {
|
|
325
346
|
// Client side validation
|
|
326
|
-
id:
|
|
327
|
-
|
|
347
|
+
id: 'ApiError.RequiredFields',
|
|
348
|
+
description: 'User submits a form without having completed all mandatory fields',
|
|
349
|
+
defaultMessage: 'Please enter values for the following required fields: {fields}'
|
|
328
350
|
},
|
|
329
351
|
SemanticError: {
|
|
330
|
-
id:
|
|
331
|
-
|
|
352
|
+
id: 'ApiError.SemanticError',
|
|
353
|
+
description: 'User enters a predicate query that throws a system semantic error',
|
|
354
|
+
defaultMessage: 'Semantic error: the given Predicate is not valid. Please read the documentation to define a correct predicate.'
|
|
332
355
|
},
|
|
333
356
|
SyntaxError: {
|
|
334
|
-
id:
|
|
335
|
-
|
|
357
|
+
id: 'ApiError.SyntaxError',
|
|
358
|
+
description: 'User enters a predicate query that throws a system syntax error',
|
|
359
|
+
defaultMessage: 'Syntax error: the given Predicate is not valid. Please read the documentation to define a correct predicate.'
|
|
336
360
|
},
|
|
337
361
|
Unauthorized: {
|
|
338
|
-
id:
|
|
339
|
-
|
|
362
|
+
id: 'ApiError.Unauthorized',
|
|
363
|
+
description: 'The access token is not valid anymore, or the user does not have a valid one',
|
|
364
|
+
defaultMessage: 'Sorry, but you are not authorized to access this feature.'
|
|
340
365
|
},
|
|
341
366
|
Forbidden: {
|
|
342
|
-
id:
|
|
343
|
-
|
|
367
|
+
id: 'ApiError.Forbidden',
|
|
368
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
369
|
+
defaultMessage: 'You are not authorized to access this feature. Please contact your system administrator with any further questions.'
|
|
344
370
|
},
|
|
345
371
|
ExtensionNoResponse: {
|
|
346
|
-
id:
|
|
347
|
-
|
|
372
|
+
id: 'ApiError.ExtensionNoResponse',
|
|
373
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
374
|
+
defaultMessage: 'Sorry, we could not perform the requested action due to an API extension not responding.'
|
|
348
375
|
},
|
|
349
376
|
ExtensionBadResponse: {
|
|
350
|
-
id:
|
|
351
|
-
|
|
377
|
+
id: 'ApiError.ExtensionBadResponse',
|
|
378
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
379
|
+
defaultMessage: 'Sorry, we could not perform the requested action due to failed processing of an API extension response.'
|
|
352
380
|
},
|
|
353
381
|
ExtensionUpdateActionsFailed: {
|
|
354
|
-
id:
|
|
355
|
-
|
|
382
|
+
id: 'ApiError.ExtensionUpdateActionsFailed',
|
|
383
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
384
|
+
defaultMessage: 'Sorry, we could not perform the requested action. It is not possible to perform the update actions as instructed by the API extension.'
|
|
356
385
|
},
|
|
357
386
|
TaxCategoryDuplicateCountry: {
|
|
358
|
-
id:
|
|
359
|
-
|
|
387
|
+
id: 'ApiError.TaxCategoryDuplicateCountry',
|
|
388
|
+
description: 'User inputs duplicate country and/or state into tax category form',
|
|
389
|
+
defaultMessage: 'Duplicate tax rates submitted. Please remove the duplicates.'
|
|
360
390
|
},
|
|
361
391
|
MaxResourceLimitExceeded: {
|
|
362
|
-
id:
|
|
363
|
-
|
|
392
|
+
id: 'ApiError.MaxResourceLimitExceeded',
|
|
393
|
+
description: 'User attempts to create a resource while having already reached the limit',
|
|
394
|
+
defaultMessage: 'The project reached the limit for the resource. To add more resources delete existing ones or reach out to the administrator or contact customer support.'
|
|
364
395
|
}
|
|
365
396
|
});
|
|
366
397
|
|
|
@@ -61,7 +61,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
|
|
|
61
61
|
var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
|
|
62
62
|
|
|
63
63
|
// NOTE: This string will be replaced on build time with the package version.
|
|
64
|
-
var version = "22.
|
|
64
|
+
var version = "22.39.1";
|
|
65
65
|
|
|
66
66
|
const Context = /*#__PURE__*/react.createContext(() => null);
|
|
67
67
|
function NotificationProviderForCustomComponent(props) {
|
|
@@ -80,8 +80,9 @@ function filterDataAttributes(obj) {
|
|
|
80
80
|
|
|
81
81
|
var messages = reactIntl.defineMessages({
|
|
82
82
|
hideNotification: {
|
|
83
|
-
id:
|
|
84
|
-
|
|
83
|
+
id: 'Notification.hideNotification',
|
|
84
|
+
description: 'Label for button to hide notification',
|
|
85
|
+
defaultMessage: 'Hide notification'
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
|
|
@@ -228,127 +229,157 @@ Notification.displayName = 'Notification';
|
|
|
228
229
|
|
|
229
230
|
var apiErrorMessages = reactIntl.defineMessages({
|
|
230
231
|
General: {
|
|
231
|
-
id:
|
|
232
|
-
|
|
232
|
+
id: 'ApiError.General',
|
|
233
|
+
description: 'A general error message, usually because of internal application problems. The user should not know the details of the error.',
|
|
234
|
+
defaultMessage: 'Sorry, but there seems to be something wrong. Please try again. If you are seeing this message for the second time, please contact our support team.'
|
|
233
235
|
},
|
|
234
236
|
// Custom API Error messages (without a matching error.code)
|
|
235
237
|
OverlappingPrices: {
|
|
236
|
-
id:
|
|
237
|
-
|
|
238
|
+
id: 'ApiError.OverlappingPrices',
|
|
239
|
+
description: '',
|
|
240
|
+
defaultMessage: 'Sorry, but a price with these details already exists. Please amend the price details so that they do not overlap with another price before saving.'
|
|
238
241
|
},
|
|
239
242
|
ConcurrentModificationBulkEdit: {
|
|
240
|
-
id:
|
|
241
|
-
|
|
243
|
+
id: 'ApiError.ConcurrentModificationBulkEdit',
|
|
244
|
+
description: 'User does a bulk update but someone else has saved changes for that element',
|
|
245
|
+
defaultMessage: 'Sorry, but we were unable to save your changes as someone else made changes to this same source while you were editing.'
|
|
242
246
|
},
|
|
243
247
|
// API errors
|
|
244
248
|
ConcurrentModification: {
|
|
245
|
-
id:
|
|
246
|
-
|
|
249
|
+
id: 'ApiError.ConcurrentModification',
|
|
250
|
+
description: 'User edits form and clicks Save but someone else has saved changes for this element while they were editing',
|
|
251
|
+
defaultMessage: 'Sorry, but we were unable to save your changes as someone else made changes to this same source while you were editing. Please refresh the page and re-enter your changes.'
|
|
247
252
|
},
|
|
248
253
|
DuplicateAttributeValue: {
|
|
249
|
-
id:
|
|
250
|
-
|
|
254
|
+
id: 'ApiError.DuplicateAttributeValue',
|
|
255
|
+
description: 'User tries to enter the same attribute value for an attribute with the Unique constraint',
|
|
256
|
+
defaultMessage: 'This value has already been used for another variant. The "{name}" value must be unique for all variants for this product. Please enter a different value.'
|
|
251
257
|
},
|
|
252
258
|
DuplicateAttributeValues: {
|
|
253
|
-
id:
|
|
254
|
-
|
|
259
|
+
id: 'ApiError.DuplicateAttributeValues',
|
|
260
|
+
description: 'User tries to enter existing attribute values for a combination of attributes with the CombinationUnique constraint',
|
|
261
|
+
defaultMessage: 'This combination has already been used for another variant. The combination of these attributes must be unique across all variants. Please enter a different version.'
|
|
255
262
|
},
|
|
256
263
|
DuplicateField: {
|
|
257
|
-
id:
|
|
258
|
-
|
|
264
|
+
id: 'ApiError.DuplicateField',
|
|
265
|
+
description: 'The given field must be unique across the project',
|
|
266
|
+
defaultMessage: 'The value for the field "{field}" has already been used. Please choose another value for this field.'
|
|
259
267
|
},
|
|
260
268
|
DuplicateSlug: {
|
|
261
|
-
id:
|
|
262
|
-
|
|
269
|
+
id: 'ApiError.DuplicateSlug',
|
|
270
|
+
description: 'User tries to create a resource with an already existing slug',
|
|
271
|
+
defaultMessage: '"{slugValue}" is already in use. Please enter a new slug value for this product.'
|
|
263
272
|
},
|
|
264
273
|
DuplicatePriceScope: {
|
|
265
|
-
id:
|
|
266
|
-
|
|
274
|
+
id: 'ApiError.DuplicatePriceScope',
|
|
275
|
+
description: 'User tries to create a price with the exact same values as for an already existing price',
|
|
276
|
+
defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel and valid dates is unique per price.'
|
|
267
277
|
},
|
|
268
278
|
DuplicateStandalonePriceScope: {
|
|
269
|
-
id:
|
|
270
|
-
|
|
279
|
+
id: 'ApiError.DuplicateStandalonePriceScope',
|
|
280
|
+
description: 'User tries to create a standalone price with the exact same values as for an already existing standalone price',
|
|
281
|
+
defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel and validity date must be unique for each price per SKU.'
|
|
271
282
|
},
|
|
272
283
|
DuplicateVariantValues: {
|
|
273
|
-
id:
|
|
274
|
-
|
|
284
|
+
id: 'ApiError.DuplicateVariantValues',
|
|
285
|
+
description: 'User tries to generate a variant with the same SKU or attribute values',
|
|
286
|
+
defaultMessage: 'The same variant already exists for this product. Please enter different values for the fields.'
|
|
275
287
|
},
|
|
276
288
|
InvalidDateRange: {
|
|
277
|
-
id:
|
|
278
|
-
|
|
289
|
+
id: 'ApiError.InvalidDateRange',
|
|
290
|
+
description: 'User tries to input an invalid date range',
|
|
291
|
+
defaultMessage: 'The value entered for the field {field} is invalid. The start date must be before the end date'
|
|
279
292
|
},
|
|
280
293
|
InvalidField: {
|
|
281
|
-
id:
|
|
282
|
-
|
|
294
|
+
id: 'ApiError.InvalidField',
|
|
295
|
+
description: 'User enters an invalid value for a field.',
|
|
296
|
+
defaultMessage: 'The value entered is not valid for the field "{field}".'
|
|
283
297
|
},
|
|
284
298
|
InvalidSlug: {
|
|
285
|
-
id:
|
|
286
|
-
|
|
299
|
+
id: 'ApiError.InvalidSlug',
|
|
300
|
+
description: 'User enters an invalid value for the product slug',
|
|
301
|
+
defaultMessage: 'Slugs may only contain alphanumeric (0-9A-Z) characters, underscores and hyphens and must have a length between 2 and 256 characters.'
|
|
287
302
|
},
|
|
288
303
|
OverlappingPriceValidity: {
|
|
289
|
-
id:
|
|
290
|
-
|
|
304
|
+
id: 'ApiError.OverlappingPriceValidity',
|
|
305
|
+
description: 'Returned when a given price validity period conflicts with an existing one',
|
|
306
|
+
defaultMessage: 'Another price with overlapping validity dates exists. Each price combination needs to have unique validity dates.'
|
|
291
307
|
},
|
|
292
308
|
OverlappingStandalonePriceValidity: {
|
|
293
|
-
id:
|
|
294
|
-
|
|
309
|
+
id: 'ApiError.OverlappingStandalonePriceValidity',
|
|
310
|
+
description: 'Returned when a given standalone price validity period conflicts with an existing one',
|
|
311
|
+
defaultMessage: 'Another price with overlapping validity dates exists. Each price combination needs to have unique validity dates.'
|
|
295
312
|
},
|
|
296
313
|
PendingOperation: {
|
|
297
|
-
id:
|
|
298
|
-
|
|
314
|
+
id: 'ApiError.PendingOperation',
|
|
315
|
+
description: 'User tries to start a new process when one is already underway',
|
|
316
|
+
defaultMessage: 'Sorry, but we are still processing the previous request. Please try again once it is complete.'
|
|
299
317
|
},
|
|
300
318
|
ResourceNotFound: {
|
|
301
|
-
id:
|
|
302
|
-
|
|
319
|
+
id: 'ApiError.ResourceNotFound',
|
|
320
|
+
description: 'System cannot find the functionality or screen that the user is trying to access.',
|
|
321
|
+
defaultMessage: 'Sorry, but we cannot find what you are looking for.'
|
|
303
322
|
},
|
|
304
323
|
ReferenceExists: {
|
|
305
|
-
id:
|
|
306
|
-
|
|
324
|
+
id: 'ApiError.ReferenceExists',
|
|
325
|
+
description: 'User tries to delete an element that has an existing reference to it from another element',
|
|
326
|
+
defaultMessage: 'Can not delete a source while it is referenced from at least one "{referencedBy}".'
|
|
307
327
|
},
|
|
308
328
|
RequiredField: {
|
|
309
|
-
id:
|
|
310
|
-
|
|
329
|
+
id: 'ApiError.RequiredField',
|
|
330
|
+
description: 'User does not enter a required field',
|
|
331
|
+
defaultMessage: '"{field}" is a required field. Please enter a value.'
|
|
311
332
|
},
|
|
312
333
|
RequiredFields: {
|
|
313
334
|
// Client side validation
|
|
314
|
-
id:
|
|
315
|
-
|
|
335
|
+
id: 'ApiError.RequiredFields',
|
|
336
|
+
description: 'User submits a form without having completed all mandatory fields',
|
|
337
|
+
defaultMessage: 'Please enter values for the following required fields: {fields}'
|
|
316
338
|
},
|
|
317
339
|
SemanticError: {
|
|
318
|
-
id:
|
|
319
|
-
|
|
340
|
+
id: 'ApiError.SemanticError',
|
|
341
|
+
description: 'User enters a predicate query that throws a system semantic error',
|
|
342
|
+
defaultMessage: 'Semantic error: the given Predicate is not valid. Please read the documentation to define a correct predicate.'
|
|
320
343
|
},
|
|
321
344
|
SyntaxError: {
|
|
322
|
-
id:
|
|
323
|
-
|
|
345
|
+
id: 'ApiError.SyntaxError',
|
|
346
|
+
description: 'User enters a predicate query that throws a system syntax error',
|
|
347
|
+
defaultMessage: 'Syntax error: the given Predicate is not valid. Please read the documentation to define a correct predicate.'
|
|
324
348
|
},
|
|
325
349
|
Unauthorized: {
|
|
326
|
-
id:
|
|
327
|
-
|
|
350
|
+
id: 'ApiError.Unauthorized',
|
|
351
|
+
description: 'The access token is not valid anymore, or the user does not have a valid one',
|
|
352
|
+
defaultMessage: 'Sorry, but you are not authorized to access this feature.'
|
|
328
353
|
},
|
|
329
354
|
Forbidden: {
|
|
330
|
-
id:
|
|
331
|
-
|
|
355
|
+
id: 'ApiError.Forbidden',
|
|
356
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
357
|
+
defaultMessage: 'You are not authorized to access this feature. Please contact your system administrator with any further questions.'
|
|
332
358
|
},
|
|
333
359
|
ExtensionNoResponse: {
|
|
334
|
-
id:
|
|
335
|
-
|
|
360
|
+
id: 'ApiError.ExtensionNoResponse',
|
|
361
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
362
|
+
defaultMessage: 'Sorry, we could not perform the requested action due to an API extension not responding.'
|
|
336
363
|
},
|
|
337
364
|
ExtensionBadResponse: {
|
|
338
|
-
id:
|
|
339
|
-
|
|
365
|
+
id: 'ApiError.ExtensionBadResponse',
|
|
366
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
367
|
+
defaultMessage: 'Sorry, we could not perform the requested action due to failed processing of an API extension response.'
|
|
340
368
|
},
|
|
341
369
|
ExtensionUpdateActionsFailed: {
|
|
342
|
-
id:
|
|
343
|
-
|
|
370
|
+
id: 'ApiError.ExtensionUpdateActionsFailed',
|
|
371
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
372
|
+
defaultMessage: 'Sorry, we could not perform the requested action. It is not possible to perform the update actions as instructed by the API extension.'
|
|
344
373
|
},
|
|
345
374
|
TaxCategoryDuplicateCountry: {
|
|
346
|
-
id:
|
|
347
|
-
|
|
375
|
+
id: 'ApiError.TaxCategoryDuplicateCountry',
|
|
376
|
+
description: 'User inputs duplicate country and/or state into tax category form',
|
|
377
|
+
defaultMessage: 'Duplicate tax rates submitted. Please remove the duplicates.'
|
|
348
378
|
},
|
|
349
379
|
MaxResourceLimitExceeded: {
|
|
350
|
-
id:
|
|
351
|
-
|
|
380
|
+
id: 'ApiError.MaxResourceLimitExceeded',
|
|
381
|
+
description: 'User attempts to create a resource while having already reached the limit',
|
|
382
|
+
defaultMessage: 'The project reached the limit for the resource. To add more resources delete existing ones or reach out to the administrator or contact customer support.'
|
|
352
383
|
}
|
|
353
384
|
});
|
|
354
385
|
|
|
@@ -35,7 +35,7 @@ import isNumber from 'lodash/isNumber';
|
|
|
35
35
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
36
36
|
|
|
37
37
|
// NOTE: This string will be replaced on build time with the package version.
|
|
38
|
-
var version = "22.
|
|
38
|
+
var version = "22.39.1";
|
|
39
39
|
|
|
40
40
|
const Context = /*#__PURE__*/createContext(() => null);
|
|
41
41
|
function NotificationProviderForCustomComponent(props) {
|
|
@@ -57,8 +57,9 @@ function filterDataAttributes(obj) {
|
|
|
57
57
|
|
|
58
58
|
var messages = defineMessages({
|
|
59
59
|
hideNotification: {
|
|
60
|
-
id:
|
|
61
|
-
|
|
60
|
+
id: 'Notification.hideNotification',
|
|
61
|
+
description: 'Label for button to hide notification',
|
|
62
|
+
defaultMessage: 'Hide notification'
|
|
62
63
|
}
|
|
63
64
|
});
|
|
64
65
|
|
|
@@ -214,127 +215,157 @@ Notification.displayName = 'Notification';
|
|
|
214
215
|
|
|
215
216
|
var apiErrorMessages = defineMessages({
|
|
216
217
|
General: {
|
|
217
|
-
id:
|
|
218
|
-
|
|
218
|
+
id: 'ApiError.General',
|
|
219
|
+
description: 'A general error message, usually because of internal application problems. The user should not know the details of the error.',
|
|
220
|
+
defaultMessage: 'Sorry, but there seems to be something wrong. Please try again. If you are seeing this message for the second time, please contact our support team.'
|
|
219
221
|
},
|
|
220
222
|
// Custom API Error messages (without a matching error.code)
|
|
221
223
|
OverlappingPrices: {
|
|
222
|
-
id:
|
|
223
|
-
|
|
224
|
+
id: 'ApiError.OverlappingPrices',
|
|
225
|
+
description: '',
|
|
226
|
+
defaultMessage: 'Sorry, but a price with these details already exists. Please amend the price details so that they do not overlap with another price before saving.'
|
|
224
227
|
},
|
|
225
228
|
ConcurrentModificationBulkEdit: {
|
|
226
|
-
id:
|
|
227
|
-
|
|
229
|
+
id: 'ApiError.ConcurrentModificationBulkEdit',
|
|
230
|
+
description: 'User does a bulk update but someone else has saved changes for that element',
|
|
231
|
+
defaultMessage: 'Sorry, but we were unable to save your changes as someone else made changes to this same source while you were editing.'
|
|
228
232
|
},
|
|
229
233
|
// API errors
|
|
230
234
|
ConcurrentModification: {
|
|
231
|
-
id:
|
|
232
|
-
|
|
235
|
+
id: 'ApiError.ConcurrentModification',
|
|
236
|
+
description: 'User edits form and clicks Save but someone else has saved changes for this element while they were editing',
|
|
237
|
+
defaultMessage: 'Sorry, but we were unable to save your changes as someone else made changes to this same source while you were editing. Please refresh the page and re-enter your changes.'
|
|
233
238
|
},
|
|
234
239
|
DuplicateAttributeValue: {
|
|
235
|
-
id:
|
|
236
|
-
|
|
240
|
+
id: 'ApiError.DuplicateAttributeValue',
|
|
241
|
+
description: 'User tries to enter the same attribute value for an attribute with the Unique constraint',
|
|
242
|
+
defaultMessage: 'This value has already been used for another variant. The "{name}" value must be unique for all variants for this product. Please enter a different value.'
|
|
237
243
|
},
|
|
238
244
|
DuplicateAttributeValues: {
|
|
239
|
-
id:
|
|
240
|
-
|
|
245
|
+
id: 'ApiError.DuplicateAttributeValues',
|
|
246
|
+
description: 'User tries to enter existing attribute values for a combination of attributes with the CombinationUnique constraint',
|
|
247
|
+
defaultMessage: 'This combination has already been used for another variant. The combination of these attributes must be unique across all variants. Please enter a different version.'
|
|
241
248
|
},
|
|
242
249
|
DuplicateField: {
|
|
243
|
-
id:
|
|
244
|
-
|
|
250
|
+
id: 'ApiError.DuplicateField',
|
|
251
|
+
description: 'The given field must be unique across the project',
|
|
252
|
+
defaultMessage: 'The value for the field "{field}" has already been used. Please choose another value for this field.'
|
|
245
253
|
},
|
|
246
254
|
DuplicateSlug: {
|
|
247
|
-
id:
|
|
248
|
-
|
|
255
|
+
id: 'ApiError.DuplicateSlug',
|
|
256
|
+
description: 'User tries to create a resource with an already existing slug',
|
|
257
|
+
defaultMessage: '"{slugValue}" is already in use. Please enter a new slug value for this product.'
|
|
249
258
|
},
|
|
250
259
|
DuplicatePriceScope: {
|
|
251
|
-
id:
|
|
252
|
-
|
|
260
|
+
id: 'ApiError.DuplicatePriceScope',
|
|
261
|
+
description: 'User tries to create a price with the exact same values as for an already existing price',
|
|
262
|
+
defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel and valid dates is unique per price.'
|
|
253
263
|
},
|
|
254
264
|
DuplicateStandalonePriceScope: {
|
|
255
|
-
id:
|
|
256
|
-
|
|
265
|
+
id: 'ApiError.DuplicateStandalonePriceScope',
|
|
266
|
+
description: 'User tries to create a standalone price with the exact same values as for an already existing standalone price',
|
|
267
|
+
defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel and validity date must be unique for each price per SKU.'
|
|
257
268
|
},
|
|
258
269
|
DuplicateVariantValues: {
|
|
259
|
-
id:
|
|
260
|
-
|
|
270
|
+
id: 'ApiError.DuplicateVariantValues',
|
|
271
|
+
description: 'User tries to generate a variant with the same SKU or attribute values',
|
|
272
|
+
defaultMessage: 'The same variant already exists for this product. Please enter different values for the fields.'
|
|
261
273
|
},
|
|
262
274
|
InvalidDateRange: {
|
|
263
|
-
id:
|
|
264
|
-
|
|
275
|
+
id: 'ApiError.InvalidDateRange',
|
|
276
|
+
description: 'User tries to input an invalid date range',
|
|
277
|
+
defaultMessage: 'The value entered for the field {field} is invalid. The start date must be before the end date'
|
|
265
278
|
},
|
|
266
279
|
InvalidField: {
|
|
267
|
-
id:
|
|
268
|
-
|
|
280
|
+
id: 'ApiError.InvalidField',
|
|
281
|
+
description: 'User enters an invalid value for a field.',
|
|
282
|
+
defaultMessage: 'The value entered is not valid for the field "{field}".'
|
|
269
283
|
},
|
|
270
284
|
InvalidSlug: {
|
|
271
|
-
id:
|
|
272
|
-
|
|
285
|
+
id: 'ApiError.InvalidSlug',
|
|
286
|
+
description: 'User enters an invalid value for the product slug',
|
|
287
|
+
defaultMessage: 'Slugs may only contain alphanumeric (0-9A-Z) characters, underscores and hyphens and must have a length between 2 and 256 characters.'
|
|
273
288
|
},
|
|
274
289
|
OverlappingPriceValidity: {
|
|
275
|
-
id:
|
|
276
|
-
|
|
290
|
+
id: 'ApiError.OverlappingPriceValidity',
|
|
291
|
+
description: 'Returned when a given price validity period conflicts with an existing one',
|
|
292
|
+
defaultMessage: 'Another price with overlapping validity dates exists. Each price combination needs to have unique validity dates.'
|
|
277
293
|
},
|
|
278
294
|
OverlappingStandalonePriceValidity: {
|
|
279
|
-
id:
|
|
280
|
-
|
|
295
|
+
id: 'ApiError.OverlappingStandalonePriceValidity',
|
|
296
|
+
description: 'Returned when a given standalone price validity period conflicts with an existing one',
|
|
297
|
+
defaultMessage: 'Another price with overlapping validity dates exists. Each price combination needs to have unique validity dates.'
|
|
281
298
|
},
|
|
282
299
|
PendingOperation: {
|
|
283
|
-
id:
|
|
284
|
-
|
|
300
|
+
id: 'ApiError.PendingOperation',
|
|
301
|
+
description: 'User tries to start a new process when one is already underway',
|
|
302
|
+
defaultMessage: 'Sorry, but we are still processing the previous request. Please try again once it is complete.'
|
|
285
303
|
},
|
|
286
304
|
ResourceNotFound: {
|
|
287
|
-
id:
|
|
288
|
-
|
|
305
|
+
id: 'ApiError.ResourceNotFound',
|
|
306
|
+
description: 'System cannot find the functionality or screen that the user is trying to access.',
|
|
307
|
+
defaultMessage: 'Sorry, but we cannot find what you are looking for.'
|
|
289
308
|
},
|
|
290
309
|
ReferenceExists: {
|
|
291
|
-
id:
|
|
292
|
-
|
|
310
|
+
id: 'ApiError.ReferenceExists',
|
|
311
|
+
description: 'User tries to delete an element that has an existing reference to it from another element',
|
|
312
|
+
defaultMessage: 'Can not delete a source while it is referenced from at least one "{referencedBy}".'
|
|
293
313
|
},
|
|
294
314
|
RequiredField: {
|
|
295
|
-
id:
|
|
296
|
-
|
|
315
|
+
id: 'ApiError.RequiredField',
|
|
316
|
+
description: 'User does not enter a required field',
|
|
317
|
+
defaultMessage: '"{field}" is a required field. Please enter a value.'
|
|
297
318
|
},
|
|
298
319
|
RequiredFields: {
|
|
299
320
|
// Client side validation
|
|
300
|
-
id:
|
|
301
|
-
|
|
321
|
+
id: 'ApiError.RequiredFields',
|
|
322
|
+
description: 'User submits a form without having completed all mandatory fields',
|
|
323
|
+
defaultMessage: 'Please enter values for the following required fields: {fields}'
|
|
302
324
|
},
|
|
303
325
|
SemanticError: {
|
|
304
|
-
id:
|
|
305
|
-
|
|
326
|
+
id: 'ApiError.SemanticError',
|
|
327
|
+
description: 'User enters a predicate query that throws a system semantic error',
|
|
328
|
+
defaultMessage: 'Semantic error: the given Predicate is not valid. Please read the documentation to define a correct predicate.'
|
|
306
329
|
},
|
|
307
330
|
SyntaxError: {
|
|
308
|
-
id:
|
|
309
|
-
|
|
331
|
+
id: 'ApiError.SyntaxError',
|
|
332
|
+
description: 'User enters a predicate query that throws a system syntax error',
|
|
333
|
+
defaultMessage: 'Syntax error: the given Predicate is not valid. Please read the documentation to define a correct predicate.'
|
|
310
334
|
},
|
|
311
335
|
Unauthorized: {
|
|
312
|
-
id:
|
|
313
|
-
|
|
336
|
+
id: 'ApiError.Unauthorized',
|
|
337
|
+
description: 'The access token is not valid anymore, or the user does not have a valid one',
|
|
338
|
+
defaultMessage: 'Sorry, but you are not authorized to access this feature.'
|
|
314
339
|
},
|
|
315
340
|
Forbidden: {
|
|
316
|
-
id:
|
|
317
|
-
|
|
341
|
+
id: 'ApiError.Forbidden',
|
|
342
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
343
|
+
defaultMessage: 'You are not authorized to access this feature. Please contact your system administrator with any further questions.'
|
|
318
344
|
},
|
|
319
345
|
ExtensionNoResponse: {
|
|
320
|
-
id:
|
|
321
|
-
|
|
346
|
+
id: 'ApiError.ExtensionNoResponse',
|
|
347
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
348
|
+
defaultMessage: 'Sorry, we could not perform the requested action due to an API extension not responding.'
|
|
322
349
|
},
|
|
323
350
|
ExtensionBadResponse: {
|
|
324
|
-
id:
|
|
325
|
-
|
|
351
|
+
id: 'ApiError.ExtensionBadResponse',
|
|
352
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
353
|
+
defaultMessage: 'Sorry, we could not perform the requested action due to failed processing of an API extension response.'
|
|
326
354
|
},
|
|
327
355
|
ExtensionUpdateActionsFailed: {
|
|
328
|
-
id:
|
|
329
|
-
|
|
356
|
+
id: 'ApiError.ExtensionUpdateActionsFailed',
|
|
357
|
+
description: 'User tries to access a view that they do not have permission for',
|
|
358
|
+
defaultMessage: 'Sorry, we could not perform the requested action. It is not possible to perform the update actions as instructed by the API extension.'
|
|
330
359
|
},
|
|
331
360
|
TaxCategoryDuplicateCountry: {
|
|
332
|
-
id:
|
|
333
|
-
|
|
361
|
+
id: 'ApiError.TaxCategoryDuplicateCountry',
|
|
362
|
+
description: 'User inputs duplicate country and/or state into tax category form',
|
|
363
|
+
defaultMessage: 'Duplicate tax rates submitted. Please remove the duplicates.'
|
|
334
364
|
},
|
|
335
365
|
MaxResourceLimitExceeded: {
|
|
336
|
-
id:
|
|
337
|
-
|
|
366
|
+
id: 'ApiError.MaxResourceLimitExceeded',
|
|
367
|
+
description: 'User attempts to create a resource while having already reached the limit',
|
|
368
|
+
defaultMessage: 'The project reached the limit for the resource. To add more resources delete existing ones or reach out to the administrator or contact customer support.'
|
|
338
369
|
}
|
|
339
370
|
});
|
|
340
371
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/react-notifications",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.39.1",
|
|
4
4
|
"description": "React bindings for @commercetools-frontend/notifications",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.22.15",
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
33
|
-
"@commercetools-frontend/actions-global": "22.
|
|
34
|
-
"@commercetools-frontend/application-components": "22.
|
|
35
|
-
"@commercetools-frontend/constants": "22.
|
|
36
|
-
"@commercetools-frontend/notifications": "22.
|
|
37
|
-
"@commercetools-frontend/sentry": "22.
|
|
33
|
+
"@commercetools-frontend/actions-global": "22.39.1",
|
|
34
|
+
"@commercetools-frontend/application-components": "22.39.1",
|
|
35
|
+
"@commercetools-frontend/constants": "22.39.1",
|
|
36
|
+
"@commercetools-frontend/notifications": "22.39.1",
|
|
37
|
+
"@commercetools-frontend/sentry": "22.39.1",
|
|
38
38
|
"@commercetools-uikit/design-system": "^19.17.1",
|
|
39
39
|
"@commercetools-uikit/hooks": "^19.17.1",
|
|
40
40
|
"@commercetools-uikit/icon-button": "^19.17.1",
|