@topconsultnpm/sdkui-react 6.22.0-dev2.8 → 6.22.0-t1
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/TMButton.d.ts +0 -13
- package/lib/components/base/TMButton.js +5 -137
- package/lib/components/base/TMDataGridExportForm.js +30 -39
- package/lib/components/editors/TMDateBox.d.ts +1 -16
- package/lib/components/editors/TMDateBox.js +22 -90
- package/lib/components/editors/TMMetadataEditor.js +20 -19
- package/lib/components/editors/TMTextArea.d.ts +0 -1
- package/lib/components/editors/TMTextArea.js +15 -23
- package/lib/components/editors/TMTextBox.d.ts +0 -2
- package/lib/components/editors/TMTextBox.js +19 -30
- package/lib/components/features/documents/TMDcmtForm.js +3 -55
- package/lib/components/features/documents/TMRelationViewer.js +32 -13
- package/lib/components/features/search/TMSearch.js +16 -29
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -1
- package/lib/components/features/search/TMSearchQueryPanel.js +7 -28
- package/lib/components/features/search/TMSearchResult.js +38 -10
- package/lib/components/viewers/TMMidViewer.js +1 -1
- package/lib/helper/Globalization.d.ts +1 -1
- package/lib/helper/SDKUI_Localizator.d.ts +0 -11
- package/lib/helper/SDKUI_Localizator.js +0 -110
- package/lib/helper/TMUtils.d.ts +1 -29
- package/lib/helper/TMUtils.js +10 -249
- package/lib/helper/helpers.d.ts +0 -11
- package/lib/helper/helpers.js +0 -32
- package/package.json +2 -2
|
@@ -76,7 +76,6 @@ export declare class SDKUI_Localizator {
|
|
|
76
76
|
static get CustomButtonAction(): string;
|
|
77
77
|
static get CustomButtonActions(): string;
|
|
78
78
|
static get Back(): "Zurück" | "Back" | "Atrás" | "Dos" | "Voltar" | "Indietro";
|
|
79
|
-
static get BackToResult(): "Zum Ergebnis" | "Go to result" | "Ir al resultado" | "Aller au résultat" | "Ir para o resultado" | "Vai a risultato";
|
|
80
79
|
static get BatchUpdate(): "Mehrfachbearbeitung" | "Multiple modification" | "Modificación múltiple" | "Modifie multiple" | "Editar múltipla" | "Modifica multipla";
|
|
81
80
|
static get BlogCase(): "Anschlagbrett" | "Blog board" | "Tablón" | "Tableau d'affichage" | "Bakeca" | "Bacheca";
|
|
82
81
|
static get Blog_Read(): "Anzeigebrett lesen" | "Reading blog board" | "Lectura tablón" | "Lire le tableau d'affichage" | "Quadro de avisos leitura" | "Lettura bacheca";
|
|
@@ -311,7 +310,6 @@ export declare class SDKUI_Localizator {
|
|
|
311
310
|
static get FEFormats_ASWEX_PDF(): "Extended AssoSoftware Style Sheet (PDF)" | "Hoja de estilo extendido AssoSoftware (PDF)" | "Feuille de style étendu AssoSoftware (PDF)" | "Folha de estilo extendido AssoSoftware (PDF)" | "Foglio di stile esteso AssoSoftware (PDF)";
|
|
312
311
|
static get FEFormats_SDI_HTML(): "SdI Style Sheet (HTML)" | "Hoja de estilo SdI (HTML)" | "Feuille de style SdI (HTML)" | "Folha de estilo SdI (HTML)" | "Foglio di stile SdI (HTML)";
|
|
313
312
|
static get FEFormats_SDI_PDF(): "SdI Style Sheet (PDF)" | "Hoja de estilo SdI (PDF)" | "Feuille de style SdI (PDF)" | "Folha de estilo SdI (PDF)" | "Foglio di stile SdI (PDF)";
|
|
314
|
-
static get Field(): string;
|
|
315
313
|
static get FileCheck(): string;
|
|
316
314
|
static get FileExtensionNotViewable(): string;
|
|
317
315
|
static get FileConversion(): string;
|
|
@@ -326,7 +324,6 @@ export declare class SDKUI_Localizator {
|
|
|
326
324
|
static get FolderIsEmpty(): string;
|
|
327
325
|
static get ForgetPassword(): "Passwort vergessen" | "Forgot password" | "Has olvidado tu contraseña" | "Mot de passe oublié" | "Esqueceu sua senha" | "Password dimenticata";
|
|
328
326
|
static get Format(): "Format" | "Formato";
|
|
329
|
-
static get FormatNotRespected(): "\"{{0}}\" entspricht nicht dem erforderlichen Format ({{1}})." | "\"{{0}}\" does not match the required format ({{1}})." | "\"{{0}}\" no respeta el formato requerido ({{1}})." | "\"{{0}}\" ne respecte pas le format requis ({{1}})." | "\"{{0}}\" não respeita o formato exigido ({{1}})." | "\"{{0}}\" non rispetta il formato richiesto ({{1}}).";
|
|
330
327
|
static get Formats_None(): "Originale (XML)" | "Original (XML)";
|
|
331
328
|
static get Formula(): "Formel" | "Formula" | "Fórmula" | "Formule";
|
|
332
329
|
static get FormulaEditor_Function_TM_GetViewLink_WithDate(): "mit Verfallsdatum" | "with expiration date" | "con fecha de finalización" | "avec date d'expiration" | "com data de validade" | "con data di scadenza";
|
|
@@ -434,9 +431,6 @@ export declare class SDKUI_Localizator {
|
|
|
434
431
|
static get Interval(): "Intervall" | "Interval" | "Intervalo" | "Intervalle" | "Intervallo";
|
|
435
432
|
static get Invalid_File(): "Ungültige datei" | "Invalid file" | "Archivo inválido" | "Fichier non valide" | "Arquivo inválido" | "File non valido";
|
|
436
433
|
static get InvalidDcmt(): "Ungültiges Dokument" | "Invalid document" | "Documento inválido" | "Document non valide" | "Documento non valido";
|
|
437
|
-
static get InvalidEmailAddress(): "\"{{0}}\" ist keine gültige E-Mail-Adresse." | "\"{{0}}\" is not a valid e-mail address." | "\"{{0}}\" no es una dirección de correo electrónico válida." | "\"{{0}}\" n'est pas une adresse e-mail valide." | "\"{{0}}\" não é um endereço de e-mail válido." | "\"{{0}}\" non è un indirizzo e-mail valido.";
|
|
438
|
-
static get InvalidTaxCode(): "\"{{0}}\" ist kein gültiger Steuerkennzeichen." | "\"{{0}}\" is not a valid Tax Code." | "\"{{0}}\" no es un Código Fiscal válido." | "\"{{0}}\" n'est pas un Code Fiscal valide." | "\"{{0}}\" não é um Código Fiscal válido." | "\"{{0}}\" non è un Codice Fiscale valido.";
|
|
439
|
-
static get InvalidVatNumber(): "\"{{0}}\" ist keine gültige Umsatzsteuer-Identifikationsnummer (11 Ziffern)." | "\"{{0}}\" is not a valid VAT number (11 digits)." | "\"{{0}}\" no es un número de IVA válido (11 dígitos)." | "\"{{0}}\" n'est pas un numéro de TVA valide (11 chiffres)." | "\"{{0}}\" não é um número de IVA válido (11 dígitos)." | "\"{{0}}\" non è una Partita IVA valida (11 cifre).";
|
|
440
434
|
static get InvoiceRetrieveFormat(): "Exportieren Sie die Rechnung im folgenden Format" | "Export invoice in the following format" | "Exportar la factura en el siguiente formato" | "Exportez la facture au format suivant" | "Exporte a fatura no seguinte formato" | "Esporta la fattura nel seguente formato";
|
|
441
435
|
static get LandingPage(): string;
|
|
442
436
|
static get LastRead(): string;
|
|
@@ -472,7 +466,6 @@ export declare class SDKUI_Localizator {
|
|
|
472
466
|
static get Match(): "Übereinstimmen" | "Match" | "Emparejar" | "Associer" | "Corresponder" | "Abbina";
|
|
473
467
|
static get MatchManyDocumentsManyToMany(): "Mehrere Dokumente mehrfach zuordnen" | "Match many documents many to many" | "Emparejar muchos documentos de muchos a muchos" | "Associer plusieurs documents plusieurs à plusieurs" | "Corresponder muitos documentos de muitos para muitos" | "Abbina documenti molti a molti";
|
|
474
468
|
static get Max_Value(): "Der Maximalwert ist {{0}}" | "The maximum value is {{0}}" | "El valor máximo es {{0}}" | "La valeur maximale est {{0}}" | "O valor máximo é {{0}}" | "Il valore massimo è {{0}}";
|
|
475
|
-
static get MaxLengthExceeded(): "\"{{0}}\" hat die maximale Länge von {{1}} Zeichen überschritten." | "\"{{0}}\" has exceeded the maximum length of {{1}} characters." | "\"{{0}}\" ha superado la longitud máxima de {{1}} caracteres." | "\"{{0}}\" a dépassé la longueur maximale de {{1}} caractères." | "\"{{0}}\" excedeu o comprimento máximo de {{1}} caracteres." | "\"{{0}}\" ha superato la lunghezza massima di {{1}} caratteri.";
|
|
476
469
|
static get MaxDcmtsToBeReturned(): "Maximale Anzahl von Dokumenten" | "Max number of documents" | "Número máximo de documentos" | "Nombre maximum de documents" | "O número máximo de documentos" | "Numero massimo di documenti";
|
|
477
470
|
static get Maximize(): "Maximieren" | "Maximize" | "Maximizar" | "Maximiser" | "Massimizza";
|
|
478
471
|
static get MetadataFlag(): "Markieren von Methadaten" | "Flag metadata" | "Metadato de indicador" | "Mètadonnée de marque" | "Marcação de metadados" | "Metadato di contrassegno";
|
|
@@ -602,7 +595,6 @@ export declare class SDKUI_Localizator {
|
|
|
602
595
|
static get Password(): "Passwort" | "Password" | "Contraseña" | "Mot de passe" | "Senha";
|
|
603
596
|
static get PassToArchive(): "Zur Archivierung übergeben" | "Pass to archive" | "Pasar a archivo" | "Passer à l'archivage" | "Passar para arquivo" | "Passa ad archiviazione";
|
|
604
597
|
static get PassToSearch(): "Zur Suche übergeben" | "Pass to search" | "Pasar a búsqueda" | "Passer à la recherche" | "Passar para pesquisa" | "Passa a ricerca";
|
|
605
|
-
static get PatternRegex(): "Regex-Muster" | "Regex pattern" | "Patrón regex" | "Motif regex" | "Padrão regex" | "Pattern regex";
|
|
606
598
|
static get PasswordMustContain(): "Das Passwort muss enthalten" | "The password must contain" | "La contraseña debe contener" | "Le mot de passe doit contenir" | "A palavra-passe deve conter" | "La password deve contenere";
|
|
607
599
|
static get PasswordChangedSuccessfully(): "Das Passwort wurde erfolgreich geändert." | "Password changed successfully." | "Contraseña cambiada con éxito." | "Le mot de passe a été changé avec succès." | "Senha alterada com sucesso." | "Password cambiata con successo.";
|
|
608
600
|
static get PasswordContainsUsernameError(): "Das Passwort darf den Benutzernamen nicht enthalten" | "The password cannot contain the username" | "La contraseña no puede contener el nombre de usuario" | "Le mot de passe ne peut pas contenir le nom d'utilisateur" | "A senha não pode conter o nome de usuário" | "La password non può contenere il nome utente";
|
|
@@ -686,8 +678,6 @@ export declare class SDKUI_Localizator {
|
|
|
686
678
|
static get SearchType(): "Suchtyp" | "Search type" | "Tipo de búsqueda" | "Type de recherche" | "Tipo de pesquisa" | "Tipo di ricerca";
|
|
687
679
|
static get Required(): "Obligatorisch" | "Required" | "Obligatorio" | "Obbligatoire" | "Obrigatório" | "Obbligatorio";
|
|
688
680
|
static get RequiredField(): "Erforderliches Feld" | "Required field" | "Campo obligatorio" | "Champ obligatoire" | "Campo obrigatório" | "Campo Obbligatorio";
|
|
689
|
-
static get RequiredFormat(): "Erforderliches Format" | "Required format" | "Formato requerido" | "Format requis" | "Formato obrigatório" | "Formato richiesto";
|
|
690
|
-
static get ValueMustBeDateOrTime(): "Der Wert muss ein Datum oder eine Uhrzeit sein" | "Value must be a date or time" | "El valor debe ser una fecha o una hora" | "La valeur doit être une date ou une heure" | "O valor deve ser uma data ou hora" | "Il valore deve essere una data o un orario";
|
|
691
681
|
static get RequiredNOT(): "Nicht obligatorisch" | "Not mandatory" | "No obligatorio" | "Pas obligatoire" | "Não é obrigatório" | "Non obbligatorio";
|
|
692
682
|
static get Refresh(): "Aktualisieren" | "Refresh" | "Actualizar" | "Mis à jour" | "Refrescar" | "Aggiorna";
|
|
693
683
|
static get Reminder(): "Erinnerung" | "Reminder" | "Recordatorio" | "Rappel" | "Lembrete" | "Promemoria";
|
|
@@ -718,7 +708,6 @@ export declare class SDKUI_Localizator {
|
|
|
718
708
|
static get ScanFeatureUnavailableInThisContext(): "Scanfunktionen sind in diesem Kontext nicht verfugbar." | "Scanning features are not available in this context." | "Las funciones de escaneo no estan disponibles en este contexto." | "Les fonctionnalites de numerisation ne sont pas disponibles dans ce contexte." | "Os recursos de digitalizacao nao estao disponiveis neste contexto." | "Funzionalita di scansione non disponibili in questo contesto.";
|
|
719
709
|
static get Search(): "Auf der Suche nach" | "Search" | "Búsqueda" | "Recherche" | "Pesquisa" | "Ricerca";
|
|
720
710
|
static get SearchAction(): "Search" | "Suche" | "Buscar" | "Chercher" | "Pesquisar" | "Cerca";
|
|
721
|
-
static get SearchAndAppend(): "Suchen und anhängen" | "Search and append" | "Buscar y añadir" | "Rechercher et ajouter" | "Pesquisar e acrescentar" | "Ricerca e accoda";
|
|
722
711
|
static get Search_Advanced(): "Erweiterte Suche" | "Advanced search" | "Búsqueda avanzada" | "Recherche avancée" | "Pesquisa Avançada" | "Ricerca avanzata";
|
|
723
712
|
static get Search_Easy(): "Einfache Suche" | "Easy search" | "Búsqueda fácil" | "Recherche facile" | "Pesquisa fácil" | "Ricerca facilitata";
|
|
724
713
|
static get Search_EnterValue(): "Geben Sie einen Wert ein, nach dem gesucht werden soll" | "Enter a value to search" | "Introducir un valor para buscar" | "Entrez une valeur à rechercher" | "Digite um valor para pesquisar" | "Inserire un valore da ricercare";
|
|
@@ -715,16 +715,6 @@ export class SDKUI_Localizator {
|
|
|
715
715
|
default: return "Indietro";
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
static get BackToResult() {
|
|
719
|
-
switch (this._cultureID) {
|
|
720
|
-
case CultureIDs.De_DE: return "Zum Ergebnis";
|
|
721
|
-
case CultureIDs.En_US: return "Go to result";
|
|
722
|
-
case CultureIDs.Es_ES: return "Ir al resultado";
|
|
723
|
-
case CultureIDs.Fr_FR: return "Aller au résultat";
|
|
724
|
-
case CultureIDs.Pt_PT: return "Ir para o resultado";
|
|
725
|
-
default: return "Vai a risultato";
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
718
|
static get BatchUpdate() {
|
|
729
719
|
switch (this._cultureID) {
|
|
730
720
|
case CultureIDs.De_DE: return "Mehrfachbearbeitung";
|
|
@@ -3077,16 +3067,6 @@ export class SDKUI_Localizator {
|
|
|
3077
3067
|
default: return "Foglio di stile SdI (PDF)";
|
|
3078
3068
|
}
|
|
3079
3069
|
}
|
|
3080
|
-
static get Field() {
|
|
3081
|
-
switch (this._cultureID) {
|
|
3082
|
-
case CultureIDs.De_DE: return "Feld";
|
|
3083
|
-
case CultureIDs.En_US: return "Field";
|
|
3084
|
-
case CultureIDs.Es_ES: return "Campo";
|
|
3085
|
-
case CultureIDs.Fr_FR: return "Champ";
|
|
3086
|
-
case CultureIDs.Pt_PT: return "Campo";
|
|
3087
|
-
default: return "Campo";
|
|
3088
|
-
}
|
|
3089
|
-
}
|
|
3090
3070
|
static get FileCheck() {
|
|
3091
3071
|
switch (this._cultureID) {
|
|
3092
3072
|
case CultureIDs.De_DE: return "Dateikontrolle";
|
|
@@ -3227,16 +3207,6 @@ export class SDKUI_Localizator {
|
|
|
3227
3207
|
default: return "Formato";
|
|
3228
3208
|
}
|
|
3229
3209
|
}
|
|
3230
|
-
static get FormatNotRespected() {
|
|
3231
|
-
switch (this._cultureID) {
|
|
3232
|
-
case CultureIDs.De_DE: return "\"{{0}}\" entspricht nicht dem erforderlichen Format ({{1}}).";
|
|
3233
|
-
case CultureIDs.En_US: return "\"{{0}}\" does not match the required format ({{1}}).";
|
|
3234
|
-
case CultureIDs.Es_ES: return "\"{{0}}\" no respeta el formato requerido ({{1}}).";
|
|
3235
|
-
case CultureIDs.Fr_FR: return "\"{{0}}\" ne respecte pas le format requis ({{1}}).";
|
|
3236
|
-
case CultureIDs.Pt_PT: return "\"{{0}}\" não respeita o formato exigido ({{1}}).";
|
|
3237
|
-
default: return "\"{{0}}\" non rispetta il formato richiesto ({{1}}).";
|
|
3238
|
-
}
|
|
3239
|
-
}
|
|
3240
3210
|
static get Formats_None() {
|
|
3241
3211
|
switch (this._cultureID) {
|
|
3242
3212
|
case CultureIDs.De_DE: return "Originale (XML)";
|
|
@@ -4308,36 +4278,6 @@ export class SDKUI_Localizator {
|
|
|
4308
4278
|
default: return "Documento non valido";
|
|
4309
4279
|
}
|
|
4310
4280
|
}
|
|
4311
|
-
static get InvalidEmailAddress() {
|
|
4312
|
-
switch (this._cultureID) {
|
|
4313
|
-
case CultureIDs.De_DE: return "\"{{0}}\" ist keine gültige E-Mail-Adresse.";
|
|
4314
|
-
case CultureIDs.En_US: return "\"{{0}}\" is not a valid e-mail address.";
|
|
4315
|
-
case CultureIDs.Es_ES: return "\"{{0}}\" no es una dirección de correo electrónico válida.";
|
|
4316
|
-
case CultureIDs.Fr_FR: return "\"{{0}}\" n'est pas une adresse e-mail valide.";
|
|
4317
|
-
case CultureIDs.Pt_PT: return "\"{{0}}\" não é um endereço de e-mail válido.";
|
|
4318
|
-
default: return "\"{{0}}\" non è un indirizzo e-mail valido.";
|
|
4319
|
-
}
|
|
4320
|
-
}
|
|
4321
|
-
static get InvalidTaxCode() {
|
|
4322
|
-
switch (this._cultureID) {
|
|
4323
|
-
case CultureIDs.De_DE: return "\"{{0}}\" ist kein gültiger Steuerkennzeichen.";
|
|
4324
|
-
case CultureIDs.En_US: return "\"{{0}}\" is not a valid Tax Code.";
|
|
4325
|
-
case CultureIDs.Es_ES: return "\"{{0}}\" no es un Código Fiscal válido.";
|
|
4326
|
-
case CultureIDs.Fr_FR: return "\"{{0}}\" n'est pas un Code Fiscal valide.";
|
|
4327
|
-
case CultureIDs.Pt_PT: return "\"{{0}}\" não é um Código Fiscal válido.";
|
|
4328
|
-
default: return "\"{{0}}\" non è un Codice Fiscale valido.";
|
|
4329
|
-
}
|
|
4330
|
-
}
|
|
4331
|
-
static get InvalidVatNumber() {
|
|
4332
|
-
switch (this._cultureID) {
|
|
4333
|
-
case CultureIDs.De_DE: return "\"{{0}}\" ist keine gültige Umsatzsteuer-Identifikationsnummer (11 Ziffern).";
|
|
4334
|
-
case CultureIDs.En_US: return "\"{{0}}\" is not a valid VAT number (11 digits).";
|
|
4335
|
-
case CultureIDs.Es_ES: return "\"{{0}}\" no es un número de IVA válido (11 dígitos).";
|
|
4336
|
-
case CultureIDs.Fr_FR: return "\"{{0}}\" n'est pas un numéro de TVA valide (11 chiffres).";
|
|
4337
|
-
case CultureIDs.Pt_PT: return "\"{{0}}\" não é um número de IVA válido (11 dígitos).";
|
|
4338
|
-
default: return "\"{{0}}\" non è una Partita IVA valida (11 cifre).";
|
|
4339
|
-
}
|
|
4340
|
-
}
|
|
4341
4281
|
static get InvoiceRetrieveFormat() {
|
|
4342
4282
|
switch (this._cultureID) {
|
|
4343
4283
|
case CultureIDs.De_DE: return "Exportieren Sie die Rechnung im folgenden Format";
|
|
@@ -4688,16 +4628,6 @@ export class SDKUI_Localizator {
|
|
|
4688
4628
|
default: return "Il valore massimo è {{0}}";
|
|
4689
4629
|
}
|
|
4690
4630
|
}
|
|
4691
|
-
static get MaxLengthExceeded() {
|
|
4692
|
-
switch (this._cultureID) {
|
|
4693
|
-
case CultureIDs.De_DE: return "\"{{0}}\" hat die maximale Länge von {{1}} Zeichen überschritten.";
|
|
4694
|
-
case CultureIDs.En_US: return "\"{{0}}\" has exceeded the maximum length of {{1}} characters.";
|
|
4695
|
-
case CultureIDs.Es_ES: return "\"{{0}}\" ha superado la longitud máxima de {{1}} caracteres.";
|
|
4696
|
-
case CultureIDs.Fr_FR: return "\"{{0}}\" a dépassé la longueur maximale de {{1}} caractères.";
|
|
4697
|
-
case CultureIDs.Pt_PT: return "\"{{0}}\" excedeu o comprimento máximo de {{1}} caracteres.";
|
|
4698
|
-
default: return "\"{{0}}\" ha superato la lunghezza massima di {{1}} caratteri.";
|
|
4699
|
-
}
|
|
4700
|
-
}
|
|
4701
4631
|
static get MaxDcmtsToBeReturned() {
|
|
4702
4632
|
switch (this._cultureID) {
|
|
4703
4633
|
case CultureIDs.De_DE: return "Maximale Anzahl von Dokumenten";
|
|
@@ -5980,16 +5910,6 @@ export class SDKUI_Localizator {
|
|
|
5980
5910
|
default: return "Passa a ricerca";
|
|
5981
5911
|
}
|
|
5982
5912
|
}
|
|
5983
|
-
static get PatternRegex() {
|
|
5984
|
-
switch (this._cultureID) {
|
|
5985
|
-
case CultureIDs.De_DE: return "Regex-Muster";
|
|
5986
|
-
case CultureIDs.En_US: return "Regex pattern";
|
|
5987
|
-
case CultureIDs.Es_ES: return "Patrón regex";
|
|
5988
|
-
case CultureIDs.Fr_FR: return "Motif regex";
|
|
5989
|
-
case CultureIDs.Pt_PT: return "Padrão regex";
|
|
5990
|
-
default: return "Pattern regex";
|
|
5991
|
-
}
|
|
5992
|
-
}
|
|
5993
5913
|
static get PasswordMustContain() {
|
|
5994
5914
|
switch (this._cultureID) {
|
|
5995
5915
|
case CultureIDs.De_DE: return "Das Passwort muss enthalten";
|
|
@@ -6839,26 +6759,6 @@ export class SDKUI_Localizator {
|
|
|
6839
6759
|
default: return "Campo Obbligatorio";
|
|
6840
6760
|
}
|
|
6841
6761
|
}
|
|
6842
|
-
static get RequiredFormat() {
|
|
6843
|
-
switch (this._cultureID) {
|
|
6844
|
-
case CultureIDs.De_DE: return "Erforderliches Format";
|
|
6845
|
-
case CultureIDs.En_US: return "Required format";
|
|
6846
|
-
case CultureIDs.Es_ES: return "Formato requerido";
|
|
6847
|
-
case CultureIDs.Fr_FR: return "Format requis";
|
|
6848
|
-
case CultureIDs.Pt_PT: return "Formato obrigatório";
|
|
6849
|
-
default: return "Formato richiesto";
|
|
6850
|
-
}
|
|
6851
|
-
}
|
|
6852
|
-
static get ValueMustBeDateOrTime() {
|
|
6853
|
-
switch (this._cultureID) {
|
|
6854
|
-
case CultureIDs.De_DE: return "Der Wert muss ein Datum oder eine Uhrzeit sein";
|
|
6855
|
-
case CultureIDs.En_US: return "Value must be a date or time";
|
|
6856
|
-
case CultureIDs.Es_ES: return "El valor debe ser una fecha o una hora";
|
|
6857
|
-
case CultureIDs.Fr_FR: return "La valeur doit être une date ou une heure";
|
|
6858
|
-
case CultureIDs.Pt_PT: return "O valor deve ser uma data ou hora";
|
|
6859
|
-
default: return "Il valore deve essere una data o un orario";
|
|
6860
|
-
}
|
|
6861
|
-
}
|
|
6862
6762
|
static get RequiredNOT() {
|
|
6863
6763
|
switch (this._cultureID) {
|
|
6864
6764
|
case CultureIDs.De_DE: return "Nicht obligatorisch";
|
|
@@ -7159,16 +7059,6 @@ export class SDKUI_Localizator {
|
|
|
7159
7059
|
default: return "Cerca";
|
|
7160
7060
|
}
|
|
7161
7061
|
}
|
|
7162
|
-
static get SearchAndAppend() {
|
|
7163
|
-
switch (this._cultureID) {
|
|
7164
|
-
case CultureIDs.De_DE: return "Suchen und anhängen";
|
|
7165
|
-
case CultureIDs.En_US: return "Search and append";
|
|
7166
|
-
case CultureIDs.Es_ES: return "Buscar y añadir";
|
|
7167
|
-
case CultureIDs.Fr_FR: return "Rechercher et ajouter";
|
|
7168
|
-
case CultureIDs.Pt_PT: return "Pesquisar e acrescentar";
|
|
7169
|
-
default: return "Ricerca e accoda";
|
|
7170
|
-
}
|
|
7171
|
-
}
|
|
7172
7062
|
static get Search_Advanced() {
|
|
7173
7063
|
switch (this._cultureID) {
|
|
7174
7064
|
case CultureIDs.De_DE: return "Erweiterte Suche";
|
package/lib/helper/TMUtils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FileItem } from '../components';
|
|
3
|
-
import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor,
|
|
3
|
+
import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
/**
|
|
5
5
|
* Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
|
|
6
6
|
* Es: file.pdf.p7m, file.xml.p7m, file.docx.p7m, file.xml.p7m.ts
|
|
@@ -109,32 +109,4 @@ export declare enum DcmtDisplayNameMethod {
|
|
|
109
109
|
* Se i metadati non sono presenti nel dtd, li recupera dalla cache.
|
|
110
110
|
*/
|
|
111
111
|
export declare const getDTDDisplayNameInfo: (dtd: DcmtTypeDescriptor | undefined) => Promise<string>;
|
|
112
|
-
export declare const getCurrencySymbol: (format: MetadataFormats | undefined) => string | undefined;
|
|
113
|
-
/** Estrae Format e FormatCulture dalle proprietà estese di una colonna. */
|
|
114
|
-
export declare const getColumnFormatInfo: (col: DataColumnDescriptor) => {
|
|
115
|
-
format: MetadataFormats;
|
|
116
|
-
formatCulture: string;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Restituisce il pattern di formato DevExtreme per DateBox basato su MetadataFormats e cultura.
|
|
120
|
-
* Usa la stessa logica di formatDateTimeByMetadataFormat per garantire coerenza.
|
|
121
|
-
* Supporta: IT (it-IT), GB (en-GB), US (en-US), JP (ja-JP)
|
|
122
|
-
*/
|
|
123
|
-
export declare const getDevExtremeDateDisplayFormat: (format: MetadataFormats | undefined, formatCulture?: string) => string;
|
|
124
|
-
/** Formatta una data secondo MetadataFormats e cultura. */
|
|
125
|
-
export declare const formatDateTimeByMetadataFormat: (value: Date, format: MetadataFormats | undefined, formatCulture: string | undefined | null) => string;
|
|
126
|
-
/** Formatta un numero secondo MetadataFormats e cultura. Valute con simbolo e 2 decimali (0 per Yen). */
|
|
127
|
-
export declare const formatNumberByMetadataFormat: (value: number | string, format: MetadataFormats | undefined, formatCulture: string) => string;
|
|
128
|
-
/** Converte un valore in data locale. Restituisce il valore originale se il parsing fallisce. */
|
|
129
|
-
export declare const safeParseDateToLocaleString: (value: any) => string;
|
|
130
|
-
/**
|
|
131
|
-
* Trova un DataColumnDescriptor corrispondente a un dataField (formato TID_MID).
|
|
132
|
-
* Cerca prima per MID nelle extendedProperties, poi per caption.
|
|
133
|
-
*/
|
|
134
|
-
export declare const findDataColumnByField: (columns: DataColumnDescriptor[], dataField: string | undefined, caption?: string) => DataColumnDescriptor | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* Formatta un valore per l'export in base al tipo di colonna.
|
|
137
|
-
* Gestisce date, numeri e valute secondo il formato definito nella colonna.
|
|
138
|
-
*/
|
|
139
|
-
export declare const formatValueForExport: (value: any, dataCol: DataColumnDescriptor | undefined, fallbackDataType?: string) => string;
|
|
140
112
|
export {};
|
package/lib/helper/TMUtils.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { TMTooltip } from '../components';
|
|
4
4
|
import { IconCADossier, IconKey, IconMenuCAWorkingGroups } from './TMIcons';
|
|
5
|
-
import { AccessLevels, AppModules,
|
|
5
|
+
import { AccessLevels, AppModules, DataListCacheService, DcmtTypeListCacheService, LicenseModuleStatus, MetadataDataDomains, PdGs, SDK_Globals, SystemMIDs } from '@topconsultnpm/sdk-ts';
|
|
6
6
|
import { SDKUI_Localizator } from './SDKUI_Localizator';
|
|
7
7
|
/**
|
|
8
8
|
* Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
|
|
@@ -439,10 +439,16 @@ export const buildDcmtDisplayName = (obj) => {
|
|
|
439
439
|
if (!obj)
|
|
440
440
|
return [];
|
|
441
441
|
const sysAbstractKey = Object.keys(obj).find(k => k.toUpperCase() === 'SYS_ABSTRACT');
|
|
442
|
-
if (sysAbstractKey
|
|
443
|
-
|
|
442
|
+
if (sysAbstractKey) {
|
|
443
|
+
if (obj[sysAbstractKey]?.value) {
|
|
444
|
+
return [sysAbstractKey];
|
|
445
|
+
}
|
|
446
|
+
// SYS_Abstract esiste ma è vuoto: usa DID se presente, altrimenti continua con la logica standard
|
|
447
|
+
const didKey = Object.keys(obj).find(k => k.toUpperCase() === 'DID');
|
|
448
|
+
if (didKey && obj[didKey]?.value) {
|
|
449
|
+
return [didKey];
|
|
450
|
+
}
|
|
444
451
|
}
|
|
445
|
-
// SYS_Abstract esiste ma è vuoto: continua con la logica standard
|
|
446
452
|
const keys = Object.keys(obj);
|
|
447
453
|
const sysMIDs = Object.values(SystemMIDs).map(o => o.toUpperCase());
|
|
448
454
|
const viewableMetadataKeys = keys.filter(k => obj?.[k]?.value &&
|
|
@@ -455,7 +461,6 @@ export const buildDcmtDisplayName = (obj) => {
|
|
|
455
461
|
if (specialOutputKeys.length > 0) {
|
|
456
462
|
return specialOutputKeys;
|
|
457
463
|
}
|
|
458
|
-
// Se non ci sono metadati speciali, restituisci i primi 5 metadati non di sistema con permesso canView
|
|
459
464
|
if (viewableMetadataKeys.length > 0) {
|
|
460
465
|
return viewableMetadataKeys.slice(0, 5);
|
|
461
466
|
}
|
|
@@ -528,247 +533,3 @@ export const getDTDDisplayNameInfo = async (dtd) => {
|
|
|
528
533
|
return SDKUI_Localizator.DisplayNameMethod_Top5;
|
|
529
534
|
}
|
|
530
535
|
};
|
|
531
|
-
export const getCurrencySymbol = (format) => {
|
|
532
|
-
switch (format) {
|
|
533
|
-
case MetadataFormats.CurrencyEuro: return '€';
|
|
534
|
-
case MetadataFormats.CurrencyDollar: return '$';
|
|
535
|
-
case MetadataFormats.CurrencyPound: return '£';
|
|
536
|
-
case MetadataFormats.CurrencyYen: return '¥';
|
|
537
|
-
default: return undefined;
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
/** Estrae Format e FormatCulture dalle proprietà estese di una colonna. */
|
|
541
|
-
export const getColumnFormatInfo = (col) => {
|
|
542
|
-
const format = MetadataFormats[(col.extendedProperties?.["Format"] ?? "None")];
|
|
543
|
-
const formatCulture = col.extendedProperties?.["FormatCulture"] ?? window.navigator.language;
|
|
544
|
-
return { format, formatCulture };
|
|
545
|
-
};
|
|
546
|
-
/**
|
|
547
|
-
* Restituisce il pattern di formato DevExtreme per DateBox basato su MetadataFormats e cultura.
|
|
548
|
-
* Usa la stessa logica di formatDateTimeByMetadataFormat per garantire coerenza.
|
|
549
|
-
* Supporta: IT (it-IT), GB (en-GB), US (en-US), JP (ja-JP)
|
|
550
|
-
*/
|
|
551
|
-
export const getDevExtremeDateDisplayFormat = (format, formatCulture) => {
|
|
552
|
-
try {
|
|
553
|
-
const culture = (formatCulture ?? window.navigator.language).toLowerCase();
|
|
554
|
-
const isItalian = culture === 'it-it' || culture.startsWith('it');
|
|
555
|
-
const isUS = culture === 'en-us';
|
|
556
|
-
const isGB = culture === 'en-gb';
|
|
557
|
-
const isJP = culture === 'ja-jp' || culture.startsWith('ja');
|
|
558
|
-
// Formati data base per cultura (coerenti con formatDateTimeByMetadataFormat)
|
|
559
|
-
const getShortDate = () => {
|
|
560
|
-
if (isItalian)
|
|
561
|
-
return 'dd/MM/yyyy'; // 17/07/2026
|
|
562
|
-
if (isUS)
|
|
563
|
-
return 'M/d/yyyy'; // 7/17/2026
|
|
564
|
-
if (isGB)
|
|
565
|
-
return 'dd/MM/yyyy'; // 17/07/2026
|
|
566
|
-
if (isJP)
|
|
567
|
-
return 'yyyy/MM/dd'; // 2026/07/17
|
|
568
|
-
return 'dd/MM/yyyy'; // default
|
|
569
|
-
};
|
|
570
|
-
const getLongDate = () => {
|
|
571
|
-
if (isItalian)
|
|
572
|
-
return 'EEEE d MMMM yyyy'; // lunedì 17 luglio 2026
|
|
573
|
-
if (isUS)
|
|
574
|
-
return 'EEEE, MMMM d, yyyy'; // Monday, July 17, 2026
|
|
575
|
-
if (isGB)
|
|
576
|
-
return 'd MMMM yyyy'; // 17 July 2026 (senza weekday)
|
|
577
|
-
if (isJP)
|
|
578
|
-
return 'yyyy年M月d日'; // 2026年7月17日 (senza weekday)
|
|
579
|
-
return 'd MMMM yyyy'; // default (senza weekday)
|
|
580
|
-
};
|
|
581
|
-
// Formati ora per cultura (US usa 12h con AM/PM, altri usano 24h)
|
|
582
|
-
const getShortTime = () => {
|
|
583
|
-
if (isUS)
|
|
584
|
-
return 'h:mm a'; // 3:30 PM
|
|
585
|
-
return 'HH:mm'; // 15:30
|
|
586
|
-
};
|
|
587
|
-
const getLongTime = () => {
|
|
588
|
-
if (isUS)
|
|
589
|
-
return 'h:mm:ss a'; // 3:30:45 PM
|
|
590
|
-
return 'HH:mm:ss'; // 15:30:45
|
|
591
|
-
};
|
|
592
|
-
const shortDate = getShortDate();
|
|
593
|
-
const longDate = getLongDate();
|
|
594
|
-
const shortTime = getShortTime();
|
|
595
|
-
const longTime = getLongTime();
|
|
596
|
-
switch (format) {
|
|
597
|
-
case MetadataFormats.ShortDate:
|
|
598
|
-
return shortDate;
|
|
599
|
-
case MetadataFormats.LongDate:
|
|
600
|
-
return longDate;
|
|
601
|
-
case MetadataFormats.ShortTime:
|
|
602
|
-
return shortTime;
|
|
603
|
-
case MetadataFormats.LongTime:
|
|
604
|
-
return longTime;
|
|
605
|
-
case MetadataFormats.ShortDateShortTime:
|
|
606
|
-
return `${shortDate} ${shortTime}`;
|
|
607
|
-
case MetadataFormats.ShortDateLongTime:
|
|
608
|
-
return `${shortDate} ${longTime}`;
|
|
609
|
-
case MetadataFormats.LongDateShortTime:
|
|
610
|
-
return `${longDate} ${shortTime}`;
|
|
611
|
-
case MetadataFormats.LongDateLongTime:
|
|
612
|
-
return `${longDate} ${longTime}`;
|
|
613
|
-
default:
|
|
614
|
-
return shortDate;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
catch {
|
|
618
|
-
// Fallback: restituisce formato data breve di default
|
|
619
|
-
return 'dd/MM/yyyy';
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
/** Formatta una data secondo MetadataFormats e cultura. */
|
|
623
|
-
export const formatDateTimeByMetadataFormat = (value, format, formatCulture) => {
|
|
624
|
-
try {
|
|
625
|
-
// Fallback sicuro per formatCulture
|
|
626
|
-
const safeCulture = (formatCulture && typeof formatCulture === 'string' && formatCulture.trim()) ? formatCulture.trim() : window.navigator.language;
|
|
627
|
-
const culture = safeCulture.toLowerCase();
|
|
628
|
-
// Culture che includono il giorno della settimana nei formati lunghi
|
|
629
|
-
const includeWeekday = culture === 'it-it' || culture === 'en-us';
|
|
630
|
-
// Opzioni per data lunga (con o senza giorno settimana)
|
|
631
|
-
const longDateOptions = includeWeekday
|
|
632
|
-
? { weekday: "long", year: "numeric", month: "long", day: "numeric" }
|
|
633
|
-
: { year: "numeric", month: "long", day: "numeric" };
|
|
634
|
-
// Opzioni ShortDate: IT usa dd/MM/yyyy, US usa M/d/yyyy (anno a 4 cifre), altri usano dateStyle: 'short'
|
|
635
|
-
const getShortDateOptions = () => {
|
|
636
|
-
if (culture === "it-it")
|
|
637
|
-
return { year: "numeric", month: "2-digit", day: "2-digit" };
|
|
638
|
-
if (culture === "en-us")
|
|
639
|
-
return { year: "numeric", month: "numeric", day: "numeric" };
|
|
640
|
-
return { dateStyle: 'short' };
|
|
641
|
-
};
|
|
642
|
-
switch (format) {
|
|
643
|
-
case MetadataFormats.ShortDate:
|
|
644
|
-
return value.toLocaleString(safeCulture, getShortDateOptions());
|
|
645
|
-
case MetadataFormats.ShortTime:
|
|
646
|
-
return value.toLocaleString(safeCulture, { timeStyle: 'short' });
|
|
647
|
-
case MetadataFormats.ShortDateLongTime:
|
|
648
|
-
if (culture === "it-it")
|
|
649
|
-
return value.toLocaleString(safeCulture, { year: "numeric", month: "2-digit", day: "2-digit", hour: '2-digit', minute: '2-digit', second: '2-digit' }).replace(',', '');
|
|
650
|
-
if (culture === "en-us")
|
|
651
|
-
return value.toLocaleString(safeCulture, { year: "numeric", month: "numeric", day: "numeric", hour: 'numeric', minute: '2-digit', second: '2-digit' }).replace(',', '');
|
|
652
|
-
return value.toLocaleString(safeCulture, { dateStyle: 'short', timeStyle: 'medium' }).replace(',', '');
|
|
653
|
-
case MetadataFormats.ShortDateShortTime:
|
|
654
|
-
if (culture === "it-it")
|
|
655
|
-
return value.toLocaleString(safeCulture, { year: "numeric", month: "2-digit", day: "2-digit", hour: '2-digit', minute: '2-digit' }).replace(',', '');
|
|
656
|
-
if (culture === "en-us")
|
|
657
|
-
return value.toLocaleString(safeCulture, { year: "numeric", month: "numeric", day: "numeric", hour: 'numeric', minute: '2-digit' }).replace(',', '');
|
|
658
|
-
return value.toLocaleString(safeCulture, { dateStyle: 'short', timeStyle: 'short' }).replace(',', '');
|
|
659
|
-
case MetadataFormats.LongDate:
|
|
660
|
-
return value.toLocaleString(safeCulture, longDateOptions);
|
|
661
|
-
case MetadataFormats.LongTime:
|
|
662
|
-
return value.toLocaleString(safeCulture, { timeStyle: 'medium' });
|
|
663
|
-
case MetadataFormats.LongDateLongTime: {
|
|
664
|
-
const datePart = value.toLocaleString(safeCulture, longDateOptions);
|
|
665
|
-
const timePart = value.toLocaleString(safeCulture, culture === "en-us" ? { hour: 'numeric', minute: '2-digit', second: '2-digit' } : { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
666
|
-
return `${datePart} ${timePart}`;
|
|
667
|
-
}
|
|
668
|
-
case MetadataFormats.LongDateShortTime: {
|
|
669
|
-
const datePart = value.toLocaleString(safeCulture, longDateOptions);
|
|
670
|
-
const timePart = value.toLocaleString(safeCulture, culture === "en-us" ? { hour: 'numeric', minute: '2-digit' } : { hour: '2-digit', minute: '2-digit' });
|
|
671
|
-
return `${datePart} ${timePart}`;
|
|
672
|
-
}
|
|
673
|
-
default:
|
|
674
|
-
return value.toLocaleString(safeCulture, getShortDateOptions());
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
catch {
|
|
678
|
-
// Fallback: restituisce la data in formato ISO se la conversione fallisce
|
|
679
|
-
return value?.toISOString?.() ?? String(value);
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
/** Formatta un numero secondo MetadataFormats e cultura. Valute con simbolo e 2 decimali (0 per Yen). */
|
|
683
|
-
export const formatNumberByMetadataFormat = (value, format, formatCulture) => {
|
|
684
|
-
try {
|
|
685
|
-
const numValue = typeof value === 'number' ? value : Number(value);
|
|
686
|
-
if (isNaN(numValue))
|
|
687
|
-
return String(value);
|
|
688
|
-
const currencySymbol = getCurrencySymbol(format);
|
|
689
|
-
if (currencySymbol) {
|
|
690
|
-
const decimals = format === MetadataFormats.CurrencyYen ? 0 : 2;
|
|
691
|
-
return `${currencySymbol} ${numValue.toLocaleString(formatCulture, { useGrouping: true, minimumFractionDigits: decimals, maximumFractionDigits: decimals })}`;
|
|
692
|
-
}
|
|
693
|
-
return numValue.toLocaleString(formatCulture, { useGrouping: format == MetadataFormats.NumberWithThousandsSeparator });
|
|
694
|
-
}
|
|
695
|
-
catch {
|
|
696
|
-
// Fallback: restituisce il valore come stringa se la conversione fallisce
|
|
697
|
-
return String(value);
|
|
698
|
-
}
|
|
699
|
-
};
|
|
700
|
-
/** Converte un valore in data locale. Restituisce il valore originale se il parsing fallisce. */
|
|
701
|
-
export const safeParseDateToLocaleString = (value) => {
|
|
702
|
-
try {
|
|
703
|
-
if (!value)
|
|
704
|
-
return value ?? '';
|
|
705
|
-
const parsedDate = new Date(value);
|
|
706
|
-
if (!isNaN(parsedDate.getTime())) {
|
|
707
|
-
return parsedDate.toLocaleDateString();
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
catch {
|
|
711
|
-
// Keep original value if parsing fails
|
|
712
|
-
}
|
|
713
|
-
return String(value ?? '');
|
|
714
|
-
};
|
|
715
|
-
/**
|
|
716
|
-
* Trova un DataColumnDescriptor corrispondente a un dataField (formato TID_MID).
|
|
717
|
-
* Cerca prima per MID nelle extendedProperties, poi per caption.
|
|
718
|
-
*/
|
|
719
|
-
export const findDataColumnByField = (columns, dataField, caption) => {
|
|
720
|
-
// Se l'array di colonne è vuoto/null o il dataField non è definito, ritorna undefined (nessuna corrispondenza possibile)
|
|
721
|
-
if (!columns || !dataField)
|
|
722
|
-
return undefined;
|
|
723
|
-
// Itera sulle colonne cercando la prima che soddisfa i criteri di matching
|
|
724
|
-
return columns.find(c => {
|
|
725
|
-
// Estrae il MID (Metadata ID) dalle proprietà estese della colonna corrente
|
|
726
|
-
const colMid = c.extendedProperties?.["MID"];
|
|
727
|
-
// Se la colonna ha un MID definito, prova a matchare per MID
|
|
728
|
-
if (colMid) {
|
|
729
|
-
// Converte il MID in stringa per il confronto
|
|
730
|
-
const midStr = String(colMid);
|
|
731
|
-
// Verifica se dataField termina con "_MID" (es: "123_456" dove 456 è il MID)
|
|
732
|
-
// oppure se dataField è esattamente uguale al MID (caso in cui dataField contiene solo il MID)
|
|
733
|
-
if (dataField.endsWith(`_${midStr}`) || dataField === midStr)
|
|
734
|
-
return true;
|
|
735
|
-
}
|
|
736
|
-
// Fallback: se il match per MID fallisce, prova a matchare per caption
|
|
737
|
-
// Confronta la caption della colonna con dataField o con il parametro caption opzionale
|
|
738
|
-
return c.caption === dataField || c.caption === caption;
|
|
739
|
-
});
|
|
740
|
-
};
|
|
741
|
-
/**
|
|
742
|
-
* Formatta un valore per l'export in base al tipo di colonna.
|
|
743
|
-
* Gestisce date, numeri e valute secondo il formato definito nella colonna.
|
|
744
|
-
*/
|
|
745
|
-
export const formatValueForExport = (value, dataCol, fallbackDataType) => {
|
|
746
|
-
try {
|
|
747
|
-
let result = value;
|
|
748
|
-
if (dataCol) {
|
|
749
|
-
const { format, formatCulture } = getColumnFormatInfo(dataCol);
|
|
750
|
-
// Date: il valore arriva come stringa e va prima convertito in Date
|
|
751
|
-
if (dataCol.dataType === DataColumnTypes.DateTime && result) {
|
|
752
|
-
const parsedDate = new Date(result);
|
|
753
|
-
if (!isNaN(parsedDate.getTime())) {
|
|
754
|
-
result = formatDateTimeByMetadataFormat(parsedDate, format, formatCulture);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
// Numeri (incluse valute)
|
|
758
|
-
if (dataCol.dataType === DataColumnTypes.Number && result !== null && result !== undefined && result !== '') {
|
|
759
|
-
result = formatNumberByMetadataFormat(result, format, formatCulture);
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
else {
|
|
763
|
-
// Fallback: formattazione base per date
|
|
764
|
-
if (fallbackDataType === 'datetime' && result) {
|
|
765
|
-
result = safeParseDateToLocaleString(result);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
// Pulisci il valore: rimuovi doppi apici per evitare problemi CSV
|
|
769
|
-
return (result ?? '').toString().replace(/"/g, '');
|
|
770
|
-
}
|
|
771
|
-
catch {
|
|
772
|
-
return String(value ?? '');
|
|
773
|
-
}
|
|
774
|
-
};
|
package/lib/helper/helpers.d.ts
CHANGED
|
@@ -35,17 +35,6 @@ export declare const getDataColumnName: (fromTID: number | undefined, dtColumn:
|
|
|
35
35
|
*/
|
|
36
36
|
export declare const generateUniqueColumnKeys: (columns: DataColumnDescriptor[] | undefined, fromTID: number | undefined) => string[];
|
|
37
37
|
export declare const searchResultDescriptorToSimpleArray: (searchResult: SearchResultDescriptor | undefined) => any[] | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Unisce ("accoda") il risultato di una nuova ricerca a quello precedente, sullo stesso tipo documento.
|
|
40
|
-
* - Le righe della nuova ricerca vengono messe in cima (più recenti in alto)
|
|
41
|
-
* - Le righe duplicate sono accettate: lo stesso documento può comparire più volte
|
|
42
|
-
* - Aggiorna i contatori globali (dcmtsFound / dcmtsReturned) sul totale unito
|
|
43
|
-
*
|
|
44
|
-
* @param previous Risultato attualmente in memoria (può essere undefined al primo giro)
|
|
45
|
-
* @param next Nuovo risultato appena ottenuto
|
|
46
|
-
* @returns Un nuovo SearchResultDescriptor con le righe unite, oppure il singolo risultato disponibile
|
|
47
|
-
*/
|
|
48
|
-
export declare const mergeSearchResultsAppend: (previous: SearchResultDescriptor | undefined, next: SearchResultDescriptor | undefined) => SearchResultDescriptor | undefined;
|
|
49
38
|
export declare const getCompleteMetadataName: (dcmtTypeName: string | undefined, metadataName: string | undefined) => string;
|
|
50
39
|
export declare const getQueryCountAsync: (qd: QueryDescriptor, showSpinner: boolean) => Promise<void>;
|
|
51
40
|
export declare function getTIDByMID(mid: number | undefined, defaultTid?: number): number;
|
package/lib/helper/helpers.js
CHANGED
|
@@ -239,38 +239,6 @@ export const searchResultDescriptorToSimpleArray = (searchResult) => {
|
|
|
239
239
|
});
|
|
240
240
|
return result;
|
|
241
241
|
};
|
|
242
|
-
/**
|
|
243
|
-
* Unisce ("accoda") il risultato di una nuova ricerca a quello precedente, sullo stesso tipo documento.
|
|
244
|
-
* - Le righe della nuova ricerca vengono messe in cima (più recenti in alto)
|
|
245
|
-
* - Le righe duplicate sono accettate: lo stesso documento può comparire più volte
|
|
246
|
-
* - Aggiorna i contatori globali (dcmtsFound / dcmtsReturned) sul totale unito
|
|
247
|
-
*
|
|
248
|
-
* @param previous Risultato attualmente in memoria (può essere undefined al primo giro)
|
|
249
|
-
* @param next Nuovo risultato appena ottenuto
|
|
250
|
-
* @returns Un nuovo SearchResultDescriptor con le righe unite, oppure il singolo risultato disponibile
|
|
251
|
-
*/
|
|
252
|
-
export const mergeSearchResultsAppend = (previous, next) => {
|
|
253
|
-
// Se manca uno dei due, non c'è nulla da unire
|
|
254
|
-
if (!next?.dtdResult?.rows?.length)
|
|
255
|
-
return previous;
|
|
256
|
-
if (!previous?.dtdResult?.rows?.length)
|
|
257
|
-
return next;
|
|
258
|
-
// L'accodamento ha senso solo sullo stesso tipo documento (colonne compatibili)
|
|
259
|
-
if (previous.fromTID !== next.fromTID)
|
|
260
|
-
return next;
|
|
261
|
-
const prevRows = previous.dtdResult.rows ?? [];
|
|
262
|
-
const nextRows = next.dtdResult.rows ?? [];
|
|
263
|
-
// Nessuna deduplica: le nuove righe in cima, poi le precedenti (i duplicati sono ammessi)
|
|
264
|
-
const mergedRows = [...nextRows, ...prevRows];
|
|
265
|
-
// Costruisce il nuovo descrittore basandosi sull'ultimo risultato (colonne/qd più recenti), con le righe unite
|
|
266
|
-
const merged = structuredClone(next);
|
|
267
|
-
const mergedDtd = structuredClone(next.dtdResult);
|
|
268
|
-
mergedDtd.rows = mergedRows;
|
|
269
|
-
merged.dtdResult = mergedDtd;
|
|
270
|
-
merged.dcmtsReturned = mergedRows.length;
|
|
271
|
-
merged.dcmtsFound = mergedRows.length;
|
|
272
|
-
return merged;
|
|
273
|
-
};
|
|
274
242
|
export const getCompleteMetadataName = (dcmtTypeName, metadataName) => `${dcmtTypeName}...${metadataName}`;
|
|
275
243
|
export const getQueryCountAsync = async (qd, showSpinner) => {
|
|
276
244
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.22.0-
|
|
3
|
+
"version": "6.22.0-t1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lib"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@topconsultnpm/sdk-ts": "6.22.0-
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.22.0-t1",
|
|
43
43
|
"@zip.js/zip.js": "2.8.26",
|
|
44
44
|
"buffer": "^6.0.3",
|
|
45
45
|
"devextreme": "^25.2.6",
|