jamespot-react-components 1.3.123 → 1.3.125
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.cjs +1722 -1610
- package/dist/jamespot-react-components.js +22256 -21731
- package/dist/src/components/Form/Input/JRCInputFileAdvanced/File.d.ts +2 -1
- package/dist/src/components/Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw.d.ts +4 -0
- package/dist/src/components/Form/Input/JRCInputText/JRCInputText.d.ts +1 -0
- package/dist/src/components/Form/Input/JRCInputText/JRCInputText.stories.d.ts +1 -0
- package/dist/src/components/JRCFolders/JRCFolderBreadcrumb.stories.d.ts +3 -1
- package/dist/src/components/JRCFolders/JRCFolders.d.ts +1 -1
- package/dist/src/components/JRCFolders/JRCFolders.stories.d.ts +1 -1
- package/dist/src/components/JRCFolders/context/folderContext.d.ts +1 -0
- package/dist/src/components/JRCFolders/styles.d.ts +4 -2
- package/dist/src/components/JRCFolders/types.d.ts +5 -1
- package/dist/src/components/JRCFolders/useFolderSelection.d.ts +1 -1
- package/dist/src/components/JRCFolders/utils.d.ts +1 -0
- package/dist/src/components/Widgets/JRCWidgetDocuments/components/WidgetModalSelection.d.ts +17 -3
- package/dist/src/components/Widgets/JRCWidgetFile/JRCWidgetFile.d.ts +8 -0
- package/dist/src/components/Widgets/JRCWidgetFile/JRCWidgetFile.stories.d.ts +11 -0
- package/dist/src/components/Widgets/JRCWidgetFile/JRCWidgetFileEditor.d.ts +11 -0
- package/dist/src/components/Widgets/JRCWidgetFile/utils.d.ts +5 -0
- package/dist/src/components/Widgets/const.d.ts +4 -1
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/translation/lang.json.d.ts +22 -3
- package/dist/src/utils/utils.files.d.ts +6 -2
- package/package.json +3 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jFileLittle } from 'jamespot-user-api';
|
|
2
2
|
import { FileWithId } from '../JRCInputFileAdvanced/types';
|
|
3
|
-
export declare const File: ({ file, index, token, step, attrName, onUploadSuccess, onDeleteSuccess, }: {
|
|
3
|
+
export declare const File: ({ file, index, token, step, attrName, onUploadSuccess, onUploadError, onDeleteSuccess, }: {
|
|
4
4
|
file: FileWithId;
|
|
5
5
|
index: number;
|
|
6
6
|
step: number;
|
|
7
7
|
token: string | undefined;
|
|
8
8
|
attrName: string;
|
|
9
9
|
onUploadSuccess?: (response: jFileLittle, token: string) => void;
|
|
10
|
+
onUploadError?: () => void;
|
|
10
11
|
onDeleteSuccess?: () => void;
|
|
11
12
|
}) => import("react").JSX.Element;
|
|
@@ -15,11 +15,15 @@ export interface JRCInputFileAdavancedProps extends ComponentPropsWithoutRef<'in
|
|
|
15
15
|
network?: Pick<Network, 'token' | 'postFile' | 'getUrl'>;
|
|
16
16
|
onDeleteSuccess?: (index: number) => void;
|
|
17
17
|
onUploadStart?: (count?: number) => void;
|
|
18
|
+
/** Fired once per file whose upload failed, so callers can stop waiting on it. */
|
|
19
|
+
onUploadError?: () => void;
|
|
18
20
|
existingFiles?: Array<jFileLittle>;
|
|
19
21
|
deleteFile?: (id: number) => Promise<void>;
|
|
20
22
|
activeDrives?: DriveOrFilebank[];
|
|
23
|
+
resolveTypeColor?: (type: string) => string | undefined;
|
|
21
24
|
dispatchOnError?: (code?: string) => void;
|
|
22
25
|
maxFileSize?: number;
|
|
26
|
+
hideUploadedFiles?: boolean;
|
|
23
27
|
directFilePopupOpening?: {
|
|
24
28
|
open: boolean;
|
|
25
29
|
onClose: () => void;
|
|
@@ -42,6 +42,7 @@ export declare const RenderNumberInput: import('react').ForwardRefExoticComponen
|
|
|
42
42
|
* validation props: required
|
|
43
43
|
* @returns JSX.Element
|
|
44
44
|
*/
|
|
45
|
+
export declare const clampToBounds: (value: number, min?: number, max?: number) => number;
|
|
45
46
|
export declare function JRCInputNumber<T extends FieldValues = FieldValues>({ htmlFor, allowEmptyValue, ...props }: JRCInputFieldProps<T> & {
|
|
46
47
|
width?: string;
|
|
47
48
|
disabled?: boolean;
|
|
@@ -14,6 +14,7 @@ export declare const JRCInputTextTest: Story;
|
|
|
14
14
|
export declare const RenderNumberInputTest: Story;
|
|
15
15
|
export declare const JRCInputNumberEmpty: Story;
|
|
16
16
|
export declare const JRCInputNumberMinMax: Story;
|
|
17
|
+
export declare const JRCInputNumberMaxClamp: Story;
|
|
17
18
|
export declare const JRCInputNumberValid: Story;
|
|
18
19
|
export declare const JRCInputNumberEmptyString: Story;
|
|
19
20
|
export declare const JRCInputNumberMaxRule: Story;
|
|
@@ -12,4 +12,6 @@ export default _default;
|
|
|
12
12
|
type Story = StoryObj<typeof JRCFolderBreadcrumb>;
|
|
13
13
|
export declare const Primary: Story;
|
|
14
14
|
export declare const SingleRoot: Story;
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const DeepPath: Story;
|
|
16
|
+
export declare const LongTitles: Story;
|
|
17
|
+
export declare const CollapsedInNarrowContainer: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JRCFoldersProps } from './types';
|
|
2
|
-
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, initialUri, searchable, mode, settings, resolveFileUri, onSelectFolder, onSelectDocument, onFilesUpdate, onError, onClickFile, }: JRCFoldersProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, initialUri, searchable, mode, settings, resolveFileUri, resolveTypeColor, onSelectFolder, onSelectDocument, onFilesUpdate, onError, onClickFile, }: JRCFoldersProps) => import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { JRCFoldersProps } from './types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, initialUri, searchable, mode, settings, resolveFileUri, onSelectFolder, onSelectDocument, onFilesUpdate, onError, onClickFile, }: JRCFoldersProps) => import("react").JSX.Element;
|
|
5
|
+
component: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, initialUri, searchable, mode, settings, resolveFileUri, resolveTypeColor, onSelectFolder, onSelectDocument, onFilesUpdate, onError, onClickFile, }: JRCFoldersProps) => import("react").JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
8
|
type Story = StoryObj<JRCFoldersProps>;
|
|
@@ -7,6 +7,7 @@ export type FolderContextType = {
|
|
|
7
7
|
allowMultiSelection: boolean;
|
|
8
8
|
settings: JRCFoldersSettings;
|
|
9
9
|
resolveFileUri?: (file: jFileLittle) => string | undefined;
|
|
10
|
+
resolveTypeColor?: (type: string) => string | undefined;
|
|
10
11
|
setUrisFolder: React.Dispatch<React.SetStateAction<string[]>>;
|
|
11
12
|
setUrisDocument: React.Dispatch<React.SetStateAction<string[]>>;
|
|
12
13
|
onClickFolder: (folder: jFolderList) => void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export declare const StyleRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$opacity"> & {
|
|
1
|
+
export declare const StyleRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$opacity" | "$interactive"> & {
|
|
2
2
|
$opacity?: number;
|
|
3
|
-
|
|
3
|
+
$interactive?: boolean;
|
|
4
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$opacity" | "$interactive"> & {
|
|
4
5
|
$opacity?: number;
|
|
6
|
+
$interactive?: boolean;
|
|
5
7
|
}, never>>> & string;
|
|
6
8
|
export declare const StyleRowBtn: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import('react').ClassAttributes<HTMLButtonElement> | keyof import('react').ButtonHTMLAttributes<HTMLButtonElement>> & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement>, "is" | "children" | "ref" | "onClick" | "onDrag" | "onDrop" | "type" | "style" | "key" | "form" | "slot" | "hidden" | "color" | "content" | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "exportparts" | "part" | "data-tooltip-id" | "data-tooltip-place" | "data-tooltip-content" | "data-tooltip-html" | "data-tooltip-variant" | "data-tooltip-offset" | "data-tooltip-wrapper" | "data-tooltip-events" | "data-tooltip-position-strategy" | "data-tooltip-delay-show" | "data-tooltip-delay-hide" | "data-tooltip-float" | "data-tooltip-hidden" | "data-tooltip-class-name" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "name" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value"> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import('react').ClassAttributes<HTMLButtonElement> | keyof import('react').ButtonHTMLAttributes<HTMLButtonElement>> & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement>, "is" | "children" | "ref" | "onClick" | "onDrag" | "onDrop" | "type" | "style" | "key" | "form" | "slot" | "hidden" | "color" | "content" | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "exportparts" | "part" | "data-tooltip-id" | "data-tooltip-place" | "data-tooltip-content" | "data-tooltip-html" | "data-tooltip-variant" | "data-tooltip-offset" | "data-tooltip-wrapper" | "data-tooltip-events" | "data-tooltip-position-strategy" | "data-tooltip-delay-show" | "data-tooltip-delay-hide" | "data-tooltip-float" | "data-tooltip-hidden" | "data-tooltip-class-name" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "name" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value">>> & string;
|
|
7
9
|
export declare const StyleRowLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -35,9 +35,13 @@ export type JRCFoldersProps = {
|
|
|
35
35
|
searchable?: boolean;
|
|
36
36
|
settings?: JRCFoldersSettings;
|
|
37
37
|
resolveFileUri?: (file: jFileLittle) => string | undefined;
|
|
38
|
+
/** Model colors live in the store, which this package does not read: the caller resolves them. */
|
|
39
|
+
resolveTypeColor?: (type: string) => string | undefined;
|
|
38
40
|
onError?: (message?: string) => void;
|
|
39
41
|
onSelectFolder?: (folder: jFolderList[]) => void;
|
|
40
|
-
|
|
42
|
+
/** `knownFiles` are the files the picker has actually loaded so far: a caller that replaces its
|
|
43
|
+
* own list must not drop attachments living in folders the user never opened. */
|
|
44
|
+
onSelectDocument?: (document: jFileLittle[], knownFiles?: jFileLittle[]) => void;
|
|
41
45
|
onFilesUpdate?: (files: jFileLittle[]) => void;
|
|
42
46
|
onClickFile?: (file: jFileLittle) => void;
|
|
43
47
|
};
|
|
@@ -4,7 +4,7 @@ type UseFolderSelectionParams = {
|
|
|
4
4
|
initialFolders: string[];
|
|
5
5
|
allFiles: jFileLittle[];
|
|
6
6
|
allFolders: jFolderList[];
|
|
7
|
-
onSelectDocument?: (documents: jFileLittle[]) => void;
|
|
7
|
+
onSelectDocument?: (documents: jFileLittle[], knownFiles?: jFileLittle[]) => void;
|
|
8
8
|
onSelectFolder?: (folders: jFolderList[]) => void;
|
|
9
9
|
};
|
|
10
10
|
export declare const useFolderSelection: ({ initialDocuments, initialFolders, allFiles, allFolders, onSelectDocument, onSelectFolder, }: UseFolderSelectionParams) => {
|
|
@@ -2,3 +2,4 @@ export declare const inUriArray: (arr: Array<string>, uriValue: string) => boole
|
|
|
2
2
|
export declare const updateUriArray: (arr: string[], uriValue: string) => Array<string>;
|
|
3
3
|
export declare function hideTitleExtension(title: string): string;
|
|
4
4
|
export declare const uriList: (uris: string[], uri: string, allowMultiSelection: boolean) => string[];
|
|
5
|
+
export declare const isFolderType: (type: string) => type is "folder" | "rootFolder";
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import { jFileLittle } from 'jamespot-user-api';
|
|
1
2
|
import { JRCFoldersProps } from '../../../JRCFolders/types';
|
|
2
|
-
|
|
3
|
+
type WidgetModalSelectionBaseProps = {
|
|
3
4
|
label: string;
|
|
4
|
-
mode: JRCFoldersProps[
|
|
5
|
+
mode: JRCFoldersProps['mode'];
|
|
5
6
|
allowMultiSelection?: boolean;
|
|
7
|
+
initialDocuments?: string[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
resolveTypeColor?: JRCFoldersProps['resolveTypeColor'];
|
|
10
|
+
};
|
|
11
|
+
export type WidgetModalSelectionProps = WidgetModalSelectionBaseProps & ({
|
|
6
12
|
onChange: (uri: string) => void;
|
|
7
|
-
|
|
13
|
+
onChangeMultiple?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
onChange?: undefined;
|
|
16
|
+
/** `knownFiles` scopes what the picker could actually show, so a caller replacing its
|
|
17
|
+
* own list can leave untouched the files living in never-opened folders. */
|
|
18
|
+
onChangeMultiple: (files: jFileLittle[], knownFiles: jFileLittle[]) => void;
|
|
19
|
+
});
|
|
20
|
+
export declare const WidgetModalSelection: ({ label, mode, allowMultiSelection, initialDocuments, disabled, resolveTypeColor, onChange, onChangeMultiple, }: WidgetModalSelectionProps) => import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jFileLittle, WidgetFileContent } from 'jamespot-user-api';
|
|
2
|
+
import { DataCy } from '../../../types/dataAttributes';
|
|
3
|
+
export type JRCWidgetFileProps = DataCy & Pick<WidgetFileContent, 'view' | 'hidePreview' | 'fontSize' | 'gridSize'> & {
|
|
4
|
+
files: jFileLittle[];
|
|
5
|
+
hideExtension?: boolean;
|
|
6
|
+
onClick: (file: jFileLittle) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const JRCWidgetFile: ({ files, view, hidePreview, hideExtension, fontSize, gridSize, onClick, dataCy, }: JRCWidgetFileProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { JRCWidgetFile } from './JRCWidgetFile';
|
|
3
|
+
declare const meta: Meta<typeof JRCWidgetFile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof JRCWidgetFile>;
|
|
6
|
+
export declare const Gallery: Story;
|
|
7
|
+
export declare const List: Story;
|
|
8
|
+
export declare const PreviewHidden: Story;
|
|
9
|
+
export declare const ExtensionHidden: Story;
|
|
10
|
+
export declare const LargeFontSize: Story;
|
|
11
|
+
export declare const EmptyList: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WidgetDisplayMode, WidgetFileContent } from 'jamespot-user-api';
|
|
2
|
+
import { DriveOrFilebank } from '../../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
|
|
3
|
+
export type JRCWidgetFileEditorProps = {
|
|
4
|
+
token: string | undefined;
|
|
5
|
+
activeDrives?: DriveOrFilebank[];
|
|
6
|
+
resolveTypeColor?: (type: string) => string | undefined;
|
|
7
|
+
content: WidgetFileContent;
|
|
8
|
+
mode?: WidgetDisplayMode;
|
|
9
|
+
onChange: (content: Partial<WidgetFileContent>, override?: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const JRCWidgetFileEditor: ({ token, activeDrives, resolveTypeColor, content, mode, onChange, }: JRCWidgetFileEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jFileLittle } from 'jamespot-user-api';
|
|
2
|
+
export declare const mergeWidgetFilesById: (current: jFileLittle[], added: jFileLittle[]) => jFileLittle[];
|
|
3
|
+
export declare const resolveWidgetFileUri: (file: jFileLittle) => string;
|
|
4
|
+
export declare const resolveWidgetFilePreview: (file: jFileLittle) => string | undefined;
|
|
5
|
+
export declare const resolveWidgetFileName: (file: jFileLittle, hideExtension?: boolean) => string;
|
|
@@ -210,6 +210,8 @@ export { JRCWidgetEmptyInplace } from './Widgets/JRCWidgetEmptyInplace';
|
|
|
210
210
|
export { JRCWidgetExtensionEditor } from './Widgets/JRCWidgetExtension/JRCWidgetExtensionEditor';
|
|
211
211
|
export { JRCWidgetFaq } from './Widgets/JRCWidgetFaq/JRCWidgetFaq';
|
|
212
212
|
export { JRCWidgetFaqEditor } from './Widgets/JRCWidgetFaq/JRCWidgetFaqEditor';
|
|
213
|
+
export { JRCWidgetFile } from './Widgets/JRCWidgetFile/JRCWidgetFile';
|
|
214
|
+
export { JRCWidgetFileEditor } from './Widgets/JRCWidgetFile/JRCWidgetFileEditor';
|
|
213
215
|
export { JRCWidgetFlockler } from './Widgets/JRCWidgetFlockler/JRCWidgetFlockler';
|
|
214
216
|
export { JRCWidgetFlocklerEditor } from './Widgets/JRCWidgetFlockler/JRCWidgetFlocklerEditor';
|
|
215
217
|
export { JRCWidgetIcon } from './Widgets/JRCWidgetIcon';
|
|
@@ -73,7 +73,6 @@ declare const _default: {
|
|
|
73
73
|
"AppLeftColumn_App_Navigation": "Application navigation menu",
|
|
74
74
|
"AppLeftColumn_Close_Panel": "Reduces the size of the menu",
|
|
75
75
|
"AppLeftColumn_Open_Panel": "Expands the menu",
|
|
76
|
-
"ARTICLE_Nb_Elements": "{count} Document(s)",
|
|
77
76
|
"ARTICLE_Nb_Selected_Elements": "Elements sélectionés",
|
|
78
77
|
"ATTACHMENTS_No_Download": "No download",
|
|
79
78
|
"ATTACHMENTS_Preview_Successfully_Recomputed": "Preview successfully recomputed",
|
|
@@ -221,7 +220,6 @@ declare const _default: {
|
|
|
221
220
|
"FILE_Upload_Label": "Drop or select files",
|
|
222
221
|
"FILE_Viewer_Open_With": "Ouvrir avec",
|
|
223
222
|
"FILE_Viewer_Preview": "Aperçu",
|
|
224
|
-
"FOLDER_Nb_Elements": "{count} Document(s)",
|
|
225
223
|
"GLOBAL_A11Y_APP_NAV": "Menu of the application {appName}",
|
|
226
224
|
"GLOBAL_Filter_Add": "Add a filter",
|
|
227
225
|
"GLOBAL_Filter_Search": "Search a filter",
|
|
@@ -651,6 +649,14 @@ declare const _default: {
|
|
|
651
649
|
"WIDGET_File_Sort_By": "Ordre d'affichage",
|
|
652
650
|
"WIDGET_File_Sort_By_Title": "Titre",
|
|
653
651
|
"WIDGET_File_Sort_By_Date_Creation": "Date de création",
|
|
652
|
+
"WIDGET_FILE": "File",
|
|
653
|
+
"WIDGET_FILE_TEXT": "Improve communication by sharing downloadable documents on your intranet",
|
|
654
|
+
"WIDGET_File_From_Filebank": "Select a file",
|
|
655
|
+
"WIDGET_File_Maximun_Upload": "250 Mo maximum to ensure the application's normal operation.",
|
|
656
|
+
"WIDGET_File_List": "File list",
|
|
657
|
+
"WIDGET_Panel_Text_Size": "Text size",
|
|
658
|
+
"GLOBAL_Or": "Or",
|
|
659
|
+
"GLOBAL_Open_Document": "Open the document",
|
|
654
660
|
"WIDGET_Welcome": "Message d'accueil",
|
|
655
661
|
"WIDGET_Embed": "Embed",
|
|
656
662
|
"WIDGET_Embed_Text": "Embed external HTML content (iframe, integration code)",
|
|
@@ -693,7 +699,20 @@ declare const _default: {
|
|
|
693
699
|
"POLL_Survey_Continue_Survey": "Continue",
|
|
694
700
|
"WIDGET_Select_SocialPoll": "Select a survey",
|
|
695
701
|
"WIDGET_Survey_Selection": "Select survey",
|
|
696
|
-
"GLOBAL_No_Survey_Results": "There is no survey open at the moment"
|
|
702
|
+
"GLOBAL_No_Survey_Results": "There is no survey open at the moment",
|
|
703
|
+
"FOLDER_Nb_Documents": "{count, plural, one {# document} other {# documents}}"
|
|
704
|
+
},
|
|
705
|
+
"fr": {
|
|
706
|
+
"FOLDER_Nb_Documents": "{count, plural, one {# document} other {# documents}}"
|
|
707
|
+
},
|
|
708
|
+
"de": {
|
|
709
|
+
"FOLDER_Nb_Documents": "{count, plural, one {# Dokument} other {# Dokumente}}"
|
|
710
|
+
},
|
|
711
|
+
"es": {
|
|
712
|
+
"FOLDER_Nb_Documents": "{count, plural, one {# documento} other {# documentos}}"
|
|
713
|
+
},
|
|
714
|
+
"it": {
|
|
715
|
+
"FOLDER_Nb_Documents": "{count, plural, one {# documento} other {# documenti}}"
|
|
697
716
|
}
|
|
698
717
|
}
|
|
699
718
|
;
|
|
@@ -63,7 +63,7 @@ export declare function fileAvatar(mimetype: string): {
|
|
|
63
63
|
dark: string;
|
|
64
64
|
};
|
|
65
65
|
} | {
|
|
66
|
-
ext: "mp4";
|
|
66
|
+
ext: "mp4" | "webm";
|
|
67
67
|
path: string;
|
|
68
68
|
colors: {
|
|
69
69
|
primary: string;
|
|
@@ -111,7 +111,7 @@ export declare function fileAvatar(mimetype: string): {
|
|
|
111
111
|
dark: string;
|
|
112
112
|
};
|
|
113
113
|
} | {
|
|
114
|
-
ext: "md" |
|
|
114
|
+
ext: "md" | undefined;
|
|
115
115
|
path: string;
|
|
116
116
|
colors: {
|
|
117
117
|
primary: string;
|
|
@@ -120,3 +120,7 @@ export declare function fileAvatar(mimetype: string): {
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
export declare const formatFileSize: (size: number) => string;
|
|
123
|
+
export declare const splitFileName: (title: string) => {
|
|
124
|
+
base: string;
|
|
125
|
+
ext: string;
|
|
126
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.125",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/jamespot-react-components.cjs",
|
|
6
6
|
"module": "dist/jamespot-react-components.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"eslint-plugin-storybook": "10.3.6",
|
|
61
61
|
"globals": "^16.5.0",
|
|
62
62
|
"html2canvas": "^1.4.1",
|
|
63
|
-
"jamespot-front-business": "^1.3.
|
|
64
|
-
"jamespot-user-api": "^1.3.
|
|
63
|
+
"jamespot-front-business": "^1.3.125",
|
|
64
|
+
"jamespot-user-api": "^1.3.125",
|
|
65
65
|
"jsdom": "^26.1.0",
|
|
66
66
|
"knip": "^5.88.1",
|
|
67
67
|
"lint-staged": "^16.4.0",
|