@topconsultnpm/sdkui-react-beta 6.12.114 → 6.12.116

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.
@@ -1,4 +1,5 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import styled from 'styled-components';
3
4
  import { TMColors } from '../../utils/theme';
4
5
  const StyledListItem = styled.li `
@@ -13,11 +14,10 @@ const StyledListItem = styled.li `
13
14
  width: 100%;
14
15
  font-size: 1rem;
15
16
  letter-spacing: 0px;
17
+ background-color: ${({ $isSelected }) => ($isSelected ? '#d0e5fb' : 'transparent')};
16
18
 
17
19
  &:hover {
18
20
  background-color: ${TMColors.border_normal};
19
- /* color: ${TMColors.secondary}; */
20
- /* border-left: 7px solid ${TMColors.primary}; */
21
21
  cursor: pointer;
22
22
  }
23
23
  `;
@@ -29,18 +29,16 @@ const StyledListContainer = styled.div `
29
29
  border-radius: 2px;
30
30
  box-shadow: 1px 1px 7px rgba(0,0,0,0.15);
31
31
  `;
32
- const StyledListContent = styled.div `
33
- height: 100%;
34
- width: 100%;
35
- background-color: ${TMColors.default_background};
36
- padding: 10px;
37
- border-radius: 2px;
38
- box-shadow: 1px 1px 7px rgba(0,0,0,0.15);
39
- `;
40
32
  ;
41
33
  const TMList = ({ items }) => {
34
+ const [selectedIndex, setSelectedIndex] = useState(0);
35
+ const handleItemClick = (index, onClick) => {
36
+ setSelectedIndex(index); // Update the selected index
37
+ if (onClick)
38
+ onClick(); // Call the item's onClick handler if provided
39
+ };
42
40
  return (_jsx(StyledListContainer, { children: items?.map((item, index) => {
43
- return (_jsxs(StyledListItem, { style: { gap: 10 }, onClick: item.onClick, children: [item.icon, item.text] }, index));
41
+ return (_jsxs(StyledListItem, { "$isSelected": selectedIndex === index, style: { gap: 10 }, onClick: () => handleItemClick(index, item.onClick), children: [item.icon, item.text] }, index));
44
42
  }) }));
45
43
  };
46
44
  export default TMList;
@@ -33,7 +33,7 @@ const TMDcmtPreview = ({ dcmtData, onClose, canNext, canPrev, onNext, onPrev })
33
33
  setShowPreview(true);
34
34
  return;
35
35
  }
36
- if ((extensionHandler(dcmtData.fileExt) !== FileExtensionHandler.NONE) && ((dcmtData.fileSize ?? 0) <= SDKUI_Globals.userSettings.searchSettings.previewThreshold)) {
36
+ if ((extensionHandler(dcmtData.fileExt) !== FileExtensionHandler.NONE) && ((dcmtData.fileSize ?? 0) <= (SDKUI_Globals.userSettings.searchSettings.previewThreshold * 1024))) {
37
37
  loadDocumentWithCache();
38
38
  setShowPreview(true);
39
39
  }
@@ -13,9 +13,9 @@ import Menu from "./Menu";
13
13
  import TextBox from "./TextBox";
14
14
  import Chooser from "./Chooser";
15
15
  import SelectBox from "./SelectBox";
16
- import six_SURFER from '../../../assets/Surfer blu.svg';
17
- import six_DESIGNER from '../../../assets/Designer blu.svg';
18
- import six_ORCHESTRATOR from '../../../assets/Orchestrator blu.svg';
16
+ import six_SURFER from '../../../assets/Surfer-blu.svg';
17
+ import six_DESIGNER from '../../../assets/Designer-blu.svg';
18
+ import six_ORCHESTRATOR from '../../../assets/Orchestrator-blu.svg';
19
19
  import it from '../../../assets/italy.svg';
20
20
  import en from '../../../assets/united-kingdom.svg';
21
21
  import es from '../../../assets/spain.svg';
@@ -1,9 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState, useEffect, useRef } from 'react';
2
+ import { useState, useEffect, useRef, useMemo } from 'react';
3
+ import six_SURFER from '../../assets/Surfer-blu.svg';
4
+ import six_DESIGNER from '../../assets/Designer-blu.svg';
5
+ import six_ORCHESTRATOR from '../../assets/Orchestrator-blu.svg';
3
6
  import six from '../../assets/six.svg';
4
7
  import { IconBxInfo, IconCloseOutline, IconLogout, IconPassword, IconSearch, IconSettings, IconUserProfile, SDKUI_Localizator } from '../../helper';
5
8
  import styled from 'styled-components';
6
- import { SDK_Globals, AuthenticationModes } from '@topconsultnpm/sdk-ts-beta';
9
+ import { SDK_Globals, AuthenticationModes, AppModules } from '@topconsultnpm/sdk-ts-beta';
7
10
  import { FontSize, TMColors } from '../../utils/theme';
8
11
  import { ButtonNames, TMMessageBoxManager } from '../base/TMPopUp';
9
12
  import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
@@ -37,6 +40,13 @@ const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJo
37
40
  const [searchQEValue, setSearchQEValue] = useState('');
38
41
  const menuRef = useRef(null);
39
42
  const userIcon = useRef(null);
43
+ const headerLogo = useMemo(() => {
44
+ switch (SDK_Globals.appModule) {
45
+ case AppModules.ORCHESTRATOR: return six_ORCHESTRATOR;
46
+ case AppModules.DESIGNER: return six_DESIGNER;
47
+ default: return six_SURFER;
48
+ }
49
+ }, [SDK_Globals.appModule]);
40
50
  const deviceType = useDeviceType();
41
51
  let isMobile = deviceType == DeviceType.MOBILE;
42
52
  useEffect(() => { clearSearchJobValue && setSearchJobsValue(''); }, [clearSearchJobValue]);
@@ -74,6 +84,6 @@ const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJo
74
84
  document.addEventListener('click', handleClickOutside);
75
85
  return () => document.removeEventListener('click', handleClickOutside);
76
86
  }, [menuRef, userIcon, menuStatus]);
77
- return (_jsxs(StyledHeaderContainer, { "$appName": SDK_Globals.appModule, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%' }, children: [_jsx("div", { style: { width: '50px', height: '50px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("img", { src: six, height: 30, alt: "" }) }), !isMobile && _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'flex-start', gap: '1px', fontSize: '14px' }, children: [_jsx("div", { style: { userSelect: 'none', color: '#135596' }, children: "TopMedia" }), _jsx("div", { style: { userSelect: 'none', color: '#135596' }, children: SDK_Globals.appModule })] }), showSearchBar && _jsxs(_Fragment, { children: [searchContext === TMSearchContext.JOBS_LIST && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobListValue(e), searchValue: searchJobListValue }), searchContext === TMSearchContext.JOBS && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobsValue(e), searchValue: searchJobsValue }), searchContext === TMSearchContext.PROCESSES && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessesValue(e), searchValue: searchProcessesValue }), searchContext === TMSearchContext.PROCESS_MONITOR && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessMonitorValue(e), searchValue: searchProcessMonitorValue }), searchContext === TMSearchContext.PLATFORM && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchPlatformValue(e), searchValue: searchPlatformValue }), searchContext === TMSearchContext.QE && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchQEValue(e), searchValue: searchQEValue })] })] }), showSettingsMenu && _jsxs(StyledHeaderIcon, { onClick: () => onSettingsClick?.(), children: [" ", _jsx(IconSettings, { fontSize: 20 }), " "] }), _jsxs(StyledHeaderIcon, { "$isSelected": menuStatus, ref: userIcon, onClick: () => setMenuStatus(!menuStatus), children: [" ", _jsx(IconUserProfile, { fontSize: 20 }), " "] }), menuStatus && _jsxs(StyledMenu, { ref: menuRef, children: [SDK_Globals.tmSession?.SessionDescr?.authenticationMode === AuthenticationModes.TopMedia && _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onChangePassword && onChangePassword(); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconPassword, {}) }), " ", _jsx("span", { children: SDKUI_Localizator.ChangePassword }), " "] }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onLogout && onLogout(); }, children: [_jsx("span", { children: _jsx(IconLogout, {}) }), " ", _jsx("span", { children: "Logout" }), " "] }), _jsx("div", { style: { width: '100%', height: '1px', backgroundColor: 'gray' } }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); TMMessageBoxManager.show({ buttons: [ButtonNames.OK], title: `About. ${SDK_Globals.appModule}`, message: _jsx(TMAboutApp, { app: true, skdui: true, sdk: true, websdk: true }) }); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconBxInfo, {}) }), " ", _jsx("span", { children: "About" }), " "] })] })] }));
87
+ return (_jsxs(StyledHeaderContainer, { "$appName": SDK_Globals.appModule, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%' }, children: [_jsx("div", { style: { height: '50px', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx("img", { src: isMobile ? six : headerLogo, height: isMobile ? 35 : 40, alt: "" }) }), showSearchBar && _jsxs(_Fragment, { children: [searchContext === TMSearchContext.JOBS_LIST && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobListValue(e), searchValue: searchJobListValue }), searchContext === TMSearchContext.JOBS && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobsValue(e), searchValue: searchJobsValue }), searchContext === TMSearchContext.PROCESSES && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessesValue(e), searchValue: searchProcessesValue }), searchContext === TMSearchContext.PROCESS_MONITOR && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessMonitorValue(e), searchValue: searchProcessMonitorValue }), searchContext === TMSearchContext.PLATFORM && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchPlatformValue(e), searchValue: searchPlatformValue }), searchContext === TMSearchContext.QE && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchQEValue(e), searchValue: searchQEValue })] })] }), showSettingsMenu && _jsxs(StyledHeaderIcon, { onClick: () => onSettingsClick?.(), children: [" ", _jsx(IconSettings, { fontSize: 20 }), " "] }), _jsxs(StyledHeaderIcon, { "$isSelected": menuStatus, ref: userIcon, onClick: () => setMenuStatus(!menuStatus), children: [" ", _jsx(IconUserProfile, { fontSize: 20 }), " "] }), menuStatus && _jsxs(StyledMenu, { ref: menuRef, children: [SDK_Globals.tmSession?.SessionDescr?.authenticationMode === AuthenticationModes.TopMedia && _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onChangePassword && onChangePassword(); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconPassword, {}) }), " ", _jsx("span", { children: SDKUI_Localizator.ChangePassword }), " "] }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onLogout && onLogout(); }, children: [_jsx("span", { children: _jsx(IconLogout, {}) }), " ", _jsx("span", { children: "Logout" }), " "] }), _jsx("div", { style: { width: '100%', height: '1px', backgroundColor: 'gray' } }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); TMMessageBoxManager.show({ buttons: [ButtonNames.OK], title: `About. ${SDK_Globals.appModule}`, message: _jsx(TMAboutApp, { app: true, skdui: true, sdk: true, websdk: true }) }); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconBxInfo, {}) }), " ", _jsx("span", { children: "About" }), " "] })] })] }));
78
88
  };
79
89
  export default TMHeader;
@@ -118,7 +118,7 @@ export function LocalizeOrderRetrieveFormats(value) {
118
118
  case OrderRetrieveFormats.None: return SDKUI_Localizator.Formats_None;
119
119
  case OrderRetrieveFormats.ER_HTML: return SDKUI_Localizator.UBLViewFormats_ER_HTML;
120
120
  case OrderRetrieveFormats.ER_PDF: return SDKUI_Localizator.UBLViewFormats_ER_PDF;
121
- case OrderRetrieveFormats.NSO_HTML: return SDKUI_Localizator.FEFormats_ASW_HTML;
121
+ case OrderRetrieveFormats.NSO_HTML: return SDKUI_Localizator.UBLViewFormats_NSO_HTML;
122
122
  case OrderRetrieveFormats.NSO_PDF: return SDKUI_Localizator.UBLViewFormats_NSO_PDF;
123
123
  default: return String(value);
124
124
  }
@@ -67,7 +67,7 @@ export class SearchSettings2 {
67
67
  this.orderRetrieveFormat = OrderRetrieveFormats.NSO_HTML;
68
68
  this.mruTIDs = [];
69
69
  this.defaultTree = -1;
70
- this.previewThreshold = 500000;
70
+ this.previewThreshold = 500; // KB
71
71
  // filterPageSettings?: FilterPageSettings;
72
72
  // resultPageSettings?: ResultPageSettings;
73
73
  // dcmtPageSettings?: DcmtPageSettings;
@@ -17,6 +17,7 @@ export declare class SDKUI_Localizator {
17
17
  static get AddDefinition(): "Definition hinzufügen" | "Add definition" | "Añadir definición" | "Ajoute la définition" | "Adicionar definição" | "Aggiungi definizione";
18
18
  static get AddOrSubstFile(): "Dateien hinzufügen/ersetzen" | "Add/substitute file" | "Añadir/sustituir archivo" | "Ajoute/Remplace le fichier" | "Adicionar / substituir arquivos" | "Aggiungi/sostituisci file";
19
19
  static get AddToHomePage(): "Zur Startseite hinzufügen" | "Add to Home Page" | "Añadir a la página inicial" | "Ajoute à Home Page" | "Adicionar a Home Page" | "Aggiungi alla Home Page";
20
+ static get Advanced(): "Erweitert" | "Advanced" | "Avanzado" | "Avancé" | "Avançado" | "Avanzate";
20
21
  static get All(): "Alle" | "All" | "Todos" | "Tous" | "Tutti";
21
22
  static get AllDcmtTypes(): "Alle Dokumenttypen" | "All document types" | "Todos los tipos documento" | "Tous les types de documents" | "Todos os tipos de documentos" | "Tutti i tipi documento";
22
23
  static get AllFilesAndFoldersInSupportArea(): "Alle Dateien und Ordner im Support-Bereich" | "All files and folders within the support area" | "Todos los archivos y carpetas dentro del área de soporte" | "Tous les fichiers et dossiers dans la zone de support" | "Todos os arquivos e pastas na área de apoio" | "Tutti i file e le cartelle all'interno dell'area di appoggio";
@@ -164,6 +165,7 @@ export declare class SDKUI_Localizator {
164
165
  static get File_Downloading(): "Datei wird heruntergeladen" | "File is downloading..." | "El archivo se está descargando" | "Le fichier est en cours de téléchargement" | "O arquivo está sendo baixado" | "Il file è in fase di download";
165
166
  static get File_Size(): "Dateigröße" | "File size" | "Tamaño del archivo" | "Taille du fichier" | "Tamanho do arquivo" | "Dimensione del file";
166
167
  static get FromTime(): "wurde" | "from" | "par" | "dal";
168
+ static get General(): "Allgemein" | "General" | "Général" | "Geral" | "Generale";
167
169
  static get GetFileDeletionErrorMessage(): "Fehler beim Löschen der Datei" | "Error deleting the file" | "Error al eliminar el archivo" | "Erreur lors de la suppression du fichier" | "Erro ao excluir o arquivo" | "Errore nell'eliminazione del file";
168
170
  static get GetFileUploadErrorMessage(): "Fehler beim Hochladen" | "Error during upload" | "Error al subir el archivo" | "Erreur lors du téléchargement" | "Erro ao carregar o arquivo" | "Errore nel caricamento";
169
171
  static get GetFolderDeletionErrorMessage(): "Fehler beim Löschen des Ordners" | "Error deleting the folder" | "Error al eliminar la carpeta" | "Erreur lors de la suppression du dossier" | "Erro ao excluir a pasta" | "Errore nell'eliminazione della cartella";
@@ -283,6 +285,7 @@ export declare class SDKUI_Localizator {
283
285
  static get Perms(): "Berechtigungen" | "Permissions" | "Permisos" | "Autorisations" | "Permissão" | "Permessi";
284
286
  static get PhysDelete(): "Physische Stornierung" | "Physical delete" | "Cancelación física" | "Supression" | "Cancelamento física" | "Cancellazione fisica";
285
287
  static get Practice(): "Praxis" | "Practice" | "Práctica" | "Pratique" | "Prática" | "Pratica";
288
+ static get PreviewDocument(): "Vorschau-Dokument" | "Preview document" | "Documento de vista previa" | "Document d'aperçu" | "Documento de pré-visualização" | "Anteprima documento";
286
289
  static get PreviewView(): string;
287
290
  static get Previous(): "Vorherige" | "Previous" | "Anterior" | "Précédent" | "Precedente";
288
291
  static get ProcessedItems(): "Durchdachte Elemente" | "Processed items" | "Elementos elaborados" | "Items traités" | "Itens processados" | "Elementi elaborati";
@@ -118,6 +118,16 @@ export class SDKUI_Localizator {
118
118
  default: return "Aggiungi alla Home Page";
119
119
  }
120
120
  }
121
+ static get Advanced() {
122
+ switch (this._cultureID) {
123
+ case CultureIDs.De_DE: return "Erweitert";
124
+ case CultureIDs.En_US: return "Advanced";
125
+ case CultureIDs.Es_ES: return "Avanzado";
126
+ case CultureIDs.Fr_FR: return "Avancé";
127
+ case CultureIDs.Pt_PT: return "Avançado";
128
+ default: return "Avanzate";
129
+ }
130
+ }
121
131
  static get All() {
122
132
  switch (this._cultureID) {
123
133
  case CultureIDs.De_DE: return "Alle";
@@ -1600,6 +1610,16 @@ export class SDKUI_Localizator {
1600
1610
  default: return "dal";
1601
1611
  }
1602
1612
  }
1613
+ static get General() {
1614
+ switch (this._cultureID) {
1615
+ case CultureIDs.De_DE: return "Allgemein";
1616
+ case CultureIDs.En_US: return "General";
1617
+ case CultureIDs.Es_ES: return "General";
1618
+ case CultureIDs.Fr_FR: return "Général";
1619
+ case CultureIDs.Pt_PT: return "Geral";
1620
+ default: return "Generale";
1621
+ }
1622
+ }
1603
1623
  static get GetFileDeletionErrorMessage() {
1604
1624
  switch (this._cultureID) {
1605
1625
  case CultureIDs.De_DE: return "Fehler beim Löschen der Datei";
@@ -2781,6 +2801,16 @@ export class SDKUI_Localizator {
2781
2801
  default: return "Pratica";
2782
2802
  }
2783
2803
  }
2804
+ static get PreviewDocument() {
2805
+ switch (this._cultureID) {
2806
+ case CultureIDs.De_DE: return "Vorschau-Dokument";
2807
+ case CultureIDs.En_US: return "Preview document";
2808
+ case CultureIDs.Es_ES: return "Documento de vista previa";
2809
+ case CultureIDs.Fr_FR: return "Document d'aperçu";
2810
+ case CultureIDs.Pt_PT: return "Documento de pré-visualização";
2811
+ default: return "Anteprima documento";
2812
+ }
2813
+ }
2784
2814
  static get PreviewView() {
2785
2815
  switch (this._cultureID) {
2786
2816
  case CultureIDs.De_DE: return "Vorschauansicht";
package/lib/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export * from './hooks/useForm';
6
6
  export * from './hooks/useOutsideClick';
7
7
  export * from './hooks/useQueryParametersDialog';
8
8
  export * from './hooks/useDcmtOperations';
9
+ export * from './hooks/useResizeObserver';
9
10
  export * from './services';
package/lib/index.js CHANGED
@@ -6,6 +6,7 @@ export * from './hooks/useForm';
6
6
  export * from './hooks/useOutsideClick';
7
7
  export * from './hooks/useQueryParametersDialog';
8
8
  export * from './hooks/useDcmtOperations';
9
+ export * from './hooks/useResizeObserver';
9
10
  export * from './services';
10
11
  import config from 'devextreme/core/config';
11
12
  // DevExtreme License Key (valid for v24.2 and earlier versions)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.12.114",
3
+ "version": "6.12.116",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -42,7 +42,7 @@
42
42
  "lib"
43
43
  ],
44
44
  "dependencies": {
45
- "@topconsultnpm/sdk-ts-beta": "6.12.12",
45
+ "@topconsultnpm/sdk-ts-beta": "6.12.13",
46
46
  "buffer": "^6.0.3",
47
47
  "devextreme": "24.2.6",
48
48
  "devextreme-react": "24.2.6",
File without changes