jamespot-react-components 1.2.24 → 1.2.25
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/build/jamespot-react-components.js +841 -803
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.style.d.ts +1 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.types.d.ts +1 -0
- package/build/src/components/Form/Input/JRCStyledInput.d.ts +2 -0
- package/build/src/components/JRCAppLeftColumn/JRCAppLeftColumn.styles.d.ts +1 -0
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +3 -1
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.types.d.ts +1 -0
- package/build/src/components/JRCCalendar/CalendarStyle.d.ts +1 -0
- package/build/src/components/JRCCalendar/JRCCalendar.d.ts +16 -3
- package/build/src/components/JRCCalendar/JRCCalendarEvent.d.ts +1 -1
- package/build/src/components/JRCCalendar/JRCCalendarModal.d.ts +1 -1
- package/build/src/components/JRCCalendar/JRCEventStatusButton.d.ts +2 -2
- package/build/src/components/JRCCommentsBloc/JRCComment.d.ts +2 -2
- package/build/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +2 -2
- package/build/src/components/JRCDropDown/JRCDropDown.d.ts +4 -2
- package/build/src/components/JRCIconButton/JRCIconButton.d.ts +2 -0
- package/build/src/components/JRCSidePanelModal/JRCSidePanelModal.d.ts +1 -0
- package/build/src/components/JRCSidePanelModal/JRCSidePanelModal.styles.d.ts +1 -0
- package/build/src/components/Templates/template.styles.d.ts +2 -0
- package/build/src/components/Templates/template.type.d.ts +2 -0
- package/build/src/styles/theme.d.ts +1 -0
- package/build/src/types.d.ts +2 -0
- package/build/src/utils/utils.date.d.ts +6 -0
- package/package.json +2 -2
|
@@ -16,6 +16,7 @@ export declare const IconAfter: import("styled-components").StyledComponent<{
|
|
|
16
16
|
hasLicense?: boolean | undefined;
|
|
17
17
|
bg?: import("../../../../styles/theme").Colors | import("../../../../styles/theme").Shades | undefined;
|
|
18
18
|
bgHover?: import("../../../../styles/theme").Colors | import("../../../../styles/theme").Shades | undefined;
|
|
19
|
+
borderColor?: import("../../../../styles/theme").Colors | import("../../../../styles/theme").Shades | undefined;
|
|
19
20
|
iconSize?: number | undefined;
|
|
20
21
|
badgeNumber?: number | undefined;
|
|
21
22
|
colorVariant?: string | undefined;
|
|
@@ -23,6 +23,7 @@ export declare const StyledInput: import("styled-components").StyledComponent<"i
|
|
|
23
23
|
export type StyledSelectProps = DataCy & IconsProps & {
|
|
24
24
|
searchable?: boolean;
|
|
25
25
|
sizeVariant?: 's' | 'md';
|
|
26
|
+
noMargin?: boolean;
|
|
26
27
|
};
|
|
27
28
|
export declare const StyledSelect: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, DataCy & {
|
|
28
29
|
error?: boolean | undefined;
|
|
@@ -31,6 +32,7 @@ export declare const StyledSelect: import("styled-components").StyledComponent<"
|
|
|
31
32
|
} & IconsProps & {
|
|
32
33
|
searchable?: boolean | undefined;
|
|
33
34
|
sizeVariant?: "s" | "md" | undefined;
|
|
35
|
+
noMargin?: boolean | undefined;
|
|
34
36
|
}, never>;
|
|
35
37
|
export declare const MaxLengthIndicatorContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
36
38
|
export declare const MaxLengthIndicator: ({ maxLength, actualLength }: {
|
|
@@ -36,6 +36,7 @@ export declare const JRCIconButtonAppLeftColumn: import("styled-components").Sty
|
|
|
36
36
|
hasLicense?: boolean | undefined;
|
|
37
37
|
bg?: import("../../styles/theme").Colors | import("../../styles/theme").Shades | undefined;
|
|
38
38
|
bgHover?: import("../../styles/theme").Colors | import("../../styles/theme").Shades | undefined;
|
|
39
|
+
borderColor?: import("../../styles/theme").Colors | import("../../styles/theme").Shades | undefined;
|
|
39
40
|
iconSize?: number | undefined;
|
|
40
41
|
badgeNumber?: number | undefined;
|
|
41
42
|
colorVariant?: string | undefined;
|
|
@@ -17,7 +17,9 @@ export declare const MarginLessJRCButton: import("styled-components").StyledComp
|
|
|
17
17
|
label?: string | undefined;
|
|
18
18
|
noMargin?: boolean | undefined;
|
|
19
19
|
size?: "s" | "m" | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, ButtonProps
|
|
20
|
+
} & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, ButtonProps & {
|
|
21
|
+
small?: boolean | undefined;
|
|
22
|
+
}, never>;
|
|
21
23
|
export declare const MenuWithoutTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
22
24
|
export declare const MenuWithTitle: ({ direction, label, themeButton, children }: MenuWithTitleProps) => React.JSX.Element;
|
|
23
25
|
export declare const DropdownOption: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, DropdownOptionProps, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CalendarEventViewAbstractType, CalendarEventWithExtensions, JArticleApi, JCalendarApi, JGlobalApi } from 'jamespot-user-api';
|
|
3
|
+
import { CalendarApi } from '@fullcalendar/core';
|
|
3
4
|
export type JRCCalendarProps = {
|
|
4
5
|
events?: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>[];
|
|
5
6
|
loading?: boolean;
|
|
@@ -7,13 +8,25 @@ export type JRCCalendarProps = {
|
|
|
7
8
|
onError: (errorMsg?: string) => void;
|
|
8
9
|
onSuccess: (message: string) => void;
|
|
9
10
|
handler: {
|
|
10
|
-
global: Pick<JGlobalApi, 'updateAction'>;
|
|
11
|
+
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
11
12
|
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
12
13
|
article: Pick<JArticleApi, 'delete'>;
|
|
13
14
|
};
|
|
14
15
|
defaultView: CalendarView;
|
|
15
16
|
eventModalExtraComponent?: (event: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>) => ReactNode;
|
|
16
|
-
onChangeView?: (view:
|
|
17
|
+
onChangeView?: (view: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: CalendarView;
|
|
20
|
+
}) => void;
|
|
21
|
+
fullScreen?: boolean;
|
|
22
|
+
deportedToolbar?: {
|
|
23
|
+
onChangeLabel?: (label: string) => void;
|
|
24
|
+
onCalendarApiInit?: (api?: CalendarApi) => void;
|
|
25
|
+
view?: {
|
|
26
|
+
label: string;
|
|
27
|
+
value: CalendarView;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
17
30
|
};
|
|
18
31
|
export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridDay' | 'list';
|
|
19
|
-
export declare const JRCCalendar: ({ events, loading, onChangeDates, onError, handler, onSuccess, defaultView, eventModalExtraComponent, onChangeView, }: JRCCalendarProps) => React.JSX.Element;
|
|
32
|
+
export declare const JRCCalendar: ({ events, loading, onChangeDates, onError, handler, onSuccess, defaultView, eventModalExtraComponent, onChangeView, fullScreen, deportedToolbar, }: JRCCalendarProps) => React.JSX.Element;
|
|
@@ -19,7 +19,7 @@ export type JRCCalendarEventProps = {
|
|
|
19
19
|
type: string;
|
|
20
20
|
isVisio?: boolean;
|
|
21
21
|
handler: {
|
|
22
|
-
global: Pick<JGlobalApi, 'updateAction'>;
|
|
22
|
+
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
23
23
|
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
24
24
|
};
|
|
25
25
|
onError: (errMsg?: string) => void;
|
|
@@ -8,7 +8,7 @@ export type JRCCalendarModalProps = {
|
|
|
8
8
|
handler: {
|
|
9
9
|
article: Pick<JArticleApi, 'delete'>;
|
|
10
10
|
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
11
|
-
global: Pick<JGlobalApi, 'updateAction'>;
|
|
11
|
+
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
12
12
|
};
|
|
13
13
|
onError: (errorMsg?: string) => void;
|
|
14
14
|
onSuccess: (message: string) => void;
|
|
@@ -14,11 +14,11 @@ export type JRCEventStatusButtonProps = {
|
|
|
14
14
|
onError: (errorMessage: string) => void;
|
|
15
15
|
onSuccess: (message: string) => void;
|
|
16
16
|
handler: {
|
|
17
|
-
global: Pick<JGlobalApi, 'updateAction'>;
|
|
17
|
+
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
18
18
|
};
|
|
19
19
|
canSubscribe?: boolean;
|
|
20
20
|
setSubscriptionModifiers: (fn: (prev: SubscriptionModifiers) => SubscriptionModifiers) => void;
|
|
21
21
|
eventUri: string;
|
|
22
22
|
status: UserResponseStatus | null;
|
|
23
23
|
};
|
|
24
|
-
export declare const JRCEventStatusButton: ({ onError, handler, onSuccess, eventId, eventUri, eventType, eventIsVisio, initialStatus, canSubscribe, setSubscriptionModifiers, status, }: JRCEventStatusButtonProps) => React.JSX.Element;
|
|
24
|
+
export declare const JRCEventStatusButton: ({ onError, handler, onSuccess, eventId, eventUri, eventType, eventIsVisio, initialStatus, canSubscribe, setSubscriptionModifiers, status, }: JRCEventStatusButtonProps) => React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, JFileApi,
|
|
1
|
+
import { Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, JFileApi, JUserApi, CommentWithExtensions, JGlobalApi } from 'jamespot-user-api';
|
|
2
2
|
import { jCommentList } from 'jamespot-user-api/lib/src/types/comment';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { DriveOrFilebank, JRCInputTinyMCERawProps } from 'types';
|
|
@@ -28,7 +28,7 @@ export type JRCCommentProps = {
|
|
|
28
28
|
file: Pick<JFileApi, 'copy'>;
|
|
29
29
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
30
30
|
user: Pick<JUserApi, 'get' | 'getFields'>;
|
|
31
|
-
|
|
31
|
+
global: Pick<JGlobalApi, 'addAction' | 'removeAction' | 'getUsers'>;
|
|
32
32
|
questionAnswer: Pick<JQuestionAnswerApi, 'selectResponse' | 'unselectResponse'>;
|
|
33
33
|
};
|
|
34
34
|
socialQuestion?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddCommentParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserList, JFileApi,
|
|
1
|
+
import { AddCommentParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserList, JFileApi, JUserApi, CommentWithExtensions, JGlobalApi } from 'jamespot-user-api';
|
|
2
2
|
import { jCommentList } from 'jamespot-user-api/lib/src/types/comment';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { JRCInputTinyMCERawProps } from '../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
@@ -37,7 +37,7 @@ export type JRCCommentsBlocProps = {
|
|
|
37
37
|
file: Pick<JFileApi, 'copy' | 'deleteFile'>;
|
|
38
38
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
39
39
|
user: Pick<JUserApi, 'get' | 'getFields'>;
|
|
40
|
-
|
|
40
|
+
global: Pick<JGlobalApi, 'addAction' | 'removeAction' | 'getUsers'>;
|
|
41
41
|
questionAnswer: Pick<JQuestionAnswerApi, 'selectResponse' | 'unselectResponse'>;
|
|
42
42
|
};
|
|
43
43
|
socialQuestion?: {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Colors } from '../../styles/theme';
|
|
2
3
|
export interface JRCDropDownProps {
|
|
3
4
|
trigger: React.ReactNode;
|
|
4
5
|
dropdown: (collapseDropdown: () => void) => React.ReactNode;
|
|
5
6
|
align?: 'left' | 'right';
|
|
6
7
|
onToggle?: (isOpen: boolean) => void;
|
|
7
8
|
withBorder?: boolean;
|
|
9
|
+
borderColor?: Colors;
|
|
8
10
|
}
|
|
9
|
-
export declare const JRCDropDown: ({ trigger, dropdown, align, onToggle, withBorder }: JRCDropDownProps) => React.JSX.Element;
|
|
11
|
+
export declare const JRCDropDown: ({ trigger, dropdown, align, onToggle, withBorder, borderColor }: JRCDropDownProps) => React.JSX.Element;
|
|
@@ -6,6 +6,7 @@ declare const colorVariants: Record<string, {
|
|
|
6
6
|
color: Colors | Shades;
|
|
7
7
|
bg: Colors | Shades;
|
|
8
8
|
bgHover: Colors | Shades;
|
|
9
|
+
borderColor: Colors | Shades;
|
|
9
10
|
}>;
|
|
10
11
|
/**
|
|
11
12
|
* IconButton props
|
|
@@ -36,6 +37,7 @@ export type JRCIconButtonProps = Omit<React.ComponentPropsWithoutRef<'button'>,
|
|
|
36
37
|
hasLicense?: boolean;
|
|
37
38
|
bg?: Colors | Shades;
|
|
38
39
|
bgHover?: Colors | Shades;
|
|
40
|
+
borderColor?: Colors | Shades;
|
|
39
41
|
iconSize?: number;
|
|
40
42
|
badgeNumber?: number;
|
|
41
43
|
colorVariant?: keyof typeof colorVariants;
|
|
@@ -4,6 +4,7 @@ export declare const JRCModalBox: import("styled-components").StyledComponent<"d
|
|
|
4
4
|
open?: boolean | undefined;
|
|
5
5
|
inplace?: boolean | undefined;
|
|
6
6
|
offsetTop?: number | undefined;
|
|
7
|
+
zIndex?: number | undefined;
|
|
7
8
|
}, never>;
|
|
8
9
|
export declare const JRCModalTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
10
|
export declare const JRCModalOptions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -3,9 +3,11 @@ import { JRCColumn } from './JRCColumn';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import type { Closing, Open, LayoutMode, ColumnPosition } from './template.type';
|
|
5
5
|
import { FlexDirection } from '../JRCFlex/JRCFlexBox';
|
|
6
|
+
import { Colors } from '../../styles/theme';
|
|
6
7
|
export declare const BasicAutoMarginWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
8
|
export declare const ContainerWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
9
|
$flexDirection?: FlexDirection | undefined;
|
|
10
|
+
backgroundColor?: Colors | undefined;
|
|
9
11
|
}, never>;
|
|
10
12
|
export declare const ScrollWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
13
|
$flexDirection?: FlexDirection | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FlexDirection } from '../JRCFlex/JRCFlexBox';
|
|
3
|
+
import { Colors } from '../../styles/theme';
|
|
3
4
|
export type LayoutMode = 'fluid' | 'center' | 'centerTop';
|
|
4
5
|
export type ColumnPosition = 'left' | 'right';
|
|
5
6
|
export type JRCBasicAutoMarginContainerProps = {
|
|
@@ -12,6 +13,7 @@ export type JRCContainerProps = {
|
|
|
12
13
|
maxWidth?: string;
|
|
13
14
|
flexDirection?: FlexDirection;
|
|
14
15
|
hasPadding?: boolean;
|
|
16
|
+
backgroundColor?: Colors;
|
|
15
17
|
};
|
|
16
18
|
export type JRCColumnProps = {
|
|
17
19
|
children: React.ReactNode;
|
package/build/src/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { AutocompleteView } from './components/Form/Input/JRCSelect/JRCInputAutocompleteViews';
|
|
2
|
+
export type { CalendarApi } from '@fullcalendar/core';
|
|
3
|
+
export type { CalendarView } from './components/JRCCalendar/JRCCalendar';
|
|
2
4
|
export type { Editor } from 'tinymce';
|
|
3
5
|
export type { JRCDragAndDropProps } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
4
6
|
export type { JRCConditionalWrapperProps } from './components/Common/JRCConditionalWrapper';
|
|
@@ -8,6 +8,12 @@ export interface extractDateProps {
|
|
|
8
8
|
}
|
|
9
9
|
export type DateFormat = 'date' | 'date-time' | 'date-time-sec' | 'time' | 'time-sec';
|
|
10
10
|
export declare const extractDate: (str?: string | Date) => extractDateProps;
|
|
11
|
+
/**
|
|
12
|
+
* Format date to YYYY-MM-DD
|
|
13
|
+
* @param {Date} date - Date to format
|
|
14
|
+
* @returns {string} Formatted date string
|
|
15
|
+
*/
|
|
16
|
+
export declare const formatDate: (date: Date) => string;
|
|
11
17
|
/**
|
|
12
18
|
* Format date to YYYY-MM-DD hh:mm:ss format
|
|
13
19
|
* @param {Date} date - Date to format
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"chroma-js": "^2.1.1",
|
|
101
101
|
"classnames": "^2.3.1",
|
|
102
102
|
"dompurify": "^3.0.5",
|
|
103
|
-
"jamespot-user-api": "^1.2.
|
|
103
|
+
"jamespot-user-api": "^1.2.25",
|
|
104
104
|
"react": "^17.x",
|
|
105
105
|
"react-beautiful-dnd": "^13.1.1",
|
|
106
106
|
"react-dnd": "^14.0.4",
|