jamespot-react-components 1.0.147 → 1.0.149
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/assets/jamespot-216.084c33ac57c64ed8cbae80ae279351f9.png +0 -0
- package/build/assets/jamespot-blue-216.90c747d6f7f5e5300e42a88f1caaf1ed.png +0 -0
- package/build/jamespot-react-components.js +409 -288
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/JRCInputSearch/JRCInputSearch.d.ts +10 -0
- package/build/src/components/Form/Input/JRCInputSearch/JRCInputSearch.stories.d.ts +6 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.d.ts +1 -0
- package/build/src/components/JRCFolders/JRCFolderBreadcrumb.d.ts +3 -3
- package/build/src/components/JRCFolders/JRCFolders.d.ts +6 -2
- package/build/src/components/JRCFolders/components/FileLittleList.d.ts +9 -0
- package/build/src/components/JRCFolders/styles.d.ts +6 -0
- package/build/src/components/JRCFolders/types.d.ts +3 -6
- package/build/src/components/JRCFolders/utils.d.ts +2 -0
- package/build/src/components/JRCTypography/JRCTypography.d.d.ts +3 -0
- package/build/src/components/JRCTypography/JRCTypography.styles.d.ts +1 -1
- package/build/src/components/Pages/JRCPageNotLogged.d.ts +11 -0
- package/build/src/hooks/UseDebounce.d.ts +5 -1
- package/build/src/index.d.ts +2 -0
- package/package.json +2 -2
- package/build/src/components/JRCFolders/mock.d.ts +0 -1549
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
3
|
+
export type JRCInputSearchProps = {
|
|
4
|
+
onChange?: (v: string) => void;
|
|
5
|
+
onClickSearch?: (v: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
} & DataCy;
|
|
10
|
+
export declare const JRCInputSearch: ({ onChange, placeholder, width, loading, onClickSearch, dataCy, }: JRCInputSearchProps) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const OnChange: () => React.JSX.Element;
|
|
6
|
+
export declare const OnClick: () => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { EntryType } from './JRCFolders';
|
|
3
3
|
declare const JRCFolderBreadcrumb: ({ entries, onPress, }: {
|
|
4
|
-
entries:
|
|
5
|
-
onPress: (entry:
|
|
4
|
+
entries: EntryType[];
|
|
5
|
+
onPress: (entry: EntryType) => void;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
7
|
export { JRCFolderBreadcrumb };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FileBankDocument, FolderType } from 'jamespot-user-api';
|
|
2
3
|
import { JRCFoldersProps } from './types';
|
|
3
|
-
export
|
|
4
|
-
export declare const updateUriArray: (arr: string[], uriValue: string) => Array<string>;
|
|
4
|
+
export type EntryType = FolderType | FileBankDocument;
|
|
5
5
|
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection, asyncBanksPromise, asyncFoldersPromise, asyncDocumentsPromise, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, }: JRCFoldersProps) => React.JSX.Element;
|
|
6
|
+
export declare const ArticleNbSelection: ({ uris, document }: {
|
|
7
|
+
uris: string[];
|
|
8
|
+
document: FileBankDocument;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { jFileLittle } from 'jamespot-user-api';
|
|
3
|
+
export type FileLittleListProps = {
|
|
4
|
+
files: jFileLittle[];
|
|
5
|
+
initialUris: string[];
|
|
6
|
+
allowMultiSelection?: boolean;
|
|
7
|
+
onSelectFile?: (uri: string[]) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const FileLittleList: ({ files, initialUris, allowMultiSelection, onSelectFile }: FileLittleListProps) => React.JSX.Element;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export declare const CSSTitleAccessor: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
2
|
export declare const CSSTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const CSSSubTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const CSSDocument: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const CSSDocumentTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const CSSDocumentOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const CSSActionElements: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const CSSIconAccessor: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
9
|
export declare const CSSActionAccessor: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
10
|
export declare const ListWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
11
|
export declare const CSSEmptyWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { ApiPagingResults, ApiWrapper, FileBankDocument, FileBankProps, FolderType } from 'jamespot-user-api';
|
|
1
|
+
import { ApiPagingResults, ApiWrapper, FileBankDocument, FileBankProps, FolderType, jFileLittle } from 'jamespot-user-api';
|
|
2
2
|
export type JRCFoldersProps = {
|
|
3
3
|
loadDocuments?: boolean;
|
|
4
4
|
initialFolders?: string[];
|
|
5
5
|
initialDocuments?: string[];
|
|
6
|
+
initialBankFolder?: FolderType;
|
|
6
7
|
allowMultiSelection?: boolean;
|
|
7
8
|
asyncBanksPromise: () => Promise<FileBankProps[]>;
|
|
8
9
|
asyncFoldersPromise: (uri: string) => Promise<ApiWrapper<FolderType[]>>;
|
|
9
10
|
asyncDocumentsPromise: (uri: string) => Promise<ApiPagingResults<FileBankDocument>>;
|
|
10
11
|
onSelectFolder?: (folder: FolderType[]) => void;
|
|
11
|
-
onSelectDocument?: (document:
|
|
12
|
+
onSelectDocument?: (document: jFileLittle[]) => void;
|
|
12
13
|
};
|
|
13
|
-
export interface JRCFolderBreadcrumbProps {
|
|
14
|
-
color: string;
|
|
15
|
-
size: 'sm' | 'md' | 'lg';
|
|
16
|
-
}
|
|
17
14
|
export interface JRCFolderProps {
|
|
18
15
|
color: string;
|
|
19
16
|
size: 'sm' | 'md' | 'lg';
|
|
@@ -4,6 +4,7 @@ import { Colors, FontWeight } from '../../styles/theme';
|
|
|
4
4
|
export type TSizes = 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
5
5
|
export type TVariants = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
|
|
6
6
|
export type TWeight = keyof FontWeight;
|
|
7
|
+
export type TAlignment = 'left' | 'right' | 'center';
|
|
7
8
|
/**
|
|
8
9
|
* Props type for JRCTypography
|
|
9
10
|
* @member children ReactNode content of the button
|
|
@@ -25,4 +26,6 @@ export type JRCTypographyProps = FastCssProps & {
|
|
|
25
26
|
children: string | React.ReactNode;
|
|
26
27
|
/** You can change the semantic element with the variant property */
|
|
27
28
|
variant?: TVariants;
|
|
29
|
+
/** Horizontal alignment */
|
|
30
|
+
align?: TAlignment;
|
|
28
31
|
};
|
|
@@ -9,4 +9,4 @@ export declare const SIZES: Readonly<{
|
|
|
9
9
|
xxl: 24;
|
|
10
10
|
xxxl: 32;
|
|
11
11
|
}>;
|
|
12
|
-
export declare const Typography: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, Pick<JRCTypographyProps, "color" | "size" | "weight"> & FastCssProps, never>;
|
|
12
|
+
export declare const Typography: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, Pick<JRCTypographyProps, "color" | "size" | "weight" | "align"> & FastCssProps, never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
type Platform = {
|
|
3
|
+
name: string;
|
|
4
|
+
logo: string | null;
|
|
5
|
+
};
|
|
6
|
+
export type JRCPageNotLoggedProps = {
|
|
7
|
+
platform?: Platform;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const JRCPageNotLogged: FC<JRCPageNotLoggedProps>;
|
|
11
|
+
export {};
|
|
@@ -5,4 +5,8 @@
|
|
|
5
5
|
* @param value value to debounce
|
|
6
6
|
* @param delay delay
|
|
7
7
|
*/
|
|
8
|
-
export declare function useDebounce(value:
|
|
8
|
+
export declare function useDebounce<T = string>(value: T, delay?: number): T;
|
|
9
|
+
export declare function useDebouncedCallback<T = string>(fn?: (value: T) => void): {
|
|
10
|
+
debouncedFunction: (v: T) => void;
|
|
11
|
+
value: T | undefined;
|
|
12
|
+
};
|
package/build/src/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ export { JRCInputFile } from './components/Form/Input/JRCInputFile/JRCInputFile'
|
|
|
98
98
|
export { JRCInputImage } from './components/Form/Input/JRCInputImage/JRCInputImage';
|
|
99
99
|
export { JRCInputReorderCheckbox } from './components/Form/Input/JRCInputCheckbox/JRCInputReorderCheckbox';
|
|
100
100
|
export { JRCInputRichText } from './components/Form/Input/JRCInputRichText/JRCInputRichText';
|
|
101
|
+
export { JRCInputSearch } from './components/Form/Input/JRCInputSearch/JRCInputSearch';
|
|
101
102
|
export { JRCInputSelect } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
102
103
|
export { JRCInputSelectHierarchicalTree } from './components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree';
|
|
103
104
|
export { JRCInputSelectList } from './components/Form/Input/JRCSelect/JRCInputSelectList';
|
|
@@ -113,6 +114,7 @@ export { JRCMainColumn } from './components/Templates/JRCMainColumn';
|
|
|
113
114
|
export { JRCMenu } from './components/JRCMenu/JRCMenu';
|
|
114
115
|
export { JRCModal } from './components/JRCModal/JRCModal';
|
|
115
116
|
export { JRCModalImg } from './components/JRCModalImg/JRCModalImg';
|
|
117
|
+
export { JRCPageNotLogged } from './components/Pages/JRCPageNotLogged';
|
|
116
118
|
export { JRCPagination } from './components/JRCPagination/JRCPagination';
|
|
117
119
|
export { JRCPanel } from './components/Templates/JRCPanel';
|
|
118
120
|
export { JRCSidePanelModal } from './components/JRCSidePanelModal/JRCSidePanelModal';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.149",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"chroma-js": "^2.1.1",
|
|
90
90
|
"classnames": "^2.3.1",
|
|
91
91
|
"dompurify": "^3.0.5",
|
|
92
|
-
"jamespot-user-api": "^1.0.
|
|
92
|
+
"jamespot-user-api": "^1.0.121",
|
|
93
93
|
"moment": "^2.29.1",
|
|
94
94
|
"react": "^17.x",
|
|
95
95
|
"react-beautiful-dnd": "^13.1.1",
|