@procore/saved-views 6.0.2 → 6.1.0
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/README.md +13 -2
- package/dist/legacy/index.d.mts +10 -2
- package/dist/legacy/index.d.ts +10 -2
- package/dist/legacy/index.js +382 -192
- package/dist/legacy/index.mjs +371 -177
- package/dist/modern/index.d.mts +10 -2
- package/dist/modern/index.d.ts +10 -2
- package/dist/modern/index.js +381 -192
- package/dist/modern/index.mjs +370 -177
- package/package.json +1 -1
package/dist/modern/index.mjs
CHANGED
|
@@ -5543,7 +5543,15 @@ var de_DE_default = {
|
|
|
5543
5543
|
title: "Gespeicherte Ansichten",
|
|
5544
5544
|
tooltip: "Erstellen und speichern Sie ein benutzerdefiniertes Tabellenlayout, um schnell zu Ihrer bevorzugten Ansicht zur\xFCckzukehren.",
|
|
5545
5545
|
button: {
|
|
5546
|
-
title: "Ansichten"
|
|
5546
|
+
title: "Ansichten",
|
|
5547
|
+
titleWithView: "Ansicht: {{name}} ({{type}})",
|
|
5548
|
+
viewLevel: {
|
|
5549
|
+
company: "Unternehmen",
|
|
5550
|
+
project: "Projekt",
|
|
5551
|
+
personal: "Pers\xF6nlich",
|
|
5552
|
+
default: "Standard",
|
|
5553
|
+
temporary: "Vor\xFCbergehend"
|
|
5554
|
+
}
|
|
5547
5555
|
},
|
|
5548
5556
|
actions: {
|
|
5549
5557
|
update: "Aktualisieren",
|
|
@@ -5638,7 +5646,15 @@ var en_AU_default = {
|
|
|
5638
5646
|
title: "Saved views",
|
|
5639
5647
|
tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
|
|
5640
5648
|
button: {
|
|
5641
|
-
title: "Views"
|
|
5649
|
+
title: "Views",
|
|
5650
|
+
titleWithView: "View: {{name}} ({{type}})",
|
|
5651
|
+
viewLevel: {
|
|
5652
|
+
company: "Company",
|
|
5653
|
+
project: "Project",
|
|
5654
|
+
personal: "Personal",
|
|
5655
|
+
default: "Default",
|
|
5656
|
+
temporary: "Temporary"
|
|
5657
|
+
}
|
|
5642
5658
|
},
|
|
5643
5659
|
actions: {
|
|
5644
5660
|
update: "Update",
|
|
@@ -5733,7 +5749,15 @@ var en_CA_default = {
|
|
|
5733
5749
|
title: "Saved views",
|
|
5734
5750
|
tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
|
|
5735
5751
|
button: {
|
|
5736
|
-
title: "Views"
|
|
5752
|
+
title: "Views",
|
|
5753
|
+
titleWithView: "View: {{name}} ({{type}})",
|
|
5754
|
+
viewLevel: {
|
|
5755
|
+
company: "Company",
|
|
5756
|
+
project: "Project",
|
|
5757
|
+
personal: "Personal",
|
|
5758
|
+
default: "Default",
|
|
5759
|
+
temporary: "Temporary"
|
|
5760
|
+
}
|
|
5737
5761
|
},
|
|
5738
5762
|
actions: {
|
|
5739
5763
|
update: "Update",
|
|
@@ -5828,7 +5852,15 @@ var en_GB_default = {
|
|
|
5828
5852
|
title: "Saved views",
|
|
5829
5853
|
tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
|
|
5830
5854
|
button: {
|
|
5831
|
-
title: "Views"
|
|
5855
|
+
title: "Views",
|
|
5856
|
+
titleWithView: "View: {{name}} ({{type}})",
|
|
5857
|
+
viewLevel: {
|
|
5858
|
+
company: "Company",
|
|
5859
|
+
project: "Project",
|
|
5860
|
+
personal: "Personal",
|
|
5861
|
+
default: "Default",
|
|
5862
|
+
temporary: "Temporary"
|
|
5863
|
+
}
|
|
5832
5864
|
},
|
|
5833
5865
|
actions: {
|
|
5834
5866
|
update: "Update",
|
|
@@ -5923,7 +5955,15 @@ var en_default = {
|
|
|
5923
5955
|
title: "Saved Views",
|
|
5924
5956
|
tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
|
|
5925
5957
|
button: {
|
|
5926
|
-
title: "Views"
|
|
5958
|
+
title: "Views",
|
|
5959
|
+
titleWithView: "View: {{name}} ({{type}})",
|
|
5960
|
+
viewLevel: {
|
|
5961
|
+
company: "Company",
|
|
5962
|
+
project: "Project",
|
|
5963
|
+
personal: "Personal",
|
|
5964
|
+
default: "Default",
|
|
5965
|
+
temporary: "Temporary"
|
|
5966
|
+
}
|
|
5927
5967
|
},
|
|
5928
5968
|
actions: {
|
|
5929
5969
|
update: "Update",
|
|
@@ -6018,7 +6058,15 @@ var es_ES_default = {
|
|
|
6018
6058
|
title: "Vistas guardadas",
|
|
6019
6059
|
tooltip: "Cree y guarde un dise\xF1o de tabla personalizado para volver r\xE1pidamente a su vista preferida.",
|
|
6020
6060
|
button: {
|
|
6021
|
-
title: "Vistas"
|
|
6061
|
+
title: "Vistas",
|
|
6062
|
+
titleWithView: "Ver: {{name}} ({{type}})",
|
|
6063
|
+
viewLevel: {
|
|
6064
|
+
company: "Empresa",
|
|
6065
|
+
project: "Proyecto",
|
|
6066
|
+
personal: "Personal",
|
|
6067
|
+
default: "Predeterminado",
|
|
6068
|
+
temporary: "Temporal"
|
|
6069
|
+
}
|
|
6022
6070
|
},
|
|
6023
6071
|
actions: {
|
|
6024
6072
|
update: "Actualizar",
|
|
@@ -6050,7 +6098,7 @@ var es_ES_default = {
|
|
|
6050
6098
|
fields: {
|
|
6051
6099
|
name: "Nombre",
|
|
6052
6100
|
description: "Descripci\xF3n",
|
|
6053
|
-
viewLevel: "
|
|
6101
|
+
viewLevel: "Nivel de vista",
|
|
6054
6102
|
viewLevels: {
|
|
6055
6103
|
company: "Vista de la empresa",
|
|
6056
6104
|
project: "Vista del proyecto",
|
|
@@ -6100,7 +6148,7 @@ var es_ES_default = {
|
|
|
6100
6148
|
temporaryViewName: "Vista temporal",
|
|
6101
6149
|
viewLevel: {
|
|
6102
6150
|
company: "Vistas de la empresa",
|
|
6103
|
-
project: "Vistas
|
|
6151
|
+
project: "Vistas del proyecto",
|
|
6104
6152
|
personal: "Vistas personales"
|
|
6105
6153
|
}
|
|
6106
6154
|
}
|
|
@@ -6113,7 +6161,15 @@ var es_default = {
|
|
|
6113
6161
|
title: "Vistas guardadas",
|
|
6114
6162
|
tooltip: "Cree y guarde cualquier dise\xF1o de tabla personalizado para volver r\xE1pidamente a su vista preferida.",
|
|
6115
6163
|
button: {
|
|
6116
|
-
title: "Vistas"
|
|
6164
|
+
title: "Vistas",
|
|
6165
|
+
titleWithView: "Vista: {{name}} ({{type}})",
|
|
6166
|
+
viewLevel: {
|
|
6167
|
+
company: "Compa\xF1\xEDa",
|
|
6168
|
+
project: "Proyecto",
|
|
6169
|
+
personal: "Personal",
|
|
6170
|
+
default: "Predeterminado",
|
|
6171
|
+
temporary: "Temporal"
|
|
6172
|
+
}
|
|
6117
6173
|
},
|
|
6118
6174
|
actions: {
|
|
6119
6175
|
update: "Actualizar",
|
|
@@ -6208,7 +6264,15 @@ var fr_CA_default = {
|
|
|
6208
6264
|
title: "Affichages sauvegard\xE9s",
|
|
6209
6265
|
tooltip: "Cr\xE9ez et sauvegardez n'importe quelle disposition de tableau personnalis\xE9e pour revenir rapidement \xE0 votre affichage pr\xE9f\xE9r\xE9.",
|
|
6210
6266
|
button: {
|
|
6211
|
-
title: "Affichages"
|
|
6267
|
+
title: "Affichages",
|
|
6268
|
+
titleWithView: "Affichage\xA0: {{name}} ({{type}})",
|
|
6269
|
+
viewLevel: {
|
|
6270
|
+
company: "Entreprise",
|
|
6271
|
+
project: "Projet",
|
|
6272
|
+
personal: "Personnel",
|
|
6273
|
+
default: "Par d\xE9faut",
|
|
6274
|
+
temporary: "Temporaire"
|
|
6275
|
+
}
|
|
6212
6276
|
},
|
|
6213
6277
|
actions: {
|
|
6214
6278
|
update: "Mettre \xE0 jour",
|
|
@@ -6235,7 +6299,7 @@ var fr_CA_default = {
|
|
|
6235
6299
|
description: "Cet affichage ne peut pas \xEAtre restaur\xE9 une fois qu'il a \xE9t\xE9 supprim\xE9."
|
|
6236
6300
|
},
|
|
6237
6301
|
copyConfirmation: {
|
|
6238
|
-
description: "Vous avez coll\xE9 un lien vers
|
|
6302
|
+
description: "Vous avez coll\xE9 un lien vers un affichage sauvegard\xE9 qui n'existe pas encore pour vous.\nVous pouvez le cr\xE9er comme affichage personnel sauvegard\xE9 ou simplement le consulter\ntemporairement."
|
|
6239
6303
|
},
|
|
6240
6304
|
fields: {
|
|
6241
6305
|
name: "Nom",
|
|
@@ -6250,9 +6314,9 @@ var fr_CA_default = {
|
|
|
6250
6314
|
errors: {
|
|
6251
6315
|
maxLengthName: "Ne peut pas contenir plus de {{maxLength}}\xA0caract\xE8res.",
|
|
6252
6316
|
required: "Ne peut pas \xEAtre vide.",
|
|
6253
|
-
duplicateName: "Un affichage
|
|
6317
|
+
duplicateName: "Un affichage sauvegard\xE9 portant ce nom existe d\xE9j\xE0. Veuillez renommer et r\xE9essayer.",
|
|
6254
6318
|
unknown: "Une erreur s'est produite. Veuillez r\xE9essayer.",
|
|
6255
|
-
title: "D\xE9sol\xE9, nous n'avons pas pu {{mode}} cet affichage
|
|
6319
|
+
title: "D\xE9sol\xE9, nous n'avons pas pu {{mode}} cet affichage sauvegard\xE9",
|
|
6256
6320
|
description: {
|
|
6257
6321
|
create: "Veuillez corriger les erreurs ci-dessous et r\xE9essayer de le cr\xE9er",
|
|
6258
6322
|
update: "Veuillez corriger les erreurs ci-dessous et r\xE9essayer de le mettre \xE0 jour"
|
|
@@ -6263,8 +6327,8 @@ var fr_CA_default = {
|
|
|
6263
6327
|
}
|
|
6264
6328
|
},
|
|
6265
6329
|
ariaLabels: {
|
|
6266
|
-
menuItem: "
|
|
6267
|
-
modal: "Modal pour cr\xE9er/mettre \xE0 jour les affichages
|
|
6330
|
+
menuItem: "Item du menu Affichages sauvegard\xE9s {{name}}",
|
|
6331
|
+
modal: "Modal pour cr\xE9er/mettre \xE0 jour les affichages sauvegard\xE9s"
|
|
6268
6332
|
},
|
|
6269
6333
|
update: {
|
|
6270
6334
|
success: "L'affichage sauvegard\xE9 a bien \xE9t\xE9 mis \xE0 jour."
|
|
@@ -6276,12 +6340,12 @@ var fr_CA_default = {
|
|
|
6276
6340
|
success: "Le lien a \xE9t\xE9 cr\xE9\xE9 et copi\xE9 dans le presse-papiers."
|
|
6277
6341
|
},
|
|
6278
6342
|
errors: {
|
|
6279
|
-
fetch: "D\xE9sol\xE9, les affichages
|
|
6280
|
-
create: "D\xE9sol\xE9, l'affichage
|
|
6281
|
-
update: "D\xE9sol\xE9, l'affichage
|
|
6282
|
-
delete: "D\xE9sol\xE9, l'affichage
|
|
6343
|
+
fetch: "D\xE9sol\xE9, les affichages sauvegard\xE9s n'ont pas pu \xEAtre r\xE9cup\xE9r\xE9s. Veuillez r\xE9essayer.",
|
|
6344
|
+
create: "D\xE9sol\xE9, l'affichage sauvegard\xE9 n'a pas pu \xEAtre cr\xE9\xE9. Veuillez r\xE9essayer.",
|
|
6345
|
+
update: "D\xE9sol\xE9, l'affichage sauvegard\xE9 n'a pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
|
|
6346
|
+
delete: "D\xE9sol\xE9, l'affichage sauvegard\xE9 n'a pas pu \xEAtre supprim\xE9. Veuillez r\xE9essayer.",
|
|
6283
6347
|
copyFailed: "Impossible de copier le lien de partage dans le presse-papiers.",
|
|
6284
|
-
notFound: "D\xE9sol\xE9, l'affichage
|
|
6348
|
+
notFound: "D\xE9sol\xE9, l'affichage sauvegard\xE9 est introuvable. Veuillez r\xE9essayer."
|
|
6285
6349
|
},
|
|
6286
6350
|
defaultViewTitle: {
|
|
6287
6351
|
rfi: "Toutes les QRT",
|
|
@@ -6303,7 +6367,15 @@ var fr_FR_default = {
|
|
|
6303
6367
|
title: "Vues enregistr\xE9es",
|
|
6304
6368
|
tooltip: "Cr\xE9ez et enregistrez n'importe quelle disposition de tableau personnalis\xE9e pour revenir rapidement \xE0 votre vue pr\xE9f\xE9r\xE9e.",
|
|
6305
6369
|
button: {
|
|
6306
|
-
title: "Vues"
|
|
6370
|
+
title: "Vues",
|
|
6371
|
+
titleWithView: "Affichage\xA0: {{name}} ({{type}})",
|
|
6372
|
+
viewLevel: {
|
|
6373
|
+
company: "Entreprise",
|
|
6374
|
+
project: "Projet",
|
|
6375
|
+
personal: "Personnelle",
|
|
6376
|
+
default: "Par d\xE9faut",
|
|
6377
|
+
temporary: "Temporaire"
|
|
6378
|
+
}
|
|
6307
6379
|
},
|
|
6308
6380
|
actions: {
|
|
6309
6381
|
update: "Mettre \xE0 jour",
|
|
@@ -6398,7 +6470,15 @@ var is_IS_default = {
|
|
|
6398
6470
|
title: "Vista\xF0ar sko\xF0anir",
|
|
6399
6471
|
tooltip: "B\xFA\xF0u til og vista\xF0u s\xE9rsni\xF0na t\xF6fluuppsetningu til a\xF0 fara flj\xF3tt aftur \xED valinn s\xFDn.",
|
|
6400
6472
|
button: {
|
|
6401
|
-
title: "\xDAts\xFDni"
|
|
6473
|
+
title: "\xDAts\xFDni",
|
|
6474
|
+
titleWithView: "Sko\xF0a: {{name}} ({{type}})",
|
|
6475
|
+
viewLevel: {
|
|
6476
|
+
company: "Fyrirt\xE6ki",
|
|
6477
|
+
project: "Verkefni",
|
|
6478
|
+
personal: "Pers\xF3nulegt",
|
|
6479
|
+
default: "Sj\xE1lfgefi\xF0",
|
|
6480
|
+
temporary: "T\xEDmabundi\xF0"
|
|
6481
|
+
}
|
|
6402
6482
|
},
|
|
6403
6483
|
actions: {
|
|
6404
6484
|
update: "Uppf\xE6rsla",
|
|
@@ -6493,7 +6573,15 @@ var it_IT_default = {
|
|
|
6493
6573
|
title: "Viste salvate",
|
|
6494
6574
|
tooltip: "Creare e salvare qualsiasi layout di tabella personalizzato per tornare rapidamente alla vista preferita.",
|
|
6495
6575
|
button: {
|
|
6496
|
-
title: "Viste"
|
|
6576
|
+
title: "Viste",
|
|
6577
|
+
titleWithView: "Visualizza: {{name}} ({{type}})",
|
|
6578
|
+
viewLevel: {
|
|
6579
|
+
company: "Azienda",
|
|
6580
|
+
project: "Progetto",
|
|
6581
|
+
personal: "Personale",
|
|
6582
|
+
default: "Predefinita",
|
|
6583
|
+
temporary: "Temporaneo"
|
|
6584
|
+
}
|
|
6497
6585
|
},
|
|
6498
6586
|
actions: {
|
|
6499
6587
|
update: "Aggiorna",
|
|
@@ -6588,7 +6676,15 @@ var ja_JP_default = {
|
|
|
6588
6676
|
title: "\u4FDD\u5B58\u6E08\u307F\u30D3\u30E5\u30FC",
|
|
6589
6677
|
tooltip: "\u4EFB\u610F\u306E\u30AB\u30B9\u30BF\u30E0 \u30C6\u30FC\u30D6\u30EB \u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4F5C\u6210\u3057\u3066\u4FDD\u5B58\u3057\u3001\u3059\u3070\u3084\u304F\u597D\u307F\u306E\u30D3\u30E5\u30FC\u306B\u623B\u305B\u307E\u3059\u3002",
|
|
6590
6678
|
button: {
|
|
6591
|
-
title: "\u30D3\u30E5\u30FC"
|
|
6679
|
+
title: "\u30D3\u30E5\u30FC",
|
|
6680
|
+
titleWithView: "\u30D3\u30E5\u30FC: {{name}} ({{type}})",
|
|
6681
|
+
viewLevel: {
|
|
6682
|
+
company: "\u4F1A\u793E",
|
|
6683
|
+
project: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8",
|
|
6684
|
+
personal: "\u500B\u4EBA\u7528",
|
|
6685
|
+
default: "\u65E2\u5B9A\u306E",
|
|
6686
|
+
temporary: "\u4E00\u6642\u7684"
|
|
6687
|
+
}
|
|
6592
6688
|
},
|
|
6593
6689
|
actions: {
|
|
6594
6690
|
update: "\u66F4\u65B0",
|
|
@@ -6683,7 +6779,15 @@ var pl_PL_default = {
|
|
|
6683
6779
|
title: "Zapisane widoki",
|
|
6684
6780
|
tooltip: "Utw\xF3rz i zapisz dowolny uk\u0142ad niestandardowej tabeli, aby szybko wr\xF3ci\u0107 do preferowanego widoku.",
|
|
6685
6781
|
button: {
|
|
6686
|
-
title: "Widoki"
|
|
6782
|
+
title: "Widoki",
|
|
6783
|
+
titleWithView: "Widok: {{name}} ({{type}})",
|
|
6784
|
+
viewLevel: {
|
|
6785
|
+
company: "Firma",
|
|
6786
|
+
project: "Projekt",
|
|
6787
|
+
personal: "Osobiste",
|
|
6788
|
+
default: "Domy\u015Blne",
|
|
6789
|
+
temporary: "Tymczasowe"
|
|
6790
|
+
}
|
|
6687
6791
|
},
|
|
6688
6792
|
actions: {
|
|
6689
6793
|
update: "Zaktualizuj",
|
|
@@ -6778,7 +6882,15 @@ var pt_BR_default = {
|
|
|
6778
6882
|
title: "Visualiza\xE7\xF5es Salvas",
|
|
6779
6883
|
tooltip: "Crie e salve qualquer layout personalizado de tabela para retornar rapidamente \xE0 sua visualiza\xE7\xE3o preferida.",
|
|
6780
6884
|
button: {
|
|
6781
|
-
title: "Visualiza\xE7\xF5es"
|
|
6885
|
+
title: "Visualiza\xE7\xF5es",
|
|
6886
|
+
titleWithView: "Visualiza\xE7\xE3o: {{name}} ({{type}})",
|
|
6887
|
+
viewLevel: {
|
|
6888
|
+
company: "Empresa",
|
|
6889
|
+
project: "Projeto",
|
|
6890
|
+
personal: "Pessoal",
|
|
6891
|
+
default: "Padr\xE3o",
|
|
6892
|
+
temporary: "Tempor\xE1rio"
|
|
6893
|
+
}
|
|
6782
6894
|
},
|
|
6783
6895
|
actions: {
|
|
6784
6896
|
update: "Atualizar",
|
|
@@ -6873,7 +6985,15 @@ var th_TH_default = {
|
|
|
6873
6985
|
title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E27\u0E49",
|
|
6874
6986
|
tooltip: "\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E25\u0E30\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E40\u0E04\u0E49\u0E32\u0E42\u0E04\u0E23\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E41\u0E1A\u0E1A\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E23\u0E27\u0E14\u0E40\u0E23\u0E47\u0E27",
|
|
6875
6987
|
button: {
|
|
6876
|
-
title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07"
|
|
6988
|
+
title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07",
|
|
6989
|
+
titleWithView: "\u0E08\u0E33\u0E19\u0E27\u0E19\u0E01\u0E32\u0E23\u0E14\u0E39: {{name}} ({{type}})",
|
|
6990
|
+
viewLevel: {
|
|
6991
|
+
company: "\u0E1A\u0E23\u0E34\u0E29\u0E31\u0E17",
|
|
6992
|
+
project: "\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
6993
|
+
personal: "\u0E2A\u0E48\u0E27\u0E19\u0E1A\u0E38\u0E04\u0E04\u0E25",
|
|
6994
|
+
default: "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
|
|
6995
|
+
temporary: "\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27"
|
|
6996
|
+
}
|
|
6877
6997
|
},
|
|
6878
6998
|
actions: {
|
|
6879
6999
|
update: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15",
|
|
@@ -6968,7 +7088,15 @@ var zh_SG_default = {
|
|
|
6968
7088
|
title: "\u5DF2\u4FDD\u5B58\u89C6\u56FE",
|
|
6969
7089
|
tooltip: "\u521B\u5EFA\u5E76\u4FDD\u5B58\u4EFB\u4F55\u81EA\u5B9A\u4E49\u8868\u683C\u5E03\u5C40\u4EE5\u5FEB\u901F\u8FD4\u56DE\u5230\u4F60\u7684\u9996\u9009\u89C6\u56FE\u3002",
|
|
6970
7090
|
button: {
|
|
6971
|
-
title: "\u89C6\u56FE"
|
|
7091
|
+
title: "\u89C6\u56FE",
|
|
7092
|
+
titleWithView: "\u67E5\u770B\uFF1A{{name}}\uFF08{{type}}\uFF09",
|
|
7093
|
+
viewLevel: {
|
|
7094
|
+
company: "\u516C\u53F8",
|
|
7095
|
+
project: "\u9879\u76EE",
|
|
7096
|
+
personal: "\u4E2A\u4EBA",
|
|
7097
|
+
default: "\u9ED8\u8BA4",
|
|
7098
|
+
temporary: "\u4E34\u65F6"
|
|
7099
|
+
}
|
|
6972
7100
|
},
|
|
6973
7101
|
actions: {
|
|
6974
7102
|
update: "\u66F4\u65B0",
|
|
@@ -7091,7 +7219,7 @@ function getTranslations(envLocale) {
|
|
|
7091
7219
|
}
|
|
7092
7220
|
|
|
7093
7221
|
// src/components/buttons/useSavedViewsPanel.tsx
|
|
7094
|
-
import { useState } from "react";
|
|
7222
|
+
import { useState as useState2 } from "react";
|
|
7095
7223
|
|
|
7096
7224
|
// ../../node_modules/tslib/tslib.es6.mjs
|
|
7097
7225
|
var __assign = function() {
|
|
@@ -7309,8 +7437,8 @@ Plus.displayName = "Plus";
|
|
|
7309
7437
|
var Plus_default = Plus;
|
|
7310
7438
|
|
|
7311
7439
|
// src/components/buttons/SavedViewsButton.tsx
|
|
7312
|
-
import { ToggleButton } from "@procore/core-react";
|
|
7313
|
-
import
|
|
7440
|
+
import { ToggleButton, Tooltip } from "@procore/core-react";
|
|
7441
|
+
import React14 from "react";
|
|
7314
7442
|
|
|
7315
7443
|
// ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
7316
7444
|
function memoize(fn) {
|
|
@@ -8823,6 +8951,31 @@ var EnvironmentI18nProvider = ({ children }) => {
|
|
|
8823
8951
|
return /* @__PURE__ */ React12.createElement(I18nContext.Provider, { value: i18n }, children);
|
|
8824
8952
|
};
|
|
8825
8953
|
|
|
8954
|
+
// src/components/buttons/SavedViewsSelectionContext.tsx
|
|
8955
|
+
import React13, {
|
|
8956
|
+
createContext,
|
|
8957
|
+
useCallback,
|
|
8958
|
+
useContext,
|
|
8959
|
+
useMemo as useMemo2,
|
|
8960
|
+
useState
|
|
8961
|
+
} from "react";
|
|
8962
|
+
var SavedViewsSelectionContext = createContext(null);
|
|
8963
|
+
var SavedViewsSelectionProvider = ({
|
|
8964
|
+
children
|
|
8965
|
+
}) => {
|
|
8966
|
+
const [selectedView, setSelectedView] = useState(null);
|
|
8967
|
+
const updateSelectedView = useCallback(
|
|
8968
|
+
(view) => setSelectedView(view),
|
|
8969
|
+
[]
|
|
8970
|
+
);
|
|
8971
|
+
const value = useMemo2(
|
|
8972
|
+
() => ({ selectedView, setSelectedView: updateSelectedView }),
|
|
8973
|
+
[selectedView, updateSelectedView]
|
|
8974
|
+
);
|
|
8975
|
+
return /* @__PURE__ */ React13.createElement(SavedViewsSelectionContext.Provider, { value }, children);
|
|
8976
|
+
};
|
|
8977
|
+
var useSavedViewsSelection = () => useContext(SavedViewsSelectionContext);
|
|
8978
|
+
|
|
8826
8979
|
// src/components/buttons/SavedViewsButton.tsx
|
|
8827
8980
|
var StyledIcon = pt(ExpandSidebar_default)`
|
|
8828
8981
|
transform: ${(props) => props.left ? "rotate(180deg)" : ""};
|
|
@@ -8832,37 +8985,66 @@ var Container = pt.div`
|
|
|
8832
8985
|
border-right: 2px solid #d6dadc;
|
|
8833
8986
|
padding-right: 8px;
|
|
8834
8987
|
`;
|
|
8988
|
+
var Label = pt.span`
|
|
8989
|
+
display: inline-block;
|
|
8990
|
+
max-width: 218px;
|
|
8991
|
+
overflow: hidden;
|
|
8992
|
+
text-overflow: ellipsis;
|
|
8993
|
+
white-space: nowrap;
|
|
8994
|
+
vertical-align: middle;
|
|
8995
|
+
`;
|
|
8835
8996
|
var SavedViewsButton = ({
|
|
8836
8997
|
handleClick,
|
|
8837
8998
|
isOpen
|
|
8838
8999
|
}) => {
|
|
8839
9000
|
const I18n = useCDNTranslations();
|
|
8840
|
-
|
|
9001
|
+
const selection = useSavedViewsSelection();
|
|
9002
|
+
const activeView = selection?.selectedView;
|
|
9003
|
+
const activeName = activeView?.name;
|
|
9004
|
+
const activeType = activeView?.view_level ? I18n.t(`savedViews.button.viewLevel.${activeView.view_level}`) : "";
|
|
9005
|
+
const label = activeName ? I18n.t("savedViews.button.titleWithView", {
|
|
9006
|
+
name: activeName,
|
|
9007
|
+
type: activeType
|
|
9008
|
+
}) : I18n.t("savedViews.button.title");
|
|
9009
|
+
const button = /* @__PURE__ */ React14.createElement(
|
|
8841
9010
|
ToggleButton,
|
|
8842
9011
|
{
|
|
8843
9012
|
selected: isOpen,
|
|
8844
9013
|
onClick: handleClick,
|
|
8845
|
-
icon: /* @__PURE__ */
|
|
9014
|
+
icon: /* @__PURE__ */ React14.createElement(StyledIcon, { left: isOpen }),
|
|
8846
9015
|
"data-testid": "saved-views-button",
|
|
8847
|
-
"aria-controls": "saved-views-panel"
|
|
9016
|
+
"aria-controls": "saved-views-panel",
|
|
9017
|
+
"aria-label": label
|
|
8848
9018
|
},
|
|
8849
|
-
|
|
8850
|
-
)
|
|
9019
|
+
/* @__PURE__ */ React14.createElement(Label, null, label)
|
|
9020
|
+
);
|
|
9021
|
+
return /* @__PURE__ */ React14.createElement(Container, null, activeName ? /* @__PURE__ */ React14.createElement(
|
|
9022
|
+
Tooltip,
|
|
9023
|
+
{
|
|
9024
|
+
showDelay: 500,
|
|
9025
|
+
overlay: /* @__PURE__ */ React14.createElement(Tooltip.Content, null, label)
|
|
9026
|
+
},
|
|
9027
|
+
button
|
|
9028
|
+
) : button);
|
|
8851
9029
|
};
|
|
8852
9030
|
|
|
8853
9031
|
// src/components/buttons/useSavedViewsPanel.tsx
|
|
8854
|
-
import
|
|
9032
|
+
import React15 from "react";
|
|
8855
9033
|
var useSavedViewsPanel = (domain, tableName) => {
|
|
8856
9034
|
const key = (domain2, tableName2) => `savedViewsPanel-${domain2}-${tableName2}`;
|
|
8857
|
-
const [isOpen, setIsOpen] =
|
|
9035
|
+
const [isOpen, setIsOpen] = useState2(
|
|
8858
9036
|
localStorage.getItem(key(domain, tableName)) === null || localStorage.getItem(key(domain, tableName)) === "true"
|
|
8859
9037
|
);
|
|
8860
9038
|
const handleClick = () => {
|
|
8861
9039
|
setIsOpen(!isOpen);
|
|
8862
9040
|
localStorage.setItem(key(domain, tableName), JSON.stringify(!isOpen));
|
|
8863
9041
|
};
|
|
8864
|
-
const Button7 = () => /* @__PURE__ */
|
|
8865
|
-
return {
|
|
9042
|
+
const Button7 = () => /* @__PURE__ */ React15.createElement(SavedViewsButton, { handleClick, isOpen });
|
|
9043
|
+
return {
|
|
9044
|
+
isOpen,
|
|
9045
|
+
SavedViewsButton: Button7,
|
|
9046
|
+
SavedViewsProvider: SavedViewsSelectionProvider
|
|
9047
|
+
};
|
|
8866
9048
|
};
|
|
8867
9049
|
var useSavedViewsPanel_default = useSavedViewsPanel;
|
|
8868
9050
|
|
|
@@ -8874,7 +9056,7 @@ import {
|
|
|
8874
9056
|
Flex,
|
|
8875
9057
|
useI18nContext as useI18nContext2
|
|
8876
9058
|
} from "@procore/core-react";
|
|
8877
|
-
import * as
|
|
9059
|
+
import * as React16 from "react";
|
|
8878
9060
|
import { useToastAlertContext } from "@procore/toast-alert";
|
|
8879
9061
|
var RowActionsBox = pt(Flex)`
|
|
8880
9062
|
justify-content: center;
|
|
@@ -8896,7 +9078,7 @@ var IconWrapper = pt.span`
|
|
|
8896
9078
|
justify-content: center;
|
|
8897
9079
|
`;
|
|
8898
9080
|
var SavedViewCollectionMenuItem = (props) => {
|
|
8899
|
-
const onClick =
|
|
9081
|
+
const onClick = React16.useCallback(
|
|
8900
9082
|
(a2) => {
|
|
8901
9083
|
if (!props.item) {
|
|
8902
9084
|
return;
|
|
@@ -8942,7 +9124,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8942
9124
|
label: i18n.t("savedViews.actions.delete")
|
|
8943
9125
|
}
|
|
8944
9126
|
];
|
|
8945
|
-
const preventEventBubbleToNotTriggerViewSelectEvent =
|
|
9127
|
+
const preventEventBubbleToNotTriggerViewSelectEvent = React16.useCallback(
|
|
8946
9128
|
(e) => {
|
|
8947
9129
|
e.stopPropagation();
|
|
8948
9130
|
},
|
|
@@ -8953,7 +9135,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8953
9135
|
const hasClearTemporaryButton = props.item.id === "temporary";
|
|
8954
9136
|
const hasOverflowMenu = props.item.view_level !== "default" && props.canEditOrDelete;
|
|
8955
9137
|
const hasActions = hasUpdateButton || hasCopyShareLinkButton || hasClearTemporaryButton || hasOverflowMenu;
|
|
8956
|
-
return /* @__PURE__ */
|
|
9138
|
+
return /* @__PURE__ */ React16.createElement(
|
|
8957
9139
|
Container2,
|
|
8958
9140
|
{
|
|
8959
9141
|
"aria-selected": Boolean(props.selected),
|
|
@@ -8965,7 +9147,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8965
9147
|
"data-testid": "saved-view-collection-menu-item",
|
|
8966
9148
|
onKeyDown: preventEventBubbleToNotTriggerViewSelectEvent
|
|
8967
9149
|
},
|
|
8968
|
-
/* @__PURE__ */
|
|
9150
|
+
/* @__PURE__ */ React16.createElement(
|
|
8969
9151
|
"span",
|
|
8970
9152
|
{
|
|
8971
9153
|
"data-testid": "saved-view-display-name",
|
|
@@ -8973,7 +9155,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8973
9155
|
},
|
|
8974
9156
|
props.item.name
|
|
8975
9157
|
),
|
|
8976
|
-
hasActions && /* @__PURE__ */
|
|
9158
|
+
hasActions && /* @__PURE__ */ React16.createElement(RowActionsBox, null, /* @__PURE__ */ React16.createElement(Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React16.createElement(
|
|
8977
9159
|
Button,
|
|
8978
9160
|
{
|
|
8979
9161
|
onClick: updateItem,
|
|
@@ -8984,7 +9166,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8984
9166
|
loading: props.isUpdateProcessing
|
|
8985
9167
|
},
|
|
8986
9168
|
i18n.t("savedViews.actions.update")
|
|
8987
|
-
), hasCopyShareLinkButton && /* @__PURE__ */
|
|
9169
|
+
), hasCopyShareLinkButton && /* @__PURE__ */ React16.createElement(
|
|
8988
9170
|
Button,
|
|
8989
9171
|
{
|
|
8990
9172
|
onClick: copyShareLink,
|
|
@@ -8993,8 +9175,8 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8993
9175
|
"aria-label": i18n.t("savedViews.actions.copyShareLink"),
|
|
8994
9176
|
"data-testid": "copy-share-link-button"
|
|
8995
9177
|
},
|
|
8996
|
-
/* @__PURE__ */
|
|
8997
|
-
), hasClearTemporaryButton && /* @__PURE__ */
|
|
9178
|
+
/* @__PURE__ */ React16.createElement(IconWrapper, null, /* @__PURE__ */ React16.createElement(Link_default, { size: "sm" }))
|
|
9179
|
+
), hasClearTemporaryButton && /* @__PURE__ */ React16.createElement(
|
|
8998
9180
|
Button,
|
|
8999
9181
|
{
|
|
9000
9182
|
onClick: (e) => {
|
|
@@ -9007,8 +9189,8 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
9007
9189
|
title: i18n.t("savedViews.actions.clearTemporary"),
|
|
9008
9190
|
"data-testid": "clear-temporary-view-button"
|
|
9009
9191
|
},
|
|
9010
|
-
/* @__PURE__ */
|
|
9011
|
-
)), /* @__PURE__ */
|
|
9192
|
+
/* @__PURE__ */ React16.createElement(IconWrapper, null, /* @__PURE__ */ React16.createElement(Clear_default, { size: "sm" }))
|
|
9193
|
+
)), /* @__PURE__ */ React16.createElement(Box, null, hasOverflowMenu && /* @__PURE__ */ React16.createElement(
|
|
9012
9194
|
DropdownFlyout,
|
|
9013
9195
|
{
|
|
9014
9196
|
"data-testid": "saved-view-overflow-button",
|
|
@@ -9034,7 +9216,7 @@ var ExpandedPanel = pt(Panel)`
|
|
|
9034
9216
|
// src/components/panels/PanelContent.tsx
|
|
9035
9217
|
import { Flex as Flex2, MenuImperative as MenuImperative2, useI18nContext as useI18nContext5 } from "@procore/core-react";
|
|
9036
9218
|
import { useToastAlertContext as useToastAlertContext2 } from "@procore/toast-alert";
|
|
9037
|
-
import
|
|
9219
|
+
import React18 from "react";
|
|
9038
9220
|
|
|
9039
9221
|
// src/utils/api/queries.ts
|
|
9040
9222
|
import { requestJSON as requestJSON2 } from "@procore/core-http";
|
|
@@ -9395,10 +9577,10 @@ var hasPermissionForViewLevel = (viewLevel, permissions) => {
|
|
|
9395
9577
|
};
|
|
9396
9578
|
|
|
9397
9579
|
// src/components/panels/useGroups.ts
|
|
9398
|
-
import { useState as
|
|
9580
|
+
import { useState as useState3 } from "react";
|
|
9399
9581
|
var useGroups = (isProjectLevelTool) => {
|
|
9400
9582
|
const viewLevels = getViewLevels(isProjectLevelTool);
|
|
9401
|
-
const [groups, setGroups] =
|
|
9583
|
+
const [groups, setGroups] = useState3(
|
|
9402
9584
|
Object.fromEntries(viewLevels.map((level) => [level, true]))
|
|
9403
9585
|
);
|
|
9404
9586
|
const toggleGroup = (group) => {
|
|
@@ -9415,15 +9597,15 @@ import {
|
|
|
9415
9597
|
Typography,
|
|
9416
9598
|
useI18nContext as useI18nContext4
|
|
9417
9599
|
} from "@procore/core-react";
|
|
9418
|
-
import
|
|
9600
|
+
import React17 from "react";
|
|
9419
9601
|
var groupIcon = (group) => {
|
|
9420
9602
|
switch (group) {
|
|
9421
9603
|
case "personal":
|
|
9422
|
-
return /* @__PURE__ */
|
|
9604
|
+
return /* @__PURE__ */ React17.createElement(Person_default, null);
|
|
9423
9605
|
case "project":
|
|
9424
|
-
return /* @__PURE__ */
|
|
9606
|
+
return /* @__PURE__ */ React17.createElement(Excavator_default, null);
|
|
9425
9607
|
case "company":
|
|
9426
|
-
return /* @__PURE__ */
|
|
9608
|
+
return /* @__PURE__ */ React17.createElement(Building_default, null);
|
|
9427
9609
|
}
|
|
9428
9610
|
};
|
|
9429
9611
|
var StyledButton = pt(Button2)`
|
|
@@ -9433,7 +9615,7 @@ var StyledButton = pt(Button2)`
|
|
|
9433
9615
|
`;
|
|
9434
9616
|
var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
|
|
9435
9617
|
const I18n = useI18nContext4();
|
|
9436
|
-
return /* @__PURE__ */
|
|
9618
|
+
return /* @__PURE__ */ React17.createElement(Box2, { style: { width: "100%" } }, /* @__PURE__ */ React17.createElement(
|
|
9437
9619
|
StyledButton,
|
|
9438
9620
|
{
|
|
9439
9621
|
block: true,
|
|
@@ -9446,10 +9628,10 @@ var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
|
|
|
9446
9628
|
onClick: () => toggleGroup(group),
|
|
9447
9629
|
"aria-controls": `saved-views-collections-${group}`,
|
|
9448
9630
|
"aria-expanded": expanded,
|
|
9449
|
-
icon: expanded ? /* @__PURE__ */
|
|
9631
|
+
icon: expanded ? /* @__PURE__ */ React17.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ React17.createElement(ChevronRight_default, { size: "sm" })
|
|
9450
9632
|
},
|
|
9451
9633
|
groupIcon(group),
|
|
9452
|
-
/* @__PURE__ */
|
|
9634
|
+
/* @__PURE__ */ React17.createElement(Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
|
|
9453
9635
|
));
|
|
9454
9636
|
};
|
|
9455
9637
|
var ViewLevelHeader_default = ViewLevelHeader;
|
|
@@ -9505,8 +9687,8 @@ var PanelContent = (props) => {
|
|
|
9505
9687
|
const { mutate: updateSavedView } = updateMutation;
|
|
9506
9688
|
const isUpdateLoading = "isPending" in updateMutation ? updateMutation.isPending : updateMutation.isLoading ?? false;
|
|
9507
9689
|
const savedViews = props.savedViews ?? savedViewsFromQuery;
|
|
9508
|
-
const errorToastRef =
|
|
9509
|
-
|
|
9690
|
+
const errorToastRef = React18.useRef(null);
|
|
9691
|
+
React18.useEffect(() => {
|
|
9510
9692
|
if (savedViewsError && savedViewsError !== errorToastRef.current) {
|
|
9511
9693
|
showToast.error(I18n.t("savedViews.errors.fetch"));
|
|
9512
9694
|
errorToastRef.current = savedViewsError;
|
|
@@ -9536,7 +9718,7 @@ var PanelContent = (props) => {
|
|
|
9536
9718
|
}
|
|
9537
9719
|
});
|
|
9538
9720
|
};
|
|
9539
|
-
return /* @__PURE__ */
|
|
9721
|
+
return /* @__PURE__ */ React18.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ React18.createElement(Flex2, { direction: "column", style: { height: "100%", width: "100%" } }, (temporaryView || presetViews) && /* @__PURE__ */ React18.createElement(
|
|
9540
9722
|
StyledMenuImperative,
|
|
9541
9723
|
{
|
|
9542
9724
|
role: "listbox",
|
|
@@ -9546,7 +9728,7 @@ var PanelContent = (props) => {
|
|
|
9546
9728
|
}
|
|
9547
9729
|
}
|
|
9548
9730
|
},
|
|
9549
|
-
/* @__PURE__ */
|
|
9731
|
+
/* @__PURE__ */ React18.createElement(MenuImperative2.Options, null, temporaryView && /* @__PURE__ */ React18.createElement(
|
|
9550
9732
|
Row,
|
|
9551
9733
|
{
|
|
9552
9734
|
key: temporaryView.id,
|
|
@@ -9555,7 +9737,7 @@ var PanelContent = (props) => {
|
|
|
9555
9737
|
"aria-current": isTemporarySelected ? "true" : void 0,
|
|
9556
9738
|
ref: isTemporarySelected ? selectedRowRef : null
|
|
9557
9739
|
},
|
|
9558
|
-
/* @__PURE__ */
|
|
9740
|
+
/* @__PURE__ */ React18.createElement(
|
|
9559
9741
|
SavedViewCollectionMenuItem,
|
|
9560
9742
|
{
|
|
9561
9743
|
item: temporaryView,
|
|
@@ -9565,7 +9747,7 @@ var PanelContent = (props) => {
|
|
|
9565
9747
|
)
|
|
9566
9748
|
), presetViews.map((presetView) => {
|
|
9567
9749
|
const isSelected = selectedSavedView?.id === presetView.id;
|
|
9568
|
-
return /* @__PURE__ */
|
|
9750
|
+
return /* @__PURE__ */ React18.createElement(
|
|
9569
9751
|
Row,
|
|
9570
9752
|
{
|
|
9571
9753
|
key: presetView.id,
|
|
@@ -9574,7 +9756,7 @@ var PanelContent = (props) => {
|
|
|
9574
9756
|
"aria-current": isSelected ? "true" : void 0,
|
|
9575
9757
|
ref: isSelected ? selectedRowRef : null
|
|
9576
9758
|
},
|
|
9577
|
-
/* @__PURE__ */
|
|
9759
|
+
/* @__PURE__ */ React18.createElement(
|
|
9578
9760
|
SavedViewCollectionMenuItem,
|
|
9579
9761
|
{
|
|
9580
9762
|
item: presetView,
|
|
@@ -9588,14 +9770,14 @@ var PanelContent = (props) => {
|
|
|
9588
9770
|
const views = isExpanded && savedViews ? savedViews.filter(
|
|
9589
9771
|
(view) => view.view_level === level && view.id !== "temporary"
|
|
9590
9772
|
) : [];
|
|
9591
|
-
return /* @__PURE__ */
|
|
9773
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, { key: level }, /* @__PURE__ */ React18.createElement(
|
|
9592
9774
|
ViewLevelHeader_default,
|
|
9593
9775
|
{
|
|
9594
9776
|
group: level,
|
|
9595
9777
|
toggleGroup,
|
|
9596
9778
|
expanded: isExpanded
|
|
9597
9779
|
}
|
|
9598
|
-
), isExpanded && views.length > 0 && /* @__PURE__ */
|
|
9780
|
+
), isExpanded && views.length > 0 && /* @__PURE__ */ React18.createElement(
|
|
9599
9781
|
StyledMenuImperative,
|
|
9600
9782
|
{
|
|
9601
9783
|
id: `saved-views-collections-${level}`,
|
|
@@ -9606,7 +9788,7 @@ var PanelContent = (props) => {
|
|
|
9606
9788
|
}
|
|
9607
9789
|
}
|
|
9608
9790
|
},
|
|
9609
|
-
/* @__PURE__ */
|
|
9791
|
+
/* @__PURE__ */ React18.createElement(MenuImperative2.Options, null, views.map((view) => {
|
|
9610
9792
|
const isSelected = selectedSavedView?.id === view.id;
|
|
9611
9793
|
const canUpdate = isSelected && hasPermissionForViewLevel(
|
|
9612
9794
|
view.view_level,
|
|
@@ -9618,7 +9800,7 @@ var PanelContent = (props) => {
|
|
|
9618
9800
|
props.provider
|
|
9619
9801
|
);
|
|
9620
9802
|
const canEditOrDelete = isSelected && hasPermissionForViewLevel(view.view_level, permissions);
|
|
9621
|
-
return /* @__PURE__ */
|
|
9803
|
+
return /* @__PURE__ */ React18.createElement(
|
|
9622
9804
|
Row,
|
|
9623
9805
|
{
|
|
9624
9806
|
key: view.id,
|
|
@@ -9627,7 +9809,7 @@ var PanelContent = (props) => {
|
|
|
9627
9809
|
"aria-current": isSelected ? "true" : void 0,
|
|
9628
9810
|
ref: isSelected ? selectedRowRef : null
|
|
9629
9811
|
},
|
|
9630
|
-
/* @__PURE__ */
|
|
9812
|
+
/* @__PURE__ */ React18.createElement(
|
|
9631
9813
|
SavedViewCollectionMenuItem,
|
|
9632
9814
|
{
|
|
9633
9815
|
item: view,
|
|
@@ -9654,10 +9836,10 @@ import {
|
|
|
9654
9836
|
Button as Button6,
|
|
9655
9837
|
Flex as Flex5,
|
|
9656
9838
|
Panel as Panel3,
|
|
9657
|
-
Tooltip,
|
|
9839
|
+
Tooltip as Tooltip2,
|
|
9658
9840
|
useI18nContext as useI18nContext12
|
|
9659
9841
|
} from "@procore/core-react";
|
|
9660
|
-
import
|
|
9842
|
+
import React24, { useState as useState5, useEffect as useEffect6, useCallback as useCallback5 } from "react";
|
|
9661
9843
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
9662
9844
|
import { useToastAlertContext as useToastAlertContext3, ToastAlertProvider } from "@procore/toast-alert";
|
|
9663
9845
|
|
|
@@ -9669,14 +9851,14 @@ import {
|
|
|
9669
9851
|
P as P2,
|
|
9670
9852
|
useI18nContext as useI18nContext6
|
|
9671
9853
|
} from "@procore/core-react";
|
|
9672
|
-
import
|
|
9854
|
+
import React19 from "react";
|
|
9673
9855
|
var SavedViewsDeleteConfirmationModalShared = ({
|
|
9674
9856
|
onCancel,
|
|
9675
9857
|
onDelete,
|
|
9676
9858
|
open
|
|
9677
9859
|
}) => {
|
|
9678
9860
|
const i18n = useI18nContext6();
|
|
9679
|
-
return /* @__PURE__ */
|
|
9861
|
+
return /* @__PURE__ */ React19.createElement(
|
|
9680
9862
|
ConfirmModal,
|
|
9681
9863
|
{
|
|
9682
9864
|
"data-testid": "delete-confirmation-modal",
|
|
@@ -9686,13 +9868,13 @@ var SavedViewsDeleteConfirmationModalShared = ({
|
|
|
9686
9868
|
onClose: onCancel,
|
|
9687
9869
|
style: { overflowWrap: "anywhere" }
|
|
9688
9870
|
},
|
|
9689
|
-
/* @__PURE__ */
|
|
9690
|
-
/* @__PURE__ */
|
|
9871
|
+
/* @__PURE__ */ React19.createElement(Modal.Body, null, /* @__PURE__ */ React19.createElement(P2, null, i18n.t("savedViews.modal.delete.description"))),
|
|
9872
|
+
/* @__PURE__ */ React19.createElement(Modal.Footer, null, /* @__PURE__ */ React19.createElement(Modal.FooterButtons, null, /* @__PURE__ */ React19.createElement(Button3, { variant: "secondary", onClick: onCancel }, i18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React19.createElement(Button3, { variant: "primary", onClick: onDelete }, i18n.t("savedViews.actions.delete"))))
|
|
9691
9873
|
);
|
|
9692
9874
|
};
|
|
9693
9875
|
|
|
9694
9876
|
// src/components/modals/form-modal/FormModal.tsx
|
|
9695
|
-
import
|
|
9877
|
+
import React22 from "react";
|
|
9696
9878
|
|
|
9697
9879
|
// src/components/modals/form-modal/FormModalBase.tsx
|
|
9698
9880
|
import {
|
|
@@ -9707,7 +9889,7 @@ import {
|
|
|
9707
9889
|
Typography as Typography2,
|
|
9708
9890
|
useI18nContext as useI18nContext8
|
|
9709
9891
|
} from "@procore/core-react";
|
|
9710
|
-
import * as
|
|
9892
|
+
import * as React21 from "react";
|
|
9711
9893
|
import * as yup from "yup";
|
|
9712
9894
|
|
|
9713
9895
|
// src/components/modals/form-modal/FormModalBaseUtils.ts
|
|
@@ -9744,7 +9926,7 @@ function extractMessage(error, I18n) {
|
|
|
9744
9926
|
|
|
9745
9927
|
// src/components/modals/form-modal/NameInputField.tsx
|
|
9746
9928
|
import { Form, useFormContext, useI18nContext as useI18nContext7 } from "@procore/core-react";
|
|
9747
|
-
import * as
|
|
9929
|
+
import * as React20 from "react";
|
|
9748
9930
|
var NAME_INPUT_ID = "saved-view-form-name-input";
|
|
9749
9931
|
var NameInputField = ({
|
|
9750
9932
|
error,
|
|
@@ -9753,12 +9935,12 @@ var NameInputField = ({
|
|
|
9753
9935
|
const I18n = useI18nContext7();
|
|
9754
9936
|
const label = I18n.t("savedViews.modal.fields.name");
|
|
9755
9937
|
const { errors: formErrors, submitCount } = useFormContext();
|
|
9756
|
-
|
|
9938
|
+
React20.useEffect(() => {
|
|
9757
9939
|
if (submitCount > 0 && formErrors?.name) {
|
|
9758
9940
|
document.getElementById(NAME_INPUT_ID)?.focus();
|
|
9759
9941
|
}
|
|
9760
9942
|
}, [formErrors?.name, submitCount]);
|
|
9761
|
-
return /* @__PURE__ */
|
|
9943
|
+
return /* @__PURE__ */ React20.createElement(
|
|
9762
9944
|
Form.Text,
|
|
9763
9945
|
{
|
|
9764
9946
|
id: NAME_INPUT_ID,
|
|
@@ -9850,7 +10032,7 @@ var FormModalBase = ({
|
|
|
9850
10032
|
I18n,
|
|
9851
10033
|
isProjectLevelTool
|
|
9852
10034
|
);
|
|
9853
|
-
return /* @__PURE__ */
|
|
10035
|
+
return /* @__PURE__ */ React21.createElement(
|
|
9854
10036
|
Modal2,
|
|
9855
10037
|
{
|
|
9856
10038
|
howToClose: ["x", "scrim"],
|
|
@@ -9859,7 +10041,7 @@ var FormModalBase = ({
|
|
|
9859
10041
|
width: "md",
|
|
9860
10042
|
"data-testid": "create-update-modal"
|
|
9861
10043
|
},
|
|
9862
|
-
/* @__PURE__ */
|
|
10044
|
+
/* @__PURE__ */ React21.createElement(ScrollContainer, null, /* @__PURE__ */ React21.createElement(Modal2.Header, { style: { borderBottom: `1px solid ${colors3.gray85}` } }, /* @__PURE__ */ React21.createElement(Modal2.Heading, null, header)), /* @__PURE__ */ React21.createElement(
|
|
9863
10045
|
Form2,
|
|
9864
10046
|
{
|
|
9865
10047
|
initialValues: {
|
|
@@ -9885,25 +10067,25 @@ var FormModalBase = ({
|
|
|
9885
10067
|
onReset: onCancel,
|
|
9886
10068
|
validateOnChange: true
|
|
9887
10069
|
},
|
|
9888
|
-
/* @__PURE__ */
|
|
10070
|
+
/* @__PURE__ */ React21.createElement(Form2.Form, { name: header }, /* @__PURE__ */ React21.createElement(
|
|
9889
10071
|
Modal2.Body,
|
|
9890
10072
|
{
|
|
9891
10073
|
style: { paddingTop: 0, paddingBottom: 0, marginTop: spacing2.lg }
|
|
9892
10074
|
},
|
|
9893
|
-
errors && /* @__PURE__ */
|
|
9894
|
-
/* @__PURE__ */
|
|
10075
|
+
errors && /* @__PURE__ */ React21.createElement(ErrorBanner, { style: { marginBottom: spacing2.xl } }, /* @__PURE__ */ React21.createElement(Banner.Content, null, /* @__PURE__ */ React21.createElement(Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React21.createElement(Banner.Body, null, errors?.form || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
|
|
10076
|
+
/* @__PURE__ */ React21.createElement(Form2.Row, null, /* @__PURE__ */ React21.createElement(
|
|
9895
10077
|
NameInputField,
|
|
9896
10078
|
{
|
|
9897
10079
|
error: errors?.name,
|
|
9898
10080
|
onResetMutations: resetMutations
|
|
9899
10081
|
}
|
|
9900
10082
|
)),
|
|
9901
|
-
/* @__PURE__ */
|
|
10083
|
+
/* @__PURE__ */ React21.createElement(
|
|
9902
10084
|
Form2.Row,
|
|
9903
10085
|
{
|
|
9904
10086
|
style: { marginTop: errors?.name ? spacing2.xl : spacing2.none }
|
|
9905
10087
|
},
|
|
9906
|
-
/* @__PURE__ */
|
|
10088
|
+
/* @__PURE__ */ React21.createElement(
|
|
9907
10089
|
Form2.TextArea,
|
|
9908
10090
|
{
|
|
9909
10091
|
name: "description",
|
|
@@ -9914,7 +10096,7 @@ var FormModalBase = ({
|
|
|
9914
10096
|
}
|
|
9915
10097
|
)
|
|
9916
10098
|
),
|
|
9917
|
-
viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */
|
|
10099
|
+
viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React21.createElement(Form2.Row, null, /* @__PURE__ */ React21.createElement(
|
|
9918
10100
|
Form2.Select,
|
|
9919
10101
|
{
|
|
9920
10102
|
name: "view_level",
|
|
@@ -9924,8 +10106,8 @@ var FormModalBase = ({
|
|
|
9924
10106
|
onSearch: false,
|
|
9925
10107
|
onClear: false
|
|
9926
10108
|
}
|
|
9927
|
-
)) : /* @__PURE__ */
|
|
9928
|
-
), /* @__PURE__ */
|
|
10109
|
+
)) : /* @__PURE__ */ React21.createElement(React21.Fragment, null)
|
|
10110
|
+
), /* @__PURE__ */ React21.createElement(Modal2.Footer, { style: { borderTop: `1px solid ${colors3.gray85}` } }, /* @__PURE__ */ React21.createElement(Flex3, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React21.createElement(Typography2, { color: "gray45", italic: true }, /* @__PURE__ */ React21.createElement(Typography2, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React21.createElement(Modal2.FooterButtons, null, /* @__PURE__ */ React21.createElement(Button4, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React21.createElement(
|
|
9929
10111
|
Button4,
|
|
9930
10112
|
{
|
|
9931
10113
|
"data-testid": "create-update-modal-button",
|
|
@@ -9955,7 +10137,7 @@ var FormModal = ({
|
|
|
9955
10137
|
defaultView
|
|
9956
10138
|
}) => {
|
|
9957
10139
|
const i18n = useI18nContext9();
|
|
9958
|
-
return /* @__PURE__ */
|
|
10140
|
+
return /* @__PURE__ */ React22.createElement(
|
|
9959
10141
|
FormModalBase,
|
|
9960
10142
|
{
|
|
9961
10143
|
open,
|
|
@@ -9989,7 +10171,7 @@ import {
|
|
|
9989
10171
|
Typography as Typography3,
|
|
9990
10172
|
useI18nContext as useI18nContext10
|
|
9991
10173
|
} from "@procore/core-react";
|
|
9992
|
-
import * as
|
|
10174
|
+
import * as React23 from "react";
|
|
9993
10175
|
import * as yup2 from "yup";
|
|
9994
10176
|
var SharedViewFormModal = ({
|
|
9995
10177
|
open,
|
|
@@ -10012,7 +10194,7 @@ var SharedViewFormModal = ({
|
|
|
10012
10194
|
const handleOnSubmit = (data) => {
|
|
10013
10195
|
onCreateView(data.name, data.description);
|
|
10014
10196
|
};
|
|
10015
|
-
return /* @__PURE__ */
|
|
10197
|
+
return /* @__PURE__ */ React23.createElement(
|
|
10016
10198
|
Modal3,
|
|
10017
10199
|
{
|
|
10018
10200
|
"data-testid": "shared-view-form-modal",
|
|
@@ -10021,7 +10203,7 @@ var SharedViewFormModal = ({
|
|
|
10021
10203
|
onClose,
|
|
10022
10204
|
style: { width: "540px" }
|
|
10023
10205
|
},
|
|
10024
|
-
/* @__PURE__ */
|
|
10206
|
+
/* @__PURE__ */ React23.createElement(
|
|
10025
10207
|
Modal3.Header,
|
|
10026
10208
|
{
|
|
10027
10209
|
onClose,
|
|
@@ -10032,9 +10214,9 @@ var SharedViewFormModal = ({
|
|
|
10032
10214
|
paddingRight: spacing3.xl
|
|
10033
10215
|
}
|
|
10034
10216
|
},
|
|
10035
|
-
/* @__PURE__ */
|
|
10217
|
+
/* @__PURE__ */ React23.createElement(Modal3.Heading, null, I18n.t("savedViews.modal.create.title"))
|
|
10036
10218
|
),
|
|
10037
|
-
/* @__PURE__ */
|
|
10219
|
+
/* @__PURE__ */ React23.createElement(
|
|
10038
10220
|
P3,
|
|
10039
10221
|
{
|
|
10040
10222
|
style: {
|
|
@@ -10049,7 +10231,7 @@ var SharedViewFormModal = ({
|
|
|
10049
10231
|
},
|
|
10050
10232
|
I18n.t("savedViews.modal.copyConfirmation.description")
|
|
10051
10233
|
),
|
|
10052
|
-
/* @__PURE__ */
|
|
10234
|
+
/* @__PURE__ */ React23.createElement(
|
|
10053
10235
|
Form3,
|
|
10054
10236
|
{
|
|
10055
10237
|
initialValues: {
|
|
@@ -10068,7 +10250,7 @@ var SharedViewFormModal = ({
|
|
|
10068
10250
|
onSubmit: handleOnSubmit,
|
|
10069
10251
|
validateOnChange: true
|
|
10070
10252
|
},
|
|
10071
|
-
/* @__PURE__ */
|
|
10253
|
+
/* @__PURE__ */ React23.createElement(Form3.Form, { name: "share-view-form" }, /* @__PURE__ */ React23.createElement(
|
|
10072
10254
|
Modal3.Body,
|
|
10073
10255
|
{
|
|
10074
10256
|
style: {
|
|
@@ -10077,22 +10259,22 @@ var SharedViewFormModal = ({
|
|
|
10077
10259
|
borderTop: `1px solid ${colors4.gray85}`
|
|
10078
10260
|
}
|
|
10079
10261
|
},
|
|
10080
|
-
errors && /* @__PURE__ */
|
|
10262
|
+
errors && /* @__PURE__ */ React23.createElement(ErrorBanner2, { style: { marginBottom: spacing3.xl } }, /* @__PURE__ */ React23.createElement(Banner2.Content, null, /* @__PURE__ */ React23.createElement(Banner2.Title, null, I18n.t("savedViews.modal.errors.title", {
|
|
10081
10263
|
mode: "create"
|
|
10082
|
-
})), /* @__PURE__ */
|
|
10083
|
-
/* @__PURE__ */
|
|
10264
|
+
})), /* @__PURE__ */ React23.createElement(Banner2.Body, null, errors?.form || I18n.t("savedViews.modal.errors.description.create")))),
|
|
10265
|
+
/* @__PURE__ */ React23.createElement(Form3.Row, null, /* @__PURE__ */ React23.createElement(
|
|
10084
10266
|
NameInputField,
|
|
10085
10267
|
{
|
|
10086
10268
|
error: errors?.name,
|
|
10087
10269
|
onResetMutations: handleNameChange
|
|
10088
10270
|
}
|
|
10089
10271
|
)),
|
|
10090
|
-
/* @__PURE__ */
|
|
10272
|
+
/* @__PURE__ */ React23.createElement(
|
|
10091
10273
|
Form3.Row,
|
|
10092
10274
|
{
|
|
10093
10275
|
style: { marginTop: errors?.name ? spacing3.xl : spacing3.none }
|
|
10094
10276
|
},
|
|
10095
|
-
/* @__PURE__ */
|
|
10277
|
+
/* @__PURE__ */ React23.createElement(
|
|
10096
10278
|
Form3.TextArea,
|
|
10097
10279
|
{
|
|
10098
10280
|
name: "description",
|
|
@@ -10103,7 +10285,7 @@ var SharedViewFormModal = ({
|
|
|
10103
10285
|
}
|
|
10104
10286
|
)
|
|
10105
10287
|
)
|
|
10106
|
-
), /* @__PURE__ */
|
|
10288
|
+
), /* @__PURE__ */ React23.createElement(Modal3.Footer, { style: { borderTop: `1px solid ${colors4.gray85}` } }, /* @__PURE__ */ React23.createElement(Flex4, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React23.createElement(Typography3, { color: "gray45", italic: true }, /* @__PURE__ */ React23.createElement(Typography3, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React23.createElement(Modal3.FooterButtons, null, /* @__PURE__ */ React23.createElement(
|
|
10107
10289
|
Button5,
|
|
10108
10290
|
{
|
|
10109
10291
|
variant: "secondary",
|
|
@@ -10112,7 +10294,7 @@ var SharedViewFormModal = ({
|
|
|
10112
10294
|
disabled: isCreating
|
|
10113
10295
|
},
|
|
10114
10296
|
I18n.t("savedViews.actions.viewTemporarily")
|
|
10115
|
-
), /* @__PURE__ */
|
|
10297
|
+
), /* @__PURE__ */ React23.createElement(
|
|
10116
10298
|
Button5,
|
|
10117
10299
|
{
|
|
10118
10300
|
type: "submit",
|
|
@@ -10128,7 +10310,7 @@ var SharedViewFormModal = ({
|
|
|
10128
10310
|
};
|
|
10129
10311
|
|
|
10130
10312
|
// src/utils/hooks/useViewSelection.ts
|
|
10131
|
-
import { useState as
|
|
10313
|
+
import { useState as useState4, useCallback as useCallback4, useEffect as useEffect4, useRef as useRef3, useMemo as useMemo3 } from "react";
|
|
10132
10314
|
import { useSearchParams } from "react-router-dom";
|
|
10133
10315
|
import { useI18nContext as useI18nContext11 } from "@procore/core-react";
|
|
10134
10316
|
|
|
@@ -10155,13 +10337,13 @@ var ViewStorage = {
|
|
|
10155
10337
|
};
|
|
10156
10338
|
|
|
10157
10339
|
// src/utils/hooks/useLatest.ts
|
|
10158
|
-
import { useCallback as
|
|
10340
|
+
import { useCallback as useCallback3, useLayoutEffect, useRef as useRef2 } from "react";
|
|
10159
10341
|
var useLatest = (callback) => {
|
|
10160
10342
|
const ref = useRef2(callback);
|
|
10161
10343
|
useLayoutEffect(() => {
|
|
10162
10344
|
ref.current = callback;
|
|
10163
10345
|
});
|
|
10164
|
-
return
|
|
10346
|
+
return useCallback3((...args) => ref.current(...args), []);
|
|
10165
10347
|
};
|
|
10166
10348
|
|
|
10167
10349
|
// src/utils/hooks/useViewSelection.ts
|
|
@@ -10174,16 +10356,21 @@ var areRowGroupStatesEqual = (a2, b2) => {
|
|
|
10174
10356
|
if (a2.length !== b2.length) return false;
|
|
10175
10357
|
return a2.every((val, idx) => val === b2[idx]);
|
|
10176
10358
|
};
|
|
10177
|
-
var
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
updatedParams.set("saved-view", "default");
|
|
10181
|
-
} else if (view.id === "temporary") {
|
|
10182
|
-
updatedParams.set("saved-view", "temporary");
|
|
10183
|
-
} else {
|
|
10184
|
-
updatedParams.set("saved-view", view.share_token);
|
|
10359
|
+
var getViewToken = (view) => {
|
|
10360
|
+
if (view.id === "default" || view.id === "temporary") {
|
|
10361
|
+
return view.id;
|
|
10185
10362
|
}
|
|
10186
|
-
return
|
|
10363
|
+
return view.share_token;
|
|
10364
|
+
};
|
|
10365
|
+
var setSavedViewParam = (token2, setSearchParams) => {
|
|
10366
|
+
setSearchParams(
|
|
10367
|
+
(currentParams) => {
|
|
10368
|
+
const updatedParams = new URLSearchParams(currentParams);
|
|
10369
|
+
updatedParams.set("saved-view", token2);
|
|
10370
|
+
return updatedParams;
|
|
10371
|
+
},
|
|
10372
|
+
{ replace: true }
|
|
10373
|
+
);
|
|
10187
10374
|
};
|
|
10188
10375
|
var checkIsViewSelected = (selectedView, viewId) => {
|
|
10189
10376
|
return selectedView?.share_token === viewId || selectedView?.id === viewId;
|
|
@@ -10192,21 +10379,11 @@ var findViewByToken = (views, token2) => {
|
|
|
10192
10379
|
return views.find((view) => view.share_token === token2);
|
|
10193
10380
|
};
|
|
10194
10381
|
var setViewInUrl = (view, setSearchParams) => {
|
|
10195
|
-
setSearchParams
|
|
10196
|
-
(currentParams) => getUpdatedSearchParams(currentParams, view),
|
|
10197
|
-
{ replace: true }
|
|
10198
|
-
);
|
|
10382
|
+
setSavedViewParam(getViewToken(view), setSearchParams);
|
|
10199
10383
|
};
|
|
10200
10384
|
var restoreUrlParameter = (currentParam, previousParam, setSearchParams) => {
|
|
10201
10385
|
if (previousParam && !currentParam) {
|
|
10202
|
-
setSearchParams
|
|
10203
|
-
(currentParams) => {
|
|
10204
|
-
const updatedParams = new URLSearchParams(currentParams);
|
|
10205
|
-
updatedParams.set("saved-view", previousParam);
|
|
10206
|
-
return updatedParams;
|
|
10207
|
-
},
|
|
10208
|
-
{ replace: true }
|
|
10209
|
-
);
|
|
10386
|
+
setSavedViewParam(previousParam, setSearchParams);
|
|
10210
10387
|
}
|
|
10211
10388
|
};
|
|
10212
10389
|
var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, tableConfig) => {
|
|
@@ -10216,30 +10393,32 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10216
10393
|
const temporaryStorageKey = `${storageKey}-temporary`;
|
|
10217
10394
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
10218
10395
|
const previousSavedViewParamRef = useRef3(null);
|
|
10219
|
-
const
|
|
10396
|
+
const intendedTokenRef = useRef3(null);
|
|
10397
|
+
const [selectedSavedView, setSelectedSavedView] = useState4(() => {
|
|
10220
10398
|
const stored = ViewStorage.load(storageKey, config.defaultView);
|
|
10221
10399
|
return stored ?? config.defaultView;
|
|
10222
10400
|
});
|
|
10223
|
-
const [temporaryView, setTemporaryView] =
|
|
10401
|
+
const [temporaryView, setTemporaryView] = useState4(() => {
|
|
10224
10402
|
const loaded = ViewStorage.load(temporaryStorageKey, config.defaultView);
|
|
10225
10403
|
return loaded && (loaded.id === "temporary" || loaded.view_level === "temporary") ? loaded : null;
|
|
10226
10404
|
});
|
|
10227
|
-
const persistViewToStorageAndUrl =
|
|
10405
|
+
const persistViewToStorageAndUrl = useCallback4(
|
|
10228
10406
|
(view) => {
|
|
10229
10407
|
ViewStorage.save(storageKey, view);
|
|
10408
|
+
intendedTokenRef.current = getViewToken(view);
|
|
10230
10409
|
setViewInUrl(view, setSearchParams);
|
|
10231
10410
|
},
|
|
10232
10411
|
[storageKey, setSearchParams]
|
|
10233
10412
|
);
|
|
10234
|
-
const baseViews =
|
|
10413
|
+
const baseViews = useMemo3(
|
|
10235
10414
|
() => [...savedViews ?? [], ...presetViews ?? []],
|
|
10236
10415
|
[savedViews, presetViews]
|
|
10237
10416
|
);
|
|
10238
|
-
const allViews =
|
|
10417
|
+
const allViews = useMemo3(
|
|
10239
10418
|
() => temporaryView ? [...baseViews, temporaryView] : baseViews,
|
|
10240
10419
|
[baseViews, temporaryView]
|
|
10241
10420
|
);
|
|
10242
|
-
const selectView =
|
|
10421
|
+
const selectView = useCallback4(
|
|
10243
10422
|
(view) => {
|
|
10244
10423
|
const viewToSelect = config.onSelect({ item: view });
|
|
10245
10424
|
setSelectedSavedView(viewToSelect);
|
|
@@ -10248,7 +10427,7 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10248
10427
|
},
|
|
10249
10428
|
[config, persistViewToStorageAndUrl]
|
|
10250
10429
|
);
|
|
10251
|
-
const createTemporaryView =
|
|
10430
|
+
const createTemporaryView = useCallback4(
|
|
10252
10431
|
(fetchedView) => {
|
|
10253
10432
|
const tempView = {
|
|
10254
10433
|
...fetchedView,
|
|
@@ -10263,12 +10442,12 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10263
10442
|
},
|
|
10264
10443
|
[temporaryStorageKey, selectView]
|
|
10265
10444
|
);
|
|
10266
|
-
const clearTemporaryView =
|
|
10445
|
+
const clearTemporaryView = useCallback4(() => {
|
|
10267
10446
|
ViewStorage.remove(temporaryStorageKey);
|
|
10268
10447
|
setTemporaryView(null);
|
|
10269
10448
|
selectView(config.defaultView);
|
|
10270
10449
|
}, [temporaryStorageKey, config.defaultView, selectView]);
|
|
10271
|
-
const isViewAlreadySelected =
|
|
10450
|
+
const isViewAlreadySelected = useCallback4(
|
|
10272
10451
|
(viewId) => checkIsViewSelected(selectedSavedView, viewId),
|
|
10273
10452
|
[selectedSavedView]
|
|
10274
10453
|
);
|
|
@@ -10285,6 +10464,14 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10285
10464
|
});
|
|
10286
10465
|
useEffect4(() => {
|
|
10287
10466
|
const savedViewId = searchParams.get("saved-view");
|
|
10467
|
+
const intendedToken = intendedTokenRef.current;
|
|
10468
|
+
if (intendedToken !== null && savedViewId !== intendedToken) {
|
|
10469
|
+
setSavedViewParam(intendedToken, setSearchParams);
|
|
10470
|
+
return;
|
|
10471
|
+
}
|
|
10472
|
+
if (intendedToken !== null && savedViewId === intendedToken) {
|
|
10473
|
+
intendedTokenRef.current = null;
|
|
10474
|
+
}
|
|
10288
10475
|
restoreUrlParameter(
|
|
10289
10476
|
savedViewId,
|
|
10290
10477
|
previousSavedViewParamRef.current,
|
|
@@ -10407,13 +10594,13 @@ var SavedViewsContent = (props) => {
|
|
|
10407
10594
|
const { mutate: deleteSavedView } = useDeleteSavedView(queryInput);
|
|
10408
10595
|
const { showToast } = useToastAlertContext3();
|
|
10409
10596
|
const i18n = useI18nContext12();
|
|
10410
|
-
const [activeModal, setActiveModal] =
|
|
10411
|
-
const [modalData, setModalData] =
|
|
10597
|
+
const [activeModal, setActiveModal] = useState5(null);
|
|
10598
|
+
const [modalData, setModalData] = useState5(null);
|
|
10412
10599
|
const openModal = (type, data) => {
|
|
10413
10600
|
setActiveModal(type);
|
|
10414
10601
|
setModalData(data ?? null);
|
|
10415
10602
|
};
|
|
10416
|
-
const closeModal =
|
|
10603
|
+
const closeModal = useCallback5(() => {
|
|
10417
10604
|
setActiveModal(null);
|
|
10418
10605
|
setModalData(null);
|
|
10419
10606
|
}, []);
|
|
@@ -10460,6 +10647,10 @@ var SavedViewsContent = (props) => {
|
|
|
10460
10647
|
closeModal();
|
|
10461
10648
|
}
|
|
10462
10649
|
}, [fetchError, selectedView, props.defaultView, selectView, closeModal]);
|
|
10650
|
+
const setSelectedViewInContext = useSavedViewsSelection()?.setSelectedView;
|
|
10651
|
+
useEffect6(() => {
|
|
10652
|
+
setSelectedViewInContext?.(selectedView ?? null);
|
|
10653
|
+
}, [selectedView, setSelectedViewInContext]);
|
|
10463
10654
|
const viewSharedViewTemporarily = () => {
|
|
10464
10655
|
if (fetchedView) {
|
|
10465
10656
|
createTemporaryView(fetchedView);
|
|
@@ -10501,19 +10692,19 @@ var SavedViewsContent = (props) => {
|
|
|
10501
10692
|
deleteSelectedView();
|
|
10502
10693
|
closeModal();
|
|
10503
10694
|
};
|
|
10504
|
-
return /* @__PURE__ */
|
|
10695
|
+
return /* @__PURE__ */ React24.createElement(FocusScope, { contain: false }, /* @__PURE__ */ React24.createElement(StyledPanel, { id: "saved-views-panel", provider: props.provider }, /* @__PURE__ */ React24.createElement(FocusScopeToggle, { isOpen: props.isPanelOpen ?? true }), /* @__PURE__ */ React24.createElement(
|
|
10505
10696
|
ExpandedPanel,
|
|
10506
10697
|
{
|
|
10507
10698
|
"data-testid": "saved-view-expanded-panel",
|
|
10508
10699
|
provider: props.provider
|
|
10509
10700
|
},
|
|
10510
|
-
/* @__PURE__ */
|
|
10511
|
-
|
|
10701
|
+
/* @__PURE__ */ React24.createElement(Panel3.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ React24.createElement(Panel3.Title, null, /* @__PURE__ */ React24.createElement(Flex5, { alignItems: "center" }, /* @__PURE__ */ React24.createElement(Box3, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ React24.createElement(
|
|
10702
|
+
Tooltip2,
|
|
10512
10703
|
{
|
|
10513
10704
|
showDelay: 200,
|
|
10514
|
-
overlay: /* @__PURE__ */
|
|
10705
|
+
overlay: /* @__PURE__ */ React24.createElement(Tooltip2.Content, null, i18n.t("savedViews.tooltip"))
|
|
10515
10706
|
},
|
|
10516
|
-
/* @__PURE__ */
|
|
10707
|
+
/* @__PURE__ */ React24.createElement(
|
|
10517
10708
|
Help_default,
|
|
10518
10709
|
{
|
|
10519
10710
|
tabIndex: 0,
|
|
@@ -10521,16 +10712,16 @@ var SavedViewsContent = (props) => {
|
|
|
10521
10712
|
"aria-label": i18n.t("savedViews.tooltip")
|
|
10522
10713
|
}
|
|
10523
10714
|
)
|
|
10524
|
-
))), /* @__PURE__ */
|
|
10525
|
-
|
|
10715
|
+
))), /* @__PURE__ */ React24.createElement(
|
|
10716
|
+
Tooltip2,
|
|
10526
10717
|
{
|
|
10527
10718
|
overlay: i18n.t("savedViews.actions.create"),
|
|
10528
10719
|
showDelay: 1e3
|
|
10529
10720
|
},
|
|
10530
|
-
/* @__PURE__ */
|
|
10721
|
+
/* @__PURE__ */ React24.createElement(
|
|
10531
10722
|
Button6,
|
|
10532
10723
|
{
|
|
10533
|
-
icon: /* @__PURE__ */
|
|
10724
|
+
icon: /* @__PURE__ */ React24.createElement(Plus_default, null),
|
|
10534
10725
|
variant: "secondary",
|
|
10535
10726
|
"data-testid": "expanded-panel-create-button",
|
|
10536
10727
|
onClick: () => openModal("create" /* CREATE */),
|
|
@@ -10539,7 +10730,7 @@ var SavedViewsContent = (props) => {
|
|
|
10539
10730
|
i18n.t("savedViews.actions.create")
|
|
10540
10731
|
)
|
|
10541
10732
|
)),
|
|
10542
|
-
/* @__PURE__ */
|
|
10733
|
+
/* @__PURE__ */ React24.createElement(Panel3.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ React24.createElement(
|
|
10543
10734
|
PanelContent,
|
|
10544
10735
|
{
|
|
10545
10736
|
onSelect: ({ item }) => selectView(item),
|
|
@@ -10556,7 +10747,7 @@ var SavedViewsContent = (props) => {
|
|
|
10556
10747
|
onClearTemporary: clearTemporaryView
|
|
10557
10748
|
}
|
|
10558
10749
|
))
|
|
10559
|
-
), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */
|
|
10750
|
+
), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ React24.createElement(
|
|
10560
10751
|
FormModal,
|
|
10561
10752
|
{
|
|
10562
10753
|
open: true,
|
|
@@ -10570,14 +10761,14 @@ var SavedViewsContent = (props) => {
|
|
|
10570
10761
|
setOpenEditCreateModal: closeModal,
|
|
10571
10762
|
defaultView: props.defaultView
|
|
10572
10763
|
}
|
|
10573
|
-
), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */
|
|
10764
|
+
), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ React24.createElement(
|
|
10574
10765
|
SavedViewsDeleteConfirmationModalShared,
|
|
10575
10766
|
{
|
|
10576
10767
|
open: true,
|
|
10577
10768
|
onDelete: confirmDeleteAndCloseModal,
|
|
10578
10769
|
onCancel: closeModal
|
|
10579
10770
|
}
|
|
10580
|
-
), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */
|
|
10771
|
+
), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ React24.createElement(
|
|
10581
10772
|
SharedViewFormModal,
|
|
10582
10773
|
{
|
|
10583
10774
|
open: true,
|
|
@@ -10592,14 +10783,14 @@ var SavedViewsContent = (props) => {
|
|
|
10592
10783
|
)));
|
|
10593
10784
|
};
|
|
10594
10785
|
var SavedViews = (props) => {
|
|
10595
|
-
return /* @__PURE__ */
|
|
10786
|
+
return /* @__PURE__ */ React24.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ React24.createElement(QueryClientProvider, { client: queryClient }, /* @__PURE__ */ React24.createElement(ToastAlertProvider, null, /* @__PURE__ */ React24.createElement(SavedViewsContent, { ...props }))));
|
|
10596
10787
|
};
|
|
10597
10788
|
|
|
10598
10789
|
// src/components/adapters/smart-grid/SmartGridSavedViews.tsx
|
|
10599
|
-
import
|
|
10790
|
+
import React25, { useCallback as useCallback6 } from "react";
|
|
10600
10791
|
|
|
10601
10792
|
// src/components/adapters/smart-grid/SmartGridDefaultSavedView.tsx
|
|
10602
|
-
import { useMemo as
|
|
10793
|
+
import { useMemo as useMemo4 } from "react";
|
|
10603
10794
|
var DEFAULT_COLUMN_STATE = {
|
|
10604
10795
|
hide: false,
|
|
10605
10796
|
pinned: null,
|
|
@@ -10646,7 +10837,7 @@ var extractDefaultView = (gridApi, receivedConfig) => {
|
|
|
10646
10837
|
return result;
|
|
10647
10838
|
};
|
|
10648
10839
|
var useNormalizedDefaultViews = (defaultViews, gridApi) => {
|
|
10649
|
-
return
|
|
10840
|
+
return useMemo4(() => {
|
|
10650
10841
|
if (!gridApi)
|
|
10651
10842
|
return defaultViews.map((view) => ({ ...view, share_token: view.id }));
|
|
10652
10843
|
return defaultViews.map((view) => ({
|
|
@@ -10658,7 +10849,7 @@ var useNormalizedDefaultViews = (defaultViews, gridApi) => {
|
|
|
10658
10849
|
};
|
|
10659
10850
|
|
|
10660
10851
|
// src/components/adapters/smart-grid/useSmartGridConfig.ts
|
|
10661
|
-
import { useState as
|
|
10852
|
+
import { useState as useState6, useEffect as useEffect7 } from "react";
|
|
10662
10853
|
var GRID_STATE_EVENTS = [
|
|
10663
10854
|
"sortChanged",
|
|
10664
10855
|
"filterOpened",
|
|
@@ -10674,7 +10865,7 @@ var GRID_STATE_EVENTS = [
|
|
|
10674
10865
|
"gridReady"
|
|
10675
10866
|
];
|
|
10676
10867
|
var useSmartGridConfig = (gridApi) => {
|
|
10677
|
-
const [config, setConfig] =
|
|
10868
|
+
const [config, setConfig] = useState6(
|
|
10678
10869
|
() => getSmartGridConfig(gridApi)
|
|
10679
10870
|
);
|
|
10680
10871
|
useEffect7(() => {
|
|
@@ -10695,10 +10886,10 @@ var useSmartGridConfig = (gridApi) => {
|
|
|
10695
10886
|
};
|
|
10696
10887
|
|
|
10697
10888
|
// src/components/adapters/smart-grid/useSavedViewsPanelOpen.ts
|
|
10698
|
-
import { useEffect as useEffect8, useState as
|
|
10889
|
+
import { useEffect as useEffect8, useState as useState7 } from "react";
|
|
10699
10890
|
var SAVED_VIEWS_PANEL_ID = "savedViews";
|
|
10700
10891
|
var useSavedViewsPanelOpen = (gridApi) => {
|
|
10701
|
-
const [isOpen, setIsOpen] =
|
|
10892
|
+
const [isOpen, setIsOpen] = useState7(
|
|
10702
10893
|
gridApi.getOpenedToolPanel?.() === SAVED_VIEWS_PANEL_ID
|
|
10703
10894
|
);
|
|
10704
10895
|
useEffect8(() => {
|
|
@@ -10721,7 +10912,7 @@ var SmartGridSavedViews = (props) => {
|
|
|
10721
10912
|
const isPanelOpen = useSavedViewsPanelOpen(gridApi);
|
|
10722
10913
|
const presetViews = useNormalizedDefaultViews(props.defaultViews, gridApi);
|
|
10723
10914
|
const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
|
|
10724
|
-
const onSelect =
|
|
10915
|
+
const onSelect = useCallback6(
|
|
10725
10916
|
({ item }) => {
|
|
10726
10917
|
if (!gridApi) return item;
|
|
10727
10918
|
const isPresetView = item.view_level === "default";
|
|
@@ -10748,7 +10939,7 @@ var SmartGridSavedViews = (props) => {
|
|
|
10748
10939
|
},
|
|
10749
10940
|
[gridApi, tableConfig, setTableConfig]
|
|
10750
10941
|
);
|
|
10751
|
-
return /* @__PURE__ */
|
|
10942
|
+
return /* @__PURE__ */ React25.createElement(
|
|
10752
10943
|
SavedViews,
|
|
10753
10944
|
{
|
|
10754
10945
|
onSelect,
|
|
@@ -10767,15 +10958,15 @@ var SmartGridSavedViews = (props) => {
|
|
|
10767
10958
|
};
|
|
10768
10959
|
|
|
10769
10960
|
// src/components/adapters/data-table/DataTableSavedViews.tsx
|
|
10770
|
-
import
|
|
10961
|
+
import React26, {
|
|
10771
10962
|
forwardRef as forwardRef11,
|
|
10772
10963
|
useImperativeHandle,
|
|
10773
|
-
useState as
|
|
10774
|
-
useCallback as
|
|
10964
|
+
useState as useState8,
|
|
10965
|
+
useCallback as useCallback7
|
|
10775
10966
|
} from "react";
|
|
10776
10967
|
|
|
10777
10968
|
// src/components/adapters/data-table/DataTableDefaultSavedView.tsx
|
|
10778
|
-
import { useMemo as
|
|
10969
|
+
import { useMemo as useMemo5 } from "react";
|
|
10779
10970
|
var DEFAULT_COLUMN_STATE2 = {
|
|
10780
10971
|
hidden: false,
|
|
10781
10972
|
pinned: null,
|
|
@@ -10822,7 +11013,7 @@ var extractDefaultView2 = (columnDefinitions, receivedConfigFromTool) => {
|
|
|
10822
11013
|
return result;
|
|
10823
11014
|
};
|
|
10824
11015
|
var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
|
|
10825
|
-
return
|
|
11016
|
+
return useMemo5(
|
|
10826
11017
|
() => defaultViews.map((view) => ({
|
|
10827
11018
|
...view,
|
|
10828
11019
|
share_token: view.id,
|
|
@@ -10840,7 +11031,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
|
|
|
10840
11031
|
props.columnDefinitions
|
|
10841
11032
|
);
|
|
10842
11033
|
const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
|
|
10843
|
-
const [internalTableConfig, setInternalTableConfig] =
|
|
11034
|
+
const [internalTableConfig, setInternalTableConfig] = useState8(
|
|
10844
11035
|
ViewStorage.load(props.stickyViewsKey, defaultView).table_config
|
|
10845
11036
|
);
|
|
10846
11037
|
useImperativeHandle(ref, () => ({
|
|
@@ -10848,7 +11039,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
|
|
|
10848
11039
|
setInternalTableConfig(newConfig);
|
|
10849
11040
|
}
|
|
10850
11041
|
}));
|
|
10851
|
-
const onSelect =
|
|
11042
|
+
const onSelect = useCallback7(
|
|
10852
11043
|
({ item }) => {
|
|
10853
11044
|
const isPresetView = item.view_level === "default";
|
|
10854
11045
|
const syncReferenceConfig = tableApi?.getTableConfiguration?.() ?? defaultView.table_config;
|
|
@@ -10871,7 +11062,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
|
|
|
10871
11062
|
if (!internalTableConfig) {
|
|
10872
11063
|
return null;
|
|
10873
11064
|
}
|
|
10874
|
-
return /* @__PURE__ */
|
|
11065
|
+
return /* @__PURE__ */ React26.createElement(
|
|
10875
11066
|
SavedViews,
|
|
10876
11067
|
{
|
|
10877
11068
|
onSelect,
|
|
@@ -10896,9 +11087,11 @@ export {
|
|
|
10896
11087
|
SavedViewCollectionMenuItem,
|
|
10897
11088
|
SavedViews,
|
|
10898
11089
|
SavedViewsDeleteConfirmationModalShared,
|
|
11090
|
+
SavedViewsSelectionProvider,
|
|
10899
11091
|
SmartGridSavedViews,
|
|
10900
11092
|
getTranslations,
|
|
10901
|
-
useSavedViewsPanel_default as useSavedViewsPanel
|
|
11093
|
+
useSavedViewsPanel_default as useSavedViewsPanel,
|
|
11094
|
+
useSavedViewsSelection
|
|
10902
11095
|
};
|
|
10903
11096
|
/*! Bundled license information:
|
|
10904
11097
|
|