@topconsultnpm/sdkui-react 6.19.0-dev2.20 → 6.19.0-dev2.21
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 +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.js +2 -1
- package/lib/components/grids/TMBlogsPost.js +14 -3
- package/lib/helper/SDKUI_Localizator.d.ts +1 -1
- package/lib/helper/SDKUI_Localizator.js +10 -10
- package/lib/helper/helpers.js +2 -1
- package/package.json +1 -1
|
@@ -207,7 +207,7 @@ const TMFileManager = (props) => {
|
|
|
207
207
|
width: "100%",
|
|
208
208
|
height: "100%",
|
|
209
209
|
...(isMobile && { display: openDraftList ? 'block' : 'none', transition: "opacity 0.3s ease-in-out" }),
|
|
210
|
-
}, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [!showPanel && _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel, btnStyle: 'toolbar', color: 'primaryOutline', icon: isLeftPanelCollapsed ? _jsx(IconHide, {}) : _jsx(IconShow, {}), onClick: () => setIsLeftPanelCollapsed(prev => !prev) }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.
|
|
210
|
+
}, children: [_jsxs(Toolbar, { style: { backgroundColor: '#f4f4f4', height: "40px", paddingLeft: "5px", paddingRight: '5px' }, children: [!showPanel && _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: isLeftPanelCollapsed ? SDKUI_Localizator.ShowLeftPanel : SDKUI_Localizator.HideLeftPanel, btnStyle: 'toolbar', color: 'primaryOutline', icon: isLeftPanelCollapsed ? _jsx(IconHide, {}) : _jsx(IconShow, {}), onClick: () => setIsLeftPanelCollapsed(prev => !prev) }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMButton, { caption: viewMode === 'details' ? SDKUI_Localizator.CompactView : SDKUI_Localizator.DetailsView, btnStyle: 'toolbar', color: 'primaryOutline', icon: viewMode === 'details' ? _jsx(IconDashboard, {}) : _jsx(IconList, {}), onClick: toggleViewMode }) }), _jsx(ToolbarItem, { location: "before", children: _jsx(TMSearchBar, { marginLeft: '0px', maxWidth: '200px', searchValue: searchText, onSearchValueChanged: (e) => handleSearchChange(e) }) })] }), _jsxs("div", { onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, style: {
|
|
211
211
|
width: "100%",
|
|
212
212
|
height: "calc(100% - 40px)",
|
|
213
213
|
position: "relative",
|
|
@@ -72,7 +72,8 @@ export const priorityLegend = () => _jsx("div", { style: { display: 'flex', alig
|
|
|
72
72
|
export const highlightTaskText = (text, search, taskId) => {
|
|
73
73
|
if (!search)
|
|
74
74
|
return text;
|
|
75
|
-
const
|
|
75
|
+
const escapedSearchText = search.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
76
|
+
const regex = new RegExp(`(${escapedSearchText})`, 'gi');
|
|
76
77
|
const parts = text.split(regex);
|
|
77
78
|
return parts.map((part, index) => part.toLowerCase() === search.toLowerCase() ? (_jsx("span", { style: { color: "#fff", backgroundColor: '#0f6cbd' }, children: part }, taskId + "-" + index)) : (part));
|
|
78
79
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { DossierEngine, LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { ContextMenu } from "devextreme-react";
|
|
5
5
|
import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper } from "../../helper";
|
|
6
6
|
import TMToppyMessage from "../../helper/TMToppyMessage";
|
|
@@ -325,6 +325,16 @@ const TMBlogsPost = (props) => {
|
|
|
325
325
|
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
326
326
|
});
|
|
327
327
|
break;
|
|
328
|
+
case 'DS':
|
|
329
|
+
const dossierEngine = new DossierEngine(SDK_Globals.tmSession);
|
|
330
|
+
await dossierEngine.FollowAddOrRemoveAsync(currentBlog.id, true).then(async () => {
|
|
331
|
+
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, description: SDKUI_Localizator.OperationSuccess, resultType: ResultTypes.SUCCESS });
|
|
332
|
+
refreshHomePageNews?.();
|
|
333
|
+
})
|
|
334
|
+
.catch((err) => {
|
|
335
|
+
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
336
|
+
});
|
|
337
|
+
break;
|
|
328
338
|
default:
|
|
329
339
|
ShowAlert({ message: 'TODO', mode: 'warning', title: SDKUI_Localizator.Unfollow, duration: 3000 });
|
|
330
340
|
break;
|
|
@@ -505,11 +515,12 @@ const TMBlogsPost = (props) => {
|
|
|
505
515
|
beginGroup: true
|
|
506
516
|
});
|
|
507
517
|
}
|
|
508
|
-
|
|
518
|
+
console.log('classId', classId);
|
|
519
|
+
if (targetItem && Boolean(classId && (classId === 'WG' || classId === 'DS'))) {
|
|
509
520
|
menuItems.push({
|
|
510
521
|
icon: "eyeclose",
|
|
511
522
|
text: SDKUI_Localizator.Unfollow,
|
|
512
|
-
onClick: () => targetItem && classId && unFollowCallback(targetItem, classId),
|
|
523
|
+
onClick: () => (targetItem && classId) && unFollowCallback(targetItem, classId),
|
|
513
524
|
});
|
|
514
525
|
}
|
|
515
526
|
if (contextMenuParams.isShowHideFilterEnabled) {
|
|
@@ -99,6 +99,7 @@ export declare class SDKUI_Localizator {
|
|
|
99
99
|
static get CommentAndComplete(): string;
|
|
100
100
|
static get CommentDoesNotMeetRequirements(): "Der Kommentar erfüllt nicht die erforderlichen Anforderungen" | "The comment does not meet the required criteria" | "El comentario no cumple con los requisitos requeridos" | "Le commentaire ne répond pas aux exigences requises" | "O comentário não atende aos requisitos exigidos" | "Il commento non rispetta i requisiti richiesti";
|
|
101
101
|
static get CommentText(): string;
|
|
102
|
+
static get CompactView(): string;
|
|
102
103
|
static get Completed(): "Abgeschlossen" | "Completed" | "Completadas" | "Complètes" | "Completata";
|
|
103
104
|
static get CompleteError(): "Kompletter Fehler" | "Complete error" | "Error completo" | "Erreur complète" | "Erro completo" | "Errore completo";
|
|
104
105
|
static get Configure(): "Konfigurieren" | "Configure" | "Configurar" | "Configura";
|
|
@@ -473,7 +474,6 @@ export declare class SDKUI_Localizator {
|
|
|
473
474
|
static get PreviewDocument(): "Vorschau-Dokument" | "Preview document" | "Documento de vista previa" | "Document d'aperçu" | "Documento de pré-visualização" | "Anteprima documento";
|
|
474
475
|
static get PreviewNotAvailable(): "Vorschau ist nicht verfügbar." | "Preview is not available." | "La vista previa no está disponible." | "L'aperçu n'est pas disponible." | "A pré-visualização não está disponível." | "Anteprima non disponibile.";
|
|
475
476
|
static get PreviewNotAvailableOnDevice(): string;
|
|
476
|
-
static get PreviewView(): string;
|
|
477
477
|
static get Previous(): "Vorherige" | "Previous" | "Anterior" | "Précédent" | "Precedente";
|
|
478
478
|
static get Priority(): string;
|
|
479
479
|
static get PriorityLegend(): "Legende der Prioritäten" | "Priority Legend" | "Leyenda de prioridades" | "Légende des priorités" | "Lenda das prioridades" | "Legenda delle priorità";
|
|
@@ -945,6 +945,16 @@ export class SDKUI_Localizator {
|
|
|
945
945
|
default: return "Commento";
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
+
static get CompactView() {
|
|
949
|
+
switch (this._cultureID) {
|
|
950
|
+
case CultureIDs.De_DE: return "Kompaktansicht";
|
|
951
|
+
case CultureIDs.En_US: return "Compact View";
|
|
952
|
+
case CultureIDs.Es_ES: return "Vista Compacta";
|
|
953
|
+
case CultureIDs.Fr_FR: return "Vue Compacte";
|
|
954
|
+
case CultureIDs.Pt_PT: return "Vista Compacta";
|
|
955
|
+
default: return "Vista Compatta";
|
|
956
|
+
}
|
|
957
|
+
}
|
|
948
958
|
static get Completed() {
|
|
949
959
|
switch (this._cultureID) {
|
|
950
960
|
case CultureIDs.De_DE: return "Abgeschlossen";
|
|
@@ -4651,16 +4661,6 @@ export class SDKUI_Localizator {
|
|
|
4651
4661
|
default: return "Anteprima non disponibile per questo dispositivo. Clicca per visualizzare il documento.";
|
|
4652
4662
|
}
|
|
4653
4663
|
}
|
|
4654
|
-
static get PreviewView() {
|
|
4655
|
-
switch (this._cultureID) {
|
|
4656
|
-
case CultureIDs.De_DE: return "Vorschauansicht";
|
|
4657
|
-
case CultureIDs.En_US: return "Preview View";
|
|
4658
|
-
case CultureIDs.Es_ES: return "Vista Previa";
|
|
4659
|
-
case CultureIDs.Fr_FR: return "Vue Prévisualisation";
|
|
4660
|
-
case CultureIDs.Pt_PT: return "Vista de Pré-visualização";
|
|
4661
|
-
default: return "Anteprima";
|
|
4662
|
-
}
|
|
4663
|
-
}
|
|
4664
4664
|
static get Previous() {
|
|
4665
4665
|
switch (this._cultureID) {
|
|
4666
4666
|
case CultureIDs.De_DE: return "Vorherige";
|
package/lib/helper/helpers.js
CHANGED
|
@@ -633,7 +633,8 @@ export const highlightText = (text, searchValue) => {
|
|
|
633
633
|
export const renderHighlightedText = (text, searchText, isSelected) => {
|
|
634
634
|
if (!searchText)
|
|
635
635
|
return text;
|
|
636
|
-
const
|
|
636
|
+
const escapedSearchText = searchText.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
637
|
+
const regex = new RegExp(`(${escapedSearchText})`, 'gi');
|
|
637
638
|
return text.split(regex).map((part, index) => regex.test(part) ? (_jsx("span", { style: { backgroundColor: isSelected ? '#6c9023' : 'yellow' }, children: part }, index)) : (part));
|
|
638
639
|
};
|
|
639
640
|
export function versionAndBuildtypeInfo(module) {
|