@topconsultnpm/sdkui-react 6.20.0-dev2.46 → 6.20.0-dev2.47

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.
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useRef, useState } from "react";
3
3
  import { DossierEngine, LayoutModes, ObjectClasses, ResultTypes, SDK_Globals, TaskDescriptor, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
4
4
  import { ContextMenu as TMContextMenu } from "../NewComponents/ContextMenu";
5
- import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper, calcResponsiveSizes, getMoreInfoTasksForDocument } from "../../helper";
5
+ import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper, getMoreInfoTasksForDocument, taskModalSizes } from "../../helper";
6
6
  import TMToppyMessage from "../../helper/TMToppyMessage";
7
7
  import { useDcmtOperations } from "../../hooks/useDcmtOperations";
8
8
  import { DownloadTypes, FormModes } from "../../ts";
@@ -684,7 +684,7 @@ const TMBlogsPost = (props) => {
684
684
  visible: menuVisible,
685
685
  position: menuPosition,
686
686
  onClose: closeContextMenu,
687
- } })] }), (showTaskForm && handleNavigateToWGs && handleNavigateToDossiers && getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback) && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsx(TMTaskForm, { id: -1, title: SDKUI_Localizator.ContextualTask, isModal: true, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '670px', '80%', '95%'), formMode: FormModes.Create, visualizedTasks: [], currentTask: currentTask, setCurrentTask: () => { }, selectedRowKeys: [], handleFocusedRowKeyChange: () => { }, onStatusChanged: () => { }, onSaved: onSavedTaskFormCallback, onClose: () => closeTaskFormCallback(), onCancel: () => closeTaskFormCallback(), usersList: participants, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, isContextualCreate: true, taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback }) }), (dcmtForm.dcmt && dcmtForm.dcmt.TID && dcmtForm.dcmt.DID) && _jsx(TMDcmtForm, { TID: Number(dcmtForm.dcmt.TID), DID: Number(dcmtForm.dcmt.DID), layoutMode: LayoutModes.Update, onClose: closeDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + dcmtForm.dcmt.fileName, isModal: true, widthModal: "95%", heightModal: "95%", allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, onReferenceClick: handleNavigateToReference, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, Number(dcmtForm.dcmt.TID), Number(dcmtForm.dcmt.DID)) }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
687
+ } })] }), (showTaskForm && handleNavigateToWGs && handleNavigateToDossiers && getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback) && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsx(TMTaskForm, { id: -1, title: SDKUI_Localizator.ContextualTask, isModal: true, width: taskModalSizes(deviceType, FormModes.Create).width, height: taskModalSizes(deviceType, FormModes.Create).height, formMode: FormModes.Create, visualizedTasks: [], currentTask: currentTask, setCurrentTask: () => { }, selectedRowKeys: [], handleFocusedRowKeyChange: () => { }, onStatusChanged: () => { }, onSaved: onSavedTaskFormCallback, onClose: () => closeTaskFormCallback(), onCancel: () => closeTaskFormCallback(), usersList: participants, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, isContextualCreate: true, taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback }) }), (dcmtForm.dcmt && dcmtForm.dcmt.TID && dcmtForm.dcmt.DID) && _jsx(TMDcmtForm, { TID: Number(dcmtForm.dcmt.TID), DID: Number(dcmtForm.dcmt.DID), layoutMode: LayoutModes.Update, onClose: closeDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + dcmtForm.dcmt.fileName, isModal: true, widthModal: "95%", heightModal: "95%", allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, onReferenceClick: handleNavigateToReference, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, Number(dcmtForm.dcmt.TID), Number(dcmtForm.dcmt.DID)) }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
688
688
  position: 'absolute',
689
689
  bottom: '18px',
690
690
  right: '20px',
