jamespot-react-components 1.3.8 → 1.3.10
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/jamespot-react-components.js +914 -844
- package/dist/jamespot-react-components.mjs +16826 -16571
- package/dist/src/components/JRCButton/JRCButton.stories.d.ts +1 -1
- package/dist/src/components/JRCEditor/JRCEditor.d.ts +15 -0
- package/dist/src/components/JRCEditor/JRCEditor.stories.d.ts +9 -0
- package/dist/src/components/JRCEditor/JRCModalSchedule.d.ts +11 -0
- package/dist/src/components/JRCLoadMore/JRCLoadMore.d.ts +6 -0
- package/dist/src/components/JRCLoadMore/JRCLoadMore.stories.d.ts +6 -0
- package/dist/src/components/JRCPublishButton/JRCPublishButton.d.ts +2 -1
- package/dist/src/components/JRCSidePanelModal/JRCSidePanelModal.styles.d.ts +2 -1
- package/dist/src/components/JRCSidePanelModal/types.d.ts +2 -1
- package/dist/src/components/Templates/template.type.d.ts +1 -1
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/translation/lang.json.d.ts +4 -0
- package/dist/src/types.d.ts +1 -0
- package/package.json +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryFn, StoryObj } from '@storybook/react-
|
|
1
|
+
import { Meta, StoryFn, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { JRCButtonProps } from './JRCButton';
|
|
3
3
|
import { JRCValidationButton } from './JRCValidationButton';
|
|
4
4
|
declare const meta: Meta;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type JRCEditorProps = {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
onSubmit: () => void;
|
|
6
|
+
isValid?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
onSchedule?: () => void;
|
|
9
|
+
lastDraftDate?: Date;
|
|
10
|
+
initialLoading?: boolean;
|
|
11
|
+
cancelHref: string;
|
|
12
|
+
onDelete?: () => void;
|
|
13
|
+
isDeleteLoading?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const JRCEditor: ({ children, title, onSubmit, isValid, loading, onSchedule, lastDraftDate, initialLoading, cancelHref, onDelete, isDeleteLoading, }: JRCEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { JRCEditor } from './JRCEditor';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof JRCEditor>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const InitialLoading: Story;
|
|
8
|
+
export declare const Loading: Story;
|
|
9
|
+
export declare const Invalid: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ScheduleData = {
|
|
2
|
+
scheduleDate: string;
|
|
3
|
+
permalinkId: string;
|
|
4
|
+
};
|
|
5
|
+
export type JRCModalScheduleProps = {
|
|
6
|
+
open: boolean;
|
|
7
|
+
closeHandler: () => void;
|
|
8
|
+
onSubmit: (data: ScheduleData) => void;
|
|
9
|
+
urlBase: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const JRCModalSchedule: ({ open, closeHandler, onSubmit, urlBase }: JRCModalScheduleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,7 @@ export type PublishButtonProps = DataCy & {
|
|
|
15
15
|
position?: 'left' | 'right';
|
|
16
16
|
icon: string;
|
|
17
17
|
ariaLabel?: string;
|
|
18
|
+
onClickEntry: (entryKey: string, isShiftPressed: boolean) => 'stopPropagation' | 'continue';
|
|
18
19
|
};
|
|
19
|
-
export declare const JRCPublishButton: ({ tooltip, label, icon, sections, hasFavorites, favoriteOnClick, loading, position, dataCy, ariaLabel, }: PublishButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const JRCPublishButton: ({ tooltip, label, icon, sections, hasFavorites, favoriteOnClick, loading, position, dataCy, ariaLabel, onClickEntry, }: PublishButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -2,8 +2,9 @@ export declare const JRCModalBox: import('styled-components').StyledComponent<"d
|
|
|
2
2
|
$position?: "right" | "left";
|
|
3
3
|
$open?: boolean;
|
|
4
4
|
$inPlace?: boolean;
|
|
5
|
-
$offsetTop?: number;
|
|
5
|
+
$offsetTop?: number | string;
|
|
6
6
|
$zIndex?: number;
|
|
7
|
+
$fixed?: boolean;
|
|
7
8
|
}, never>;
|
|
8
9
|
export declare const JRCModalContent: import('styled-components').StyledComponent<"div", import('styled-components').DefaultTheme, {
|
|
9
10
|
$removePadding?: boolean;
|
|
@@ -6,8 +6,9 @@ export type SidePanelModalProps = Omit<JRCModalBaseProps, 'portalId'> & {
|
|
|
6
6
|
showIconClose?: boolean;
|
|
7
7
|
position: 'left' | 'right';
|
|
8
8
|
removePadding?: boolean;
|
|
9
|
-
offsetTop?: number;
|
|
9
|
+
offsetTop?: number | string;
|
|
10
10
|
portal?: 'global' | 'container' | string;
|
|
11
|
+
fixed?: boolean;
|
|
11
12
|
};
|
|
12
13
|
export type JRCSidePanelModalProps = SidePanelModalProps & {
|
|
13
14
|
sticky?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { FlexDirection } from '../JRCFlex/JRCFlexBox';
|
|
3
3
|
import { Colors } from '../../styles/theme';
|
|
4
|
-
export type LayoutMode = 'fluid' | 'center' | 'centerTop';
|
|
4
|
+
export type LayoutMode = 'fluid' | 'center' | 'centerTop' | 'full';
|
|
5
5
|
export type ColumnPosition = 'left' | 'right';
|
|
6
6
|
export type JRCBasicAutoMarginContainerProps = {
|
|
7
7
|
children: ReactNode;
|
|
@@ -38,6 +38,7 @@ export { JRCDraggingPlaceholder } from './Common/JRCDraggingPlaceholder';
|
|
|
38
38
|
export { JRCDriveDropbox } from './Drives/JRCDriveDropbox';
|
|
39
39
|
export { JRCDriveMSGraph } from './Drives/JRCDriveMSGraph';
|
|
40
40
|
export { JRCDropDown } from './JRCDropDown/JRCDropDown';
|
|
41
|
+
export { JRCEditor } from './JRCEditor/JRCEditor';
|
|
41
42
|
export { JRCEmptySpace } from './JRCEmptySpace/JRCEmptySpace';
|
|
42
43
|
export { JRCFadeStepper } from './Stepper/JRCFadeStepper';
|
|
43
44
|
export { JRCFile } from './JRCFile/JRCFile';
|
|
@@ -87,6 +88,7 @@ export { JRCInputToggle, JRCInputToggleRaw } from './Form/Input/JRCInputCheckbox
|
|
|
87
88
|
export { JRCInputUrl } from './Form/Input/JRCInputUrl/JRCInputUrl';
|
|
88
89
|
export { JRCList } from './JRCList/JRCList';
|
|
89
90
|
export { JRCLoader } from './JRCLoader/JRCLoader';
|
|
91
|
+
export { JRCLoadMore } from './JRCLoadMore/JRCLoadMore';
|
|
90
92
|
export { JRCMainColumn } from './Templates/JRCMainColumn';
|
|
91
93
|
export { JRCMediaLoader } from './JRCMediaLoader/JRCMediaLoader';
|
|
92
94
|
export { JRCMenu } from './JRCMenu/JRCMenu';
|
|
@@ -97,6 +99,7 @@ export { JRCModalContentForm } from './JRCModal/JRCModalContentForm';
|
|
|
97
99
|
export { JRCModalForm } from './JRCModal/templates/JRCModalForm';
|
|
98
100
|
export { JRCModalImg } from './JRCModalImg/JRCModalImg';
|
|
99
101
|
export { JRCModalLayout } from './JRCModal/JRCModalLayout';
|
|
102
|
+
export { JRCModalSchedule } from './JRCEditor/JRCModalSchedule';
|
|
100
103
|
export { JRCModalUserList } from './JRCModalUserList/JRCModalUserList';
|
|
101
104
|
export { JRCPageNotLogged } from './Pages/JRCPageNotLogged';
|
|
102
105
|
export { JRCPagination } from './JRCPagination/JRCPagination';
|
|
@@ -215,7 +215,11 @@ declare const _default: {
|
|
|
215
215
|
"GLOBAL_Redirect_To_User_Profile_React": "Redirection to the profile page of {username}",
|
|
216
216
|
"GLOBAL_Reset": "Réinitialiser",
|
|
217
217
|
"GLOBAL_Save": "Save",
|
|
218
|
+
"GLOBAL_Draft_Saved": "Sauvegardé le {date}, à {time}",
|
|
219
|
+
"GLOBAL_Draft_Saved_Today": "Sauvegardé à {time}",
|
|
218
220
|
"GLOBAL_Schedule": "Schedule",
|
|
221
|
+
"GLOBAL_Schedule_Action": "Schedule",
|
|
222
|
+
"GLOBAL_Scheduled_Date": "Scheduled date",
|
|
219
223
|
"GLOBAL_Search": "Search",
|
|
220
224
|
"GLOBAL_Search_Loading": "Searching...",
|
|
221
225
|
"GLOBAL_See_Less": "See less",
|
package/dist/src/types.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export type { JRCIconButtonProps } from './components/JRCIconButton/JRCIconButto
|
|
|
57
57
|
export type { JRCImgProps } from './components/JRCImg/JRCImg';
|
|
58
58
|
export type { JRCListProps, PaginationPagination } from './components/JRCList/JRCList';
|
|
59
59
|
export type { JRCLoaderProps } from './components/JRCLoader/JRCLoader';
|
|
60
|
+
export type { JRCLoadMoreProps } from './components/JRCLoadMore/JRCLoadMore';
|
|
60
61
|
export type { JRCMediaLoaderProps } from './components/JRCMediaLoader/JRCMediaLoader';
|
|
61
62
|
export type { JRCMenuItemProps, JRCMenuProps } from './components/JRCMenu/JRCMenu';
|
|
62
63
|
export type { JRCModalButtonType, JRCModalContentProps } from './components/JRCModal/JRCModalContent';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/jamespot-react-components.js",
|
|
6
6
|
"module": "dist/jamespot-react-components.mjs",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"classnames": "^2.5.1",
|
|
65
65
|
"concurrently": "^9.2.1",
|
|
66
66
|
"cross-env": "^10.1.0",
|
|
67
|
+
"date-fns": "^4.1.0",
|
|
67
68
|
"dompurify": "^3.3.0",
|
|
68
69
|
"eslint": "^8.57.1",
|
|
69
70
|
"eslint-config-prettier": "^8.10.2",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
77
78
|
"html2canvas": "^1.4.1",
|
|
78
79
|
"husky": "^9.1.7",
|
|
79
|
-
"jamespot-user-api": "^1.3.
|
|
80
|
+
"jamespot-user-api": "^1.3.10",
|
|
80
81
|
"jest": "^30.2.0",
|
|
81
82
|
"jest-environment-jsdom": "^30.2.0",
|
|
82
83
|
"jest-styled-components": "^7.2.0",
|
|
@@ -137,6 +138,6 @@
|
|
|
137
138
|
"test:all": "pnpm test:jest && pnpm test:storybook",
|
|
138
139
|
"test:clearJest": "jest --clearCache",
|
|
139
140
|
"test:jest": "cross-env NODE_ENV=test jest --runInBand --detectOpenHandles --logHeapUsage",
|
|
140
|
-
"test:storybook": "test-storybook --maxWorkers=1 --coverage && cp coverage/storybook/coverage-storybook.json coverage && nyc report -t coverage --reporter=@lcov-viewer/istanbul-report --
|
|
141
|
+
"test:storybook": "test-storybook --maxWorkers=1 --coverage && cp coverage/storybook/coverage-storybook.json coverage && nyc report -t coverage --reporter=@lcov-viewer/istanbul-report --reporter=text"
|
|
141
142
|
}
|
|
142
143
|
}
|