@aws-amplify/ui-react-notifications 2.0.30 → 2.0.32

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.
@@ -1,3 +1,3 @@
1
- const VERSION = '2.0.30';
1
+ const VERSION = '2.0.32';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ var utils = require('aws-amplify/utils');
11
11
  var internal = require('@aws-amplify/ui-react/internal');
12
12
  var tinycolor = require('tinycolor2');
13
13
 
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
15
 
16
16
  function _interopNamespace(e) {
17
17
  if (e && e.__esModule) return e;
@@ -32,8 +32,7 @@ function _interopNamespace(e) {
32
32
  }
33
33
 
34
34
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
35
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
36
- var tinycolor__default = /*#__PURE__*/_interopDefaultLegacy(tinycolor);
35
+ var tinycolor__default = /*#__PURE__*/_interopDefault(tinycolor);
37
36
 
38
37
  var ImagePrefetchStatus;
39
38
  (function (ImagePrefetchStatus) {
@@ -248,27 +247,27 @@ function BannerMessage(props) {
248
247
  }
249
248
  const { alignment = 'right', position = 'top' } = props;
250
249
  const isCenterMiddle = alignment === 'center' && position === 'middle';
251
- return (React__default["default"].createElement(uiReact.Flex, { className: ui.classNames(BLOCK_CLASS$2, {
250
+ return (React__namespace["default"].createElement(uiReact.Flex, { className: ui.classNames(BLOCK_CLASS$2, {
252
251
  [`${BLOCK_CLASS$2}--${position}`]: !isCenterMiddle,
253
252
  [`${BLOCK_CLASS$2}--${alignment}`]: !isCenterMiddle,
254
253
  [`${BLOCK_CLASS$2}--center-middle`]: isCenterMiddle,
255
254
  [`${BLOCK_CLASS$2}--full-width`]: shouldBeFullWidth,
256
255
  }), role: "dialog", testId: `inappmessaging-${position}banner-dialog` },
257
- React__default["default"].createElement(MessageLayout, { ...props, ...messageProps, orientation: "horizontal", buttonSize: "small", styles: styles })));
256
+ React__namespace["default"].createElement(MessageLayout, { ...props, ...messageProps, orientation: "horizontal", buttonSize: "small", styles: styles })));
258
257
  }
259
258
 
260
259
  const BACKDROP_TEST_ID = 'inappmessaging-backdrop';
261
260
  function Backdrop({ onClick, ...rest }) {
262
- return (React__default["default"].createElement(uiReact.View, { className: "amplify-inappmessaging-backdrop", "data-testid": BACKDROP_TEST_ID, onClick: onClick, ...rest }));
261
+ return (React__namespace["default"].createElement(uiReact.View, { className: "amplify-inappmessaging-backdrop", "data-testid": BACKDROP_TEST_ID, onClick: onClick, ...rest }));
263
262
  }
264
263
 
265
264
  function withBackdrop(Content, options = {}) {
266
265
  return function ContentWithBackdrop(props) {
267
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
268
- React__default["default"].createElement(Backdrop, { ...options }),
269
- React__default["default"].createElement(uiReact.Flex, { className: "amplify-inappmessaging-backdrop-content-container" },
270
- React__default["default"].createElement(uiReact.View, { className: "amplify-inappmessaging-backdrop-content" },
271
- React__default["default"].createElement(Content, { ...props })))));
266
+ return (React__namespace["default"].createElement(React__namespace["default"].Fragment, null,
267
+ React__namespace["default"].createElement(Backdrop, { ...options }),
268
+ React__namespace["default"].createElement(uiReact.Flex, { className: "amplify-inappmessaging-backdrop-content-container" },
269
+ React__namespace["default"].createElement(uiReact.View, { className: "amplify-inappmessaging-backdrop-content" },
270
+ React__namespace["default"].createElement(Content, { ...props })))));
272
271
  };
273
272
  }
274
273
 
@@ -333,7 +332,7 @@ const handleMessageLinkAction = (input) => {
333
332
  window.open(input);
334
333
  };
335
334
 
336
- const VERSION = '2.0.30';
335
+ const VERSION = '2.0.32';
337
336
 
338
337
  // TODO: replace below components incrementally as they become available
339
338
  function CarouselMessage(_) {
@@ -353,7 +352,7 @@ const onMessageAction = ({ action, url }) => {
353
352
  });
354
353
  };
355
354
  function InAppMessageDisplay({ components: overrideComponents, }) {
356
- const components = React__default["default"].useMemo(() => ({ ...platformComponents, ...overrideComponents }), [overrideComponents]);
355
+ const components = React__namespace["default"].useMemo(() => ({ ...platformComponents, ...overrideComponents }), [overrideComponents]);
357
356
  const { Component, props } = uiReactCoreNotifications.useMessage({
358
357
  components,
359
358
  onMessageAction,
@@ -366,8 +365,8 @@ function InAppMessageDisplay({ components: overrideComponents, }) {
366
365
  // There is currently no way to pass In-App Message payload variants so we
367
366
  // will fix the theme around In-App Messaging components to always assume
368
367
  // light mode
369
- return (React__default["default"].createElement(uiReact.ThemeProvider, { colorMode: "light" },
370
- React__default["default"].createElement(Component, { ...props })));
368
+ return (React__namespace["default"].createElement(uiReact.ThemeProvider, { colorMode: "light" },
369
+ React__namespace["default"].createElement(Component, { ...props })));
371
370
  }
372
371
  InAppMessageDisplay.BannerMessage = BannerMessage;
373
372
  InAppMessageDisplay.CarouselMessage = CarouselMessage;
@@ -376,17 +375,17 @@ InAppMessageDisplay.ModalMessage = ModalMessage;
376
375
 
377
376
  function withInAppMessaging(Component, options) {
378
377
  return function WrappedWithInAppMessaging(props) {
379
- return (React__default["default"].createElement(uiReactCoreNotifications.InAppMessagingProvider, null,
380
- React__default["default"].createElement(InAppMessageDisplay, { ...options }),
381
- React__default["default"].createElement(Component, { ...props })));
378
+ return (React__namespace["default"].createElement(uiReactCoreNotifications.InAppMessagingProvider, null,
379
+ React__namespace["default"].createElement(InAppMessageDisplay, { ...options }),
380
+ React__namespace["default"].createElement(Component, { ...props })));
382
381
  };
383
382
  }
384
383
 
385
- Object.defineProperty(exports, 'InAppMessagingProvider', {
384
+ Object.defineProperty(exports, "InAppMessagingProvider", {
386
385
  enumerable: true,
387
386
  get: function () { return uiReactCoreNotifications.InAppMessagingProvider; }
388
387
  });
389
- Object.defineProperty(exports, 'useInAppMessaging', {
388
+ Object.defineProperty(exports, "useInAppMessaging", {
390
389
  enumerable: true,
391
390
  get: function () { return uiReactCoreNotifications.useInAppMessaging; }
392
391
  });
@@ -1 +1 @@
1
- export declare const VERSION = "2.0.30";
1
+ export declare const VERSION = "2.0.32";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-notifications",
3
- "version": "2.0.30",
3
+ "version": "2.0.32",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -31,7 +31,7 @@
31
31
  "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-notifications\"'",
32
32
  "clean": "rimraf dist node_modules",
33
33
  "dev": "yarn build:rollup --watch",
34
- "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx",
34
+ "lint": "yarn typecheck && eslint .",
35
35
  "prebuild": "rimraf dist",
36
36
  "size": "yarn size-limit",
37
37
  "test": "jest",
@@ -39,10 +39,10 @@
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "dependencies": {
42
- "@aws-amplify/ui": "6.6.1",
43
- "@aws-amplify/ui-react": "6.5.1",
44
- "@aws-amplify/ui-react-core": "3.0.25",
45
- "@aws-amplify/ui-react-core-notifications": "2.0.25",
42
+ "@aws-amplify/ui": "6.6.3",
43
+ "@aws-amplify/ui-react": "6.5.3",
44
+ "@aws-amplify/ui-react-core": "3.0.27",
45
+ "@aws-amplify/ui-react-core-notifications": "2.0.27",
46
46
  "tinycolor2": "1.4.2"
47
47
  },
48
48
  "peerDependencies": {