@topconsultnpm/sdkui-react 6.20.0-dev2.46 → 6.20.0-dev2.48
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/TMTreeView.d.ts +3 -1
- package/lib/components/base/TMTreeView.js +63 -20
- package/lib/components/editors/TMTextBox.js +8 -9
- package/lib/components/features/documents/TMDcmtForm.js +2 -2
- package/lib/components/features/documents/TMMasterDetailDcmts.js +66 -5
- package/lib/components/features/documents/TMRelationViewer.d.ts +7 -1
- package/lib/components/features/documents/TMRelationViewer.js +389 -76
- package/lib/components/features/tasks/TMTaskForm.js +35 -182
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +86 -0
- package/lib/components/features/tasks/TMTaskFormUtils.js +432 -0
- package/lib/components/features/tasks/TMTasksUtils.js +1 -0
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +0 -7
- package/lib/components/features/tasks/TMTasksUtilsView.js +1 -12
- package/lib/components/features/tasks/TMTasksView.js +2 -2
- package/lib/components/forms/TMSaveForm.js +61 -13
- package/lib/components/grids/TMBlogsPost.js +2 -2
- package/lib/helper/SDKUI_Localizator.d.ts +6 -2
- package/lib/helper/SDKUI_Localizator.js +52 -12
- package/lib/helper/helpers.d.ts +6 -2
- package/lib/helper/helpers.js +22 -8
- package/package.json +1 -1
|
@@ -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,
|
|
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:
|
|
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";
|
|
@@ -516,6 +517,8 @@ export declare class SDKUI_Localizator {
|
|
|
516
517
|
static get Redo(): "Wiederherstellen" | "Redo" | "Rehacer" | "Rétablir" | "Refazer" | "Rifai";
|
|
517
518
|
static get Reject(): "Ablehnen" | "Reject" | "Rechazar" | "Rejeter" | "Rejeitar" | "Rifiuta";
|
|
518
519
|
static get Relations(): "Korrelationen" | "Correlations" | "Correlaciones" | "Relations" | "Correlacionados" | "Correlazioni";
|
|
520
|
+
static get RelationsNotFound(): "Keine Korrelationen gefunden" | "No correlations found" | "No se encontraron correlaciones" | "Aucune corrélation trouvée" | "Nenhuma correlação encontrada" | "Nessuna correlazione trovata";
|
|
521
|
+
static get RelatedDcmtsNotFound(): "Für das ausgewählte Dokument wurden keine zugehörigen Dokumente gefunden." | "No related documents were found for the selected document." | "No se encontraron documentos relacionados para el documento seleccionado." | "Aucun document associé n'a été trouvé pour le document sélectionné." | "Nenhum documento relacionado foi encontrado para o documento selecionado." | "Non sono stati trovati documenti correlati per il documento selezionato.";
|
|
519
522
|
static get RelationManyToMany(): "Folge viele mit vielen" | "Relation many to many" | "Correlación muchos a muchos" | "Corrélation plusieurs à plusieurs" | "Muitos para muitos relação" | "Correlazione molti a molti";
|
|
520
523
|
static get RelationType(): "Art der Beziehung" | "Relation type" | "Tipo de relación" | "Type de relation" | "Tipo de relacionamento" | "Tipo di relazione";
|
|
521
524
|
static get RemoveContextualFilter(): "Kontextbezogenen Filter entfernen" | "Remove contextual filter" | "Eliminar filtro contextual" | "Supprimer le filtre contextuel" | "Remover filtro contextual" | "Rimuovi filtro contestuale";
|
|
@@ -553,6 +556,7 @@ export declare class SDKUI_Localizator {
|
|
|
553
556
|
static get Save(): "Speichern" | "Save" | "Guardar" | "Enregistre" | "Salvar" | "Salva";
|
|
554
557
|
static get SaveAndLogin(): string;
|
|
555
558
|
static get SaveQuestion(): "Ihre Änderungen speichern?" | "Save modifications?" | "¿Guardar modificaciones aportadas?" | "Enregistrez les modifications?" | "Salve as alterações?" | "Salvare le modifiche apportate?";
|
|
559
|
+
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
560
|
static get SavedQueryNew(): "Neue Suche speichern" | "Save new search" | "Guardar nueva búsqueda" | "Enregistrer la nouvelle recherche" | "Guardar nova pesquisa" | "Salva nuova ricerca";
|
|
557
561
|
static get SavedQueryUpdate(): "Suche bearbeiten" | "Modify query" | "Modificar búsqueda" | "Modifie la recherche" | "Mudar pesquisa" | "Modifica ricerca";
|
|
558
562
|
static get Search(): "Auf der Suche nach" | "Search" | "Búsqueda" | "Recherche" | "Pesquisa" | "Ricerca";
|
|
@@ -633,8 +637,8 @@ export declare class SDKUI_Localizator {
|
|
|
633
637
|
static get Summary(): "Zusammenfassung" | "Summary" | "Resumen" | "Résumé" | "Resumo" | "Riepilogo";
|
|
634
638
|
static get SwitchUser(): "Benutzer wechseln" | "Switch user" | "Cambiar usuario" | "Changer d'utilisateur" | "Mudar de usuário" | "Cambia utente";
|
|
635
639
|
static get TargetedSearch(): "Gezielte Suche" | "Targeted search" | "Búsqueda dirigida" | "Recherche ciblée" | "Pesquisa direcionada" | "Ricerca puntuale";
|
|
636
|
-
static get TaskAssignedMessage(): "
|
|
637
|
-
static get TaskAssignedToUserMessage(): "Aufgabe zugewiesen an den Benutzer
|
|
640
|
+
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}}\".";
|
|
641
|
+
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
642
|
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
643
|
static get TasksEmpty(): string;
|
|
640
644
|
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";
|
|
@@ -5125,6 +5135,26 @@ export class SDKUI_Localizator {
|
|
|
5125
5135
|
}
|
|
5126
5136
|
;
|
|
5127
5137
|
}
|
|
5138
|
+
static get RelationsNotFound() {
|
|
5139
|
+
switch (this._cultureID) {
|
|
5140
|
+
case CultureIDs.De_DE: return "Keine Korrelationen gefunden";
|
|
5141
|
+
case CultureIDs.En_US: return "No correlations found";
|
|
5142
|
+
case CultureIDs.Es_ES: return "No se encontraron correlaciones";
|
|
5143
|
+
case CultureIDs.Fr_FR: return "Aucune corrélation trouvée";
|
|
5144
|
+
case CultureIDs.Pt_PT: return "Nenhuma correlação encontrada";
|
|
5145
|
+
default: return "Nessuna correlazione trovata";
|
|
5146
|
+
}
|
|
5147
|
+
}
|
|
5148
|
+
static get RelatedDcmtsNotFound() {
|
|
5149
|
+
switch (this._cultureID) {
|
|
5150
|
+
case CultureIDs.De_DE: return "Für das ausgewählte Dokument wurden keine zugehörigen Dokumente gefunden.";
|
|
5151
|
+
case CultureIDs.En_US: return "No related documents were found for the selected document.";
|
|
5152
|
+
case CultureIDs.Es_ES: return "No se encontraron documentos relacionados para el documento seleccionado.";
|
|
5153
|
+
case CultureIDs.Fr_FR: return "Aucun document associé n'a été trouvé pour le document sélectionné.";
|
|
5154
|
+
case CultureIDs.Pt_PT: return "Nenhum documento relacionado foi encontrado para o documento selecionado.";
|
|
5155
|
+
default: return "Non sono stati trovati documenti correlati per il documento selezionato.";
|
|
5156
|
+
}
|
|
5157
|
+
}
|
|
5128
5158
|
static get RelationManyToMany() {
|
|
5129
5159
|
switch (this._cultureID) {
|
|
5130
5160
|
case CultureIDs.De_DE: return "Folge viele mit vielen";
|
|
@@ -5501,6 +5531,16 @@ export class SDKUI_Localizator {
|
|
|
5501
5531
|
default: return "Salvare le modifiche apportate?";
|
|
5502
5532
|
}
|
|
5503
5533
|
}
|
|
5534
|
+
static get FormErrorsProceedQuestion() {
|
|
5535
|
+
switch (this._cultureID) {
|
|
5536
|
+
case CultureIDs.De_DE: return "Es gibt Fehler im Formular. Wenn Sie fortfahren, werden die Daten nicht gespeichert. Möchten Sie trotzdem fortfahren?";
|
|
5537
|
+
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?";
|
|
5538
|
+
case CultureIDs.Es_ES: return "Hay errores en el formulario. Si continúas, los datos no se guardarán. ¿Quieres proceder de todos modos?";
|
|
5539
|
+
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?";
|
|
5540
|
+
case CultureIDs.Pt_PT: return "Há erros no formulário. Se continuar, os dados não serão salvos. Deseja prosseguir mesmo assim?";
|
|
5541
|
+
default: return "Ci sono errori nel form. Se continui, i dati non saranno salvati. Vuoi comunque procedere?";
|
|
5542
|
+
}
|
|
5543
|
+
}
|
|
5504
5544
|
static get SavedQueryNew() {
|
|
5505
5545
|
switch (this._cultureID) {
|
|
5506
5546
|
case CultureIDs.De_DE: return "Neue Suche speichern";
|
|
@@ -6304,22 +6344,22 @@ export class SDKUI_Localizator {
|
|
|
6304
6344
|
}
|
|
6305
6345
|
static get TaskAssignedMessage() {
|
|
6306
6346
|
switch (this._cultureID) {
|
|
6307
|
-
case CultureIDs.De_DE: return "
|
|
6308
|
-
case CultureIDs.En_US: return "
|
|
6309
|
-
case CultureIDs.Es_ES: return "
|
|
6310
|
-
case CultureIDs.Fr_FR: return "
|
|
6311
|
-
case CultureIDs.Pt_PT: return "
|
|
6312
|
-
default: return "Attività assegnata dall'utente
|
|
6347
|
+
case CultureIDs.De_DE: return "Aufgabe wurde vom Benutzer \"{{0}}\" zugewiesen.";
|
|
6348
|
+
case CultureIDs.En_US: return "Task assigned by user \"{{0}}\".";
|
|
6349
|
+
case CultureIDs.Es_ES: return "Tarea asignada por el usuario \"{{0}}\".";
|
|
6350
|
+
case CultureIDs.Fr_FR: return "Tâche assignée par l'utilisateur \"{{0}}\".";
|
|
6351
|
+
case CultureIDs.Pt_PT: return "Tarefa atribuída pelo usuário \"{{0}}\".";
|
|
6352
|
+
default: return "Attività assegnata dall'utente \"{{0}}\".";
|
|
6313
6353
|
}
|
|
6314
6354
|
}
|
|
6315
6355
|
static get TaskAssignedToUserMessage() {
|
|
6316
6356
|
switch (this._cultureID) {
|
|
6317
|
-
case CultureIDs.De_DE: return "Aufgabe zugewiesen an den Benutzer
|
|
6318
|
-
case CultureIDs.En_US: return "Task assigned to user
|
|
6319
|
-
case CultureIDs.Es_ES: return "Tarea asignada al usuario
|
|
6320
|
-
case CultureIDs.Fr_FR: return "Tâche assignée à l'utilisateur
|
|
6321
|
-
case CultureIDs.Pt_PT: return "Tarefa atribuída ao usuário
|
|
6322
|
-
default: return "Attività assegnata all'utente
|
|
6357
|
+
case CultureIDs.De_DE: return "Aufgabe zugewiesen an den Benutzer \"{{0}}\"";
|
|
6358
|
+
case CultureIDs.En_US: return "Task assigned to user \"{{0}}\"";
|
|
6359
|
+
case CultureIDs.Es_ES: return "Tarea asignada al usuario \"{{0}}\"";
|
|
6360
|
+
case CultureIDs.Fr_FR: return "Tâche assignée à l'utilisateur \"{{0}}\"";
|
|
6361
|
+
case CultureIDs.Pt_PT: return "Tarefa atribuída ao usuário \"{{0}}\"";
|
|
6362
|
+
default: return "Attività assegnata all'utente \"{{0}}\"";
|
|
6323
6363
|
}
|
|
6324
6364
|
}
|
|
6325
6365
|
static get TaskConsideredExpiring() {
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -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;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -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';
|