@commercetools-frontend/application-components 22.3.4 → 22.5.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.
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ type TCustomPanelProps = {
3
+ title: string;
4
+ size: 'small' | 'large';
5
+ onClose: () => void;
6
+ children: ReactNode;
7
+ };
8
+ declare function CustomPanel(props: TCustomPanelProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
9
+ export default CustomPanel;
@@ -0,0 +1 @@
1
+ export { default } from './custom-panel';
@@ -0,0 +1,8 @@
1
+ export declare const CUSTOM_VIEWS_EVENTS_NAMES: {
2
+ CUSTOM_VIEW_BOOTSTRAP: string;
3
+ CUSTOM_VIEW_INITIALIZATION: string;
4
+ };
5
+ export declare const CUSTOM_VIEWS_EVENTS_META: {
6
+ SOURCE: string;
7
+ DESTINATION_PREFIX: string;
8
+ };
@@ -0,0 +1,21 @@
1
+ export type TPermissionGroup = {
2
+ name: string;
3
+ oAuthScopes: string[];
4
+ };
5
+ export type TCustomView = {
6
+ id: string;
7
+ defaultLabel: string;
8
+ labelAllLocales: Record<string, string>;
9
+ url: string;
10
+ type: 'CustomPanel' | 'CustomTab';
11
+ typeConfig?: {
12
+ size?: 'SMALL' | 'LARGE';
13
+ };
14
+ locators: string[];
15
+ };
16
+ type TCustomViewLoaderProps = {
17
+ customView: TCustomView;
18
+ onClose: () => void;
19
+ };
20
+ declare function CustomViewLoader(props: TCustomViewLoaderProps): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element | null;
21
+ export default CustomViewLoader;
@@ -0,0 +1 @@
1
+ export { default } from './custom-view-loader';
@@ -0,0 +1,7 @@
1
+ declare const messages: {
2
+ loadError: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ };
7
+ export default messages;
@@ -9,12 +9,13 @@ type Props = {
9
9
  color: 'surface' | 'neutral';
10
10
  currentPathLabel?: string;
11
11
  previousPathLabel: Label;
12
+ hidePathLabel?: boolean;
12
13
  onClose: (event: SyntheticEvent) => void;
13
14
  children?: never;
14
15
  };
15
16
  declare const ModalPageTopBar: {
16
17
  (props: Props): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
17
18
  displayName: string;
18
- defaultProps: Pick<Props, "color" | "previousPathLabel">;
19
+ defaultProps: Pick<Props, "color" | "previousPathLabel" | "hidePathLabel">;
19
20
  };
20
21
  export default ModalPageTopBar;
@@ -21,10 +21,12 @@ type Props = {
21
21
  topBarColor?: 'surface' | 'neutral';
22
22
  currentPathLabel?: string;
23
23
  previousPathLabel?: Label;
24
+ hidePathLabel?: boolean;
25
+ size?: 'small' | 'large';
24
26
  };
25
27
  declare const ModalPage: {
26
28
  (props: Props): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
27
29
  displayName: string;
28
- defaultProps: Pick<Props, "getParentSelector" | "shouldDelayOnClose">;
30
+ defaultProps: Pick<Props, "size" | "getParentSelector" | "shouldDelayOnClose">;
29
31
  };
30
32
  export default ModalPage;
@@ -2,6 +2,7 @@ import { type SerializedStyles } from '@emotion/react';
2
2
  export declare const TRANSITION_DURATION = 200;
3
3
  type StyleProps = {
4
4
  zIndex?: number;
5
+ size?: 'small' | 'large';
5
6
  };
6
7
  export declare const getContainerStyles: (_props: StyleProps) => SerializedStyles;
7
8
  export declare const getOverlayStyles: (props: StyleProps) => SerializedStyles;
@@ -25,6 +25,8 @@ export { default as PageContentWide } from './components/page-content-containers
25
25
  export type { TPageContentWide } from './components/page-content-containers/page-content-wide';
26
26
  export { default as PageContentFull } from './components/page-content-containers/page-content-full';
27
27
  export type { TPageContentFull } from './components/page-content-containers/page-content-full';
28
+ export { default as CustomPanel } from './components/custom-views/custom-panel';
29
+ export { default as CustomViewLoader } from './components/custom-views/custom-view-loader';
28
30
  export { default as PortalsContainer } from './components/portals-container';
29
31
  export { default as useModalState } from './hooks/use-modal-state';
30
32
  export * from './theming';
@@ -40,6 +40,9 @@ require('@commercetools-uikit/icon-button');
40
40
  require('@commercetools-uikit/constraints');
41
41
  require('@commercetools-frontend/assets/images/page-not-found.svg');
42
42
  require('@commercetools-frontend/assets/images/doors-closed.svg');
43
+ require('@commercetools-frontend/actions-global');
44
+ require('@commercetools-frontend/application-shell-connectors');
45
+ require('@commercetools-frontend/sentry');
43
46
  require('@babel/runtime-corejs3/core-js-stable/instance/map');
44
47
  require('@react-hook/resize-observer');
45
48
  require('@commercetools-uikit/hooks');
@@ -38,6 +38,9 @@ import '@commercetools-uikit/icon-button';
38
38
  import '@commercetools-uikit/constraints';
39
39
  import '@commercetools-frontend/assets/images/page-not-found.svg';
40
40
  import '@commercetools-frontend/assets/images/doors-closed.svg';
41
+ import '@commercetools-frontend/actions-global';
42
+ import '@commercetools-frontend/application-shell-connectors';
43
+ import '@commercetools-frontend/sentry';
41
44
  import '@babel/runtime-corejs3/core-js-stable/instance/map';
42
45
  import '@react-hook/resize-observer';
43
46
  import '@commercetools-uikit/hooks';
@@ -40,6 +40,9 @@ require('@commercetools-uikit/icon-button');
40
40
  require('@commercetools-uikit/constraints');
41
41
  require('@commercetools-frontend/assets/images/page-not-found.svg');
42
42
  require('@commercetools-frontend/assets/images/doors-closed.svg');
43
+ require('@commercetools-frontend/actions-global');
44
+ require('@commercetools-frontend/application-shell-connectors');
45
+ require('@commercetools-frontend/sentry');
43
46
  require('@babel/runtime-corejs3/core-js-stable/instance/map');
44
47
  require('@react-hook/resize-observer');
45
48
  require('@commercetools-uikit/hooks');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-components",
3
- "version": "22.3.4",
3
+ "version": "22.5.0",
4
4
  "description": "Generic components for building Merchant Center applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -36,11 +36,13 @@
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.20.13",
38
38
  "@babel/runtime-corejs3": "^7.20.13",
39
- "@commercetools-frontend/application-shell-connectors": "22.3.4",
40
- "@commercetools-frontend/assets": "22.3.4",
41
- "@commercetools-frontend/constants": "22.3.4",
42
- "@commercetools-frontend/i18n": "22.3.4",
43
- "@commercetools-frontend/l10n": "22.3.4",
39
+ "@commercetools-frontend/actions-global": "22.5.0",
40
+ "@commercetools-frontend/application-shell-connectors": "22.5.0",
41
+ "@commercetools-frontend/assets": "22.5.0",
42
+ "@commercetools-frontend/constants": "22.5.0",
43
+ "@commercetools-frontend/i18n": "22.5.0",
44
+ "@commercetools-frontend/l10n": "22.5.0",
45
+ "@commercetools-frontend/sentry": "22.5.0",
44
46
  "@commercetools-uikit/card": "^16.4.0",
45
47
  "@commercetools-uikit/constraints": "^16.4.0",
46
48
  "@commercetools-uikit/design-system": "^16.4.0",
@@ -73,7 +75,7 @@
73
75
  "react-modal": "3.16.1"
74
76
  },
75
77
  "devDependencies": {
76
- "@testing-library/dom": "^8.20.0",
78
+ "@testing-library/dom": "^9.0.0",
77
79
  "@testing-library/react": "12.1.5",
78
80
  "@testing-library/react-hooks": "8.0.1",
79
81
  "@types/jest": "^29.5.1",