@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/legacy/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 == null ? void 0 : selection.selectedView;
|
|
9003
|
+
const activeName = activeView == null ? void 0 : activeView.name;
|
|
9004
|
+
const activeType = (activeView == null ? void 0 : 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
|
var _a, _b;
|
|
8902
9084
|
if (!props.item) {
|
|
@@ -8944,7 +9126,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8944
9126
|
label: i18n.t("savedViews.actions.delete")
|
|
8945
9127
|
}
|
|
8946
9128
|
];
|
|
8947
|
-
const preventEventBubbleToNotTriggerViewSelectEvent =
|
|
9129
|
+
const preventEventBubbleToNotTriggerViewSelectEvent = React16.useCallback(
|
|
8948
9130
|
(e) => {
|
|
8949
9131
|
e.stopPropagation();
|
|
8950
9132
|
},
|
|
@@ -8955,7 +9137,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8955
9137
|
const hasClearTemporaryButton = props.item.id === "temporary";
|
|
8956
9138
|
const hasOverflowMenu = props.item.view_level !== "default" && props.canEditOrDelete;
|
|
8957
9139
|
const hasActions = hasUpdateButton || hasCopyShareLinkButton || hasClearTemporaryButton || hasOverflowMenu;
|
|
8958
|
-
return /* @__PURE__ */
|
|
9140
|
+
return /* @__PURE__ */ React16.createElement(
|
|
8959
9141
|
Container2,
|
|
8960
9142
|
{
|
|
8961
9143
|
"aria-selected": Boolean(props.selected),
|
|
@@ -8967,7 +9149,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8967
9149
|
"data-testid": "saved-view-collection-menu-item",
|
|
8968
9150
|
onKeyDown: preventEventBubbleToNotTriggerViewSelectEvent
|
|
8969
9151
|
},
|
|
8970
|
-
/* @__PURE__ */
|
|
9152
|
+
/* @__PURE__ */ React16.createElement(
|
|
8971
9153
|
"span",
|
|
8972
9154
|
{
|
|
8973
9155
|
"data-testid": "saved-view-display-name",
|
|
@@ -8975,7 +9157,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8975
9157
|
},
|
|
8976
9158
|
props.item.name
|
|
8977
9159
|
),
|
|
8978
|
-
hasActions && /* @__PURE__ */
|
|
9160
|
+
hasActions && /* @__PURE__ */ React16.createElement(RowActionsBox, null, /* @__PURE__ */ React16.createElement(Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React16.createElement(
|
|
8979
9161
|
Button,
|
|
8980
9162
|
{
|
|
8981
9163
|
onClick: updateItem,
|
|
@@ -8986,7 +9168,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8986
9168
|
loading: props.isUpdateProcessing
|
|
8987
9169
|
},
|
|
8988
9170
|
i18n.t("savedViews.actions.update")
|
|
8989
|
-
), hasCopyShareLinkButton && /* @__PURE__ */
|
|
9171
|
+
), hasCopyShareLinkButton && /* @__PURE__ */ React16.createElement(
|
|
8990
9172
|
Button,
|
|
8991
9173
|
{
|
|
8992
9174
|
onClick: copyShareLink,
|
|
@@ -8995,8 +9177,8 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8995
9177
|
"aria-label": i18n.t("savedViews.actions.copyShareLink"),
|
|
8996
9178
|
"data-testid": "copy-share-link-button"
|
|
8997
9179
|
},
|
|
8998
|
-
/* @__PURE__ */
|
|
8999
|
-
), hasClearTemporaryButton && /* @__PURE__ */
|
|
9180
|
+
/* @__PURE__ */ React16.createElement(IconWrapper, null, /* @__PURE__ */ React16.createElement(Link_default, { size: "sm" }))
|
|
9181
|
+
), hasClearTemporaryButton && /* @__PURE__ */ React16.createElement(
|
|
9000
9182
|
Button,
|
|
9001
9183
|
{
|
|
9002
9184
|
onClick: (e) => {
|
|
@@ -9010,8 +9192,8 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
9010
9192
|
title: i18n.t("savedViews.actions.clearTemporary"),
|
|
9011
9193
|
"data-testid": "clear-temporary-view-button"
|
|
9012
9194
|
},
|
|
9013
|
-
/* @__PURE__ */
|
|
9014
|
-
)), /* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ React16.createElement(IconWrapper, null, /* @__PURE__ */ React16.createElement(Clear_default, { size: "sm" }))
|
|
9196
|
+
)), /* @__PURE__ */ React16.createElement(Box, null, hasOverflowMenu && /* @__PURE__ */ React16.createElement(
|
|
9015
9197
|
DropdownFlyout,
|
|
9016
9198
|
{
|
|
9017
9199
|
"data-testid": "saved-view-overflow-button",
|
|
@@ -9037,7 +9219,7 @@ var ExpandedPanel = pt(Panel)`
|
|
|
9037
9219
|
// src/components/panels/PanelContent.tsx
|
|
9038
9220
|
import { Flex as Flex2, MenuImperative as MenuImperative2, useI18nContext as useI18nContext5 } from "@procore/core-react";
|
|
9039
9221
|
import { useToastAlertContext as useToastAlertContext2 } from "@procore/toast-alert";
|
|
9040
|
-
import
|
|
9222
|
+
import React18 from "react";
|
|
9041
9223
|
|
|
9042
9224
|
// src/utils/api/queries.ts
|
|
9043
9225
|
import { requestJSON as requestJSON2 } from "@procore/core-http";
|
|
@@ -9399,10 +9581,10 @@ var hasPermissionForViewLevel = (viewLevel, permissions) => {
|
|
|
9399
9581
|
};
|
|
9400
9582
|
|
|
9401
9583
|
// src/components/panels/useGroups.ts
|
|
9402
|
-
import { useState as
|
|
9584
|
+
import { useState as useState3 } from "react";
|
|
9403
9585
|
var useGroups = (isProjectLevelTool) => {
|
|
9404
9586
|
const viewLevels = getViewLevels(isProjectLevelTool);
|
|
9405
|
-
const [groups, setGroups] =
|
|
9587
|
+
const [groups, setGroups] = useState3(
|
|
9406
9588
|
Object.fromEntries(viewLevels.map((level) => [level, true]))
|
|
9407
9589
|
);
|
|
9408
9590
|
const toggleGroup = (group) => {
|
|
@@ -9419,15 +9601,15 @@ import {
|
|
|
9419
9601
|
Typography,
|
|
9420
9602
|
useI18nContext as useI18nContext4
|
|
9421
9603
|
} from "@procore/core-react";
|
|
9422
|
-
import
|
|
9604
|
+
import React17 from "react";
|
|
9423
9605
|
var groupIcon = (group) => {
|
|
9424
9606
|
switch (group) {
|
|
9425
9607
|
case "personal":
|
|
9426
|
-
return /* @__PURE__ */
|
|
9608
|
+
return /* @__PURE__ */ React17.createElement(Person_default, null);
|
|
9427
9609
|
case "project":
|
|
9428
|
-
return /* @__PURE__ */
|
|
9610
|
+
return /* @__PURE__ */ React17.createElement(Excavator_default, null);
|
|
9429
9611
|
case "company":
|
|
9430
|
-
return /* @__PURE__ */
|
|
9612
|
+
return /* @__PURE__ */ React17.createElement(Building_default, null);
|
|
9431
9613
|
}
|
|
9432
9614
|
};
|
|
9433
9615
|
var StyledButton = pt(Button2)`
|
|
@@ -9437,7 +9619,7 @@ var StyledButton = pt(Button2)`
|
|
|
9437
9619
|
`;
|
|
9438
9620
|
var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
|
|
9439
9621
|
const I18n = useI18nContext4();
|
|
9440
|
-
return /* @__PURE__ */
|
|
9622
|
+
return /* @__PURE__ */ React17.createElement(Box2, { style: { width: "100%" } }, /* @__PURE__ */ React17.createElement(
|
|
9441
9623
|
StyledButton,
|
|
9442
9624
|
{
|
|
9443
9625
|
block: true,
|
|
@@ -9450,10 +9632,10 @@ var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
|
|
|
9450
9632
|
onClick: () => toggleGroup(group),
|
|
9451
9633
|
"aria-controls": `saved-views-collections-${group}`,
|
|
9452
9634
|
"aria-expanded": expanded,
|
|
9453
|
-
icon: expanded ? /* @__PURE__ */
|
|
9635
|
+
icon: expanded ? /* @__PURE__ */ React17.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ React17.createElement(ChevronRight_default, { size: "sm" })
|
|
9454
9636
|
},
|
|
9455
9637
|
groupIcon(group),
|
|
9456
|
-
/* @__PURE__ */
|
|
9638
|
+
/* @__PURE__ */ React17.createElement(Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
|
|
9457
9639
|
));
|
|
9458
9640
|
};
|
|
9459
9641
|
var ViewLevelHeader_default = ViewLevelHeader;
|
|
@@ -9509,8 +9691,8 @@ var PanelContent = (props) => {
|
|
|
9509
9691
|
const { mutate: updateSavedView } = updateMutation;
|
|
9510
9692
|
const isUpdateLoading = "isPending" in updateMutation ? updateMutation.isPending : updateMutation.isLoading ?? false;
|
|
9511
9693
|
const savedViews = props.savedViews ?? savedViewsFromQuery;
|
|
9512
|
-
const errorToastRef =
|
|
9513
|
-
|
|
9694
|
+
const errorToastRef = React18.useRef(null);
|
|
9695
|
+
React18.useEffect(() => {
|
|
9514
9696
|
if (savedViewsError && savedViewsError !== errorToastRef.current) {
|
|
9515
9697
|
showToast.error(I18n.t("savedViews.errors.fetch"));
|
|
9516
9698
|
errorToastRef.current = savedViewsError;
|
|
@@ -9540,7 +9722,7 @@ var PanelContent = (props) => {
|
|
|
9540
9722
|
}
|
|
9541
9723
|
});
|
|
9542
9724
|
};
|
|
9543
|
-
return /* @__PURE__ */
|
|
9725
|
+
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(
|
|
9544
9726
|
StyledMenuImperative,
|
|
9545
9727
|
{
|
|
9546
9728
|
role: "listbox",
|
|
@@ -9550,7 +9732,7 @@ var PanelContent = (props) => {
|
|
|
9550
9732
|
}
|
|
9551
9733
|
}
|
|
9552
9734
|
},
|
|
9553
|
-
/* @__PURE__ */
|
|
9735
|
+
/* @__PURE__ */ React18.createElement(MenuImperative2.Options, null, temporaryView && /* @__PURE__ */ React18.createElement(
|
|
9554
9736
|
Row,
|
|
9555
9737
|
{
|
|
9556
9738
|
key: temporaryView.id,
|
|
@@ -9559,7 +9741,7 @@ var PanelContent = (props) => {
|
|
|
9559
9741
|
"aria-current": isTemporarySelected ? "true" : void 0,
|
|
9560
9742
|
ref: isTemporarySelected ? selectedRowRef : null
|
|
9561
9743
|
},
|
|
9562
|
-
/* @__PURE__ */
|
|
9744
|
+
/* @__PURE__ */ React18.createElement(
|
|
9563
9745
|
SavedViewCollectionMenuItem,
|
|
9564
9746
|
{
|
|
9565
9747
|
item: temporaryView,
|
|
@@ -9569,7 +9751,7 @@ var PanelContent = (props) => {
|
|
|
9569
9751
|
)
|
|
9570
9752
|
), presetViews.map((presetView) => {
|
|
9571
9753
|
const isSelected = (selectedSavedView == null ? void 0 : selectedSavedView.id) === presetView.id;
|
|
9572
|
-
return /* @__PURE__ */
|
|
9754
|
+
return /* @__PURE__ */ React18.createElement(
|
|
9573
9755
|
Row,
|
|
9574
9756
|
{
|
|
9575
9757
|
key: presetView.id,
|
|
@@ -9578,7 +9760,7 @@ var PanelContent = (props) => {
|
|
|
9578
9760
|
"aria-current": isSelected ? "true" : void 0,
|
|
9579
9761
|
ref: isSelected ? selectedRowRef : null
|
|
9580
9762
|
},
|
|
9581
|
-
/* @__PURE__ */
|
|
9763
|
+
/* @__PURE__ */ React18.createElement(
|
|
9582
9764
|
SavedViewCollectionMenuItem,
|
|
9583
9765
|
{
|
|
9584
9766
|
item: presetView,
|
|
@@ -9592,14 +9774,14 @@ var PanelContent = (props) => {
|
|
|
9592
9774
|
const views = isExpanded && savedViews ? savedViews.filter(
|
|
9593
9775
|
(view) => view.view_level === level && view.id !== "temporary"
|
|
9594
9776
|
) : [];
|
|
9595
|
-
return /* @__PURE__ */
|
|
9777
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, { key: level }, /* @__PURE__ */ React18.createElement(
|
|
9596
9778
|
ViewLevelHeader_default,
|
|
9597
9779
|
{
|
|
9598
9780
|
group: level,
|
|
9599
9781
|
toggleGroup,
|
|
9600
9782
|
expanded: isExpanded
|
|
9601
9783
|
}
|
|
9602
|
-
), isExpanded && views.length > 0 && /* @__PURE__ */
|
|
9784
|
+
), isExpanded && views.length > 0 && /* @__PURE__ */ React18.createElement(
|
|
9603
9785
|
StyledMenuImperative,
|
|
9604
9786
|
{
|
|
9605
9787
|
id: `saved-views-collections-${level}`,
|
|
@@ -9610,7 +9792,7 @@ var PanelContent = (props) => {
|
|
|
9610
9792
|
}
|
|
9611
9793
|
}
|
|
9612
9794
|
},
|
|
9613
|
-
/* @__PURE__ */
|
|
9795
|
+
/* @__PURE__ */ React18.createElement(MenuImperative2.Options, null, views.map((view) => {
|
|
9614
9796
|
const isSelected = (selectedSavedView == null ? void 0 : selectedSavedView.id) === view.id;
|
|
9615
9797
|
const canUpdate = isSelected && hasPermissionForViewLevel(
|
|
9616
9798
|
view.view_level,
|
|
@@ -9622,7 +9804,7 @@ var PanelContent = (props) => {
|
|
|
9622
9804
|
props.provider
|
|
9623
9805
|
);
|
|
9624
9806
|
const canEditOrDelete = isSelected && hasPermissionForViewLevel(view.view_level, permissions);
|
|
9625
|
-
return /* @__PURE__ */
|
|
9807
|
+
return /* @__PURE__ */ React18.createElement(
|
|
9626
9808
|
Row,
|
|
9627
9809
|
{
|
|
9628
9810
|
key: view.id,
|
|
@@ -9631,7 +9813,7 @@ var PanelContent = (props) => {
|
|
|
9631
9813
|
"aria-current": isSelected ? "true" : void 0,
|
|
9632
9814
|
ref: isSelected ? selectedRowRef : null
|
|
9633
9815
|
},
|
|
9634
|
-
/* @__PURE__ */
|
|
9816
|
+
/* @__PURE__ */ React18.createElement(
|
|
9635
9817
|
SavedViewCollectionMenuItem,
|
|
9636
9818
|
{
|
|
9637
9819
|
item: view,
|
|
@@ -9658,10 +9840,10 @@ import {
|
|
|
9658
9840
|
Button as Button6,
|
|
9659
9841
|
Flex as Flex5,
|
|
9660
9842
|
Panel as Panel3,
|
|
9661
|
-
Tooltip,
|
|
9843
|
+
Tooltip as Tooltip2,
|
|
9662
9844
|
useI18nContext as useI18nContext12
|
|
9663
9845
|
} from "@procore/core-react";
|
|
9664
|
-
import
|
|
9846
|
+
import React24, { useState as useState5, useEffect as useEffect6, useCallback as useCallback5 } from "react";
|
|
9665
9847
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
9666
9848
|
import { useToastAlertContext as useToastAlertContext3, ToastAlertProvider } from "@procore/toast-alert";
|
|
9667
9849
|
|
|
@@ -9673,14 +9855,14 @@ import {
|
|
|
9673
9855
|
P as P2,
|
|
9674
9856
|
useI18nContext as useI18nContext6
|
|
9675
9857
|
} from "@procore/core-react";
|
|
9676
|
-
import
|
|
9858
|
+
import React19 from "react";
|
|
9677
9859
|
var SavedViewsDeleteConfirmationModalShared = ({
|
|
9678
9860
|
onCancel,
|
|
9679
9861
|
onDelete,
|
|
9680
9862
|
open
|
|
9681
9863
|
}) => {
|
|
9682
9864
|
const i18n = useI18nContext6();
|
|
9683
|
-
return /* @__PURE__ */
|
|
9865
|
+
return /* @__PURE__ */ React19.createElement(
|
|
9684
9866
|
ConfirmModal,
|
|
9685
9867
|
{
|
|
9686
9868
|
"data-testid": "delete-confirmation-modal",
|
|
@@ -9690,13 +9872,13 @@ var SavedViewsDeleteConfirmationModalShared = ({
|
|
|
9690
9872
|
onClose: onCancel,
|
|
9691
9873
|
style: { overflowWrap: "anywhere" }
|
|
9692
9874
|
},
|
|
9693
|
-
/* @__PURE__ */
|
|
9694
|
-
/* @__PURE__ */
|
|
9875
|
+
/* @__PURE__ */ React19.createElement(Modal.Body, null, /* @__PURE__ */ React19.createElement(P2, null, i18n.t("savedViews.modal.delete.description"))),
|
|
9876
|
+
/* @__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"))))
|
|
9695
9877
|
);
|
|
9696
9878
|
};
|
|
9697
9879
|
|
|
9698
9880
|
// src/components/modals/form-modal/FormModal.tsx
|
|
9699
|
-
import
|
|
9881
|
+
import React22 from "react";
|
|
9700
9882
|
|
|
9701
9883
|
// src/components/modals/form-modal/FormModalBase.tsx
|
|
9702
9884
|
import {
|
|
@@ -9711,7 +9893,7 @@ import {
|
|
|
9711
9893
|
Typography as Typography2,
|
|
9712
9894
|
useI18nContext as useI18nContext8
|
|
9713
9895
|
} from "@procore/core-react";
|
|
9714
|
-
import * as
|
|
9896
|
+
import * as React21 from "react";
|
|
9715
9897
|
import * as yup from "yup";
|
|
9716
9898
|
|
|
9717
9899
|
// src/components/modals/form-modal/FormModalBaseUtils.ts
|
|
@@ -9748,7 +9930,7 @@ function extractMessage(error, I18n) {
|
|
|
9748
9930
|
|
|
9749
9931
|
// src/components/modals/form-modal/NameInputField.tsx
|
|
9750
9932
|
import { Form, useFormContext, useI18nContext as useI18nContext7 } from "@procore/core-react";
|
|
9751
|
-
import * as
|
|
9933
|
+
import * as React20 from "react";
|
|
9752
9934
|
var NAME_INPUT_ID = "saved-view-form-name-input";
|
|
9753
9935
|
var NameInputField = ({
|
|
9754
9936
|
error,
|
|
@@ -9757,13 +9939,13 @@ var NameInputField = ({
|
|
|
9757
9939
|
const I18n = useI18nContext7();
|
|
9758
9940
|
const label = I18n.t("savedViews.modal.fields.name");
|
|
9759
9941
|
const { errors: formErrors, submitCount } = useFormContext();
|
|
9760
|
-
|
|
9942
|
+
React20.useEffect(() => {
|
|
9761
9943
|
var _a;
|
|
9762
9944
|
if (submitCount > 0 && (formErrors == null ? void 0 : formErrors.name)) {
|
|
9763
9945
|
(_a = document.getElementById(NAME_INPUT_ID)) == null ? void 0 : _a.focus();
|
|
9764
9946
|
}
|
|
9765
9947
|
}, [formErrors == null ? void 0 : formErrors.name, submitCount]);
|
|
9766
|
-
return /* @__PURE__ */
|
|
9948
|
+
return /* @__PURE__ */ React20.createElement(
|
|
9767
9949
|
Form.Text,
|
|
9768
9950
|
{
|
|
9769
9951
|
id: NAME_INPUT_ID,
|
|
@@ -9855,7 +10037,7 @@ var FormModalBase = ({
|
|
|
9855
10037
|
I18n,
|
|
9856
10038
|
isProjectLevelTool
|
|
9857
10039
|
);
|
|
9858
|
-
return /* @__PURE__ */
|
|
10040
|
+
return /* @__PURE__ */ React21.createElement(
|
|
9859
10041
|
Modal2,
|
|
9860
10042
|
{
|
|
9861
10043
|
howToClose: ["x", "scrim"],
|
|
@@ -9864,7 +10046,7 @@ var FormModalBase = ({
|
|
|
9864
10046
|
width: "md",
|
|
9865
10047
|
"data-testid": "create-update-modal"
|
|
9866
10048
|
},
|
|
9867
|
-
/* @__PURE__ */
|
|
10049
|
+
/* @__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(
|
|
9868
10050
|
Form2,
|
|
9869
10051
|
{
|
|
9870
10052
|
initialValues: {
|
|
@@ -9890,25 +10072,25 @@ var FormModalBase = ({
|
|
|
9890
10072
|
onReset: onCancel,
|
|
9891
10073
|
validateOnChange: true
|
|
9892
10074
|
},
|
|
9893
|
-
/* @__PURE__ */
|
|
10075
|
+
/* @__PURE__ */ React21.createElement(Form2.Form, { name: header }, /* @__PURE__ */ React21.createElement(
|
|
9894
10076
|
Modal2.Body,
|
|
9895
10077
|
{
|
|
9896
10078
|
style: { paddingTop: 0, paddingBottom: 0, marginTop: spacing2.lg }
|
|
9897
10079
|
},
|
|
9898
|
-
errors && /* @__PURE__ */
|
|
9899
|
-
/* @__PURE__ */
|
|
10080
|
+
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 == null ? void 0 : errors.form) || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
|
|
10081
|
+
/* @__PURE__ */ React21.createElement(Form2.Row, null, /* @__PURE__ */ React21.createElement(
|
|
9900
10082
|
NameInputField,
|
|
9901
10083
|
{
|
|
9902
10084
|
error: errors == null ? void 0 : errors.name,
|
|
9903
10085
|
onResetMutations: resetMutations
|
|
9904
10086
|
}
|
|
9905
10087
|
)),
|
|
9906
|
-
/* @__PURE__ */
|
|
10088
|
+
/* @__PURE__ */ React21.createElement(
|
|
9907
10089
|
Form2.Row,
|
|
9908
10090
|
{
|
|
9909
10091
|
style: { marginTop: (errors == null ? void 0 : errors.name) ? spacing2.xl : spacing2.none }
|
|
9910
10092
|
},
|
|
9911
|
-
/* @__PURE__ */
|
|
10093
|
+
/* @__PURE__ */ React21.createElement(
|
|
9912
10094
|
Form2.TextArea,
|
|
9913
10095
|
{
|
|
9914
10096
|
name: "description",
|
|
@@ -9919,7 +10101,7 @@ var FormModalBase = ({
|
|
|
9919
10101
|
}
|
|
9920
10102
|
)
|
|
9921
10103
|
),
|
|
9922
|
-
viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */
|
|
10104
|
+
viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React21.createElement(Form2.Row, null, /* @__PURE__ */ React21.createElement(
|
|
9923
10105
|
Form2.Select,
|
|
9924
10106
|
{
|
|
9925
10107
|
name: "view_level",
|
|
@@ -9929,8 +10111,8 @@ var FormModalBase = ({
|
|
|
9929
10111
|
onSearch: false,
|
|
9930
10112
|
onClear: false
|
|
9931
10113
|
}
|
|
9932
|
-
)) : /* @__PURE__ */
|
|
9933
|
-
), /* @__PURE__ */
|
|
10114
|
+
)) : /* @__PURE__ */ React21.createElement(React21.Fragment, null)
|
|
10115
|
+
), /* @__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(
|
|
9934
10116
|
Button4,
|
|
9935
10117
|
{
|
|
9936
10118
|
"data-testid": "create-update-modal-button",
|
|
@@ -9960,7 +10142,7 @@ var FormModal = ({
|
|
|
9960
10142
|
defaultView
|
|
9961
10143
|
}) => {
|
|
9962
10144
|
const i18n = useI18nContext9();
|
|
9963
|
-
return /* @__PURE__ */
|
|
10145
|
+
return /* @__PURE__ */ React22.createElement(
|
|
9964
10146
|
FormModalBase,
|
|
9965
10147
|
{
|
|
9966
10148
|
open,
|
|
@@ -9994,7 +10176,7 @@ import {
|
|
|
9994
10176
|
Typography as Typography3,
|
|
9995
10177
|
useI18nContext as useI18nContext10
|
|
9996
10178
|
} from "@procore/core-react";
|
|
9997
|
-
import * as
|
|
10179
|
+
import * as React23 from "react";
|
|
9998
10180
|
import * as yup2 from "yup";
|
|
9999
10181
|
var SharedViewFormModal = ({
|
|
10000
10182
|
open,
|
|
@@ -10017,7 +10199,7 @@ var SharedViewFormModal = ({
|
|
|
10017
10199
|
const handleOnSubmit = (data) => {
|
|
10018
10200
|
onCreateView(data.name, data.description);
|
|
10019
10201
|
};
|
|
10020
|
-
return /* @__PURE__ */
|
|
10202
|
+
return /* @__PURE__ */ React23.createElement(
|
|
10021
10203
|
Modal3,
|
|
10022
10204
|
{
|
|
10023
10205
|
"data-testid": "shared-view-form-modal",
|
|
@@ -10026,7 +10208,7 @@ var SharedViewFormModal = ({
|
|
|
10026
10208
|
onClose,
|
|
10027
10209
|
style: { width: "540px" }
|
|
10028
10210
|
},
|
|
10029
|
-
/* @__PURE__ */
|
|
10211
|
+
/* @__PURE__ */ React23.createElement(
|
|
10030
10212
|
Modal3.Header,
|
|
10031
10213
|
{
|
|
10032
10214
|
onClose,
|
|
@@ -10037,9 +10219,9 @@ var SharedViewFormModal = ({
|
|
|
10037
10219
|
paddingRight: spacing3.xl
|
|
10038
10220
|
}
|
|
10039
10221
|
},
|
|
10040
|
-
/* @__PURE__ */
|
|
10222
|
+
/* @__PURE__ */ React23.createElement(Modal3.Heading, null, I18n.t("savedViews.modal.create.title"))
|
|
10041
10223
|
),
|
|
10042
|
-
/* @__PURE__ */
|
|
10224
|
+
/* @__PURE__ */ React23.createElement(
|
|
10043
10225
|
P3,
|
|
10044
10226
|
{
|
|
10045
10227
|
style: {
|
|
@@ -10054,7 +10236,7 @@ var SharedViewFormModal = ({
|
|
|
10054
10236
|
},
|
|
10055
10237
|
I18n.t("savedViews.modal.copyConfirmation.description")
|
|
10056
10238
|
),
|
|
10057
|
-
/* @__PURE__ */
|
|
10239
|
+
/* @__PURE__ */ React23.createElement(
|
|
10058
10240
|
Form3,
|
|
10059
10241
|
{
|
|
10060
10242
|
initialValues: {
|
|
@@ -10073,7 +10255,7 @@ var SharedViewFormModal = ({
|
|
|
10073
10255
|
onSubmit: handleOnSubmit,
|
|
10074
10256
|
validateOnChange: true
|
|
10075
10257
|
},
|
|
10076
|
-
/* @__PURE__ */
|
|
10258
|
+
/* @__PURE__ */ React23.createElement(Form3.Form, { name: "share-view-form" }, /* @__PURE__ */ React23.createElement(
|
|
10077
10259
|
Modal3.Body,
|
|
10078
10260
|
{
|
|
10079
10261
|
style: {
|
|
@@ -10082,22 +10264,22 @@ var SharedViewFormModal = ({
|
|
|
10082
10264
|
borderTop: `1px solid ${colors4.gray85}`
|
|
10083
10265
|
}
|
|
10084
10266
|
},
|
|
10085
|
-
errors && /* @__PURE__ */
|
|
10267
|
+
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", {
|
|
10086
10268
|
mode: "create"
|
|
10087
|
-
})), /* @__PURE__ */
|
|
10088
|
-
/* @__PURE__ */
|
|
10269
|
+
})), /* @__PURE__ */ React23.createElement(Banner2.Body, null, (errors == null ? void 0 : errors.form) || I18n.t("savedViews.modal.errors.description.create")))),
|
|
10270
|
+
/* @__PURE__ */ React23.createElement(Form3.Row, null, /* @__PURE__ */ React23.createElement(
|
|
10089
10271
|
NameInputField,
|
|
10090
10272
|
{
|
|
10091
10273
|
error: errors == null ? void 0 : errors.name,
|
|
10092
10274
|
onResetMutations: handleNameChange
|
|
10093
10275
|
}
|
|
10094
10276
|
)),
|
|
10095
|
-
/* @__PURE__ */
|
|
10277
|
+
/* @__PURE__ */ React23.createElement(
|
|
10096
10278
|
Form3.Row,
|
|
10097
10279
|
{
|
|
10098
10280
|
style: { marginTop: (errors == null ? void 0 : errors.name) ? spacing3.xl : spacing3.none }
|
|
10099
10281
|
},
|
|
10100
|
-
/* @__PURE__ */
|
|
10282
|
+
/* @__PURE__ */ React23.createElement(
|
|
10101
10283
|
Form3.TextArea,
|
|
10102
10284
|
{
|
|
10103
10285
|
name: "description",
|
|
@@ -10108,7 +10290,7 @@ var SharedViewFormModal = ({
|
|
|
10108
10290
|
}
|
|
10109
10291
|
)
|
|
10110
10292
|
)
|
|
10111
|
-
), /* @__PURE__ */
|
|
10293
|
+
), /* @__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(
|
|
10112
10294
|
Button5,
|
|
10113
10295
|
{
|
|
10114
10296
|
variant: "secondary",
|
|
@@ -10117,7 +10299,7 @@ var SharedViewFormModal = ({
|
|
|
10117
10299
|
disabled: isCreating
|
|
10118
10300
|
},
|
|
10119
10301
|
I18n.t("savedViews.actions.viewTemporarily")
|
|
10120
|
-
), /* @__PURE__ */
|
|
10302
|
+
), /* @__PURE__ */ React23.createElement(
|
|
10121
10303
|
Button5,
|
|
10122
10304
|
{
|
|
10123
10305
|
type: "submit",
|
|
@@ -10133,7 +10315,7 @@ var SharedViewFormModal = ({
|
|
|
10133
10315
|
};
|
|
10134
10316
|
|
|
10135
10317
|
// src/utils/hooks/useViewSelection.ts
|
|
10136
|
-
import { useState as
|
|
10318
|
+
import { useState as useState4, useCallback as useCallback4, useEffect as useEffect4, useRef as useRef3, useMemo as useMemo3 } from "react";
|
|
10137
10319
|
import { useSearchParams } from "react-router-dom";
|
|
10138
10320
|
import { useI18nContext as useI18nContext11 } from "@procore/core-react";
|
|
10139
10321
|
|
|
@@ -10160,13 +10342,13 @@ var ViewStorage = {
|
|
|
10160
10342
|
};
|
|
10161
10343
|
|
|
10162
10344
|
// src/utils/hooks/useLatest.ts
|
|
10163
|
-
import { useCallback as
|
|
10345
|
+
import { useCallback as useCallback3, useLayoutEffect, useRef as useRef2 } from "react";
|
|
10164
10346
|
var useLatest = (callback) => {
|
|
10165
10347
|
const ref = useRef2(callback);
|
|
10166
10348
|
useLayoutEffect(() => {
|
|
10167
10349
|
ref.current = callback;
|
|
10168
10350
|
});
|
|
10169
|
-
return
|
|
10351
|
+
return useCallback3((...args) => ref.current(...args), []);
|
|
10170
10352
|
};
|
|
10171
10353
|
|
|
10172
10354
|
// src/utils/hooks/useViewSelection.ts
|
|
@@ -10179,16 +10361,21 @@ var areRowGroupStatesEqual = (a2, b2) => {
|
|
|
10179
10361
|
if (a2.length !== b2.length) return false;
|
|
10180
10362
|
return a2.every((val, idx) => val === b2[idx]);
|
|
10181
10363
|
};
|
|
10182
|
-
var
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
updatedParams.set("saved-view", "default");
|
|
10186
|
-
} else if (view.id === "temporary") {
|
|
10187
|
-
updatedParams.set("saved-view", "temporary");
|
|
10188
|
-
} else {
|
|
10189
|
-
updatedParams.set("saved-view", view.share_token);
|
|
10364
|
+
var getViewToken = (view) => {
|
|
10365
|
+
if (view.id === "default" || view.id === "temporary") {
|
|
10366
|
+
return view.id;
|
|
10190
10367
|
}
|
|
10191
|
-
return
|
|
10368
|
+
return view.share_token;
|
|
10369
|
+
};
|
|
10370
|
+
var setSavedViewParam = (token2, setSearchParams) => {
|
|
10371
|
+
setSearchParams(
|
|
10372
|
+
(currentParams) => {
|
|
10373
|
+
const updatedParams = new URLSearchParams(currentParams);
|
|
10374
|
+
updatedParams.set("saved-view", token2);
|
|
10375
|
+
return updatedParams;
|
|
10376
|
+
},
|
|
10377
|
+
{ replace: true }
|
|
10378
|
+
);
|
|
10192
10379
|
};
|
|
10193
10380
|
var checkIsViewSelected = (selectedView, viewId) => {
|
|
10194
10381
|
return (selectedView == null ? void 0 : selectedView.share_token) === viewId || (selectedView == null ? void 0 : selectedView.id) === viewId;
|
|
@@ -10197,21 +10384,11 @@ var findViewByToken = (views, token2) => {
|
|
|
10197
10384
|
return views.find((view) => view.share_token === token2);
|
|
10198
10385
|
};
|
|
10199
10386
|
var setViewInUrl = (view, setSearchParams) => {
|
|
10200
|
-
setSearchParams
|
|
10201
|
-
(currentParams) => getUpdatedSearchParams(currentParams, view),
|
|
10202
|
-
{ replace: true }
|
|
10203
|
-
);
|
|
10387
|
+
setSavedViewParam(getViewToken(view), setSearchParams);
|
|
10204
10388
|
};
|
|
10205
10389
|
var restoreUrlParameter = (currentParam, previousParam, setSearchParams) => {
|
|
10206
10390
|
if (previousParam && !currentParam) {
|
|
10207
|
-
setSearchParams
|
|
10208
|
-
(currentParams) => {
|
|
10209
|
-
const updatedParams = new URLSearchParams(currentParams);
|
|
10210
|
-
updatedParams.set("saved-view", previousParam);
|
|
10211
|
-
return updatedParams;
|
|
10212
|
-
},
|
|
10213
|
-
{ replace: true }
|
|
10214
|
-
);
|
|
10391
|
+
setSavedViewParam(previousParam, setSearchParams);
|
|
10215
10392
|
}
|
|
10216
10393
|
};
|
|
10217
10394
|
var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, tableConfig) => {
|
|
@@ -10221,30 +10398,32 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10221
10398
|
const temporaryStorageKey = `${storageKey}-temporary`;
|
|
10222
10399
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
10223
10400
|
const previousSavedViewParamRef = useRef3(null);
|
|
10224
|
-
const
|
|
10401
|
+
const intendedTokenRef = useRef3(null);
|
|
10402
|
+
const [selectedSavedView, setSelectedSavedView] = useState4(() => {
|
|
10225
10403
|
const stored = ViewStorage.load(storageKey, config.defaultView);
|
|
10226
10404
|
return stored ?? config.defaultView;
|
|
10227
10405
|
});
|
|
10228
|
-
const [temporaryView, setTemporaryView] =
|
|
10406
|
+
const [temporaryView, setTemporaryView] = useState4(() => {
|
|
10229
10407
|
const loaded = ViewStorage.load(temporaryStorageKey, config.defaultView);
|
|
10230
10408
|
return loaded && (loaded.id === "temporary" || loaded.view_level === "temporary") ? loaded : null;
|
|
10231
10409
|
});
|
|
10232
|
-
const persistViewToStorageAndUrl =
|
|
10410
|
+
const persistViewToStorageAndUrl = useCallback4(
|
|
10233
10411
|
(view) => {
|
|
10234
10412
|
ViewStorage.save(storageKey, view);
|
|
10413
|
+
intendedTokenRef.current = getViewToken(view);
|
|
10235
10414
|
setViewInUrl(view, setSearchParams);
|
|
10236
10415
|
},
|
|
10237
10416
|
[storageKey, setSearchParams]
|
|
10238
10417
|
);
|
|
10239
|
-
const baseViews =
|
|
10418
|
+
const baseViews = useMemo3(
|
|
10240
10419
|
() => [...savedViews ?? [], ...presetViews ?? []],
|
|
10241
10420
|
[savedViews, presetViews]
|
|
10242
10421
|
);
|
|
10243
|
-
const allViews =
|
|
10422
|
+
const allViews = useMemo3(
|
|
10244
10423
|
() => temporaryView ? [...baseViews, temporaryView] : baseViews,
|
|
10245
10424
|
[baseViews, temporaryView]
|
|
10246
10425
|
);
|
|
10247
|
-
const selectView =
|
|
10426
|
+
const selectView = useCallback4(
|
|
10248
10427
|
(view) => {
|
|
10249
10428
|
const viewToSelect = config.onSelect({ item: view });
|
|
10250
10429
|
setSelectedSavedView(viewToSelect);
|
|
@@ -10253,7 +10432,7 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10253
10432
|
},
|
|
10254
10433
|
[config, persistViewToStorageAndUrl]
|
|
10255
10434
|
);
|
|
10256
|
-
const createTemporaryView =
|
|
10435
|
+
const createTemporaryView = useCallback4(
|
|
10257
10436
|
(fetchedView) => {
|
|
10258
10437
|
const tempView = {
|
|
10259
10438
|
...fetchedView,
|
|
@@ -10268,12 +10447,12 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10268
10447
|
},
|
|
10269
10448
|
[temporaryStorageKey, selectView]
|
|
10270
10449
|
);
|
|
10271
|
-
const clearTemporaryView =
|
|
10450
|
+
const clearTemporaryView = useCallback4(() => {
|
|
10272
10451
|
ViewStorage.remove(temporaryStorageKey);
|
|
10273
10452
|
setTemporaryView(null);
|
|
10274
10453
|
selectView(config.defaultView);
|
|
10275
10454
|
}, [temporaryStorageKey, config.defaultView, selectView]);
|
|
10276
|
-
const isViewAlreadySelected =
|
|
10455
|
+
const isViewAlreadySelected = useCallback4(
|
|
10277
10456
|
(viewId) => checkIsViewSelected(selectedSavedView, viewId),
|
|
10278
10457
|
[selectedSavedView]
|
|
10279
10458
|
);
|
|
@@ -10290,6 +10469,14 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10290
10469
|
});
|
|
10291
10470
|
useEffect4(() => {
|
|
10292
10471
|
const savedViewId = searchParams.get("saved-view");
|
|
10472
|
+
const intendedToken = intendedTokenRef.current;
|
|
10473
|
+
if (intendedToken !== null && savedViewId !== intendedToken) {
|
|
10474
|
+
setSavedViewParam(intendedToken, setSearchParams);
|
|
10475
|
+
return;
|
|
10476
|
+
}
|
|
10477
|
+
if (intendedToken !== null && savedViewId === intendedToken) {
|
|
10478
|
+
intendedTokenRef.current = null;
|
|
10479
|
+
}
|
|
10293
10480
|
restoreUrlParameter(
|
|
10294
10481
|
savedViewId,
|
|
10295
10482
|
previousSavedViewParamRef.current,
|
|
@@ -10405,6 +10592,7 @@ var StyledPanel = pt.div`
|
|
|
10405
10592
|
`;
|
|
10406
10593
|
var queryClient = new QueryClient();
|
|
10407
10594
|
var SavedViewsContent = (props) => {
|
|
10595
|
+
var _a;
|
|
10408
10596
|
const { projectId, companyId } = props;
|
|
10409
10597
|
const queryInput = {
|
|
10410
10598
|
domain: props.domain,
|
|
@@ -10416,13 +10604,13 @@ var SavedViewsContent = (props) => {
|
|
|
10416
10604
|
const { mutate: deleteSavedView } = useDeleteSavedView(queryInput);
|
|
10417
10605
|
const { showToast } = useToastAlertContext3();
|
|
10418
10606
|
const i18n = useI18nContext12();
|
|
10419
|
-
const [activeModal, setActiveModal] =
|
|
10420
|
-
const [modalData, setModalData] =
|
|
10607
|
+
const [activeModal, setActiveModal] = useState5(null);
|
|
10608
|
+
const [modalData, setModalData] = useState5(null);
|
|
10421
10609
|
const openModal = (type, data) => {
|
|
10422
10610
|
setActiveModal(type);
|
|
10423
10611
|
setModalData(data ?? null);
|
|
10424
10612
|
};
|
|
10425
|
-
const closeModal =
|
|
10613
|
+
const closeModal = useCallback5(() => {
|
|
10426
10614
|
setActiveModal(null);
|
|
10427
10615
|
setModalData(null);
|
|
10428
10616
|
}, []);
|
|
@@ -10469,6 +10657,10 @@ var SavedViewsContent = (props) => {
|
|
|
10469
10657
|
closeModal();
|
|
10470
10658
|
}
|
|
10471
10659
|
}, [fetchError, selectedView, props.defaultView, selectView, closeModal]);
|
|
10660
|
+
const setSelectedViewInContext = (_a = useSavedViewsSelection()) == null ? void 0 : _a.setSelectedView;
|
|
10661
|
+
useEffect6(() => {
|
|
10662
|
+
setSelectedViewInContext == null ? void 0 : setSelectedViewInContext(selectedView ?? null);
|
|
10663
|
+
}, [selectedView, setSelectedViewInContext]);
|
|
10472
10664
|
const viewSharedViewTemporarily = () => {
|
|
10473
10665
|
if (fetchedView) {
|
|
10474
10666
|
createTemporaryView(fetchedView);
|
|
@@ -10510,19 +10702,19 @@ var SavedViewsContent = (props) => {
|
|
|
10510
10702
|
deleteSelectedView();
|
|
10511
10703
|
closeModal();
|
|
10512
10704
|
};
|
|
10513
|
-
return /* @__PURE__ */
|
|
10705
|
+
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(
|
|
10514
10706
|
ExpandedPanel,
|
|
10515
10707
|
{
|
|
10516
10708
|
"data-testid": "saved-view-expanded-panel",
|
|
10517
10709
|
provider: props.provider
|
|
10518
10710
|
},
|
|
10519
|
-
/* @__PURE__ */
|
|
10520
|
-
|
|
10711
|
+
/* @__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(
|
|
10712
|
+
Tooltip2,
|
|
10521
10713
|
{
|
|
10522
10714
|
showDelay: 200,
|
|
10523
|
-
overlay: /* @__PURE__ */
|
|
10715
|
+
overlay: /* @__PURE__ */ React24.createElement(Tooltip2.Content, null, i18n.t("savedViews.tooltip"))
|
|
10524
10716
|
},
|
|
10525
|
-
/* @__PURE__ */
|
|
10717
|
+
/* @__PURE__ */ React24.createElement(
|
|
10526
10718
|
Help_default,
|
|
10527
10719
|
{
|
|
10528
10720
|
tabIndex: 0,
|
|
@@ -10530,16 +10722,16 @@ var SavedViewsContent = (props) => {
|
|
|
10530
10722
|
"aria-label": i18n.t("savedViews.tooltip")
|
|
10531
10723
|
}
|
|
10532
10724
|
)
|
|
10533
|
-
))), /* @__PURE__ */
|
|
10534
|
-
|
|
10725
|
+
))), /* @__PURE__ */ React24.createElement(
|
|
10726
|
+
Tooltip2,
|
|
10535
10727
|
{
|
|
10536
10728
|
overlay: i18n.t("savedViews.actions.create"),
|
|
10537
10729
|
showDelay: 1e3
|
|
10538
10730
|
},
|
|
10539
|
-
/* @__PURE__ */
|
|
10731
|
+
/* @__PURE__ */ React24.createElement(
|
|
10540
10732
|
Button6,
|
|
10541
10733
|
{
|
|
10542
|
-
icon: /* @__PURE__ */
|
|
10734
|
+
icon: /* @__PURE__ */ React24.createElement(Plus_default, null),
|
|
10543
10735
|
variant: "secondary",
|
|
10544
10736
|
"data-testid": "expanded-panel-create-button",
|
|
10545
10737
|
onClick: () => openModal("create" /* CREATE */),
|
|
@@ -10548,7 +10740,7 @@ var SavedViewsContent = (props) => {
|
|
|
10548
10740
|
i18n.t("savedViews.actions.create")
|
|
10549
10741
|
)
|
|
10550
10742
|
)),
|
|
10551
|
-
/* @__PURE__ */
|
|
10743
|
+
/* @__PURE__ */ React24.createElement(Panel3.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ React24.createElement(
|
|
10552
10744
|
PanelContent,
|
|
10553
10745
|
{
|
|
10554
10746
|
onSelect: ({ item }) => selectView(item),
|
|
@@ -10565,7 +10757,7 @@ var SavedViewsContent = (props) => {
|
|
|
10565
10757
|
onClearTemporary: clearTemporaryView
|
|
10566
10758
|
}
|
|
10567
10759
|
))
|
|
10568
|
-
), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */
|
|
10760
|
+
), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ React24.createElement(
|
|
10569
10761
|
FormModal,
|
|
10570
10762
|
{
|
|
10571
10763
|
open: true,
|
|
@@ -10579,14 +10771,14 @@ var SavedViewsContent = (props) => {
|
|
|
10579
10771
|
setOpenEditCreateModal: closeModal,
|
|
10580
10772
|
defaultView: props.defaultView
|
|
10581
10773
|
}
|
|
10582
|
-
), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */
|
|
10774
|
+
), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ React24.createElement(
|
|
10583
10775
|
SavedViewsDeleteConfirmationModalShared,
|
|
10584
10776
|
{
|
|
10585
10777
|
open: true,
|
|
10586
10778
|
onDelete: confirmDeleteAndCloseModal,
|
|
10587
10779
|
onCancel: closeModal
|
|
10588
10780
|
}
|
|
10589
|
-
), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */
|
|
10781
|
+
), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ React24.createElement(
|
|
10590
10782
|
SharedViewFormModal,
|
|
10591
10783
|
{
|
|
10592
10784
|
open: true,
|
|
@@ -10601,14 +10793,14 @@ var SavedViewsContent = (props) => {
|
|
|
10601
10793
|
)));
|
|
10602
10794
|
};
|
|
10603
10795
|
var SavedViews = (props) => {
|
|
10604
|
-
return /* @__PURE__ */
|
|
10796
|
+
return /* @__PURE__ */ React24.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ React24.createElement(QueryClientProvider, { client: queryClient }, /* @__PURE__ */ React24.createElement(ToastAlertProvider, null, /* @__PURE__ */ React24.createElement(SavedViewsContent, { ...props }))));
|
|
10605
10797
|
};
|
|
10606
10798
|
|
|
10607
10799
|
// src/components/adapters/smart-grid/SmartGridSavedViews.tsx
|
|
10608
|
-
import
|
|
10800
|
+
import React25, { useCallback as useCallback6 } from "react";
|
|
10609
10801
|
|
|
10610
10802
|
// src/components/adapters/smart-grid/SmartGridDefaultSavedView.tsx
|
|
10611
|
-
import { useMemo as
|
|
10803
|
+
import { useMemo as useMemo4 } from "react";
|
|
10612
10804
|
var DEFAULT_COLUMN_STATE = {
|
|
10613
10805
|
hide: false,
|
|
10614
10806
|
pinned: null,
|
|
@@ -10656,7 +10848,7 @@ var extractDefaultView = (gridApi, receivedConfig) => {
|
|
|
10656
10848
|
return result;
|
|
10657
10849
|
};
|
|
10658
10850
|
var useNormalizedDefaultViews = (defaultViews, gridApi) => {
|
|
10659
|
-
return
|
|
10851
|
+
return useMemo4(() => {
|
|
10660
10852
|
if (!gridApi)
|
|
10661
10853
|
return defaultViews.map((view) => ({ ...view, share_token: view.id }));
|
|
10662
10854
|
return defaultViews.map((view) => ({
|
|
@@ -10668,7 +10860,7 @@ var useNormalizedDefaultViews = (defaultViews, gridApi) => {
|
|
|
10668
10860
|
};
|
|
10669
10861
|
|
|
10670
10862
|
// src/components/adapters/smart-grid/useSmartGridConfig.ts
|
|
10671
|
-
import { useState as
|
|
10863
|
+
import { useState as useState6, useEffect as useEffect7 } from "react";
|
|
10672
10864
|
var GRID_STATE_EVENTS = [
|
|
10673
10865
|
"sortChanged",
|
|
10674
10866
|
"filterOpened",
|
|
@@ -10684,7 +10876,7 @@ var GRID_STATE_EVENTS = [
|
|
|
10684
10876
|
"gridReady"
|
|
10685
10877
|
];
|
|
10686
10878
|
var useSmartGridConfig = (gridApi) => {
|
|
10687
|
-
const [config, setConfig] =
|
|
10879
|
+
const [config, setConfig] = useState6(
|
|
10688
10880
|
() => getSmartGridConfig(gridApi)
|
|
10689
10881
|
);
|
|
10690
10882
|
useEffect7(() => {
|
|
@@ -10705,11 +10897,11 @@ var useSmartGridConfig = (gridApi) => {
|
|
|
10705
10897
|
};
|
|
10706
10898
|
|
|
10707
10899
|
// src/components/adapters/smart-grid/useSavedViewsPanelOpen.ts
|
|
10708
|
-
import { useEffect as useEffect8, useState as
|
|
10900
|
+
import { useEffect as useEffect8, useState as useState7 } from "react";
|
|
10709
10901
|
var SAVED_VIEWS_PANEL_ID = "savedViews";
|
|
10710
10902
|
var useSavedViewsPanelOpen = (gridApi) => {
|
|
10711
10903
|
var _a;
|
|
10712
|
-
const [isOpen, setIsOpen] =
|
|
10904
|
+
const [isOpen, setIsOpen] = useState7(
|
|
10713
10905
|
((_a = gridApi.getOpenedToolPanel) == null ? void 0 : _a.call(gridApi)) === SAVED_VIEWS_PANEL_ID
|
|
10714
10906
|
);
|
|
10715
10907
|
useEffect8(() => {
|
|
@@ -10735,7 +10927,7 @@ var SmartGridSavedViews = (props) => {
|
|
|
10735
10927
|
const isPanelOpen = useSavedViewsPanelOpen(gridApi);
|
|
10736
10928
|
const presetViews = useNormalizedDefaultViews(props.defaultViews, gridApi);
|
|
10737
10929
|
const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
|
|
10738
|
-
const onSelect =
|
|
10930
|
+
const onSelect = useCallback6(
|
|
10739
10931
|
({ item }) => {
|
|
10740
10932
|
var _a;
|
|
10741
10933
|
if (!gridApi) return item;
|
|
@@ -10763,7 +10955,7 @@ var SmartGridSavedViews = (props) => {
|
|
|
10763
10955
|
},
|
|
10764
10956
|
[gridApi, tableConfig, setTableConfig]
|
|
10765
10957
|
);
|
|
10766
|
-
return /* @__PURE__ */
|
|
10958
|
+
return /* @__PURE__ */ React25.createElement(
|
|
10767
10959
|
SavedViews,
|
|
10768
10960
|
{
|
|
10769
10961
|
onSelect,
|
|
@@ -10782,15 +10974,15 @@ var SmartGridSavedViews = (props) => {
|
|
|
10782
10974
|
};
|
|
10783
10975
|
|
|
10784
10976
|
// src/components/adapters/data-table/DataTableSavedViews.tsx
|
|
10785
|
-
import
|
|
10977
|
+
import React26, {
|
|
10786
10978
|
forwardRef as forwardRef11,
|
|
10787
10979
|
useImperativeHandle,
|
|
10788
|
-
useState as
|
|
10789
|
-
useCallback as
|
|
10980
|
+
useState as useState8,
|
|
10981
|
+
useCallback as useCallback7
|
|
10790
10982
|
} from "react";
|
|
10791
10983
|
|
|
10792
10984
|
// src/components/adapters/data-table/DataTableDefaultSavedView.tsx
|
|
10793
|
-
import { useMemo as
|
|
10985
|
+
import { useMemo as useMemo5 } from "react";
|
|
10794
10986
|
var DEFAULT_COLUMN_STATE2 = {
|
|
10795
10987
|
hidden: false,
|
|
10796
10988
|
pinned: null,
|
|
@@ -10838,7 +11030,7 @@ var extractDefaultView2 = (columnDefinitions, receivedConfigFromTool) => {
|
|
|
10838
11030
|
return result;
|
|
10839
11031
|
};
|
|
10840
11032
|
var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
|
|
10841
|
-
return
|
|
11033
|
+
return useMemo5(
|
|
10842
11034
|
() => defaultViews.map((view) => ({
|
|
10843
11035
|
...view,
|
|
10844
11036
|
share_token: view.id,
|
|
@@ -10856,7 +11048,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
|
|
|
10856
11048
|
props.columnDefinitions
|
|
10857
11049
|
);
|
|
10858
11050
|
const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
|
|
10859
|
-
const [internalTableConfig, setInternalTableConfig] =
|
|
11051
|
+
const [internalTableConfig, setInternalTableConfig] = useState8(
|
|
10860
11052
|
ViewStorage.load(props.stickyViewsKey, defaultView).table_config
|
|
10861
11053
|
);
|
|
10862
11054
|
useImperativeHandle(ref, () => ({
|
|
@@ -10864,7 +11056,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
|
|
|
10864
11056
|
setInternalTableConfig(newConfig);
|
|
10865
11057
|
}
|
|
10866
11058
|
}));
|
|
10867
|
-
const onSelect =
|
|
11059
|
+
const onSelect = useCallback7(
|
|
10868
11060
|
({ item }) => {
|
|
10869
11061
|
var _a;
|
|
10870
11062
|
const isPresetView = item.view_level === "default";
|
|
@@ -10888,7 +11080,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
|
|
|
10888
11080
|
if (!internalTableConfig) {
|
|
10889
11081
|
return null;
|
|
10890
11082
|
}
|
|
10891
|
-
return /* @__PURE__ */
|
|
11083
|
+
return /* @__PURE__ */ React26.createElement(
|
|
10892
11084
|
SavedViews,
|
|
10893
11085
|
{
|
|
10894
11086
|
onSelect,
|
|
@@ -10913,9 +11105,11 @@ export {
|
|
|
10913
11105
|
SavedViewCollectionMenuItem,
|
|
10914
11106
|
SavedViews,
|
|
10915
11107
|
SavedViewsDeleteConfirmationModalShared,
|
|
11108
|
+
SavedViewsSelectionProvider,
|
|
10916
11109
|
SmartGridSavedViews,
|
|
10917
11110
|
getTranslations,
|
|
10918
|
-
useSavedViewsPanel_default as useSavedViewsPanel
|
|
11111
|
+
useSavedViewsPanel_default as useSavedViewsPanel,
|
|
11112
|
+
useSavedViewsSelection
|
|
10919
11113
|
};
|
|
10920
11114
|
/*! Bundled license information:
|
|
10921
11115
|
|