@commercetools-frontend/application-shell 22.7.0 → 22.8.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-78dcfccf.cjs.dev.js → application-entry-point-61deb1f6.cjs.dev.js} +3 -3
- package/dist/{application-entry-point-9eaf625b.cjs.prod.js → application-entry-point-90aa1cdb.cjs.prod.js} +3 -3
- package/dist/{application-entry-point-4b2f37d2.esm.js → application-entry-point-bfcf85aa.esm.js} +3 -3
- package/dist/{box-e17daf6c.cjs.prod.js → box-09bf50e1.cjs.prod.js} +2 -2
- package/dist/{box-686bc950.cjs.dev.js → box-4857aa65.cjs.dev.js} +2 -2
- package/dist/{box-6ce924c9.esm.js → box-9cf180c1.esm.js} +2 -2
- package/dist/{cart-796beed7.cjs.dev.js → cart-645074db.cjs.prod.js} +2 -2
- package/dist/{cart-f2fc1baf.cjs.prod.js → cart-b0044279.cjs.dev.js} +2 -2
- package/dist/{cart-3b156a46.esm.js → cart-bb491ca1.esm.js} +2 -2
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +7 -7
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +7 -7
- package/dist/commercetools-frontend-application-shell.esm.js +5 -4
- package/dist/{configure-apollo-fd556518.cjs.dev.js → configure-apollo-459b0dbc.cjs.dev.js} +20 -19
- package/dist/{configure-apollo-651219fe.cjs.prod.js → configure-apollo-55d13684.cjs.prod.js} +20 -19
- package/dist/{configure-apollo-7d1735c1.esm.js → configure-apollo-a219411c.esm.js} +20 -19
- package/dist/{connected-square-960e046b.cjs.prod.js → connected-square-2d046cb8.cjs.prod.js} +2 -2
- package/dist/{connected-square-961eb5b6.cjs.dev.js → connected-square-a2fea344.cjs.dev.js} +2 -2
- package/dist/{connected-square-f34a98ff.esm.js → connected-square-fe6a790f.esm.js} +2 -2
- package/dist/{constants-a09fbec1.esm.js → constants-0b9c2426.esm.js} +10 -2
- package/dist/{constants-a1140922.cjs.dev.js → constants-0da1db32.cjs.prod.js} +10 -1
- package/dist/{constants-ed10e935.cjs.prod.js → constants-bef5a843.cjs.dev.js} +10 -1
- package/dist/custom-view-dev-host-58d037c2.cjs.dev.js +215 -0
- package/dist/custom-view-dev-host-77fdde9b.esm.js +202 -0
- package/dist/declarations/src/components/app-bar/app-bar.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-dev-host/custom-view-dev-host.d.ts +11 -0
- package/dist/declarations/src/components/custom-view-dev-host/index.d.ts +6 -0
- package/dist/declarations/src/components/custom-view-loader/custom-view-loader.d.ts +8 -0
- package/dist/declarations/src/components/custom-view-loader/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-loader/messages.d.ts +7 -0
- package/dist/declarations/src/components/custom-view-shell/custom-view-shell.d.ts +4 -4
- package/dist/declarations/src/components/custom-view-shell-authenticated/custom-view-shell-authenticated.d.ts +2 -1
- package/dist/declarations/src/components/navbar/index.d.ts +2 -98
- package/dist/declarations/src/components/navbar/navbar-new/compiled/navbar.css.json.d.ts +3 -0
- package/dist/declarations/src/components/navbar/navbar-new/menu-items.d.ts +102 -0
- package/dist/declarations/src/components/navbar/navbar-new/navbar.d.ts +48 -0
- package/dist/declarations/src/components/navbar/navbar-old/compiled/navbar.css.json.d.ts +3 -0
- package/dist/declarations/src/components/navbar/{menu-items.d.ts → navbar-old/menu-items.d.ts} +6 -5
- package/dist/declarations/src/components/navbar/navbar-old/navbar.d.ts +48 -0
- package/dist/declarations/src/components/navbar/navbar-old/navbar.styles.d.ts +7 -0
- package/dist/declarations/src/components/navbar/navbar.d.ts +4 -16
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +1 -0
- package/dist/declarations/src/components/project-container/index.d.ts +1 -19
- package/dist/declarations/src/constants.d.ts +8 -0
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/declarations/src/test-utils/custom-views-utils.d.ts +12 -0
- package/dist/declarations/src/test-utils/index.d.ts +1 -0
- package/dist/declarations/src/types/generated/ctp.d.ts +304 -3
- package/dist/declarations/src/types/generated/settings.d.ts +78 -2
- package/dist/{error-apologizer-e5c28e4c.esm.js → error-apologizer-76f087f4.esm.js} +2 -2
- package/dist/{error-apologizer-b3872f4d.cjs.prod.js → error-apologizer-84dc825c.cjs.prod.js} +2 -2
- package/dist/{error-apologizer-c3210e30.cjs.dev.js → error-apologizer-f6793491.cjs.dev.js} +2 -2
- package/dist/{gear-9b394c43.cjs.prod.js → gear-4f7cde98.cjs.prod.js} +2 -2
- package/dist/{gear-1f381738.esm.js → gear-ee90ba83.esm.js} +2 -2
- package/dist/{gear-ab1f6210.cjs.dev.js → gear-f2668579.cjs.dev.js} +2 -2
- package/dist/{heart-a6e7ccf9.cjs.dev.js → heart-01f01038.cjs.prod.js} +2 -2
- package/dist/{heart-be7c779b.esm.js → heart-86f780f3.esm.js} +2 -2
- package/dist/{heart-ebfab4cd.cjs.prod.js → heart-e49dd92a.cjs.dev.js} +2 -2
- package/dist/{index-b4696e0a.cjs.dev.js → index-0f5381b1.cjs.dev.js} +282 -156
- package/dist/{index-763cd304.esm.js → index-519cff4b.esm.js} +284 -157
- package/dist/{index-62467df5.cjs.prod.js → index-e8c02aca.cjs.prod.js} +222 -128
- package/dist/{list-with-search-b5e9ae1b.cjs.dev.js → list-with-search-027ab8eb.cjs.dev.js} +2 -2
- package/dist/{list-with-search-e3ccba98.cjs.prod.js → list-with-search-6462447e.cjs.prod.js} +2 -2
- package/dist/{list-with-search-3341bbf7.esm.js → list-with-search-d2901e34.esm.js} +2 -2
- package/dist/navbar-8102a43b.esm.js +1991 -0
- package/dist/navbar-89b2edc4.cjs.dev.js +2021 -0
- package/dist/navbar-a29ebdeb.cjs.prod.js +1834 -0
- package/dist/{oidc-244125d3.cjs.dev.js → oidc-97f361cb.cjs.dev.js} +1 -1
- package/dist/{oidc-a780f067.cjs.prod.js → oidc-a55e3dd9.cjs.prod.js} +1 -1
- package/dist/{oidc-callback-a6503499.cjs.prod.js → oidc-callback-6415bb71.cjs.prod.js} +6 -5
- package/dist/{oidc-callback-ff7160f9.esm.js → oidc-callback-80314ba9.esm.js} +6 -5
- package/dist/{oidc-callback-842c6103.cjs.dev.js → oidc-callback-ff8e12ba.cjs.dev.js} +6 -5
- package/dist/{oidc-c4e99cfc.esm.js → oidc-db881d40.esm.js} +1 -1
- package/dist/{paperclip-6f0b6ae5.cjs.prod.js → paperclip-005ec544.cjs.dev.js} +2 -2
- package/dist/{paperclip-c76aec52.esm.js → paperclip-a820ee87.esm.js} +2 -2
- package/dist/{paperclip-ec55e4a0.cjs.dev.js → paperclip-fe72a70d.cjs.prod.js} +2 -2
- package/dist/{plugin-16c01245.cjs.dev.js → plugin-81ae1044.cjs.prod.js} +2 -2
- package/dist/{plugin-279f88cd.esm.js → plugin-c7bf9e53.esm.js} +2 -2
- package/dist/{plugin-f199ed20.cjs.prod.js → plugin-feb22442.cjs.dev.js} +2 -2
- package/dist/{project-container-fcbf04f4.cjs.dev.js → project-container-bc3768d1.cjs.dev.js} +11 -11
- package/dist/{project-container-c34b3563.esm.js → project-container-bd9ab58b.esm.js} +11 -11
- package/dist/{project-container-e2770668.cjs.prod.js → project-container-e24d4274.cjs.prod.js} +11 -11
- package/dist/{project-expired-75edfdaa.cjs.dev.js → project-expired-1cf2470b.cjs.dev.js} +8 -7
- package/dist/{project-expired-2b816199.cjs.prod.js → project-expired-ad577eea.cjs.prod.js} +8 -7
- package/dist/{project-expired-1e0021f1.esm.js → project-expired-cd0367e6.esm.js} +8 -7
- package/dist/{project-not-found-4d882010.esm.js → project-not-found-47fe81e3.esm.js} +8 -7
- package/dist/{project-not-found-8cdc8967.cjs.prod.js → project-not-found-531c1f36.cjs.prod.js} +8 -7
- package/dist/{project-not-found-77cc9900.cjs.dev.js → project-not-found-bdf80892.cjs.dev.js} +8 -7
- package/dist/{project-not-initialized-98825943.esm.js → project-not-initialized-b632dec8.esm.js} +8 -7
- package/dist/{project-not-initialized-1e158ec7.cjs.prod.js → project-not-initialized-d12db254.cjs.prod.js} +8 -7
- package/dist/{project-not-initialized-29cabc17.cjs.dev.js → project-not-initialized-e903c05c.cjs.dev.js} +8 -7
- package/dist/{project-suspended-ed2b1227.esm.js → project-suspended-33c95408.esm.js} +8 -7
- package/dist/{project-suspended-fc98b3d1.cjs.dev.js → project-suspended-5b038275.cjs.dev.js} +8 -7
- package/dist/{project-suspended-8c1f499c.cjs.prod.js → project-suspended-65120ddf.cjs.prod.js} +8 -7
- package/dist/{quick-access-158b499a.esm.js → quick-access-134b051c.esm.js} +7 -8
- package/dist/{quick-access-c6e99d06.cjs.prod.js → quick-access-444ebdce.cjs.prod.js} +7 -8
- package/dist/{quick-access-cfeb6cec.cjs.dev.js → quick-access-59d69a96.cjs.dev.js} +7 -8
- package/dist/{redirect-to-login-6906966c.esm.js → redirect-to-login-6c90f034.esm.js} +12 -12
- package/dist/{redirect-to-login-d133b84f.cjs.prod.js → redirect-to-login-bc568233.cjs.prod.js} +12 -12
- package/dist/{redirect-to-login-88714a9b.cjs.dev.js → redirect-to-login-e4cbcc7a.cjs.dev.js} +12 -12
- package/dist/{redirect-to-logout-27a66cc7.esm.js → redirect-to-logout-732ccf57.esm.js} +10 -9
- package/dist/{redirect-to-logout-4f3f82f1.cjs.dev.js → redirect-to-logout-cf0a4d95.cjs.dev.js} +10 -9
- package/dist/{redirect-to-logout-55feba64.cjs.prod.js → redirect-to-logout-e608f60c.cjs.prod.js} +10 -9
- package/dist/{redirector-f71198cc.cjs.dev.js → redirector-5daa8baa.cjs.dev.js} +2 -2
- package/dist/{redirector-ec9fa17f.cjs.prod.js → redirector-752b4efc.cjs.prod.js} +2 -2
- package/dist/{redirector-368eeb0f.esm.js → redirector-db8b5cd2.esm.js} +2 -2
- package/dist/{requests-in-flight-loader-219f802b.cjs.prod.js → requests-in-flight-loader-a59adc86.cjs.prod.js} +7 -6
- package/dist/{requests-in-flight-loader-7dbb4644.esm.js → requests-in-flight-loader-b52b55fb.esm.js} +7 -6
- package/dist/{requests-in-flight-loader-929aec28.cjs.dev.js → requests-in-flight-loader-cb996eb9.cjs.dev.js} +7 -6
- package/dist/{rocket-c6d44215.cjs.dev.js → rocket-3372731a.cjs.dev.js} +2 -2
- package/dist/{rocket-067c2f8c.esm.js → rocket-bacf24be.esm.js} +2 -2
- package/dist/{rocket-f0bfae34.cjs.prod.js → rocket-cb99be06.cjs.prod.js} +2 -2
- package/dist/{service-page-project-switcher-fe34254d.cjs.prod.js → service-page-project-switcher-23846f90.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-6fe90ebf.cjs.dev.js → service-page-project-switcher-68e55d2a.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-b118a954.esm.js → service-page-project-switcher-fc88ffa8.esm.js} +1 -1
- package/dist/{speedometer-0de260cf.cjs.prod.js → speedometer-26f52e73.cjs.prod.js} +2 -2
- package/dist/{speedometer-baa6ae82.esm.js → speedometer-4c8e0b9c.esm.js} +2 -2
- package/dist/{speedometer-aedd9660.cjs.dev.js → speedometer-c1ec5a1d.cjs.dev.js} +2 -2
- package/dist/{star-49745c72.cjs.dev.js → star-6b9a91d2.cjs.dev.js} +2 -2
- package/dist/{star-bd723a9c.esm.js → star-af90a9c6.esm.js} +2 -2
- package/dist/{star-c11b0683.cjs.prod.js → star-e4902bbb.cjs.prod.js} +2 -2
- package/dist/{tag-multi-2e7a68ec.cjs.dev.js → tag-multi-1c065f61.cjs.prod.js} +2 -2
- package/dist/{tag-multi-1dee8212.esm.js → tag-multi-4c2742de.esm.js} +2 -2
- package/dist/{tag-multi-f8d9c9e6.cjs.prod.js → tag-multi-abef3e15.cjs.dev.js} +2 -2
- package/dist/{tree-structure-690366f9.cjs.prod.js → tree-structure-3ec98cce.cjs.prod.js} +2 -2
- package/dist/{tree-structure-8c974c7a.cjs.dev.js → tree-structure-96ab0b7e.cjs.dev.js} +2 -2
- package/dist/{tree-structure-0a1dc6bf.esm.js → tree-structure-ca0498a0.esm.js} +2 -2
- package/dist/{use-applications-menu-fabb6a77.esm.js → use-applications-menu-15ea8813.esm.js} +3 -3
- package/dist/{use-applications-menu-37b8d2c6.cjs.dev.js → use-applications-menu-4f35b214.cjs.dev.js} +3 -3
- package/dist/{use-applications-menu-bf23bd5d.cjs.prod.js → use-applications-menu-e19bc05b.cjs.prod.js} +3 -3
- package/dist/{user-filled-58af1ae4.cjs.prod.js → user-filled-26f333b2.cjs.prod.js} +2 -2
- package/dist/{user-filled-5dd7a51a.cjs.dev.js → user-filled-34aeebcc.cjs.dev.js} +2 -2
- package/dist/{user-filled-d40a7e17.esm.js → user-filled-61d8a81b.esm.js} +2 -2
- package/dist/{user-settings-menu-fa056e1c.cjs.prod.js → user-settings-menu-695efeec.cjs.prod.js} +9 -8
- package/dist/{user-settings-menu-e4439479.esm.js → user-settings-menu-8080c4ff.esm.js} +9 -8
- package/dist/{user-settings-menu-ef7fee49.cjs.dev.js → user-settings-menu-d08e3b19.cjs.dev.js} +9 -8
- package/dist/{version-tracker-f72dd9c8.cjs.dev.js → version-tracker-0fe7660b.cjs.dev.js} +2 -2
- package/dist/{version-tracker-e1338396.cjs.prod.js → version-tracker-3b691dec.cjs.prod.js} +2 -2
- package/dist/{version-tracker-cc9a8d4c.esm.js → version-tracker-cb877c84.esm.js} +2 -2
- package/dist/{world-bfd04f52.cjs.dev.js → world-22189397.cjs.prod.js} +2 -2
- package/dist/{world-f921d80c.cjs.prod.js → world-500baeb2.cjs.dev.js} +2 -2
- package/dist/{world-1b0e72fc.esm.js → world-523efd61.esm.js} +2 -2
- package/package.json +40 -39
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +2 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +2 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +2 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +52 -17
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +52 -17
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +53 -19
- package/dist/declarations/src/components/custom-view-context/custom-view-context.d.ts +0 -12
- package/dist/declarations/src/components/custom-view-context/index.d.ts +0 -1
- package/dist/declarations/src/components/navbar/compiled/navbar.css.json.d.ts +0 -3
- package/dist/navbar-21b59702.cjs.prod.js +0 -1144
- package/dist/navbar-a44260f4.esm.js +0 -1209
- package/dist/navbar-f1d631ef.cjs.dev.js +0 -1239
- /package/dist/declarations/src/components/navbar/{navbar-skeleton.d.ts → navbar-new/navbar-skeleton.d.ts} +0 -0
- /package/dist/declarations/src/components/navbar/{navbar-skeleton.styles.d.ts → navbar-new/navbar-skeleton.styles.d.ts} +0 -0
- /package/dist/declarations/src/components/navbar/{navbar.styles.d.ts → navbar-new/navbar.styles.d.ts} +0 -0
- /package/dist/declarations/src/components/navbar/{loading-navbar.d.ts → navbar-old/loading-navbar.d.ts} +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { MouseEventHandler, type ReactNode, type SyntheticEvent } from 'react';
|
|
2
|
+
import type { TNormalizedMenuVisibilities, TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
|
|
3
|
+
import { BackIcon } from '@commercetools-uikit/icons';
|
|
4
|
+
import type { TDataFence, TActionRight, TLocalizedField } from '../../../types/generated/proxy';
|
|
5
|
+
type TProjectPermissions = {
|
|
6
|
+
permissions: TNormalizedPermissions | null;
|
|
7
|
+
actionRights: TNormalizedActionRights | null;
|
|
8
|
+
dataFences: TNormalizedDataFences | null;
|
|
9
|
+
};
|
|
10
|
+
type IconProps = Parameters<typeof BackIcon>[0];
|
|
11
|
+
type IconSwitcherProps = {
|
|
12
|
+
icon: string;
|
|
13
|
+
} & IconProps;
|
|
14
|
+
declare const IconSwitcher: {
|
|
15
|
+
({ icon, ...iconProps }: IconSwitcherProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
type MenuExpanderProps = {
|
|
19
|
+
isVisible: boolean;
|
|
20
|
+
onClick: MouseEventHandler<HTMLDivElement>;
|
|
21
|
+
isMenuOpen: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare const MenuExpander: {
|
|
24
|
+
(props: MenuExpanderProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
declare const Faded: import("@emotion/styled").StyledComponent<{
|
|
28
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
+
as?: import("react").ElementType<any> | undefined;
|
|
30
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
31
|
+
type MenuGroupProps = {
|
|
32
|
+
id: string;
|
|
33
|
+
level: 1 | 2;
|
|
34
|
+
isActive?: boolean;
|
|
35
|
+
isExpanded?: boolean;
|
|
36
|
+
hasSubmenu?: boolean;
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
submenuVerticalPosition?: number;
|
|
39
|
+
isSubmenuAboveMenuItem?: boolean;
|
|
40
|
+
};
|
|
41
|
+
declare const MenuGroup: import("react").ForwardRefExoticComponent<MenuGroupProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
42
|
+
type MenuItemProps = {
|
|
43
|
+
hasSubmenu: boolean;
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
isMainMenuRouteActive?: boolean;
|
|
46
|
+
isMenuOpen: boolean;
|
|
47
|
+
onClick: MouseEventHandler<HTMLElement>;
|
|
48
|
+
onMouseEnter?: MouseEventHandler<HTMLElement>;
|
|
49
|
+
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
};
|
|
52
|
+
declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
|
+
export type MenuItemLinkProps = {
|
|
54
|
+
linkTo?: string;
|
|
55
|
+
exactMatch: boolean;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
onClick?: (event: SyntheticEvent<HTMLAnchorElement>) => void;
|
|
58
|
+
useFullRedirectsForLinks?: boolean;
|
|
59
|
+
isSubmenuLink?: boolean;
|
|
60
|
+
};
|
|
61
|
+
declare const MenuItemLink: {
|
|
62
|
+
(props: MenuItemLinkProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
defaultProps: Pick<MenuItemLinkProps, "exactMatch">;
|
|
65
|
+
};
|
|
66
|
+
type RestrictedMenuItemProps = {
|
|
67
|
+
featureToggle?: string;
|
|
68
|
+
namesOfMenuVisibilities?: string[];
|
|
69
|
+
projectPermissions: TProjectPermissions;
|
|
70
|
+
menuVisibilities: TNormalizedMenuVisibilities | null;
|
|
71
|
+
keyOfMenuItem: string;
|
|
72
|
+
permissions: string[];
|
|
73
|
+
actionRights?: TActionRight[];
|
|
74
|
+
dataFences?: TDataFence[];
|
|
75
|
+
children: ReactNode;
|
|
76
|
+
};
|
|
77
|
+
declare const RestrictedMenuItem: {
|
|
78
|
+
(props: RestrictedMenuItemProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
|
|
79
|
+
displayName: string;
|
|
80
|
+
defaultProps: Pick<RestrictedMenuItemProps, "permissions">;
|
|
81
|
+
};
|
|
82
|
+
type MenuLabelProps = {
|
|
83
|
+
labelAllLocales: TLocalizedField[];
|
|
84
|
+
defaultLabel?: string;
|
|
85
|
+
applicationLocale: string;
|
|
86
|
+
};
|
|
87
|
+
declare const MenuLabel: (props: MenuLabelProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
88
|
+
type TNavBarLayoutProps = {
|
|
89
|
+
children: ReactNode;
|
|
90
|
+
};
|
|
91
|
+
declare const NavBarLayout: import("react").ForwardRefExoticComponent<TNavBarLayoutProps & import("react").RefAttributes<HTMLElement>>;
|
|
92
|
+
type ItemContainerProps = {
|
|
93
|
+
labelAllLocales: TLocalizedField[];
|
|
94
|
+
defaultLabel?: string;
|
|
95
|
+
applicationLocale: string;
|
|
96
|
+
icon: string;
|
|
97
|
+
};
|
|
98
|
+
declare const ItemContainer: {
|
|
99
|
+
(props: ItemContainerProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
100
|
+
displayName: string;
|
|
101
|
+
};
|
|
102
|
+
export { RestrictedMenuItem, MenuItem, MenuItemLink, IconSwitcher, MenuGroup, MenuLabel, MenuExpander, Faded, NavBarLayout, ItemContainer, };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type MouseEventHandler } from 'react';
|
|
2
|
+
import type { RouteComponentProps } from 'react-router-dom';
|
|
3
|
+
import type { TApplicationContext, TNormalizedMenuVisibilities, TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
|
|
4
|
+
import type { TFetchProjectQuery } from '../../../types/generated/mc';
|
|
5
|
+
import type { TNavbarMenu } from '../../../types/generated/proxy';
|
|
6
|
+
import { type MenuItemLinkProps } from './menu-items';
|
|
7
|
+
type TProjectPermissions = {
|
|
8
|
+
permissions: TNormalizedPermissions | null;
|
|
9
|
+
actionRights: TNormalizedActionRights | null;
|
|
10
|
+
dataFences: TNormalizedDataFences | null;
|
|
11
|
+
};
|
|
12
|
+
type TMenuWithDefaultLabel = TNavbarMenu & {
|
|
13
|
+
defaultLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
type ApplicationMenuProps = {
|
|
16
|
+
location: RouteComponentProps['location'];
|
|
17
|
+
menu: TMenuWithDefaultLabel;
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
isMenuOpen: boolean;
|
|
20
|
+
shouldCloseMenuFly: MouseEventHandler<HTMLElement>;
|
|
21
|
+
projectPermissions: TProjectPermissions;
|
|
22
|
+
menuVisibilities: TNormalizedMenuVisibilities | null;
|
|
23
|
+
handleToggleItem: () => void;
|
|
24
|
+
applicationLocale: string;
|
|
25
|
+
projectKey: string;
|
|
26
|
+
useFullRedirectsForLinks: boolean;
|
|
27
|
+
onMenuItemClick?: MenuItemLinkProps['onClick'];
|
|
28
|
+
};
|
|
29
|
+
export declare const ApplicationMenu: {
|
|
30
|
+
(props: ApplicationMenuProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
export type TNavbarProps = {
|
|
34
|
+
applicationLocale?: string;
|
|
35
|
+
projectKey: string;
|
|
36
|
+
environment: TApplicationContext<{
|
|
37
|
+
useFullRedirectsForLinks?: boolean;
|
|
38
|
+
}>['environment'];
|
|
39
|
+
project: TFetchProjectQuery['project'];
|
|
40
|
+
onMenuItemClick?: MenuItemLinkProps['onClick'];
|
|
41
|
+
isLoading: boolean;
|
|
42
|
+
isNewNavigationEnabledEvaluationReady: boolean;
|
|
43
|
+
};
|
|
44
|
+
declare const NavBar: {
|
|
45
|
+
(props: TNavbarProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
export default NavBar;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* eslint-disable prettier/prettier */
|
|
2
|
+
declare const styles: {"left-navigation":"navbar-mod__left-navigation___B11QL","list":"navbar-mod__list___xLBjv","scrollable-menu":"navbar-mod__scrollable-menu___GUrXv","list-item":"navbar-mod__list-item___PtOVL","item-link":"navbar-mod__item-link___3b3a7","item-icon-text":"navbar-mod__item-icon-text___ZlMLY","icon":"navbar-mod__icon___xOiRj","icon__active":"navbar-mod__icon__active___8IKeB","title":"navbar-mod__title___uOjhW","expander":"navbar-mod__expander___1CChn","expand-icon":"navbar-mod__expand-icon___biAt6","item--bottom":"navbar-mod__item--bottom___RE98P","item__active":"navbar-mod__item__active___S-P3x","item_menu-open":"navbar-mod__item_menu-open___4wsej","item_menu-collapsed":"navbar-mod__item_menu-collapsed___SNDmx","item__no-submenu":"navbar-mod__item__no-submenu___mua5w","sublist":"navbar-mod__sublist___5VV4O","sublist-no-children":"navbar-mod__sublist-no-children___5Bwqb","title-copy":"navbar-mod__title-copy___SdRqf","sublist__inactive":"navbar-mod__sublist__inactive___9A4qo","sublist-item":"navbar-mod__sublist-item___d-8UM","text":"navbar-mod__text___a585r","text-link":"navbar-mod__text-link___pVuV6","item_menu__active":"navbar-mod__item_menu__active___c95PT","icon-container":"navbar-mod__icon-container___-yU8W","fixed-menu":"navbar-mod__fixed-menu___0HE2b","sublist-expanded__active":"navbar-mod__sublist-expanded__active___Fett-","sublist-collapsed__active":"navbar-mod__sublist-collapsed__active___NPTQn","highlighted":"navbar-mod__highlighted___WWk0R","hidden":"navbar-mod__hidden___kfXoC","divider":"navbar-mod__divider___A9rwl","loading-dot-container":"navbar-mod__loading-dot-container___8P8Tl"};
|
|
3
|
+
export default styles;
|
package/dist/declarations/src/components/navbar/{menu-items.d.ts → navbar-old/menu-items.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MouseEventHandler, ReactNode, SyntheticEvent } from 'react';
|
|
1
|
+
import { MouseEventHandler, type ReactNode, type SyntheticEvent } from 'react';
|
|
2
2
|
import type { TNormalizedMenuVisibilities, TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
|
|
3
3
|
import { BackIcon } from '@commercetools-uikit/icons';
|
|
4
|
-
import type { TDataFence, TActionRight, TLocalizedField } from '
|
|
4
|
+
import type { TDataFence, TActionRight, TLocalizedField } from '../../../types/generated/proxy';
|
|
5
5
|
type TProjectPermissions = {
|
|
6
6
|
permissions: TNormalizedPermissions | null;
|
|
7
7
|
actionRights: TNormalizedActionRights | null;
|
|
@@ -36,7 +36,6 @@ type MenuGroupProps = {
|
|
|
36
36
|
hasSubmenu?: boolean;
|
|
37
37
|
children?: ReactNode;
|
|
38
38
|
verticalPosition?: number;
|
|
39
|
-
isNewNavigationEnabled?: boolean;
|
|
40
39
|
};
|
|
41
40
|
declare const MenuGroup: {
|
|
42
41
|
(props: MenuGroupProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
|
|
@@ -52,7 +51,10 @@ type MenuItemProps = {
|
|
|
52
51
|
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
53
52
|
children: ReactNode;
|
|
54
53
|
};
|
|
55
|
-
declare const MenuItem:
|
|
54
|
+
declare const MenuItem: {
|
|
55
|
+
(props: MenuItemProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
56
58
|
export type MenuItemLinkProps = {
|
|
57
59
|
linkTo?: string;
|
|
58
60
|
exactMatch: boolean;
|
|
@@ -93,7 +95,6 @@ type MenuLabelProps = {
|
|
|
93
95
|
declare const MenuLabel: (props: MenuLabelProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
94
96
|
type TNavBarLayoutProps = {
|
|
95
97
|
children: ReactNode;
|
|
96
|
-
isNewNavigationEnabled?: boolean;
|
|
97
98
|
};
|
|
98
99
|
declare const NavBarLayout: import("react").ForwardRefExoticComponent<TNavBarLayoutProps & import("react").RefAttributes<HTMLElement>>;
|
|
99
100
|
export { RestrictedMenuItem, MenuItem, MenuItemLink, IconSwitcher, MenuGroup, MenuLabel, MenuItemDivider, MenuExpander, Faded, NavBarLayout, };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type MouseEventHandler } from 'react';
|
|
2
|
+
import type { RouteComponentProps } from 'react-router-dom';
|
|
3
|
+
import type { TApplicationContext, TNormalizedMenuVisibilities, TNormalizedPermissions, TNormalizedActionRights, TNormalizedDataFences } from '@commercetools-frontend/application-shell-connectors';
|
|
4
|
+
import type { TFetchProjectQuery } from '../../../types/generated/mc';
|
|
5
|
+
import type { TNavbarMenu } from '../../../types/generated/proxy';
|
|
6
|
+
import { type MenuItemLinkProps } from './menu-items';
|
|
7
|
+
type TProjectPermissions = {
|
|
8
|
+
permissions: TNormalizedPermissions | null;
|
|
9
|
+
actionRights: TNormalizedActionRights | null;
|
|
10
|
+
dataFences: TNormalizedDataFences | null;
|
|
11
|
+
};
|
|
12
|
+
type TMenuWithDefaultLabel = TNavbarMenu & {
|
|
13
|
+
defaultLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
type ApplicationMenuProps = {
|
|
16
|
+
location: RouteComponentProps['location'];
|
|
17
|
+
menu: TMenuWithDefaultLabel;
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
isMenuOpen: boolean;
|
|
20
|
+
shouldCloseMenuFly: MouseEventHandler<HTMLElement>;
|
|
21
|
+
projectPermissions: TProjectPermissions;
|
|
22
|
+
menuVisibilities: TNormalizedMenuVisibilities | null;
|
|
23
|
+
handleToggleItem: () => void;
|
|
24
|
+
applicationLocale: string;
|
|
25
|
+
projectKey: string;
|
|
26
|
+
useFullRedirectsForLinks: boolean;
|
|
27
|
+
onMenuItemClick?: MenuItemLinkProps['onClick'];
|
|
28
|
+
};
|
|
29
|
+
export declare const ApplicationMenu: {
|
|
30
|
+
(props: ApplicationMenuProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
export type TNavbarProps = {
|
|
34
|
+
applicationLocale?: string;
|
|
35
|
+
projectKey: string;
|
|
36
|
+
environment: TApplicationContext<{
|
|
37
|
+
useFullRedirectsForLinks?: boolean;
|
|
38
|
+
}>['environment'];
|
|
39
|
+
project: TFetchProjectQuery['project'];
|
|
40
|
+
onMenuItemClick?: MenuItemLinkProps['onClick'];
|
|
41
|
+
isLoading: boolean;
|
|
42
|
+
isNewNavigationEnabledEvaluationReady: boolean;
|
|
43
|
+
};
|
|
44
|
+
declare const NavBar: {
|
|
45
|
+
(props: TNavbarProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
export default NavBar;
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { TFetchProjectQuery } from '../../types/generated/mc';
|
|
3
|
-
import { type MenuItemLinkProps } from './menu-items';
|
|
4
|
-
type TNavbarProps = {
|
|
5
|
-
applicationLocale?: string;
|
|
6
|
-
projectKey: string;
|
|
7
|
-
environment: TApplicationContext<{
|
|
8
|
-
useFullRedirectsForLinks?: boolean;
|
|
9
|
-
}>['environment'];
|
|
10
|
-
project: TFetchProjectQuery['project'];
|
|
11
|
-
onMenuItemClick?: MenuItemLinkProps['onClick'];
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
isNewNavigationEnabled: boolean;
|
|
14
|
-
isNewNavigationEnabledEvaluationReady: boolean;
|
|
15
|
-
};
|
|
1
|
+
import { type TNavbarProps } from './navbar-new/navbar';
|
|
16
2
|
declare const NavBar: {
|
|
17
|
-
(props: TNavbarProps
|
|
3
|
+
(props: TNavbarProps & {
|
|
4
|
+
isNewNavigationEnabled: boolean;
|
|
5
|
+
}): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
18
6
|
displayName: string;
|
|
19
7
|
};
|
|
20
8
|
export default NavBar;
|
|
@@ -3,6 +3,7 @@ import type { TApplicationContext } from '@commercetools-frontend/application-sh
|
|
|
3
3
|
import type { TNavbarMenu } from '../../types/generated/proxy';
|
|
4
4
|
type HookProps = {
|
|
5
5
|
environment: TApplicationContext<{}>['environment'];
|
|
6
|
+
newNavigation?: boolean;
|
|
6
7
|
};
|
|
7
8
|
declare const useNavbarStateManager: (props: HookProps) => {
|
|
8
9
|
navBarNode: import("react").RefObject<HTMLElement>;
|
|
@@ -50,25 +50,7 @@ declare const ProjectContainer: import("react").LazyExoticComponent<{
|
|
|
50
50
|
} | null | undefined;
|
|
51
51
|
environment: {
|
|
52
52
|
enableSignUp?: boolean | undefined;
|
|
53
|
-
} &
|
|
54
|
-
applicationId: string;
|
|
55
|
-
customViewId?: string | undefined;
|
|
56
|
-
applicationName: string;
|
|
57
|
-
entryPointUriPath: string;
|
|
58
|
-
revision: string;
|
|
59
|
-
env: string;
|
|
60
|
-
location: string;
|
|
61
|
-
cdnUrl: string;
|
|
62
|
-
mcApiUrl: string;
|
|
63
|
-
frontendHost: string;
|
|
64
|
-
servedByProxy: boolean;
|
|
65
|
-
ldClientSideId?: string | undefined;
|
|
66
|
-
trackingSentry?: string | undefined;
|
|
67
|
-
__DEVELOPMENT__?: {
|
|
68
|
-
oidc?: import("@commercetools-frontend/constants").ApplicationOidcForDevelopmentConfig | undefined;
|
|
69
|
-
menuLinks?: import("@commercetools-frontend/constants").ApplicationMenuLinksForDevelopmentConfig | undefined;
|
|
70
|
-
} | undefined;
|
|
71
|
-
};
|
|
53
|
+
} & import("@commercetools-frontend/constants").ApplicationRuntimeEnvironment;
|
|
72
54
|
disableRoutePermissionCheck?: boolean | undefined;
|
|
73
55
|
render?: (() => JSX.Element) | undefined;
|
|
74
56
|
children?: import("react").ReactNode;
|
|
@@ -3,6 +3,14 @@ export declare const DIMENSIONS: {
|
|
|
3
3
|
readonly headerItemDivider: "24px";
|
|
4
4
|
readonly navMenu: "64px";
|
|
5
5
|
readonly navMenuExpanded: "245px";
|
|
6
|
+
readonly navMenuItemHeight: "48px";
|
|
7
|
+
readonly newNavMenu: "80px";
|
|
8
|
+
readonly newNavMenuExpanded: "256px";
|
|
9
|
+
};
|
|
10
|
+
export declare const WINDOW_SIZES: {
|
|
11
|
+
readonly NARROW: 918;
|
|
12
|
+
readonly STANDARD: 1024;
|
|
13
|
+
readonly WIDE: 1200;
|
|
6
14
|
};
|
|
7
15
|
export declare const SUPPORTED_HEADERS: {
|
|
8
16
|
readonly ACCEPT: "Accept";
|
|
@@ -3,8 +3,8 @@ export { default as version } from './version';
|
|
|
3
3
|
export { default as ApplicationShell } from './components/application-shell';
|
|
4
4
|
export { default as ApplicationShellProvider } from './components/application-shell-provider';
|
|
5
5
|
export { default as ApplicationPageTitle } from './components/application-page-title';
|
|
6
|
+
export { default as CustomViewLoader } from './components/custom-view-loader';
|
|
6
7
|
export { default as CustomViewShell } from './components/custom-view-shell';
|
|
7
|
-
export * from './components/custom-view-context';
|
|
8
8
|
export { default as createApolloClient } from './configure-apollo';
|
|
9
9
|
export { applyDefaultMiddlewares } from './configure-store';
|
|
10
10
|
export { default as InjectReducers } from './components/inject-reducers';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { RenderResult } from '@testing-library/react';
|
|
3
|
+
import type { CustomViewData } from '@commercetools-frontend/constants';
|
|
4
|
+
type TRenderCustomViewParams = {
|
|
5
|
+
locale: string;
|
|
6
|
+
projectKey?: string;
|
|
7
|
+
customViewHostUrl?: string;
|
|
8
|
+
customViewConfig?: Partial<CustomViewData>;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const renderCustomView: (props: TRenderCustomViewParams) => RenderResult;
|
|
12
|
+
export {};
|