@commercetools-frontend/permissions 21.23.6 → 21.23.7

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.
@@ -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 = "21.23.6";
56
+ var version = "21.23.7";
57
57
 
58
58
  // Build the permission key from the definition to match it to the format coming from the API.
59
59
  var toCanCase = function toCanCase(permissionName) {
@@ -52,7 +52,7 @@ var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
52
52
  var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
53
53
 
54
54
  // NOTE: This string will be replaced on build time with the package version.
55
- var version = "21.23.6";
55
+ var version = "21.23.7";
56
56
 
57
57
  // Build the permission key from the definition to match it to the format coming from the API.
58
58
  var toCanCase = function toCanCase(permissionName) {
@@ -26,7 +26,7 @@ import upperFirst from 'lodash/upperFirst';
26
26
  import { jsx, Fragment } from '@emotion/react/jsx-runtime';
27
27
 
28
28
  // NOTE: This string will be replaced on build time with the package version.
29
- var version = "21.23.6";
29
+ var version = "21.23.7";
30
30
 
31
31
  // Build the permission key from the definition to match it to the format coming from the API.
32
32
  var toCanCase = function toCanCase(permissionName) {
@@ -1,26 +1,26 @@
1
1
  import type { TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- declare type TPermissionName = string;
4
- declare type TActionRightName = string;
5
- declare type TActionRightGroup = string;
6
- declare type TDemandedActionRight = {
3
+ type TPermissionName = string;
4
+ type TActionRightName = string;
5
+ type TActionRightGroup = string;
6
+ type TDemandedActionRight = {
7
7
  group: TActionRightGroup;
8
8
  name: TActionRightName;
9
9
  };
10
- declare type TDemandedDataFence = {
10
+ type TDemandedDataFence = {
11
11
  group: string;
12
12
  name: string;
13
13
  type: string;
14
14
  };
15
- declare type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
15
+ type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
16
16
  actualDataFenceValues: string[];
17
17
  }) => string[] | null;
18
- declare type TProjectPermissions = {
18
+ type TProjectPermissions = {
19
19
  permissions: TNormalizedPermissions | null;
20
20
  actionRights: TNormalizedActionRights | null;
21
21
  dataFences: TNormalizedDataFences | null;
22
22
  };
23
- declare type Props = {
23
+ type Props = {
24
24
  demandedPermissions: TPermissionName[];
25
25
  demandedActionRights?: TDemandedActionRight[];
26
26
  demandedDataFences?: TDemandedDataFence[];
@@ -35,7 +35,7 @@ declare const Authorized: {
35
35
  displayName: string;
36
36
  defaultProps: Pick<Props, "shouldMatchSomePermissions">;
37
37
  };
38
- declare type TInjectAuthorizedOptions<OwnProps extends {}> = {
38
+ type TInjectAuthorizedOptions<OwnProps extends {}> = {
39
39
  shouldMatchSomePermissions?: boolean;
40
40
  actionRights?: TDemandedActionRight[];
41
41
  dataFences?: TDemandedDataFence[];
@@ -1,20 +1,20 @@
1
1
  import { ComponentType } from 'react';
2
- declare type TPermissionName = string;
3
- declare type TActionRightName = string;
4
- declare type TActionRightGroup = string;
5
- declare type TDemandedActionRight = {
2
+ type TPermissionName = string;
3
+ type TActionRightName = string;
4
+ type TActionRightGroup = string;
5
+ type TDemandedActionRight = {
6
6
  group: TActionRightGroup;
7
7
  name: TActionRightName;
8
8
  };
9
- declare type TDemandedDataFence = {
9
+ type TDemandedDataFence = {
10
10
  group: string;
11
11
  name: string;
12
12
  type: string;
13
13
  };
14
- declare type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
14
+ type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
15
15
  actualDataFenceValues: string[];
16
16
  }) => string[] | null;
17
- declare type TOptions<OwnProps extends {}> = {
17
+ type TOptions<OwnProps extends {}> = {
18
18
  shouldMatchSomePermissions?: boolean;
19
19
  actionRights?: TDemandedActionRight[];
20
20
  dataFences?: TDemandedDataFence[];
@@ -1,29 +1,29 @@
1
1
  import type { TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
2
2
  import { ReactNode, ComponentType } from 'react';
3
- declare type TPermissionName = string;
4
- declare type TActionRightName = string;
5
- declare type TActionRightGroup = string;
6
- declare type TDemandedActionRight = {
3
+ type TPermissionName = string;
4
+ type TActionRightName = string;
5
+ type TActionRightGroup = string;
6
+ type TDemandedActionRight = {
7
7
  group: TActionRightGroup;
8
8
  name: TActionRightName;
9
9
  };
10
- declare type TDemandedDataFence = {
10
+ type TDemandedDataFence = {
11
11
  group: string;
12
12
  name: string;
13
13
  type: string;
14
14
  };
15
- declare type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
15
+ type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
16
16
  actualDataFenceValues: string[];
17
17
  }) => string[] | null;
18
- declare type TProjectPermissions = {
18
+ type TProjectPermissions = {
19
19
  permissions: TNormalizedPermissions | null;
20
20
  actionRights: TNormalizedActionRights | null;
21
21
  dataFences: TNormalizedDataFences | null;
22
22
  };
23
- declare type TRenderProp = (props: {
23
+ type TRenderProp = (props: {
24
24
  isAuthorized: boolean;
25
25
  }) => ReactNode;
26
- declare type Props = {
26
+ type Props = {
27
27
  shouldMatchSomePermissions?: boolean;
28
28
  permissions: TPermissionName[];
29
29
  actionRights?: TDemandedActionRight[];
@@ -1,20 +1,20 @@
1
1
  import type { TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
2
- declare type TPermissionName = string;
3
- declare type TActionRightName = string;
4
- declare type TActionRightGroup = string;
5
- declare type TDemandedActionRight = {
2
+ type TPermissionName = string;
3
+ type TActionRightName = string;
4
+ type TActionRightGroup = string;
5
+ type TDemandedActionRight = {
6
6
  group: TActionRightGroup;
7
7
  name: TActionRightName;
8
8
  };
9
- declare type TDemandedDataFence = {
9
+ type TDemandedDataFence = {
10
10
  group: string;
11
11
  name: string;
12
12
  type: string;
13
13
  };
14
- declare type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
14
+ type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFence & {
15
15
  actualDataFenceValues: string[];
16
16
  }) => string[] | null;
17
- declare type TProjectPermissions = {
17
+ type TProjectPermissions = {
18
18
  permissions: TNormalizedPermissions | null;
19
19
  actionRights: TNormalizedActionRights | null;
20
20
  dataFences: TNormalizedDataFences | null;
@@ -1,39 +1,39 @@
1
- declare type TPermissionName = string;
2
- declare type TPermissions = {
1
+ type TPermissionName = string;
2
+ type TPermissions = {
3
3
  [key: string]: boolean;
4
4
  };
5
- declare type TActionRightName = string;
6
- declare type TActionRightGroup = string;
7
- declare type TDemandedActionRight = {
5
+ type TActionRightName = string;
6
+ type TActionRightGroup = string;
7
+ type TDemandedActionRight = {
8
8
  group: TActionRightGroup;
9
9
  name: TActionRightName;
10
10
  };
11
- declare type TActionRight = {
11
+ type TActionRight = {
12
12
  [key: string]: boolean;
13
13
  };
14
- declare type TActionRights = {
14
+ type TActionRights = {
15
15
  [key: string]: TActionRight;
16
16
  };
17
- declare type TDataFenceGroupedByPermission = {
17
+ type TDataFenceGroupedByPermission = {
18
18
  [key: string]: {
19
19
  values: string[];
20
20
  } | null;
21
21
  };
22
- declare type TDataFenceGroupedByResourceType = {
22
+ type TDataFenceGroupedByResourceType = {
23
23
  [key: string]: TDataFenceGroupedByPermission | null;
24
24
  };
25
- declare type TDataFenceType = 'store';
26
- declare type TDataFences = Partial<Record<TDataFenceType, TDataFenceGroupedByResourceType>>;
27
- declare type TDemandedDataFence = {
25
+ type TDataFenceType = 'store';
26
+ type TDataFences = Partial<Record<TDataFenceType, TDataFenceGroupedByResourceType>>;
27
+ type TDemandedDataFence = {
28
28
  group: string;
29
29
  name: string;
30
30
  type: string;
31
31
  };
32
- declare type TDemandedDataFenceWithValues = TDemandedDataFence & {
32
+ type TDemandedDataFenceWithValues = TDemandedDataFence & {
33
33
  actualDataFenceValues: string[];
34
34
  };
35
- declare type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFenceWithValues) => string[] | null;
36
- declare type TOptionsForAppliedDataFence = {
35
+ type TSelectDataFenceData = (demandedDataFenceWithActualValues: TDemandedDataFenceWithValues) => string[] | null;
36
+ type TOptionsForAppliedDataFence = {
37
37
  actualPermissions: TPermissions | null;
38
38
  demandedDataFences: TDemandedDataFence[];
39
39
  actualDataFences: TDataFences | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/permissions",
3
- "version": "21.23.6",
3
+ "version": "21.23.7",
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": {
@@ -18,14 +18,14 @@
18
18
  "module": "dist/commercetools-frontend-permissions.esm.js",
19
19
  "files": ["dist", "package.json", "LICENSE", "README.md"],
20
20
  "dependencies": {
21
- "@babel/runtime": "^7.19.0",
22
- "@babel/runtime-corejs3": "^7.19.0",
23
- "@commercetools-frontend/application-shell-connectors": "21.23.6",
24
- "@commercetools-frontend/sentry": "21.23.6",
25
- "@emotion/react": "11.10.4",
26
- "@types/lodash": "^4.14.185",
21
+ "@babel/runtime": "^7.20.13",
22
+ "@babel/runtime-corejs3": "^7.20.13",
23
+ "@commercetools-frontend/application-shell-connectors": "21.23.7",
24
+ "@commercetools-frontend/sentry": "21.23.7",
25
+ "@emotion/react": "11.10.5",
26
+ "@types/lodash": "^4.14.191",
27
27
  "@types/prop-types": "^15.7.5",
28
- "@types/react": "^17.0.49",
28
+ "@types/react": "^17.0.53",
29
29
  "lodash": "4.17.21",
30
30
  "prop-types": "15.8.1",
31
31
  "tiny-invariant": "1.3.1",