@topconsultnpm/sdkui-react 6.20.0-dev1.3 → 6.20.0-dev1.5
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/TMAccordion.js +2 -2
- package/lib/components/editors/TMHtmlEditor.js +1 -1
- package/lib/components/features/documents/TMDcmtBlog.d.ts +1 -7
- package/lib/components/features/documents/TMDcmtBlog.js +29 -2
- package/lib/components/features/documents/TMDcmtForm.js +8 -23
- package/lib/components/features/search/TMSearchResult.js +146 -43
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.js +3 -3
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +16 -16
- package/lib/helper/SDKUI_Globals.d.ts +3 -14
- package/lib/helper/SDKUI_Localizator.d.ts +7 -0
- package/lib/helper/SDKUI_Localizator.js +88 -0
- package/lib/helper/TMUtils.d.ts +3 -1
- package/lib/helper/TMUtils.js +51 -0
- package/lib/helper/checkinCheckoutManager.d.ts +55 -0
- package/lib/helper/checkinCheckoutManager.js +271 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/services/platform_services.d.ts +1 -1
- package/package.json +2 -2
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.d.ts +0 -4
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +0 -187
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +0 -11
- package/lib/components/NewComponents/ContextMenu/hooks.js +0 -48
- package/lib/components/NewComponents/ContextMenu/index.d.ts +0 -2
- package/lib/components/NewComponents/ContextMenu/index.js +0 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +0 -27
- package/lib/components/NewComponents/ContextMenu/styles.js +0 -308
- package/lib/components/NewComponents/ContextMenu/types.d.ts +0 -26
- package/lib/components/NewComponents/ContextMenu/types.js +0 -1
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +0 -4
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +0 -370
- package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +0 -2
- package/lib/components/NewComponents/FloatingMenuBar/index.js +0 -2
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +0 -38
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +0 -267
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +0 -30
- package/lib/components/NewComponents/FloatingMenuBar/types.js +0 -1
- package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
- package/lib/components/NewComponents/Notification/Notification.js +0 -60
- package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
- package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
- package/lib/components/NewComponents/Notification/index.d.ts +0 -2
- package/lib/components/NewComponents/Notification/index.js +0 -2
- package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
- package/lib/components/NewComponents/Notification/styles.js +0 -180
- package/lib/components/NewComponents/Notification/types.d.ts +0 -18
- package/lib/components/NewComponents/Notification/types.js +0 -1
- package/lib/helper/cicoHelper.d.ts +0 -31
- package/lib/helper/cicoHelper.js +0 -155
|
@@ -6,7 +6,7 @@ import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../b
|
|
|
6
6
|
import TMSpinner from '../../base/TMSpinner';
|
|
7
7
|
import { DcmtOperationTypes, DownloadTypes, SearchResultContext } from '../../../ts';
|
|
8
8
|
import { isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
9
|
-
import {
|
|
9
|
+
import { getDcmtCicoStatus } from '../../../helper/checkinCheckoutManager';
|
|
10
10
|
const disabledForSingleRow = (selectedItems, focusedItem) => {
|
|
11
11
|
// Disabilita se ci sono più item selezionati o se focusedItem non ha TID/DID validi
|
|
12
12
|
return selectedItems.length > 1 || focusedItem === undefined || focusedItem.TID === undefined || focusedItem.DID === undefined;
|
|
@@ -96,7 +96,7 @@ export const signatureInformationCallback = async (isMobile, inputDcmts) => {
|
|
|
96
96
|
TMSpinner.hide();
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
|
|
99
|
+
export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, confirmAttachments, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, hasMasterRelation, hasDetailRelation, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToManyDocuments, hasManyToManyRelation) => {
|
|
100
100
|
const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
|
|
101
101
|
let pdfEditorAvailable = false;
|
|
102
102
|
if (dtd && dtd.widgets && dtd.widgets.length > 0) {
|
|
@@ -328,7 +328,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
328
328
|
const selectedDocs = getAllFieldSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
329
329
|
// Take the first document (used for validation checks)
|
|
330
330
|
const firstDoc = selectedDocs?.[0];
|
|
331
|
-
const { cicoEnabled, checkoutStatus } =
|
|
331
|
+
const { cicoEnabled, checkoutStatus } = getDcmtCicoStatus(firstDoc, allUsers, dtd);
|
|
332
332
|
return {
|
|
333
333
|
icon: svgToString(_jsx(IconFileDots, {})),
|
|
334
334
|
text: "Check in/Check out",
|
|
@@ -340,36 +340,36 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
340
340
|
disabled: !cicoEnabled || checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem),
|
|
341
341
|
onClick: () => handleCheckOutOperationCallback(true),
|
|
342
342
|
},
|
|
343
|
-
|
|
343
|
+
{
|
|
344
344
|
icon: "unlock",
|
|
345
345
|
text: 'Check in',
|
|
346
|
-
|
|
346
|
+
onClick: () => handleCheckInOperationCallback(),
|
|
347
347
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem)
|
|
348
|
-
},
|
|
348
|
+
},
|
|
349
349
|
{
|
|
350
350
|
icon: "remove",
|
|
351
351
|
text: SDKUI_Localizator.CancelCheckOut,
|
|
352
352
|
disabled: !cicoEnabled || !checkoutStatus.isCheckedOut || checkoutStatus.mode === 'lockMode' || disabledForSingleRow(selectedItems, focusedItem),
|
|
353
353
|
onClick: () => handleCheckOutOperationCallback(false),
|
|
354
354
|
},
|
|
355
|
-
{
|
|
356
|
-
icon: "clock",
|
|
357
|
-
text: SDKUI_Localizator.History,
|
|
358
|
-
disabled: checkoutStatus.version === 1 || disabledForSingleRow(selectedItems, focusedItem),
|
|
359
|
-
onClick: viewHistoryCallback,
|
|
360
|
-
},
|
|
361
355
|
{
|
|
362
356
|
icon: "info",
|
|
363
357
|
text: SDKUI_Localizator.CheckoutInfo,
|
|
364
358
|
onClick: showCheckoutInformationFormCallback,
|
|
365
359
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
366
360
|
},
|
|
367
|
-
|
|
361
|
+
{
|
|
368
362
|
icon: "copy",
|
|
369
363
|
text: SDKUI_Localizator.CopyCheckoutPath,
|
|
370
|
-
|
|
364
|
+
onClick: infoCheckCopyToClipboard,
|
|
371
365
|
disabled: !checkoutStatus.isCheckedOut || disabledForSingleRow(selectedItems, focusedItem)
|
|
372
|
-
},
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
icon: "clock",
|
|
369
|
+
text: SDKUI_Localizator.History,
|
|
370
|
+
disabled: checkoutStatus.version === 1 || disabledForSingleRow(selectedItems, focusedItem),
|
|
371
|
+
onClick: viewHistoryCallback,
|
|
372
|
+
},
|
|
373
373
|
]
|
|
374
374
|
};
|
|
375
375
|
};
|
|
@@ -684,7 +684,7 @@ export const getCommandsMenuItems = (isMobile, dtd, allUsers, selectedItems, foc
|
|
|
684
684
|
]
|
|
685
685
|
},
|
|
686
686
|
signatureMenuItem(),
|
|
687
|
-
|
|
687
|
+
checkinMenuItem(),
|
|
688
688
|
relationsMenuItem(),
|
|
689
689
|
sharedDcmtsMenuItem(),
|
|
690
690
|
// shareMenuItem(),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InvoiceRetrieveFormats, ObjectClasses, OrderRetrieveFormats } from "@topconsultnpm/sdk-ts";
|
|
2
|
+
import { CheckoutInfo } from "./checkinCheckoutManager";
|
|
2
3
|
export declare const dcmtsFileCacheDownload: Map<string, File>;
|
|
3
4
|
export declare const dcmtsFileCachePreview: Map<string, File>;
|
|
4
5
|
export declare const CACHE_SIZE_LIMIT = 10;
|
|
@@ -16,8 +17,8 @@ export declare class UserSettings {
|
|
|
16
17
|
searchSettings: SearchSettings;
|
|
17
18
|
themeSettings: ThemeSettings;
|
|
18
19
|
dcmtFormSettings: DcmtFormSettings[];
|
|
19
|
-
wgDraftCheckoutInfo:
|
|
20
|
-
dcmtCheckoutInfo:
|
|
20
|
+
wgDraftCheckoutInfo: CheckoutInfo[];
|
|
21
|
+
dcmtCheckoutInfo: CheckoutInfo[];
|
|
21
22
|
defaultCheckInOutFolder: string;
|
|
22
23
|
constructor(skipCssUpdate?: boolean);
|
|
23
24
|
/** Load settings from local storage or other sources */
|
|
@@ -86,18 +87,6 @@ export declare class DcmtFormSettings {
|
|
|
86
87
|
};
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
export interface WgDraftCheckoutInfo {
|
|
90
|
-
DID: string;
|
|
91
|
-
TID: string;
|
|
92
|
-
checkoutFolder: string;
|
|
93
|
-
checkoutName: string;
|
|
94
|
-
}
|
|
95
|
-
export interface DcmtCheckoutInfo {
|
|
96
|
-
DID: string;
|
|
97
|
-
TID: string;
|
|
98
|
-
checkoutFolder: string;
|
|
99
|
-
checkoutName: string;
|
|
100
|
-
}
|
|
101
90
|
export declare class SDKUI_Globals {
|
|
102
91
|
static userSettings: UserSettings;
|
|
103
92
|
}
|
|
@@ -33,6 +33,7 @@ export declare class SDKUI_Localizator {
|
|
|
33
33
|
static get AllPriorities(): "Alle Prioritäten" | "All priorities" | "Todas las prioridades" | "Toutes les priorités" | "Todas as prioridades" | "Tutte le priorità";
|
|
34
34
|
static get AllStates(): "Alle Staaten" | "All states" | "Todos los estados" | "Tous les états" | "Todos os estados" | "Tutti gli stati";
|
|
35
35
|
static get Alphabetic(): "Alphabetisch" | "Alphabetic" | "Alfabético" | "Alphabétique" | "Alfabética" | "Alfabetico";
|
|
36
|
+
static get Anomalies(): "Anomalien" | "Anomalies" | "Anomalías" | "Anomalias" | "Anomalie";
|
|
36
37
|
static get Answer(): "Antwort" | "Answer" | "Respuesta" | "Réponse" | "Resposta" | "Risposta";
|
|
37
38
|
static get AnswerTooltip(): "Die Antwort kann nur bearbeitet werden, wenn der Aktivitätsstatus \"Abgeschlossen\", \"Ausstehend\" oder \"Verschoben\" ist." | "The answer can be edited only if the activity status is \"Completed\", \"Pending\", or \"Deferred\"." | "La respuesta solo se puede editar si el estado de la actividad es \"Completada\", \"Pendiente\" o \"Pospuesta\"." | "La réponse peut être modifiée uniquement si l'état de l’activité est \"Terminée\", \"En attente\" ou \"Reportée\"." | "A resposta só pode ser editada se o estado da atividade for \"Concluída\", \"Pendente\" ou \"Adiada\"." | "La risposta può essere modificata solo se lo stato dell’attività è \"Completata\", \"In attesa\" o \"Rinviata\".";
|
|
38
39
|
static get Application(): "Anwendung" | "Application" | "Aplicación" | "Aplicação" | "Applicazione";
|
|
@@ -88,7 +89,9 @@ export declare class SDKUI_Localizator {
|
|
|
88
89
|
static get ChangePassword(): "Kennwort ändern" | "Change password" | "Cambiar la contraseña" | "Changer le mot de passe" | "Alterar a senha" | "Cambia password";
|
|
89
90
|
static get CharactersRemaining(): "verbleibende Zeichen" | "characters remaining" | "caracteres restantes" | "caractères restants" | "caratteri rimanenti";
|
|
90
91
|
static get CheckIn(): "Check in" | "Enregistrement";
|
|
92
|
+
static get CheckInElementConfirm(): string;
|
|
91
93
|
static get CheckInOutSettingsNotice(): string;
|
|
94
|
+
static get CheckInSuccessMessage(): string;
|
|
92
95
|
static get Checkmark(): "Häkchen" | "Checkmark" | "Marca de verificación" | "Coche" | "Marca de verificação" | "Spunta";
|
|
93
96
|
static get CheckOut(): "Check out" | "Extraction";
|
|
94
97
|
static get CheckoutInfo(): string;
|
|
@@ -130,6 +133,7 @@ export declare class SDKUI_Localizator {
|
|
|
130
133
|
static get CreateContextualTask(): string;
|
|
131
134
|
static get CreationTime(): "Erstellungsdatum" | "Creation Time" | "Fecha creación" | "Date de création" | "Data de criação" | "Data creazione";
|
|
132
135
|
static get CultureID(): "Sprache" | "Language" | "Idioma" | "Lingue" | "Língua" | "Lingua";
|
|
136
|
+
static get Current(): "Aktuell" | "Current" | "Actual" | "Actuel" | "Atual" | "Corrente";
|
|
133
137
|
static get CurrentUserExtract(): string;
|
|
134
138
|
static get Cut(): "Ausschneiden" | "Cut" | "Cortar" | "Couper" | "Taglia";
|
|
135
139
|
static get Date(): "Datum" | "Date" | "fecha" | "Data";
|
|
@@ -215,6 +219,7 @@ export declare class SDKUI_Localizator {
|
|
|
215
219
|
static get EditorConfiguration(): string;
|
|
216
220
|
static get ElectronicInvoice(): "Elektronische Rechnung" | "Electronic invoice" | "Factura electrónica" | "Facture électronique" | "Fatura eletrônica" | "Fattura elettronica";
|
|
217
221
|
static get ElectronicOrder(): "Elektronische Bestellung" | "Electronic order" | "Orden electrónica" | "Commande électronique" | "Pedido eletrônico" | "Ordine elettronico";
|
|
222
|
+
static get ElementNameConventionError(): string;
|
|
218
223
|
static get EmailIsNotValid(): "Dies ist keine gültige e-mail Adresse" | "This is not a valid email address" | "Esta no es una dirección de correo electrónico válida." | "Cette adresse email n'est pas valide" | "Este não é um endereço de e-mail válido" | "Questo non è un indirizzo e-mail valido";
|
|
219
224
|
static get EndDateMatchesToday(): "Das Ablaufdatum entspricht dem heutigen Datum" | "The expiration date matches today's date" | "La fecha de vencimiento coincide con la fecha de hoy" | "La date d'expiration correspond à la date d'aujourd'hui" | "A data de expiração coincide com a data de hoje" | "La data di scadenza coincide con la data odierna";
|
|
220
225
|
static get EndDateSetForTomorrow(): "Das Ablaufdatum ist für morgen festgelegt" | "The expiration date is set for tomorrow" | "La fecha de vencimiento está fijada para mañana" | "La date d'expiration est fixée pour demain" | "A data de expiração está marcada para amanhã" | "La data di scadenza è imminente (ovvero fissata per domani)";
|
|
@@ -235,6 +240,7 @@ export declare class SDKUI_Localizator {
|
|
|
235
240
|
static get ExtractedFromOtherUser(): string;
|
|
236
241
|
static get ExtractedOn(): "Ausgezogen am" | "Extracted on" | "Extraído el" | "Extrait le" | "Extraído em" | "Estratto il";
|
|
237
242
|
static get EvaluateResult(): "Bewerten Sie das Ergebnis" | "Evaluate result" | "Valorar el resultado" | "Évalue les résultats" | "Avalia os resultados" | "Valuta il risultato";
|
|
243
|
+
static get Expected(): "Erwartet" | "Expected" | "Esperado" | "Attendu" | "Atteso";
|
|
238
244
|
static get Expiration(): "Ablaufdatum" | "Expiration" | "Fecha de expiración" | "Date d'expiration" | "Data de expiração" | "Scadenza";
|
|
239
245
|
static get ExpertMode(): "Expertenmodus" | "Expert mode" | "Modo experto" | "Mode expert" | "Modo especialista" | "Modalità esperto";
|
|
240
246
|
static get Expiring(): "Ablaufend" | "Expiring" | "Por vencer" | "Expirant" | "Vencendo" | "In scadenza";
|
|
@@ -493,6 +499,7 @@ export declare class SDKUI_Localizator {
|
|
|
493
499
|
static get Previous(): "Vorherige" | "Previous" | "Anterior" | "Précédent" | "Precedente";
|
|
494
500
|
static get Priority(): string;
|
|
495
501
|
static get PriorityLegend(): "Legende der Prioritäten" | "Priority Legend" | "Leyenda de prioridades" | "Légende des priorités" | "Lenda das prioridades" | "Legenda delle priorità";
|
|
502
|
+
static get ProceedAnyway(): "Dennoch fortfahren?" | "Proceed anyway?" | "¿Proceder de todos modos?" | "Procéder quand même ?" | "Prosseguir mesmo assim?" | "Procedere comunque?";
|
|
496
503
|
static get ProcessedItems(): "Durchdachte Elemente" | "Processed items" | "Elementos elaborados" | "Items traités" | "Itens processados" | "Elementi elaborati";
|
|
497
504
|
static get Properties(): "Eigenschaften" | "Properties" | "Propiedades" | "Propriétés" | "Propriedades" | "Proprietà";
|
|
498
505
|
static get QueryClear(): "Query bereinigen" | "Clear query" | "Limpiar consulta" | "Efface query" | "Limpar query" | "Pulisci query";
|
|
@@ -278,6 +278,16 @@ export class SDKUI_Localizator {
|
|
|
278
278
|
default: return "Alfabetico";
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
+
static get Anomalies() {
|
|
282
|
+
switch (this._cultureID) {
|
|
283
|
+
case CultureIDs.De_DE: return "Anomalien";
|
|
284
|
+
case CultureIDs.En_US: return "Anomalies";
|
|
285
|
+
case CultureIDs.Es_ES: return "Anomalías";
|
|
286
|
+
case CultureIDs.Fr_FR: return "Anomalies";
|
|
287
|
+
case CultureIDs.Pt_PT: return "Anomalias";
|
|
288
|
+
default: return "Anomalie";
|
|
289
|
+
}
|
|
290
|
+
}
|
|
281
291
|
static get Answer() {
|
|
282
292
|
switch (this._cultureID) {
|
|
283
293
|
case CultureIDs.De_DE: return "Antwort";
|
|
@@ -835,6 +845,22 @@ export class SDKUI_Localizator {
|
|
|
835
845
|
default: return "Check in";
|
|
836
846
|
}
|
|
837
847
|
}
|
|
848
|
+
static get CheckInElementConfirm() {
|
|
849
|
+
switch (this._cultureID) {
|
|
850
|
+
case CultureIDs.De_DE:
|
|
851
|
+
return "Das Element '{{0}}' einchecken?";
|
|
852
|
+
case CultureIDs.En_US:
|
|
853
|
+
return "Check in the element '{{0}}'?";
|
|
854
|
+
case CultureIDs.Es_ES:
|
|
855
|
+
return "¿Realizar el check-in del elemento '{{0}}'?";
|
|
856
|
+
case CultureIDs.Fr_FR:
|
|
857
|
+
return "Effectuer le check-in de l’élément '{{0}}'?";
|
|
858
|
+
case CultureIDs.Pt_PT:
|
|
859
|
+
return "Efetuar o check-in do elemento '{{0}}'?";
|
|
860
|
+
default:
|
|
861
|
+
return "Eseguire il check-in dell’elemento '{{0}}'?";
|
|
862
|
+
}
|
|
863
|
+
}
|
|
838
864
|
static get CheckInOutSettingsNotice() {
|
|
839
865
|
switch (this._cultureID) {
|
|
840
866
|
case CultureIDs.De_DE:
|
|
@@ -852,6 +878,22 @@ export class SDKUI_Localizator {
|
|
|
852
878
|
return "Puoi modificare questa impostazione in “Ricerca → Check in/Check out” in qualsiasi momento.";
|
|
853
879
|
}
|
|
854
880
|
}
|
|
881
|
+
static get CheckInSuccessMessage() {
|
|
882
|
+
switch (this._cultureID) {
|
|
883
|
+
case CultureIDs.De_DE:
|
|
884
|
+
return "Check-in erfolgreich abgeschlossen! Löschen Sie die Datei aus dem Dateisystem.";
|
|
885
|
+
case CultureIDs.En_US:
|
|
886
|
+
return "Check-in completed successfully! Delete the document from the file system.";
|
|
887
|
+
case CultureIDs.Es_ES:
|
|
888
|
+
return "¡Check-in completado con éxito! Elimine el archivo del sistema de archivos.";
|
|
889
|
+
case CultureIDs.Fr_FR:
|
|
890
|
+
return "Check-in terminé avec succès ! Supprimez le fichier du système de fichiers.";
|
|
891
|
+
case CultureIDs.Pt_PT:
|
|
892
|
+
return "Check-in concluído com sucesso! Elimine o ficheiro do sistema de ficheiros.";
|
|
893
|
+
default:
|
|
894
|
+
return "Check-in completato con successo! Cancella il documento dal file system.";
|
|
895
|
+
}
|
|
896
|
+
}
|
|
855
897
|
static get Checkmark() {
|
|
856
898
|
switch (this._cultureID) {
|
|
857
899
|
case CultureIDs.De_DE: return "Häkchen";
|
|
@@ -1274,6 +1316,16 @@ export class SDKUI_Localizator {
|
|
|
1274
1316
|
default: return "Lingua";
|
|
1275
1317
|
}
|
|
1276
1318
|
}
|
|
1319
|
+
static get Current() {
|
|
1320
|
+
switch (this._cultureID) {
|
|
1321
|
+
case CultureIDs.De_DE: return "Aktuell";
|
|
1322
|
+
case CultureIDs.En_US: return "Current";
|
|
1323
|
+
case CultureIDs.Es_ES: return "Actual";
|
|
1324
|
+
case CultureIDs.Fr_FR: return "Actuel";
|
|
1325
|
+
case CultureIDs.Pt_PT: return "Atual";
|
|
1326
|
+
default: return "Corrente";
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1277
1329
|
static get CurrentUserExtract() {
|
|
1278
1330
|
switch (this._cultureID) {
|
|
1279
1331
|
case CultureIDs.De_DE: return "Auszug aus dem aktuellen Benutzer und änderbar";
|
|
@@ -2093,6 +2145,22 @@ export class SDKUI_Localizator {
|
|
|
2093
2145
|
default: return "Ordine elettronico";
|
|
2094
2146
|
}
|
|
2095
2147
|
}
|
|
2148
|
+
static get ElementNameConventionError() {
|
|
2149
|
+
switch (this._cultureID) {
|
|
2150
|
+
case CultureIDs.De_DE:
|
|
2151
|
+
return "Der Name des Elements ist nicht konform";
|
|
2152
|
+
case CultureIDs.En_US:
|
|
2153
|
+
return "The element name does not comply";
|
|
2154
|
+
case CultureIDs.Es_ES:
|
|
2155
|
+
return "El nombre del elemento no es conforme";
|
|
2156
|
+
case CultureIDs.Fr_FR:
|
|
2157
|
+
return "Le nom de l’élément n’est pas conforme";
|
|
2158
|
+
case CultureIDs.Pt_PT:
|
|
2159
|
+
return "O nome do elemento não está conforme";
|
|
2160
|
+
default:
|
|
2161
|
+
return "Il nome dell’elemento non è conforme";
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2096
2164
|
static get EmailIsNotValid() {
|
|
2097
2165
|
switch (this._cultureID) {
|
|
2098
2166
|
case CultureIDs.De_DE: return "Dies ist keine gültige e-mail Adresse";
|
|
@@ -2299,6 +2367,16 @@ export class SDKUI_Localizator {
|
|
|
2299
2367
|
default: return "Valuta il risultato";
|
|
2300
2368
|
}
|
|
2301
2369
|
}
|
|
2370
|
+
static get Expected() {
|
|
2371
|
+
switch (this._cultureID) {
|
|
2372
|
+
case CultureIDs.De_DE: return "Erwartet";
|
|
2373
|
+
case CultureIDs.En_US: return "Expected";
|
|
2374
|
+
case CultureIDs.Es_ES: return "Esperado";
|
|
2375
|
+
case CultureIDs.Fr_FR: return "Attendu";
|
|
2376
|
+
case CultureIDs.Pt_PT: return "Esperado";
|
|
2377
|
+
default: return "Atteso";
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2302
2380
|
static get Expiration() {
|
|
2303
2381
|
switch (this._cultureID) {
|
|
2304
2382
|
case CultureIDs.De_DE: return "Ablaufdatum";
|
|
@@ -4870,6 +4948,16 @@ export class SDKUI_Localizator {
|
|
|
4870
4948
|
default: return "Legenda delle priorità";
|
|
4871
4949
|
}
|
|
4872
4950
|
}
|
|
4951
|
+
static get ProceedAnyway() {
|
|
4952
|
+
switch (this._cultureID) {
|
|
4953
|
+
case CultureIDs.De_DE: return "Dennoch fortfahren?";
|
|
4954
|
+
case CultureIDs.En_US: return "Proceed anyway?";
|
|
4955
|
+
case CultureIDs.Es_ES: return "¿Proceder de todos modos?";
|
|
4956
|
+
case CultureIDs.Fr_FR: return "Procéder quand même ?";
|
|
4957
|
+
case CultureIDs.Pt_PT: return "Prosseguir mesmo assim?";
|
|
4958
|
+
default: return "Procedere comunque?";
|
|
4959
|
+
}
|
|
4960
|
+
}
|
|
4873
4961
|
static get ProcessedItems() {
|
|
4874
4962
|
switch (this._cultureID) {
|
|
4875
4963
|
case CultureIDs.De_DE: return "Durchdachte Elemente";
|
package/lib/helper/TMUtils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FileItem } from '../components';
|
|
3
|
+
import { DataColumnDescriptor, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
4
|
export declare const getFileIcon: (fileExtension: string | undefined, fileCount: number | undefined, tooltipContent?: JSX.Element | string) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
export declare function formatBytes(bytes: number | undefined, decimalPlaces?: number): string;
|
|
5
6
|
export interface RowData {
|
|
@@ -64,4 +65,5 @@ export declare const parseSignatureConfiguration: (did: number, informationSign:
|
|
|
64
65
|
allowCopyright: boolean;
|
|
65
66
|
copyrightValue: string;
|
|
66
67
|
};
|
|
68
|
+
export declare const convertSearchResultDescriptorToFileItems: (documents: Array<SearchResultDescriptor>) => Array<FileItem>;
|
|
67
69
|
export {};
|
package/lib/helper/TMUtils.js
CHANGED
|
@@ -382,3 +382,54 @@ export const parseSignatureConfiguration = (did, informationSign, firstName, las
|
|
|
382
382
|
throw error;
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
|
+
export const convertSearchResultDescriptorToFileItems = (documents) => {
|
|
386
|
+
const fileItems = [];
|
|
387
|
+
documents.forEach((doc, docIndex) => {
|
|
388
|
+
const columns = doc.dtdResult?.columns || [];
|
|
389
|
+
const rows = doc.dtdResult?.rows || [];
|
|
390
|
+
// Map column captions to their indexes for quick lookup
|
|
391
|
+
const colIndexMap = {};
|
|
392
|
+
columns.forEach((col, i) => {
|
|
393
|
+
if (col.caption !== undefined) {
|
|
394
|
+
colIndexMap[col.caption] = i;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
const getVal = (row, caption) => {
|
|
398
|
+
const idx = colIndexMap[caption];
|
|
399
|
+
return idx !== undefined ? row[idx] : undefined;
|
|
400
|
+
};
|
|
401
|
+
rows.forEach((row, rowIndex) => {
|
|
402
|
+
let baseName = doc.fromName || `Document ${docIndex + 1}`;
|
|
403
|
+
const did = getVal(row, 'DID');
|
|
404
|
+
const fileExt = getVal(row, 'FileExt');
|
|
405
|
+
const tid = getVal(row, 'TID');
|
|
406
|
+
const fileSize = getVal(row, 'FileSize');
|
|
407
|
+
if (did) {
|
|
408
|
+
baseName += ` (DID: ${did})`;
|
|
409
|
+
}
|
|
410
|
+
if (fileExt) {
|
|
411
|
+
baseName += `.${fileExt}`;
|
|
412
|
+
}
|
|
413
|
+
fileItems.push({
|
|
414
|
+
id: did ? Number(did) : Number(`${docIndex}${rowIndex}`),
|
|
415
|
+
name: baseName,
|
|
416
|
+
isDirectory: false,
|
|
417
|
+
items: [],
|
|
418
|
+
tid: tid !== undefined ? Number(tid) : undefined,
|
|
419
|
+
did: did !== undefined ? Number(did) : undefined,
|
|
420
|
+
ext: fileExt ?? undefined,
|
|
421
|
+
size: fileSize !== undefined ? Number(fileSize) : 1,
|
|
422
|
+
creationTime: undefined,
|
|
423
|
+
lastUpdateTime: undefined,
|
|
424
|
+
updaterID: undefined,
|
|
425
|
+
updaterName: undefined,
|
|
426
|
+
description: undefined,
|
|
427
|
+
checkOutUserID: undefined,
|
|
428
|
+
checkOutUserName: undefined,
|
|
429
|
+
checkoutDate: null,
|
|
430
|
+
version: undefined,
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
return fileItems;
|
|
435
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DcmtTypeDescriptor, FileDescriptor, UserDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { DcmtInfo, DownloadModes, DownloadTypes } from "../ts/types";
|
|
4
|
+
import { FileItem } from "../components";
|
|
5
|
+
/**
|
|
6
|
+
* Check-in/Check-out Manager
|
|
7
|
+
* Questo modulo gestisce tutte le operazioni di check-in e check-out
|
|
8
|
+
* dei documenti e delle bozze dei gruppi di lavoro.
|
|
9
|
+
*/
|
|
10
|
+
export interface CheckoutInfo {
|
|
11
|
+
DID: string;
|
|
12
|
+
TID: string;
|
|
13
|
+
checkoutFolder: string;
|
|
14
|
+
checkoutName: string;
|
|
15
|
+
}
|
|
16
|
+
interface CheckoutStatusResult {
|
|
17
|
+
isCheckedOut: boolean;
|
|
18
|
+
mode: 'editMode' | 'lockMode' | '';
|
|
19
|
+
version: number;
|
|
20
|
+
icon: React.ReactNode | null;
|
|
21
|
+
}
|
|
22
|
+
export type DownloadSource = {
|
|
23
|
+
type: 'fileItem';
|
|
24
|
+
fileItem: FileItem;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'dcmtInfo';
|
|
27
|
+
dcmtInfo: DcmtInfo;
|
|
28
|
+
originalFileName: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const getCicoDownloadFileName: (source: DownloadSource, checkout: boolean, withTimestampAndExt: boolean) => string;
|
|
31
|
+
export declare const cicoDownloadFilesCallback: (sources: Array<DownloadSource>, checkout: boolean, downloadDcmtsAsync: (inputDcmts: Array<DcmtInfo> | undefined, downloadType?: DownloadTypes, downloadMode?: DownloadModes, onFileDownloaded?: (dcmtFile: File) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => Promise<void>) => Promise<void>;
|
|
32
|
+
export declare const updateCheckoutItem: (item: CheckoutInfo, type: "fileItem" | "dcmtInfo", action?: "addOrUpdate" | "remove") => void;
|
|
33
|
+
export declare const validateCicoFileName: (source: DownloadSource, fileName: string) => FileNameValidation;
|
|
34
|
+
type ValidationResult = {
|
|
35
|
+
expected: string | number | undefined;
|
|
36
|
+
current: string | number | undefined;
|
|
37
|
+
isValid: boolean;
|
|
38
|
+
};
|
|
39
|
+
type FileNameValidationItems = {
|
|
40
|
+
name: ValidationResult;
|
|
41
|
+
archiveID: ValidationResult;
|
|
42
|
+
did: ValidationResult;
|
|
43
|
+
tid: ValidationResult;
|
|
44
|
+
fileExtension: ValidationResult;
|
|
45
|
+
};
|
|
46
|
+
type FileNameValidation = {
|
|
47
|
+
isValid: boolean;
|
|
48
|
+
validationResults?: FileNameValidationItems;
|
|
49
|
+
};
|
|
50
|
+
export declare const renderCicoCheckInContent: (source: DownloadSource, selectedFilename: File, isValid: boolean, validationItems: FileNameValidationItems | undefined, color?: string) => React.ReactNode;
|
|
51
|
+
export declare const getDcmtCicoStatus: (dcmt: any, allUsers: Array<UserDescriptor>, dtd: DcmtTypeDescriptor | undefined) => {
|
|
52
|
+
cicoEnabled: boolean;
|
|
53
|
+
checkoutStatus: CheckoutStatusResult;
|
|
54
|
+
};
|
|
55
|
+
export {};
|