@commercetools-frontend/permissions 22.41.0 → 22.42.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-permissions.cjs.dev.js +5 -2
- package/dist/commercetools-frontend-permissions.cjs.prod.js +5 -2
- package/dist/commercetools-frontend-permissions.esm.js +5 -2
- package/dist/declarations/src/components/authorized/authorized.d.ts +1 -1
- package/dist/declarations/src/components/restricted-by-permissions/restricted-by-permissions.d.ts +1 -1
- package/package.json +4 -4
|
@@ -54,7 +54,7 @@ var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
|
54
54
|
var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
|
|
55
55
|
|
|
56
56
|
// NOTE: This string will be replaced on build time with the package version.
|
|
57
|
-
var version = "22.
|
|
57
|
+
var version = "22.42.0";
|
|
58
58
|
|
|
59
59
|
// Permissions
|
|
60
60
|
|
|
@@ -365,7 +365,9 @@ const injectAuthorized = function (demandedPermissions) {
|
|
|
365
365
|
demandedActionRights: options.actionRights,
|
|
366
366
|
demandedDataFences: options.dataFences,
|
|
367
367
|
selectDataFenceData: options.getSelectDataFenceData && options.getSelectDataFenceData(props),
|
|
368
|
-
render: isAuthorized =>
|
|
368
|
+
render: isAuthorized =>
|
|
369
|
+
// @ts-ignore: relates to https://github.com/emotion-js/emotion/issues/3245
|
|
370
|
+
jsxRuntime.jsx(Component, _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
369
371
|
[propName]: isAuthorized
|
|
370
372
|
}))
|
|
371
373
|
});
|
|
@@ -448,6 +450,7 @@ const branchOnPermissions = function (demandedPermissions, FallbackComponent) {
|
|
|
448
450
|
selectDataFenceData: options.getSelectDataFenceData && options.getSelectDataFenceData(props),
|
|
449
451
|
render: isAuthorized => {
|
|
450
452
|
if (isAuthorized) {
|
|
453
|
+
// @ts-ignore: relates to https://github.com/emotion-js/emotion/issues/3245
|
|
451
454
|
return jsxRuntime.jsx(Component, _objectSpread({}, props));
|
|
452
455
|
}
|
|
453
456
|
if (FallbackComponent) {
|
|
@@ -53,7 +53,7 @@ var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
|
53
53
|
var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
|
|
54
54
|
|
|
55
55
|
// NOTE: This string will be replaced on build time with the package version.
|
|
56
|
-
var version = "22.
|
|
56
|
+
var version = "22.42.0";
|
|
57
57
|
|
|
58
58
|
// Permissions
|
|
59
59
|
|
|
@@ -363,7 +363,9 @@ const injectAuthorized = function (demandedPermissions) {
|
|
|
363
363
|
demandedActionRights: options.actionRights,
|
|
364
364
|
demandedDataFences: options.dataFences,
|
|
365
365
|
selectDataFenceData: options.getSelectDataFenceData && options.getSelectDataFenceData(props),
|
|
366
|
-
render: isAuthorized =>
|
|
366
|
+
render: isAuthorized =>
|
|
367
|
+
// @ts-ignore: relates to https://github.com/emotion-js/emotion/issues/3245
|
|
368
|
+
jsxRuntime.jsx(Component, _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
367
369
|
[propName]: isAuthorized
|
|
368
370
|
}))
|
|
369
371
|
});
|
|
@@ -425,6 +427,7 @@ const branchOnPermissions = function (demandedPermissions, FallbackComponent) {
|
|
|
425
427
|
selectDataFenceData: options.getSelectDataFenceData && options.getSelectDataFenceData(props),
|
|
426
428
|
render: isAuthorized => {
|
|
427
429
|
if (isAuthorized) {
|
|
430
|
+
// @ts-ignore: relates to https://github.com/emotion-js/emotion/issues/3245
|
|
428
431
|
return jsxRuntime.jsx(Component, _objectSpread({}, props));
|
|
429
432
|
}
|
|
430
433
|
if (FallbackComponent) {
|
|
@@ -27,7 +27,7 @@ import upperFirst from 'lodash/upperFirst';
|
|
|
27
27
|
import { jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
28
28
|
|
|
29
29
|
// NOTE: This string will be replaced on build time with the package version.
|
|
30
|
-
var version = "22.
|
|
30
|
+
var version = "22.42.0";
|
|
31
31
|
|
|
32
32
|
// Permissions
|
|
33
33
|
|
|
@@ -338,7 +338,9 @@ const injectAuthorized = function (demandedPermissions) {
|
|
|
338
338
|
demandedActionRights: options.actionRights,
|
|
339
339
|
demandedDataFences: options.dataFences,
|
|
340
340
|
selectDataFenceData: options.getSelectDataFenceData && options.getSelectDataFenceData(props),
|
|
341
|
-
render: isAuthorized =>
|
|
341
|
+
render: isAuthorized =>
|
|
342
|
+
// @ts-ignore: relates to https://github.com/emotion-js/emotion/issues/3245
|
|
343
|
+
jsx(Component, _objectSpread$1(_objectSpread$1({}, props), {}, {
|
|
342
344
|
[propName]: isAuthorized
|
|
343
345
|
}))
|
|
344
346
|
});
|
|
@@ -421,6 +423,7 @@ const branchOnPermissions = function (demandedPermissions, FallbackComponent) {
|
|
|
421
423
|
selectDataFenceData: options.getSelectDataFenceData && options.getSelectDataFenceData(props),
|
|
422
424
|
render: isAuthorized => {
|
|
423
425
|
if (isAuthorized) {
|
|
426
|
+
// @ts-ignore: relates to https://github.com/emotion-js/emotion/issues/3245
|
|
424
427
|
return jsx(Component, _objectSpread({}, props));
|
|
425
428
|
}
|
|
426
429
|
if (FallbackComponent) {
|
|
@@ -31,7 +31,7 @@ type Props = {
|
|
|
31
31
|
children?: never;
|
|
32
32
|
};
|
|
33
33
|
declare const Authorized: {
|
|
34
|
-
({ shouldMatchSomePermissions, ...props }: Props): import("@emotion/react/
|
|
34
|
+
({ shouldMatchSomePermissions, ...props }: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
35
35
|
displayName: string;
|
|
36
36
|
};
|
|
37
37
|
type TInjectAuthorizedOptions<OwnProps extends {}> = {
|
package/dist/declarations/src/components/restricted-by-permissions/restricted-by-permissions.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ type Props = {
|
|
|
35
35
|
children?: TRenderProp | ReactNode;
|
|
36
36
|
};
|
|
37
37
|
declare const RestrictedByPermissions: {
|
|
38
|
-
(props: Props): import("@emotion/react/
|
|
38
|
+
(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
41
|
export default RestrictedByPermissions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/permissions",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.42.0",
|
|
4
4
|
"description": "React components to declaratively handle MC permissions",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.22.15",
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
33
|
-
"@commercetools-frontend/application-shell-connectors": "22.
|
|
34
|
-
"@commercetools-frontend/sentry": "22.
|
|
35
|
-
"@emotion/react": "^11.
|
|
33
|
+
"@commercetools-frontend/application-shell-connectors": "22.42.0",
|
|
34
|
+
"@commercetools-frontend/sentry": "22.42.0",
|
|
35
|
+
"@emotion/react": "^11.14.0",
|
|
36
36
|
"@types/lodash": "^4.14.198",
|
|
37
37
|
"@types/prop-types": "^15.7.5",
|
|
38
38
|
"@types/react": "^17.0.83",
|