@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,38 +1,12 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __export = (target, all) => {
12
- for (var name in all)
13
- __defProp(target, name, { get: all[name], enumerable: true });
14
- };
15
- var __copyProps = (to, from2, except, desc) => {
16
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
17
- for (let key of __getOwnPropNames(from2))
18
- if (!__hasOwnProp.call(to, key) && key !== except)
19
- __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
20
- }
21
- return to;
22
- };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
31
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+
4
+
5
+ var _chunkQGM4M3NIjs = require('./chunk-QGM4M3NI.js');
32
6
 
33
7
  // node_modules/lodash/lodash.js
34
- var require_lodash = __commonJS({
35
- "node_modules/lodash/lodash.js"(exports2, module2) {
8
+ var require_lodash = _chunkQGM4M3NIjs.__commonJS.call(void 0, {
9
+ "node_modules/lodash/lodash.js"(exports, module) {
36
10
  "use strict";
37
11
  (function() {
38
12
  var undefined2;
@@ -361,8 +335,8 @@ var require_lodash = __commonJS({
361
335
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
362
336
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
363
337
  var root = freeGlobal || freeSelf || Function("return this")();
364
- var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
365
- var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
338
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
339
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
366
340
  var moduleExports = freeModule && freeModule.exports === freeExports;
367
341
  var freeProcess = moduleExports && freeGlobal.process;
368
342
  var nodeUtil = (function() {
@@ -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;
@@ -5527,28 +5501,14 @@ var require_lodash = __commonJS({
5527
5501
  } else {
5528
5502
  root._ = _3;
5529
5503
  }
5530
- }).call(exports2);
5504
+ }).call(exports);
5531
5505
  }
5532
5506
  });
5533
5507
 
5534
- // src/index.ts
5535
- var index_exports = {};
5536
- __export(index_exports, {
5537
- DataTableSavedViews: () => DataTableSavedViews,
5538
- ExpandedPanel: () => ExpandedPanel,
5539
- FormModal: () => FormModal,
5540
- PanelContent: () => PanelContent,
5541
- SavedViewCollectionMenuItem: () => SavedViewCollectionMenuItem,
5542
- SavedViews: () => SavedViews,
5543
- SavedViewsDeleteConfirmationModalShared: () => SavedViewsDeleteConfirmationModalShared,
5544
- SmartGridSavedViews: () => SmartGridSavedViews,
5545
- getTranslations: () => getTranslations,
5546
- useSavedViewsPanel: () => useSavedViewsPanel_default
5547
- });
5548
- module.exports = __toCommonJS(index_exports);
5549
-
5550
5508
  // src/utils/translations/translations.ts
5551
- var import_globalization_toolkit = require("@procore/globalization-toolkit");
5509
+
5510
+
5511
+ var _globalizationtoolkit = require('@procore/globalization-toolkit');
5552
5512
 
5553
5513
  // src/locales/de-DE.json
5554
5514
  var de_DE_default = {
@@ -5557,7 +5517,15 @@ var de_DE_default = {
5557
5517
  title: "Gespeicherte Ansichten",
5558
5518
  tooltip: "Erstellen und speichern Sie ein benutzerdefiniertes Tabellenlayout, um schnell zu Ihrer bevorzugten Ansicht zur\xFCckzukehren.",
5559
5519
  button: {
5560
- 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
+ }
5561
5529
  },
5562
5530
  actions: {
5563
5531
  update: "Aktualisieren",
@@ -5652,7 +5620,15 @@ var en_AU_default = {
5652
5620
  title: "Saved views",
5653
5621
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5654
5622
  button: {
5655
- 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
+ }
5656
5632
  },
5657
5633
  actions: {
5658
5634
  update: "Update",
@@ -5747,7 +5723,15 @@ var en_CA_default = {
5747
5723
  title: "Saved views",
5748
5724
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5749
5725
  button: {
5750
- 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
+ }
5751
5735
  },
5752
5736
  actions: {
5753
5737
  update: "Update",
@@ -5842,7 +5826,15 @@ var en_GB_default = {
5842
5826
  title: "Saved views",
5843
5827
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5844
5828
  button: {
5845
- 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
+ }
5846
5838
  },
5847
5839
  actions: {
5848
5840
  update: "Update",
@@ -5937,7 +5929,15 @@ var en_default = {
5937
5929
  title: "Saved Views",
5938
5930
  tooltip: "Create and save any custom table layout to quickly return to your preferred view.",
5939
5931
  button: {
5940
- 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
+ }
5941
5941
  },
5942
5942
  actions: {
5943
5943
  update: "Update",
@@ -6032,7 +6032,15 @@ var es_ES_default = {
6032
6032
  title: "Vistas guardadas",
6033
6033
  tooltip: "Cree y guarde un dise\xF1o de tabla personalizado para volver r\xE1pidamente a su vista preferida.",
6034
6034
  button: {
6035
- 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
+ }
6036
6044
  },
6037
6045
  actions: {
6038
6046
  update: "Actualizar",
@@ -6064,7 +6072,7 @@ var es_ES_default = {
6064
6072
  fields: {
6065
6073
  name: "Nombre",
6066
6074
  description: "Descripci\xF3n",
6067
- viewLevel: "Ver nivel",
6075
+ viewLevel: "Nivel de vista",
6068
6076
  viewLevels: {
6069
6077
  company: "Vista de la empresa",
6070
6078
  project: "Vista del proyecto",
@@ -6114,7 +6122,7 @@ var es_ES_default = {
6114
6122
  temporaryViewName: "Vista temporal",
6115
6123
  viewLevel: {
6116
6124
  company: "Vistas de la empresa",
6117
- project: "Vistas de proyectos",
6125
+ project: "Vistas del proyecto",
6118
6126
  personal: "Vistas personales"
6119
6127
  }
6120
6128
  }
@@ -6127,7 +6135,15 @@ var es_default = {
6127
6135
  title: "Vistas guardadas",
6128
6136
  tooltip: "Cree y guarde cualquier dise\xF1o de tabla personalizado para volver r\xE1pidamente a su vista preferida.",
6129
6137
  button: {
6130
- 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
+ }
6131
6147
  },
6132
6148
  actions: {
6133
6149
  update: "Actualizar",
@@ -6222,7 +6238,15 @@ var fr_CA_default = {
6222
6238
  title: "Affichages sauvegard\xE9s",
6223
6239
  tooltip: "Cr\xE9ez et sauvegardez n'importe quelle disposition de tableau personnalis\xE9e pour revenir rapidement \xE0 votre affichage pr\xE9f\xE9r\xE9.",
6224
6240
  button: {
6225
- 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
+ }
6226
6250
  },
6227
6251
  actions: {
6228
6252
  update: "Mettre \xE0 jour",
@@ -6249,7 +6273,7 @@ var fr_CA_default = {
6249
6273
  description: "Cet affichage ne peut pas \xEAtre restaur\xE9 une fois qu'il a \xE9t\xE9 supprim\xE9."
6250
6274
  },
6251
6275
  copyConfirmation: {
6252
- 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."
6253
6277
  },
6254
6278
  fields: {
6255
6279
  name: "Nom",
@@ -6264,9 +6288,9 @@ var fr_CA_default = {
6264
6288
  errors: {
6265
6289
  maxLengthName: "Ne peut pas contenir plus de {{maxLength}}\xA0caract\xE8res.",
6266
6290
  required: "Ne peut pas \xEAtre vide.",
6267
- 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.",
6268
6292
  unknown: "Une erreur s'est produite. Veuillez r\xE9essayer.",
6269
- 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",
6270
6294
  description: {
6271
6295
  create: "Veuillez corriger les erreurs ci-dessous et r\xE9essayer de le cr\xE9er",
6272
6296
  update: "Veuillez corriger les erreurs ci-dessous et r\xE9essayer de le mettre \xE0 jour"
@@ -6277,8 +6301,8 @@ var fr_CA_default = {
6277
6301
  }
6278
6302
  },
6279
6303
  ariaLabels: {
6280
- menuItem: "\xC9l\xE9ment de menu Affichages enregistr\xE9s {{name}}",
6281
- 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"
6282
6306
  },
6283
6307
  update: {
6284
6308
  success: "L'affichage sauvegard\xE9 a bien \xE9t\xE9 mis \xE0 jour."
@@ -6290,12 +6314,12 @@ var fr_CA_default = {
6290
6314
  success: "Le lien a \xE9t\xE9 cr\xE9\xE9 et copi\xE9 dans le presse-papiers."
6291
6315
  },
6292
6316
  errors: {
6293
- fetch: "D\xE9sol\xE9, les affichages enregistr\xE9s n'ont pas pu \xEAtre r\xE9cup\xE9r\xE9s. Veuillez r\xE9essayer.",
6294
- create: "D\xE9sol\xE9, l'affichage enregistr\xE9 n'a pas pu \xEAtre cr\xE9\xE9. Veuillez r\xE9essayer.",
6295
- update: "D\xE9sol\xE9, l'affichage enregistr\xE9 n'a pas pu \xEAtre mis \xE0 jour. Veuillez r\xE9essayer.",
6296
- 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.",
6297
6321
  copyFailed: "Impossible de copier le lien de partage dans le presse-papiers.",
6298
- 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."
6299
6323
  },
6300
6324
  defaultViewTitle: {
6301
6325
  rfi: "Toutes les QRT",
@@ -6317,7 +6341,15 @@ var fr_FR_default = {
6317
6341
  title: "Vues enregistr\xE9es",
6318
6342
  tooltip: "Cr\xE9ez et enregistrez n'importe quelle disposition de tableau personnalis\xE9e pour revenir rapidement \xE0 votre vue pr\xE9f\xE9r\xE9e.",
6319
6343
  button: {
6320
- 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
+ }
6321
6353
  },
6322
6354
  actions: {
6323
6355
  update: "Mettre \xE0 jour",
@@ -6412,7 +6444,15 @@ var is_IS_default = {
6412
6444
  title: "Vista\xF0ar sko\xF0anir",
6413
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.",
6414
6446
  button: {
6415
- 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
+ }
6416
6456
  },
6417
6457
  actions: {
6418
6458
  update: "Uppf\xE6rsla",
@@ -6507,7 +6547,15 @@ var it_IT_default = {
6507
6547
  title: "Viste salvate",
6508
6548
  tooltip: "Creare e salvare qualsiasi layout di tabella personalizzato per tornare rapidamente alla vista preferita.",
6509
6549
  button: {
6510
- 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
+ }
6511
6559
  },
6512
6560
  actions: {
6513
6561
  update: "Aggiorna",
@@ -6602,7 +6650,15 @@ var ja_JP_default = {
6602
6650
  title: "\u4FDD\u5B58\u6E08\u307F\u30D3\u30E5\u30FC",
6603
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",
6604
6652
  button: {
6605
- 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
+ }
6606
6662
  },
6607
6663
  actions: {
6608
6664
  update: "\u66F4\u65B0",
@@ -6697,7 +6753,15 @@ var pl_PL_default = {
6697
6753
  title: "Zapisane widoki",
6698
6754
  tooltip: "Utw\xF3rz i zapisz dowolny uk\u0142ad niestandardowej tabeli, aby szybko wr\xF3ci\u0107 do preferowanego widoku.",
6699
6755
  button: {
6700
- 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
+ }
6701
6765
  },
6702
6766
  actions: {
6703
6767
  update: "Zaktualizuj",
@@ -6792,7 +6856,15 @@ var pt_BR_default = {
6792
6856
  title: "Visualiza\xE7\xF5es Salvas",
6793
6857
  tooltip: "Crie e salve qualquer layout personalizado de tabela para retornar rapidamente \xE0 sua visualiza\xE7\xE3o preferida.",
6794
6858
  button: {
6795
- 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
+ }
6796
6868
  },
6797
6869
  actions: {
6798
6870
  update: "Atualizar",
@@ -6887,7 +6959,15 @@ var th_TH_default = {
6887
6959
  title: "\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E27\u0E49",
6888
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",
6889
6961
  button: {
6890
- 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
+ }
6891
6971
  },
6892
6972
  actions: {
6893
6973
  update: "\u0E2D\u0E31\u0E1B\u0E40\u0E14\u0E15",
@@ -6982,7 +7062,15 @@ var zh_SG_default = {
6982
7062
  title: "\u5DF2\u4FDD\u5B58\u89C6\u56FE",
6983
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",
6984
7064
  button: {
6985
- 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
+ }
6986
7074
  },
6987
7075
  actions: {
6988
7076
  update: "\u66F4\u65B0",
@@ -7097,15 +7185,15 @@ var supportedLocales = {
7097
7185
  };
7098
7186
  function getTranslations(envLocale) {
7099
7187
  return Object.fromEntries(
7100
- (0, import_globalization_toolkit.getFallbackLocaleList)(envLocale).map((locale) => [
7188
+ _globalizationtoolkit.getFallbackLocaleList.call(void 0, envLocale).map((locale) => [
7101
7189
  locale,
7102
- supportedLocales[locale] ?? {}
7190
+ _nullishCoalesce(supportedLocales[locale], () => ( {}))
7103
7191
  ])
7104
7192
  );
7105
7193
  }
7106
7194
 
7107
7195
  // src/components/buttons/useSavedViewsPanel.tsx
7108
- var import_react4 = require("react");
7196
+ var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react); var React6 = _interopRequireWildcard(_react); var React7 = _interopRequireWildcard(_react); var React8 = _interopRequireWildcard(_react); var React9 = _interopRequireWildcard(_react); var React10 = _interopRequireWildcard(_react); var React11 = _interopRequireWildcard(_react); var React17 = _interopRequireWildcard(_react); var React22 = _interopRequireWildcard(_react); var React21 = _interopRequireWildcard(_react); var React24 = _interopRequireWildcard(_react);
7109
7197
 
7110
7198
  // ../../node_modules/tslib/tslib.es6.mjs
7111
7199
  var __assign = function() {
@@ -7140,7 +7228,7 @@ function __spreadArray(to, from2, pack) {
7140
7228
  }
7141
7229
 
7142
7230
  // ../../node_modules/@procore/core-icons/dist/Icon.js
7143
- var React = __toESM(require("react"));
7231
+
7144
7232
  function getSize(size) {
7145
7233
  if (size === "sm") {
7146
7234
  return 16;
@@ -7159,7 +7247,7 @@ function Icon(_a) {
7159
7247
  }
7160
7248
 
7161
7249
  // ../../node_modules/@procore/core-icons/dist/icons/Building.js
7162
- var React2 = __toESM(require("react"));
7250
+
7163
7251
  var Building = React2.forwardRef(function Building2(props, ref) {
7164
7252
  return React2.createElement(
7165
7253
  Icon,
@@ -7175,7 +7263,7 @@ Building.displayName = "Building";
7175
7263
  var Building_default = Building;
7176
7264
 
7177
7265
  // ../../node_modules/@procore/core-icons/dist/icons/ChevronDown.js
7178
- var React3 = __toESM(require("react"));
7266
+
7179
7267
  var ChevronDown = React3.forwardRef(function ChevronDown2(props, ref) {
7180
7268
  return React3.createElement(
7181
7269
  Icon,
@@ -7191,7 +7279,7 @@ ChevronDown.displayName = "ChevronDown";
7191
7279
  var ChevronDown_default = ChevronDown;
7192
7280
 
7193
7281
  // ../../node_modules/@procore/core-icons/dist/icons/ChevronRight.js
7194
- var React4 = __toESM(require("react"));
7282
+
7195
7283
  var ChevronRight = React4.forwardRef(function ChevronRight2(props, ref) {
7196
7284
  return React4.createElement(
7197
7285
  Icon,
@@ -7207,7 +7295,7 @@ ChevronRight.displayName = "ChevronRight";
7207
7295
  var ChevronRight_default = ChevronRight;
7208
7296
 
7209
7297
  // ../../node_modules/@procore/core-icons/dist/icons/Clear.js
7210
- var React5 = __toESM(require("react"));
7298
+
7211
7299
  var Clear = React5.forwardRef(function Clear2(props, ref) {
7212
7300
  return React5.createElement(
7213
7301
  Icon,
@@ -7223,7 +7311,7 @@ Clear.displayName = "Clear";
7223
7311
  var Clear_default = Clear;
7224
7312
 
7225
7313
  // ../../node_modules/@procore/core-icons/dist/icons/Excavator.js
7226
- var React6 = __toESM(require("react"));
7314
+
7227
7315
  var Excavator = React6.forwardRef(function Excavator2(props, ref) {
7228
7316
  return React6.createElement(
7229
7317
  Icon,
@@ -7240,7 +7328,7 @@ Excavator.displayName = "Excavator";
7240
7328
  var Excavator_default = Excavator;
7241
7329
 
7242
7330
  // ../../node_modules/@procore/core-icons/dist/icons/ExpandSidebar.js
7243
- var React7 = __toESM(require("react"));
7331
+
7244
7332
  var ExpandSidebar = React7.forwardRef(function ExpandSidebar2(props, ref) {
7245
7333
  return React7.createElement(
7246
7334
  Icon,
@@ -7258,7 +7346,7 @@ ExpandSidebar.displayName = "ExpandSidebar";
7258
7346
  var ExpandSidebar_default = ExpandSidebar;
7259
7347
 
7260
7348
  // ../../node_modules/@procore/core-icons/dist/icons/Help.js
7261
- var React8 = __toESM(require("react"));
7349
+
7262
7350
  var Help = React8.forwardRef(function Help2(props, ref) {
7263
7351
  return React8.createElement(
7264
7352
  Icon,
@@ -7274,7 +7362,7 @@ Help.displayName = "Help";
7274
7362
  var Help_default = Help;
7275
7363
 
7276
7364
  // ../../node_modules/@procore/core-icons/dist/icons/Link.js
7277
- var React9 = __toESM(require("react"));
7365
+
7278
7366
  var Link = React9.forwardRef(function Link2(props, ref) {
7279
7367
  return React9.createElement(
7280
7368
  Icon,
@@ -7291,7 +7379,7 @@ Link.displayName = "Link";
7291
7379
  var Link_default = Link;
7292
7380
 
7293
7381
  // ../../node_modules/@procore/core-icons/dist/icons/Person.js
7294
- var React10 = __toESM(require("react"));
7382
+
7295
7383
  var Person = React10.forwardRef(function Person2(props, ref) {
7296
7384
  return React10.createElement(
7297
7385
  Icon,
@@ -7307,7 +7395,7 @@ Person.displayName = "Person";
7307
7395
  var Person_default = Person;
7308
7396
 
7309
7397
  // ../../node_modules/@procore/core-icons/dist/icons/Plus.js
7310
- var React11 = __toESM(require("react"));
7398
+
7311
7399
  var Plus = React11.forwardRef(function Plus2(props, ref) {
7312
7400
  return React11.createElement(
7313
7401
  Icon,
@@ -7323,8 +7411,8 @@ Plus.displayName = "Plus";
7323
7411
  var Plus_default = Plus;
7324
7412
 
7325
7413
  // src/components/buttons/SavedViewsButton.tsx
7326
- var import_core_react2 = require("@procore/core-react");
7327
- var import_react3 = __toESM(require("react"));
7414
+ var _corereact = require('@procore/core-react');
7415
+
7328
7416
 
7329
7417
  // ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
7330
7418
  function memoize(fn) {
@@ -7345,7 +7433,7 @@ var isPropValid = /* @__PURE__ */ memoize(
7345
7433
  );
7346
7434
 
7347
7435
  // ../../node_modules/styled-components/dist/styled-components.esm.js
7348
- var import_react = __toESM(require("react"));
7436
+
7349
7437
 
7350
7438
  // ../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
7351
7439
  var unitlessKeys = {
@@ -8025,7 +8113,7 @@ var u = "data-styled-version";
8025
8113
  var l = "6.3.12";
8026
8114
  var p = "/*!sc*/\n";
8027
8115
  var d = "undefined" != typeof window && "undefined" != typeof document;
8028
- var h = void 0 === import_react.default.createContext;
8116
+ var h = void 0 === React.default.createContext;
8029
8117
  var f = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV);
8030
8118
  var y = "production" !== process.env.NODE_ENV ? { 1: "Cannot create styled-component for component: %s.\n\n", 2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", 3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", 4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", 5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", 6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: 'ThemeProvider: Please make your "theme" prop an object.\n\n', 9: "Missing document `<head>`\n\n", 10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", 11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", 14: 'ThemeProvider: "theme" prop is required.\n\n', 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", 17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n", 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
8031
8119
  function v() {
@@ -8064,7 +8152,7 @@ var I = function(t, n) {
8064
8152
  console.error = function(t2) {
8065
8153
  for (var n2 = [], r2 = 1; r2 < arguments.length; r2++) n2[r2 - 1] = arguments[r2];
8066
8154
  _.test(t2) ? (a2 = false, A.delete(s)) : i.apply(void 0, __spreadArray([t2], n2, false));
8067
- }, "function" == typeof import_react.default.useState && import_react.default.useState(null), a2 && !A.has(s) && (console.warn(s), A.add(s));
8155
+ }, "function" == typeof React.default.useState && React.default.useState(null), a2 && !A.has(s) && (console.warn(s), A.add(s));
8068
8156
  } catch (e) {
8069
8157
  _.test(e.message) && A.delete(s);
8070
8158
  } finally {
@@ -8549,33 +8637,33 @@ var Ue = h ? { Provider: function(e) {
8549
8637
  return e.children;
8550
8638
  }, Consumer: function(e) {
8551
8639
  return (0, e.children)(He);
8552
- } } : import_react.default.createContext(He);
8640
+ } } : React.default.createContext(He);
8553
8641
  var Je = Ue.Consumer;
8554
8642
  var Xe = h ? { Provider: function(e) {
8555
8643
  return e.children;
8556
8644
  }, Consumer: function(e) {
8557
8645
  return (0, e.children)(void 0);
8558
- } } : import_react.default.createContext(void 0);
8646
+ } } : React.default.createContext(void 0);
8559
8647
  function Ze() {
8560
- return h ? He : import_react.default.useContext(Ue);
8648
+ return h ? He : React.default.useContext(Ue);
8561
8649
  }
8562
8650
  function Ke(e) {
8563
- if (h || !import_react.default.useMemo) return e.children;
8564
- var t = Ze().styleSheet, n = import_react.default.useMemo(function() {
8651
+ if (h || !React.default.useMemo) return e.children;
8652
+ var t = Ze().styleSheet, n = React.default.useMemo(function() {
8565
8653
  var n2 = t;
8566
8654
  return e.sheet ? n2 = e.sheet : e.target && (n2 = n2.reconstructWithOptions({ target: e.target }, false)), e.disableCSSOMInjection && (n2 = n2.reconstructWithOptions({ useCSSOMInjection: false })), n2;
8567
- }, [e.disableCSSOMInjection, e.sheet, e.target, t]), o2 = import_react.default.useMemo(function() {
8655
+ }, [e.disableCSSOMInjection, e.sheet, e.target, t]), o2 = React.default.useMemo(function() {
8568
8656
  return Ye({ options: { namespace: e.namespace, prefix: e.enableVendorPrefixes }, plugins: e.stylisPlugins });
8569
- }, [e.enableVendorPrefixes, e.namespace, e.stylisPlugins]), s = import_react.default.useMemo(function() {
8657
+ }, [e.enableVendorPrefixes, e.namespace, e.stylisPlugins]), s = React.default.useMemo(function() {
8570
8658
  return { shouldForwardProp: e.shouldForwardProp, styleSheet: n, stylis: o2 };
8571
8659
  }, [e.shouldForwardProp, n, o2]);
8572
- return import_react.default.createElement(Ue.Provider, { value: s }, import_react.default.createElement(Xe.Provider, { value: o2 }, e.children));
8660
+ return React.default.createElement(Ue.Provider, { value: s }, React.default.createElement(Xe.Provider, { value: o2 }, e.children));
8573
8661
  }
8574
8662
  var Qe = h ? { Provider: function(e) {
8575
8663
  return e.children;
8576
8664
  }, Consumer: function(e) {
8577
8665
  return (0, e.children)(void 0);
8578
- } } : import_react.default.createContext(void 0);
8666
+ } } : React.default.createContext(void 0);
8579
8667
  var et = Qe.Consumer;
8580
8668
  var rt = {};
8581
8669
  var ot = /* @__PURE__ */ new Set();
@@ -8600,8 +8688,8 @@ function st(s, i, a2) {
8600
8688
  var _3 = new Fe(a2, S2, c2 ? u2.componentStyle : void 0);
8601
8689
  function A2(s2, i2) {
8602
8690
  return (function(s3, i3, a3) {
8603
- var c3 = s3.attrs, u3 = s3.componentStyle, l2 = s3.defaultProps, p3 = s3.foldedComponentIds, d3 = s3.styledComponentId, f3 = s3.target, m2 = h ? void 0 : import_react.default.useContext(Qe), y3 = Ze(), v3 = s3.shouldForwardProp || y3.shouldForwardProp;
8604
- "production" !== process.env.NODE_ENV && import_react.default.useDebugValue && import_react.default.useDebugValue(d3);
8691
+ var c3 = s3.attrs, u3 = s3.componentStyle, l2 = s3.defaultProps, p3 = s3.foldedComponentIds, d3 = s3.styledComponentId, f3 = s3.target, m2 = h ? void 0 : React.default.useContext(Qe), y3 = Ze(), v3 = s3.shouldForwardProp || y3.shouldForwardProp;
8692
+ "production" !== process.env.NODE_ENV && React.default.useDebugValue && React.default.useDebugValue(d3);
8605
8693
  var g3 = D(i3, m2, l2) || (h ? void 0 : O), S3 = (function(e, n, r2) {
8606
8694
  for (var o2, s4 = __assign(__assign({}, n), { className: void 0, theme: r2 }), i4 = 0; i4 < e.length; i4 += 1) {
8607
8695
  var a4 = se(o2 = e[i4]) ? o2(s4) : o2;
@@ -8612,12 +8700,12 @@ function st(s, i, a2) {
8612
8700
  for (var N3 in S3) void 0 === S3[N3] || "$" === N3[0] || "as" === N3 || "theme" === N3 && S3.theme === g3 || ("forwardedAs" === N3 ? b3.as = S3.forwardedAs : v3 && !v3(N3, w3) || (b3[N3] = S3[N3], v3 || "development" !== process.env.NODE_ENV || isPropValid(N3) || ot.has(N3) || !T.has(w3) || (ot.add(N3), console.warn('styled-components: it looks like an unknown prop "'.concat(N3, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
8613
8701
  var E3 = (function(e, t) {
8614
8702
  var n = Ze(), o2 = e.generateAndInjectStyles(t, n.styleSheet, n.stylis);
8615
- return "production" !== process.env.NODE_ENV && import_react.default.useDebugValue && import_react.default.useDebugValue(o2.className), o2;
8703
+ return "production" !== process.env.NODE_ENV && React.default.useDebugValue && React.default.useDebugValue(o2.className), o2;
8616
8704
  })(u3, S3), _4 = E3.className;
8617
8705
  "production" !== process.env.NODE_ENV && s3.warnTooManyClasses && s3.warnTooManyClasses(_4);
8618
8706
  var A3 = ae(p3, d3);
8619
8707
  _4 && (A3 += " " + _4), S3.className && (A3 += " " + S3.className), b3[$(w3) && !T.has(w3) ? "class" : "className"] = A3, a3 && (b3.ref = a3);
8620
- var I2 = (0, import_react.createElement)(w3, b3);
8708
+ var I2 = _react.createElement.call(void 0, w3, b3);
8621
8709
  if (h) {
8622
8710
  for (var P4 = [], R3 = u3, x2 = function() {
8623
8711
  var e = y3.styleSheet.getTag().getGroup(C(R3.componentId));
@@ -8625,17 +8713,17 @@ function st(s, i, a2) {
8625
8713
  var t = "", n = y3.styleSheet.names.get(R3.componentId);
8626
8714
  n && n.forEach(function(e2) {
8627
8715
  t && (t += "_"), t += e2;
8628
- }), P4.push(import_react.default.createElement("style", { key: "sc-".concat(R3.componentId), precedence: "styled-components", href: "sc-".concat(R3.componentId, "-").concat(t), children: e }));
8716
+ }), P4.push(React.default.createElement("style", { key: "sc-".concat(R3.componentId), precedence: "styled-components", href: "sc-".concat(R3.componentId, "-").concat(t), children: e }));
8629
8717
  }
8630
8718
  R3 = R3.baseStyle;
8631
8719
  }; R3; ) x2();
8632
- if (P4.length) return P4.reverse(), import_react.default.createElement.apply(import_react.default, __spreadArray(__spreadArray([import_react.default.Fragment, null], P4, false), [I2], false));
8720
+ if (P4.length) return P4.reverse(), React.default.createElement.apply(React.default, __spreadArray(__spreadArray([React.default.Fragment, null], P4, false), [I2], false));
8633
8721
  }
8634
8722
  return I2;
8635
8723
  })(R2, s2, i2);
8636
8724
  }
8637
8725
  A2.displayName = g2;
8638
- var R2 = import_react.default.forwardRef(A2);
8726
+ var R2 = React.default.forwardRef(A2);
8639
8727
  return R2.attrs = w2, R2.componentStyle = _3, R2.displayName = g2, R2.shouldForwardProp = b2, R2.foldedComponentIds = c2 ? ae(u2.foldedComponentIds, u2.styledComponentId) : "", R2.styledComponentId = S2, R2.target = c2 ? u2.target : s, Object.defineProperty(R2, "defaultProps", { get: function() {
8640
8728
  return this._foldedDefaultProps;
8641
8729
  }, set: function(e) {
@@ -8738,18 +8826,18 @@ var St = (function() {
8738
8826
  var o2 = e2.instance.toString();
8739
8827
  if (!o2) return [];
8740
8828
  var s = ((n = {})[a] = "", n[u] = l, n.dangerouslySetInnerHTML = { __html: o2 }, n), i = we();
8741
- return i && (s.nonce = i), [import_react.default.createElement("style", __assign({}, s, { key: "sc-0-0" }))];
8829
+ return i && (s.nonce = i), [React.default.createElement("style", __assign({}, s, { key: "sc-0-0" }))];
8742
8830
  }, this.seal = function() {
8743
8831
  e2.sealed = true;
8744
8832
  }, this.instance = new Ie({ isServer: true }), this.sealed = false;
8745
8833
  }
8746
8834
  return e.prototype.collectStyles = function(e2) {
8747
8835
  if (this.sealed) throw g(2);
8748
- return import_react.default.createElement(Ke, { sheet: this.instance }, e2);
8836
+ return React.default.createElement(Ke, { sheet: this.instance }, e2);
8749
8837
  }, e.prototype.interleaveWithNodeStream = function(e2) {
8750
8838
  if (this.sealed) throw g(2);
8751
8839
  this.seal();
8752
- var t = require("stream").Transform, n = this.instance, r2 = this._emitSheetCSS, o2 = new t({ transform: function(e3, t2, o3) {
8840
+ var t = _chunkQGM4M3NIjs.__require.call(void 0, "stream").Transform, n = this.instance, r2 = this._emitSheetCSS, o2 = new t({ transform: function(e3, t2, o3) {
8753
8841
  var s2 = e3.toString(), i = r2();
8754
8842
  if (n.clearTag(), gt.test(s2)) {
8755
8843
  var a2 = s2.indexOf(">") + 1, c2 = s2.slice(0, a2), u2 = s2.slice(a2);
@@ -8772,8 +8860,8 @@ var bt = "__sc-".concat(a, "__");
8772
8860
  "production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window[bt] || (window[bt] = 0), 1 === window[bt] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."), window[bt] += 1);
8773
8861
 
8774
8862
  // src/components/EnvironmentI18nProvider.tsx
8775
- var import_react2 = __toESM(require("react"));
8776
- var import_core_react = require("@procore/core-react");
8863
+
8864
+
8777
8865
 
8778
8866
  // src/utils/translations/translationCache.ts
8779
8867
  var CACHE_KEY_PREFIX = "sg-saved-views-translations";
@@ -8785,26 +8873,26 @@ function readCache(locale) {
8785
8873
  const raw = localStorage.getItem(cacheKey(locale));
8786
8874
  if (!raw) return null;
8787
8875
  return JSON.parse(raw);
8788
- } catch {
8876
+ } catch (e5) {
8789
8877
  return null;
8790
8878
  }
8791
8879
  }
8792
8880
  function writeCache(locale, translations) {
8793
8881
  try {
8794
8882
  localStorage.setItem(cacheKey(locale), JSON.stringify(translations));
8795
- } catch {
8883
+ } catch (e6) {
8796
8884
  }
8797
8885
  }
8798
8886
 
8799
8887
  // src/components/EnvironmentI18nProvider.tsx
8800
- var import_cdn_translations = require("@procore/cdn-translations");
8888
+ var _cdntranslations = require('@procore/cdn-translations');
8801
8889
  var useCDNTranslations = () => {
8802
- const i18n = (0, import_core_react.useI18nContext)();
8803
- const cachedTranslations = (0, import_react2.useMemo)(
8890
+ const i18n = _corereact.useI18nContext.call(void 0, );
8891
+ const cachedTranslations = _react.useMemo.call(void 0,
8804
8892
  () => readCache(i18n.locale),
8805
8893
  [i18n.locale]
8806
8894
  );
8807
- const cdnTranslations = (0, import_cdn_translations.useRequestTranslations)(
8895
+ const cdnTranslations = _cdntranslations.useRequestTranslations.call(void 0,
8808
8896
  {
8809
8897
  type: "file",
8810
8898
  locale: i18n.locale,
@@ -8818,7 +8906,7 @@ var useCDNTranslations = () => {
8818
8906
  enableCDN: i18n.enableCDN
8819
8907
  }
8820
8908
  );
8821
- (0, import_react2.useEffect)(() => {
8909
+ _react.useEffect.call(void 0, () => {
8822
8910
  if (cdnTranslations.status === "resolved" && cdnTranslations.translations) {
8823
8911
  writeCache(
8824
8912
  i18n.locale,
@@ -8826,16 +8914,41 @@ var useCDNTranslations = () => {
8826
8914
  );
8827
8915
  }
8828
8916
  }, [cdnTranslations.status, cdnTranslations.translations, i18n.locale]);
8829
- const translationsToUse = cdnTranslations.status === "resolved" ? cdnTranslations.translations : cachedTranslations ?? getTranslations(i18n.locale);
8830
- return (0, import_core_react.useI18n)({
8917
+ const translationsToUse = cdnTranslations.status === "resolved" ? cdnTranslations.translations : _nullishCoalesce(cachedTranslations, () => ( getTranslations(i18n.locale)));
8918
+ return _corereact.useI18n.call(void 0, {
8831
8919
  translations: translationsToUse,
8832
8920
  locale: i18n.locale
8833
8921
  });
8834
8922
  };
8835
8923
  var EnvironmentI18nProvider = ({ children }) => {
8836
8924
  const i18n = useCDNTranslations();
8837
- return /* @__PURE__ */ import_react2.default.createElement(import_core_react.I18nContext.Provider, { value: i18n }, children);
8925
+ return /* @__PURE__ */ React.default.createElement(_corereact.I18nContext.Provider, { value: i18n }, children);
8926
+ };
8927
+
8928
+ // src/components/buttons/SavedViewsSelectionContext.tsx
8929
+
8930
+
8931
+
8932
+
8933
+
8934
+
8935
+
8936
+ var SavedViewsSelectionContext = _react.createContext.call(void 0, null);
8937
+ var SavedViewsSelectionProvider = ({
8938
+ children
8939
+ }) => {
8940
+ const [selectedView, setSelectedView] = _react.useState.call(void 0, null);
8941
+ const updateSelectedView = _react.useCallback.call(void 0,
8942
+ (view) => setSelectedView(view),
8943
+ []
8944
+ );
8945
+ const value = _react.useMemo.call(void 0,
8946
+ () => ({ selectedView, setSelectedView: updateSelectedView }),
8947
+ [selectedView, updateSelectedView]
8948
+ );
8949
+ return /* @__PURE__ */ React.default.createElement(SavedViewsSelectionContext.Provider, { value }, children);
8838
8950
  };
8951
+ var useSavedViewsSelection = () => _react.useContext.call(void 0, SavedViewsSelectionContext);
8839
8952
 
8840
8953
  // src/components/buttons/SavedViewsButton.tsx
8841
8954
  var StyledIcon = pt(ExpandSidebar_default)`
@@ -8846,45 +8959,100 @@ var Container = pt.div`
8846
8959
  border-right: 2px solid #d6dadc;
8847
8960
  padding-right: 8px;
8848
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
+ `;
8849
8970
  var SavedViewsButton = ({
8850
8971
  handleClick,
8851
8972
  isOpen
8852
8973
  }) => {
8853
8974
  const I18n = useCDNTranslations();
8854
- return /* @__PURE__ */ import_react3.default.createElement(Container, null, /* @__PURE__ */ import_react3.default.createElement(
8855
- import_core_react2.ToggleButton,
8975
+ const selection = useSavedViewsSelection();
8976
+ const activeView = selection == null ? void 0 : selection.selectedView;
8977
+ const activeName = activeView == null ? void 0 : activeView.name;
8978
+ const activeType = (activeView == null ? void 0 : 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__ */ React.default.createElement(
8984
+ _corereact.ToggleButton,
8856
8985
  {
8857
8986
  selected: isOpen,
8858
8987
  onClick: handleClick,
8859
- icon: /* @__PURE__ */ import_react3.default.createElement(StyledIcon, { left: isOpen }),
8988
+ icon: /* @__PURE__ */ React.default.createElement(StyledIcon, { left: isOpen }),
8860
8989
  "data-testid": "saved-views-button",
8861
- "aria-controls": "saved-views-panel"
8990
+ "aria-controls": "saved-views-panel",
8991
+ "aria-label": label
8862
8992
  },
8863
- I18n.t("savedViews.button.title")
8864
- ));
8993
+ /* @__PURE__ */ React.default.createElement(Label, null, label)
8994
+ );
8995
+ return /* @__PURE__ */ React.default.createElement(Container, null, activeName ? /* @__PURE__ */ React.default.createElement(
8996
+ _corereact.Tooltip,
8997
+ {
8998
+ showDelay: 500,
8999
+ overlay: /* @__PURE__ */ React.default.createElement(_corereact.Tooltip.Content, null, label)
9000
+ },
9001
+ button
9002
+ ) : button);
8865
9003
  };
8866
9004
 
8867
9005
  // src/components/buttons/useSavedViewsPanel.tsx
8868
- var import_react5 = __toESM(require("react"));
9006
+
8869
9007
  var useSavedViewsPanel = (domain, tableName) => {
8870
9008
  const key = (domain2, tableName2) => `savedViewsPanel-${domain2}-${tableName2}`;
8871
- const [isOpen, setIsOpen] = (0, import_react4.useState)(
9009
+ const [isOpen, setIsOpen] = _react.useState.call(void 0,
8872
9010
  localStorage.getItem(key(domain, tableName)) === null || localStorage.getItem(key(domain, tableName)) === "true"
8873
9011
  );
8874
9012
  const handleClick = () => {
8875
9013
  setIsOpen(!isOpen);
8876
9014
  localStorage.setItem(key(domain, tableName), JSON.stringify(!isOpen));
8877
9015
  };
8878
- const Button7 = () => /* @__PURE__ */ import_react5.default.createElement(SavedViewsButton, { handleClick, isOpen });
8879
- return { isOpen, SavedViewsButton: Button7 };
9016
+ const Button7 = () => /* @__PURE__ */ React.default.createElement(SavedViewsButton, { handleClick, isOpen });
9017
+ return {
9018
+ isOpen,
9019
+ SavedViewsButton: Button7,
9020
+ SavedViewsProvider: SavedViewsSelectionProvider
9021
+ };
8880
9022
  };
8881
9023
  var useSavedViewsPanel_default = useSavedViewsPanel;
8882
9024
 
8883
9025
  // src/components/menu-items/SavedViewsCollectionsMenuItem.tsx
8884
- var import_core_react3 = require("@procore/core-react");
8885
- var React15 = __toESM(require("react"));
8886
- var import_toast_alert = require("@procore/toast-alert");
8887
- var RowActionsBox = pt(import_core_react3.Flex)`
9026
+
9027
+
9028
+
9029
+
9030
+
9031
+
9032
+
9033
+
9034
+ var _toastalert = require('@procore/toast-alert');
9035
+
9036
+ // src/transport/context.tsx
9037
+
9038
+ var SavedViewsTransportContext = _react.createContext.call(void 0, void 0);
9039
+ var SavedViewsTransportProvider = ({
9040
+ transport,
9041
+ children
9042
+ }) => /* @__PURE__ */ React.default.createElement(SavedViewsTransportContext.Provider, { value: transport }, children);
9043
+ var useSavedViewsTransport = () => {
9044
+ const transport = _react.useContext.call(void 0, 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 = () => _react.useContext.call(void 0, SavedViewsTransportContext);
9053
+
9054
+ // src/components/menu-items/SavedViewsCollectionsMenuItem.tsx
9055
+ var RowActionsBox = pt(_corereact.Flex)`
8888
9056
  justify-content: center;
8889
9057
  align-items: center;
8890
9058
 
@@ -8892,7 +9060,7 @@ var RowActionsBox = pt(import_core_react3.Flex)`
8892
9060
  margin-right: 8px;
8893
9061
  }
8894
9062
  `;
8895
- var Container2 = pt(import_core_react3.Flex)`
9063
+ var Container2 = pt(_corereact.Flex)`
8896
9064
  overflow-wrap: anywhere;
8897
9065
  min-height: 24px;
8898
9066
 
@@ -8904,7 +9072,7 @@ var IconWrapper = pt.span`
8904
9072
  justify-content: center;
8905
9073
  `;
8906
9074
  var SavedViewCollectionMenuItem = (props) => {
8907
- const onClick = React15.useCallback(
9075
+ const onClick = React17.useCallback(
8908
9076
  (a2) => {
8909
9077
  var _a, _b;
8910
9078
  if (!props.item) {
@@ -8928,8 +9096,10 @@ var SavedViewCollectionMenuItem = (props) => {
8928
9096
  event.stopPropagation();
8929
9097
  (_a = props.onUpdate) == null ? void 0 : _a.call(props, props.item);
8930
9098
  };
8931
- const { showToast } = (0, import_toast_alert.useToastAlertContext)();
8932
- const i18n = (0, import_core_react3.useI18nContext)();
9099
+ const { showToast } = _toastalert.useToastAlertContext.call(void 0, );
9100
+ const i18n = _corereact.useI18nContext.call(void 0, );
9101
+ const transport = useOptionalSavedViewsTransport();
9102
+ const canShareViaUrl = (transport == null ? void 0 : transport.supportsUrlSharing) !== false;
8933
9103
  const copyShareLink = async (event) => {
8934
9104
  event.stopPropagation();
8935
9105
  try {
@@ -8952,18 +9122,18 @@ var SavedViewCollectionMenuItem = (props) => {
8952
9122
  label: i18n.t("savedViews.actions.delete")
8953
9123
  }
8954
9124
  ];
8955
- const preventEventBubbleToNotTriggerViewSelectEvent = React15.useCallback(
9125
+ const preventEventBubbleToNotTriggerViewSelectEvent = React17.useCallback(
8956
9126
  (e) => {
8957
9127
  e.stopPropagation();
8958
9128
  },
8959
9129
  []
8960
9130
  );
8961
9131
  const hasUpdateButton = props.item.view_level !== "default" && props.canUpdate;
8962
- const hasCopyShareLinkButton = props.item.view_level !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary";
9132
+ const hasCopyShareLinkButton = canShareViaUrl && props.item.view_level !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary";
8963
9133
  const hasClearTemporaryButton = props.item.id === "temporary";
8964
9134
  const hasOverflowMenu = props.item.view_level !== "default" && props.canEditOrDelete;
8965
9135
  const hasActions = hasUpdateButton || hasCopyShareLinkButton || hasClearTemporaryButton || hasOverflowMenu;
8966
- return /* @__PURE__ */ React15.createElement(
9136
+ return /* @__PURE__ */ React17.createElement(
8967
9137
  Container2,
8968
9138
  {
8969
9139
  "aria-selected": Boolean(props.selected),
@@ -8975,7 +9145,7 @@ var SavedViewCollectionMenuItem = (props) => {
8975
9145
  "data-testid": "saved-view-collection-menu-item",
8976
9146
  onKeyDown: preventEventBubbleToNotTriggerViewSelectEvent
8977
9147
  },
8978
- /* @__PURE__ */ React15.createElement(
9148
+ /* @__PURE__ */ React17.createElement(
8979
9149
  "span",
8980
9150
  {
8981
9151
  "data-testid": "saved-view-display-name",
@@ -8983,8 +9153,8 @@ var SavedViewCollectionMenuItem = (props) => {
8983
9153
  },
8984
9154
  props.item.name
8985
9155
  ),
8986
- hasActions && /* @__PURE__ */ React15.createElement(RowActionsBox, null, /* @__PURE__ */ React15.createElement(import_core_react3.Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React15.createElement(
8987
- import_core_react3.Button,
9156
+ hasActions && /* @__PURE__ */ React17.createElement(RowActionsBox, null, /* @__PURE__ */ React17.createElement(_corereact.Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React17.createElement(
9157
+ _corereact.Button,
8988
9158
  {
8989
9159
  onClick: updateItem,
8990
9160
  variant: "secondary",
@@ -8994,8 +9164,8 @@ var SavedViewCollectionMenuItem = (props) => {
8994
9164
  loading: props.isUpdateProcessing
8995
9165
  },
8996
9166
  i18n.t("savedViews.actions.update")
8997
- ), hasCopyShareLinkButton && /* @__PURE__ */ React15.createElement(
8998
- import_core_react3.Button,
9167
+ ), hasCopyShareLinkButton && /* @__PURE__ */ React17.createElement(
9168
+ _corereact.Button,
8999
9169
  {
9000
9170
  onClick: copyShareLink,
9001
9171
  variant: "tertiary",
@@ -9003,9 +9173,9 @@ var SavedViewCollectionMenuItem = (props) => {
9003
9173
  "aria-label": i18n.t("savedViews.actions.copyShareLink"),
9004
9174
  "data-testid": "copy-share-link-button"
9005
9175
  },
9006
- /* @__PURE__ */ React15.createElement(IconWrapper, null, /* @__PURE__ */ React15.createElement(Link_default, { size: "sm" }))
9007
- ), hasClearTemporaryButton && /* @__PURE__ */ React15.createElement(
9008
- import_core_react3.Button,
9176
+ /* @__PURE__ */ React17.createElement(IconWrapper, null, /* @__PURE__ */ React17.createElement(Link_default, { size: "sm" }))
9177
+ ), hasClearTemporaryButton && /* @__PURE__ */ React17.createElement(
9178
+ _corereact.Button,
9009
9179
  {
9010
9180
  onClick: (e) => {
9011
9181
  var _a;
@@ -9018,9 +9188,9 @@ var SavedViewCollectionMenuItem = (props) => {
9018
9188
  title: i18n.t("savedViews.actions.clearTemporary"),
9019
9189
  "data-testid": "clear-temporary-view-button"
9020
9190
  },
9021
- /* @__PURE__ */ React15.createElement(IconWrapper, null, /* @__PURE__ */ React15.createElement(Clear_default, { size: "sm" }))
9022
- )), /* @__PURE__ */ React15.createElement(import_core_react3.Box, null, hasOverflowMenu && /* @__PURE__ */ React15.createElement(
9023
- import_core_react3.DropdownFlyout,
9191
+ /* @__PURE__ */ React17.createElement(IconWrapper, null, /* @__PURE__ */ React17.createElement(Clear_default, { size: "sm" }))
9192
+ )), /* @__PURE__ */ React17.createElement(_corereact.Box, null, hasOverflowMenu && /* @__PURE__ */ React17.createElement(
9193
+ _corereact.DropdownFlyout,
9024
9194
  {
9025
9195
  "data-testid": "saved-view-overflow-button",
9026
9196
  options: flyoutMenuOptions,
@@ -9035,26 +9205,20 @@ var SavedViewCollectionMenuItem = (props) => {
9035
9205
  };
9036
9206
 
9037
9207
  // src/components/panels/ExpandedPanel.tsx
9038
- var import_core_react4 = require("@procore/core-react");
9039
- var ExpandedPanel = pt(import_core_react4.Panel)`
9208
+
9209
+ var ExpandedPanel = pt(_corereact.Panel)`
9040
9210
  width: ${({ provider }) => provider === "data-table" ? "316px" : "100%"};
9041
9211
  height: 100%;
9042
9212
  border-radius: 4px 0 0 4px;
9043
9213
  `;
9044
9214
 
9045
9215
  // src/components/panels/PanelContent.tsx
9046
- var import_core_react8 = require("@procore/core-react");
9047
- var import_toast_alert2 = require("@procore/toast-alert");
9048
- var import_react9 = __toESM(require("react"));
9049
9216
 
9050
- // src/utils/api/queries.ts
9051
- var import_core_http2 = require("@procore/core-http");
9052
- var import_react_query2 = require("@tanstack/react-query");
9217
+
9218
+
9053
9219
 
9054
9220
  // src/utils/api/queriesHandler.ts
9055
- var import_core_http = require("@procore/core-http");
9056
- var import_react_query = require("@tanstack/react-query");
9057
- var import_core_react5 = require("@procore/core-react");
9221
+
9058
9222
  var getBasePath = (companyId, projectId) => {
9059
9223
  if (projectId) {
9060
9224
  return `/rest/v2.0/companies/${companyId}/projects/${projectId}/saved_views`;
@@ -9063,22 +9227,39 @@ var getBasePath = (companyId, projectId) => {
9063
9227
  };
9064
9228
  var useApiRequest = (props, method, mutationKey) => {
9065
9229
  const { projectId, companyId, domain, tableName } = props;
9066
- const queryClient2 = (0, import_react_query.useQueryClient)();
9067
- const { locale } = (0, import_core_react5.useI18nContext)();
9230
+ const transport = useSavedViewsTransport();
9231
+ const http = transport.useHttp();
9232
+ const cacheControl = transport.useCacheControl();
9233
+ const { locale } = _corereact.useI18nContext.call(void 0, );
9068
9234
  const basePath = getBasePath(companyId, projectId);
9069
- const queryKey = ["savedViews", domain, tableName, companyId, projectId];
9070
- return (0, import_react_query.useMutation)({
9235
+ const queryKey = [
9236
+ "savedViews",
9237
+ domain,
9238
+ tableName,
9239
+ companyId,
9240
+ projectId
9241
+ ];
9242
+ return transport.useMutationAdapter({
9071
9243
  mutationKey,
9072
9244
  mutationFn: async (savedView) => {
9073
- let url = "";
9074
- if (method === "DELETE" || method === "PUT") {
9245
+ let url = basePath;
9246
+ let body = { ...savedView };
9247
+ if (method === "DELETE") {
9075
9248
  url = `${basePath}/${savedView.share_token}?permissions_domain=${domain}`;
9249
+ } else if (method === "PUT") {
9250
+ url = `${basePath}/${savedView.share_token}`;
9251
+ body = { ...savedView, permissions_domain: domain };
9076
9252
  } else {
9077
- url = `${basePath}?table_name=${tableName}&permissions_domain=${domain}`;
9253
+ body = {
9254
+ ...savedView,
9255
+ table_name: tableName,
9256
+ permissions_domain: domain
9257
+ };
9078
9258
  }
9079
- const response = await (0, import_core_http.requestJSON)(url, {
9259
+ const response = await http({
9080
9260
  method,
9081
- body: JSON.stringify(savedView),
9261
+ url,
9262
+ body: JSON.stringify(body),
9082
9263
  headers: {
9083
9264
  "Content-Type": "application/json",
9084
9265
  "Accept-Language": locale
@@ -9091,23 +9272,19 @@ var useApiRequest = (props, method, mutationKey) => {
9091
9272
  },
9092
9273
  onSuccess: (savedView) => {
9093
9274
  if (method === "DELETE" || method === "POST") {
9094
- queryClient2.invalidateQueries({
9095
- queryKey
9096
- });
9275
+ cacheControl.invalidate(queryKey);
9097
9276
  return;
9098
9277
  } else {
9099
- const oldData = queryClient2.getQueryData(queryKey);
9278
+ const oldData = cacheControl.getData(queryKey);
9100
9279
  const oldView = oldData == null ? void 0 : oldData.find(
9101
9280
  (item) => item.share_token === savedView.share_token
9102
9281
  );
9103
9282
  if ((oldView == null ? void 0 : oldView.name) !== savedView.name) {
9104
- queryClient2.invalidateQueries({
9105
- queryKey
9106
- });
9283
+ cacheControl.invalidate(queryKey);
9107
9284
  return;
9108
9285
  }
9109
9286
  }
9110
- queryClient2.setQueryData(queryKey, (oldData) => {
9287
+ cacheControl.setData(queryKey, (oldData) => {
9111
9288
  if (!oldData) return [savedView];
9112
9289
  return oldData.map(
9113
9290
  (item) => item.share_token === savedView.share_token ? savedView : item
@@ -9136,13 +9313,17 @@ var getBasePath2 = (companyId, projectId) => {
9136
9313
  };
9137
9314
  var useSavedViewsQuery = (props) => {
9138
9315
  const { projectId, companyId, domain, tableName } = props;
9316
+ const transport = useSavedViewsTransport();
9317
+ const http = transport.useHttp();
9139
9318
  const basePath = getBasePath2(companyId, projectId);
9140
9319
  const url = `${basePath}?table_name=${tableName}&permissions_domain=${domain}`;
9141
- return (0, import_react_query2.useQuery)({
9320
+ return transport.useQueryAdapter({
9142
9321
  queryKey: ["savedViews", domain, tableName, companyId, projectId],
9143
9322
  queryFn: async () => {
9144
9323
  const getUrl = `${url}&per_page=${PAGE_SIZE}`;
9145
- const response = await (0, import_core_http2.requestJSON)(getUrl, {
9324
+ const response = await http({
9325
+ method: "GET",
9326
+ url: getUrl,
9146
9327
  priority: "low"
9147
9328
  });
9148
9329
  return response.data;
@@ -9151,12 +9332,16 @@ var useSavedViewsQuery = (props) => {
9151
9332
  };
9152
9333
  var useSavedViewsPermissions = (props) => {
9153
9334
  const { projectId, companyId, domain } = props;
9335
+ const transport = useSavedViewsTransport();
9336
+ const http = transport.useHttp();
9154
9337
  const basePath = getBasePath2(companyId, projectId);
9155
9338
  const url = `${basePath}/permissions?permissions_domain=${domain}`;
9156
- return (0, import_react_query2.useQuery)({
9339
+ return transport.useQueryAdapter({
9157
9340
  queryKey: ["savedViewsConfig", domain, companyId, projectId],
9158
9341
  queryFn: async () => {
9159
- const response = await (0, import_core_http2.requestJSON)(url, {
9342
+ const response = await http({
9343
+ method: "GET",
9344
+ url,
9160
9345
  priority: "low"
9161
9346
  });
9162
9347
  return response.data;
@@ -9180,13 +9365,17 @@ var useDeleteSavedView = (props) => useApiRequest(props, "DELETE", [
9180
9365
  ]);
9181
9366
  var useFetchSavedViewById = (savedViewToken, queryInput, enabled = true) => {
9182
9367
  const { projectId, companyId, domain } = queryInput;
9368
+ const transport = useSavedViewsTransport();
9369
+ const http = transport.useHttp();
9183
9370
  const basePath = getBasePath2(companyId, projectId);
9184
- return (0, import_react_query2.useQuery)({
9371
+ return transport.useQueryAdapter({
9185
9372
  enabled: enabled && Boolean(savedViewToken),
9186
9373
  queryKey: ["savedView", savedViewToken, companyId, projectId],
9187
9374
  queryFn: async () => {
9188
9375
  const url = `${basePath}/${savedViewToken}?permissions_domain=${domain}`;
9189
- const response = await (0, import_core_http2.requestJSON)(url, {
9376
+ const response = await http({
9377
+ method: "GET",
9378
+ url,
9190
9379
  priority: "low"
9191
9380
  });
9192
9381
  return response.data;
@@ -9195,14 +9384,14 @@ var useFetchSavedViewById = (savedViewToken, queryInput, enabled = true) => {
9195
9384
  };
9196
9385
 
9197
9386
  // src/components/panels/PanelContentUtils.ts
9198
- var import_lodash = __toESM(require_lodash());
9387
+ var import_lodash = _chunkQGM4M3NIjs.__toESM.call(void 0, require_lodash());
9199
9388
 
9200
9389
  // src/components/adapters/smart-grid/SmartGridUtils.ts
9201
9390
  function getSmartGridConfig(api) {
9202
9391
  const columnState = api.getColumnState();
9203
9392
  const columnGroupState = api.getColumnGroupState();
9204
9393
  const rowGroupState = api.getRowGroupColumns().map((col) => col.getColId());
9205
- const rowHeight = api.getGridOption("rowHeight") ?? api.getSizesForCurrentTheme().rowHeight;
9394
+ const rowHeight = _nullishCoalesce(api.getGridOption("rowHeight"), () => ( api.getSizesForCurrentTheme().rowHeight));
9206
9395
  const filterState = api.getFilterModel();
9207
9396
  return {
9208
9397
  columnState,
@@ -9273,7 +9462,7 @@ var updateTableConfig = (view, tableApi, provider) => {
9273
9462
  const tableConfig = view.table_config;
9274
9463
  if (tableConfig) {
9275
9464
  const currentTableConfig = (_a = dataTableApi == null ? void 0 : dataTableApi.getTableConfiguration) == null ? void 0 : _a.call(dataTableApi);
9276
- const rowHeight = (tableConfig == null ? void 0 : tableConfig.rowHeight) ?? (currentTableConfig == null ? void 0 : currentTableConfig.rowHeight);
9465
+ const rowHeight = _nullishCoalesce((tableConfig == null ? void 0 : tableConfig.rowHeight), () => ( (currentTableConfig == null ? void 0 : currentTableConfig.rowHeight)));
9277
9466
  const hasServerFilters = Boolean((_b = currentTableConfig == null ? void 0 : currentTableConfig.serverFilters) == null ? void 0 : _b.length) || Boolean((_c = tableConfig == null ? void 0 : tableConfig.serverFilters) == null ? void 0 : _c.length);
9278
9467
  const usesServerSideFiltering = hasServerFilters;
9279
9468
  if (rowHeight !== void 0) {
@@ -9407,10 +9596,10 @@ var hasPermissionForViewLevel = (viewLevel, permissions) => {
9407
9596
  };
9408
9597
 
9409
9598
  // src/components/panels/useGroups.ts
9410
- var import_react6 = require("react");
9599
+
9411
9600
  var useGroups = (isProjectLevelTool) => {
9412
9601
  const viewLevels = getViewLevels(isProjectLevelTool);
9413
- const [groups, setGroups] = (0, import_react6.useState)(
9602
+ const [groups, setGroups] = _react.useState.call(void 0,
9414
9603
  Object.fromEntries(viewLevels.map((level) => [level, true]))
9415
9604
  );
9416
9605
  const toggleGroup = (group) => {
@@ -9420,26 +9609,32 @@ var useGroups = (isProjectLevelTool) => {
9420
9609
  };
9421
9610
 
9422
9611
  // src/components/panels/ViewLevelHeader.tsx
9423
- var import_core_react6 = require("@procore/core-react");
9424
- var import_react7 = __toESM(require("react"));
9612
+
9613
+
9614
+
9615
+
9616
+
9617
+
9618
+
9619
+
9425
9620
  var groupIcon = (group) => {
9426
9621
  switch (group) {
9427
9622
  case "personal":
9428
- return /* @__PURE__ */ import_react7.default.createElement(Person_default, null);
9623
+ return /* @__PURE__ */ React.default.createElement(Person_default, null);
9429
9624
  case "project":
9430
- return /* @__PURE__ */ import_react7.default.createElement(Excavator_default, null);
9625
+ return /* @__PURE__ */ React.default.createElement(Excavator_default, null);
9431
9626
  case "company":
9432
- return /* @__PURE__ */ import_react7.default.createElement(Building_default, null);
9627
+ return /* @__PURE__ */ React.default.createElement(Building_default, null);
9433
9628
  }
9434
9629
  };
9435
- var StyledButton = pt(import_core_react6.Button)`
9630
+ var StyledButton = pt(_corereact.Button)`
9436
9631
  &:hover {
9437
- background-color: ${import_core_react6.colors.gray98};
9632
+ background-color: ${_corereact.colors.gray98};
9438
9633
  }
9439
9634
  `;
9440
9635
  var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
9441
- const I18n = (0, import_core_react6.useI18nContext)();
9442
- return /* @__PURE__ */ import_react7.default.createElement(import_core_react6.Box, { style: { width: "100%" } }, /* @__PURE__ */ import_react7.default.createElement(
9636
+ const I18n = _corereact.useI18nContext.call(void 0, );
9637
+ return /* @__PURE__ */ React.default.createElement(_corereact.Box, { style: { width: "100%" } }, /* @__PURE__ */ React.default.createElement(
9443
9638
  StyledButton,
9444
9639
  {
9445
9640
  block: true,
@@ -9452,19 +9647,19 @@ var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
9452
9647
  onClick: () => toggleGroup(group),
9453
9648
  "aria-controls": `saved-views-collections-${group}`,
9454
9649
  "aria-expanded": expanded,
9455
- icon: expanded ? /* @__PURE__ */ import_react7.default.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ import_react7.default.createElement(ChevronRight_default, { size: "sm" })
9650
+ icon: expanded ? /* @__PURE__ */ React.default.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ React.default.createElement(ChevronRight_default, { size: "sm" })
9456
9651
  },
9457
9652
  groupIcon(group),
9458
- /* @__PURE__ */ import_react7.default.createElement(import_core_react6.Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
9653
+ /* @__PURE__ */ React.default.createElement(_corereact.Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
9459
9654
  ));
9460
9655
  };
9461
9656
  var ViewLevelHeader_default = ViewLevelHeader;
9462
9657
 
9463
9658
  // src/utils/hooks/useScrollToRef.ts
9464
- var import_react8 = require("react");
9659
+
9465
9660
  var useScrollToRef = (dependency) => {
9466
- const ref = (0, import_react8.useRef)(null);
9467
- (0, import_react8.useEffect)(() => {
9661
+ const ref = _react.useRef.call(void 0, null);
9662
+ _react.useEffect.call(void 0, () => {
9468
9663
  if (ref.current) {
9469
9664
  ref.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
9470
9665
  }
@@ -9473,41 +9668,46 @@ var useScrollToRef = (dependency) => {
9473
9668
  };
9474
9669
 
9475
9670
  // src/components/panels/PanelContent.styles.ts
9476
- var import_core_react7 = require("@procore/core-react");
9477
- var Row = pt(import_core_react7.MenuImperative.Item)`
9671
+
9672
+
9673
+
9674
+
9675
+
9676
+
9677
+ var Row = pt(_corereact.MenuImperative.Item)`
9478
9678
  width: 100%;
9479
9679
  padding-left: 35px;
9480
9680
  padding-right: 4px;
9481
- background-color: ${({ selected }) => selected ? import_core_react7.colors.blue96 : "transparent"};
9681
+ background-color: ${({ selected }) => selected ? _corereact.colors.blue96 : "transparent"};
9482
9682
 
9483
9683
  &:hover {
9484
- background-color: ${({ selected }) => selected ? import_core_react7.colors.blue96 : import_core_react7.colors.gray98};
9684
+ background-color: ${({ selected }) => selected ? _corereact.colors.blue96 : _corereact.colors.gray98};
9485
9685
  }
9486
9686
  `;
9487
- var Panel2 = pt(import_core_react7.DetailPage.Card)`
9687
+ var Panel2 = pt(_corereact.DetailPage.Card)`
9488
9688
  margin: 0;
9489
9689
  height: 100%;
9490
- padding-top: ${import_core_react7.spacing.sm}px;
9690
+ padding-top: ${_corereact.spacing.sm}px;
9491
9691
  box-shadow: none;
9492
9692
  `;
9493
9693
 
9494
9694
  // src/components/panels/PanelContent.tsx
9495
- var StyledMenuImperative = pt(import_core_react8.MenuImperative)`
9695
+ var StyledMenuImperative = pt(_corereact.MenuImperative)`
9496
9696
  div[role='listbox'] {
9497
9697
  padding: 0;
9498
9698
  }
9499
9699
  `;
9500
9700
  var PanelContent = (props) => {
9501
9701
  const { queryInput, selectedSavedView, tableConfig } = props;
9502
- const { showToast } = (0, import_toast_alert2.useToastAlertContext)();
9503
- const I18n = (0, import_core_react8.useI18nContext)();
9702
+ const { showToast } = _toastalert.useToastAlertContext.call(void 0, );
9703
+ const I18n = _corereact.useI18nContext.call(void 0, );
9504
9704
  const { data: savedViewsFromQuery, error: savedViewsError } = useSavedViewsQuery(props.queryInput);
9505
9705
  const updateMutation = useUpdateSavedView(queryInput);
9506
9706
  const { mutate: updateSavedView } = updateMutation;
9507
- const isUpdateLoading = "isPending" in updateMutation ? updateMutation.isPending : updateMutation.isLoading ?? false;
9508
- const savedViews = props.savedViews ?? savedViewsFromQuery;
9509
- const errorToastRef = import_react9.default.useRef(null);
9510
- import_react9.default.useEffect(() => {
9707
+ const isUpdateLoading = updateMutation.isPending;
9708
+ const savedViews = _nullishCoalesce(props.savedViews, () => ( savedViewsFromQuery));
9709
+ const errorToastRef = React.default.useRef(null);
9710
+ React.default.useEffect(() => {
9511
9711
  if (savedViewsError && savedViewsError !== errorToastRef.current) {
9512
9712
  showToast.error(I18n.t("savedViews.errors.fetch"));
9513
9713
  errorToastRef.current = savedViewsError;
@@ -9537,7 +9737,7 @@ var PanelContent = (props) => {
9537
9737
  }
9538
9738
  });
9539
9739
  };
9540
- return /* @__PURE__ */ import_react9.default.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ import_react9.default.createElement(import_core_react8.Flex, { direction: "column", style: { height: "100%", width: "100%" } }, (temporaryView || presetViews) && /* @__PURE__ */ import_react9.default.createElement(
9740
+ return /* @__PURE__ */ React.default.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ React.default.createElement(_corereact.Flex, { direction: "column", style: { height: "100%", width: "100%" } }, (temporaryView || presetViews) && /* @__PURE__ */ React.default.createElement(
9541
9741
  StyledMenuImperative,
9542
9742
  {
9543
9743
  role: "listbox",
@@ -9547,7 +9747,7 @@ var PanelContent = (props) => {
9547
9747
  }
9548
9748
  }
9549
9749
  },
9550
- /* @__PURE__ */ import_react9.default.createElement(import_core_react8.MenuImperative.Options, null, temporaryView && /* @__PURE__ */ import_react9.default.createElement(
9750
+ /* @__PURE__ */ React.default.createElement(_corereact.MenuImperative.Options, null, temporaryView && /* @__PURE__ */ React.default.createElement(
9551
9751
  Row,
9552
9752
  {
9553
9753
  key: temporaryView.id,
@@ -9556,7 +9756,7 @@ var PanelContent = (props) => {
9556
9756
  "aria-current": isTemporarySelected ? "true" : void 0,
9557
9757
  ref: isTemporarySelected ? selectedRowRef : null
9558
9758
  },
9559
- /* @__PURE__ */ import_react9.default.createElement(
9759
+ /* @__PURE__ */ React.default.createElement(
9560
9760
  SavedViewCollectionMenuItem,
9561
9761
  {
9562
9762
  item: temporaryView,
@@ -9566,7 +9766,7 @@ var PanelContent = (props) => {
9566
9766
  )
9567
9767
  ), presetViews.map((presetView) => {
9568
9768
  const isSelected = (selectedSavedView == null ? void 0 : selectedSavedView.id) === presetView.id;
9569
- return /* @__PURE__ */ import_react9.default.createElement(
9769
+ return /* @__PURE__ */ React.default.createElement(
9570
9770
  Row,
9571
9771
  {
9572
9772
  key: presetView.id,
@@ -9575,7 +9775,7 @@ var PanelContent = (props) => {
9575
9775
  "aria-current": isSelected ? "true" : void 0,
9576
9776
  ref: isSelected ? selectedRowRef : null
9577
9777
  },
9578
- /* @__PURE__ */ import_react9.default.createElement(
9778
+ /* @__PURE__ */ React.default.createElement(
9579
9779
  SavedViewCollectionMenuItem,
9580
9780
  {
9581
9781
  item: presetView,
@@ -9589,14 +9789,14 @@ var PanelContent = (props) => {
9589
9789
  const views = isExpanded && savedViews ? savedViews.filter(
9590
9790
  (view) => view.view_level === level && view.id !== "temporary"
9591
9791
  ) : [];
9592
- return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, { key: level }, /* @__PURE__ */ import_react9.default.createElement(
9792
+ return /* @__PURE__ */ React.default.createElement(React.default.Fragment, { key: level }, /* @__PURE__ */ React.default.createElement(
9593
9793
  ViewLevelHeader_default,
9594
9794
  {
9595
9795
  group: level,
9596
9796
  toggleGroup,
9597
9797
  expanded: isExpanded
9598
9798
  }
9599
- ), isExpanded && views.length > 0 && /* @__PURE__ */ import_react9.default.createElement(
9799
+ ), isExpanded && views.length > 0 && /* @__PURE__ */ React.default.createElement(
9600
9800
  StyledMenuImperative,
9601
9801
  {
9602
9802
  id: `saved-views-collections-${level}`,
@@ -9607,7 +9807,7 @@ var PanelContent = (props) => {
9607
9807
  }
9608
9808
  }
9609
9809
  },
9610
- /* @__PURE__ */ import_react9.default.createElement(import_core_react8.MenuImperative.Options, null, views.map((view) => {
9810
+ /* @__PURE__ */ React.default.createElement(_corereact.MenuImperative.Options, null, views.map((view) => {
9611
9811
  const isSelected = (selectedSavedView == null ? void 0 : selectedSavedView.id) === view.id;
9612
9812
  const canUpdate = isSelected && hasPermissionForViewLevel(
9613
9813
  view.view_level,
@@ -9619,7 +9819,7 @@ var PanelContent = (props) => {
9619
9819
  props.provider
9620
9820
  );
9621
9821
  const canEditOrDelete = isSelected && hasPermissionForViewLevel(view.view_level, permissions);
9622
- return /* @__PURE__ */ import_react9.default.createElement(
9822
+ return /* @__PURE__ */ React.default.createElement(
9623
9823
  Row,
9624
9824
  {
9625
9825
  key: view.id,
@@ -9628,7 +9828,7 @@ var PanelContent = (props) => {
9628
9828
  "aria-current": isSelected ? "true" : void 0,
9629
9829
  ref: isSelected ? selectedRowRef : null
9630
9830
  },
9631
- /* @__PURE__ */ import_react9.default.createElement(
9831
+ /* @__PURE__ */ React.default.createElement(
9632
9832
  SavedViewCollectionMenuItem,
9633
9833
  {
9634
9834
  item: view,
@@ -9650,22 +9850,34 @@ var PanelContent = (props) => {
9650
9850
  };
9651
9851
 
9652
9852
  // src/components/saved-views/SavedViews.tsx
9653
- var import_core_react15 = require("@procore/core-react");
9654
- var import_react15 = __toESM(require("react"));
9655
- var import_react_query3 = require("@tanstack/react-query");
9656
- var import_toast_alert3 = require("@procore/toast-alert");
9853
+
9854
+
9855
+
9856
+
9857
+
9858
+
9859
+
9860
+
9861
+
9862
+
9657
9863
 
9658
9864
  // src/components/modals/DeleteConfirmationModal.tsx
9659
- var import_core_react9 = require("@procore/core-react");
9660
- var import_react10 = __toESM(require("react"));
9865
+
9866
+
9867
+
9868
+
9869
+
9870
+
9871
+
9872
+
9661
9873
  var SavedViewsDeleteConfirmationModalShared = ({
9662
9874
  onCancel,
9663
9875
  onDelete,
9664
9876
  open
9665
9877
  }) => {
9666
- const i18n = (0, import_core_react9.useI18nContext)();
9667
- return /* @__PURE__ */ import_react10.default.createElement(
9668
- import_core_react9.ConfirmModal,
9878
+ const i18n = _corereact.useI18nContext.call(void 0, );
9879
+ return /* @__PURE__ */ React.default.createElement(
9880
+ _corereact.ConfirmModal,
9669
9881
  {
9670
9882
  "data-testid": "delete-confirmation-modal",
9671
9883
  open,
@@ -9674,18 +9886,29 @@ var SavedViewsDeleteConfirmationModalShared = ({
9674
9886
  onClose: onCancel,
9675
9887
  style: { overflowWrap: "anywhere" }
9676
9888
  },
9677
- /* @__PURE__ */ import_react10.default.createElement(import_core_react9.Modal.Body, null, /* @__PURE__ */ import_react10.default.createElement(import_core_react9.P, null, i18n.t("savedViews.modal.delete.description"))),
9678
- /* @__PURE__ */ import_react10.default.createElement(import_core_react9.Modal.Footer, null, /* @__PURE__ */ import_react10.default.createElement(import_core_react9.Modal.FooterButtons, null, /* @__PURE__ */ import_react10.default.createElement(import_core_react9.Button, { variant: "secondary", onClick: onCancel }, i18n.t("savedViews.actions.cancel")), /* @__PURE__ */ import_react10.default.createElement(import_core_react9.Button, { variant: "primary", onClick: onDelete }, i18n.t("savedViews.actions.delete"))))
9889
+ /* @__PURE__ */ React.default.createElement(_corereact.Modal.Body, null, /* @__PURE__ */ React.default.createElement(_corereact.P, null, i18n.t("savedViews.modal.delete.description"))),
9890
+ /* @__PURE__ */ React.default.createElement(_corereact.Modal.Footer, null, /* @__PURE__ */ React.default.createElement(_corereact.Modal.FooterButtons, null, /* @__PURE__ */ React.default.createElement(_corereact.Button, { variant: "secondary", onClick: onCancel }, i18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React.default.createElement(_corereact.Button, { variant: "primary", onClick: onDelete }, i18n.t("savedViews.actions.delete"))))
9679
9891
  );
9680
9892
  };
9681
9893
 
9682
9894
  // src/components/modals/form-modal/FormModal.tsx
9683
- var import_react11 = __toESM(require("react"));
9895
+
9684
9896
 
9685
9897
  // src/components/modals/form-modal/FormModalBase.tsx
9686
- var import_core_react11 = require("@procore/core-react");
9687
- var React20 = __toESM(require("react"));
9688
- var yup = __toESM(require("yup"));
9898
+
9899
+
9900
+
9901
+
9902
+
9903
+
9904
+
9905
+
9906
+
9907
+
9908
+
9909
+
9910
+
9911
+ var _yup = require('yup'); var yup = _interopRequireWildcard(_yup); var yup2 = _interopRequireWildcard(_yup);
9689
9912
 
9690
9913
  // src/components/modals/form-modal/FormModalBaseUtils.ts
9691
9914
  var getViewLevelOptions = (permissions, i18n, isProjectLevelTool = true) => {
@@ -9720,24 +9943,24 @@ function extractMessage(error, I18n) {
9720
9943
  }
9721
9944
 
9722
9945
  // src/components/modals/form-modal/NameInputField.tsx
9723
- var import_core_react10 = require("@procore/core-react");
9724
- var React19 = __toESM(require("react"));
9946
+
9947
+
9725
9948
  var NAME_INPUT_ID = "saved-view-form-name-input";
9726
9949
  var NameInputField = ({
9727
9950
  error,
9728
9951
  onResetMutations
9729
9952
  }) => {
9730
- const I18n = (0, import_core_react10.useI18nContext)();
9953
+ const I18n = _corereact.useI18nContext.call(void 0, );
9731
9954
  const label = I18n.t("savedViews.modal.fields.name");
9732
- const { errors: formErrors, submitCount } = (0, import_core_react10.useFormContext)();
9733
- React19.useEffect(() => {
9955
+ const { errors: formErrors, submitCount } = _corereact.useFormContext.call(void 0, );
9956
+ React21.useEffect(() => {
9734
9957
  var _a;
9735
9958
  if (submitCount > 0 && (formErrors == null ? void 0 : formErrors.name)) {
9736
9959
  (_a = document.getElementById(NAME_INPUT_ID)) == null ? void 0 : _a.focus();
9737
9960
  }
9738
9961
  }, [formErrors == null ? void 0 : formErrors.name, submitCount]);
9739
- return /* @__PURE__ */ React19.createElement(
9740
- import_core_react10.Form.Text,
9962
+ return /* @__PURE__ */ React21.createElement(
9963
+ _corereact.Form.Text,
9741
9964
  {
9742
9965
  id: NAME_INPUT_ID,
9743
9966
  name: "name",
@@ -9769,7 +9992,7 @@ var FormModalBase = ({
9769
9992
  setOpenEditCreateModal,
9770
9993
  onSelect
9771
9994
  }) => {
9772
- const I18n = (0, import_core_react11.useI18nContext)();
9995
+ const I18n = _corereact.useI18nContext.call(void 0, );
9773
9996
  const NAME_MAX_LENGTH = 150;
9774
9997
  const {
9775
9998
  mutate: createSavedView,
@@ -9828,8 +10051,8 @@ var FormModalBase = ({
9828
10051
  I18n,
9829
10052
  isProjectLevelTool
9830
10053
  );
9831
- return /* @__PURE__ */ React20.createElement(
9832
- import_core_react11.Modal,
10054
+ return /* @__PURE__ */ React22.createElement(
10055
+ _corereact.Modal,
9833
10056
  {
9834
10057
  howToClose: ["x", "scrim"],
9835
10058
  onClose,
@@ -9837,8 +10060,8 @@ var FormModalBase = ({
9837
10060
  width: "md",
9838
10061
  "data-testid": "create-update-modal"
9839
10062
  },
9840
- /* @__PURE__ */ React20.createElement(ScrollContainer, null, /* @__PURE__ */ React20.createElement(import_core_react11.Modal.Header, { style: { borderBottom: `1px solid ${import_core_react11.colors.gray85}` } }, /* @__PURE__ */ React20.createElement(import_core_react11.Modal.Heading, null, header)), /* @__PURE__ */ React20.createElement(
9841
- import_core_react11.Form,
10063
+ /* @__PURE__ */ React22.createElement(ScrollContainer, null, /* @__PURE__ */ React22.createElement(_corereact.Modal.Header, { style: { borderBottom: `1px solid ${_corereact.colors.gray85}` } }, /* @__PURE__ */ React22.createElement(_corereact.Modal.Heading, null, header)), /* @__PURE__ */ React22.createElement(
10064
+ _corereact.Form,
9842
10065
  {
9843
10066
  initialValues: {
9844
10067
  name: initialName,
@@ -9863,26 +10086,26 @@ var FormModalBase = ({
9863
10086
  onReset: onCancel,
9864
10087
  validateOnChange: true
9865
10088
  },
9866
- /* @__PURE__ */ React20.createElement(import_core_react11.Form.Form, { name: header }, /* @__PURE__ */ React20.createElement(
9867
- import_core_react11.Modal.Body,
10089
+ /* @__PURE__ */ React22.createElement(_corereact.Form.Form, { name: header }, /* @__PURE__ */ React22.createElement(
10090
+ _corereact.Modal.Body,
9868
10091
  {
9869
- style: { paddingTop: 0, paddingBottom: 0, marginTop: import_core_react11.spacing.lg }
10092
+ style: { paddingTop: 0, paddingBottom: 0, marginTop: _corereact.spacing.lg }
9870
10093
  },
9871
- errors && /* @__PURE__ */ React20.createElement(import_core_react11.ErrorBanner, { style: { marginBottom: import_core_react11.spacing.xl } }, /* @__PURE__ */ React20.createElement(import_core_react11.Banner.Content, null, /* @__PURE__ */ React20.createElement(import_core_react11.Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React20.createElement(import_core_react11.Banner.Body, null, (errors == null ? void 0 : errors.form) || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
9872
- /* @__PURE__ */ React20.createElement(import_core_react11.Form.Row, null, /* @__PURE__ */ React20.createElement(
10094
+ errors && /* @__PURE__ */ React22.createElement(_corereact.ErrorBanner, { style: { marginBottom: _corereact.spacing.xl } }, /* @__PURE__ */ React22.createElement(_corereact.Banner.Content, null, /* @__PURE__ */ React22.createElement(_corereact.Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React22.createElement(_corereact.Banner.Body, null, (errors == null ? void 0 : errors.form) || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
10095
+ /* @__PURE__ */ React22.createElement(_corereact.Form.Row, null, /* @__PURE__ */ React22.createElement(
9873
10096
  NameInputField,
9874
10097
  {
9875
10098
  error: errors == null ? void 0 : errors.name,
9876
10099
  onResetMutations: resetMutations
9877
10100
  }
9878
10101
  )),
9879
- /* @__PURE__ */ React20.createElement(
9880
- import_core_react11.Form.Row,
10102
+ /* @__PURE__ */ React22.createElement(
10103
+ _corereact.Form.Row,
9881
10104
  {
9882
- style: { marginTop: (errors == null ? void 0 : errors.name) ? import_core_react11.spacing.xl : import_core_react11.spacing.none }
10105
+ style: { marginTop: (errors == null ? void 0 : errors.name) ? _corereact.spacing.xl : _corereact.spacing.none }
9883
10106
  },
9884
- /* @__PURE__ */ React20.createElement(
9885
- import_core_react11.Form.TextArea,
10107
+ /* @__PURE__ */ React22.createElement(
10108
+ _corereact.Form.TextArea,
9886
10109
  {
9887
10110
  name: "description",
9888
10111
  placeholder: I18n.t("savedViews.modal.fields.description"),
@@ -9892,8 +10115,8 @@ var FormModalBase = ({
9892
10115
  }
9893
10116
  )
9894
10117
  ),
9895
- viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React20.createElement(import_core_react11.Form.Row, null, /* @__PURE__ */ React20.createElement(
9896
- import_core_react11.Form.Select,
10118
+ viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React22.createElement(_corereact.Form.Row, null, /* @__PURE__ */ React22.createElement(
10119
+ _corereact.Form.Select,
9897
10120
  {
9898
10121
  name: "view_level",
9899
10122
  options: viewLevelOptions,
@@ -9902,9 +10125,9 @@ var FormModalBase = ({
9902
10125
  onSearch: false,
9903
10126
  onClear: false
9904
10127
  }
9905
- )) : /* @__PURE__ */ React20.createElement(React20.Fragment, null)
9906
- ), /* @__PURE__ */ React20.createElement(import_core_react11.Modal.Footer, { style: { borderTop: `1px solid ${import_core_react11.colors.gray85}` } }, /* @__PURE__ */ React20.createElement(import_core_react11.Flex, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React20.createElement(import_core_react11.Typography, { color: "gray45", italic: true }, /* @__PURE__ */ React20.createElement(import_core_react11.Typography, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React20.createElement(import_core_react11.Modal.FooterButtons, null, /* @__PURE__ */ React20.createElement(import_core_react11.Button, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React20.createElement(
9907
- import_core_react11.Button,
10128
+ )) : /* @__PURE__ */ React22.createElement(React22.Fragment, null)
10129
+ ), /* @__PURE__ */ React22.createElement(_corereact.Modal.Footer, { style: { borderTop: `1px solid ${_corereact.colors.gray85}` } }, /* @__PURE__ */ React22.createElement(_corereact.Flex, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React22.createElement(_corereact.Typography, { color: "gray45", italic: true }, /* @__PURE__ */ React22.createElement(_corereact.Typography, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React22.createElement(_corereact.Modal.FooterButtons, null, /* @__PURE__ */ React22.createElement(_corereact.Button, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React22.createElement(
10130
+ _corereact.Button,
9908
10131
  {
9909
10132
  "data-testid": "create-update-modal-button",
9910
10133
  type: "submit",
@@ -9919,7 +10142,7 @@ var FormModalBase = ({
9919
10142
  };
9920
10143
 
9921
10144
  // src/components/modals/form-modal/FormModal.tsx
9922
- var import_core_react12 = require("@procore/core-react");
10145
+
9923
10146
  var FormModal = ({
9924
10147
  open,
9925
10148
  mode,
@@ -9932,8 +10155,8 @@ var FormModal = ({
9932
10155
  onSelect,
9933
10156
  defaultView
9934
10157
  }) => {
9935
- const i18n = (0, import_core_react12.useI18nContext)();
9936
- return /* @__PURE__ */ import_react11.default.createElement(
10158
+ const i18n = _corereact.useI18nContext.call(void 0, );
10159
+ return /* @__PURE__ */ React.default.createElement(
9937
10160
  FormModalBase,
9938
10161
  {
9939
10162
  open,
@@ -9954,9 +10177,21 @@ var FormModal = ({
9954
10177
  };
9955
10178
 
9956
10179
  // src/components/modals/form-modal/SharedViewFormModal.tsx
9957
- var import_core_react13 = require("@procore/core-react");
9958
- var React22 = __toESM(require("react"));
9959
- var yup2 = __toESM(require("yup"));
10180
+
10181
+
10182
+
10183
+
10184
+
10185
+
10186
+
10187
+
10188
+
10189
+
10190
+
10191
+
10192
+
10193
+
10194
+
9960
10195
  var SharedViewFormModal = ({
9961
10196
  open,
9962
10197
  fetchedView,
@@ -9967,7 +10202,7 @@ var SharedViewFormModal = ({
9967
10202
  isCreating,
9968
10203
  resetCreateError
9969
10204
  }) => {
9970
- const I18n = (0, import_core_react13.useI18nContext)();
10205
+ const I18n = _corereact.useI18nContext.call(void 0, );
9971
10206
  const NAME_MAX_LENGTH = 150;
9972
10207
  const errors = extractMessage(createError, I18n);
9973
10208
  const handleNameChange = () => {
@@ -9978,8 +10213,8 @@ var SharedViewFormModal = ({
9978
10213
  const handleOnSubmit = (data) => {
9979
10214
  onCreateView(data.name, data.description);
9980
10215
  };
9981
- return /* @__PURE__ */ React22.createElement(
9982
- import_core_react13.Modal,
10216
+ return /* @__PURE__ */ React24.createElement(
10217
+ _corereact.Modal,
9983
10218
  {
9984
10219
  "data-testid": "shared-view-form-modal",
9985
10220
  open,
@@ -9987,40 +10222,40 @@ var SharedViewFormModal = ({
9987
10222
  onClose,
9988
10223
  style: { width: "540px" }
9989
10224
  },
9990
- /* @__PURE__ */ React22.createElement(
9991
- import_core_react13.Modal.Header,
10225
+ /* @__PURE__ */ React24.createElement(
10226
+ _corereact.Modal.Header,
9992
10227
  {
9993
10228
  onClose,
9994
10229
  style: {
9995
- paddingTop: import_core_react13.spacing.lg,
9996
- paddingBottom: import_core_react13.spacing.xs,
9997
- paddingLeft: import_core_react13.spacing.xl,
9998
- paddingRight: import_core_react13.spacing.xl
10230
+ paddingTop: _corereact.spacing.lg,
10231
+ paddingBottom: _corereact.spacing.xs,
10232
+ paddingLeft: _corereact.spacing.xl,
10233
+ paddingRight: _corereact.spacing.xl
9999
10234
  }
10000
10235
  },
10001
- /* @__PURE__ */ React22.createElement(import_core_react13.Modal.Heading, null, I18n.t("savedViews.modal.create.title"))
10236
+ /* @__PURE__ */ React24.createElement(_corereact.Modal.Heading, null, I18n.t("savedViews.modal.create.title"))
10002
10237
  ),
10003
- /* @__PURE__ */ React22.createElement(
10004
- import_core_react13.P,
10238
+ /* @__PURE__ */ React24.createElement(
10239
+ _corereact.P,
10005
10240
  {
10006
10241
  style: {
10007
- paddingLeft: import_core_react13.spacing.xl,
10008
- paddingRight: import_core_react13.spacing.xl,
10009
- paddingBottom: import_core_react13.spacing.lg,
10010
- paddingTop: import_core_react13.spacing.none,
10242
+ paddingLeft: _corereact.spacing.xl,
10243
+ paddingRight: _corereact.spacing.xl,
10244
+ paddingBottom: _corereact.spacing.lg,
10245
+ paddingTop: _corereact.spacing.none,
10011
10246
  margin: 0,
10012
- color: import_core_react13.colors.gray45,
10247
+ color: _corereact.colors.gray45,
10013
10248
  whiteSpace: "pre-line"
10014
10249
  }
10015
10250
  },
10016
10251
  I18n.t("savedViews.modal.copyConfirmation.description")
10017
10252
  ),
10018
- /* @__PURE__ */ React22.createElement(
10019
- import_core_react13.Form,
10253
+ /* @__PURE__ */ React24.createElement(
10254
+ _corereact.Form,
10020
10255
  {
10021
10256
  initialValues: {
10022
10257
  name: fetchedView.name,
10023
- description: fetchedView.description ?? ""
10258
+ description: _nullishCoalesce(fetchedView.description, () => ( ""))
10024
10259
  },
10025
10260
  view: "create",
10026
10261
  validationSchema: yup2.object().shape({
@@ -10034,32 +10269,32 @@ var SharedViewFormModal = ({
10034
10269
  onSubmit: handleOnSubmit,
10035
10270
  validateOnChange: true
10036
10271
  },
10037
- /* @__PURE__ */ React22.createElement(import_core_react13.Form.Form, { name: "share-view-form" }, /* @__PURE__ */ React22.createElement(
10038
- import_core_react13.Modal.Body,
10272
+ /* @__PURE__ */ React24.createElement(_corereact.Form.Form, { name: "share-view-form" }, /* @__PURE__ */ React24.createElement(
10273
+ _corereact.Modal.Body,
10039
10274
  {
10040
10275
  style: {
10041
- paddingTop: import_core_react13.spacing.lg,
10276
+ paddingTop: _corereact.spacing.lg,
10042
10277
  paddingBottom: 0,
10043
- borderTop: `1px solid ${import_core_react13.colors.gray85}`
10278
+ borderTop: `1px solid ${_corereact.colors.gray85}`
10044
10279
  }
10045
10280
  },
10046
- errors && /* @__PURE__ */ React22.createElement(import_core_react13.ErrorBanner, { style: { marginBottom: import_core_react13.spacing.xl } }, /* @__PURE__ */ React22.createElement(import_core_react13.Banner.Content, null, /* @__PURE__ */ React22.createElement(import_core_react13.Banner.Title, null, I18n.t("savedViews.modal.errors.title", {
10281
+ errors && /* @__PURE__ */ React24.createElement(_corereact.ErrorBanner, { style: { marginBottom: _corereact.spacing.xl } }, /* @__PURE__ */ React24.createElement(_corereact.Banner.Content, null, /* @__PURE__ */ React24.createElement(_corereact.Banner.Title, null, I18n.t("savedViews.modal.errors.title", {
10047
10282
  mode: "create"
10048
- })), /* @__PURE__ */ React22.createElement(import_core_react13.Banner.Body, null, (errors == null ? void 0 : errors.form) || I18n.t("savedViews.modal.errors.description.create")))),
10049
- /* @__PURE__ */ React22.createElement(import_core_react13.Form.Row, null, /* @__PURE__ */ React22.createElement(
10283
+ })), /* @__PURE__ */ React24.createElement(_corereact.Banner.Body, null, (errors == null ? void 0 : errors.form) || I18n.t("savedViews.modal.errors.description.create")))),
10284
+ /* @__PURE__ */ React24.createElement(_corereact.Form.Row, null, /* @__PURE__ */ React24.createElement(
10050
10285
  NameInputField,
10051
10286
  {
10052
10287
  error: errors == null ? void 0 : errors.name,
10053
10288
  onResetMutations: handleNameChange
10054
10289
  }
10055
10290
  )),
10056
- /* @__PURE__ */ React22.createElement(
10057
- import_core_react13.Form.Row,
10291
+ /* @__PURE__ */ React24.createElement(
10292
+ _corereact.Form.Row,
10058
10293
  {
10059
- style: { marginTop: (errors == null ? void 0 : errors.name) ? import_core_react13.spacing.xl : import_core_react13.spacing.none }
10294
+ style: { marginTop: (errors == null ? void 0 : errors.name) ? _corereact.spacing.xl : _corereact.spacing.none }
10060
10295
  },
10061
- /* @__PURE__ */ React22.createElement(
10062
- import_core_react13.Form.TextArea,
10296
+ /* @__PURE__ */ React24.createElement(
10297
+ _corereact.Form.TextArea,
10063
10298
  {
10064
10299
  name: "description",
10065
10300
  placeholder: I18n.t("savedViews.modal.fields.description"),
@@ -10069,8 +10304,8 @@ var SharedViewFormModal = ({
10069
10304
  }
10070
10305
  )
10071
10306
  )
10072
- ), /* @__PURE__ */ React22.createElement(import_core_react13.Modal.Footer, { style: { borderTop: `1px solid ${import_core_react13.colors.gray85}` } }, /* @__PURE__ */ React22.createElement(import_core_react13.Flex, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React22.createElement(import_core_react13.Typography, { color: "gray45", italic: true }, /* @__PURE__ */ React22.createElement(import_core_react13.Typography, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React22.createElement(import_core_react13.Modal.FooterButtons, null, /* @__PURE__ */ React22.createElement(
10073
- import_core_react13.Button,
10307
+ ), /* @__PURE__ */ React24.createElement(_corereact.Modal.Footer, { style: { borderTop: `1px solid ${_corereact.colors.gray85}` } }, /* @__PURE__ */ React24.createElement(_corereact.Flex, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React24.createElement(_corereact.Typography, { color: "gray45", italic: true }, /* @__PURE__ */ React24.createElement(_corereact.Typography, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React24.createElement(_corereact.Modal.FooterButtons, null, /* @__PURE__ */ React24.createElement(
10308
+ _corereact.Button,
10074
10309
  {
10075
10310
  variant: "secondary",
10076
10311
  onClick: onCreateTemporaryView,
@@ -10078,8 +10313,8 @@ var SharedViewFormModal = ({
10078
10313
  disabled: isCreating
10079
10314
  },
10080
10315
  I18n.t("savedViews.actions.viewTemporarily")
10081
- ), /* @__PURE__ */ React22.createElement(
10082
- import_core_react13.Button,
10316
+ ), /* @__PURE__ */ React24.createElement(
10317
+ _corereact.Button,
10083
10318
  {
10084
10319
  type: "submit",
10085
10320
  variant: "primary",
@@ -10094,9 +10329,8 @@ var SharedViewFormModal = ({
10094
10329
  };
10095
10330
 
10096
10331
  // src/utils/hooks/useViewSelection.ts
10097
- var import_react13 = require("react");
10098
- var import_react_router_dom = require("react-router-dom");
10099
- var import_core_react14 = require("@procore/core-react");
10332
+
10333
+
10100
10334
 
10101
10335
  // src/utils/viewStorage.ts
10102
10336
  var ViewStorage = {
@@ -10111,7 +10345,7 @@ var ViewStorage = {
10111
10345
  if (!parsed) return defaultView;
10112
10346
  const isTableConfigOnly = !parsed.id && !parsed.share_token;
10113
10347
  return isTableConfigOnly ? { ...defaultView, table_config: parsed } : parsed;
10114
- } catch {
10348
+ } catch (e7) {
10115
10349
  return defaultView;
10116
10350
  }
10117
10351
  },
@@ -10121,13 +10355,13 @@ var ViewStorage = {
10121
10355
  };
10122
10356
 
10123
10357
  // src/utils/hooks/useLatest.ts
10124
- var import_react12 = require("react");
10358
+
10125
10359
  var useLatest = (callback) => {
10126
- const ref = (0, import_react12.useRef)(callback);
10127
- (0, import_react12.useLayoutEffect)(() => {
10360
+ const ref = _react.useRef.call(void 0, callback);
10361
+ _react.useLayoutEffect.call(void 0, () => {
10128
10362
  ref.current = callback;
10129
10363
  });
10130
- return (0, import_react12.useCallback)((...args) => ref.current(...args), []);
10364
+ return _react.useCallback.call(void 0, (...args) => ref.current(...args), []);
10131
10365
  };
10132
10366
 
10133
10367
  // src/utils/hooks/useViewSelection.ts
@@ -10140,16 +10374,10 @@ var areRowGroupStatesEqual = (a2, b2) => {
10140
10374
  if (a2.length !== b2.length) return false;
10141
10375
  return a2.every((val, idx) => val === b2[idx]);
10142
10376
  };
10143
- var getUpdatedSearchParams = (currentParams, view) => {
10144
- const updatedParams = new URLSearchParams(currentParams);
10145
- if (view.id === "default") {
10146
- updatedParams.set("saved-view", "default");
10147
- } else if (view.id === "temporary") {
10148
- updatedParams.set("saved-view", "temporary");
10149
- } else {
10150
- updatedParams.set("saved-view", view.share_token);
10151
- }
10152
- return updatedParams;
10377
+ var getViewTokenForView = (view) => {
10378
+ if (view.id === "default") return "default";
10379
+ if (view.id === "temporary") return "temporary";
10380
+ return view.share_token;
10153
10381
  };
10154
10382
  var checkIsViewSelected = (selectedView, viewId) => {
10155
10383
  return (selectedView == null ? void 0 : selectedView.share_token) === viewId || (selectedView == null ? void 0 : selectedView.id) === viewId;
@@ -10157,55 +10385,40 @@ var checkIsViewSelected = (selectedView, viewId) => {
10157
10385
  var findViewByToken = (views, token2) => {
10158
10386
  return views.find((view) => view.share_token === token2);
10159
10387
  };
10160
- var setViewInUrl = (view, setSearchParams) => {
10161
- setSearchParams(
10162
- (currentParams) => getUpdatedSearchParams(currentParams, view),
10163
- { replace: true }
10164
- );
10165
- };
10166
- var restoreUrlParameter = (currentParam, previousParam, setSearchParams) => {
10167
- if (previousParam && !currentParam) {
10168
- setSearchParams(
10169
- (currentParams) => {
10170
- const updatedParams = new URLSearchParams(currentParams);
10171
- updatedParams.set("saved-view", previousParam);
10172
- return updatedParams;
10173
- },
10174
- { replace: true }
10175
- );
10176
- }
10177
- };
10178
10388
  var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, tableConfig) => {
10179
- const I18n = (0, import_core_react14.useI18nContext)();
10180
- const projectIdSegment = config.projectId ?? "company";
10389
+ const I18n = _corereact.useI18nContext.call(void 0, );
10390
+ const transport = useSavedViewsTransport();
10391
+ const urlAdapter = transport.useUrlAdapter();
10392
+ const projectIdSegment = _nullishCoalesce(config.projectId, () => ( "company"));
10181
10393
  const storageKey = `savedView_${config.domain}_${config.tableName}_${config.companyId}_${projectIdSegment}_${config.userId}`;
10182
10394
  const temporaryStorageKey = `${storageKey}-temporary`;
10183
- const [searchParams, setSearchParams] = (0, import_react_router_dom.useSearchParams)();
10184
- const previousSavedViewParamRef = (0, import_react13.useRef)(null);
10185
- const [selectedSavedView, setSelectedSavedView] = (0, import_react13.useState)(() => {
10395
+ const previousSavedViewParamRef = _react.useRef.call(void 0, null);
10396
+ const intendedTokenRef = _react.useRef.call(void 0, null);
10397
+ const [selectedSavedView, setSelectedSavedView] = _react.useState.call(void 0, () => {
10186
10398
  const stored = ViewStorage.load(storageKey, config.defaultView);
10187
- return stored ?? config.defaultView;
10399
+ return _nullishCoalesce(stored, () => ( config.defaultView));
10188
10400
  });
10189
- const [temporaryView, setTemporaryView] = (0, import_react13.useState)(() => {
10401
+ const [temporaryView, setTemporaryView] = _react.useState.call(void 0, () => {
10190
10402
  const loaded = ViewStorage.load(temporaryStorageKey, config.defaultView);
10191
10403
  return loaded && (loaded.id === "temporary" || loaded.view_level === "temporary") ? loaded : null;
10192
10404
  });
10193
- const persistViewToStorageAndUrl = (0, import_react13.useCallback)(
10405
+ const persistViewToStorageAndUrl = _react.useCallback.call(void 0,
10194
10406
  (view) => {
10195
10407
  ViewStorage.save(storageKey, view);
10196
- setViewInUrl(view, setSearchParams);
10408
+ intendedTokenRef.current = getViewTokenForView(view);
10409
+ urlAdapter.setViewToken(getViewTokenForView(view));
10197
10410
  },
10198
- [storageKey, setSearchParams]
10411
+ [storageKey, urlAdapter]
10199
10412
  );
10200
- const baseViews = (0, import_react13.useMemo)(
10201
- () => [...savedViews ?? [], ...presetViews ?? []],
10413
+ const baseViews = _react.useMemo.call(void 0,
10414
+ () => [..._nullishCoalesce(savedViews, () => ( [])), ..._nullishCoalesce(presetViews, () => ( []))],
10202
10415
  [savedViews, presetViews]
10203
10416
  );
10204
- const allViews = (0, import_react13.useMemo)(
10417
+ const allViews = _react.useMemo.call(void 0,
10205
10418
  () => temporaryView ? [...baseViews, temporaryView] : baseViews,
10206
10419
  [baseViews, temporaryView]
10207
10420
  );
10208
- const selectView = (0, import_react13.useCallback)(
10421
+ const selectView = _react.useCallback.call(void 0,
10209
10422
  (view) => {
10210
10423
  const viewToSelect = config.onSelect({ item: view });
10211
10424
  setSelectedSavedView(viewToSelect);
@@ -10214,7 +10427,7 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10214
10427
  },
10215
10428
  [config, persistViewToStorageAndUrl]
10216
10429
  );
10217
- const createTemporaryView = (0, import_react13.useCallback)(
10430
+ const createTemporaryView = _react.useCallback.call(void 0,
10218
10431
  (fetchedView) => {
10219
10432
  const tempView = {
10220
10433
  ...fetchedView,
@@ -10229,12 +10442,12 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10229
10442
  },
10230
10443
  [temporaryStorageKey, selectView]
10231
10444
  );
10232
- const clearTemporaryView = (0, import_react13.useCallback)(() => {
10445
+ const clearTemporaryView = _react.useCallback.call(void 0, () => {
10233
10446
  ViewStorage.remove(temporaryStorageKey);
10234
10447
  setTemporaryView(null);
10235
10448
  selectView(config.defaultView);
10236
10449
  }, [temporaryStorageKey, config.defaultView, selectView]);
10237
- const isViewAlreadySelected = (0, import_react13.useCallback)(
10450
+ const isViewAlreadySelected = _react.useCallback.call(void 0,
10238
10451
  (viewId) => checkIsViewSelected(selectedSavedView, viewId),
10239
10452
  [selectedSavedView]
10240
10453
  );
@@ -10249,28 +10462,34 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10249
10462
  openSharedViewModal(viewId);
10250
10463
  }
10251
10464
  });
10252
- (0, import_react13.useEffect)(() => {
10253
- const savedViewId = searchParams.get("saved-view");
10254
- restoreUrlParameter(
10255
- savedViewId,
10256
- previousSavedViewParamRef.current,
10257
- setSearchParams
10258
- );
10259
- if (savedViewId) {
10260
- previousSavedViewParamRef.current = savedViewId;
10465
+ const savedViewIdFromUrl = urlAdapter.getViewToken();
10466
+ _react.useEffect.call(void 0, () => {
10467
+ const intendedToken = intendedTokenRef.current;
10468
+ if (intendedToken !== null && savedViewIdFromUrl !== intendedToken) {
10469
+ urlAdapter.setViewToken(intendedToken);
10470
+ return;
10471
+ }
10472
+ if (intendedToken !== null && savedViewIdFromUrl === intendedToken) {
10473
+ intendedTokenRef.current = null;
10474
+ }
10475
+ if (previousSavedViewParamRef.current && !savedViewIdFromUrl) {
10476
+ urlAdapter.setViewToken(previousSavedViewParamRef.current);
10261
10477
  }
10262
- if (savedViewId && savedViews) {
10263
- handleSavedViewFromUrl(savedViewId);
10478
+ if (savedViewIdFromUrl) {
10479
+ previousSavedViewParamRef.current = savedViewIdFromUrl;
10264
10480
  }
10265
- }, [searchParams, handleSavedViewFromUrl, allViews.length]);
10266
- const previousRowGroupStateRef = (0, import_react13.useRef)(
10481
+ if (savedViewIdFromUrl && savedViews) {
10482
+ handleSavedViewFromUrl(savedViewIdFromUrl);
10483
+ }
10484
+ }, [savedViewIdFromUrl, handleSavedViewFromUrl, allViews.length, urlAdapter]);
10485
+ const previousRowGroupStateRef = _react.useRef.call(void 0,
10267
10486
  isSmartGridConfig(tableConfig) ? tableConfig.rowGroupState : void 0
10268
10487
  );
10269
- const selectedViewRef = (0, import_react13.useRef)(selectedSavedView);
10488
+ const selectedViewRef = _react.useRef.call(void 0, selectedSavedView);
10270
10489
  selectedViewRef.current = selectedSavedView;
10271
- const defaultViewRef = (0, import_react13.useRef)(config.defaultView);
10490
+ const defaultViewRef = _react.useRef.call(void 0, config.defaultView);
10272
10491
  defaultViewRef.current = config.defaultView;
10273
- (0, import_react13.useEffect)(() => {
10492
+ _react.useEffect.call(void 0, () => {
10274
10493
  var _a;
10275
10494
  if (!isSmartGridConfig(tableConfig) || !(presetViews == null ? void 0 : presetViews.length)) return;
10276
10495
  const currentView = selectedViewRef.current;
@@ -10311,13 +10530,13 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
10311
10530
  };
10312
10531
 
10313
10532
  // src/components/saved-views/FocusScopeToggle.tsx
10314
- var import_focus = require("@react-aria/focus");
10315
- var import_react14 = require("react");
10533
+ var _focus = require('@react-aria/focus');
10534
+
10316
10535
  var useFocusScopeToggle = (isOpen) => {
10317
- const focusManager = (0, import_focus.useFocusManager)();
10318
- const triggerRef = (0, import_react14.useRef)(null);
10319
- const firstFocusedElementRef = (0, import_react14.useRef)(null);
10320
- (0, import_react14.useEffect)(() => {
10536
+ const focusManager = _focus.useFocusManager.call(void 0, );
10537
+ const triggerRef = _react.useRef.call(void 0, null);
10538
+ const firstFocusedElementRef = _react.useRef.call(void 0, null);
10539
+ _react.useEffect.call(void 0, () => {
10321
10540
  var _a, _b;
10322
10541
  const handleKeyDown = (event) => {
10323
10542
  var _a2;
@@ -10360,12 +10579,29 @@ var FocusScopeToggle = ({ isOpen }) => {
10360
10579
  };
10361
10580
 
10362
10581
  // src/components/saved-views/SavedViews.tsx
10363
- var import_focus2 = require("@react-aria/focus");
10582
+
10583
+
10584
+ // src/transport/default-lazy.ts
10585
+ var cached;
10586
+ var inFlight;
10587
+ var getCachedDefaultTransport = () => cached;
10588
+ var loadDefaultTransport = () => {
10589
+ if (cached) return Promise.resolve(cached);
10590
+ if (inFlight) return inFlight;
10591
+ inFlight = Promise.resolve().then(() => _interopRequireWildcard(require("./transport/default.js"))).then((mod) => {
10592
+ cached = mod.defaultTransport;
10593
+ inFlight = void 0;
10594
+ return mod.defaultTransport;
10595
+ });
10596
+ return inFlight;
10597
+ };
10598
+
10599
+ // src/components/saved-views/SavedViews.tsx
10364
10600
  var StyledPanel = pt.div`
10365
10601
  border: ${({ provider }) => provider === "data-table" ? "1px solid #d6dadc" : "none"};
10366
10602
  `;
10367
- var queryClient = new import_react_query3.QueryClient();
10368
10603
  var SavedViewsContent = (props) => {
10604
+ var _a;
10369
10605
  const { projectId, companyId } = props;
10370
10606
  const queryInput = {
10371
10607
  domain: props.domain,
@@ -10375,15 +10611,15 @@ var SavedViewsContent = (props) => {
10375
10611
  };
10376
10612
  const { data: savedViews } = useSavedViewsQuery(queryInput);
10377
10613
  const { mutate: deleteSavedView } = useDeleteSavedView(queryInput);
10378
- const { showToast } = (0, import_toast_alert3.useToastAlertContext)();
10379
- const i18n = (0, import_core_react15.useI18nContext)();
10380
- const [activeModal, setActiveModal] = (0, import_react15.useState)(null);
10381
- const [modalData, setModalData] = (0, import_react15.useState)(null);
10614
+ const { showToast } = _toastalert.useToastAlertContext.call(void 0, );
10615
+ const i18n = _corereact.useI18nContext.call(void 0, );
10616
+ const [activeModal, setActiveModal] = _react.useState.call(void 0, null);
10617
+ const [modalData, setModalData] = _react.useState.call(void 0, null);
10382
10618
  const openModal = (type, data) => {
10383
10619
  setActiveModal(type);
10384
- setModalData(data ?? null);
10620
+ setModalData(_nullishCoalesce(data, () => ( null)));
10385
10621
  };
10386
- const closeModal = (0, import_react15.useCallback)(() => {
10622
+ const closeModal = _react.useCallback.call(void 0, () => {
10387
10623
  setActiveModal(null);
10388
10624
  setModalData(null);
10389
10625
  }, []);
@@ -10413,7 +10649,7 @@ var SavedViewsContent = (props) => {
10413
10649
  props.tableConfig
10414
10650
  );
10415
10651
  const { data: fetchedView, isError: fetchError } = useFetchSavedViewById(
10416
- (modalData == null ? void 0 : modalData.viewId) ?? null,
10652
+ _nullishCoalesce((modalData == null ? void 0 : modalData.viewId), () => ( null)),
10417
10653
  queryInput,
10418
10654
  Boolean(modalData == null ? void 0 : modalData.viewId)
10419
10655
  );
@@ -10423,13 +10659,17 @@ var SavedViewsContent = (props) => {
10423
10659
  error: createError,
10424
10660
  reset: resetCreateError
10425
10661
  } = useCreateSavedView(queryInput);
10426
- (0, import_react15.useEffect)(() => {
10662
+ _react.useEffect.call(void 0, () => {
10427
10663
  if (fetchError) {
10428
10664
  showToast.error(i18n.t("savedViews.errors.notFound"));
10429
- selectView(selectedView ?? props.defaultView);
10665
+ selectView(_nullishCoalesce(selectedView, () => ( props.defaultView)));
10430
10666
  closeModal();
10431
10667
  }
10432
10668
  }, [fetchError, selectedView, props.defaultView, selectView, closeModal]);
10669
+ const setSelectedViewInContext = (_a = useSavedViewsSelection()) == null ? void 0 : _a.setSelectedView;
10670
+ _react.useEffect.call(void 0, () => {
10671
+ setSelectedViewInContext == null ? void 0 : setSelectedViewInContext(_nullishCoalesce(selectedView, () => ( null)));
10672
+ }, [selectedView, setSelectedViewInContext]);
10433
10673
  const viewSharedViewTemporarily = () => {
10434
10674
  if (fetchedView) {
10435
10675
  createTemporaryView(fetchedView);
@@ -10457,7 +10697,7 @@ var SavedViewsContent = (props) => {
10457
10697
  }
10458
10698
  };
10459
10699
  const selectCurrentViewAndCloseModal = () => {
10460
- selectView(selectedView ?? props.defaultView);
10700
+ selectView(_nullishCoalesce(selectedView, () => ( props.defaultView)));
10461
10701
  closeModal();
10462
10702
  };
10463
10703
  const deleteSelectedView = () => {
@@ -10471,19 +10711,19 @@ var SavedViewsContent = (props) => {
10471
10711
  deleteSelectedView();
10472
10712
  closeModal();
10473
10713
  };
10474
- return /* @__PURE__ */ import_react15.default.createElement(import_focus2.FocusScope, { contain: false }, /* @__PURE__ */ import_react15.default.createElement(StyledPanel, { id: "saved-views-panel", provider: props.provider }, /* @__PURE__ */ import_react15.default.createElement(FocusScopeToggle, { isOpen: props.isPanelOpen ?? true }), /* @__PURE__ */ import_react15.default.createElement(
10714
+ return /* @__PURE__ */ React.default.createElement(_focus.FocusScope, { contain: false }, /* @__PURE__ */ React.default.createElement(StyledPanel, { id: "saved-views-panel", provider: props.provider }, /* @__PURE__ */ React.default.createElement(FocusScopeToggle, { isOpen: _nullishCoalesce(props.isPanelOpen, () => ( true)) }), /* @__PURE__ */ React.default.createElement(
10475
10715
  ExpandedPanel,
10476
10716
  {
10477
10717
  "data-testid": "saved-view-expanded-panel",
10478
10718
  provider: props.provider
10479
10719
  },
10480
- /* @__PURE__ */ import_react15.default.createElement(import_core_react15.Panel.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ import_react15.default.createElement(import_core_react15.Panel.Title, null, /* @__PURE__ */ import_react15.default.createElement(import_core_react15.Flex, { alignItems: "center" }, /* @__PURE__ */ import_react15.default.createElement(import_core_react15.Box, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ import_react15.default.createElement(
10481
- import_core_react15.Tooltip,
10720
+ /* @__PURE__ */ React.default.createElement(_corereact.Panel.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ React.default.createElement(_corereact.Panel.Title, null, /* @__PURE__ */ React.default.createElement(_corereact.Flex, { alignItems: "center" }, /* @__PURE__ */ React.default.createElement(_corereact.Box, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ React.default.createElement(
10721
+ _corereact.Tooltip,
10482
10722
  {
10483
10723
  showDelay: 200,
10484
- overlay: /* @__PURE__ */ import_react15.default.createElement(import_core_react15.Tooltip.Content, null, i18n.t("savedViews.tooltip"))
10724
+ overlay: /* @__PURE__ */ React.default.createElement(_corereact.Tooltip.Content, null, i18n.t("savedViews.tooltip"))
10485
10725
  },
10486
- /* @__PURE__ */ import_react15.default.createElement(
10726
+ /* @__PURE__ */ React.default.createElement(
10487
10727
  Help_default,
10488
10728
  {
10489
10729
  tabIndex: 0,
@@ -10491,16 +10731,16 @@ var SavedViewsContent = (props) => {
10491
10731
  "aria-label": i18n.t("savedViews.tooltip")
10492
10732
  }
10493
10733
  )
10494
- ))), /* @__PURE__ */ import_react15.default.createElement(
10495
- import_core_react15.Tooltip,
10734
+ ))), /* @__PURE__ */ React.default.createElement(
10735
+ _corereact.Tooltip,
10496
10736
  {
10497
10737
  overlay: i18n.t("savedViews.actions.create"),
10498
10738
  showDelay: 1e3
10499
10739
  },
10500
- /* @__PURE__ */ import_react15.default.createElement(
10501
- import_core_react15.Button,
10740
+ /* @__PURE__ */ React.default.createElement(
10741
+ _corereact.Button,
10502
10742
  {
10503
- icon: /* @__PURE__ */ import_react15.default.createElement(Plus_default, null),
10743
+ icon: /* @__PURE__ */ React.default.createElement(Plus_default, null),
10504
10744
  variant: "secondary",
10505
10745
  "data-testid": "expanded-panel-create-button",
10506
10746
  onClick: () => openModal("create" /* CREATE */),
@@ -10509,7 +10749,7 @@ var SavedViewsContent = (props) => {
10509
10749
  i18n.t("savedViews.actions.create")
10510
10750
  )
10511
10751
  )),
10512
- /* @__PURE__ */ import_react15.default.createElement(import_core_react15.Panel.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ import_react15.default.createElement(
10752
+ /* @__PURE__ */ React.default.createElement(_corereact.Panel.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ React.default.createElement(
10513
10753
  PanelContent,
10514
10754
  {
10515
10755
  onSelect: ({ item }) => selectView(item),
@@ -10526,7 +10766,7 @@ var SavedViewsContent = (props) => {
10526
10766
  onClearTemporary: clearTemporaryView
10527
10767
  }
10528
10768
  ))
10529
- ), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ import_react15.default.createElement(
10769
+ ), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ React.default.createElement(
10530
10770
  FormModal,
10531
10771
  {
10532
10772
  open: true,
@@ -10540,14 +10780,14 @@ var SavedViewsContent = (props) => {
10540
10780
  setOpenEditCreateModal: closeModal,
10541
10781
  defaultView: props.defaultView
10542
10782
  }
10543
- ), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ import_react15.default.createElement(
10783
+ ), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ React.default.createElement(
10544
10784
  SavedViewsDeleteConfirmationModalShared,
10545
10785
  {
10546
10786
  open: true,
10547
10787
  onDelete: confirmDeleteAndCloseModal,
10548
10788
  onCancel: closeModal
10549
10789
  }
10550
- ), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ import_react15.default.createElement(
10790
+ ), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ React.default.createElement(
10551
10791
  SharedViewFormModal,
10552
10792
  {
10553
10793
  open: true,
@@ -10562,14 +10802,34 @@ var SavedViewsContent = (props) => {
10562
10802
  )));
10563
10803
  };
10564
10804
  var SavedViews = (props) => {
10565
- return /* @__PURE__ */ import_react15.default.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ import_react15.default.createElement(import_react_query3.QueryClientProvider, { client: queryClient }, /* @__PURE__ */ import_react15.default.createElement(import_toast_alert3.ToastAlertProvider, null, /* @__PURE__ */ import_react15.default.createElement(SavedViewsContent, { ...props }))));
10805
+ const [resolvedDefault, setResolvedDefault] = _react.useState.call(void 0, () => props.transport ? void 0 : getCachedDefaultTransport());
10806
+ const [transportLoadError, setTransportLoadError] = _react.useState.call(void 0, void 0);
10807
+ _react.useEffect.call(void 0, () => {
10808
+ if (props.transport || resolvedDefault) return;
10809
+ let cancelled = false;
10810
+ void loadDefaultTransport().then((transport2) => {
10811
+ if (!cancelled) setResolvedDefault(transport2);
10812
+ }).catch((err) => {
10813
+ if (!cancelled) setTransportLoadError(err);
10814
+ });
10815
+ return () => {
10816
+ cancelled = true;
10817
+ };
10818
+ }, [props.transport, resolvedDefault]);
10819
+ const transport = _nullishCoalesce(props.transport, () => ( resolvedDefault));
10820
+ if (!transport) {
10821
+ if (transportLoadError) throw transportLoadError;
10822
+ return null;
10823
+ }
10824
+ const { CacheProvider } = transport;
10825
+ return /* @__PURE__ */ React.default.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ React.default.createElement(SavedViewsTransportProvider, { transport }, /* @__PURE__ */ React.default.createElement(CacheProvider, null, /* @__PURE__ */ React.default.createElement(_toastalert.ToastAlertProvider, null, /* @__PURE__ */ React.default.createElement(SavedViewsContent, { ...props })))));
10566
10826
  };
10567
10827
 
10568
10828
  // src/components/adapters/smart-grid/SmartGridSavedViews.tsx
10569
- var import_react19 = __toESM(require("react"));
10829
+
10570
10830
 
10571
10831
  // src/components/adapters/smart-grid/SmartGridDefaultSavedView.tsx
10572
- var import_react16 = require("react");
10832
+
10573
10833
  var DEFAULT_COLUMN_STATE = {
10574
10834
  hide: false,
10575
10835
  pinned: null,
@@ -10585,13 +10845,13 @@ var DEFAULT_COLUMN_STATE = {
10585
10845
  };
10586
10846
  var getColumnStateFromDefs = (columnDefs) => {
10587
10847
  return columnDefs.map((colDef) => {
10588
- const field = colDef.field ?? colDef.colId;
10848
+ const field = _nullishCoalesce(colDef.field, () => ( colDef.colId));
10589
10849
  if (!field) return null;
10590
10850
  return {
10591
10851
  colId: field,
10592
- hide: colDef.hide ?? false,
10593
- pinned: colDef.pinned ?? null,
10594
- width: colDef.width ?? colDef.minWidth ?? DEFAULT_COLUMN_STATE.width,
10852
+ hide: _nullishCoalesce(colDef.hide, () => ( false)),
10853
+ pinned: _nullishCoalesce(colDef.pinned, () => ( null)),
10854
+ width: _nullishCoalesce(_nullishCoalesce(colDef.width, () => ( colDef.minWidth)), () => ( DEFAULT_COLUMN_STATE.width)),
10595
10855
  sort: null,
10596
10856
  sortIndex: null,
10597
10857
  pivot: false,
@@ -10599,25 +10859,25 @@ var getColumnStateFromDefs = (columnDefs) => {
10599
10859
  aggFunc: null,
10600
10860
  rowGroup: false,
10601
10861
  rowGroupIndex: null,
10602
- flex: colDef.flex ?? null
10862
+ flex: _nullishCoalesce(colDef.flex, () => ( null))
10603
10863
  };
10604
10864
  }).filter((col) => col !== null);
10605
10865
  };
10606
10866
  var extractDefaultView = (gridApi, receivedConfig) => {
10607
10867
  var _a, _b;
10608
- const columnDefs = gridApi.getColumnDefs() ?? [];
10868
+ const columnDefs = _nullishCoalesce(gridApi.getColumnDefs(), () => ( []));
10609
10869
  const defaultColumnState = ((_a = receivedConfig == null ? void 0 : receivedConfig.columnState) == null ? void 0 : _a.length) ? receivedConfig.columnState : getColumnStateFromDefs(columnDefs);
10610
10870
  const result = {
10611
10871
  columnState: defaultColumnState,
10612
- columnGroupState: (receivedConfig == null ? void 0 : receivedConfig.columnGroupState) ?? [],
10613
- rowGroupState: (receivedConfig == null ? void 0 : receivedConfig.rowGroupState) ?? [],
10614
- filterState: (receivedConfig == null ? void 0 : receivedConfig.filterState) ?? {},
10615
- rowHeight: (receivedConfig == null ? void 0 : receivedConfig.rowHeight) ?? ((_b = gridApi.getSizesForCurrentTheme()) == null ? void 0 : _b.rowHeight)
10872
+ columnGroupState: _nullishCoalesce((receivedConfig == null ? void 0 : receivedConfig.columnGroupState), () => ( [])),
10873
+ rowGroupState: _nullishCoalesce((receivedConfig == null ? void 0 : receivedConfig.rowGroupState), () => ( [])),
10874
+ filterState: _nullishCoalesce((receivedConfig == null ? void 0 : receivedConfig.filterState), () => ( {})),
10875
+ rowHeight: _nullishCoalesce((receivedConfig == null ? void 0 : receivedConfig.rowHeight), () => ( ((_b = gridApi.getSizesForCurrentTheme()) == null ? void 0 : _b.rowHeight)))
10616
10876
  };
10617
10877
  return result;
10618
10878
  };
10619
10879
  var useNormalizedDefaultViews = (defaultViews, gridApi) => {
10620
- return (0, import_react16.useMemo)(() => {
10880
+ return _react.useMemo.call(void 0, () => {
10621
10881
  if (!gridApi)
10622
10882
  return defaultViews.map((view) => ({ ...view, share_token: view.id }));
10623
10883
  return defaultViews.map((view) => ({
@@ -10629,7 +10889,7 @@ var useNormalizedDefaultViews = (defaultViews, gridApi) => {
10629
10889
  };
10630
10890
 
10631
10891
  // src/components/adapters/smart-grid/useSmartGridConfig.ts
10632
- var import_react17 = require("react");
10892
+
10633
10893
  var GRID_STATE_EVENTS = [
10634
10894
  "sortChanged",
10635
10895
  "filterOpened",
@@ -10645,10 +10905,10 @@ var GRID_STATE_EVENTS = [
10645
10905
  "gridReady"
10646
10906
  ];
10647
10907
  var useSmartGridConfig = (gridApi) => {
10648
- const [config, setConfig] = (0, import_react17.useState)(
10908
+ const [config, setConfig] = _react.useState.call(void 0,
10649
10909
  () => getSmartGridConfig(gridApi)
10650
10910
  );
10651
- (0, import_react17.useEffect)(() => {
10911
+ _react.useEffect.call(void 0, () => {
10652
10912
  if (!gridApi) return;
10653
10913
  const updateConfig = () => {
10654
10914
  setConfig(getSmartGridConfig(gridApi));
@@ -10666,14 +10926,14 @@ var useSmartGridConfig = (gridApi) => {
10666
10926
  };
10667
10927
 
10668
10928
  // src/components/adapters/smart-grid/useSavedViewsPanelOpen.ts
10669
- var import_react18 = require("react");
10929
+
10670
10930
  var SAVED_VIEWS_PANEL_ID = "savedViews";
10671
10931
  var useSavedViewsPanelOpen = (gridApi) => {
10672
10932
  var _a;
10673
- const [isOpen, setIsOpen] = (0, import_react18.useState)(
10933
+ const [isOpen, setIsOpen] = _react.useState.call(void 0,
10674
10934
  ((_a = gridApi.getOpenedToolPanel) == null ? void 0 : _a.call(gridApi)) === SAVED_VIEWS_PANEL_ID
10675
10935
  );
10676
- (0, import_react18.useEffect)(() => {
10936
+ _react.useEffect.call(void 0, () => {
10677
10937
  var _a2;
10678
10938
  const syncOpenState = () => {
10679
10939
  var _a3;
@@ -10695,8 +10955,8 @@ var SmartGridSavedViews = (props) => {
10695
10955
  const { config: tableConfig, setConfig: setTableConfig } = useSmartGridConfig(gridApi);
10696
10956
  const isPanelOpen = useSavedViewsPanelOpen(gridApi);
10697
10957
  const presetViews = useNormalizedDefaultViews(props.defaultViews, gridApi);
10698
- const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
10699
- const onSelect = (0, import_react19.useCallback)(
10958
+ const defaultView = _nullishCoalesce(presetViews.find((view) => view.id === "default"), () => ( presetViews[0]));
10959
+ const onSelect = _react.useCallback.call(void 0,
10700
10960
  ({ item }) => {
10701
10961
  var _a;
10702
10962
  if (!gridApi) return item;
@@ -10705,7 +10965,7 @@ var SmartGridSavedViews = (props) => {
10705
10965
  updateTableConfig(item, gridApi, "smart-grid");
10706
10966
  setTableConfig({
10707
10967
  ...item.table_config,
10708
- filterState: ((_a = gridApi.getFilterModel) == null ? void 0 : _a.call(gridApi)) ?? {}
10968
+ filterState: _nullishCoalesce(((_a = gridApi.getFilterModel) == null ? void 0 : _a.call(gridApi)), () => ( {}))
10709
10969
  });
10710
10970
  return item;
10711
10971
  }
@@ -10718,13 +10978,13 @@ var SmartGridSavedViews = (props) => {
10718
10978
  };
10719
10979
  updateTableConfig(updatedView, gridApi, "smart-grid");
10720
10980
  const updatedConfig = updatedView.table_config;
10721
- gridApi.setFilterModel(updatedConfig.filterState ?? {});
10981
+ gridApi.setFilterModel(_nullishCoalesce(updatedConfig.filterState, () => ( {})));
10722
10982
  setTableConfig(updatedConfig);
10723
10983
  return updatedView;
10724
10984
  },
10725
10985
  [gridApi, tableConfig, setTableConfig]
10726
10986
  );
10727
- return /* @__PURE__ */ import_react19.default.createElement(
10987
+ return /* @__PURE__ */ React.default.createElement(
10728
10988
  SavedViews,
10729
10989
  {
10730
10990
  onSelect,
@@ -10737,16 +10997,22 @@ var SmartGridSavedViews = (props) => {
10737
10997
  presetViews,
10738
10998
  tableName: props.tableName,
10739
10999
  tableConfig,
10740
- isPanelOpen
11000
+ isPanelOpen,
11001
+ transport: props.transport
10741
11002
  }
10742
11003
  );
10743
11004
  };
10744
11005
 
10745
11006
  // src/components/adapters/data-table/DataTableSavedViews.tsx
10746
- var import_react21 = __toESM(require("react"));
11007
+
11008
+
11009
+
11010
+
11011
+
11012
+
10747
11013
 
10748
11014
  // src/components/adapters/data-table/DataTableDefaultSavedView.tsx
10749
- var import_react20 = require("react");
11015
+
10750
11016
  var DEFAULT_COLUMN_STATE2 = {
10751
11017
  hidden: false,
10752
11018
  pinned: null,
@@ -10767,13 +11033,13 @@ var getColumnState = (columnDefinitions) => {
10767
11033
  }
10768
11034
  return {
10769
11035
  field: column2.field,
10770
- hidden: column2.hidden ?? false,
10771
- pinned: column2.pinned ?? null,
11036
+ hidden: _nullishCoalesce(column2.hidden, () => ( false)),
11037
+ pinned: _nullishCoalesce(column2.pinned, () => ( null)),
10772
11038
  rowGroup: false,
10773
11039
  rowGroupIndex: null,
10774
11040
  sort: null,
10775
11041
  sortIndex: null,
10776
- width: (column2.minWidth ?? DEFAULT_COLUMN_STATE2.width) > DEFAULT_COLUMN_STATE2.width ? column2.minWidth ?? DEFAULT_COLUMN_STATE2.width : (column2.maxWidth ?? DEFAULT_COLUMN_STATE2.width) < DEFAULT_COLUMN_STATE2.width ? column2.maxWidth ?? DEFAULT_COLUMN_STATE2.width : DEFAULT_COLUMN_STATE2.width
11042
+ width: (_nullishCoalesce(column2.minWidth, () => ( DEFAULT_COLUMN_STATE2.width))) > DEFAULT_COLUMN_STATE2.width ? _nullishCoalesce(column2.minWidth, () => ( DEFAULT_COLUMN_STATE2.width)) : (_nullishCoalesce(column2.maxWidth, () => ( DEFAULT_COLUMN_STATE2.width))) < DEFAULT_COLUMN_STATE2.width ? _nullishCoalesce(column2.maxWidth, () => ( DEFAULT_COLUMN_STATE2.width)) : DEFAULT_COLUMN_STATE2.width
10777
11043
  };
10778
11044
  });
10779
11045
  };
@@ -10782,19 +11048,19 @@ var extractDefaultView2 = (columnDefinitions, receivedConfigFromTool) => {
10782
11048
  const defaultColumnState = getColumnState(columnDefinitions);
10783
11049
  const result = {
10784
11050
  columnState: ((_a = receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.columnState) == null ? void 0 : _a.length) ? receivedConfigFromTool.columnState : defaultColumnState,
10785
- serverFilters: (receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.serverFilters) ?? [],
10786
- columnGroupState: (receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.columnGroupState) ?? [],
10787
- filters: (receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.filters) ?? {},
11051
+ serverFilters: _nullishCoalesce((receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.serverFilters), () => ( [])),
11052
+ columnGroupState: _nullishCoalesce((receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.columnGroupState), () => ( [])),
11053
+ filters: _nullishCoalesce((receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.filters), () => ( {})),
10788
11054
  groupRowState: {
10789
- expandedRoutes: ((_b = receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.groupRowState) == null ? void 0 : _b.expandedRoutes) ?? [],
10790
- collapsedRoutes: ((_c = receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.groupRowState) == null ? void 0 : _c.collapsedRoutes) ?? []
11055
+ expandedRoutes: _nullishCoalesce(((_b = receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.groupRowState) == null ? void 0 : _b.expandedRoutes), () => ( [])),
11056
+ collapsedRoutes: _nullishCoalesce(((_c = receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.groupRowState) == null ? void 0 : _c.collapsedRoutes), () => ( []))
10791
11057
  },
10792
- rowHeight: (receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.rowHeight) ?? MEDIUM_ROW_HEIGHT
11058
+ rowHeight: _nullishCoalesce((receivedConfigFromTool == null ? void 0 : receivedConfigFromTool.rowHeight), () => ( MEDIUM_ROW_HEIGHT))
10793
11059
  };
10794
11060
  return result;
10795
11061
  };
10796
11062
  var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
10797
- return (0, import_react20.useMemo)(
11063
+ return _react.useMemo.call(void 0,
10798
11064
  () => defaultViews.map((view) => ({
10799
11065
  ...view,
10800
11066
  share_token: view.id,
@@ -10805,26 +11071,26 @@ var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
10805
11071
  };
10806
11072
 
10807
11073
  // src/components/adapters/data-table/DataTableSavedViews.tsx
10808
- var DataTableSavedViews = (0, import_react21.forwardRef)((props, ref) => {
11074
+ var DataTableSavedViews = _react.forwardRef.call(void 0, (props, ref) => {
10809
11075
  const { tableApi, userId, projectId, companyId } = props;
10810
11076
  const presetViews = useNormalizedDefaultViews2(
10811
11077
  props.defaultViews,
10812
11078
  props.columnDefinitions
10813
11079
  );
10814
- const defaultView = presetViews.find((view) => view.id === "default") ?? presetViews[0];
10815
- const [internalTableConfig, setInternalTableConfig] = (0, import_react21.useState)(
11080
+ const defaultView = _nullishCoalesce(presetViews.find((view) => view.id === "default"), () => ( presetViews[0]));
11081
+ const [internalTableConfig, setInternalTableConfig] = _react.useState.call(void 0,
10816
11082
  ViewStorage.load(props.stickyViewsKey, defaultView).table_config
10817
11083
  );
10818
- (0, import_react21.useImperativeHandle)(ref, () => ({
11084
+ _react.useImperativeHandle.call(void 0, ref, () => ({
10819
11085
  setTableConfig: (newConfig) => {
10820
11086
  setInternalTableConfig(newConfig);
10821
11087
  }
10822
11088
  }));
10823
- const onSelect = (0, import_react21.useCallback)(
11089
+ const onSelect = _react.useCallback.call(void 0,
10824
11090
  ({ item }) => {
10825
11091
  var _a;
10826
11092
  const isPresetView = item.view_level === "default";
10827
- const syncReferenceConfig = ((_a = tableApi == null ? void 0 : tableApi.getTableConfiguration) == null ? void 0 : _a.call(tableApi)) ?? defaultView.table_config;
11093
+ const syncReferenceConfig = _nullishCoalesce(((_a = tableApi == null ? void 0 : tableApi.getTableConfiguration) == null ? void 0 : _a.call(tableApi)), () => ( defaultView.table_config));
10828
11094
  const syncedConfig = isPresetView ? item.table_config : customAndConfigSync(
10829
11095
  item.table_config,
10830
11096
  syncReferenceConfig
@@ -10844,7 +11110,7 @@ var DataTableSavedViews = (0, import_react21.forwardRef)((props, ref) => {
10844
11110
  if (!internalTableConfig) {
10845
11111
  return null;
10846
11112
  }
10847
- return /* @__PURE__ */ import_react21.default.createElement(
11113
+ return /* @__PURE__ */ React.default.createElement(
10848
11114
  SavedViews,
10849
11115
  {
10850
11116
  onSelect,
@@ -10856,24 +11122,26 @@ var DataTableSavedViews = (0, import_react21.forwardRef)((props, ref) => {
10856
11122
  defaultView,
10857
11123
  presetViews,
10858
11124
  tableName: props.tableName,
10859
- tableConfig: internalTableConfig
11125
+ tableConfig: internalTableConfig,
11126
+ transport: props.transport
10860
11127
  }
10861
11128
  );
10862
11129
  });
10863
11130
  DataTableSavedViews.displayName = "DataTableSavedViews";
10864
- // Annotate the CommonJS export names for ESM import in node:
10865
- 0 && (module.exports = {
10866
- DataTableSavedViews,
10867
- ExpandedPanel,
10868
- FormModal,
10869
- PanelContent,
10870
- SavedViewCollectionMenuItem,
10871
- SavedViews,
10872
- SavedViewsDeleteConfirmationModalShared,
10873
- SmartGridSavedViews,
10874
- getTranslations,
10875
- useSavedViewsPanel
10876
- });
11131
+
11132
+
11133
+
11134
+
11135
+
11136
+
11137
+
11138
+
11139
+
11140
+
11141
+
11142
+
11143
+
11144
+ exports.DataTableSavedViews = DataTableSavedViews; exports.ExpandedPanel = ExpandedPanel; exports.FormModal = FormModal; exports.PanelContent = PanelContent; exports.SavedViewCollectionMenuItem = SavedViewCollectionMenuItem; exports.SavedViews = SavedViews; exports.SavedViewsDeleteConfirmationModalShared = SavedViewsDeleteConfirmationModalShared; exports.SavedViewsSelectionProvider = SavedViewsSelectionProvider; exports.SmartGridSavedViews = SmartGridSavedViews; exports.getTranslations = getTranslations; exports.useSavedViewsPanel = useSavedViewsPanel_default; exports.useSavedViewsSelection = useSavedViewsSelection;
10877
11145
  /*! Bundled license information:
10878
11146
 
10879
11147
  lodash/lodash.js: