@dotcms/react 0.0.1-alpha.10 → 0.0.1-alpha.11
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/.babelrc +12 -0
- package/.eslintrc.json +18 -0
- package/jest.config.ts +11 -0
- package/package.json +27 -30
- package/project.json +51 -0
- package/src/lib/components/Column/Column.module.css +99 -0
- package/src/lib/components/Column/Column.spec.tsx +78 -0
- package/src/lib/components/Column/Column.tsx +45 -0
- package/src/lib/components/Container/Container.module.css +7 -0
- package/src/lib/components/Container/Container.spec.tsx +82 -0
- package/src/lib/components/Container/Container.tsx +106 -0
- package/src/lib/components/DotcmsLayout/DotcmsLayout.module.css +7 -0
- package/src/lib/components/DotcmsLayout/DotcmsLayout.spec.tsx +41 -0
- package/src/lib/components/DotcmsLayout/{DotcmsLayout.d.ts → DotcmsLayout.tsx} +17 -3
- package/src/lib/components/PageProvider/PageProvider.module.css +7 -0
- package/src/lib/components/PageProvider/PageProvider.spec.tsx +54 -0
- package/src/lib/components/PageProvider/{PageProvider.d.ts → PageProvider.tsx} +12 -1
- package/src/lib/components/Row/Row.module.css +5 -0
- package/src/lib/components/Row/Row.spec.tsx +92 -0
- package/src/lib/components/Row/Row.tsx +51 -0
- package/src/lib/contexts/PageContext.tsx +5 -0
- package/src/lib/hooks/useDotcmsEditor.spec.ts +56 -0
- package/src/lib/hooks/useDotcmsEditor.ts +29 -0
- package/src/lib/hooks/useDotcmsPageContext.spec.tsx +43 -0
- package/src/lib/hooks/{useDotcmsPageContext.d.ts → useDotcmsPageContext.tsx} +7 -1
- package/src/lib/mocks/mockPageContext.tsx +84 -0
- package/src/lib/utils/utils.ts +69 -0
- package/tsconfig.json +20 -0
- package/tsconfig.lib.json +23 -0
- package/tsconfig.spec.json +20 -0
- package/index.esm.d.ts +0 -1
- package/index.esm.js +0 -1927
- package/src/lib/components/Column/Column.d.ts +0 -5
- package/src/lib/components/Container/Container.d.ts +0 -5
- package/src/lib/components/Row/Row.d.ts +0 -25
- package/src/lib/contexts/PageContext.d.ts +0 -3
- package/src/lib/hooks/useDotcmsEditor.d.ts +0 -2
- package/src/lib/mocks/mockPageContext.d.ts +0 -7
- package/src/lib/utils/utils.d.ts +0 -22
- /package/src/{index.d.ts → index.ts} +0 -0
- /package/src/lib/mocks/{index.d.ts → index.ts} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PageProviderContext } from '../PageProvider/PageProvider';
|
|
2
|
-
export interface ColumnProps {
|
|
3
|
-
readonly column: PageProviderContext['layout']['body']['rows'][0]['columns'][0];
|
|
4
|
-
}
|
|
5
|
-
export declare function Column({ column }: ColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PageProviderContext } from '../PageProvider/PageProvider';
|
|
2
|
-
export interface ContainerProps {
|
|
3
|
-
readonly containerRef: PageProviderContext['layout']['body']['rows'][0]['columns'][0]['containers'][0];
|
|
4
|
-
}
|
|
5
|
-
export declare function Container({ containerRef }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PageProviderContext } from '../PageProvider/PageProvider';
|
|
3
|
-
/**
|
|
4
|
-
* Props for the row component
|
|
5
|
-
*
|
|
6
|
-
* @interface RowProps
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export interface RowProps {
|
|
10
|
-
/**
|
|
11
|
-
* Row data
|
|
12
|
-
*
|
|
13
|
-
* @type {PageProviderContext['layout']['body']['rows'][0]}
|
|
14
|
-
* @memberof RowProps
|
|
15
|
-
*/
|
|
16
|
-
row: PageProviderContext['layout']['body']['rows'][0];
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Renders a row
|
|
20
|
-
*
|
|
21
|
-
* @category Components
|
|
22
|
-
* @param {React.ForwardedRef<HTMLDivElement, RowProps>} ref
|
|
23
|
-
* @return {*}
|
|
24
|
-
*/
|
|
25
|
-
export declare const Row: import("react").ForwardRefExoticComponent<RowProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PageProviderContext } from '../components/PageProvider/PageProvider';
|
|
3
|
-
export declare const mockPageContext: PageProviderContext;
|
|
4
|
-
export declare const MockContextRender: ({ children, mockContext }: {
|
|
5
|
-
children: JSX.Element;
|
|
6
|
-
mockContext: Partial<PageProviderContext>;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
package/src/lib/utils/utils.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ContainerData, PageProviderContext } from '../components/PageProvider/PageProvider';
|
|
2
|
-
export declare const getContainersData: (containers: ContainerData, containerRef: PageProviderContext['layout']['body']['rows'][0]['columns'][0]['containers'][0]) => {
|
|
3
|
-
acceptTypes: string;
|
|
4
|
-
contentlets: {
|
|
5
|
-
contentType: string;
|
|
6
|
-
identifier: string;
|
|
7
|
-
title: string;
|
|
8
|
-
inode: string;
|
|
9
|
-
onNumberOfPages: number;
|
|
10
|
-
widgetTitle?: string | undefined;
|
|
11
|
-
}[];
|
|
12
|
-
variantId: string;
|
|
13
|
-
path: string;
|
|
14
|
-
identifier: string;
|
|
15
|
-
maxContentlets: number;
|
|
16
|
-
parentPermissionable: Record<string, string>;
|
|
17
|
-
};
|
|
18
|
-
export declare const combineClasses: (classes: string[]) => string;
|
|
19
|
-
export declare const getPositionStyleClasses: (start: number, end: number) => {
|
|
20
|
-
startClass: string;
|
|
21
|
-
endClass: string;
|
|
22
|
-
};
|
|
File without changes
|
|
File without changes
|