@commercetools-frontend/react-notifications 24.7.2 → 24.8.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/dist/commercetools-frontend-react-notifications.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-react-notifications.cjs.dev.js +1 -43
- package/dist/commercetools-frontend-react-notifications.cjs.prod.js +1 -20
- package/dist/commercetools-frontend-react-notifications.esm.js +1 -42
- package/dist/declarations/src/components/map-notification-to-component/index.d.ts +3 -3
- package/dist/declarations/src/components/notification/index.d.ts +1 -1
- package/dist/declarations/src/components/notification-kinds/api-error-message/index.d.ts +1 -1
- package/dist/declarations/src/components/notifications-list/index.d.ts +1 -1
- package/dist/declarations/src/components/notifications-list/selectors.d.ts +1 -1
- package/dist/declarations/src/components/notifier/index.d.ts +1 -1
- package/dist/declarations/src/export-types.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +8 -8
- package/package.json +17 -17
- package/dist/commercetools-frontend-react-notifications.cjs.d.ts.map +0 -1
- package/dist/declarations/src/components/notification/messages.d.ts +0 -8
- package/dist/declarations/src/components/notification/notification.styles.d.ts +0 -12
- package/dist/declarations/src/components/notification-kinds/api-error/api-error.d.ts +0 -16
- package/dist/declarations/src/components/notification-kinds/api-error/index.d.ts +0 -1
- package/dist/declarations/src/components/notification-kinds/api-error-message/messages.d.ts +0 -153
- package/dist/declarations/src/components/notification-kinds/generic/generic.d.ts +0 -15
- package/dist/declarations/src/components/notification-kinds/generic/index.d.ts +0 -1
- package/dist/declarations/src/components/notification-kinds/unexpected-error/index.d.ts +0 -1
- package/dist/declarations/src/components/notification-kinds/unexpected-error/unexpected-error.d.ts +0 -16
- package/dist/declarations/src/components/notifications-list/notifications-list.styles.d.ts +0 -6
- package/dist/declarations/src/utils/filter-data-attributes.d.ts +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./declarations/src/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1yZWFjdC1ub3RpZmljYXRpb25zLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _pt = require('prop-types');
|
|
6
5
|
var react = require('react');
|
|
7
6
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
8
7
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -40,7 +39,6 @@ var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
|
40
39
|
|
|
41
40
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
42
41
|
|
|
43
|
-
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
44
42
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
45
43
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
46
44
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -61,7 +59,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
|
|
|
61
59
|
var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
|
|
62
60
|
|
|
63
61
|
// NOTE: This string will be replaced on build time with the package version.
|
|
64
|
-
var version = "24.
|
|
62
|
+
var version = "24.8.0";
|
|
65
63
|
|
|
66
64
|
const Context = /*#__PURE__*/react.createContext(() => null);
|
|
67
65
|
function NotificationProviderForCustomComponent(props) {
|
|
@@ -70,10 +68,6 @@ function NotificationProviderForCustomComponent(props) {
|
|
|
70
68
|
children: props.children
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
|
-
NotificationProviderForCustomComponent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
74
|
-
mapNotificationToComponent: _pt__default["default"].func.isRequired,
|
|
75
|
-
children: _pt__default["default"].node.isRequired
|
|
76
|
-
} : {};
|
|
77
71
|
NotificationProviderForCustomComponent.displayName = 'NotificationProviderForCustomComponent';
|
|
78
72
|
const useCustomNotificationComponent = () => react.useContext(Context);
|
|
79
73
|
|
|
@@ -185,10 +179,6 @@ const NotificationIcon = props => {
|
|
|
185
179
|
color: props.color
|
|
186
180
|
});
|
|
187
181
|
};
|
|
188
|
-
NotificationIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
189
|
-
type: _pt__default["default"].any.isRequired,
|
|
190
|
-
color: _pt__default["default"].oneOf(['error', 'warning', 'info', 'solid', 'neutral60', 'surface', 'primary', 'primary40']).isRequired
|
|
191
|
-
} : {};
|
|
192
182
|
NotificationIcon.displayName = 'NotificationIcon';
|
|
193
183
|
const Notification = _ref => {
|
|
194
184
|
let _ref$fixed = _ref.fixed,
|
|
@@ -230,13 +220,6 @@ const Notification = _ref => {
|
|
|
230
220
|
}) : null]
|
|
231
221
|
}));
|
|
232
222
|
};
|
|
233
|
-
Notification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
234
|
-
domain: _pt__default["default"].any.isRequired,
|
|
235
|
-
type: _pt__default["default"].any.isRequired,
|
|
236
|
-
fixed: _pt__default["default"].bool,
|
|
237
|
-
onCloseClick: _pt__default["default"].func,
|
|
238
|
-
children: _pt__default["default"].node.isRequired
|
|
239
|
-
} : {};
|
|
240
223
|
Notification.displayName = 'Notification';
|
|
241
224
|
|
|
242
225
|
var apiErrorMessages = reactIntl.defineMessages({
|
|
@@ -453,9 +436,6 @@ const FormattedErrorMessage = props => {
|
|
|
453
436
|
children: _filterInstanceProperty__default["default"](_context2 = [props.error.message, props.error.detailedErrorMessage && `(${props.error.detailedErrorMessage})`]).call(_context2, Boolean).join(' ')
|
|
454
437
|
});
|
|
455
438
|
};
|
|
456
|
-
FormattedErrorMessage.propTypes = {
|
|
457
|
-
error: _pt__default["default"].any.isRequired
|
|
458
|
-
};
|
|
459
439
|
FormattedErrorMessage.displayName = 'FormattedErrorMessage';
|
|
460
440
|
const ApiErrorMessage = props => {
|
|
461
441
|
const intl = reactIntl.useIntl();
|
|
@@ -469,9 +449,6 @@ const ApiErrorMessage = props => {
|
|
|
469
449
|
}
|
|
470
450
|
return jsxRuntime.jsx(FormattedErrorMessage, _objectSpread$3({}, props));
|
|
471
451
|
};
|
|
472
|
-
ApiErrorMessage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
473
|
-
error: _pt__default["default"].any.isRequired
|
|
474
|
-
} : {};
|
|
475
452
|
ApiErrorMessage.displayName = 'ApiErrorMessage';
|
|
476
453
|
function getSpecialFormattedMessageByErrorCode(error, intl) {
|
|
477
454
|
var _context3, _context4, _context5;
|
|
@@ -564,10 +541,6 @@ const ApiErrorNotification = props => {
|
|
|
564
541
|
})
|
|
565
542
|
});
|
|
566
543
|
};
|
|
567
|
-
ApiErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
568
|
-
notification: _pt__default["default"].any.isRequired,
|
|
569
|
-
dismiss: _pt__default["default"].func.isRequired
|
|
570
|
-
} : {};
|
|
571
544
|
ApiErrorNotification.displayName = 'ApiErrorNotification';
|
|
572
545
|
|
|
573
546
|
const GenericNotification = props => jsxRuntime.jsx(Notification, {
|
|
@@ -576,10 +549,6 @@ const GenericNotification = props => jsxRuntime.jsx(Notification, {
|
|
|
576
549
|
onCloseClick: props.dismiss,
|
|
577
550
|
children: props.notification.text
|
|
578
551
|
});
|
|
579
|
-
GenericNotification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
580
|
-
notification: _pt__default["default"].any.isRequired,
|
|
581
|
-
dismiss: _pt__default["default"].func.isRequired
|
|
582
|
-
} : {};
|
|
583
552
|
GenericNotification.displayName = 'GenericNotification';
|
|
584
553
|
|
|
585
554
|
function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -596,10 +565,6 @@ const UnexpectedErrorNotification = props => jsxRuntime.jsx(Notification, {
|
|
|
596
565
|
})]
|
|
597
566
|
})
|
|
598
567
|
});
|
|
599
|
-
UnexpectedErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
600
|
-
notification: _pt__default["default"].any.isRequired,
|
|
601
|
-
dismiss: _pt__default["default"].func.isRequired
|
|
602
|
-
} : {};
|
|
603
568
|
UnexpectedErrorNotification.displayName = 'UnexpectedErrorNotification';
|
|
604
569
|
|
|
605
570
|
const getStyles = props => {
|
|
@@ -834,13 +799,6 @@ const Notifier = _ref => {
|
|
|
834
799
|
|
|
835
800
|
return null;
|
|
836
801
|
};
|
|
837
|
-
Notifier.propTypes = {
|
|
838
|
-
domain: _pt__default["default"].any.isRequired,
|
|
839
|
-
kind: _pt__default["default"].any.isRequired,
|
|
840
|
-
text: _pt__default["default"].string,
|
|
841
|
-
meta: _pt__default["default"].objectOf(_pt__default["default"].any),
|
|
842
|
-
dismissAfter: _pt__default["default"].number
|
|
843
|
-
};
|
|
844
802
|
Notifier.displayName = 'Notifier';
|
|
845
803
|
|
|
846
804
|
exports.ApiErrorMessage = ApiErrorMessage;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _pt = require('prop-types');
|
|
6
5
|
var react = require('react');
|
|
7
6
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
8
7
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -40,7 +39,6 @@ var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
|
40
39
|
|
|
41
40
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
42
41
|
|
|
43
|
-
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
44
42
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
45
43
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
46
44
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -61,7 +59,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
|
|
|
61
59
|
var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
|
|
62
60
|
|
|
63
61
|
// NOTE: This string will be replaced on build time with the package version.
|
|
64
|
-
var version = "24.
|
|
62
|
+
var version = "24.8.0";
|
|
65
63
|
|
|
66
64
|
const Context = /*#__PURE__*/react.createContext(() => null);
|
|
67
65
|
function NotificationProviderForCustomComponent(props) {
|
|
@@ -70,7 +68,6 @@ function NotificationProviderForCustomComponent(props) {
|
|
|
70
68
|
children: props.children
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
|
-
NotificationProviderForCustomComponent.propTypes = {};
|
|
74
71
|
NotificationProviderForCustomComponent.displayName = 'NotificationProviderForCustomComponent';
|
|
75
72
|
const useCustomNotificationComponent = () => react.useContext(Context);
|
|
76
73
|
|
|
@@ -182,7 +179,6 @@ const NotificationIcon = props => {
|
|
|
182
179
|
color: props.color
|
|
183
180
|
});
|
|
184
181
|
};
|
|
185
|
-
NotificationIcon.propTypes = {};
|
|
186
182
|
NotificationIcon.displayName = 'NotificationIcon';
|
|
187
183
|
const Notification = _ref => {
|
|
188
184
|
let _ref$fixed = _ref.fixed,
|
|
@@ -224,7 +220,6 @@ const Notification = _ref => {
|
|
|
224
220
|
}) : null]
|
|
225
221
|
}));
|
|
226
222
|
};
|
|
227
|
-
Notification.propTypes = {};
|
|
228
223
|
Notification.displayName = 'Notification';
|
|
229
224
|
|
|
230
225
|
var apiErrorMessages = reactIntl.defineMessages({
|
|
@@ -441,9 +436,6 @@ const FormattedErrorMessage = props => {
|
|
|
441
436
|
children: _filterInstanceProperty__default["default"](_context2 = [props.error.message, props.error.detailedErrorMessage && `(${props.error.detailedErrorMessage})`]).call(_context2, Boolean).join(' ')
|
|
442
437
|
});
|
|
443
438
|
};
|
|
444
|
-
FormattedErrorMessage.propTypes = {
|
|
445
|
-
error: _pt__default["default"].any.isRequired
|
|
446
|
-
};
|
|
447
439
|
FormattedErrorMessage.displayName = 'FormattedErrorMessage';
|
|
448
440
|
const ApiErrorMessage = props => {
|
|
449
441
|
const intl = reactIntl.useIntl();
|
|
@@ -457,7 +449,6 @@ const ApiErrorMessage = props => {
|
|
|
457
449
|
}
|
|
458
450
|
return jsxRuntime.jsx(FormattedErrorMessage, _objectSpread$3({}, props));
|
|
459
451
|
};
|
|
460
|
-
ApiErrorMessage.propTypes = {};
|
|
461
452
|
ApiErrorMessage.displayName = 'ApiErrorMessage';
|
|
462
453
|
function getSpecialFormattedMessageByErrorCode(error, intl) {
|
|
463
454
|
var _context3, _context4, _context5;
|
|
@@ -550,7 +541,6 @@ const ApiErrorNotification = props => {
|
|
|
550
541
|
})
|
|
551
542
|
});
|
|
552
543
|
};
|
|
553
|
-
ApiErrorNotification.propTypes = {};
|
|
554
544
|
ApiErrorNotification.displayName = 'ApiErrorNotification';
|
|
555
545
|
|
|
556
546
|
const GenericNotification = props => jsxRuntime.jsx(Notification, {
|
|
@@ -559,7 +549,6 @@ const GenericNotification = props => jsxRuntime.jsx(Notification, {
|
|
|
559
549
|
onCloseClick: props.dismiss,
|
|
560
550
|
children: props.notification.text
|
|
561
551
|
});
|
|
562
|
-
GenericNotification.propTypes = {};
|
|
563
552
|
GenericNotification.displayName = 'GenericNotification';
|
|
564
553
|
|
|
565
554
|
function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -576,7 +565,6 @@ const UnexpectedErrorNotification = props => jsxRuntime.jsx(Notification, {
|
|
|
576
565
|
})]
|
|
577
566
|
})
|
|
578
567
|
});
|
|
579
|
-
UnexpectedErrorNotification.propTypes = {};
|
|
580
568
|
UnexpectedErrorNotification.displayName = 'UnexpectedErrorNotification';
|
|
581
569
|
|
|
582
570
|
const getStyles = props => {
|
|
@@ -805,13 +793,6 @@ const Notifier = _ref => {
|
|
|
805
793
|
|
|
806
794
|
return null;
|
|
807
795
|
};
|
|
808
|
-
Notifier.propTypes = {
|
|
809
|
-
domain: _pt__default["default"].any.isRequired,
|
|
810
|
-
kind: _pt__default["default"].any.isRequired,
|
|
811
|
-
text: _pt__default["default"].string,
|
|
812
|
-
meta: _pt__default["default"].objectOf(_pt__default["default"].any),
|
|
813
|
-
dismissAfter: _pt__default["default"].number
|
|
814
|
-
};
|
|
815
796
|
Notifier.displayName = 'Notifier';
|
|
816
797
|
|
|
817
798
|
exports.ApiErrorMessage = ApiErrorMessage;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _pt from 'prop-types';
|
|
2
1
|
import { createContext, useContext, useEffect } from 'react';
|
|
3
2
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
4
3
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
@@ -35,7 +34,7 @@ import isNumber from 'lodash/isNumber';
|
|
|
35
34
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
36
35
|
|
|
37
36
|
// NOTE: This string will be replaced on build time with the package version.
|
|
38
|
-
var version = "24.
|
|
37
|
+
var version = "24.8.0";
|
|
39
38
|
|
|
40
39
|
const Context = /*#__PURE__*/createContext(() => null);
|
|
41
40
|
function NotificationProviderForCustomComponent(props) {
|
|
@@ -44,10 +43,6 @@ function NotificationProviderForCustomComponent(props) {
|
|
|
44
43
|
children: props.children
|
|
45
44
|
});
|
|
46
45
|
}
|
|
47
|
-
NotificationProviderForCustomComponent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
48
|
-
mapNotificationToComponent: _pt.func.isRequired,
|
|
49
|
-
children: _pt.node.isRequired
|
|
50
|
-
} : {};
|
|
51
46
|
NotificationProviderForCustomComponent.displayName = 'NotificationProviderForCustomComponent';
|
|
52
47
|
const useCustomNotificationComponent = () => useContext(Context);
|
|
53
48
|
|
|
@@ -159,10 +154,6 @@ const NotificationIcon = props => {
|
|
|
159
154
|
color: props.color
|
|
160
155
|
});
|
|
161
156
|
};
|
|
162
|
-
NotificationIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
163
|
-
type: _pt.any.isRequired,
|
|
164
|
-
color: _pt.oneOf(['error', 'warning', 'info', 'solid', 'neutral60', 'surface', 'primary', 'primary40']).isRequired
|
|
165
|
-
} : {};
|
|
166
157
|
NotificationIcon.displayName = 'NotificationIcon';
|
|
167
158
|
const Notification = _ref => {
|
|
168
159
|
let _ref$fixed = _ref.fixed,
|
|
@@ -204,13 +195,6 @@ const Notification = _ref => {
|
|
|
204
195
|
}) : null]
|
|
205
196
|
}));
|
|
206
197
|
};
|
|
207
|
-
Notification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
208
|
-
domain: _pt.any.isRequired,
|
|
209
|
-
type: _pt.any.isRequired,
|
|
210
|
-
fixed: _pt.bool,
|
|
211
|
-
onCloseClick: _pt.func,
|
|
212
|
-
children: _pt.node.isRequired
|
|
213
|
-
} : {};
|
|
214
198
|
Notification.displayName = 'Notification';
|
|
215
199
|
|
|
216
200
|
var apiErrorMessages = defineMessages({
|
|
@@ -427,9 +411,6 @@ const FormattedErrorMessage = props => {
|
|
|
427
411
|
children: _filterInstanceProperty(_context2 = [props.error.message, props.error.detailedErrorMessage && `(${props.error.detailedErrorMessage})`]).call(_context2, Boolean).join(' ')
|
|
428
412
|
});
|
|
429
413
|
};
|
|
430
|
-
FormattedErrorMessage.propTypes = {
|
|
431
|
-
error: _pt.any.isRequired
|
|
432
|
-
};
|
|
433
414
|
FormattedErrorMessage.displayName = 'FormattedErrorMessage';
|
|
434
415
|
const ApiErrorMessage = props => {
|
|
435
416
|
const intl = useIntl();
|
|
@@ -443,9 +424,6 @@ const ApiErrorMessage = props => {
|
|
|
443
424
|
}
|
|
444
425
|
return jsx(FormattedErrorMessage, _objectSpread$3({}, props));
|
|
445
426
|
};
|
|
446
|
-
ApiErrorMessage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
447
|
-
error: _pt.any.isRequired
|
|
448
|
-
} : {};
|
|
449
427
|
ApiErrorMessage.displayName = 'ApiErrorMessage';
|
|
450
428
|
function getSpecialFormattedMessageByErrorCode(error, intl) {
|
|
451
429
|
var _context3, _context4, _context5;
|
|
@@ -538,10 +516,6 @@ const ApiErrorNotification = props => {
|
|
|
538
516
|
})
|
|
539
517
|
});
|
|
540
518
|
};
|
|
541
|
-
ApiErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
542
|
-
notification: _pt.any.isRequired,
|
|
543
|
-
dismiss: _pt.func.isRequired
|
|
544
|
-
} : {};
|
|
545
519
|
ApiErrorNotification.displayName = 'ApiErrorNotification';
|
|
546
520
|
|
|
547
521
|
const GenericNotification = props => jsx(Notification, {
|
|
@@ -550,10 +524,6 @@ const GenericNotification = props => jsx(Notification, {
|
|
|
550
524
|
onCloseClick: props.dismiss,
|
|
551
525
|
children: props.notification.text
|
|
552
526
|
});
|
|
553
|
-
GenericNotification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
554
|
-
notification: _pt.any.isRequired,
|
|
555
|
-
dismiss: _pt.func.isRequired
|
|
556
|
-
} : {};
|
|
557
527
|
GenericNotification.displayName = 'GenericNotification';
|
|
558
528
|
|
|
559
529
|
function ownKeys$2(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -570,10 +540,6 @@ const UnexpectedErrorNotification = props => jsx(Notification, {
|
|
|
570
540
|
})]
|
|
571
541
|
})
|
|
572
542
|
});
|
|
573
|
-
UnexpectedErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
574
|
-
notification: _pt.any.isRequired,
|
|
575
|
-
dismiss: _pt.func.isRequired
|
|
576
|
-
} : {};
|
|
577
543
|
UnexpectedErrorNotification.displayName = 'UnexpectedErrorNotification';
|
|
578
544
|
|
|
579
545
|
const getStyles = props => {
|
|
@@ -808,13 +774,6 @@ const Notifier = _ref => {
|
|
|
808
774
|
|
|
809
775
|
return null;
|
|
810
776
|
};
|
|
811
|
-
Notifier.propTypes = {
|
|
812
|
-
domain: _pt.any.isRequired,
|
|
813
|
-
kind: _pt.any.isRequired,
|
|
814
|
-
text: _pt.string,
|
|
815
|
-
meta: _pt.objectOf(_pt.any),
|
|
816
|
-
dismissAfter: _pt.number
|
|
817
|
-
};
|
|
818
777
|
Notifier.displayName = 'Notifier';
|
|
819
778
|
|
|
820
779
|
export { ApiErrorMessage, Notification, NotificationProviderForCustomComponent, NotificationsList, Notifier, selectGlobalNotifications, selectPageNotifications, selectSideNotifications, version };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Props } from
|
|
1
|
+
import type { Props } from "./map-notification-to-component.js";
|
|
2
2
|
export type TProps = Props;
|
|
3
|
-
export { default } from
|
|
4
|
-
export { useCustomNotificationComponent } from
|
|
3
|
+
export { default } from "./map-notification-to-component.js";
|
|
4
|
+
export { useCustomNotificationComponent } from "./map-notification-to-component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./notification.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./api-error-message.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./notifications-list.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
|
|
2
|
-
import type { TAppState } from
|
|
2
|
+
import type { TAppState } from "./types.js";
|
|
3
3
|
export declare const selectNotifications: (state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[];
|
|
4
4
|
export declare const selectGlobalNotifications: ((state: TAppState) => TAppNotificationGlobal[]) & import("reselect").OutputSelectorFields<(args_0: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]) => TAppNotificationGlobal[], {
|
|
5
5
|
clearCache: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./notifier.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { TProps as MapNotificationToComponentProps } from
|
|
1
|
+
import type { TProps as MapNotificationToComponentProps } from "./components/map-notification-to-component/index.js";
|
|
2
2
|
export type TMapNotificationToComponentProps = MapNotificationToComponentProps;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { default as version } from
|
|
2
|
-
export * from
|
|
3
|
-
export { default as NotificationProviderForCustomComponent } from
|
|
4
|
-
export { default as Notification } from
|
|
5
|
-
export { default as NotificationsList } from
|
|
6
|
-
export { selectSideNotifications, selectGlobalNotifications, selectPageNotifications, } from
|
|
7
|
-
export { default as Notifier } from
|
|
8
|
-
export { default as ApiErrorMessage } from
|
|
1
|
+
export { default as version } from "./version.js";
|
|
2
|
+
export * from "./export-types.js";
|
|
3
|
+
export { default as NotificationProviderForCustomComponent } from "./components/map-notification-to-component/index.js";
|
|
4
|
+
export { default as Notification } from "./components/notification/index.js";
|
|
5
|
+
export { default as NotificationsList } from "./components/notifications-list/index.js";
|
|
6
|
+
export { selectSideNotifications, selectGlobalNotifications, selectPageNotifications, } from "./components/notifications-list/selectors.js";
|
|
7
|
+
export { default as Notifier } from "./components/notifier/index.js";
|
|
8
|
+
export { default as ApiErrorMessage } from "./components/notification-kinds/api-error-message/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/react-notifications",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.0",
|
|
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,18 +30,18 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.22.15",
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
33
|
-
"@commercetools-frontend/actions-global": "24.
|
|
34
|
-
"@commercetools-frontend/application-components": "24.
|
|
35
|
-
"@commercetools-frontend/constants": "24.
|
|
36
|
-
"@commercetools-frontend/notifications": "24.
|
|
37
|
-
"@commercetools-frontend/sentry": "24.
|
|
38
|
-
"@commercetools-uikit/design-system": "20.
|
|
39
|
-
"@commercetools-uikit/hooks": "20.
|
|
40
|
-
"@commercetools-uikit/icon-button": "20.
|
|
41
|
-
"@commercetools-uikit/icons": "20.
|
|
42
|
-
"@commercetools-uikit/secondary-icon-button": "20.
|
|
43
|
-
"@commercetools-uikit/spacings": "20.
|
|
44
|
-
"@commercetools-uikit/utils": "20.
|
|
33
|
+
"@commercetools-frontend/actions-global": "24.8.0",
|
|
34
|
+
"@commercetools-frontend/application-components": "24.8.0",
|
|
35
|
+
"@commercetools-frontend/constants": "24.8.0",
|
|
36
|
+
"@commercetools-frontend/notifications": "24.8.0",
|
|
37
|
+
"@commercetools-frontend/sentry": "24.8.0",
|
|
38
|
+
"@commercetools-uikit/design-system": "^20.2.3",
|
|
39
|
+
"@commercetools-uikit/hooks": "^20.2.3",
|
|
40
|
+
"@commercetools-uikit/icon-button": "^20.2.3",
|
|
41
|
+
"@commercetools-uikit/icons": "^20.2.3",
|
|
42
|
+
"@commercetools-uikit/secondary-icon-button": "^20.2.3",
|
|
43
|
+
"@commercetools-uikit/spacings": "^20.2.3",
|
|
44
|
+
"@commercetools-uikit/utils": "^20.2.3",
|
|
45
45
|
"@emotion/react": "^11.14.0",
|
|
46
46
|
"@emotion/styled": "^11.14.0",
|
|
47
47
|
"@types/history": "^4.7.11",
|
|
@@ -54,26 +54,26 @@
|
|
|
54
54
|
"@types/react-router-dom": "^5.3.3",
|
|
55
55
|
"lodash": "4.17.21",
|
|
56
56
|
"moment": "^2.29.4",
|
|
57
|
-
"moment-timezone": "^0.
|
|
57
|
+
"moment-timezone": "^0.6.0",
|
|
58
58
|
"prop-types": "15.8.1",
|
|
59
59
|
"reselect": "4.1.8"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@types/jest": "^29.5.
|
|
62
|
+
"@types/jest": "^29.5.14",
|
|
63
63
|
"@types/testing-library__jest-dom": "^5.14.9",
|
|
64
64
|
"jest": "29.7.0",
|
|
65
65
|
"jest-mock": "29.7.0",
|
|
66
66
|
"react": "19.0.0",
|
|
67
67
|
"react-dom": "19.0.0",
|
|
68
68
|
"react-intl": "^7.1.4",
|
|
69
|
-
"react-redux": "
|
|
69
|
+
"react-redux": "9.2.0",
|
|
70
70
|
"react-router-dom": "5.3.4"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "19.x",
|
|
74
74
|
"react-dom": "19.x",
|
|
75
75
|
"react-intl": "7.x",
|
|
76
|
-
"react-redux": "7.x",
|
|
76
|
+
"react-redux": "7.x || 9.x",
|
|
77
77
|
"react-router-dom": "5.x"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-react-notifications.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
-
import type { TAppNotificationKind, TAppNotificationDomain } from '@commercetools-frontend/constants';
|
|
3
|
-
type StyleProps = {
|
|
4
|
-
type: TAppNotificationKind;
|
|
5
|
-
domain: TAppNotificationDomain;
|
|
6
|
-
fixed: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare const getStylesForNotificationIcon: (props: StyleProps) => SerializedStyles;
|
|
9
|
-
declare const getStylesForCloseIcon: (props: StyleProps) => SerializedStyles;
|
|
10
|
-
declare const getStylesForContent: (props: StyleProps) => SerializedStyles;
|
|
11
|
-
declare const getStylesForNotification: (props: StyleProps) => SerializedStyles;
|
|
12
|
-
export { getStylesForNotificationIcon, getStylesForCloseIcon, getStylesForContent, getStylesForNotification, };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
import type { TAppNotification, TAppNotificationValuesApiError } from '@commercetools-frontend/constants';
|
|
3
|
-
import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
|
|
4
|
-
type Props = {
|
|
5
|
-
notification: TAppNotification<{
|
|
6
|
-
domain: typeof NOTIFICATION_DOMAINS.PAGE;
|
|
7
|
-
kind: (typeof NOTIFICATION_KINDS_PAGE)['api-error'];
|
|
8
|
-
values: TAppNotificationValuesApiError;
|
|
9
|
-
}>;
|
|
10
|
-
dismiss: (event: SyntheticEvent) => void;
|
|
11
|
-
};
|
|
12
|
-
declare const ApiErrorNotification: {
|
|
13
|
-
(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
export default ApiErrorNotification;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './api-error';
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
General: {
|
|
3
|
-
id: string;
|
|
4
|
-
description: string;
|
|
5
|
-
defaultMessage: string;
|
|
6
|
-
};
|
|
7
|
-
OverlappingPrices: {
|
|
8
|
-
id: string;
|
|
9
|
-
description: string;
|
|
10
|
-
defaultMessage: string;
|
|
11
|
-
};
|
|
12
|
-
ConcurrentModificationBulkEdit: {
|
|
13
|
-
id: string;
|
|
14
|
-
description: string;
|
|
15
|
-
defaultMessage: string;
|
|
16
|
-
};
|
|
17
|
-
ConcurrentModification: {
|
|
18
|
-
id: string;
|
|
19
|
-
description: string;
|
|
20
|
-
defaultMessage: string;
|
|
21
|
-
};
|
|
22
|
-
DuplicateAttributeValue: {
|
|
23
|
-
id: string;
|
|
24
|
-
description: string;
|
|
25
|
-
defaultMessage: string;
|
|
26
|
-
};
|
|
27
|
-
DuplicateAttributeValues: {
|
|
28
|
-
id: string;
|
|
29
|
-
description: string;
|
|
30
|
-
defaultMessage: string;
|
|
31
|
-
};
|
|
32
|
-
DuplicateField: {
|
|
33
|
-
id: string;
|
|
34
|
-
description: string;
|
|
35
|
-
defaultMessage: string;
|
|
36
|
-
};
|
|
37
|
-
DuplicateSlug: {
|
|
38
|
-
id: string;
|
|
39
|
-
description: string;
|
|
40
|
-
defaultMessage: string;
|
|
41
|
-
};
|
|
42
|
-
DuplicatePriceScope: {
|
|
43
|
-
id: string;
|
|
44
|
-
description: string;
|
|
45
|
-
defaultMessage: string;
|
|
46
|
-
};
|
|
47
|
-
DuplicateStandalonePriceScope: {
|
|
48
|
-
id: string;
|
|
49
|
-
description: string;
|
|
50
|
-
defaultMessage: string;
|
|
51
|
-
};
|
|
52
|
-
DuplicateVariantValues: {
|
|
53
|
-
id: string;
|
|
54
|
-
description: string;
|
|
55
|
-
defaultMessage: string;
|
|
56
|
-
};
|
|
57
|
-
InvalidDateRange: {
|
|
58
|
-
id: string;
|
|
59
|
-
description: string;
|
|
60
|
-
defaultMessage: string;
|
|
61
|
-
};
|
|
62
|
-
InvalidField: {
|
|
63
|
-
id: string;
|
|
64
|
-
description: string;
|
|
65
|
-
defaultMessage: string;
|
|
66
|
-
};
|
|
67
|
-
InvalidSlug: {
|
|
68
|
-
id: string;
|
|
69
|
-
description: string;
|
|
70
|
-
defaultMessage: string;
|
|
71
|
-
};
|
|
72
|
-
OverlappingPriceValidity: {
|
|
73
|
-
id: string;
|
|
74
|
-
description: string;
|
|
75
|
-
defaultMessage: string;
|
|
76
|
-
};
|
|
77
|
-
OverlappingStandalonePriceValidity: {
|
|
78
|
-
id: string;
|
|
79
|
-
description: string;
|
|
80
|
-
defaultMessage: string;
|
|
81
|
-
};
|
|
82
|
-
PendingOperation: {
|
|
83
|
-
id: string;
|
|
84
|
-
description: string;
|
|
85
|
-
defaultMessage: string;
|
|
86
|
-
};
|
|
87
|
-
ResourceNotFound: {
|
|
88
|
-
id: string;
|
|
89
|
-
description: string;
|
|
90
|
-
defaultMessage: string;
|
|
91
|
-
};
|
|
92
|
-
ReferenceExists: {
|
|
93
|
-
id: string;
|
|
94
|
-
description: string;
|
|
95
|
-
defaultMessage: string;
|
|
96
|
-
};
|
|
97
|
-
RequiredField: {
|
|
98
|
-
id: string;
|
|
99
|
-
description: string;
|
|
100
|
-
defaultMessage: string;
|
|
101
|
-
};
|
|
102
|
-
RequiredFields: {
|
|
103
|
-
id: string;
|
|
104
|
-
description: string;
|
|
105
|
-
defaultMessage: string;
|
|
106
|
-
};
|
|
107
|
-
SemanticError: {
|
|
108
|
-
id: string;
|
|
109
|
-
description: string;
|
|
110
|
-
defaultMessage: string;
|
|
111
|
-
};
|
|
112
|
-
SyntaxError: {
|
|
113
|
-
id: string;
|
|
114
|
-
description: string;
|
|
115
|
-
defaultMessage: string;
|
|
116
|
-
};
|
|
117
|
-
Unauthorized: {
|
|
118
|
-
id: string;
|
|
119
|
-
description: string;
|
|
120
|
-
defaultMessage: string;
|
|
121
|
-
};
|
|
122
|
-
Forbidden: {
|
|
123
|
-
id: string;
|
|
124
|
-
description: string;
|
|
125
|
-
defaultMessage: string;
|
|
126
|
-
};
|
|
127
|
-
ExtensionNoResponse: {
|
|
128
|
-
id: string;
|
|
129
|
-
description: string;
|
|
130
|
-
defaultMessage: string;
|
|
131
|
-
};
|
|
132
|
-
ExtensionBadResponse: {
|
|
133
|
-
id: string;
|
|
134
|
-
description: string;
|
|
135
|
-
defaultMessage: string;
|
|
136
|
-
};
|
|
137
|
-
ExtensionUpdateActionsFailed: {
|
|
138
|
-
id: string;
|
|
139
|
-
description: string;
|
|
140
|
-
defaultMessage: string;
|
|
141
|
-
};
|
|
142
|
-
TaxCategoryDuplicateCountry: {
|
|
143
|
-
id: string;
|
|
144
|
-
description: string;
|
|
145
|
-
defaultMessage: string;
|
|
146
|
-
};
|
|
147
|
-
MaxResourceLimitExceeded: {
|
|
148
|
-
id: string;
|
|
149
|
-
description: string;
|
|
150
|
-
defaultMessage: string;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
import type { TAppNotification, TAppNotificationDomain, TAppNotificationKindSide } from '@commercetools-frontend/constants';
|
|
3
|
-
type Props = {
|
|
4
|
-
notification: TAppNotification<{
|
|
5
|
-
domain: TAppNotificationDomain;
|
|
6
|
-
kind: TAppNotificationKindSide;
|
|
7
|
-
text: string;
|
|
8
|
-
}>;
|
|
9
|
-
dismiss: (event: SyntheticEvent) => void;
|
|
10
|
-
};
|
|
11
|
-
declare const GenericNotification: {
|
|
12
|
-
(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
15
|
-
export default GenericNotification;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './generic';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './unexpected-error';
|
package/dist/declarations/src/components/notification-kinds/unexpected-error/unexpected-error.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
|
-
import type { TAppNotification, TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
|
|
3
|
-
import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
|
|
4
|
-
type Props = {
|
|
5
|
-
notification: TAppNotification<{
|
|
6
|
-
domain: typeof NOTIFICATION_DOMAINS.PAGE;
|
|
7
|
-
kind: (typeof NOTIFICATION_KINDS_PAGE)['unexpected-error'];
|
|
8
|
-
values: TAppNotificationValuesUnexpectedError;
|
|
9
|
-
}>;
|
|
10
|
-
dismiss: (event: SyntheticEvent) => void;
|
|
11
|
-
};
|
|
12
|
-
declare const UnexpectedErrorNotification: {
|
|
13
|
-
(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
export default UnexpectedErrorNotification;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function filterDataAttributes<T extends object>(obj: T): Partial<T>;
|