@topconsultnpm/sdkui-react-beta 6.12.42 → 6.12.44
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/features/archive/TMArchive.d.ts +6 -0
- package/lib/components/features/archive/TMArchive.js +57 -0
- package/lib/components/{query → features/documents}/TMBatchUpdateForm.d.ts +1 -1
- package/lib/components/{query → features/documents}/TMBatchUpdateForm.js +18 -18
- package/lib/components/{query → features/documents}/TMDcmtBlog.js +4 -4
- package/lib/components/{query → features/documents}/TMDcmtForm.d.ts +2 -2
- package/lib/components/{query → features/documents}/TMDcmtForm.js +22 -22
- package/lib/components/{query → features/documents}/TMDcmtIcon.js +2 -2
- package/lib/components/{query → features/documents}/TMDcmtPreview.d.ts +1 -1
- package/lib/components/{query → features/documents}/TMDcmtPreview.js +14 -14
- package/lib/components/{query → features/documents}/TMFileUploader.d.ts +1 -1
- package/lib/components/{query → features/documents}/TMFileUploader.js +10 -10
- package/lib/components/{query → features/documents}/TMMasterDetailDcmts.d.ts +3 -7
- package/lib/components/{query → features/documents}/TMMasterDetailDcmts.js +20 -20
- package/lib/components/features/search/TMSavedQueryForm.d.ts +9 -0
- package/lib/components/features/search/TMSavedQueryForm.js +41 -0
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +16 -0
- package/lib/components/features/search/TMSavedQuerySelector.js +143 -0
- package/lib/components/features/search/TMSearch.d.ts +10 -0
- package/lib/components/features/search/TMSearch.js +188 -0
- package/lib/components/features/search/TMSearchQueryEditor.d.ts +15 -0
- package/lib/components/features/search/TMSearchQueryEditor.js +365 -0
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +20 -0
- package/lib/components/features/search/TMSearchQueryPanel.js +296 -0
- package/lib/components/{search → features/search}/TMSearchResult.d.ts +2 -6
- package/lib/components/{search → features/search}/TMSearchResult.js +31 -31
- package/lib/components/{search → features/search}/TMSearchResultsMenuItems.d.ts +2 -2
- package/lib/components/{search → features/search}/TMSearchResultsMenuItems.js +5 -5
- package/lib/components/features/search/TMTreeSelector.d.ts +9 -0
- package/lib/components/features/search/TMTreeSelector.js +125 -0
- package/lib/components/{query → features/workflow}/TMWorkflowPopup.d.ts +1 -1
- package/lib/components/{query → features/workflow}/TMWorkflowPopup.js +8 -8
- package/lib/components/grids/TMBlogsUtils.d.ts +2 -1
- package/lib/components/grids/TMRecentsManager.d.ts +11 -0
- package/lib/components/grids/TMRecentsManager.js +45 -0
- package/lib/components/index.d.ts +5 -2
- package/lib/components/index.js +8 -2
- package/lib/components/query/TMQueryEditor.js +5 -8
- package/lib/helper/Enum_Localizator.d.ts +2 -1
- package/lib/helper/Enum_Localizator.js +9 -1
- package/lib/helper/SDKUI_Localizator.d.ts +9 -0
- package/lib/helper/SDKUI_Localizator.js +90 -0
- package/lib/ts/types.d.ts +11 -0
- package/package.json +2 -2
- package/lib/components/query/TMQueryResult.d.ts +0 -10
- package/lib/components/query/TMQueryResult.js +0 -42
- package/lib/components/query/TMQueryResultForm.d.ts +0 -17
- package/lib/components/query/TMQueryResultForm.js +0 -318
- /package/lib/components/{query → features/documents}/TMDcmtBlog.d.ts +0 -0
- /package/lib/components/{query → features/documents}/TMDcmtIcon.d.ts +0 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { DeviceType } from '../base/TMDeviceProvider';
|
3
|
+
interface ITMRecentsProps {
|
4
|
+
mruTIDs: number[];
|
5
|
+
currentMruTID?: number;
|
6
|
+
deviceType?: DeviceType;
|
7
|
+
onSelectedTID?: (tid: number) => void;
|
8
|
+
onDeletedTID?: (tid: number) => void;
|
9
|
+
}
|
10
|
+
declare const TMRecentsManager: React.FunctionComponent<ITMRecentsProps>;
|
11
|
+
export default TMRecentsManager;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
import styled from 'styled-components';
|
3
|
+
import { useState } from 'react';
|
4
|
+
import ReactDOMServer from 'react-dom/server';
|
5
|
+
import { DcmtTypeListCacheService } from '@topconsultnpm/sdk-ts-beta';
|
6
|
+
import ContextMenu from 'devextreme-react/cjs/context-menu';
|
7
|
+
import { IconDelete, IconFolderSearch, SDKUI_Localizator, IconApply } from '../../helper';
|
8
|
+
import { TMColors } from '../../utils/theme';
|
9
|
+
import { StyledBadge } from '../base/Styled';
|
10
|
+
import { DeviceType } from '../base/TMDeviceProvider';
|
11
|
+
import { TMDcmtTypeChooserForm } from '../choosers/TMDcmtTypeChooser';
|
12
|
+
import TMTidViewer from '../viewers/TMTidViewer';
|
13
|
+
const StyledRecentCardItem = styled.div `
|
14
|
+
display: flex;
|
15
|
+
flex-direction: row;
|
16
|
+
background: ${(props) => props.$backgroundColor ?? undefined};
|
17
|
+
border-radius: 8px;
|
18
|
+
border: ${(props) => props.$showBorder ? '1px solid lightgray' : undefined};
|
19
|
+
width: 100%;
|
20
|
+
height: 40px;
|
21
|
+
padding: 3px;
|
22
|
+
position: relative;
|
23
|
+
white-space: nowrap;
|
24
|
+
text-overflow: ellipsis;
|
25
|
+
|
26
|
+
&:hover {
|
27
|
+
background: ${(props) => props.$hoverColor ?? undefined};
|
28
|
+
cursor: pointer;
|
29
|
+
}
|
30
|
+
`;
|
31
|
+
const iconDelete = () => ReactDOMServer.renderToString(_jsx(IconDelete, {}));
|
32
|
+
const TMRecentsManager = ({ deviceType, mruTIDs, currentMruTID, onSelectedTID, onDeletedTID }) => {
|
33
|
+
const [showDcmtTypeChooser, setShowDcmtTypeChooser] = useState(false);
|
34
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { style: { overflowY: deviceType === DeviceType.MOBILE ? 'auto' : undefined, display: 'flex', flexDirection: 'column-reverse', padding: '5px', gap: '5px' }, children: [_jsxs(StyledRecentCardItem, { "$backgroundColor": 'white', "$hoverColor": 'rgba(217, 37, 136, 0.3)', "$showBorder": true, onClick: () => { setShowDcmtTypeChooser(true); }, children: [_jsx("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsx(IconFolderSearch, { fontSize: 24, color: 'rgb(217, 37, 136)' }) }), _jsx("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start', width: '100%' }, children: _jsx("p", { style: { fontSize: '1rem', fontWeight: 600, textOverflow: 'ellipsis' }, children: SDKUI_Localizator.AllDcmtTypes }) }), _jsx(StyledBadge, { style: { height: 'max-content' }, "$backgroundColor": TMColors.info, children: _jsx("p", { children: DcmtTypeListCacheService.CacheCount(true) }) })] }), mruTIDs.map((tid) => {
|
35
|
+
return (_jsxs(StyledRecentCardItem, { id: `tid-${tid}`, "$backgroundColor": `${TMColors.primaryColor}33`, "$hoverColor": `${TMColors.primaryColor}66`, onClick: async () => {
|
36
|
+
onSelectedTID?.(tid);
|
37
|
+
}, children: [_jsx("div", { style: {
|
38
|
+
display: 'flex', alignItems: 'center', paddingRight: '5px', fontSize: '1rem', fontWeight: 600, whiteSpace: 'nowrap',
|
39
|
+
overflow: 'hidden',
|
40
|
+
textOverflow: 'ellipsis'
|
41
|
+
}, children: _jsx(TMTidViewer, { tid: tid, showIcon: true }) }), _jsx(ContextMenu, { dataSource: [{ text: SDKUI_Localizator.Remove, icon: iconDelete(), }], target: `#tid-${tid}`, onItemClick: () => { onDeletedTID?.(tid); } }), currentMruTID == tid &&
|
42
|
+
_jsx("div", { style: { width: '24px', height: '24px', borderRadius: '24px', backgroundColor: 'rgba(243, 152, 119, .8)', boxShadow: '1px 2px 2px #00000050', position: 'absolute', top: '-4px', right: '-5px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '1rem', fontWeight: 'bold' }, children: _jsx(IconApply, { fontSize: 24, color: 'green' }) })] }, tid));
|
43
|
+
})] }), showDcmtTypeChooser && _jsx(TMDcmtTypeChooserForm, { onClose: () => setShowDcmtTypeChooser(false), onChoose: (tids) => { onSelectedTID?.(tids?.[0] ?? 0); } })] }));
|
44
|
+
};
|
45
|
+
export default TMRecentsManager;
|
@@ -42,10 +42,13 @@ export * from './choosers/TMMetadataChooser';
|
|
42
42
|
export * from './choosers/TMUserChooser';
|
43
43
|
export { default as TMValidationItemsList } from './grids/TMValidationItemsList';
|
44
44
|
export { default as TMBlogs } from './grids/TMBlogs';
|
45
|
-
export * from './query/TMDcmtIcon';
|
46
45
|
export * from './query/TMQueryEditor';
|
47
|
-
export * from './query/TMQueryResultForm';
|
48
46
|
export * from './query/TMQuerySummary';
|
47
|
+
export * from './features/documents/TMDcmtForm';
|
48
|
+
export * from './features/documents/TMDcmtIcon';
|
49
|
+
export * from './features/archive/TMArchive';
|
50
|
+
export * from './features/search/TMSearch';
|
51
|
+
export * from './features/search/TMSearchResult';
|
49
52
|
export * from './base/TMTab';
|
50
53
|
export { default as TMHeader } from "./sidebar/TMHeader";
|
51
54
|
export { default as TMSidebar } from "./sidebar/TMSidebar";
|
package/lib/components/index.js
CHANGED
@@ -47,10 +47,16 @@ export * from './choosers/TMUserChooser';
|
|
47
47
|
export { default as TMValidationItemsList } from './grids/TMValidationItemsList';
|
48
48
|
export { default as TMBlogs } from './grids/TMBlogs';
|
49
49
|
//query
|
50
|
-
export * from './query/TMDcmtIcon';
|
51
50
|
export * from './query/TMQueryEditor';
|
52
|
-
export * from './query/TMQueryResultForm';
|
53
51
|
export * from './query/TMQuerySummary';
|
52
|
+
//documents
|
53
|
+
export * from './features/documents/TMDcmtForm';
|
54
|
+
export * from './features/documents/TMDcmtIcon';
|
55
|
+
//archive
|
56
|
+
export * from './features/archive/TMArchive';
|
57
|
+
//search
|
58
|
+
export * from './features/search/TMSearch';
|
59
|
+
export * from './features/search/TMSearchResult';
|
54
60
|
//tab
|
55
61
|
export * from './base/TMTab';
|
56
62
|
// others
|
@@ -26,12 +26,12 @@ import { getDisplayAlias } from '../viewers/TMMidViewer';
|
|
26
26
|
import { useApplyForm } from '../../hooks/useForm';
|
27
27
|
import ShowAlert from '../base/TMAlert';
|
28
28
|
import { TMDynDataListItemChooserForm } from '../choosers/TMDynDataListItemChooser';
|
29
|
-
import TMQueryResultForm from './TMQueryResultForm';
|
30
29
|
import TMMetadataEditor from '../editors/TMMetadataEditor';
|
31
30
|
import { ContextMenu } from 'devextreme-react';
|
32
31
|
import { useQueryParametersDialog } from '../../hooks/useQueryParametersDialog';
|
32
|
+
import TMSearchResult from '../features/search/TMSearchResult';
|
33
33
|
export const StyledRowItem = styled.div ` display: flex; flex-direction: row; align-items: center; justify-content: flex-start; margin-bottom: 5px; gap: 3px; `;
|
34
|
-
export const StyledItemWrapper = styled.div ` border-radius: ${props => props.$borderRadius
|
34
|
+
export const StyledItemWrapper = styled.div ` border-radius: ${props => props.$borderRadius ?? '4px'}; padding: 4px; font-size: 1rem; user-select: none; width: max-content; `;
|
35
35
|
export const StyledAccordionItemContainer = styled.div ` width: 100%; padding: 2px; display: flex; flex-direction: column; overflow-x: auto; align-items: flex-start; margin-left: 5px; gap: 3px; max-height: 300px; `;
|
36
36
|
export const StyledAccordionItemContent = styled.div ` width: 100%; pointer-events: ${props => props.$disabled ? 'none' : ''}; `;
|
37
37
|
export const colorValue = 'rgba(224,224,224,.5)';
|
@@ -67,8 +67,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isModal, showDistinct
|
|
67
67
|
const { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData } = useQueryApplyForm(Descriptors.Query, formMode, inputData, onApplied);
|
68
68
|
const [dcmtTypesList, setDcmtTypesList] = useState([]);
|
69
69
|
const [lastQdParams, setLastQdParams] = useState([]);
|
70
|
-
const [resultSearch, setResultSearch] = useState();
|
71
|
-
const [elapsedTime, setElapsedTime] = useState(0);
|
70
|
+
const [resultSearch, setResultSearch] = useState([]);
|
72
71
|
const [draggingItem, setDraggingItem] = useState();
|
73
72
|
const [showId, setShowId] = useState(false);
|
74
73
|
const [showCompleteMetadataName, setShowCompleteMetadataName] = useState(false);
|
@@ -570,10 +569,9 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isModal, showDistinct
|
|
570
569
|
};
|
571
570
|
// #endregion
|
572
571
|
// #region Ricerca
|
573
|
-
const renderResultSearchForm = _jsx(
|
572
|
+
const renderResultSearchForm = _jsx(TMSearchResult, { context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, onClose: () => { setShowResultSearch(false); }, searchResults: resultSearch });
|
574
573
|
const onSearchAsync = async (qdInput) => {
|
575
574
|
try {
|
576
|
-
const startTime = new Date().getTime();
|
577
575
|
let qdSearch = await prepareQdForSearchAsync(qdInput);
|
578
576
|
if (IsParametricQuery(qdSearch)) {
|
579
577
|
const qdParams = await confirmQueryParams(qdSearch, lastQdParams);
|
@@ -597,8 +595,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isModal, showDistinct
|
|
597
595
|
if (dcmtsFound <= 0)
|
598
596
|
ShowAlert({ message: SDKUI_Localizator.NoDcmtFound, mode: 'info', title: SDKUI_Localizator.SearchResult, duration: 3000 });
|
599
597
|
else {
|
600
|
-
|
601
|
-
setResultSearch(result);
|
598
|
+
result && setResultSearch([result]);
|
602
599
|
setShowResultSearch(true);
|
603
600
|
}
|
604
601
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ArchiveConstraints, JobTypes, JoinTypes, MetadataFormats, OwnershipLevels, ParametricFilterTypes, QueryFunctions, QueryOperators, UserLevels } from "@topconsultnpm/sdk-ts-beta";
|
1
|
+
import { ArchiveConstraints, JobTypes, JoinTypes, MetadataFormats, OwnershipLevels, ParametricFilterTypes, QueryFunctions, QueryOperators, SharingModes, UserLevels } from "@topconsultnpm/sdk-ts-beta";
|
2
2
|
import { DcmtOperationTypes, FormModes } from "../ts";
|
3
3
|
export declare function LocalizeArchiveConstraints(value: ArchiveConstraints | undefined): "Archivierung nur mit Dateien erlauben" | "Allow file only archiving" | "Permitir solo almacenamientos con archivo" | "Autorise uniquement l'archivage de fichiers" | "Permitir somente depósitos com arquivos" | "Consenti solo archiviazioni con file" | "Alles zulassen" | "Allow everything" | "Permitir todo" | "Autorise tout" | "Permitir que todos" | "Consenti tutto" | "Nur Methadatenarchivierung erlauben" | "Allow metadata only archiving" | "Permitir solo almacenamiento de metadatos" | "Autorise uniquement l'archivage de métadonnées" | "Permitir somente os metadados de arquivamento" | "Consenti solo archiviazioni di metadati";
|
4
4
|
export declare function LocalizeDcmtOperationTypes(value: DcmtOperationTypes | undefined): string;
|
@@ -10,4 +10,5 @@ export declare function LocalizeParametricFilterTypes(value: ParametricFilterTyp
|
|
10
10
|
export declare function LocalizeQueryFunctions(value: QueryFunctions | undefined): "Zählen" | "Count" | "Contar" | "Compte" | "Contagem" | "Conta" | "" | "None" | "Niemand" | "Ninguno" | "Aucun" | "Nenhum" | "Nessuno" | "Max" | "Höchstwert" | "Máximo" | "Massimo" | "Min" | "Mindestwert" | "Mínimo" | "Minimo" | "Sum" | "Summe" | "Suma" | "Somme" | "Soma" | "Somma";
|
11
11
|
export declare function LocalizeQueryJoinTypes(value: JoinTypes | undefined): string;
|
12
12
|
export declare function LocalizeQueryOperators(value: QueryOperators | undefined): string;
|
13
|
+
export declare function LocalizeSharingModes(value: SharingModes | undefined): string;
|
13
14
|
export declare function LocalizeUserLevels(value: UserLevels | undefined): string | undefined;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ArchiveConstraints, CultureIDs, JobTypes, JoinTypes, MetadataFormats, OwnershipLevels, ParametricFilterTypes, QueryFunctions, QueryOperators, SDK_Globals, SDK_Localizator, UserLevels } from "@topconsultnpm/sdk-ts-beta";
|
1
|
+
import { ArchiveConstraints, CultureIDs, JobTypes, JoinTypes, MetadataFormats, OwnershipLevels, ParametricFilterTypes, QueryFunctions, QueryOperators, SDK_Globals, SDK_Localizator, SharingModes, UserLevels } from "@topconsultnpm/sdk-ts-beta";
|
2
2
|
import { SDKUI_Localizator } from "./SDKUI_Localizator";
|
3
3
|
import { DcmtOperationTypes, FormModes } from "../ts";
|
4
4
|
export function LocalizeArchiveConstraints(value) {
|
@@ -181,6 +181,14 @@ export function LocalizeQueryOperators(value) {
|
|
181
181
|
default: return '';
|
182
182
|
}
|
183
183
|
}
|
184
|
+
export function LocalizeSharingModes(value) {
|
185
|
+
switch (value) {
|
186
|
+
case SharingModes.Private: return SDKUI_Localizator.SharingModes_Private;
|
187
|
+
case SharingModes.Public: return SDKUI_Localizator.SharingModes_Public;
|
188
|
+
case SharingModes.Shared: return SDKUI_Localizator.SharingModes_Shared;
|
189
|
+
default: return value;
|
190
|
+
}
|
191
|
+
}
|
184
192
|
export function LocalizeUserLevels(value) {
|
185
193
|
switch (value) {
|
186
194
|
case UserLevels.Administrator: return SDKUI_Localizator.UserLevelAdmin;
|
@@ -16,7 +16,9 @@ export declare class SDKUI_Localizator {
|
|
16
16
|
static get AddAlls(): "Alle hinzufügen" | "Add all" | "Añadir todos" | "Ajoute toutes" | "Adicionar todos" | "Aggiungi tutti";
|
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
|
+
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";
|
19
20
|
static get All(): "Alle" | "All" | "Todos" | "Tous" | "Tutti";
|
21
|
+
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";
|
20
22
|
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";
|
21
23
|
static get AllItems(): "alle Artikel" | "All items" | "Todos los artículos" | "tous les articles" | "todos os artigos" | "tutti gli elementi";
|
22
24
|
static get Alls2(): "Alle" | "All" | "Todos" | "Tous" | "Tutte";
|
@@ -329,9 +331,14 @@ export declare class SDKUI_Localizator {
|
|
329
331
|
static get SelectedItems(): "Ausgewählte Artikel" | "Selected items" | "Artículos seleccionados" | "Articles sélectionnés" | "Itens selecionados" | "Elementi selezionati";
|
330
332
|
static get SendLinkByMail(): "Link per E-Mail senden" | "Send link via mail" | "Enviar enlace por correo electrónico" | "Envoyer le lien par email" | "Enviar link por e-mail" | "Invia link tramite mail";
|
331
333
|
static get SendToSupport(): "An den Support senden" | "Send to support" | "Enviar a soporte" | "Envoyer au support" | "Enviar para suporte" | "Invia a supporto";
|
334
|
+
static get SetAsDefault(): "Als Standardbaum festlegen" | "Set as default" | "Establecer como predeterminado" | "Définir par défaut" | "Definir como padrão" | "Imposta come predefinito";
|
335
|
+
static get SetAsDefault2(): "Standard setzen" | "Set default" | "Configurar predeterminado" | "Place le défaut" | "Definir padrão" | "Imposta default";
|
332
336
|
static get SetAsFavorite(): "Als Favorit festlegen" | "Set as favorite" | "Establecer como favorito" | "Définir comme favori" | "Definir como favorito" | "Imposta come preferito";
|
333
337
|
static get SetNamedCredentialsAsPreferred(): "Möchten Sie die Anmeldedaten '{{0}}' als bevorzugt festlegen?" | "Do you want to set the '{{0}}' credentials as preferred?" | "¿Quieres configurar las credenciales '{{0}}' como preferidas?" | "Voulez-vous définir les identifiants '{{0}}' comme préférés ?" | "Deseja definir as credenciais '{{0}}' como preferidas?" | "Vuoi impostare le credenziali '{{0}}' come preferite?";
|
334
338
|
static get Settings(): "Einstellungen" | "Settings" | "Ajustes" | "Réglages" | "Definições" | "Impostazioni";
|
339
|
+
static get SharingModes_Private(): "Privat" | "Private" | "Privada" | "Privé" | "Privado" | "Privata";
|
340
|
+
static get SharingModes_Public(): "Öffentlich" | "Public" | "Pública" | "Público" | "Pubblica";
|
341
|
+
static get SharingModes_Shared(): "Geteilt" | "Shared" | "Compartida" | "Partagé" | "Partilhada" | "Condivisa";
|
335
342
|
static get Show_CompleteName(): "Vollständigen Namen anzeigen" | "View full name" | "Mostrar nombre completo" | "Afficher le nom complet" | "Mostrar nome completo" | "Visualizza nome completo";
|
336
343
|
static get ShowDetails(): "Details anzeigen" | "Show details" | "Mostrar detalles" | "Afficher les détails" | "Mostrar detalhes" | "Mostra dettagli";
|
337
344
|
static get ShowFilters(): string;
|
@@ -354,6 +361,8 @@ export declare class SDKUI_Localizator {
|
|
354
361
|
static get Type(): "Typ" | "Type" | "Tipo";
|
355
362
|
static get TypeAMessage(): "Geben Sie eine Nachricht ein" | "Type a message" | "Escribe un mensaje" | "Tapez un message" | "Digite uma mensagem" | "Digita un messaggio";
|
356
363
|
static get Tracing(): "Trassierung" | "Tracing" | "Trazado" | "Marquage" | "Marcação" | "Tracciatura";
|
364
|
+
static get TreesNoAvailable(): "Keine Bäume vorhanden" | "No trees available" | "No hay árboles disponibles" | "Aucun arbre disponible" | "Não há árvores disponíveis" | "Nessun albero disponibile";
|
365
|
+
static get TreeRemoveDefault(): "Standardbaum entfernen" | "Remove default tree" | "Eliminar árbol predeterminado" | "Supprimer l'arbre par défaut" | "Remover árvore padrão" | "Rimuovi albero predefinito";
|
357
366
|
static get UBLViewFormats_ER_HTML(): "ER Style Sheet (HTML)" | "Hoja de estilo ER (HTML)" | "Feuille de style ER (HTML)" | "Folha de estilo ER (HTML)" | "Foglio di stile ER (HTML)";
|
358
367
|
static get UBLViewFormats_ER_PDF(): "ER Style Sheet (PDF)" | "Hoja de estilo ER (PDF)" | "Feuille de style ER (PDF)" | "Folha de estilo ER (PDF)" | "Foglio di stile ER (PDF)";
|
359
368
|
static get UBLViewFormats_NSO_HTML(): "NSO Style Sheet (HTML)" | "Hoja de estilo NSO (HTML)" | "Feuille de style NSO (HTML)" | "Folha de estilo NSO (HTML)" | "Foglio di stile NSO (HTML)";
|
@@ -108,6 +108,16 @@ export class SDKUI_Localizator {
|
|
108
108
|
default: return "Aggiungi/sostituisci file";
|
109
109
|
}
|
110
110
|
}
|
111
|
+
static get AddToHomePage() {
|
112
|
+
switch (this._cultureID) {
|
113
|
+
case CultureIDs.De_DE: return "Zur Startseite hinzufügen";
|
114
|
+
case CultureIDs.En_US: return "Add to Home Page";
|
115
|
+
case CultureIDs.Es_ES: return "Añadir a la página inicial";
|
116
|
+
case CultureIDs.Fr_FR: return "Ajoute à Home Page";
|
117
|
+
case CultureIDs.Pt_PT: return "Adicionar a Home Page";
|
118
|
+
default: return "Aggiungi alla Home Page";
|
119
|
+
}
|
120
|
+
}
|
111
121
|
static get All() {
|
112
122
|
switch (this._cultureID) {
|
113
123
|
case CultureIDs.De_DE: return "Alle";
|
@@ -118,6 +128,16 @@ export class SDKUI_Localizator {
|
|
118
128
|
default: return "Tutti";
|
119
129
|
}
|
120
130
|
}
|
131
|
+
static get AllDcmtTypes() {
|
132
|
+
switch (this._cultureID) {
|
133
|
+
case CultureIDs.De_DE: return "Alle Dokumenttypen";
|
134
|
+
case CultureIDs.En_US: return "All document types";
|
135
|
+
case CultureIDs.Es_ES: return "Todos los tipos documento";
|
136
|
+
case CultureIDs.Fr_FR: return "Tous les types de documents";
|
137
|
+
case CultureIDs.Pt_PT: return "Todos os tipos de documentos";
|
138
|
+
default: return "Tutti i tipi documento";
|
139
|
+
}
|
140
|
+
}
|
121
141
|
static get AllFilesAndFoldersInSupportArea() {
|
122
142
|
switch (this._cultureID) {
|
123
143
|
case CultureIDs.De_DE: return "Alle Dateien und Ordner im Support-Bereich";
|
@@ -3248,6 +3268,26 @@ export class SDKUI_Localizator {
|
|
3248
3268
|
default: return "Invia a supporto";
|
3249
3269
|
}
|
3250
3270
|
}
|
3271
|
+
static get SetAsDefault() {
|
3272
|
+
switch (this._cultureID) {
|
3273
|
+
case CultureIDs.De_DE: return "Als Standardbaum festlegen";
|
3274
|
+
case CultureIDs.En_US: return "Set as default";
|
3275
|
+
case CultureIDs.Es_ES: return "Establecer como predeterminado";
|
3276
|
+
case CultureIDs.Fr_FR: return "Définir par défaut";
|
3277
|
+
case CultureIDs.Pt_PT: return "Definir como padrão";
|
3278
|
+
default: return "Imposta come predefinito";
|
3279
|
+
}
|
3280
|
+
}
|
3281
|
+
static get SetAsDefault2() {
|
3282
|
+
switch (this._cultureID) {
|
3283
|
+
case CultureIDs.De_DE: return "Standard setzen";
|
3284
|
+
case CultureIDs.En_US: return "Set default";
|
3285
|
+
case CultureIDs.Es_ES: return "Configurar predeterminado";
|
3286
|
+
case CultureIDs.Fr_FR: return "Place le défaut";
|
3287
|
+
case CultureIDs.Pt_PT: return "Definir padrão";
|
3288
|
+
default: return "Imposta default";
|
3289
|
+
}
|
3290
|
+
}
|
3251
3291
|
static get SetAsFavorite() {
|
3252
3292
|
switch (this._cultureID) {
|
3253
3293
|
case CultureIDs.De_DE: return "Als Favorit festlegen";
|
@@ -3278,6 +3318,36 @@ export class SDKUI_Localizator {
|
|
3278
3318
|
default: return "Impostazioni";
|
3279
3319
|
}
|
3280
3320
|
}
|
3321
|
+
static get SharingModes_Private() {
|
3322
|
+
switch (this._cultureID) {
|
3323
|
+
case CultureIDs.De_DE: return "Privat";
|
3324
|
+
case CultureIDs.En_US: return "Private";
|
3325
|
+
case CultureIDs.Es_ES: return "Privada";
|
3326
|
+
case CultureIDs.Fr_FR: return "Privé";
|
3327
|
+
case CultureIDs.Pt_PT: return "Privado";
|
3328
|
+
default: return "Privata";
|
3329
|
+
}
|
3330
|
+
}
|
3331
|
+
static get SharingModes_Public() {
|
3332
|
+
switch (this._cultureID) {
|
3333
|
+
case CultureIDs.De_DE: return "Öffentlich";
|
3334
|
+
case CultureIDs.En_US: return "Public";
|
3335
|
+
case CultureIDs.Es_ES: return "Pública";
|
3336
|
+
case CultureIDs.Fr_FR: return "Public";
|
3337
|
+
case CultureIDs.Pt_PT: return "Público";
|
3338
|
+
default: return "Pubblica";
|
3339
|
+
}
|
3340
|
+
}
|
3341
|
+
static get SharingModes_Shared() {
|
3342
|
+
switch (this._cultureID) {
|
3343
|
+
case CultureIDs.De_DE: return "Geteilt";
|
3344
|
+
case CultureIDs.En_US: return "Shared";
|
3345
|
+
case CultureIDs.Es_ES: return "Compartida";
|
3346
|
+
case CultureIDs.Fr_FR: return "Partagé";
|
3347
|
+
case CultureIDs.Pt_PT: return "Partilhada";
|
3348
|
+
default: return "Condivisa";
|
3349
|
+
}
|
3350
|
+
}
|
3281
3351
|
static get Show_CompleteName() {
|
3282
3352
|
switch (this._cultureID) {
|
3283
3353
|
case CultureIDs.De_DE: return "Vollständigen Namen anzeigen";
|
@@ -3498,6 +3568,26 @@ export class SDKUI_Localizator {
|
|
3498
3568
|
default: return "Tracciatura";
|
3499
3569
|
}
|
3500
3570
|
}
|
3571
|
+
static get TreesNoAvailable() {
|
3572
|
+
switch (this._cultureID) {
|
3573
|
+
case CultureIDs.De_DE: return "Keine Bäume vorhanden";
|
3574
|
+
case CultureIDs.En_US: return "No trees available";
|
3575
|
+
case CultureIDs.Es_ES: return "No hay árboles disponibles";
|
3576
|
+
case CultureIDs.Fr_FR: return "Aucun arbre disponible";
|
3577
|
+
case CultureIDs.Pt_PT: return "Não há árvores disponíveis";
|
3578
|
+
default: return "Nessun albero disponibile";
|
3579
|
+
}
|
3580
|
+
}
|
3581
|
+
static get TreeRemoveDefault() {
|
3582
|
+
switch (this._cultureID) {
|
3583
|
+
case CultureIDs.De_DE: return "Standardbaum entfernen";
|
3584
|
+
case CultureIDs.En_US: return "Remove default tree";
|
3585
|
+
case CultureIDs.Es_ES: return "Eliminar árbol predeterminado";
|
3586
|
+
case CultureIDs.Fr_FR: return "Supprimer l'arbre par défaut";
|
3587
|
+
case CultureIDs.Pt_PT: return "Remover árvore padrão";
|
3588
|
+
default: return "Rimuovi albero predefinito";
|
3589
|
+
}
|
3590
|
+
}
|
3501
3591
|
static get UBLViewFormats_ER_HTML() {
|
3502
3592
|
switch (this._cultureID) {
|
3503
3593
|
case CultureIDs.De_DE: return "ER Style Sheet (HTML)";
|
package/lib/ts/types.d.ts
CHANGED
@@ -66,6 +66,17 @@ export declare class MetadataValueDescriptorEx extends MetadataValueDescriptor {
|
|
66
66
|
isSelected?: boolean;
|
67
67
|
isNull?: boolean;
|
68
68
|
}
|
69
|
+
export type TaskContext = {
|
70
|
+
workingGroup?: {
|
71
|
+
id: number;
|
72
|
+
name: string;
|
73
|
+
};
|
74
|
+
document?: {
|
75
|
+
tid: number;
|
76
|
+
did: number;
|
77
|
+
name: string;
|
78
|
+
};
|
79
|
+
};
|
69
80
|
export interface ITMSaveFormProps<T> extends ITMSaveFormBaseProps {
|
70
81
|
/** Notifica al parent il nuovo descrittore appena salvato */
|
71
82
|
onSaved?: (newDescriptor: T) => void;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
3
|
-
"version": "6.12.
|
3
|
+
"version": "6.12.44",
|
4
4
|
"description": "",
|
5
5
|
"scripts": {
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"lib"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@topconsultnpm/sdk-ts-beta": "^6.12.
|
44
|
+
"@topconsultnpm/sdk-ts-beta": "^6.12.0",
|
45
45
|
"buffer": "^6.0.3",
|
46
46
|
"devextreme": "24.2.6",
|
47
47
|
"devextreme-react": "24.2.6",
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
2
|
-
declare const TMQueryResult: ({ result, elapsedTime, showHiddenSelectItems, searchText, onSelectionChanged, onDblClick }: {
|
3
|
-
onDblClick?: () => void;
|
4
|
-
onSelectionChanged?: (e: any[]) => void;
|
5
|
-
result: SearchResultDescriptor | undefined;
|
6
|
-
elapsedTime?: number;
|
7
|
-
showHiddenSelectItems?: boolean;
|
8
|
-
searchText?: string;
|
9
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
10
|
-
export default TMQueryResult;
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useEffect, useState } from 'react';
|
3
|
-
import { DataColumnTypes } from '@topconsultnpm/sdk-ts-beta';
|
4
|
-
import DataGrid, { Column, HeaderFilter, LoadPanel, Pager, Paging, Scrolling, SearchPanel, Selection } from 'devextreme-react/cjs/data-grid';
|
5
|
-
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
6
|
-
import { StyledDivHorizontal, StyledParagraph, cellRenderObjectIcon } from '../base/Styled';
|
7
|
-
import { Globalization, IconAll, IconApply, IconFileDots, IconProgressReady, IconSelected, IconVisible, SDKUI_Globals, getDataColumnName, searchResultDescriptorToSimpleArray } from '../../helper';
|
8
|
-
import { TMColors } from '../../utils/theme';
|
9
|
-
const TMQueryResult = ({ result, elapsedTime, showHiddenSelectItems, searchText, onSelectionChanged, onDblClick }) => {
|
10
|
-
const [dataSource, setDataSource] = useState();
|
11
|
-
const [selectedItems, setSelectedItems] = useState([]);
|
12
|
-
const [visibleItems, setVisibleItems] = useState([]);
|
13
|
-
let gridInstance;
|
14
|
-
useEffect(() => { gridInstance?.instance().searchByText(searchText ?? ''); }, [searchText]);
|
15
|
-
useEffect(() => { setDataSource(searchResultDescriptorToSimpleArray(result)); setSelectedItems([]); }, [result]);
|
16
|
-
function millisecondsToTime(milli) {
|
17
|
-
let milliseconds = milli % 1000;
|
18
|
-
let seconds = Math.floor((milli / 1000) % 60);
|
19
|
-
let minutes = Math.floor((milli / (60 * 1000)) % 60);
|
20
|
-
return minutes + "m " + seconds + "s " + milliseconds.toFixed(2) + "ms";
|
21
|
-
}
|
22
|
-
return (_jsxs(TMLayoutContainer, { gap: 0, children: [_jsx(TMLayoutItem, { height: 'calc(100% - 30px)', children: _jsxs(DataGrid, { ref: (grid) => (gridInstance = grid), keyExpr: "rowIndex", width: '100%', height: '100%', dataSource: dataSource, selectedRowKeys: selectedItems, allowColumnResizing: true, columnResizingMode: "widget", columnAutoWidth: true, allowColumnReordering: true, showBorders: true, showColumnLines: SDKUI_Globals.dataGridShowColumnLines, showRowLines: SDKUI_Globals.dataGridShowRowLines, onContentReady: (e) => { setVisibleItems(e.component.getVisibleRows().map((row) => { return row.data; })); }, onSelectionChanged: (e) => { setSelectedItems(e.selectedRowKeys); onSelectionChanged && onSelectionChanged(e.selectedRowsData); }, onToolbarPreparing: (e) => {
|
23
|
-
e.toolbarOptions.items.forEach((item) => {
|
24
|
-
if (item.name === "searchPanel") {
|
25
|
-
item.location = "before";
|
26
|
-
}
|
27
|
-
});
|
28
|
-
}, onRowDblClick: onDblClick, children: [_jsx(Selection, { mode: "multiple", showCheckBoxesMode: "onClick", selectAllMode: 'allPages' }), _jsx(SearchPanel, { visible: false }), _jsx(Scrolling, { mode: 'virtual', useNative: SDKUI_Globals.dataGridUseNativeScrollbar }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { pageSize: 25 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(LoadPanel, { enabled: true }), _jsx(Column, { dataType: "object", width: 40, visible: true, cellRender: () => cellRenderObjectIcon(_jsx(IconFileDots, { color: '#767676' })) }), result?.dtdResult?.columns?.map((col, index) => {
|
29
|
-
let keyField = getDataColumnName(result?.fromTID, col);
|
30
|
-
const isVisible = col.extendedProperties?.["Visibility"] != "Hidden";
|
31
|
-
const dataType = () => {
|
32
|
-
switch (col.dataType) {
|
33
|
-
case DataColumnTypes.DateTime: return "datetime";
|
34
|
-
case DataColumnTypes.Bool: return "boolean";
|
35
|
-
case DataColumnTypes.Number: return "number";
|
36
|
-
default: return "string";
|
37
|
-
}
|
38
|
-
};
|
39
|
-
return (_jsx(Column, { dataField: keyField, caption: col.caption, visible: isVisible || showHiddenSelectItems, dataType: dataType(), format: col.dataType === DataColumnTypes.DateTime ? Globalization.getDateDisplayFormat() : "" }, col.caption + index.toString()));
|
40
|
-
})] }) }), _jsx(TMLayoutItem, { height: 'max-content', children: _jsxs(StyledDivHorizontal, { style: { backgroundColor: TMColors.toolbar_background, height: '30px' }, children: [_jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconAll, { fontSize: 12 })] }), Globalization.getNumberDisplayValue(dataSource?.length ?? 0, true)] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconVisible, { fontSize: 12 })] }), Globalization.getNumberDisplayValue(visibleItems.length ?? 0, true)] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconSelected, { fontSize: 12 })] }), Globalization.getNumberDisplayValue(selectedItems.length ?? 0, true)] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconApply, { fontSize: 12 })] }), `${Globalization.getNumberDisplayValue(result?.dcmtsReturned ?? 0, true)}/${Globalization.getNumberDisplayValue(result?.dcmtsFound ?? 0, true)}`] }), _jsxs(StyledParagraph, { children: [_jsxs("span", { style: { marginRight: '5px', fontWeight: 'bold' }, children: [" ", _jsx(IconProgressReady, { fontSize: 12 })] }), millisecondsToTime(elapsedTime)] })] }) })] }));
|
41
|
-
};
|
42
|
-
export default TMQueryResult;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts-beta';
|
2
|
-
import { SearchResultContext } from '../../ts';
|
3
|
-
declare const TMQueryResultForm: ({ onUpdate, isModal, onClose, context, result1, result2, elapsedTime, searchText, tabIcon1, tabIcon2, tabTitle1, tabTitle2 }: {
|
4
|
-
tabTitle1?: string;
|
5
|
-
tabTitle2?: string;
|
6
|
-
tabIcon1?: any;
|
7
|
-
tabIcon2?: any;
|
8
|
-
isModal?: boolean;
|
9
|
-
onClose?: () => void;
|
10
|
-
context?: SearchResultContext;
|
11
|
-
result1?: SearchResultDescriptor | SearchResultDescriptor[];
|
12
|
-
result2?: SearchResultDescriptor | SearchResultDescriptor[];
|
13
|
-
elapsedTime?: number;
|
14
|
-
searchText?: string;
|
15
|
-
onUpdate?: () => Promise<void>;
|
16
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
17
|
-
export default TMQueryResultForm;
|