@aws-amplify/ui-react-core 2.1.11 → 2.1.13
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,6 +1,6 @@
|
|
|
1
1
|
import { ConsoleLogger } from '@aws-amplify/core';
|
|
2
2
|
import { InAppMessageInteractionEvent, Notifications } from '@aws-amplify/notifications';
|
|
3
|
-
import isNil from '
|
|
3
|
+
import { isNil } from '@aws-amplify/ui';
|
|
4
4
|
import RenderNothing from '../../../components/RenderNothing/RenderNothing.mjs';
|
|
5
5
|
import useInAppMessaging from '../useInAppMessaging/useInAppMessaging.mjs';
|
|
6
6
|
import { getContentProps, getPositionProp } from './utils.mjs';
|
package/dist/esm/utils/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,16 +6,12 @@ var React = require('react');
|
|
|
6
6
|
var react = require('@xstate/react');
|
|
7
7
|
var ui = require('@aws-amplify/ui');
|
|
8
8
|
var awsAmplify = require('aws-amplify');
|
|
9
|
-
var isEmpty = require('lodash/isEmpty.js');
|
|
10
9
|
var notifications = require('@aws-amplify/notifications');
|
|
11
10
|
var core = require('@aws-amplify/core');
|
|
12
|
-
var isNil = require('lodash/isNil.js');
|
|
13
11
|
|
|
14
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
13
|
|
|
16
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
-
var isEmpty__default = /*#__PURE__*/_interopDefaultLegacy(isEmpty);
|
|
18
|
-
var isNil__default = /*#__PURE__*/_interopDefaultLegacy(isNil);
|
|
19
15
|
|
|
20
16
|
/**
|
|
21
17
|
* AuthenticatorContext serves static reference to the auth machine service.
|
|
@@ -83,13 +79,13 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
83
79
|
const USE_AUTHENTICATOR_ERROR = '`useAuthenticator` must be used inside an `Authenticator.Provider`.';
|
|
84
80
|
|
|
85
81
|
function isEmptyArray(value) {
|
|
86
|
-
return Array.isArray(value) &&
|
|
82
|
+
return Array.isArray(value) && ui.isEmpty(value);
|
|
87
83
|
}
|
|
88
84
|
function areEmptyArrays(...values) {
|
|
89
85
|
return values.every(isEmptyArray);
|
|
90
86
|
}
|
|
91
87
|
function isEmptyObject(value) {
|
|
92
|
-
return ui.isObject(value) &&
|
|
88
|
+
return ui.isObject(value) && ui.isEmpty(value);
|
|
93
89
|
}
|
|
94
90
|
function areEmptyObjects(...values) {
|
|
95
91
|
return values.every(isEmptyObject);
|
|
@@ -538,7 +534,7 @@ const { InAppMessaging } = notifications.Notifications;
|
|
|
538
534
|
function useMessage({ components, onMessageAction, }) {
|
|
539
535
|
const { clearMessage, message } = useInAppMessaging();
|
|
540
536
|
const { BannerMessage, CarouselMessage, FullScreenMessage, ModalMessage } = components;
|
|
541
|
-
if (
|
|
537
|
+
if (ui.isNil(message)) {
|
|
542
538
|
return {
|
|
543
539
|
Component: RenderNothing,
|
|
544
540
|
props: EMPTY_PROPS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.13",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"react-native": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test:watch": "yarn test --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aws-amplify/ui": "5.5.
|
|
31
|
+
"@aws-amplify/ui": "5.5.5",
|
|
32
32
|
"@xstate/react": "3.0.1",
|
|
33
33
|
"lodash": "4.17.21",
|
|
34
34
|
"xstate": "^4.33.6"
|