@procore/saved-views 6.0.2 → 6.2.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.
Files changed (34) hide show
  1. package/README.md +13 -2
  2. package/dist/legacy/adapters/hub-data-loader.d.mts +22 -0
  3. package/dist/legacy/adapters/hub-data-loader.d.ts +22 -0
  4. package/dist/legacy/adapters/hub-data-loader.js +273 -0
  5. package/dist/legacy/adapters/hub-data-loader.mjs +273 -0
  6. package/dist/legacy/chunk-6DZX6EAA.mjs +37 -0
  7. package/dist/legacy/chunk-QGM4M3NI.js +37 -0
  8. package/dist/legacy/index.d.mts +22 -3
  9. package/dist/legacy/index.d.ts +22 -3
  10. package/dist/legacy/index.js +755 -487
  11. package/dist/legacy/index.mjs +493 -268
  12. package/dist/legacy/transport/default.d.mts +15 -0
  13. package/dist/legacy/transport/default.d.ts +15 -0
  14. package/dist/legacy/transport/default.js +104 -0
  15. package/dist/legacy/transport/default.mjs +104 -0
  16. package/dist/legacy/types-BWhJ-on3.d.mts +109 -0
  17. package/dist/legacy/types-BWhJ-on3.d.ts +109 -0
  18. package/dist/modern/adapters/hub-data-loader.d.mts +22 -0
  19. package/dist/modern/adapters/hub-data-loader.d.ts +22 -0
  20. package/dist/modern/adapters/hub-data-loader.js +270 -0
  21. package/dist/modern/adapters/hub-data-loader.mjs +270 -0
  22. package/dist/modern/chunk-6DZX6EAA.mjs +37 -0
  23. package/dist/modern/chunk-QGM4M3NI.js +37 -0
  24. package/dist/modern/index.d.mts +22 -3
  25. package/dist/modern/index.d.ts +22 -3
  26. package/dist/modern/index.js +807 -540
  27. package/dist/modern/index.mjs +492 -268
  28. package/dist/modern/transport/default.d.mts +15 -0
  29. package/dist/modern/transport/default.d.ts +15 -0
  30. package/dist/modern/transport/default.js +104 -0
  31. package/dist/modern/transport/default.mjs +104 -0
  32. package/dist/modern/types-BWhJ-on3.d.mts +109 -0
  33. package/dist/modern/types-BWhJ-on3.d.ts +109 -0
  34. package/package.json +35 -2
@@ -1,34 +1,8 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
8
- get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2]
9
- }) : x2)(function(x2) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x2 + '" is not supported');
12
- });
13
- var __commonJS = (cb, mod) => function __require2() {
14
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
- };
16
- var __copyProps = (to, from2, except, desc) => {
17
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
18
- for (let key of __getOwnPropNames(from2))
19
- if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
- mod
31
- ));
1
+ import {
2
+ __commonJS,
3
+ __require,
4
+ __toESM
5
+ } from "./chunk-6DZX6EAA.mjs";
32
6
 
33
7
  // node_modules/lodash/lodash.js
