@topconsultnpm/sdkui-react-beta 6.10.83 → 6.10.84
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.js +8 -1
- package/lib/helper/SDKUI_Localizator.d.ts +1 -0
- package/lib/helper/SDKUI_Localizator.js +10 -0
- package/lib/helper/TMIcons.d.ts +4 -0
- package/lib/helper/TMIcons.js +12 -0
- package/lib/stories/TMFileManager.stories.d.ts +9 -0
- package/lib/stories/TMFileManager.stories.js +90 -0
- package/package.json +1 -1
|
@@ -69,7 +69,6 @@ const TMFileManager = (props) => {
|
|
|
69
69
|
let transformedData = [];
|
|
70
70
|
transformedData.push({ id: -1, text: treeFs.name, subFileFolderCount: treeFs.items.filter(item => !item.isDirectory).length, expanded: true, items: transformItems(treeFs.items) });
|
|
71
71
|
setFileManagerData(transformedData);
|
|
72
|
-
setIsLeftPanelCollapsed(false);
|
|
73
72
|
}, [treeFs]);
|
|
74
73
|
// Collects all text fields from a nested file manager directory structure.
|
|
75
74
|
const extractTextsFromDirectory = (directories) => {
|
|
@@ -93,8 +92,16 @@ const TMFileManager = (props) => {
|
|
|
93
92
|
// Reset the selected file item if its name is not found in the extracted texts.
|
|
94
93
|
if (selectedFileItem && !extractedTexts.includes(selectedFileItem.name)) {
|
|
95
94
|
setSelectedFileItem(undefined);
|
|
95
|
+
setIsLeftPanelCollapsed(false);
|
|
96
96
|
}
|
|
97
97
|
}, [fileManagerData]);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
// when change treeFs, reload data: this use effect trigger selectedFileItem and update filterItems when add or remove files
|
|
100
|
+
if (selectedFileItem) {
|
|
101
|
+
const item = selectedFileItem.id === treeFs.id ? treeFs : findFileItems(treeFs.items, selectedFileItem.id);
|
|
102
|
+
setSelectedFileItem(item);
|
|
103
|
+
}
|
|
104
|
+
}, [treeFs]);
|
|
98
105
|
useEffect(() => {
|
|
99
106
|
// Filter items whenever searchText or selectedFileItem changes
|
|
100
107
|
const filterItems = () => {
|
|
@@ -44,6 +44,7 @@ export declare class SDKUI_Localizator {
|
|
|
44
44
|
static get CassettoDoganaleExportMRN(): "MRN-Erholung für den Export" | "MRN recovery for export" | "Recuperación MRN para exportación" | "Récupération MRN pour l'export" | "Recuperação MRN para exportação" | "Recupero MRN per Export";
|
|
45
45
|
static get CassettoDoganaleExportVU(): "Wiederherstellung des Ausreisevisums" | "Exit Visa Recovery" | "Recuperación de Visa de Salida" | "Sortie Récupération Visa" | "Recuperação de Visto de Saída" | "Recupero Visto Uscire per Export";
|
|
46
46
|
static get CassettoDoganaleImportMRN(): "MRN-Erholung für den Import" | "MRN recovery for import" | "Recuperación MRN para importación" | "Récupération MRN à l'import" | "Recuperação MRN para importação" | "Recupero MRN per Import";
|
|
47
|
+
static get CassettoDoganalePlus_UserName(): "STD-Benutzer des ADM-Portals" | "STD User of the ADM Portal" | "Usuario STD del Portal ADM" | "Utilisateur STD du portail ADM" | "Utilizador DST do Portal ADM" | "Utente STD del Portale ADM";
|
|
47
48
|
static get Cancel(): "Abbrechen" | "Cancel" | "Anular" | "Annuler" | "Cancelar" | "Annulla";
|
|
48
49
|
static get ChangePassword(): "Kennwort ändern" | "Change password" | "Cambiar la contraseña" | "Changer le mot de passe" | "Alterar a senha" | "Cambia password";
|
|
49
50
|
static get CheckIn(): "Check in" | "Enregistrement";
|
|
@@ -389,6 +389,16 @@ export class SDKUI_Localizator {
|
|
|
389
389
|
default: return "Recupero MRN per Import";
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
+
static get CassettoDoganalePlus_UserName() {
|
|
393
|
+
switch (this._cultureID) {
|
|
394
|
+
case CultureIDs.De_DE: return "STD-Benutzer des ADM-Portals";
|
|
395
|
+
case CultureIDs.En_US: return "STD User of the ADM Portal";
|
|
396
|
+
case CultureIDs.Es_ES: return "Usuario STD del Portal ADM";
|
|
397
|
+
case CultureIDs.Fr_FR: return "Utilisateur STD du portail ADM";
|
|
398
|
+
case CultureIDs.Pt_PT: return "Utilizador DST do Portal ADM";
|
|
399
|
+
default: return "Utente STD del Portale ADM";
|
|
400
|
+
}
|
|
401
|
+
}
|
|
392
402
|
static get Cancel() {
|
|
393
403
|
switch (this._cultureID) {
|
|
394
404
|
case CultureIDs.De_DE: return "Abbrechen";
|
package/lib/helper/TMIcons.d.ts
CHANGED
|
@@ -220,4 +220,8 @@ declare function IconAddressBook(props: React.SVGProps<SVGSVGElement>): import("
|
|
|
220
220
|
declare function IconFreeSearch(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
221
221
|
declare function IconMic(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
222
222
|
declare function IconKey(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
223
|
+
export declare function IconDetailDcmts(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
|
|
224
|
+
export declare function IconMultipleSelection(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
|
|
225
|
+
export declare function IconChevronRight(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
|
|
226
|
+
export declare function IconChevronDown(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
|
|
223
227
|
export { Icon123, IconABC, IconAccessPoint, IconAddressBook, IconSignCert, IconServerService, IconActivity, IconActivityLog, IconAdd, IconAddCircleOutline, IconAll, IconApply, IconApplyAndClose, IconArchive, IconArchiveDoc, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAtSign, IconAttachment, IconAutoConfig, IconBackward, IconBasket, IconBoard, IconBoxArchiveIn, IconBxInfo, IconBxLock, IconCalendar, IconCloseCircle, IconCloseOutline, IconCloud, IconCircleInfo, IconClear, IconColumns, IconCommand, IconCopy, IconCount, IconCrown, IconDashboard, IconDcmtType, IconDcmtTypeOnlyMetadata, IconDcmtTypeSys, IconDelete, IconDetails, IconDown, IconDownload, IconDotsVerticalCircleOutline, IconDuplicate, IconEdit, IconEqual, IconEqualNot, IconEraser, IconExpandRight, IconExport, IconFastBackward, IconFoldeAdd, IconFolderSearch, IconFolderZip, IconFastForward, IconFastSearch, IconFileDots, IconFilter, IconForceStop, IconForward, IconFreeze, IconFreeSearch, IconGreaterThan, IconGreaterThanOrEqual, IconHistory, IconImport, IconTag, IconInfo, IconInsertAbove, IconInsertBelow, IconHeart, IconHide, IconLanguage, IconLeft, IconLessThan, IconLessThanOrEqual, IconLock, IconLockClosed, IconLogin, IconLink, IconLogout, IconMail, IconMapping, IconMaximize, IconMinimize, IconMic, IconMenuHorizontal, IconMenuKebab, IconMenuVertical, IconMetadata, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, IconMonitor, IconOpenInNew, IconNotification, IconPassword, IconPencil, IconPlatform, IconPlay, IconPreview, IconPrinter, IconProcess, IconProgressAbortRequested, IconProgressCompleted, IconProgressNotCompleted, IconProgressReady, IconProgressRunning, IconProgressStarted, IconRefresh, IconReset, IconRight, IconSave, IconSearch, IconSelected, IconSettings, IconShow, IconSort, IconStop, IconStopwatch, IconSuccess, IconAlarmPlus, IconHourglass, IconNone, IconNotStarted, IconProgress, IconSuccessCirlce, IconSuitcase, IconSupport, IconUndo, IconUnFreeze, IconUp, IconUpdate, IconUpload, IconUser, IconUserProfile, IconVisible, IconWarning, IconWeb, IconWifi, IconWindowMaximize, IconWindowMinimize, IconWorkflow, IconWorkspace, IconUserGroup, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconDraggabledots, IconRelation, IconEasy, IconSum, IconDisk, IconDataList, IconPalette, IconFormatPageSplit, IconPaste, IconFileSearch, IconStar, IconStarRemove, IconSearchCheck, IconLightningFill, IconArrowUnsorted, IconArrowSortedUp, IconArrowSortedDown, IconConvertFilePdf, IconExportTo, IconSharedDcmt, IconShare, IconBatchUpdate, IconCheckFile, IconStatistics, IconSubstFile, IconAdvanced, IconSync, IconSavedQuery, IconSignature, IconRecursiveOps, IconCheckIn, IconTree, IconGrid, IconList, IconFolder, IconFolderOpen, IconFactory, IconTest, IconCheck, IconUncheck, IconSortAsc, IconSortDesc, IconSortAscLetters, IconSortDescLetters, IconSortAscNumbers, IconSortDescNumbers, IconSortAscClock, IconSortDescClock, IconLayerGroup, IconBell, IconBellCheck, IconBellOutline, IconBellCheckOutline, IconEnvelopeOpenText, IconChangeUser, IconUserCheck, IconRelationManyToMany, IconRelationOneToMany, IconUserExpired, IconKey };
|
package/lib/helper/TMIcons.js
CHANGED
|
@@ -523,4 +523,16 @@ function IconMic(props) { return (_jsxs("svg", { fontSize: props?.fontSize ? pro
|
|
|
523
523
|
function IconKey(props) {
|
|
524
524
|
return (_jsx("svg", { fontSize: props?.fontSize ? props.fontSize : FONTSIZE, fill: "none", viewBox: "0 0 24 24", height: "1em", width: "1em", ...props, children: _jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M6 8a3 3 0 00-3 3v2a3 3 0 106 0h6v2h2v-2h1v2h2v-4H9a3 3 0 00-3-3zm1 5v-2a1 1 0 10-2 0v2a1 1 0 102 0z", clipRule: "evenodd" }) }));
|
|
525
525
|
}
|
|
526
|
+
export function IconDetailDcmts(props) {
|
|
527
|
+
return (_jsx("svg", { fontSize: props?.fontSize ? props.fontSize : FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: _jsx("path", { fill: "currentColor", d: "M3 5.25A2.25 2.25 0 0 1 5.25 3h13.5A2.25 2.25 0 0 1 21 5.25v3a2.25 2.25 0 0 1-2.25 2.25H7.5v4.25c0 .966.784 1.75 1.75 1.75H12v-.75a2.25 2.25 0 0 1 2.25-2.25h4.5A2.25 2.25 0 0 1 21 15.75v3A2.25 2.25 0 0 1 18.75 21h-4.5A2.25 2.25 0 0 1 12 18.75V18H9.25A3.25 3.25 0 0 1 6 14.75V10.5h-.75A2.25 2.25 0 0 1 3 8.25zM18.75 9a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-.75-.75H5.25a.75.75 0 0 0-.75.75v3c0 .414.336.75.75.75zm-5.25 6.75v3c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0-.75.75" }) }));
|
|
528
|
+
}
|
|
529
|
+
export function IconMultipleSelection(props) {
|
|
530
|
+
return (_jsx("svg", { fontSize: props?.fontSize ? props.fontSize : FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 26 26", width: "1em", height: "1em", ...props, children: _jsx("path", { fill: "currentColor", d: "M7.875 0a1 1 0 0 0-.656.375L3.812 4.656l-2.25-1.5A1.014 1.014 0 1 0 .438 4.844l3 2a1 1 0 0 0 1.344-.219l4-5A1 1 0 0 0 7.875 0M12 3v2h14V3zM7.875 9a1 1 0 0 0-.656.375l-3.407 4.281l-2.25-1.5a1.014 1.014 0 1 0-1.125 1.688l3 2a1 1 0 0 0 1.344-.219l4-5A1 1 0 0 0 7.875 9M12 12v2h14v-2zm-4.125 6a1 1 0 0 0-.656.375l-3.407 4.281l-2.25-1.5a1.014 1.014 0 1 0-1.125 1.688l3 2a1 1 0 0 0 1.344-.219l4-5A1 1 0 0 0 7.875 18M12 21v2h14v-2z" }) }));
|
|
531
|
+
}
|
|
532
|
+
export function IconChevronRight(props) {
|
|
533
|
+
return (_jsx("svg", { fontSize: props?.fontSize ? props.fontSize : FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: _jsx("path", { fill: "currentColor", d: "M10.5 17a1 1 0 0 1-.71-.29a1 1 0 0 1 0-1.42L13.1 12L9.92 8.69a1 1 0 0 1 0-1.41a1 1 0 0 1 1.42 0l3.86 4a1 1 0 0 1 0 1.4l-4 4a1 1 0 0 1-.7.32" }) }));
|
|
534
|
+
}
|
|
535
|
+
export function IconChevronDown(props) {
|
|
536
|
+
return (_jsx("svg", { fontSize: props?.fontSize ? props.fontSize : FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: _jsx("path", { fill: "currentColor", d: "M12 15.5a1 1 0 0 1-.71-.29l-4-4a1 1 0 1 1 1.42-1.42L12 13.1l3.3-3.18a1 1 0 1 1 1.38 1.44l-4 3.86a1 1 0 0 1-.68.28" }) }));
|
|
537
|
+
}
|
|
526
538
|
export { Icon123, IconABC, IconAccessPoint, IconAddressBook, IconSignCert, IconServerService, IconActivity, IconActivityLog, IconAdd, IconAddCircleOutline, IconAll, IconApply, IconApplyAndClose, IconArchive, IconArchiveDoc, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconAtSign, IconAttachment, IconAutoConfig, IconBackward, IconBasket, IconBoard, IconBoxArchiveIn, IconBxInfo, IconBxLock, IconCalendar, IconCloseCircle, IconCloseOutline, IconCloud, IconCircleInfo, IconClear, IconColumns, IconCommand, IconCopy, IconCount, IconCrown, IconDashboard, IconDcmtType, IconDcmtTypeOnlyMetadata, IconDcmtTypeSys, IconDelete, IconDetails, IconDown, IconDownload, IconDotsVerticalCircleOutline, IconDuplicate, IconEdit, IconEqual, IconEqualNot, IconEraser, IconExpandRight, IconExport, IconFastBackward, IconFoldeAdd, IconFolderSearch, IconFolderZip, IconFastForward, IconFastSearch, IconFileDots, IconFilter, IconForceStop, IconForward, IconFreeze, IconFreeSearch, IconGreaterThan, IconGreaterThanOrEqual, IconHistory, IconImport, IconTag, IconInfo, IconInsertAbove, IconInsertBelow, IconHeart, IconHide, IconLanguage, IconLeft, IconLessThan, IconLessThanOrEqual, IconLock, IconLockClosed, IconLogin, IconLink, IconLogout, IconMail, IconMapping, IconMaximize, IconMinimize, IconMic, IconMenuHorizontal, IconMenuKebab, IconMenuVertical, IconMetadata, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, IconMonitor, IconOpenInNew, IconNotification, IconPassword, IconPencil, IconPlatform, IconPlay, IconPreview, IconPrinter, IconProcess, IconProgressAbortRequested, IconProgressCompleted, IconProgressNotCompleted, IconProgressReady, IconProgressRunning, IconProgressStarted, IconRefresh, IconReset, IconRight, IconSave, IconSearch, IconSelected, IconSettings, IconShow, IconSort, IconStop, IconStopwatch, IconSuccess, IconAlarmPlus, IconHourglass, IconNone, IconNotStarted, IconProgress, IconSuccessCirlce, IconSuitcase, IconSupport, IconUndo, IconUnFreeze, IconUp, IconUpdate, IconUpload, IconUser, IconUserProfile, IconVisible, IconWarning, IconWeb, IconWifi, IconWindowMaximize, IconWindowMinimize, IconWorkflow, IconWorkspace, IconUserGroup, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, IconDraggabledots, IconRelation, IconEasy, IconSum, IconDisk, IconDataList, IconPalette, IconFormatPageSplit, IconPaste, IconFileSearch, IconStar, IconStarRemove, IconSearchCheck, IconLightningFill, IconArrowUnsorted, IconArrowSortedUp, IconArrowSortedDown, IconConvertFilePdf, IconExportTo, IconSharedDcmt, IconShare, IconBatchUpdate, IconCheckFile, IconStatistics, IconSubstFile, IconAdvanced, IconSync, IconSavedQuery, IconSignature, IconRecursiveOps, IconCheckIn, IconTree, IconGrid, IconList, IconFolder, IconFolderOpen, IconFactory, IconTest, IconCheck, IconUncheck, IconSortAsc, IconSortDesc, IconSortAscLetters, IconSortDescLetters, IconSortAscNumbers, IconSortDescNumbers, IconSortAscClock, IconSortDescClock, IconLayerGroup, IconBell, IconBellCheck, IconBellOutline, IconBellCheckOutline, IconEnvelopeOpenText, IconChangeUser, IconUserCheck, IconRelationManyToMany, IconRelationOneToMany, IconUserExpired, IconKey };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TMFileManagerProps } from '../components/base/TMFileManager';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: TMFileManagerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const DefaultView: (args: TMFileManagerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { action } from '@storybook/addon-actions';
|
|
3
|
+
import TMFileManager from '../components/base/TMFileManager';
|
|
4
|
+
import { TMDeviceProvider } from '../components/base/TMDeviceProvider';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/TMFileManager',
|
|
7
|
+
component: TMFileManager,
|
|
8
|
+
decorators: [(Story) => (_jsxs(TMDeviceProvider, { children: [" ", _jsx(Story, {}), " "] })),],
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
};
|
|
11
|
+
// Default Story
|
|
12
|
+
export const DefaultView = (args) => {
|
|
13
|
+
// Sample file items to mock the data structure
|
|
14
|
+
const sampleFiles = [
|
|
15
|
+
{
|
|
16
|
+
id: 1,
|
|
17
|
+
name: 'Folder 1',
|
|
18
|
+
isDirectory: true,
|
|
19
|
+
items: [
|
|
20
|
+
{
|
|
21
|
+
id: 3,
|
|
22
|
+
name: 'File 1',
|
|
23
|
+
isDirectory: false,
|
|
24
|
+
items: [],
|
|
25
|
+
size: 2048,
|
|
26
|
+
ext: 'txt',
|
|
27
|
+
creationTime: new Date(),
|
|
28
|
+
lastUpdateTime: new Date(),
|
|
29
|
+
version: 1
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
size: 1024,
|
|
33
|
+
ext: 'txt',
|
|
34
|
+
creationTime: new Date(),
|
|
35
|
+
lastUpdateTime: new Date(),
|
|
36
|
+
version: 1
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 2,
|
|
40
|
+
name: 'Folder 2',
|
|
41
|
+
isDirectory: true,
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
id: 3,
|
|
45
|
+
name: 'File 2',
|
|
46
|
+
isDirectory: false,
|
|
47
|
+
items: [],
|
|
48
|
+
size: 2048,
|
|
49
|
+
ext: 'pdf',
|
|
50
|
+
creationTime: new Date(),
|
|
51
|
+
lastUpdateTime: new Date(),
|
|
52
|
+
version: 1
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
size: 0,
|
|
56
|
+
ext: 'folder',
|
|
57
|
+
creationTime: new Date(),
|
|
58
|
+
lastUpdateTime: new Date(),
|
|
59
|
+
version: 1
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
// Example context menu items
|
|
63
|
+
const contextMenuItems = {
|
|
64
|
+
folder: [
|
|
65
|
+
{
|
|
66
|
+
text: 'Open Folder',
|
|
67
|
+
icon: 'open-folder',
|
|
68
|
+
onClick: () => action('Open Folder')(),
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
file: [
|
|
72
|
+
{
|
|
73
|
+
text: 'Download File',
|
|
74
|
+
icon: 'download',
|
|
75
|
+
onClick: () => action('Download File')(),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
text: 'Delete File',
|
|
79
|
+
icon: 'delete',
|
|
80
|
+
onClick: () => action('Delete File')(),
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
};
|
|
84
|
+
return _jsx(TMFileManager, { ...args, treeFs: {
|
|
85
|
+
id: 0,
|
|
86
|
+
name: 'Root Directory',
|
|
87
|
+
isDirectory: true,
|
|
88
|
+
items: sampleFiles,
|
|
89
|
+
}, contextMenuItems: contextMenuItems });
|
|
90
|
+
};
|