@@ -241,6 +241,7 @@ export declare class SDKUI_Localizator {
241
241
  static get EvaluateResult(): "Bewerten Sie das Ergebnis" | "Evaluate result" | "Valorar el resultado" | "Évalue les résultats" | "Avalia os resultados" | "Valuta il risultato";
242
242
  static get Expected(): "Erwartet" | "Expected" | "Esperado" | "Attendu" | "Atteso";
243
243
  static get Expiration(): "Ablaufdatum" | "Expiration" | "Fecha de expiración" | "Date d'expiration" | "Data de expiração" | "Scadenza";
244
+ static get ExpirationDate(): "Ablaufdatum" | "Expiration date" | "Fecha de vencimiento" | "Date d'échéance" | "Data de validade" | "Data di scadenza";
244
245
  static get ExpertMode(): "Expertenmodus" | "Expert mode" | "Modo experto" | "Mode expert" | "Modo especialista" | "Modalità esperto";
245
246
  static get Expiring(): "Ablaufend" | "Expiring" | "Por vencer" | "Expirant" | "Vencendo" | "In scadenza";
246
247
  static get Export(): "Exportieren" | "Export" | "Exportar" | "Exporter" | "Esporta";
@@ -553,6 +554,7 @@ export declare class SDKUI_Localizator {
553
554
  static get Save(): "Speichern" | "Save" | "Guardar" | "Enregistre" | "Salvar" | "Salva";
554
555
  static get SaveAndLogin(): string;
555
556
  static get SaveQuestion(): "Ihre Änderungen speichern?" | "Save modifications?" | "¿Guardar modificaciones aportadas?" | "Enregistrez les modifications?" | "Salve as alterações?" | "Salvare le modifiche apportate?";
557
+ static get FormErrorsProceedQuestion(): "Es gibt Fehler im Formular. Wenn Sie fortfahren, werden die Daten nicht gespeichert. Möchten Sie trotzdem fortfahren?" | "There are errors in the form. If you continue, the data will not be saved. Do you want to proceed anyway?" | "Hay errores en el formulario. Si continúas, los datos no se guardarán. ¿Quieres proceder de todos modos?" | "Il y a des erreurs dans le formulaire. Si vous continuez, les données ne seront pas enregistrées. Voulez-vous continuer quand même?" | "Há erros no formulário. Se continuar, os dados não serão salvos. Deseja prosseguir mesmo assim?" | "Ci sono errori nel form. Se continui, i dati non saranno salvati. Vuoi comunque procedere?";
556
558
  static get SavedQueryNew(): "Neue Suche speichern" | "Save new search" | "Guardar nueva búsqueda" | "Enregistrer la nouvelle recherche" | "Guardar nova pesquisa" | "Salva nuova ricerca";
557
559
  static get SavedQueryUpdate(): "Suche bearbeiten" | "Modify query" | "Modificar búsqueda" | "Modifie la recherche" | "Mudar pesquisa" | "Modifica ricerca";
558
560
  static get Search(): "Auf der Suche nach" | "Search" | "Búsqueda" | "Recherche" | "Pesquisa" | "Ricerca";
@@ -633,8 +635,8 @@ export declare class SDKUI_Localizator {
633
635
  static get Summary(): "Zusammenfassung" | "Summary" | "Resumen" | "Résumé" | "Resumo" | "Riepilogo";
634
636
  static get SwitchUser(): "Benutzer wechseln" | "Switch user" | "Cambiar usuario" | "Changer d'utilisateur" | "Mudar de usuário" | "Cambia utente";
635
637
  static get TargetedSearch(): "Gezielte Suche" | "Targeted search" | "Búsqueda dirigida" | "Recherche ciblée" | "Pesquisa direcionada" | "Ricerca puntuale";
636
- static get TaskAssignedMessage(): "Die Aufgabe wurde von Benutzer '{{0}}' zugewiesen. Nur die Felder 'Status' und 'Erinnerung' können bearbeitet werden, da sie für die Person, die mit der Arbeit fortfährt, relevant sind" | "The task was assigned by user '{{0}}'. Only the 'Status' and 'Reminder' fields can be edited, as they are relevant for the person who will continue with the work" | "La tarea fue asignada por el usuario '{{0}}'. Solo se pueden editar los campos 'Estado' y 'Recordatorio', ya que son relevantes para la persona que continuará con el trabajo" | "La tâche a été assignée par l'utilisateur '{{0}}'. Seuls les champs 'Statut' et 'Rappel' peuvent être modifiés, car ils sont pertinents pour la personne qui poursuivra le travail" | "A tarefa foi atribuída pelo usuário '{{0}}'. Apenas os campos 'Status' e 'Lembrete' podem ser editados, pois são relevantes para quem continuará com o trabalho" | "Attività assegnata dall'utente '{{0}}'. Solo i campi 'Stato' e 'Promemoria' possono essere modificati, in quanto sono rilevanti per chi dovrà proseguire con il lavoro";
637
- static get TaskAssignedToUserMessage(): "Aufgabe zugewiesen an den Benutzer '{{0}}'" | "Task assigned to user '{{0}}'" | "Tarea asignada al usuario '{{0}}'" | "Tâche assignée à l'utilisateur '{{0}}'" | "Tarefa atribuída ao usuário '{{0}}'" | "Attività assegnata all'utente '{{0}}'";
638
+ static get TaskAssignedMessage(): "Aufgabe wurde vom Benutzer \"{{0}}\" zugewiesen." | "Task assigned by user \"{{0}}\"." | "Tarea asignada por el usuario \"{{0}}\"." | "Tâche assignée par l'utilisateur \"{{0}}\"." | "Tarefa atribuída pelo usuário \"{{0}}\"." | "Attività assegnata dall'utente \"{{0}}\".";
639
+ static get TaskAssignedToUserMessage(): "Aufgabe zugewiesen an den Benutzer \"{{0}}\"" | "Task assigned to user \"{{0}}\"" | "Tarea asignada al usuario \"{{0}}\"" | "Tâche assignée à l'utilisateur \"{{0}}\"" | "Tarefa atribuída ao usuário \"{{0}}\"" | "Attività assegnata all'utente \"{{0}}\"";
638
640
  static get TaskConsideredExpiring(): "Die Aufgabe wird als ablaufend betrachtet, wenn" | "The task is considered expiring if" | "La tarea se considera por vencer si" | "La tâche est considérée comme expirante si" | "A tarefa é considerada vencendo se" | "L'attività è considerata in scadenza se";
639
641
  static get TasksEmpty(): string;
640
642
  static get TaskSavedSuccessfully(): string;
@@ -2377,6 +2377,16 @@ export class SDKUI_Localizator {
2377
2377
  default: return "Scadenza";
2378
2378
  }
2379
2379
  }
2380
+ static get ExpirationDate() {
2381
+ switch (this._cultureID) {
2382
+ case CultureIDs.De_DE: return "Ablaufdatum";
2383
+ case CultureIDs.En_US: return "Expiration date";
2384
+ case CultureIDs.Es_ES: return "Fecha de vencimiento";
2385
+ case CultureIDs.Fr_FR: return "Date d'échéance";
2386
+ case CultureIDs.Pt_PT: return "Data de validade";
2387
+ default: return "Data di scadenza";
2388
+ }
2389
+ }
2380
2390
  static get ExpertMode() {
2381
2391
  switch (this._cultureID) {
2382
2392
  case CultureIDs.De_DE: return "Expertenmodus";
@@ -5501,6 +5511,16 @@ export class SDKUI_Localizator {
5501
5511
  default: return "Salvare le modifiche apportate?";
5502
5512
  }
5503
5513
  }
5514
+ static get FormErrorsProceedQuestion() {
5515
+ switch (this._cultureID) {
5516
+ case CultureIDs.De_DE: return "Es gibt Fehler im Formular. Wenn Sie fortfahren, werden die Daten nicht gespeichert. Möchten Sie trotzdem fortfahren?";
5517
+ case CultureIDs.En_US: return "There are errors in the form. If you continue, the data will not be saved. Do you want to proceed anyway?";
5518
+ case CultureIDs.Es_ES: return "Hay errores en el formulario. Si continúas, los datos no se guardarán. ¿Quieres proceder de todos modos?";
5519
+ case CultureIDs.Fr_FR: return "Il y a des erreurs dans le formulaire. Si vous continuez, les données ne seront pas enregistrées. Voulez-vous continuer quand même?";
5520
+ case CultureIDs.Pt_PT: return "Há erros no formulário. Se continuar, os dados não serão salvos. Deseja prosseguir mesmo assim?";
5521
+ default: return "Ci sono errori nel form. Se continui, i dati non saranno salvati. Vuoi comunque procedere?";
5522
+ }
5523
+ }
5504
5524
  static get SavedQueryNew() {
5505
5525
  switch (this._cultureID) {
5506
5526
  case CultureIDs.De_DE: return "Neue Suche speichern";
@@ -6304,22 +6324,22 @@ export class SDKUI_Localizator {
6304
6324
  }
6305
6325
  static get TaskAssignedMessage() {
6306
6326
  switch (this._cultureID) {
6307
- case CultureIDs.De_DE: return "Die Aufgabe wurde von Benutzer '{{0}}' zugewiesen. Nur die Felder 'Status' und 'Erinnerung' können bearbeitet werden, da sie für die Person, die mit der Arbeit fortfährt, relevant sind";
6308
- case CultureIDs.En_US: return "The task was assigned by user '{{0}}'. Only the 'Status' and 'Reminder' fields can be edited, as they are relevant for the person who will continue with the work";
6309
- case CultureIDs.Es_ES: return "La tarea fue asignada por el usuario '{{0}}'. Solo se pueden editar los campos 'Estado' y 'Recordatorio', ya que son relevantes para la persona que continuará con el trabajo";
6310
- case CultureIDs.Fr_FR: return "La tâche a été assignée par l'utilisateur '{{0}}'. Seuls les champs 'Statut' et 'Rappel' peuvent être modifiés, car ils sont pertinents pour la personne qui poursuivra le travail";
6311
- case CultureIDs.Pt_PT: return "A tarefa foi atribuída pelo usuário '{{0}}'. Apenas os campos 'Status' e 'Lembrete' podem ser editados, pois são relevantes para quem continuará com o trabalho";
6312
- default: return "Attività assegnata dall'utente '{{0}}'. Solo i campi 'Stato' e 'Promemoria' possono essere modificati, in quanto sono rilevanti per chi dovrà proseguire con il lavoro";
6327
+ case CultureIDs.De_DE: return "Aufgabe wurde vom Benutzer \"{{0}}\" zugewiesen.";
6328
+ case CultureIDs.En_US: return "Task assigned by user \"{{0}}\".";
6329
+ case CultureIDs.Es_ES: return "Tarea asignada por el usuario \"{{0}}\".";
6330
+ case CultureIDs.Fr_FR: return "Tâche assignée par l'utilisateur \"{{0}}\".";
6331
+ case CultureIDs.Pt_PT: return "Tarefa atribuída pelo usuário \"{{0}}\".";
6332
+ default: return "Attività assegnata dall'utente \"{{0}}\".";
6313
6333
  }
6314
6334
  }
6315
6335
  static get TaskAssignedToUserMessage() {
6316
6336
  switch (this._cultureID) {
6317
- case CultureIDs.De_DE: return "Aufgabe zugewiesen an den Benutzer '{{0}}'";
6318
- case CultureIDs.En_US: return "Task assigned to user '{{0}}'";
6319
- case CultureIDs.Es_ES: return "Tarea asignada al usuario '{{0}}'";
6320
- case CultureIDs.Fr_FR: return "Tâche assignée à l'utilisateur '{{0}}'";
6321
- case CultureIDs.Pt_PT: return "Tarefa atribuída ao usuário '{{0}}'";
6322
- default: return "Attività assegnata all'utente '{{0}}'";
6337
+ case CultureIDs.De_DE: return "Aufgabe zugewiesen an den Benutzer \"{{0}}\"";
6338
+ case CultureIDs.En_US: return "Task assigned to user \"{{0}}\"";
6339
+ case CultureIDs.Es_ES: return "Tarea asignada al usuario \"{{0}}\"";
6340
+ case CultureIDs.Fr_FR: return "Tâche assignée à l'utilisateur \"{{0}}\"";
6341
+ case CultureIDs.Pt_PT: return "Tarefa atribuída ao usuário \"{{0}}\"";
6342
+ default: return "Attività assegnata all'utente \"{{0}}\"";
6323
6343
  }
6324
6344
  }
6325
6345
  static get TaskConsideredExpiring() {
@@ -2,12 +2,16 @@ import { Colors as ColorsType } from "../components/base/TMEditorBase";
2
2
  import { DeviceType } from "../components";
3
3
  import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, ITopMediaSession, MetadataDescriptor, QueryDescriptor, SearchResultDescriptor, TaskDescriptor } from "@topconsultnpm/sdk-ts";
4
4
  import { FileExtensionHandler, FormModes, moduleTypes } from "../ts";
5
+ declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
6
+ declare const taskModalSizes: (deviceType: DeviceType | undefined, formMode: FormModes) => {
7
+ width: string;
8
+ height: string;
9
+ };
5
10
  declare const TABLET_WIDTH = 1024;
6
11
  declare const MOBILE_WIDTH = 640;
7
12
  declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: "horizontal" | "vertical", tabletDir: "horizontal" | "vertical", mobileDir: "horizontal" | "vertical") => "horizontal" | "vertical";
8
13
  declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
9
14
  export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession | undefined>;
10
- declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
11
15
  declare const getColor: (color: ColorsType) => string;
12
16
  /**
13
17
  * Genera un Universally Unique Identifier (UUID) versione 4.
@@ -44,7 +48,7 @@ export declare const canPrev: (visibleItems: any[], selectedItems: any[]) => boo
44
48
  export declare const getPrev: (visibleItems: any[], selectedItems: any[]) => any;
45
49
  export declare const calcSaveFormTitle: (rootTitle: string | undefined, formMode: FormModes, updateId: number | undefined, pathKeys: string[] | undefined) => string;
46
50
  export declare function calcIsModified(formData: any, formDataOrig: any): boolean;
47
- export { openApps, calcResponsiveDirection, calcResponsiveSizes, getColor, genUniqueId, makeID, MOBILE_WIDTH, TABLET_WIDTH };
51
+ export { openApps, calcResponsiveDirection, calcResponsiveSizes, taskModalSizes, getColor, genUniqueId, makeID, MOBILE_WIDTH, TABLET_WIDTH };
48
52
  export declare function moduleVersion(module: moduleTypes): string;
49
53
  export declare function buildtype(module: moduleTypes): string;
50
54
  export declare const highlightText: (text: string, searchValue: string) => JSX.Element;
@@ -7,6 +7,27 @@ import { buildTypes, FileExtensionHandler, FormModes, moduleTypes } from "../ts"
7
7
  import { SDKUI_Localizator } from "./SDKUI_Localizator";
8
8
  import ReactDOMServer from "react-dom/server";
9
9
  import { DeepCompareHelper } from "./DeepCompareHelper";
10
+ const calcResponsiveSizes = (deviceType, desktopSize, tabletSize, mobileSize) => {
11
+ if (deviceType === DeviceType.DESKTOP)
12
+ return desktopSize;
13
+ if (deviceType === DeviceType.TABLET)
14
+ return tabletSize;
15
+ return mobileSize;
16
+ };
17
+ const taskModalSizes = (deviceType, formMode) => {
18
+ switch (formMode) {
19
+ case FormModes.Create:
20
+ return {
21
+ width: calcResponsiveSizes(deviceType, '500px', '90%', '95%'),
22
+ height: calcResponsiveSizes(deviceType, '600px', '90%', '95%'),
23
+ };
24
+ default:
25
+ return {
26
+ width: calcResponsiveSizes(deviceType, '670px', '90%', '95%'),
27
+ height: calcResponsiveSizes(deviceType, '770px', '90%', '95%'),
28
+ };
29
+ }
30
+ };
10
31
  //#region Responsive Helpers
11
32
  const TABLET_WIDTH = 1024;
12
33
  const MOBILE_WIDTH = 640;
@@ -50,13 +71,6 @@ export const setSDK_GlobalsInfoAsync = async (tms) => {
50
71
  return undefined;
51
72
  }
52
73
  };
53
- const calcResponsiveSizes = (deviceType, desktopSize, tabletSize, mobileSize) => {
54
- if (deviceType === DeviceType.DESKTOP)
55
- return desktopSize;
56
- if (deviceType === DeviceType.TABLET)
57
- return tabletSize;
58
- return mobileSize;
59
- };
60
74
  //#endregion
61
75
  const getColor = (color) => {
62
76
  let c = '';
@@ -617,7 +631,7 @@ export function calcIsModified(formData, formDataOrig) {
617
631
  return JSON.stringify(formData) !== JSON.stringify(formDataOrig);
618
632
  }
619
633
  //#endregion
620
- export { openApps, calcResponsiveDirection, calcResponsiveSizes, getColor, genUniqueId, makeID, MOBILE_WIDTH, TABLET_WIDTH };
634
+ export { openApps, calcResponsiveDirection, calcResponsiveSizes, taskModalSizes, getColor, genUniqueId, makeID, MOBILE_WIDTH, TABLET_WIDTH };
621
635
  export function moduleVersion(module) {
622
636
  switch (module) {
623
637
  case moduleTypes.SDK: return SDK_Globals.sdkVersion ?? '0.0.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.20.0-dev2.46",
3
+ "version": "6.20.0-dev2.47",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",