34
8
  var require_lodash = __commonJS({
@@ -738,7 +712,7 @@ var require_lodash = __commonJS({
738
712
  var reIsNative = RegExp2(
739
713
  "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
740
714
  );
741
- var Buffer2 = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2;
715
+ var Buffer = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2;
742
716
  var defineProperty = (function() {
743
717
  try {
744
718
  var func = getNative(Object2, "defineProperty");
@@ -748,7 +722,7 @@ var require_lodash = __commonJS({
748
722
  }
749
723
  })();
750
724
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
751
- var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
725
+ var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
752
726
  var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
753
727
  var metaMap = WeakMap2 && new WeakMap2();
754
728
  var realNames = {};
@@ -2060,7 +2034,7 @@ var require_lodash = __commonJS({
2060
2034
  }
2061
2035
  function cloneArrayBuffer(arrayBuffer) {
2062
2036
  var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
2063
- new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
2037
+ new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
2064
2038
  return result2;
2065
2039
  }
2066
2040
  function cloneDataView(dataView, isDeep) {
@@ -2664,7 +2638,7 @@ var require_lodash = __commonJS({
2664
2638
  object3 = object3.buffer;
2665
2639
  other = other.buffer;
2666
2640
  case arrayBufferTag:
2667
- if (object3.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object3), new Uint8Array2(other))) {
2641
+ if (object3.byteLength != other.byteLength || !equalFunc(new Uint8Array(object3), new Uint8Array(other))) {
2668
2642
  return false;
2669
2643
  }
2670
2644
  return true;
@@ -5543,7 +5517,15 @@ var de_DE_default = {
5543
5517
  title: "Gespeicherte Ansichten",
5544
5518
  tooltip: "Erstellen und speichern Sie ein benutzerdefiniertes Tabellenlayout, um schnell zu Ihrer bevorzugten Ansicht zur\xFCckzukehren.",
5545
5519
  button: {
5546
- title: "Ansichten"
5520
+ title: "Ansichten",
5521
+ titleWithView: "Ansicht: {{name}} ({{type}})",
5522
+ viewLevel: {
5523
+ company: "Unternehmen",
5524
+ project: "Projekt",
5525
+ personal: "Pers\xF6nlich",
5526
+ default: "Standard",
5527
+ temporary: "Vor\xFCbergehend"
5528
+ }
5547
5529
  },
5548
5530
  actions: {
5549
5531
  update: "Aktualisieren",
@@ -5638,7 +5620,15 @@ var en_AU_default = {
5638
5620
  title: "Saved views",
5639
5621
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5640
5622
  button: {
5641
- title: "Views"
5623
+ title: "Views",
5624
+ titleWithView: "View: {{name}} ({{type}})",
5625
+ viewLevel: {
5626
+ company: "Company",
5627
+ project: "Project",
5628
+ personal: "Personal",
5629
+ default: "Default",
5630
+ temporary: "Temporary"
5631
+ }
5642
5632
  },
5643
5633
  actions: {
5644
5634
  update: "Update",
@@ -5733,7 +5723,15 @@ var en_CA_default = {
5733
5723
  title: "Saved views",
5734
5724
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5735
5725
  button: {
5736
- title: "Views"
5726
+ title: "Views",
5727
+ titleWithView: "View: {{name}} ({{type}})",
5728
+ viewLevel: {
5729
+ company: "Company",
5730
+ project: "Project",
5731
+ personal: "Personal",
5732
+ default: "Default",
5733
+ temporary: "Temporary"
5734
+ }
5737
5735
  },
5738
5736
  actions: {
5739
5737
  update: "Update",
@@ -5828,7 +5826,15 @@ var en_GB_default = {
5828
5826
  title: "Saved views",
5829
5827
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5830
5828
  button: {
5831
- title: "Views"
5829
+ title: "Views",
5830
+ titleWithView: "View: {{name}} ({{type}})",
5831
+ viewLevel: {
5832
+ company: "Company",
5833
+ project: "Project",
5834
+ personal: "Personal",
5835
+ default: "Default",
5836
+ temporary: "Temporary"
5837
+ }
5832
5838
  },
5833
5839
  actions: {
5834
5840
  update: "Update",
@@ -5923,7 +5929,15 @@ var en_default = {
5923
5929
  title: "Saved Views",
5924
5930
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5925
5931
  button: {
5926
- title: "Views"
5932
+ title: "Views",
5933
+ titleWithView: "View: {{name}} ({{type}})",
5934
+ viewLevel: {
5935
+ company: "Company",
5936
+ project: "Project",
5937
+ personal: "Personal",
5938
+ default: "Default",
5939
+ temporary: "Temporary"
5940
+ }
5927
5941
  },
5928
5942
  actions: {
5929
5943
  update: "Update",
@@ -6018,7 +6032,15 @@ var es_ES_default = {
6018
6032
  title: "Vistas guardadas",
6019
6033
  tooltip: "Cree y guarde un dise\xF1o de tabla personalizado para volver r\xE1pidamente a su vista preferida.",
6020
6034
  button: {
6021
- title: "Vistas"
6035
+ title: "Vistas",
6036
+ titleWithView: "Ver: {{name}} ({{type}})",
6037
+ viewLevel: {
6038
+ company: "Empresa",
6039
+ project: "Proyecto",
6040
+ personal: "Personal",
6041
+ default: "Predeterminado",
6042
+ temporary: "Temporal"
6043
+ }
6022
6044
  },
6023
6045
  actions: {
6024
6046
  update: "Actualizar",
@@ -6050,7 +6072,7 @@ var es_ES_default = {
6050
6072
  fields: {
6051
6073
  name: "Nombre",
6052
6074
  description: "Descripci\xF3n",
6053
- viewLevel: "Ver nivel",
6075
+ viewLevel: "Nivel de vista",
6054
6076
  viewLevels: {
6055
6077
  company: "Vista de la empresa",
6056
6078
  project: "Vista del proyecto",
@@ -6100,7 +6122,7 @@ var es_ES_default = {
6100
6122
  temporaryViewName: "Vista temporal",
6101
6123
  viewLevel: {
6102
6124
  company: "Vistas de la empresa",
6103
- project: "Vistas de proyectos",
6125
+ project: "Vistas del proyecto",
6104
6126
  personal: "Vistas personales"
6105
6127
  }
6106
6128
  }
@@ -6113,7 +6135,15 @@ var es_default = {
6113
6135
  title: "Vistas guardadas",
6114
6136
  tooltip: "Cree y guarde cualquier dise\xF1o de tabla personalizado para volver r\xE1pidamente a su vista preferida.",
6115
6137
  button: {
6116
- title: "Vistas"
6138
+ title: "Vistas",
6139
+ titleWithView: "Vista: {{name}} ({{type}})",
6140
+ viewLevel: {
6141
+ company: "Compa\xF1\xEDa",
6142
+ project: "Proyecto",
6143
+ personal: "Personal",
6144
+ default: "Predeterminado",
6145
+ temporary: "Temporal"
6146
+ }
6117
6147
  },
6118
6148
  actions: {
6119
6149
  update: "Actualizar",
@@ -6208,7 +6238,15 @@ var fr_CA_default = {
6208
6238
  title: "Affichages sauvegard\xE9s",
6209
6239
  tooltip: "Cr\xE9ez et sauvegardez n'importe quelle disposition de tableau personnalis\xE9e pour revenir rapidement \xE0 votre affichage pr\xE9f\xE9r\xE9.",
6210
6240
  button: {
6211
- title: "Affichages"
6241
+ title: "Affichages",
6242
+ titleWithView: "Affichage\xA0: {{name}} ({{type}})",
6243
+ viewLevel: {
6244
+ company: "Entreprise",
6245
+ project: "Projet",
6246
+ personal: "Personnel",
6247
+ default: "Par d\xE9faut",
6248
+ temporary: "Temporaire"
6249
+ }
6212
6250
  },
6213
6251
  actions: {
6214
6252
  update: "Mettre \xE0 jour",
@@ -6235,7 +6273,7 @@ var fr_CA_default = {
6235
6273
  description: "Cet affichage ne peut pas \xEAtre restaur\xE9 une fois qu'il a \xE9t\xE9 supprim\xE9."
6236
6274
  },
6237
6275
  copyConfirmation: {
6238
- description: "Vous avez coll\xE9 un lien vers une vue enregistr\xE9e qui n'existe pas encore pour vous.\nVous pouvez la cr\xE9er comme affichage personnel enregistr\xE9 ou simplement la consulter\ntemporairement."
6276
+ 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
6277
  },
6240
6278
  fields: {
6241
6279
  name: "Nom",
@@ -6250,9 +6288,9 @@ var fr_CA_default = {
6250
6288
  errors: {
6251
6289
  maxLengthName: "Ne peut pas contenir plus de {{maxLength}}\xA0caract\xE8res.",
6252
6290
  required: "Ne peut pas \xEAtre vide.",
6253
- duplicateName: "Un affichage enregistr\xE9 portant ce nom existe d\xE9j\xE0. Veuillez renommer et r\xE9essayer.",
6291
+ duplicateName: "Un affichage sauvegard\xE9 portant ce nom existe d\xE9j\xE0. Veuillez renommer et r\xE9essayer.",
6254
6292
  unknown: "Une erreur s'est produite. Veuillez r\xE9essayer.",
6255
- title: "D\xE9sol\xE9, nous n'avons pas pu {{mode}} cet affichage enregistr\xE9",
6293
+ title: "D\xE9sol\xE9, nous n'avons pas pu {{mode}} cet affichage sauvegard\xE9",
6256
6294
  description: {
6257
6295
  create: "Veuillez corriger les erreurs ci-dessous et r\xE9essayer de le cr\xE9er",
6258
6296
  update: "Veuillez corriger les erreurs ci-dessous et r\xE9essayer de le mettre \xE0 jour"
@@ -6263,8 +6301,8 @@ var fr_CA_default = {
6263
6301
  }
6264
6302
  },
6265
6303
  ariaLabels: {
6266
- menuItem: "\xC9l\xE9ment de menu Affichages enregistr\xE9s {{name}}",
6267
- modal: "Modal pour cr\xE9er/mettre \xE0 jour les affichages enregistr\xE9s"
6304
+ menuItem: "Item du menu Affichages sauvegard\xE9s {{name}}",
6305
+ modal: "Modal pour cr\xE9er/mettre \xE0 jour les affichages sauvegard\xE9s"
6268
6306
  },
6269
6307
  update: {
6270
6308
  success: "L'affichage sauvegard\xE9 a bien \xE9t\xE9 mis \xE0 jour."
@@ -6276,12 +6314,12 @@ var fr_CA_default = {
6276
6314
  success: "Le lien a \xE9t\xE9 cr\xE9\xE9 et copi\xE9 dans le presse-papiers."
6277
6315
  },
6278
6316
  errors: {
6279
- fetch: "D\xE9sol\xE9, les affichages enregistr\xE9s n'ont pas pu \xEAtre r\xE9cup\xE9r\xE9s. Veuillez r\xE9essayer.",
6280
- create: "D\xE9sol\xE9, l'affichage enregistr\xE9 n'a pas pu \xEAtre cr\xE9\xE9. Veuillez r\xE9essayer.",
6281
- update: "D\xE9sol\xE9, l'affichage enregistr\xE9 n'a pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
6282
- delete: "D\xE9sol\xE9, l'affichage enregistr\xE9 n'a pas pu \xEAtre supprim\xE9. Veuillez r\xE9essayer.",
6317
+ fetch: "D\xE9sol\xE9, les affichages sauvegard\xE9s n'ont pas pu \xEAtre r\xE9cup\xE9r\xE9s. Veuillez r\xE9essayer.",
6318
+ create: "D\xE9sol\xE9, l'affichage sauvegard\xE9 n'a pas pu \xEAtre cr\xE9\xE9. Veuillez r\xE9essayer.",
6319
+ update: "D\xE9sol\xE9, l'affichage sauvegard\xE9 n'a pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
6320
+ delete: "D\xE9sol\xE9, l'affichage sauvegard\xE9 n'a pas pu \xEAtre supprim\xE9. Veuillez r\xE9essayer.",
6283
6321
  copyFailed: "Impossible de copier le lien de partage dans le presse-papiers.",
6284
- notFound: "D\xE9sol\xE9, l'affichage enregistr\xE9 est introuvable. Veuillez r\xE9essayer."
6322
+ notFound: "D\xE9sol\xE9, l'affichage sauvegard\xE9 est introuvable. Veuillez r\xE9essayer."
6285
6323
  },
6286
6324
  defaultViewTitle: {
6287
6325
  rfi: "Toutes les QRT",
@@ -6303,7 +6341,15 @@ var fr_FR_default = {
6303
6341
  title: "Vues enregistr\xE9es",
6304
6342
  tooltip: "Cr\xE9ez et enregistrez n'importe quelle disposition de tableau personnalis\xE9e pour revenir rapidement \xE0 votre vue pr\xE9f\xE9r\xE9e.",
6305
6343
  button: {
6306
- title: "Vues"
6344
+ title: "Vues",
6345
+ titleWithView: "Affichage\xA0: {{name}} ({{type}})",
6346
+ viewLevel: {
6347
+ company: "Entreprise",
6348
+ project: "Projet",
6349
+ personal: "Personnelle",
6350
+ default: "Par d\xE9faut",
6351
+ temporary: "Temporaire"
6352
+ }
6307
6353
  },
6308
6354
  actions: {
6309
6355
  update: "Mettre \xE0 jour",
@@ -6398,7 +6444,15 @@ var is_IS_default = {
6398
6444
  title: "Vista\xF0ar sko\xF0anir",
6399
6445
  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
6446
  button: {
6401
- title: "\xDAts\xFDni"
6447
+ title: "\xDAts\xFDni",
6448
+ titleWithView: "Sko\xF0a: {{name}} ({{type}})",
6449
+ viewLevel: {
6450
+ company: "Fyrirt\xE6ki",
6451
+ project: "Verkefni",
6452
+ personal: "Pers\xF3nulegt",
6453
+ default: "Sj\xE1lfgefi\xF0",
6454
+ temporary: "T\xEDmabundi\xF0"
6455
+ }
6402
6456
  },
6403
6457
  actions: {
6404
6458
  update: "Uppf\xE6rsla",
@@ -6493,7 +6547,15 @@ var it_IT_default = {
6493
6547
  title: "Viste salvate",
6494
6548
  tooltip: "Creare e salvare qualsiasi layout di tabella personalizzato per tornare rapidamente alla vista preferita.",
6495
6549
  button: {
6496
- title: "Viste"
6550
+ title: "Viste",
6551
+ titleWithView: "Visualizza: {{name}} ({{type}})",
6552
+ viewLevel: {
6553
+ company: "Azienda",
6554
+ project: "Progetto",
6555
+ personal: "Personale",
6556
+ default: "Predefinita",
6557
+ temporary: "Temporaneo"
6558
+ }
6497
6559
  },
6498
6560
  actions: {
6499
6561
  update: "Aggiorna",
@@ -6588,7 +6650,15 @@ var ja_JP_default = {
6588
6650
  title: "\u4FDD\u5B58\u6E08\u307F\u30D3\u30E5\u30FC",
6589
6651
  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
6652
  button: {
6591
- title: "\u30D3\u30E5\u30FC"
6653
+ title: "\u30D3\u30E5\u30FC",
6654
+ titleWithView: "\u30D3\u30E5\u30FC: {{name}} ({{type}})",
6655
+ viewLevel: {
6656
+ company: "\u4F1A\u793E",
6657
+ project: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8",
6658
+ personal: "\u500B\u4EBA\u7528",
6659
+ default: "\u65E2\u5B9A\u306E",
6660
+ temporary: "\u4E00\u6642\u7684"
6661
+ }
6592
6662
  },
6593
6663
  actions: {
6594
6664
  update: "\u66F4\u65B0",
@@ -6683,7 +6753,15 @@ var pl_PL_default = {
6683
6753
  title: "Zapisane widoki",
6684
6754
  tooltip: "Utw\xF3rz i zapisz dowolny uk\u0142ad niestandardowej tabeli, aby szybko wr\xF3ci\u0107 do preferowanego widoku.",
6685
6755
  button: {
6686
- title: "Widoki"
6756
+ title: "Widoki",
6757
+ titleWithView: "Widok: {{name}} ({{type}})",
6758
+ viewLevel: {
6759
+ company: "Firma",
6760
+ project: "Projekt",
6761
+ personal: "Osobiste",
6762
+ default: "Domy\u015Blne",
6763
+ temporary: "Tymczasowe"
6764
+ }
6687
6765
  },
6688
6766
  actions: {
6689
6767
  update: "Zaktualizuj",
@@ -6778,7 +6856,15 @@ var pt_BR_default = {
6778
6856
  title: "Visualiza\xE7\xF5es Salvas",
6779
6857
  tooltip: "Crie e salve qualquer layout personalizado de tabela para retornar rapidamente \xE0 sua visualiza\xE7\xE3o preferida.",
6780
6858
  button: {
6781
- title: "Visualiza\xE7\xF5es"
6859
+ title: "Visualiza\xE7\xF5es",
6860
+ titleWithView: "Visualiza\xE7\xE3o: {{name}} ({{type}})",
6861
+ viewLevel: {
6862
+ company: "Empresa",
6863
+ project: "Projeto",
6864
+ personal: "Pessoal",
6865
+ default: "Padr\xE3o",
6866
+ temporary: "Tempor\xE1rio"
6867
+ }
6782
6868
  },
6783
6869
  actions: {
6784
6870
  update: "Atualizar",
@@ -6873,7 +6959,15 @@ var th_TH_default = {
6873
6959
  title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E27\u0E49",
6874
6960
  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
6961
  button: {
6876
- title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07"
6962
+ title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07",
6963
+ titleWithView: "\u0E08\u0E33\u0E19\u0E27\u0E19\u0E01\u0E32\u0E23\u0E14\u0E39: {{name}} ({{type}})",
6964
+ viewLevel: {
6965
+ company: "\u0E1A\u0E23\u0E34\u0E29\u0E31\u0E17",
6966
+ project: "\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
6967
+ personal: "\u0E2A\u0E48\u0E27\u0E19\u0E1A\u0E38\u0E04\u0E04\u0E25",
6968
+ default: "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
6969
+ temporary: "\u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27"
6970
+ }
6877
6971
  },
6878
6972
  actions: {
6879
6973
  update: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15",
@@ -6968,7 +7062,15 @@ var zh_SG_default = {
6968
7062
  title: "\u5DF2\u4FDD\u5B58\u89C6\u56FE",
6969
7063
  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
7064
  button: {
6971
- title: "\u89C6\u56FE"
7065
+ title: "\u89C6\u56FE",
7066
+ titleWithView: "\u67E5\u770B\uFF1A{{name}}\uFF08{{type}}\uFF09",
7067
+ viewLevel: {
7068
+ company: "\u516C\u53F8",
7069
+ project: "\u9879\u76EE",
7070
+ personal: "\u4E2A\u4EBA",
7071
+ default: "\u9ED8\u8BA4",
7072
+ temporary: "\u4E34\u65F6"
7073
+ }
6972
7074
  },
6973
7075
  actions: {
6974
7076
  update: "\u66F4\u65B0",
@@ -7091,7 +7193,7 @@ function getTranslations(envLocale) {
7091
7193
  }
7092
7194
 
7093
7195
  // src/components/buttons/useSavedViewsPanel.tsx
7094
- import { useState } from "react";
7196
+ import { useState as useState2 } from "react";
7095
7197
 
7096
7198
  // ../../node_modules/tslib/tslib.es6.mjs
7097
7199
  var __assign = function() {
@@ -7309,8 +7411,8 @@ Plus.displayName = "Plus";
7309
7411
  var Plus_default = Plus;
7310
7412
 
7311
7413
  // src/components/buttons/SavedViewsButton.tsx
7312
- import { ToggleButton } from "@procore/core-react";
7313
- import React13 from "react";
7414
+ import { ToggleButton, Tooltip } from "@procore/core-react";
7415
+ import React14 from "react";
7314
7416
 
7315
7417
  // ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
7316
7418
  function memoize(fn) {
@@ -8823,6 +8925,31 @@ var EnvironmentI18nProvider = ({ children }) => {
8823
8925
  return /* @__PURE__ */ React12.createElement(I18nContext.Provider, { value: i18n }, children);
8824
8926
  };
8825
8927
 
8928
+ // src/components/buttons/SavedViewsSelectionContext.tsx
8929
+ import React13, {
8930
+ createContext,
8931
+ useCallback,
8932
+ useContext,
8933
+ useMemo as useMemo2,
8934
+ useState
8935
+ } from "react";
8936
+ var SavedViewsSelectionContext = createContext(null);
8937
+ var SavedViewsSelectionProvider = ({
8938
+ children
8939
+ }) => {
8940
+ const [selectedView, setSelectedView] = useState(null);
8941
+ const updateSelectedView = useCallback(
8942
+ (view) => setSelectedView(view),
8943
+ []
8944
+ );
8945
+ const value = useMemo2(
8946
+ () => ({ selectedView, setSelectedView: updateSelectedView }),
8947
+ [selectedView, updateSelectedView]
8948
+ );
8949
+ return /* @__PURE__ */ React13.createElement(SavedViewsSelectionContext.Provider, { value }, children);
8950
+ };
8951
+ var useSavedViewsSelection = () => useContext(SavedViewsSelectionContext);
8952
+
8826
8953
  // src/components/buttons/SavedViewsButton.tsx
8827
8954
  var StyledIcon = pt(ExpandSidebar_default)`
8828
8955
  transform: ${(props) => props.left ? "rotate(180deg)" : ""};
@@ -8832,37 +8959,66 @@ var Container = pt.div`
8832
8959
  border-right: 2px solid #d6dadc;
8833
8960
  padding-right: 8px;
8834
8961
  `;
8962
+ var Label = pt.span`
8963
+ display: inline-block;
8964
+ max-width: 218px;
8965
+ overflow: hidden;
8966
+ text-overflow: ellipsis;
8967
+ white-space: nowrap;
8968
+ vertical-align: middle;
8969
+ `;
8835
8970
  var SavedViewsButton = ({
8836
8971
  handleClick,
8837
8972
  isOpen
8838
8973
  }) => {
8839
8974
  const I18n = useCDNTranslations();
8840
- return /* @__PURE__ */ React13.createElement(Container, null, /* @__PURE__ */ React13.createElement(
8975
+ const selection = useSavedViewsSelection();
8976
+ const activeView = selection?.selectedView;
8977
+ const activeName = activeView?.name;
8978
+ const activeType = activeView?.view_level ? I18n.t(`savedViews.button.viewLevel.${activeView.view_level}`) : "";
8979
+ const label = activeName ? I18n.t("savedViews.button.titleWithView", {
8980
+ name: activeName,
8981
+ type: activeType
8982
+ }) : I18n.t("savedViews.button.title");
8983
+ const button = /* @__PURE__ */ React14.createElement(
8841
8984
  ToggleButton,
8842
8985
  {
8843
8986
  selected: isOpen,
8844
8987
  onClick: handleClick,
8845
- icon: /* @__PURE__ */ React13.createElement(StyledIcon, { left: isOpen }),
8988
+ icon: /* @__PURE__ */ React14.createElement(StyledIcon, { left: isOpen }),
8846
8989
  "data-testid": "saved-views-button",
8847
- "aria-controls": "saved-views-panel"
8990
+ "aria-controls": "saved-views-panel",
8991
+ "aria-label": label
8848
8992
  },
8849
- I18n.t("savedViews.button.title")
8850
- ));
8993
+ /* @__PURE__ */ React14.createElement(Label, null, label)
8994
+ );
8995
+ return /* @__PURE__ */ React14.createElement(Container, null, activeName ? /* @__PURE__ */ React14.createElement(
8996
+ Tooltip,
8997
+ {
8998
+ showDelay: 500,
8999
+ overlay: /* @__PURE__ */ React14.createElement(Tooltip.Content, null, label)
9000
+ },
9001
+ button
9002
+ ) : button);
8851
9003
  };
8852
9004
 
8853
9005
  // src/components/buttons/useSavedViewsPanel.tsx
8854
- import React14 from "react";
9006
+ import React15 from "react";
8855
9007
  var useSavedViewsPanel = (domain, tableName) => {
8856
9008
  const key = (domain2, tableName2) => `savedViewsPanel-${domain2}-${tableName2}`;
8857
- const [isOpen, setIsOpen] = useState(
9009
+ const [isOpen, setIsOpen] = useState2(
8858
9010
  localStorage.getItem(key(domain, tableName)) === null || localStorage.getItem(key(domain, tableName)) === "true"
8859
9011
  );
8860
9012
  const handleClick = () => {
8861
9013
  setIsOpen(!isOpen);
8862
9014
  localStorage.setItem(key(domain, tableName), JSON.stringify(!isOpen));
8863
9015
  };
8864
- const Button7 = () => /* @__PURE__ */ React14.createElement(SavedViewsButton, { handleClick, isOpen });
8865
- return { isOpen, SavedViewsButton: Button7 };
9016
+ const Button7 = () => /* @__PURE__ */ React15.createElement(SavedViewsButton, { handleClick, isOpen });
9017
+ return {
9018
+ isOpen,
9019
+ SavedViewsButton: Button7,
9020
+ SavedViewsProvider: SavedViewsSelectionProvider
9021
+ };
8866
9022
  };
8867
9023
  var useSavedViewsPanel_default = useSavedViewsPanel;
8868
9024
 
@@ -8874,8 +9030,28 @@ import {
8874
9030
  Flex,
8875
9031
  useI18nContext as useI18nContext2
8876
9032
  } from "@procore/core-react";
8877
- import * as React15 from "react";
9033
+ import * as React17 from "react";
8878
9034
  import { useToastAlertContext } from "@procore/toast-alert";
9035
+
9036
+ // src/transport/context.tsx
9037
+ import React16, { createContext as createContext2, useContext as useContext2 } from "react";
9038
+ var SavedViewsTransportContext = createContext2(void 0);
9039
+ var SavedViewsTransportProvider = ({
9040
+ transport,
9041
+ children
9042
+ }) => /* @__PURE__ */ React16.createElement(SavedViewsTransportContext.Provider, { value: transport }, children);
9043
+ var useSavedViewsTransport = () => {
9044
+ const transport = useContext2(SavedViewsTransportContext);
9045
+ if (!transport) {
9046
+ throw new Error(
9047
+ "useSavedViewsTransport must be used inside <SavedViews> (or a SavedViewsTransportProvider). This usually means a hook is being called outside the saved-views component tree."
9048
+ );
9049
+ }
9050
+ return transport;
9051
+ };
9052
+ var useOptionalSavedViewsTransport = () => useContext2(SavedViewsTransportContext);
9053
+
9054
+ // src/components/menu-items/SavedViewsCollectionsMenuItem.tsx
8879
9055
  var RowActionsBox = pt(Flex)`
8880
9056
  justify-content: center;
8881
9057
  align-items: center;
@@ -8896,7 +9072,7 @@ var IconWrapper = pt.span`
8896
9072
  justify-content: center;
8897
9073
  `;
8898
9074
  var SavedViewCollectionMenuItem = (props) => {
8899
- const onClick = React15.useCallback(
9075
+ const onClick = React17.useCallback(
8900
9076
  (a2) => {
8901
9077
  if (!props.item) {
8902
9078
  return;
@@ -8920,6 +9096,8 @@ var SavedViewCollectionMenuItem = (props) => {
8920
9096
  };
8921
9097
  const { showToast } = useToastAlertContext();
8922
9098
  const i18n = useI18nContext2();
9099
+ const transport = useOptionalSavedViewsTransport();
9100
+ const canShareViaUrl = transport?.supportsUrlSharing !== false;
8923
9101
  const copyShareLink = async (event) => {
8924
9102
  event.stopPropagation();
8925
9103
  try {
@@ -8942,18 +9120,18 @@ var SavedViewCollectionMenuItem = (props) => {
8942
9120
  label: i18n.t("savedViews.actions.delete")
8943
9121
  }
8944
9122
  ];
8945
- const preventEventBubbleToNotTriggerViewSelectEvent = React15.useCallback(
9123
+ const preventEventBubbleToNotTriggerViewSelectEvent = React17.useCallback(
8946
9124
  (e) => {
8947
9125
  e.stopPropagation();
8948
9126
  },
8949
9127
  []
8950
9128
  );
8951
9129
  const hasUpdateButton = props.item.view_level !== "default" && props.canUpdate;
8952
- const hasCopyShareLinkButton = props.item.view_level !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary";
9130
+ const hasCopyShareLinkButton = canShareViaUrl && props.item.view_level !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary";
8953
9131
  const hasClearTemporaryButton = props.item.id === "temporary";
8954
9132
  const hasOverflowMenu = props.item.view_level !== "default" && props.canEditOrDelete;
8955
9133
  const hasActions = hasUpdateButton || hasCopyShareLinkButton || hasClearTemporaryButton || hasOverflowMenu;
8956
- return /* @__PURE__ */ React15.createElement(
9134
+ return /* @__PURE__ */ React17.createElement(
8957
9135
  Container2,
8958
9136
  {
8959
9137
  "aria-selected": Boolean(props.selected),
@@ -8965,7 +9143,7 @@ var SavedViewCollectionMenuItem = (props) => {
8965
9143
  "data-testid": "saved-view-collection-menu-item",
8966
9144
  onKeyDown: preventEventBubbleToNotTriggerViewSelectEvent
8967
9145
  },
8968
- /* @__PURE__ */ React15.createElement(
9146
+ /* @__PURE__ */ React17.createElement(
8969
9147
  "span",
8970
9148
  {
8971
9149
  "data-testid": "saved-view-display-name",
@@ -8973,7 +9151,7 @@ var SavedViewCollectionMenuItem = (props) => {
8973
9151
  },
8974
9152
  props.item.name
8975
9153
  ),
8976
- hasActions && /* @__PURE__ */ React15.createElement(RowActionsBox, null, /* @__PURE__ */ React15.createElement(Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React15.createElement(
9154
+ hasActions && /* @__PURE__ */ React17.createElement(RowActionsBox, null, /* @__PURE__ */ React17.createElement(Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React17.createElement(
8977
9155
  Button,
8978
9156
  {
8979
9157
  onClick: updateItem,
@@ -8984,7 +9162,7 @@ var SavedViewCollectionMenuItem = (props) => {
8984
9162
  loading: props.isUpdateProcessing
8985
9163
  },
8986
9164
  i18n.t("savedViews.actions.update")
8987
- ), hasCopyShareLinkButton && /* @__PURE__ */ React15.createElement(
9165
+ ), hasCopyShareLinkButton && /* @__PURE__ */ React17.createElement(
8988
9166
  Button,
8989
9167
  {
8990
9168
  onClick: copyShareLink,
@@ -8993,8 +9171,8 @@ var SavedViewCollectionMenuItem = (props) => {
8993
9171
  "aria-label": i18n.t("savedViews.actions.copyShareLink"),
8994
9172
  "data-testid": "copy-share-link-button"
8995
9173
  },
8996
- /* @__PURE__ */ React15.createElement(IconWrapper, null, /* @__PURE__ */ React15.createElement(Link_default, { size: "sm" }))
8997
- ), hasClearTemporaryButton && /* @__PURE__ */ React15.createElement(
9174
+ /* @__PURE__ */ React17.createElement(IconWrapper, null, /* @__PURE__ */ React17.createElement(Link_default, { size: "sm" }))
9175
+ ), hasClearTemporaryButton && /* @__PURE__ */ React17.createElement(
8998
9176
  Button,
8999
9177
  {
9000
9178
  onClick: (e) => {
@@ -9007,8 +9185,8 @@ var SavedViewCollectionMenuItem = (props) => {
9007
9185
  title: i18n.t("savedViews.actions.clearTemporary"),
9008
9186
  "data-testid": "clear-temporary-view-button"
9009
9187
  },
9010
- /* @__PURE__ */ React15.createElement(IconWrapper, null, /* @__PURE__ */ React15.createElement(Clear_default, { size: "sm" }))
9011
- )), /* @__PURE__ */ React15.createElement(Box, null, hasOverflowMenu && /* @__PURE__ */ React15.createElement(
9188
+ /* @__PURE__ */ React17.createElement(IconWrapper, null, /* @__PURE__ */ React17.createElement(Clear_default, { size: "sm" }))
9189
+ )), /* @__PURE__ */ React17.createElement(Box, null, hasOverflowMenu && /* @__PURE__ */ React17.createElement(
9012
9190
  DropdownFlyout,
9013
9191
  {
9014
9192
  "data-testid": "saved-view-overflow-button",
@@ -9034,15 +9212,9 @@ var ExpandedPanel = pt(Panel)`
9034
9212
  // src/components/panels/PanelContent.tsx
9035
9213
  import { Flex as Flex2, MenuImperative as MenuImperative2, useI18nContext as useI18nContext5 } from "@procore/core-react";
9036
9214
  import { useToastAlertContext as useToastAlertContext2 } from "@procore/toast-alert";
9037
- import React17 from "react";
9038
-
9039
- // src/utils/api/queries.ts
9040
- import { requestJSON as requestJSON2 } from "@procore/core-http";
9041
- import { useQuery } from "@tanstack/react-query";
9215
+ import React19 from "react";
9042
9216
 
9043
9217
  // src/utils/api/queriesHandler.ts
9044
- import { requestJSON } from "@procore/core-http";
9045
- import { useMutation, useQueryClient } from "@tanstack/react-query";
9046
9218
  import { useI18nContext as useI18nContext3 } from "@procore/core-react";
9047
9219
  var getBasePath = (companyId, projectId) => {
9048
9220
  if (projectId) {
@@ -9052,22 +9224,39 @@ var getBasePath = (companyId, projectId) => {
9052
9224
  };
9053
9225
  var useApiRequest = (props, method, mutationKey) => {
9054
9226
  const { projectId, companyId, domain, tableName } = props;
9055
- const queryClient2 = useQueryClient();
9227
+ const transport = useSavedViewsTransport();
9228
+ const http = transport.useHttp();
9229
+ const cacheControl = transport.useCacheControl();
9056
9230
  const { locale } = useI18nContext3();
9057
9231
  const basePath = getBasePath(companyId, projectId);
9058
- const queryKey = ["savedViews", domain, tableName, companyId, projectId];
9059
- return useMutation({
9232
+ const queryKey = [
9233
+ "savedViews",
9234
+ domain,
9235
+ tableName,
9236
+ companyId,
9237
+ projectId
9238
+ ];
9239
+ return transport.useMutationAdapter({
9060
9240
  mutationKey,
9061
9241
  mutationFn: async (savedView) => {
9062
- let url = "";
9063
- if (method === "DELETE" || method === "PUT") {
9242
+ let url = basePath;
9243
+ let body = { ...savedView };
9244
+ if (method === "DELETE") {
9064
9245
  url = `${basePath}/${savedView.share_token}?permissions_domain=${domain}`;
9246
+ } else if (method === "PUT") {
9247
+ url = `${basePath}/${savedView.share_token}`;
9248
+ body = { ...savedView, permissions_domain: domain };
9065
9249
  } else {
9066
- url = `${basePath}?table_name=${tableName}&permissions_domain=${domain}`;
9250
+ body = {
9251
+ ...savedView,
9252
+ table_name: tableName,
9253
+ permissions_domain: domain
9254
+ };
9067
9255
  }
9068
- const response = await requestJSON(url, {
9256
+ const response = await http({
9069
9257
  method,
9070
- body: JSON.stringify(savedView),
9258
+ url,
9259
+ body: JSON.stringify(body),
9071
9260
  headers: {
9072
9261
  "Content-Type": "application/json",
9073
9262
  "Accept-Language": locale
@@ -9080,23 +9269,19 @@ var useApiRequest = (props, method, mutationKey) => {
9080
9269
  },
9081
9270
  onSuccess: (savedView) => {
9082
9271
  if (method === "DELETE" || method === "POST") {
9083
- queryClient2.invalidateQueries({
9084
- queryKey
9085
- });
9272
+ cacheControl.invalidate(queryKey);
9086
9273
  return;
9087
9274
  } else {
9088
- const oldData = queryClient2.getQueryData(queryKey);
9275
+ const oldData = cacheControl.getData(queryKey);
9089
9276
  const oldView = oldData?.find(
9090
9277
  (item) => item.share_token === savedView.share_token
9091
9278
  );
9092
9279
  if (oldView?.name !== savedView.name) {
9093
- queryClient2.invalidateQueries({
9094
- queryKey
9095
- });
9280
+ cacheControl.invalidate(queryKey);
9096
9281
  return;
9097
9282
  }
9098
9283
  }
9099
- queryClient2.setQueryData(queryKey, (oldData) => {
9284
+ cacheControl.setData(queryKey, (oldData) => {
9100
9285
  if (!oldData) return [savedView];
9101
9286
  return oldData.map(
9102
9287
  (item) => item.share_token === savedView.share_token ? savedView : item
@@ -9125,13 +9310,17 @@ var getBasePath2 = (companyId, projectId) => {
9125
9310
  };
9126
9311
  var useSavedViewsQuery = (props) => {
9127
9312
  const { projectId, companyId, domain, tableName } = props;
9313
+ const transport = useSavedViewsTransport();
9314
+ const http = transport.useHttp();
9128
9315
  const basePath = getBasePath2(companyId, projectId);
9129
9316
  const url = `${basePath}?table_name=${tableName}&permissions_domain=${domain}`;
9130
- return useQuery({
9317
+ return transport.useQueryAdapter({
9131
9318
  queryKey: ["savedViews", domain, tableName, companyId, projectId],
9132
9319
  queryFn: async () => {
9133
9320
  const getUrl = `${url}&per_page=${PAGE_SIZE}`;
9134
- const response = await requestJSON2(getUrl, {
9321
+ const response = await http({
9322
+ method: "GET",
9323
+ url: getUrl,
9135
9324
  priority: "low"
9136
9325
  });
9137
9326
  return response.data;
@@ -9140,12 +9329,16 @@ var useSavedViewsQuery = (props) => {
9140
9329
  };
9141
9330
  var useSavedViewsPermissions = (props) => {
9142
9331
  const { projectId, companyId, domain } = props;
9332
+ const transport = useSavedViewsTransport();
9333
+ const http = transport.useHttp();
9143
9334
  const basePath = getBasePath2(companyId, projectId);
9144
9335
  const url = `${basePath}/permissions?permissions_domain=${domain}`;
9145
- return useQuery({
9336
+ return transport.useQueryAdapter({
9146
9337
  queryKey: ["savedViewsConfig", domain, companyId, projectId],
9147
9338
  queryFn: async () => {
9148
- const response = await requestJSON2(url, {
9339
+ const response = await http({
9340
+ method: "GET",
9341
+ url,
9149
9342
  priority: "low"
9150
9343
  });
9151
9344
  return response.data;
@@ -9169,13 +9362,17 @@ var useDeleteSavedView = (props) => useApiRequest(props, "DELETE", [
9169
9362
  ]);
9170
9363
  var useFetchSavedViewById = (savedViewToken, queryInput, enabled = true) => {
9171
9364
  const { projectId, companyId, domain } = queryInput;
9365
+ const transport = useSavedViewsTransport();
9366
+ const http = transport.useHttp();
9172
9367
  const basePath = getBasePath2(companyId, projectId);
9173
- return useQuery({
9368
+ return transport.useQueryAdapter({
9174
9369
  enabled: enabled && Boolean(savedViewToken),
9175
9370
  queryKey: ["savedView", savedViewToken, companyId, projectId],
9176
9371
  queryFn: async () => {
9177
9372
  const url = `${basePath}/${savedViewToken}?permissions_domain=${domain}`;
9178
- const response = await requestJSON2(url, {
9373
+ const response = await http({
9374
+ method: "GET",
9375
+ url,
9179
9376
  priority: "low"
9180
9377
  });
9181
9378
  return response.data;
@@ -9395,10 +9592,10 @@ var hasPermissionForViewLevel = (viewLevel, permissions) => {
9395
9592
  };
9396
9593
 
9397
9594
  // src/components/panels/useGroups.ts
9398
- import { useState as useState2 } from "react";
9595
+ import { useState as useState3 } from "react";
9399
9596
  var useGroups = (isProjectLevelTool) => {
9400
9597
  const viewLevels = getViewLevels(isProjectLevelTool);
9401
- const [groups, setGroups] = useState2(
9598
+ const [groups, setGroups] = useState3(
9402
9599
  Object.fromEntries(viewLevels.map((level) => [level, true]))
9403
9600
  );
9404
9601
  const toggleGroup = (group) => {
@@ -9415,15 +9612,15 @@ import {
9415
9612
  Typography,
9416
9613
  useI18nContext as useI18nContext4
9417
9614
  } from "@procore/core-react";
9418
- import React16 from "react";
9615
+ import React18 from "react";
9419
9616
  var groupIcon = (group) => {
9420
9617
  switch (group) {
9421
9618
  case "personal":
9422
- return /* @__PURE__ */ React16.createElement(Person_default, null);
9619
+ return /* @__PURE__ */ React18.createElement(Person_default, null);
9423
9620
  case "project":
9424
- return /* @__PURE__ */ React16.createElement(Excavator_default, null);
9621
+ return /* @__PURE__ */ React18.createElement(Excavator_default, null);
9425
9622
  case "company":
9426
- return /* @__PURE__ */ React16.createElement(Building_default, null);
9623
+ return /* @__PURE__ */ React18.createElement(Building_default, null);
9427
9624
  }
9428
9625
  };
9429
9626
  var StyledButton = pt(Button2)`
@@ -9433,7 +9630,7 @@ var StyledButton = pt(Button2)`
9433
9630
  `;
9434
9631
  var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
9435
9632
  const I18n = useI18nContext4();
9436
- return /* @__PURE__ */ React16.createElement(Box2, { style: { width: "100%" } }, /* @__PURE__ */ React16.createElement(
9633
+ return /* @__PURE__ */ React18.createElement(Box2, { style: { width: "100%" } }, /* @__PURE__ */ React18.createElement(
9437
9634
  StyledButton,
9438
9635
  {
9439
9636
  block: true,
@@ -9446,10 +9643,10 @@ var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
9446
9643
  onClick: () => toggleGroup(group),
9447
9644
  "aria-controls": `saved-views-collections-${group}`,
9448
9645
  "aria-expanded": expanded,
9449
- icon: expanded ? /* @__PURE__ */ React16.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ React16.createElement(ChevronRight_default, { size: "sm" })
9646
+ icon: expanded ? /* @__PURE__ */ React18.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ React18.createElement(ChevronRight_default, { size: "sm" })
9450
9647
  },
9451
9648
  groupIcon(group),
9452
- /* @__PURE__ */ React16.createElement(Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
9649
+ /* @__PURE__ */ React18.createElement(Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
9453
9650
  ));
9454
9651
  };
9455
9652
  var ViewLevelHeader_default = ViewLevelHeader;
@@ -9503,10 +9700,10 @@ var PanelContent = (props) => {
9503
9700
  const { data: savedViewsFromQuery, error: savedViewsError } = useSavedViewsQuery(props.queryInput);
9504
9701
  const updateMutation = useUpdateSavedView(queryInput);
9505
9702
  const { mutate: updateSavedView } = updateMutation;
9506
- const isUpdateLoading = "isPending" in updateMutation ? updateMutation.isPending : updateMutation.isLoading ?? false;
9703
+ const isUpdateLoading = updateMutation.isPending;
9507
9704
  const savedViews = props.savedViews ?? savedViewsFromQuery;
9508
- const errorToastRef = React17.useRef(null);
9509
- React17.useEffect(() => {
9705
+ const errorToastRef = React19.useRef(null);
9706
+ React19.useEffect(() => {
9510
9707
  if (savedViewsError && savedViewsError !== errorToastRef.current) {
9511
9708
  showToast.error(I18n.t("savedViews.errors.fetch"));
9512
9709
  errorToastRef.current = savedViewsError;
@@ -9536,7 +9733,7 @@ var PanelContent = (props) => {
9536
9733
  }
9537
9734
  });
9538
9735
  };
9539
- return /* @__PURE__ */ React17.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ React17.createElement(Flex2, { direction: "column", style: { height: "100%", width: "100%" } }, (temporaryView || presetViews) && /* @__PURE__ */ React17.createElement(
9736
+ return /* @__PURE__ */ React19.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ React19.createElement(Flex2, { direction: "column", style: { height: "100%", width: "100%" } }, (temporaryView || presetViews) && /* @__PURE__ */ React19.createElement(
9540
9737
  StyledMenuImperative,
9541
9738
  {
9542
9739
  role: "listbox",
@@ -9546,7 +9743,7 @@ var PanelContent = (props) => {
9546
9743
  }
9547
9744
  }
9548
9745
  },
9549
- /* @__PURE__ */ React17.createElement(MenuImperative2.Options, null, temporaryView && /* @__PURE__ */ React17.createElement(
9746
+ /* @__PURE__ */ React19.createElement(MenuImperative2.Options, null, temporaryView && /* @__PURE__ */ React19.createElement(
9550
9747
  Row,
9551
9748
  {
9552
9749
  key: temporaryView.id,
@@ -9555,7 +9752,7 @@ var PanelContent = (props) => {
9555
9752
  "aria-current": isTemporarySelected ? "true" : void 0,
9556
9753
  ref: isTemporarySelected ? selectedRowRef : null
9557
9754
  },
9558
- /* @__PURE__ */ React17.createElement(
9755
+ /* @__PURE__ */ React19.createElement(
9559
9756
  SavedViewCollectionMenuItem,
9560
9757
  {
9561
9758
  item: temporaryView,
@@ -9565,7 +9762,7 @@ var PanelContent = (props) => {
9565
9762
  )
9566
9763
  ), presetViews.map((presetView) => {
9567
9764
  const isSelected = selectedSavedView?.id === presetView.id;
9568
- return /* @__PURE__ */ React17.createElement(
9765
+ return /* @__PURE__ */ React19.createElement(
9569
9766
  Row,
9570
9767
  {
9571
9768
  key: presetView.id,
@@ -9574,7 +9771,7 @@ var PanelContent = (props) => {
9574
9771
  "aria-current": isSelected ? "true" : void 0,
9575
9772
  ref: isSelected ? selectedRowRef : null
9576
9773
  },
9577
- /* @__PURE__ */ React17.createElement(
9774
+ /* @__PURE__ */ React19.createElement(
9578
9775
  SavedViewCollectionMenuItem,
9579
9776
  {
9580
9777
  item: presetView,
@@ -9588,14 +9785,14 @@ var PanelContent = (props) => {
9588
9785
  const views = isExpanded && savedViews ? savedViews.filter(
9589
9786
  (view) => view.view_level === level && view.id !== "temporary"
9590
9787
  ) : [];
9591
- return /* @__PURE__ */ React17.createElement(React17.Fragment, { key: level }, /* @__PURE__ */ React17.createElement(
9788
+ return /* @__PURE__ */ React19.createElement(React19.Fragment, { key: level }, /* @__PURE__ */ React19.createElement(
9592
9789
  ViewLevelHeader_default,
9593
9790
  {
9594
9791
  group: level,
9595
9792
  toggleGroup,
9596
9793
  expanded: isExpanded
9597
9794
  }
9598
- ), isExpanded && views.length > 0 && /* @__PURE__ */ React17.createElement(
9795
+ ), isExpanded && views.length > 0 && /* @__PURE__ */ React19.createElement(
9599
9796
  StyledMenuImperative,
9600
9797
  {
9601
9798
  id: `saved-views-collections-${level}`,
@@ -9606,7 +9803,7 @@ var PanelContent = (props) => {
9606
9803
  }
9607
9804
  }
9608
9805
  },
9609
- /* @__PURE__ */ React17.createElement(MenuImperative2.Options, null, views.map((view) => {
9806
+ /* @__PURE__ */ React19.createElement(MenuImperative2.Options, null, views.map((view) => {
9610
9807
  const isSelected = selectedSavedView?.id === view.id;
9611
9808
  const canUpdate = isSelected && hasPermissionForViewLevel(
9612
9809
  view.view_level,
@@ -9618,7 +9815,7 @@ var PanelContent = (props) => {
9618
9815
  props.provider
9619
9816
  );
9620
9817
  const canEditOrDelete = isSelected && hasPermissionForViewLevel(view.view_level, permissions);
9621
- return /* @__PURE__ */ React17.createElement(
9818
+ return /* @__PURE__ */ React19.createElement(
9622
9819
  Row,
9623
9820
  {
9624
9821
  key: view.id,
@@ -9627,7 +9824,7 @@ var PanelContent = (props) => {
9627
9824
  "aria-current": isSelected ? "true" : void 0,
9628
9825
  ref: isSelected ? selectedRowRef : null
9629
9826
  },
9630
- /* @__PURE__ */ React17.createElement(
9827
+ /* @__PURE__ */ React19.createElement(
9631
9828
  SavedViewCollectionMenuItem,
9632
9829
  {
9633
9830
  item: view,
@@ -9654,11 +9851,10 @@ import {
9654
9851
  Button as Button6,
9655
9852
  Flex as Flex5,
9656
9853
  Panel as Panel3,
9657
- Tooltip,
9854
+ Tooltip as Tooltip2,
9658
9855
  useI18nContext as useI18nContext12
9659
9856
  } from "@procore/core-react";
9660
- import React23, { useState as useState4, useEffect as useEffect6, useCallback as useCallback4 } from "react";
9661
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
9857
+ import React25, { useState as useState5, useEffect as useEffect6, useCallback as useCallback5 } from "react";
9662
9858
  import { useToastAlertContext as useToastAlertContext3, ToastAlertProvider } from "@procore/toast-alert";
9663
9859
 
9664
9860
  // src/components/modals/DeleteConfirmationModal.tsx
@@ -9669,14 +9865,14 @@ import {
9669
9865
  P as P2,
9670
9866
  useI18nContext as useI18nContext6
9671
9867
  } from "@procore/core-react";
9672
- import React18 from "react";
9868
+ import React20 from "react";
9673
9869
  var SavedViewsDeleteConfirmationModalShared = ({
9674
9870
  onCancel,
9675
9871
  onDelete,
9676
9872
  open
9677
9873
  }) => {
9678
9874
  const i18n = useI18nContext6();
9679
- return /* @__PURE__ */ React18.createElement(
9875
+ return /* @__PURE__ */ React20.createElement(
9680
9876
  ConfirmModal,
9681
9877
  {
9682
9878
  "data-testid": "delete-confirmation-modal",
@@ -9686,13 +9882,13 @@ var SavedViewsDeleteConfirmationModalShared = ({
9686
9882
  onClose: onCancel,
9687
9883
  style: { overflowWrap: "anywhere" }
9688
9884
  },
9689
- /* @__PURE__ */ React18.createElement(Modal.Body, null, /* @__PURE__ */ React18.createElement(P2, null, i18n.t("savedViews.modal.delete.description"))),
9690
- /* @__PURE__ */ React18.createElement(Modal.Footer, null, /* @__PURE__ */ React18.createElement(Modal.FooterButtons, null, /* @__PURE__ */ React18.createElement(Button3, { variant: "secondary", onClick: onCancel }, i18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React18.createElement(Button3, { variant: "primary", onClick: onDelete }, i18n.t("savedViews.actions.delete"))))
9885
+ /* @__PURE__ */ React20.createElement(Modal.Body, null, /* @__PURE__ */ React20.createElement(P2, null, i18n.t("savedViews.modal.delete.description"))),
9886
+ /* @__PURE__ */ React20.createElement(Modal.Footer, null, /* @__PURE__ */ React20.createElement(Modal.FooterButtons, null, /* @__PURE__ */ React20.createElement(Button3, { variant: "secondary", onClick: onCancel }, i18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React20.createElement(Button3, { variant: "primary", onClick: onDelete }, i18n.t("savedViews.actions.delete"))))
9691
9887
  );
9692
9888
  };
9693
9889
 
9694
9890
  // src/components/modals/form-modal/FormModal.tsx
9695
- import React21 from "react";
9891
+ import React23 from "react";
9696
9892
 
9697
9893
  // src/components/modals/form-modal/FormModalBase.tsx
9698
9894
  import {
@@ -9707,7 +9903,7 @@ import {
9707
9903
  Typography as Typography2,
9708
9904
  useI18nContext as useI18nContext8
9709
9905
  } from "@procore/core-react";
9710
- import * as React20 from "react";
9906
+ import * as React22 from "react";
9711
9907
  import * as yup from "yup";
9712
9908
 
9713
9909
  // src/components/modals/form-modal/FormModalBaseUtils.ts
@@ -9744,7 +9940,7 @@ function extractMessage(error, I18n) {
9744
9940
 
9745
9941
  // src/components/modals/form-modal/NameInputField.tsx
9746
9942
  import { Form, useFormContext, useI18nContext as useI18nContext7 } from "@procore/core-react";
9747
- import * as React19 from "react";
9943
+ import * as React21 from "react";
9748
9944
  var NAME_INPUT_ID = "saved-view-form-name-input";
9749
9945
  var NameInputField = ({
9750
9946
  error,
@@ -9753,12 +9949,12 @@ var NameInputField = ({
9753
9949
  const I18n = useI18nContext7();
9754
9950
  const label = I18n.t("savedViews.modal.fields.name");
9755
9951
  const { errors: formErrors, submitCount } = useFormContext();
9756
- React19.useEffect(() => {
9952
+ React21.useEffect(() => {
9757
9953
  if (submitCount > 0 && formErrors?.name) {
9758
9954
  document.getElementById(NAME_INPUT_ID)?.focus();
9759
9955
  }
9760
9956
  }, [formErrors?.name, submitCount]);
9761
- return /* @__PURE__ */ React19.createElement(
9957
+ return /* @__PURE__ */ React21.createElement(
9762
9958
  Form.Text,
9763
9959
  {
9764
9960
  id: NAME_INPUT_ID,
@@ -9850,7 +10046,7 @@ var FormModalBase = ({
9850
10046
  I18n,
9851
10047
  isProjectLevelTool
9852
10048
  );
9853
- return /* @__PURE__ */ React20.createElement(
10049
+ return /* @__PURE__ */ React22.createElement(
9854
10050
  Modal2,
9855
10051
  {
9856
10052
  howToClose: ["x", "scrim"],
@@ -9859,7 +10055,7 @@ var FormModalBase = ({
9859
10055
  width: "md",
9860
10056
  "data-testid": "create-update-modal"
9861
10057
  },
9862
- /* @__PURE__ */ React20.createElement(ScrollContainer, null, /* @__PURE__ */ React20.createElement(Modal2.Header, { style: { borderBottom: `1px solid ${colors3.gray85}` } }, /* @__PURE__ */ React20.createElement(Modal2.Heading, null, header)), /* @__PURE__ */ React20.createElement(
10058
+ /* @__PURE__ */ React22.createElement(ScrollContainer, null, /* @__PURE__ */ React22.createElement(Modal2.Header, { style: { borderBottom: `1px solid ${colors3.gray85}` } }, /* @__PURE__ */ React22.createElement(Modal2.Heading, null, header)), /* @__PURE__ */ React22.createElement(
9863
10059
  Form2,
9864
10060
  {
9865
10061
  initialValues: {
@@ -9885,25 +10081,25 @@ var FormModalBase = ({
9885
10081
  onReset: onCancel,
9886
10082
  validateOnChange: true
9887
10083
  },
9888
- /* @__PURE__ */ React20.createElement(Form2.Form, { name: header }, /* @__PURE__ */ React20.createElement(
10084
+ /* @__PURE__ */ React22.createElement(Form2.Form, { name: header }, /* @__PURE__ */ React22.createElement(
9889
10085
  Modal2.Body,
9890
10086
  {
9891
10087
  style: { paddingTop: 0, paddingBottom: 0, marginTop: spacing2.lg }
9892
10088
  },
9893
- errors && /* @__PURE__ */ React20.createElement(ErrorBanner, { style: { marginBottom: spacing2.xl } }, /* @__PURE__ */ React20.createElement(Banner.Content, null, /* @__PURE__ */ React20.createElement(Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React20.createElement(Banner.Body, null, errors?.form || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
9894
- /* @__PURE__ */ React20.createElement(Form2.Row, null, /* @__PURE__ */ React20.createElement(
10089
+ errors && /* @__PURE__ */ React22.createElement(ErrorBanner, { style: { marginBottom: spacing2.xl } }, /* @__PURE__ */ React22.createElement(Banner.Content, null, /* @__PURE__ */ React22.createElement(Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React22.createElement(Banner.Body, null, errors?.form || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
10090
+ /* @__PURE__ */ React22.createElement(Form2.Row, null, /* @__PURE__ */ React22.createElement(
9895
10091
  NameInputField,
9896
10092
  {
9897
10093
  error: errors?.name,
9898
10094
  onResetMutations: resetMutations
9899
10095
  }
9900
10096
  )),
9901
- /* @__PURE__ */ React20.createElement(
10097
+ /* @__PURE__ */ React22.createElement(
9902
10098
  Form2.Row,
9903
10099
  {
9904
10100
  style: { marginTop: errors?.name ? spacing2.xl : spacing2.none }
9905
10101
  },
9906
- /* @__PURE__ */ React20.createElement(
10102
+ /* @__PURE__ */ React22.createElement(
9907
10103
  Form2.TextArea,
9908
10104
  {
9909
10105
  name: "description",
@@ -9914,7 +10110,7 @@ var FormModalBase = ({
9914
10110
  }
9915
10111
  )
9916
10112
  ),
9917
- viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React20.createElement(Form2.Row, null, /* @__PURE__ */ React20.createElement(
10113
+ viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React22.createElement(Form2.Row, null, /* @__PURE__ */ React22.createElement(
9918
10114
  Form2.Select,
9919
10115
  {
9920
10116
  name: "view_level",
@@ -9924,8 +10120,8 @@ var FormModalBase = ({
9924
10120
  onSearch: false,
9925
10121
  onClear: false
9926
10122
  }
9927
- )) : /* @__PURE__ */ React20.createElement(React20.Fragment, null)
9928
- ), /* @__PURE__ */ React20.createElement(Modal2.Footer, { style: { borderTop: `1px solid ${colors3.gray85}` } }, /* @__PURE__ */ React20.createElement(Flex3, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React20.createElement(Typography2, { color: "gray45", italic: true }, /* @__PURE__ */ React20.createElement(Typography2, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React20.createElement(Modal2.FooterButtons, null, /* @__PURE__ */ React20.createElement(Button4, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React20.createElement(
10123
+ )) : /* @__PURE__ */ React22.createElement(React22.Fragment, null)
10124
+ ), /* @__PURE__ */ React22.createElement(Modal2.Footer, { style: { borderTop: `1px solid ${colors3.gray85}` } }, /* @__PURE__ */ React22.createElement(Flex3, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React22.createElement(Typography2, { color: "gray45", italic: true }, /* @__PURE__ */ React22.createElement(Typography2, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React22.createElement(Modal2.FooterButtons, null, /* @__PURE__ */ React22.createElement(Button4, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React22.createElement(
9929
10125
  Button4,
9930
10126
  {
9931
10127
  "data-testid": "create-update-modal-button",
@@ -9955,7 +10151,7 @@ var FormModal = ({
9955
10151
  defaultView
9956
10152
  }) => {
9957
10153
  const i18n = useI18nContext9();
9958
- return /* @__PURE__ */ React21.createElement(
10154
+ return /* @__PURE__ */ React23.createElement(
9959
10155
  FormModalBase,
9960
10156
  {
9961
10157
  open,
@@ -9989,7 +10185,7 @@ import {
9989
10185
  Typography as Typography3,
9990
10186
  useI18nContext as useI18nContext10
9991
10187
  } from "@procore/core-react";
9992
- import * as React22 from "react";
10188
+ import * as React24 from "react";
9993
10189
  import * as yup2 from "yup";
9994
10190
  var SharedViewFormModal = ({
9995
10191
  open,
@@ -10012,7 +10208,7 @@ var SharedViewFormModal = ({
10012
10208
  const handleOnSubmit = (data) => {
10013
10209
  onCreateView(data.name, data.description);
10014
10210
  };
10015
- return /* @__PURE__ */ React22.createElement(
10211
+ return /* @__PURE__ */ React24.createElement(
10016
10212
  Modal3,
10017
10213
  {
10018
10214
  "data-testid": "shared-view-form-modal",
@@ -10021,7 +10217,7 @@ var SharedViewFormModal = ({
10021
10217
  onClose,
10022
10218
  style: { width: "540px" }
10023
10219
  },
10024
- /* @__PURE__ */ React22.createElement(
10220
+ /* @__PURE__ */ React24.createElement(
10025
10221
  Modal3.Header,
10026
10222
  {
10027
10223
  onClose,
@@ -10032,9 +10228,9 @@ var SharedViewFormModal = ({
10032
10228
  paddingRight: spacing3.xl
10033
10229
  }
10034
10230
  },
10035
- /* @__PURE__ */ React22.createElement(Modal3.Heading, null, I18n.t("savedViews.modal.create.title"))
10231
+ /* @__PURE__ */ React24.createElement(Modal3.Heading, null, I18n.t("savedViews.modal.create.title"))
10036
10232
  ),
10037
- /* @__PURE__ */ React22.createElement(
10233
+ /* @__PURE__ */ React24.createElement(
10038
10234
  P3,
10039
10235
  {
10040
10236
  style: {
@@ -10049,7 +10245,7 @@ var SharedViewFormModal = ({
10049
10245
  },
10050
10246
  I18n.t("savedViews.modal.copyConfirmation.description")
10051
10247
  ),
10052
- /* @__PURE__ */ React22.createElement(
10248
+ /* @__PURE__ */ React24.createElement(
10053
10249
  Form3,
10054
10250
  {
10055
10251
  initialValues: {
@@ -10068,7 +10264,7 @@ var SharedViewFormModal = ({
10068
10264
  onSubmit: handleOnSubmit,
10069
10265
  validateOnChange: true
10070
10266
  },
10071
- /* @__PURE__ */ React22.createElement(Form3.Form, { name: "share-view-form" }, /* @__PURE__ */ React22.createElement(
10267
+ /* @__PURE__ */ React24.createElement(Form3.Form, { name: "share-view-form" }, /* @__PURE__ */ React24.createElement(
10072
10268
  Modal3.Body,
10073
10269
  {
10074
10270
  style: {
@@ -10077,22 +10273,22 @@ var SharedViewFormModal = ({
10077
10273
  borderTop: `1px solid ${colors4.gray85}`
10078
10274
  }
10079
10275
  },
10080
- errors && /* @__PURE__ */ React22.createElement(ErrorBanner2, { style: { marginBottom: spacing3.xl } }, /* @__PURE__ */ React22.createElement(Banner2.Content, null, /* @__PURE__ */ React22.createElement(Banner2.Title, null, I18n.t("savedViews.modal.errors.title", {
10276
+ errors && /* @__PURE__ */ React24.createElement(ErrorBanner2, { style: { marginBottom: spacing3.xl } }, /* @__PURE__ */ React24.createElement(Banner2.Content, null, /* @__PURE__ */ React24.createElement(Banner2.Title, null, I18n.t("savedViews.modal.errors.title", {
10081
10277
  mode: "create"
10082
- })), /* @__PURE__ */ React22.createElement(Banner2.Body, null, errors?.form || I18n.t("savedViews.modal.errors.description.create")))),
10083
- /* @__PURE__ */ React22.createElement(Form3.Row, null, /* @__PURE__ */ React22.createElement(
10278
+ })), /* @__PURE__ */ React24.createElement(Banner2.Body, null, errors?.form || I18n.t("savedViews.modal.errors.description.create")))),
10279
+ /* @__PURE__ */ React24.createElement(Form3.Row, null, /* @__PURE__ */ React24.createElement(
10084
10280
  NameInputField,
10085
10281
  {
10086
10282
  error: errors?.name,
10087
10283
  onResetMutations: handleNameChange
10088
10284
  }
10089
10285
  )),
10090
- /* @__PURE__ */ React22.createElement(
10286
+ /* @__PURE__ */ React24.createElement(
10091
10287
  Form3.Row,
10092
10288
  {
10093
10289
  style: { marginTop: errors?.name ? spacing3.xl : spacing3.none }
10094
10290
  },
10095
- /* @__PURE__ */ React22.createElement(
10291
+ /* @__PURE__ */ React24.createElement(
10096
10292
  Form3.TextArea,
10097
10293
  {
10098
10294
  name: "description",
@@ -10103,7 +10299,7 @@ var SharedViewFormModal = ({
10103
10299
  }
10104
10300
  )
10105
10301
  )
10106
- ), /* @__PURE__ */ React22.createElement(Modal3.Footer, { style: { borderTop: `1px solid ${colors4.gray85}` } }, /* @__PURE__ */ React22.createElement(Flex4, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React22.createElement(Typography3, { color: "gray45", italic: true }, /* @__PURE__ */ React22.createElement(Typography3, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React22.createElement(Modal3.FooterButtons, null, /* @__PURE__ */ React22.createElement(
10302
+ ), /* @__PURE__ */ React24.createElement(Modal3.Footer, { style: { borderTop: `1px solid ${colors4.gray85}` } }, /* @__PURE__ */ React24.createElement(Flex4, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React24.createElement(Typography3, { color: "gray45", italic: true }, /* @__PURE__ */ React24.createElement(Typography3, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React24.createElement(Modal3.FooterButtons, null, /* @__PURE__ */ React24.createElement(
10107
10303
  Button5,
10108
10304
  {
10109
10305
  variant: "secondary",
@@ -10112,7 +10308,7 @@ var SharedViewFormModal = ({
10112
10308
  disabled: isCreating
10113
10309
  },
10114
10310
  I18n.t("savedViews.actions.viewTemporarily")
10115
- ), /* @__PURE__ */ React22.createElement(
10311
+ ), /* @__PURE__ */ React24.createElement(
10116
10312
  Button5,
10117
10313
  {
10118
10314
  type: "submit",
@@ -10128,8 +10324,7 @@ var SharedViewFormModal = ({
10128
10324
  };
10129
10325
 
10130
10326
  // src/utils/hooks/useViewSelection.ts
10131
- import { useState as useState3, useCallback as useCallback3, useEffect as useEffect4, useRef as useRef3, useMemo as useMemo2 } from "react";
10132
- import { useSearchParams } from "react-router-dom";
10327
+ import { useState as useState4, useCallback as useCallback4, useEffect as useEffect4, useRef as useRef3, useMemo as useMemo3 } from "react";
10133
10328
  import { useI18nContext as useI18nContext11 } from "@procore/core-react";
10134
10329
 
10135
10330
  // src/utils/viewStorage.ts
@@ -10155,13 +10350,13 @@ var ViewStorage = {
10155
10350
  };
10156
10351
 
10157
10352
  // src/utils/hooks/useLatest.ts
10158
- import { useCallback as useCallback2, useLayoutEffect, useRef as useRef2 } from "react";
10353
+ import { useCallback as useCallback3, useLayoutEffect, useRef as useRef2 } from "react";
10159
10354
  var useLatest = (callback) => {
10160
10355
  const ref = useRef2(callback);
10161
10356
  useLayoutEffect(() => {
10162
10357
  ref.current = callback;
10163
10358
  });
10164
- return useCallback2((...args) => ref.current(...args), []);
10359
+ return useCallback3((...args) => ref.current(...args), []);
10165
10360
  };
10166
10361
 
10167
10362
  // src/utils/hooks/useViewSelection.ts
@@ -10174,16 +10369,10 @@ var areRowGroupStatesEqual = (a2, b2) => {
10174
10369
  if (a2.length !== b2.length) return false;
10175
10370
  return a2.every((val, idx) => val === b2[idx]);
10176
10371
  };
10177
- var getUpdatedSearchParams = (currentParams, view) => {
10178
- const updatedParams = new URLSearchParams(currentParams);
10179
- if (view.id === "default") {
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);
10185
- }
10186
- return updatedParams;
10372
+ var getViewTokenForView = (view) => {
10373
+ if (view.id === "default") return "default";
10374
+ if (view.id === "temporary") return "temporary";
10375
+ return view.share_token;
10187
10376
  };
10188
10377
  var checkIsViewSelected = (selectedView, viewId) => {
10189
10378
  return selectedView?.share_token === viewId || selectedView?.id === viewId;
@@ -10191,55 +10380,40 @@ var checkIsViewSelected = (selectedView, viewId) => {
10191
10380
  var findViewByToken = (views, token2) => {
10192
10381
  return views.find((view) => view.share_token === token2);
10193
10382
  };
10194
- var setViewInUrl = (view, setSearchParams) => {
10195
- setSearchParams(
10196
- (currentParams) => getUpdatedSearchParams(currentParams, view),
10197
- { replace: true }
10198
- );
10199
- };
10200
- var restoreUrlParameter = (currentParam, previousParam, setSearchParams) => {
10201
- 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
- );
10210
- }
10211
- };
10212
10383
  var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, tableConfig) => {
10213
10384
  const I18n = useI18nContext11();
10385
+ const transport = useSavedViewsTransport();
10386
+ const urlAdapter = transport.useUrlAdapter();
10214
10387
  const projectIdSegment = config.projectId ?? "company";
10215
10388
  const storageKey = `savedView_${config.domain}_${config.tableName}_${config.companyId}_${projectIdSegment}_${config.userId}`;
10216
10389
  const temporaryStorageKey = `${storageKey}-temporary`;
10217
- const [searchParams, setSearchParams] = useSearchParams();
10218
10390
  const previousSavedViewParamRef = useRef3(null);
10219
- const [selectedSavedView, setSelectedSavedView] = useState3(() => {
10391
+ const intendedTokenRef = useRef3(null);
10392
+ const [selectedSavedView, setSelectedSavedView] = useState4(() => {
10220
10393
  const stored = ViewStorage.load(storageKey, config.defaultView);
10221
10394
  return stored ?? config.defaultView;
10222
10395
  });
10223
- const [temporaryView, setTemporaryView] = useState3(() => {
10396
+ const [temporaryView, setTemporaryView] = useState4(() => {
10224
10397
  const loaded = ViewStorage.load(temporaryStorageKey, config.defaultView);
10225
10398
  return loaded && (loaded.id === "temporary" || loaded.view_level === "temporary") ? loaded : null;
10226
10399
  });
10227
- const persistViewToStorageAndUrl = useCallback3(
10400
+ const persistViewToStorageAndUrl = useCallback4(
10228
10401
  (view) => {
10229
10402
  ViewStorage.save(storageKey, view);
10230
- setViewInUrl(view, setSearchParams);
10403
+ intendedTokenRef.current = getViewTokenForView(view);
10404
+ urlAdapter.setViewToken(getViewTokenForView(view));
10231
10405
  },
10232
- [storageKey, setSearchParams]
10406
+ [storageKey, urlAdapter]
10233
10407
  );
10234
- const baseViews = useMemo2(
10408
+ const baseViews = useMemo3(
10235
10409
  () => [...savedViews ?? [], ...presetViews ?? []],
10236
10410
  [savedViews, presetViews]
10237
10411
  );
10238
- const allViews = useMemo2(
10412
+ const allViews = useMemo3(
10239
10413
  () => temporaryView ? [...baseViews, temporaryView] : baseViews,
10240
10414
  [baseViews, temporaryView]
10241
10415
  );
10242
- const selectView = useCallback3(
10416
+ const selectView = useCallback4(
10243
10417
  (view) => {
10244
10418
  const viewToSelect = config.onSelect({ item: view });
10245
10419
  setSelectedSavedView(viewToSelect);
@@ -10248,7 +10422,7 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10248
10422
  },
10249
10423
  [config, persistViewToStorageAndUrl]
10250
10424
  );
10251
- const createTemporaryView = useCallback3(
10425
+ const createTemporaryView = useCallback4(
10252
10426
  (fetchedView) => {
10253
10427
  const tempView = {
10254
10428
  ...fetchedView,
@@ -10263,12 +10437,12 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10263
10437
  },
10264
10438
  [temporaryStorageKey, selectView]
10265
10439
  );
10266
- const clearTemporaryView = useCallback3(() => {
10440
+ const clearTemporaryView = useCallback4(() => {
10267
10441
  ViewStorage.remove(temporaryStorageKey);
10268
10442
  setTemporaryView(null);
10269
10443
  selectView(config.defaultView);
10270
10444
  }, [temporaryStorageKey, config.defaultView, selectView]);
10271
- const isViewAlreadySelected = useCallback3(
10445
+ const isViewAlreadySelected = useCallback4(
10272
10446
  (viewId) => checkIsViewSelected(selectedSavedView, viewId),
10273
10447
  [selectedSavedView]
10274
10448
  );
@@ -10283,20 +10457,26 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10283
10457
  openSharedViewModal(viewId);
10284
10458
  }
10285
10459
  });
10460
+ const savedViewIdFromUrl = urlAdapter.getViewToken();
10286
10461
  useEffect4(() => {
10287
- const savedViewId = searchParams.get("saved-view");
10288
- restoreUrlParameter(
10289
- savedViewId,
10290
- previousSavedViewParamRef.current,
10291
- setSearchParams
10292
- );
10293
- if (savedViewId) {
10294
- previousSavedViewParamRef.current = savedViewId;
10462
+ const intendedToken = intendedTokenRef.current;
10463
+ if (intendedToken !== null && savedViewIdFromUrl !== intendedToken) {
10464
+ urlAdapter.setViewToken(intendedToken);
10465
+ return;
10466
+ }
10467
+ if (intendedToken !== null && savedViewIdFromUrl === intendedToken) {
10468
+ intendedTokenRef.current = null;
10469
+ }
10470
+ if (previousSavedViewParamRef.current && !savedViewIdFromUrl) {
10471
+ urlAdapter.setViewToken(previousSavedViewParamRef.current);
10295
10472
  }
10296
- if (savedViewId && savedViews) {
10297
- handleSavedViewFromUrl(savedViewId);
10473
+ if (savedViewIdFromUrl) {
10474
+ previousSavedViewParamRef.current = savedViewIdFromUrl;
10298
10475
  }
10299
- }, [searchParams, handleSavedViewFromUrl, allViews.length]);
10476
+ if (savedViewIdFromUrl && savedViews) {
10477
+ handleSavedViewFromUrl(savedViewIdFromUrl);
10478
+ }
10479
+ }, [savedViewIdFromUrl, handleSavedViewFromUrl, allViews.length, urlAdapter]);
10300
10480
  const previousRowGroupStateRef = useRef3(
10301
10481
  isSmartGridConfig(tableConfig) ? tableConfig.rowGroupState : void 0
10302
10482
  );
@@ -10391,10 +10571,26 @@ var FocusScopeToggle = ({ isOpen }) => {
10391
10571
 
10392
10572
  // src/components/saved-views/SavedViews.tsx
10393
10573
  import { FocusScope } from "@react-aria/focus";
10574
+
10575
+ // src/transport/default-lazy.ts
10576
+ var cached;
10577
+ var inFlight;
10578
+ var getCachedDefaultTransport = () => cached;
10579
+ var loadDefaultTransport = () => {
10580
+ if (cached) return Promise.resolve(cached);
10581
+ if (inFlight) return inFlight;
10582
+ inFlight = import("./transport/default.mjs").then((mod) => {
10583
+ cached = mod.defaultTransport;
10584
+ inFlight = void 0;
10585
+ return mod.defaultTransport;
10586
+ });
10587
+ return inFlight;
10588
+ };
10589
+
10590
+ // src/components/saved-views/SavedViews.tsx
10394
10591
  var StyledPanel = pt.div`
10395
10592
  border: ${({ provider }) => provider === "data-table" ? "1px solid #d6dadc" : "none"};
10396
10593
  `;
10397
- var queryClient = new QueryClient();
10398
10594
  var SavedViewsContent = (props) => {
10399
10595
  const { projectId, companyId } = props;
10400
10596
  const queryInput = {
@@ -10407,13 +10603,13 @@ var SavedViewsContent = (props) => {
10407
10603
  const { mutate: deleteSavedView } = useDeleteSavedView(queryInput);
10408
10604
  const { showToast } = useToastAlertContext3();
10409
10605
  const i18n = useI18nContext12();
10410
- const [activeModal, setActiveModal] = useState4(null);
10411
- const [modalData, setModalData] = useState4(null);
10606
+ const [activeModal, setActiveModal] = useState5(null);
10607
+ const [modalData, setModalData] = useState5(null);
10412
10608
  const openModal = (type, data) => {
10413
10609
  setActiveModal(type);
10414
10610
  setModalData(data ?? null);
10415
10611
  };
10416
- const closeModal = useCallback4(() => {
10612
+ const closeModal = useCallback5(() => {
10417
10613
  setActiveModal(null);
10418
10614
  setModalData(null);
10419
10615
  }, []);
@@ -10460,6 +10656,10 @@ var SavedViewsContent = (props) => {
10460
10656
  closeModal();
10461
10657
  }
10462
10658
  }, [fetchError, selectedView, props.defaultView, selectView, closeModal]);
10659
+ const setSelectedViewInContext = useSavedViewsSelection()?.setSelectedView;
10660
+ useEffect6(() => {
10661
+ setSelectedViewInContext?.(selectedView ?? null);
10662
+ }, [selectedView, setSelectedViewInContext]);
10463
10663
  const viewSharedViewTemporarily = () => {
10464
10664
  if (fetchedView) {
10465
10665
  createTemporaryView(fetchedView);
@@ -10501,19 +10701,19 @@ var SavedViewsContent = (props) => {
10501
10701
  deleteSelectedView();
10502
10702
  closeModal();
10503
10703
  };
10504
- return /* @__PURE__ */ React23.createElement(FocusScope, { contain: false }, /* @__PURE__ */ React23.createElement(StyledPanel, { id: "saved-views-panel", provider: props.provider }, /* @__PURE__ */ React23.createElement(FocusScopeToggle, { isOpen: props.isPanelOpen ?? true }), /* @__PURE__ */ React23.createElement(
10704
+ return /* @__PURE__ */ React25.createElement(FocusScope, { contain: false }, /* @__PURE__ */ React25.createElement(StyledPanel, { id: "saved-views-panel", provider: props.provider }, /* @__PURE__ */ React25.createElement(FocusScopeToggle, { isOpen: props.isPanelOpen ?? true }), /* @__PURE__ */ React25.createElement(
10505
10705
  ExpandedPanel,
10506
10706
  {
10507
10707
  "data-testid": "saved-view-expanded-panel",
10508
10708
  provider: props.provider
10509
10709
  },
10510
- /* @__PURE__ */ React23.createElement(Panel3.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ React23.createElement(Panel3.Title, null, /* @__PURE__ */ React23.createElement(Flex5, { alignItems: "center" }, /* @__PURE__ */ React23.createElement(Box3, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ React23.createElement(
10511
- Tooltip,
10710
+ /* @__PURE__ */ React25.createElement(Panel3.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ React25.createElement(Panel3.Title, null, /* @__PURE__ */ React25.createElement(Flex5, { alignItems: "center" }, /* @__PURE__ */ React25.createElement(Box3, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ React25.createElement(
10711
+ Tooltip2,
10512
10712
  {
10513
10713
  showDelay: 200,
10514
- overlay: /* @__PURE__ */ React23.createElement(Tooltip.Content, null, i18n.t("savedViews.tooltip"))
10714
+ overlay: /* @__PURE__ */ React25.createElement(Tooltip2.Content, null, i18n.t("savedViews.tooltip"))
10515
10715
  },
10516
- /* @__PURE__ */ React23.createElement(
10716
+ /* @__PURE__ */ React25.createElement(
10517
10717
  Help_default,
10518
10718
  {
10519
10719
  tabIndex: 0,
@@ -10521,16 +10721,16 @@ var SavedViewsContent = (props) => {
10521
10721
  "aria-label": i18n.t("savedViews.tooltip")
10522
10722
  }
10523
10723
  )
10524
- ))), /* @__PURE__ */ React23.createElement(
10525
- Tooltip,
10724
+ ))), /* @__PURE__ */ React25.createElement(
10725
+ Tooltip2,
10526
10726
  {
10527
10727
  overlay: i18n.t("savedViews.actions.create"),
10528
10728
  showDelay: 1e3
10529
10729
  },
10530
- /* @__PURE__ */ React23.createElement(
10730
+ /* @__PURE__ */ React25.createElement(
10531
10731
  Button6,
10532
10732
  {
10533
- icon: /* @__PURE__ */ React23.createElement(Plus_default, null),
10733
+ icon: /* @__PURE__ */ React25.createElement(Plus_default, null),
10534
10734
  variant: "secondary",
10535
10735
  "data-testid": "expanded-panel-create-button",
10536
10736
  onClick: () => openModal("create" /* CREATE */),
@@ -10539,7 +10739,7 @@ var SavedViewsContent = (props) => {
10539
10739
  i18n.t("savedViews.actions.create")
10540
10740
  )
10541
10741
  )),
10542
- /* @__PURE__ */ React23.createElement(Panel3.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ React23.createElement(
10742
+ /* @__PURE__ */ React25.createElement(Panel3.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ React25.createElement(
10543
10743
  PanelContent,
10544
10744
  {
10545
10745
  onSelect: ({ item }) => selectView(item),
@@ -10556,7 +10756,7 @@ var SavedViewsContent = (props) => {
10556
10756
  onClearTemporary: clearTemporaryView
10557
10757
  }
10558
10758
  ))
10559
- ), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ React23.createElement(
10759
+ ), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ React25.createElement(
10560
10760
  FormModal,
10561
10761
  {
10562
10762
  open: true,
@@ -10570,14 +10770,14 @@ var SavedViewsContent = (props) => {
10570
10770
  setOpenEditCreateModal: closeModal,
10571
10771
  defaultView: props.defaultView
10572
10772
  }
10573
- ), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ React23.createElement(
10773
+ ), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ React25.createElement(
10574
10774
  SavedViewsDeleteConfirmationModalShared,
10575
10775
  {
10576
10776
  open: true,
10577
10777
  onDelete: confirmDeleteAndCloseModal,
10578
10778
  onCancel: closeModal
10579
10779
  }
10580
- ), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ React23.createElement(
10780
+ ), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ React25.createElement(
10581
10781
  SharedViewFormModal,
10582
10782
  {
10583
10783
  open: true,
@@ -10592,14 +10792,34 @@ var SavedViewsContent = (props) => {
10592
10792
  )));
10593
10793
  };
10594
10794
  var SavedViews = (props) => {
10595
- return /* @__PURE__ */ React23.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ React23.createElement(QueryClientProvider, { client: queryClient }, /* @__PURE__ */ React23.createElement(ToastAlertProvider, null, /* @__PURE__ */ React23.createElement(SavedViewsContent, { ...props }))));
10795
+ const [resolvedDefault, setResolvedDefault] = useState5(() => props.transport ? void 0 : getCachedDefaultTransport());
10796
+ const [transportLoadError, setTransportLoadError] = useState5(void 0);
10797
+ useEffect6(() => {
10798
+ if (props.transport || resolvedDefault) return;
10799
+ let cancelled = false;
10800
+ void loadDefaultTransport().then((transport2) => {
10801
+ if (!cancelled) setResolvedDefault(transport2);
10802
+ }).catch((err) => {
10803
+ if (!cancelled) setTransportLoadError(err);
10804
+ });
10805
+ return () => {
10806
+ cancelled = true;
10807
+ };
10808
+ }, [props.transport, resolvedDefault]);
10809
+ const transport = props.transport ?? resolvedDefault;
10810
+ if (!transport) {
10811
+ if (transportLoadError) throw transportLoadError;
10812
+ return null;
10813
+ }
10814
+ const { CacheProvider } = transport;
10815
+ return /* @__PURE__ */ React25.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ React25.createElement(SavedViewsTransportProvider, { transport }, /* @__PURE__ */ React25.createElement(CacheProvider, null, /* @__PURE__ */ React25.createElement(ToastAlertProvider, null, /* @__PURE__ */ React25.createElement(SavedViewsContent, { ...props })))));
10596
10816
  };
10597
10817
 
10598
10818
  // src/components/adapters/smart-grid/SmartGridSavedViews.tsx
10599
- import React24, { useCallback as useCallback5 } from "react";
10819
+ import React26, { useCallback as useCallback6 } from "react";
10600
10820
 
10601
10821
  // src/components/adapters/smart-grid/SmartGridDefaultSavedView.tsx
10602
- import { useMemo as useMemo3 } from "react";
10822
+ import { useMemo as useMemo4 } from "react";
10603
10823
  var DEFAULT_COLUMN_STATE = {
10604
10824
  hide: false,
10605
10825
  pinned: null,
@@ -10646,7 +10866,7 @@ var extractDefaultView = (gridApi, receivedConfig) => {
10646
10866
  return result;
10647
10867
  };
10648
10868
  var useNormalizedDefaultViews = (defaultViews, gridApi) => {
10649
- return useMemo3(() => {
10869
+ return useMemo4(() => {
10650
10870
  if (!gridApi)
10651
10871
  return defaultViews.map((view) => ({ ...view, share_token: view.id }));
10652
10872
  return defaultViews.map((view) => ({
@@ -10658,7 +10878,7 @@ var useNormalizedDefaultViews = (defaultViews, gridApi) => {
10658
10878
  };
10659
10879
 
10660
10880
  // src/components/adapters/smart-grid/useSmartGridConfig.ts
10661
- import { useState as useState5, useEffect as useEffect7 } from "react";
10881
+ import { useState as useState6, useEffect as useEffect7 } from "react";
10662
10882
  var GRID_STATE_EVENTS = [
10663
10883
  "sortChanged",
10664
10884
  "filterOpened",
@@ -10674,7 +10894,7 @@ var GRID_STATE_EVENTS = [
10674
10894
  "gridReady"
10675
10895
  ];
10676
10896
  var useSmartGridConfig = (gridApi) => {
10677
- const [config, setConfig] = useState5(
10897
+ const [config, setConfig] = useState6(
10678
10898
  () => getSmartGridConfig(gridApi)
10679
10899
  );
10680
10900
  useEffect7(() => {
@@ -10695,10 +10915,10 @@ var useSmartGridConfig = (gridApi) => {
10695
10915
  };
10696
10916
 
10697
10917
  // src/components/adapters/smart-grid/useSavedViewsPanelOpen.ts
10698
- import { useEffect as useEffect8, useState as useState6 } from "react";
10918
+ import { useEffect as useEffect8, useState as useState7 } from "react";
10699
10919
  var SAVED_VIEWS_PANEL_ID = "savedViews";
10700
10920
  var useSavedViewsPanelOpen = (gridApi) => {
10701
- const [isOpen, setIsOpen] = useState6(
10921
+ const [isOpen, setIsOpen] = useState7(
10702
10922
  gridApi.getOpenedToolPanel?.() === SAVED_VIEWS_PANEL_ID
10703
10923
  );
10704
10924
  useEffect8(() => {
@@ -10721,7 +10941,7 @@ var SmartGridSavedViews = (props) => {
10721
10941
  const isPanelOpen = useSavedViewsPanelOpen(gridApi);
10722
10942
  const presetViews = useNormalizedDefaultViews(props.defaultViews, gridApi);
10723
10943
  const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
10724
- const onSelect = useCallback5(
10944
+ const onSelect = useCallback6(
10725
10945
  ({ item }) => {
10726
10946
  if (!gridApi) return item;
10727
10947
  const isPresetView = item.view_level === "default";
@@ -10748,7 +10968,7 @@ var SmartGridSavedViews = (props) => {
10748
10968
  },
10749
10969
  [gridApi, tableConfig, setTableConfig]
10750
10970
  );
10751
- return /* @__PURE__ */ React24.createElement(
10971
+ return /* @__PURE__ */ React26.createElement(
10752
10972
  SavedViews,
10753
10973
  {
10754
10974
  onSelect,
@@ -10761,21 +10981,22 @@ var SmartGridSavedViews = (props) => {
10761
10981
  presetViews,
10762
10982
  tableName: props.tableName,
10763
10983
  tableConfig,
10764
- isPanelOpen
10984
+ isPanelOpen,
10985
+ transport: props.transport
10765
10986
  }
10766
10987
  );
10767
10988
  };
10768
10989
 
10769
10990
  // src/components/adapters/data-table/DataTableSavedViews.tsx
10770
- import React25, {
10991
+ import React27, {
10771
10992
  forwardRef as forwardRef11,
10772
10993
  useImperativeHandle,
10773
- useState as useState7,
10774
- useCallback as useCallback6
10994
+ useState as useState8,
10995
+ useCallback as useCallback7
10775
10996
  } from "react";
10776
10997
 
10777
10998
  // src/components/adapters/data-table/DataTableDefaultSavedView.tsx
10778
- import { useMemo as useMemo4 } from "react";
10999
+ import { useMemo as useMemo5 } from "react";
10779
11000
  var DEFAULT_COLUMN_STATE2 = {
10780
11001
  hidden: false,
10781
11002
  pinned: null,
@@ -10822,7 +11043,7 @@ var extractDefaultView2 = (columnDefinitions, receivedConfigFromTool) => {
10822
11043
  return result;
10823
11044
  };
10824
11045
  var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
10825
- return useMemo4(
11046
+ return useMemo5(
10826
11047
  () => defaultViews.map((view) => ({
10827
11048
  ...view,
10828
11049
  share_token: view.id,
@@ -10840,7 +11061,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
10840
11061
  props.columnDefinitions
10841
11062
  );
10842
11063
  const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
10843
- const [internalTableConfig, setInternalTableConfig] = useState7(
11064
+ const [internalTableConfig, setInternalTableConfig] = useState8(
10844
11065
  ViewStorage.load(props.stickyViewsKey, defaultView).table_config
10845
11066
  );
10846
11067
  useImperativeHandle(ref, () => ({
@@ -10848,7 +11069,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
10848
11069
  setInternalTableConfig(newConfig);
10849
11070
  }
10850
11071
  }));
10851
- const onSelect = useCallback6(
11072
+ const onSelect = useCallback7(
10852
11073
  ({ item }) => {
10853
11074
  const isPresetView = item.view_level === "default";
10854
11075
  const syncReferenceConfig = tableApi?.getTableConfiguration?.() ?? defaultView.table_config;
@@ -10871,7 +11092,7 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
10871
11092
  if (!internalTableConfig) {
10872
11093
  return null;
10873
11094
  }
10874
- return /* @__PURE__ */ React25.createElement(
11095
+ return /* @__PURE__ */ React27.createElement(
10875
11096
  SavedViews,
10876
11097
  {
10877
11098
  onSelect,
@@ -10883,7 +11104,8 @@ var DataTableSavedViews = forwardRef11((props, ref) => {
10883
11104
  defaultView,
10884
11105
  presetViews,
10885
11106
  tableName: props.tableName,
10886
- tableConfig: internalTableConfig
11107
+ tableConfig: internalTableConfig,
11108
+ transport: props.transport
10887
11109
  }
10888
11110
  );
10889
11111
  });
@@ -10896,9 +11118,11 @@ export {
10896
11118
  SavedViewCollectionMenuItem,
10897
11119
  SavedViews,
10898
11120
  SavedViewsDeleteConfirmationModalShared,
11121
+ SavedViewsSelectionProvider,
10899
11122
  SmartGridSavedViews,
10900
11123
  getTranslations,
10901
- useSavedViewsPanel_default as useSavedViewsPanel
11124
+ useSavedViewsPanel_default as useSavedViewsPanel,
11125
+ useSavedViewsSelection
10902
11126
  };
10903
11127
  /*! Bundled license information:
10904
11128