@commercetools-frontend/application-shell 20.12.2 → 21.0.0-rc.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/{application-entry-point-cde26c8c.cjs.dev.js → application-entry-point-a804b3d4.cjs.dev.js} +36 -84
- package/dist/{application-entry-point-961cacf8.cjs.prod.js → application-entry-point-b627328b.cjs.prod.js} +36 -84
- package/dist/{application-entry-point-cfaa3874.esm.js → application-entry-point-c737344a.esm.js} +15 -58
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +9 -3
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +9 -3
- package/dist/commercetools-frontend-application-shell.esm.js +7 -3
- package/dist/constants-33a16227.esm.js +46 -0
- package/dist/constants-745aeeca.cjs.prod.js +54 -0
- package/dist/constants-fdbe0e9d.cjs.dev.js +54 -0
- package/dist/declarations/src/components/app-bar/app-bar.d.ts +0 -2
- package/dist/declarations/src/components/application-shell/application-shell.d.ts +0 -3
- package/dist/declarations/src/components/locale-switcher/locale-switcher.d.ts +3 -4
- package/dist/declarations/src/components/navbar/compiled/navbar.css.json.d.ts +1 -1
- package/dist/declarations/src/components/navbar/navbar.d.ts +0 -2
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +0 -2
- package/dist/declarations/src/components/user-settings-menu/user-settings-menu.d.ts +1 -4
- package/dist/declarations/src/hooks/use-applications-menu/use-applications-menu.d.ts +2 -3
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/declarations/src/ssr/index.d.ts +2 -0
- package/dist/declarations/src/test-utils/test-utils.d.ts +20 -5
- package/dist/declarations/src/utils/formatters.d.ts +8 -0
- package/dist/declarations/src/utils/index.d.ts +1 -0
- package/dist/declarations/src/{components/authenticated/helpers.d.ts → utils/oidc.d.ts} +0 -0
- package/dist/index-603b598e.cjs.dev.js +4588 -0
- package/dist/{index-e8564a47.cjs.prod.js → index-64ee0fb3.cjs.prod.js} +139 -250
- package/dist/index-9e98c47d.esm.js +4515 -0
- package/dist/oidc-7e7761de.cjs.dev.js +94 -0
- package/dist/oidc-8e05c00e.esm.js +84 -0
- package/dist/oidc-be09bd90.cjs.prod.js +94 -0
- package/dist/{project-expired-68ca2579.esm.js → project-expired-374d89b7.esm.js} +10 -6
- package/dist/{project-expired-e16b9b05.cjs.prod.js → project-expired-40e3fc90.cjs.prod.js} +10 -6
- package/dist/{project-expired-dcb82d36.cjs.dev.js → project-expired-69a9f8bb.cjs.dev.js} +10 -6
- package/dist/{project-not-found-26f56aed.cjs.dev.js → project-not-found-1456109d.cjs.prod.js} +10 -6
- package/dist/{project-not-found-d5f8ebbb.esm.js → project-not-found-516009ae.esm.js} +10 -6
- package/dist/{project-not-found-c7b32516.cjs.prod.js → project-not-found-883f0dc8.cjs.dev.js} +10 -6
- package/dist/{project-not-initialized-ea0be167.cjs.prod.js → project-not-initialized-5ca81ae8.cjs.prod.js} +10 -6
- package/dist/{project-not-initialized-9bc69b1f.cjs.dev.js → project-not-initialized-a5df8c78.cjs.dev.js} +10 -6
- package/dist/{project-not-initialized-473a61e8.esm.js → project-not-initialized-b9ae0d13.esm.js} +10 -6
- package/dist/{project-suspended-b46cf02d.cjs.dev.js → project-suspended-40039731.cjs.dev.js} +10 -6
- package/dist/{project-suspended-c2fca68f.cjs.prod.js → project-suspended-8ed251b2.cjs.prod.js} +10 -6
- package/dist/{project-suspended-8f98e2d7.esm.js → project-suspended-fc33a971.esm.js} +10 -6
- package/dist/{quick-access-f735e1dd.esm.js → quick-access-62077068.esm.js} +8 -4
- package/dist/{quick-access-b2bb3019.cjs.dev.js → quick-access-c5fdf402.cjs.dev.js} +8 -4
- package/dist/{quick-access-89a8fc45.cjs.prod.js → quick-access-e436397a.cjs.prod.js} +8 -4
- package/dist/{service-page-project-switcher-5ff429b8.cjs.dev.js → service-page-project-switcher-02903d80.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-272fcaa0.esm.js → service-page-project-switcher-1ebc3f88.esm.js} +1 -1
- package/dist/{service-page-project-switcher-23ea0c1e.cjs.prod.js → service-page-project-switcher-83de4c79.cjs.prod.js} +1 -1
- package/package.json +57 -51
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.d.ts +1 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +16 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.js +7 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +16 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +6 -0
- package/ssr/package.json +4 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +40 -48
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +39 -47
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +37 -49
- package/dist/index-0b3f8556.esm.js +0 -4632
- package/dist/index-e45779cf.cjs.dev.js +0 -4705
|
@@ -12,9 +12,18 @@ import { createReduxStore } from '../configure-store';
|
|
|
12
12
|
declare type TPermissions = {
|
|
13
13
|
[key: string]: boolean;
|
|
14
14
|
};
|
|
15
|
+
declare type TAllAppliedPermission = {
|
|
16
|
+
name: string;
|
|
17
|
+
value: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const denormalizePermissions: (permissions?: TPermissions | undefined) => TAllAppliedPermission[];
|
|
15
20
|
declare type TNormalizedActionRights = {
|
|
16
21
|
[key: string]: TPermissions;
|
|
17
22
|
};
|
|
23
|
+
declare type TAllAppliedActionRight = TAllAppliedPermission & {
|
|
24
|
+
group: string;
|
|
25
|
+
};
|
|
26
|
+
declare const denormalizeActionRights: (actionRights?: TNormalizedActionRights | undefined) => TAllAppliedActionRight[];
|
|
18
27
|
declare type TNormalizedDataFenceStorePermissions = {
|
|
19
28
|
[key: string]: {
|
|
20
29
|
values: string[];
|
|
@@ -26,11 +35,20 @@ declare type TNormalizedDataFenceStores = {
|
|
|
26
35
|
declare type TNormalizedDataFences = {
|
|
27
36
|
store: TNormalizedDataFenceStores;
|
|
28
37
|
};
|
|
38
|
+
declare type TAllAppliedDataFence = {
|
|
39
|
+
__typename: 'StoreDataFence';
|
|
40
|
+
type: string;
|
|
41
|
+
name: string;
|
|
42
|
+
value: string;
|
|
43
|
+
group: string;
|
|
44
|
+
};
|
|
45
|
+
declare const denormalizeDataFences: (dataFences?: TNormalizedDataFences | undefined) => TAllAppliedDataFence[];
|
|
46
|
+
declare const mapResourceAccessToAppliedPermissions: (resourceAccesses: string[]) => TAllAppliedPermission[];
|
|
29
47
|
export declare type TRenderAppOptions<AdditionalEnvironmentProperties = {}> = {
|
|
30
48
|
locale: string;
|
|
31
49
|
mocks: ReadonlyArray<MockedResponse>;
|
|
32
50
|
apolloClient?: ApolloClient<NormalizedCacheObject>;
|
|
33
|
-
|
|
51
|
+
enableApolloMocks: boolean;
|
|
34
52
|
route: string;
|
|
35
53
|
disableAutomaticEntryPointRoutes: boolean;
|
|
36
54
|
history: ReturnType<typeof createEnhancedHistory>;
|
|
@@ -39,9 +57,6 @@ export declare type TRenderAppOptions<AdditionalEnvironmentProperties = {}> = {
|
|
|
39
57
|
user: Partial<TProviderProps<AdditionalEnvironmentProperties>['user']>;
|
|
40
58
|
project: Partial<TProviderProps<AdditionalEnvironmentProperties>['project']>;
|
|
41
59
|
dataLocale: TProviderProps<AdditionalEnvironmentProperties>['projectDataLocale'];
|
|
42
|
-
permissions: TPermissions;
|
|
43
|
-
actionRights: TNormalizedActionRights;
|
|
44
|
-
dataFences: TNormalizedDataFences;
|
|
45
60
|
} & rtl.RenderOptions;
|
|
46
61
|
declare type TRenderAppResult<AdditionalEnvironmentProperties = {}> = rtl.RenderResult & Pick<TRenderAppOptions<AdditionalEnvironmentProperties>, 'history' | 'user' | 'project' | 'environment'>;
|
|
47
62
|
declare function renderApp<AdditionalEnvironmentProperties = {}>(ui: ReactElement, options?: Partial<TRenderAppOptions<AdditionalEnvironmentProperties>>): TRenderAppResult<AdditionalEnvironmentProperties>;
|
|
@@ -65,4 +80,4 @@ declare const hooks: {
|
|
|
65
80
|
removeCleanup: (callback: rtlHooks.CleanupCallback) => void;
|
|
66
81
|
suppressErrorOutput: () => () => void;
|
|
67
82
|
};
|
|
68
|
-
export { renderApp, renderAppWithRedux, hooks };
|
|
83
|
+
export { renderApp, renderAppWithRedux, hooks, mapResourceAccessToAppliedPermissions, denormalizePermissions, denormalizeActionRights, denormalizeDataFences, };
|
|
@@ -6,3 +6,4 @@ export { default as getCorrelationId } from './get-correlation-id';
|
|
|
6
6
|
export { default as getPreviousProjectKey } from './get-previous-project-key';
|
|
7
7
|
export { default as getMcApiUrl } from './get-mc-api-url';
|
|
8
8
|
export { createApolloContextForProxyForwardTo } from './apollo-context';
|
|
9
|
+
export * from './formatters';
|
|
File without changes
|