@topconsultnpm/sdkui-react-beta 6.11.115 → 6.11.117
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/lib/components/base/TMFileManager.d.ts +1 -1
- package/lib/components/base/TMFileManager.js +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +3 -2
- package/lib/components/base/TMFileManagerThumbnailItems.js +2 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/package.json +1 -1
- package/lib/stories/TMHtmlEditor.stories.d.ts +0 -4
- package/lib/stories/TMHtmlEditor.stories.js +0 -16
@@ -43,7 +43,7 @@ export declare enum TMFileManagerPageSize {
|
|
43
43
|
}
|
44
44
|
export interface TMFileManagerProps {
|
45
45
|
/** Session User ID */
|
46
|
-
userID
|
46
|
+
userID?: number;
|
47
47
|
/** Determines the view mode of the file manager (Can be either 'thumbnails' or 'details') */
|
48
48
|
viewMode?: 'thumbnails' | 'details';
|
49
49
|
/** Represents the file system tree structure */
|
@@ -11,7 +11,7 @@ import TMDataGrid from './TMDataGrid';
|
|
11
11
|
import { TMSplitterLayout } from './TMLayout';
|
12
12
|
import { DeviceType, useDeviceType } from './TMDeviceProvider';
|
13
13
|
import TMToolbarCard from './TMToolbarCard';
|
14
|
-
import
|
14
|
+
import TMFileManagerThumbnailItems from './TMFileManagerThumbnailItems';
|
15
15
|
export var TMFileManagerPageSize;
|
16
16
|
(function (TMFileManagerPageSize) {
|
17
17
|
TMFileManagerPageSize[TMFileManagerPageSize["Small"] = 30] = "Small";
|
@@ -5,10 +5,11 @@ export interface TMFileManagerThumbnailItemsProps {
|
|
5
5
|
selectedFiles: Array<FileItem> | undefined;
|
6
6
|
showId: boolean;
|
7
7
|
searchText: string;
|
8
|
-
userID: number;
|
9
8
|
onClick: (file: FileItem) => void;
|
10
9
|
onDoubleClick?: (file: FileItem) => void;
|
11
10
|
handleSelectedFiles?: (fileItems: Array<FileItem>) => void;
|
12
11
|
handleFocusedFile?: (fileItem: FileItem | undefined) => void;
|
12
|
+
userID?: number;
|
13
13
|
}
|
14
|
-
|
14
|
+
declare const TMFileManagerThumbnailItems: (props: TMFileManagerThumbnailItemsProps) => import("react/jsx-runtime").JSX.Element;
|
15
|
+
export default TMFileManagerThumbnailItems;
|
@@ -81,7 +81,7 @@ const highlightText = (text, searchText, isSelected) => {
|
|
81
81
|
const regex = new RegExp(`(${searchText})`, 'gi');
|
82
82
|
return text.split(regex).map((part, index) => regex.test(part) ? (_jsx("span", { style: { backgroundColor: isSelected ? '#6c9023' : 'yellow' }, children: part }, index)) : (part));
|
83
83
|
};
|
84
|
-
|
84
|
+
const TMFileManagerThumbnailItems = (props) => {
|
85
85
|
const { items, paginatedItems, selectedFiles, searchText, showId, userID, onClick, onDoubleClick, handleSelectedFiles, handleFocusedFile } = props;
|
86
86
|
// Ref to the container
|
87
87
|
const containerRef = useRef(null);
|
@@ -163,3 +163,4 @@ export const TMFileManagerThumbnailItems = (props) => {
|
|
163
163
|
return _jsxs(FileItemContainer, { ref: containerRef, id: item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: onDoubleClickHandler, onContextMenu: onContextMenu, onClick: onClickHandler, tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: [_jsxs(IconWrapper, { children: [getFileIcon(item.ext, item.version), editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }) })] }), _jsxs(FileDetails, { children: [_jsx(FileName, { children: showId ? highlightText(`(${item.id}) ${item.name}`, searchText, isSelected) : highlightText(item.name, searchText, isSelected) }), _jsx(FileMeta, { children: formatBytes(item.size ?? 0) })] }), item.version && _jsx(Badge, { children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: item.version }) })] }, "item-file-manager-" + item.id);
|
164
164
|
}) });
|
165
165
|
};
|
166
|
+
export default TMFileManagerThumbnailItems;
|
@@ -60,6 +60,7 @@ export * from "./viewers/TMDataListItemViewer";
|
|
60
60
|
export * from "./base/TMDeviceProvider";
|
61
61
|
export { default as TMDataGrid } from "./base/TMDataGrid";
|
62
62
|
export { default as TMFileManager } from "./base/TMFileManager";
|
63
|
+
export { default as TMFileManagerThumbnailItems } from "./base/TMFileManagerThumbnailItems";
|
63
64
|
export { default as TMCounterContainer } from "./base/TMCounterContainer";
|
64
65
|
export * from "./base/TMCounterContainer";
|
65
66
|
export { default as TMAreaManager } from "./base/TMAreaManager";
|
package/lib/components/index.js
CHANGED
@@ -72,6 +72,7 @@ export * from "./viewers/TMDataListItemViewer";
|
|
72
72
|
export * from "./base/TMDeviceProvider";
|
73
73
|
export { default as TMDataGrid } from "./base/TMDataGrid";
|
74
74
|
export { default as TMFileManager } from "./base/TMFileManager";
|
75
|
+
export { default as TMFileManagerThumbnailItems } from "./base/TMFileManagerThumbnailItems";
|
75
76
|
export { default as TMCounterContainer } from "./base/TMCounterContainer";
|
76
77
|
export * from "./base/TMCounterContainer";
|
77
78
|
export { default as TMAreaManager } from "./base/TMAreaManager";
|
package/package.json
CHANGED
@@ -1,16 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { sortArgTypes } from './TMStoriesUtils';
|
3
|
-
import TMHtmlEditor from '../components/editors/TMHtmlEditor';
|
4
|
-
export default {
|
5
|
-
// The title will determine how the component appears in the sidebar of Storybook
|
6
|
-
title: 'Components/TMHtmlEditor',
|
7
|
-
// Specifies the component that is being documented in this story
|
8
|
-
component: TMHtmlEditor,
|
9
|
-
tags: ['autodocs'],
|
10
|
-
// Tags for categorizing the component within Storybook
|
11
|
-
argTypes: sortArgTypes({}),
|
12
|
-
};
|
13
|
-
/******* 1. Default Template and Default TMHtmlEditor *******/
|
14
|
-
const Template = (args) => _jsx(TMHtmlEditor, { ...args });
|
15
|
-
export const HtmlEditor = Template.bind({});
|
16
|
-
HtmlEditor.args = {};
|