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.
@@ -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;
@@ -16,4 +16,5 @@ export declare const RenderInput: React.ForwardRefExoticComponent<DataCy & Omit<
16
16
  */
17
17
  export declare function JRCInputText<T extends FieldValues = FieldValues>(props: JRCInputFieldProps<T> & {
18
18
  width?: string;
19
+ disabled?: boolean;
19
20
  }): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { FolderType } from 'jamespot-user-api';
2
+ import { EntryType } from './JRCFolders';
3
3
  declare const JRCFolderBreadcrumb: ({ entries, onPress, }: {
4
- entries: Array<FolderType>;
5
- onPress: (entry: FolderType) => void;
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 declare const inUriArray: (arr: Array<string>, uriValue: string) => boolean;
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: FileBankDocument[]) => void;
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';
@@ -0,0 +1,2 @@
1
+ export declare const inUriArray: (arr: Array<string>, uriValue: string) => boolean;
2
+ export declare const updateUriArray: (arr: string[], uriValue: string) => Array<string>;
@@ -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: string, delay?: number): string;
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
+ };
@@ -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.147",
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.119",
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",