@procore/saved-views 5.0.0 → 5.1.0-alpha.1

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.
@@ -63,7 +63,7 @@ var require_big = __commonJS({
63
63
  "use strict";
64
64
  (function(GLOBAL) {
65
65
  "use strict";
66
- var Big, DP = 20, RM = 1, MAX_DP = 1e6, MAX_POWER = 1e6, NE = -7, PE = 21, STRICT = false, NAME = "[big.js] ", INVALID = NAME + "Invalid ", INVALID_DP = INVALID + "decimal places", INVALID_RM = INVALID + "rounding mode", DIV_BY_ZERO = NAME + "Division by zero", P3 = {}, UNDEFINED = void 0, NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
66
+ var Big, DP = 20, RM = 1, MAX_DP = 1e6, MAX_POWER = 1e6, NE = -7, PE = 21, STRICT = false, NAME = "[big.js] ", INVALID = NAME + "Invalid ", INVALID_DP = INVALID + "decimal places", INVALID_RM = INVALID + "rounding mode", DIV_BY_ZERO = NAME + "Division by zero", P4 = {}, UNDEFINED = void 0, NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
67
67
  function _Big_() {
68
68
  function Big2(n2) {
69
69
  var x2 = this;
@@ -84,7 +84,7 @@ var require_big = __commonJS({
84
84
  }
85
85
  x2.constructor = Big2;
86
86
  }
87
- Big2.prototype = P3;
87
+ Big2.prototype = P4;
88
88
  Big2.DP = DP;
89
89
  Big2.RM = RM;
90
90
  Big2.NE = NE;
@@ -181,12 +181,12 @@ var require_big = __commonJS({
181
181
  }
182
182
  return x2.s < 0 && isNonzero ? "-" + s2 : s2;
183
183
  }
184
- P3.abs = function() {
184
+ P4.abs = function() {
185
185
  var x2 = new this.constructor(this);
186
186
  x2.s = 1;
187
187
  return x2;
188
188
  };
189
- P3.cmp = function(y2) {
189
+ P4.cmp = function(y2) {
190
190
  var isneg, x2 = this, xc = x2.c, yc = (y2 = new x2.constructor(y2)).c, i2 = x2.s, j2 = y2.s, k2 = x2.e, l2 = y2.e;
191
191
  if (!xc[0] || !yc[0])
192
192
  return !xc[0] ? !yc[0] ? 0 : -j2 : i2;
@@ -202,7 +202,7 @@ var require_big = __commonJS({
202
202
  }
203
203
  return k2 == l2 ? 0 : k2 > l2 ^ isneg ? 1 : -1;
204
204
  };
205
- P3.div = function(y2) {
205
+ P4.div = function(y2) {
206
206
  var x2 = this, Big2 = x2.constructor, a2 = x2.c, b2 = (y2 = new Big2(y2)).c, k2 = x2.s == y2.s ? 1 : -1, dp = Big2.DP;
207
207
  if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
208
208
  throw Error(INVALID_DP);
@@ -265,22 +265,22 @@ var require_big = __commonJS({
265
265
  round(q2, p, Big2.RM, r2[0] !== UNDEFINED);
266
266
  return q2;
267
267
  };
268
- P3.eq = function(y2) {
268
+ P4.eq = function(y2) {
269
269
  return this.cmp(y2) === 0;
270
270
  };
271
- P3.gt = function(y2) {
271
+ P4.gt = function(y2) {
272
272
  return this.cmp(y2) > 0;
273
273
  };
274
- P3.gte = function(y2) {
274
+ P4.gte = function(y2) {
275
275
  return this.cmp(y2) > -1;
276
276
  };
277
- P3.lt = function(y2) {
277
+ P4.lt = function(y2) {
278
278
  return this.cmp(y2) < 0;
279
279
  };
280
- P3.lte = function(y2) {
280
+ P4.lte = function(y2) {
281
281
  return this.cmp(y2) < 1;
282
282
  };
283
- P3.minus = P3.sub = function(y2) {
283
+ P4.minus = P4.sub = function(y2) {
284
284
  var i2, j2, t2, xlty, x2 = this, Big2 = x2.constructor, a2 = x2.s, b2 = (y2 = new Big2(y2)).s;
285
285
  if (a2 != b2) {
286
286
  y2.s = -b2;
@@ -350,7 +350,7 @@ var require_big = __commonJS({
350
350
  y2.e = ye2;
351
351
  return y2;
352
352
  };
353
- P3.mod = function(y2) {
353
+ P4.mod = function(y2) {
354
354
  var ygtx, x2 = this, Big2 = x2.constructor, a2 = x2.s, b2 = (y2 = new Big2(y2)).s;
355
355
  if (!y2.c[0]) {
356
356
  throw Error(DIV_BY_ZERO);
@@ -369,12 +369,12 @@ var require_big = __commonJS({
369
369
  Big2.RM = b2;
370
370
  return this.minus(x2.times(y2));
371
371
  };
372
- P3.neg = function() {
372
+ P4.neg = function() {
373
373
  var x2 = new this.constructor(this);
374
374
  x2.s = -x2.s;
375
375
  return x2;
376
376
  };
377
- P3.plus = P3.add = function(y2) {
377
+ P4.plus = P4.add = function(y2) {
378
378
  var e2, k2, t2, x2 = this, Big2 = x2.constructor;
379
379
  y2 = new Big2(y2);
380
380
  if (x2.s != y2.s) {
@@ -424,7 +424,7 @@ var require_big = __commonJS({
424
424
  y2.e = ye2;
425
425
  return y2;
426
426
  };
427
- P3.pow = function(n2) {
427
+ P4.pow = function(n2) {
428
428
  var x2 = this, one = new x2.constructor("1"), y2 = one, isneg = n2 < 0;
429
429
  if (n2 !== ~~n2 || n2 < -MAX_POWER || n2 > MAX_POWER) {
430
430
  throw Error(INVALID + "exponent");
@@ -441,13 +441,13 @@ var require_big = __commonJS({
441
441
  }
442
442
  return isneg ? one.div(y2) : y2;
443
443
  };
444
- P3.prec = function(sd, rm) {
444
+ P4.prec = function(sd, rm) {
445
445
  if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
446
446
  throw Error(INVALID + "precision");
447
447
  }
448
448
  return round(new this.constructor(this), sd, rm);
449
449
  };
450
- P3.round = function(dp, rm) {
450
+ P4.round = function(dp, rm) {
451
451
  if (dp === UNDEFINED)
452
452
  dp = 0;
453
453
  else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {
@@ -455,7 +455,7 @@ var require_big = __commonJS({
455
455
  }
456
456
  return round(new this.constructor(this), dp + this.e + 1, rm);
457
457
  };
458
- P3.sqrt = function() {
458
+ P4.sqrt = function() {
459
459
  var r2, c2, t2, x2 = this, Big2 = x2.constructor, s2 = x2.s, e2 = x2.e, half = new Big2("0.5");
460
460
  if (!x2.c[0])
461
461
  return new Big2(x2);
@@ -480,7 +480,7 @@ var require_big = __commonJS({
480
480
  } while (t2.c.slice(0, e2).join("") !== r2.c.slice(0, e2).join(""));
481
481
  return round(r2, (Big2.DP -= 4) + r2.e + 1, Big2.RM);
482
482
  };
483
- P3.times = P3.mul = function(y2) {
483
+ P4.times = P4.mul = function(y2) {
484
484
  var c2, x2 = this, Big2 = x2.constructor, xc = x2.c, yc = (y2 = new Big2(y2)).c, a2 = xc.length, b2 = yc.length, i2 = x2.e, j2 = y2.e;
485
485
  y2.s = x2.s == y2.s ? 1 : -1;
486
486
  if (!xc[0] || !yc[0]) {
@@ -516,7 +516,7 @@ var require_big = __commonJS({
516
516
  y2.c = c2;
517
517
  return y2;
518
518
  };
519
- P3.toExponential = function(dp, rm) {
519
+ P4.toExponential = function(dp, rm) {
520
520
  var x2 = this, n2 = x2.c[0];
521
521
  if (dp !== UNDEFINED) {
522
522
  if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
@@ -528,7 +528,7 @@ var require_big = __commonJS({
528
528
  }
529
529
  return stringify(x2, true, !!n2);
530
530
  };
531
- P3.toFixed = function(dp, rm) {
531
+ P4.toFixed = function(dp, rm) {
532
532
  var x2 = this, n2 = x2.c[0];
533
533
  if (dp !== UNDEFINED) {
534
534
  if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
@@ -540,18 +540,18 @@ var require_big = __commonJS({
540
540
  }
541
541
  return stringify(x2, false, !!n2);
542
542
  };
543
- P3.toJSON = P3.toString = function() {
543
+ P4.toJSON = P4.toString = function() {
544
544
  var x2 = this, Big2 = x2.constructor;
545
545
  return stringify(x2, x2.e <= Big2.NE || x2.e >= Big2.PE, !!x2.c[0]);
546
546
  };
547
- P3.toNumber = function() {
547
+ P4.toNumber = function() {
548
548
  var n2 = +stringify(this, true, true);
549
549
  if (this.constructor.strict === true && !this.eq(n2.toString())) {
550
550
  throw Error(NAME + "Imprecise conversion");
551
551
  }
552
552
  return n2;
553
553
  };
554
- P3.toPrecision = function(sd, rm) {
554
+ P4.toPrecision = function(sd, rm) {
555
555
  var x2 = this, Big2 = x2.constructor, n2 = x2.c[0];
556
556
  if (sd !== UNDEFINED) {
557
557
  if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
@@ -563,7 +563,7 @@ var require_big = __commonJS({
563
563
  }
564
564
  return stringify(x2, sd <= x2.e || x2.e <= Big2.NE || x2.e >= Big2.PE, !!n2);
565
565
  };
566
- P3.valueOf = function() {
566
+ P4.valueOf = function() {
567
567
  var x2 = this, Big2 = x2.constructor;
568
568
  if (Big2.strict === true) {
569
569
  throw Error(NAME + "valueOf disallowed");
@@ -1873,13 +1873,13 @@ var require_GetFallbackLocaleList = __commonJS({
1873
1873
  var require_GetTranslationsFromLocale = __commonJS({
1874
1874
  "../../node_modules/@procore/globalization-toolkit/dist/getTranslationsFromLocale/GetTranslationsFromLocale.js"(exports2) {
1875
1875
  "use strict";
1876
- var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) {
1876
+ var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P4, generator) {
1877
1877
  function adopt(value) {
1878
- return value instanceof P3 ? value : new P3(function(resolve) {
1878
+ return value instanceof P4 ? value : new P4(function(resolve) {
1879
1879
  resolve(value);
1880
1880
  });
1881
1881
  }
1882
- return new (P3 || (P3 = Promise))(function(resolve, reject) {
1882
+ return new (P4 || (P4 = Promise))(function(resolve, reject) {
1883
1883
  function fulfilled(value) {
1884
1884
  try {
1885
1885
  step(generator.next(value));
@@ -8807,7 +8807,11 @@ var en_default = {
8807
8807
  create: "Create",
8808
8808
  edit: "Edit",
8809
8809
  cancel: "Cancel",
8810
- close: "Close"
8810
+ close: "Close",
8811
+ viewTemporarily: "View Temporarily",
8812
+ createView: "Create View",
8813
+ copyShareLink: "Copy Share Link",
8814
+ linkCopied: "Share link copied to clipboard"
8811
8815
  },
8812
8816
  modal: {
8813
8817
  edit: {
@@ -8820,6 +8824,10 @@ var en_default = {
8820
8824
  headline: "Delete Saved View",
8821
8825
  description: "This view cannot be restored once it has been deleted."
8822
8826
  },
8827
+ copyConfirmation: {
8828
+ headline: 'Create "{{savedViewName}}" as a personal saved view?',
8829
+ description: "You pasted a link to a saved view that does not yet exist for you. You can create it as a personal saved view or just view it temporarily."
8830
+ },
8823
8831
  fields: {
8824
8832
  name: "Name",
8825
8833
  description: "Description",
@@ -8852,11 +8860,15 @@ var en_default = {
8852
8860
  update: {
8853
8861
  success: "The saved view was successfully updated."
8854
8862
  },
8863
+ copy: {
8864
+ success: "The link was successfully created and copied to the clipboard."
8865
+ },
8855
8866
  errors: {
8856
8867
  fetch: "Sorry, the saved views couldn't be fetched. Try again.",
8857
8868
  create: "Sorry, the saved view couldn't be created. Try again.",
8858
8869
  update: "Sorry, the saved view couldn't be updated. Try again.",
8859
- delete: "Sorry, the saved view couldn't be deleted. Try again."
8870
+ delete: "Sorry, the saved view couldn't be deleted. Try again.",
8871
+ copyFailed: "Failed to copy share link to clipboard"
8860
8872
  },
8861
8873
  defaultViewTitle: {
8862
8874
  rfi: "All RFIs",
@@ -9825,16 +9837,33 @@ var Help = React7.forwardRef(function Help2(props, ref) {
9825
9837
  Help.displayName = "Help";
9826
9838
  var Help_default = Help;
9827
9839
 
9828
- // ../../node_modules/@procore/core-icons/dist/icons/Person.js
9840
+ // ../../node_modules/@procore/core-icons/dist/icons/Link.js
9829
9841
  var React8 = __toESM(require("react"));
9830
- var Person = React8.forwardRef(function Person2(props, ref) {
9842
+ var Link = React8.forwardRef(function Link2(props, ref) {
9831
9843
  return React8.createElement(
9832
9844
  Icon,
9833
- __assign({}, props, { name: "Person" }),
9845
+ __assign({}, props, { name: "Link" }),
9834
9846
  React8.createElement(
9835
9847
  "svg",
9836
9848
  { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ref },
9837
- React8.createElement("path", { d: "M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V20H20V18C20 15.34 14.67 14 12 14Z", fill: "currentColor" })
9849
+ React8.createElement("path", { d: "M6.01273 13.106C6.21565 9.97594 8.81868 7.5 12 7.5H13.5V10.5L12 10.5C10.3431 10.5 9 11.8431 9 13.5L9 16.5C9 18.1569 10.3431 19.5 12 19.5H16.5C18.1569 19.5 19.5 18.1569 19.5 16.5L19.5 8.30269C21.2934 9.34012 22.5 11.2792 22.5 13.5V16.5C22.5 19.8137 19.8137 22.5 16.5 22.5H12C8.68629 22.5 6 19.8137 6 16.5L6 13.0987L6.01273 13.106Z", fill: "currentColor" }),
9850
+ React8.createElement("path", { d: "M15 10.5C15 10.501 15 10.502 15 10.503V10.5269C14.9854 12.1712 13.6478 13.5 12 13.5L10.5 13.5V16.5H12C15.1813 16.5 17.7844 14.0241 17.9873 10.894L18.0086 10.9064L18.0001 10.8343L18 7.5C18 4.18629 15.3137 1.5 12 1.5H7.5C4.18629 1.5 1.5 4.18629 1.5 7.5V10.5C1.5 12.7208 2.7066 14.6599 4.5 15.6973L4.5 7.5C4.5 5.84315 5.84315 4.5 7.5 4.5L12 4.5C13.6569 4.5 15 5.84315 15 7.5H14.9867L15 7.52707L15 10.5Z", fill: "currentColor" })
9851
+ )
9852
+ );
9853
+ });
9854
+ Link.displayName = "Link";
9855
+ var Link_default = Link;
9856
+
9857
+ // ../../node_modules/@procore/core-icons/dist/icons/Person.js
9858
+ var React9 = __toESM(require("react"));
9859
+ var Person = React9.forwardRef(function Person2(props, ref) {
9860
+ return React9.createElement(
9861
+ Icon,
9862
+ __assign({}, props, { name: "Person" }),
9863
+ React9.createElement(
9864
+ "svg",
9865
+ { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ref },
9866
+ React9.createElement("path", { d: "M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V20H20V18C20 15.34 14.67 14 12 14Z", fill: "currentColor" })
9838
9867
  )
9839
9868
  );
9840
9869
  });
@@ -9842,15 +9871,15 @@ Person.displayName = "Person";
9842
9871
  var Person_default = Person;
9843
9872
 
9844
9873
  // ../../node_modules/@procore/core-icons/dist/icons/Plus.js
9845
- var React9 = __toESM(require("react"));
9846
- var Plus = React9.forwardRef(function Plus2(props, ref) {
9847
- return React9.createElement(
9874
+ var React10 = __toESM(require("react"));
9875
+ var Plus = React10.forwardRef(function Plus2(props, ref) {
9876
+ return React10.createElement(
9848
9877
  Icon,
9849
9878
  __assign({}, props, { name: "Plus" }),
9850
- React9.createElement(
9879
+ React10.createElement(
9851
9880
  "svg",
9852
9881
  { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ref },
9853
- React9.createElement("path", { d: "M13.25 5H10.75V10.75H5V13.25H10.75V19H13.25V13.25H19V10.75H13.25V5Z", fill: "currentColor" })
9882
+ React10.createElement("path", { d: "M13.25 5H10.75V10.75H5V13.25H10.75V19H13.25V13.25H19V10.75H13.25V5Z", fill: "currentColor" })
9854
9883
  )
9855
9884
  );
9856
9885
  });
@@ -9996,7 +10025,7 @@ function stylis_min(W2) {
9996
10025
  break;
9997
10026
  }
9998
10027
  default:
9999
- 58 !== f2.charCodeAt(t2 - 1) && (p += P3(f2, q2, g2, f2.charCodeAt(2)));
10028
+ 58 !== f2.charCodeAt(t2 - 1) && (p += P4(f2, q2, g2, f2.charCodeAt(2)));
10000
10029
  }
10001
10030
  I = r2 = u2 = q2 = 0;
10002
10031
  f2 = "";
@@ -10169,7 +10198,7 @@ function stylis_min(W2) {
10169
10198
  }
10170
10199
  return d + c2;
10171
10200
  }
10172
- function P3(d, c2, e2, h) {
10201
+ function P4(d, c2, e2, h) {
10173
10202
  var a2 = d + ";", m2 = 2 * c2 + 3 * e2 + 4 * h;
10174
10203
  if (944 === m2) {
10175
10204
  d = a2.indexOf(":", 9) + 1;
@@ -10276,7 +10305,7 @@ function stylis_min(W2) {
10276
10305
  case 931:
10277
10306
  case 953:
10278
10307
  if (true === la.test(d))
10279
- return 115 === (b2 = d.substring(d.indexOf(":") + 1)).charCodeAt(0) ? P3(d.replace("stretch", "fill-available"), c2, e2, h).replace(":fill-available", ":stretch") : a2.replace(b2, "-webkit-" + b2) + a2.replace(b2, "-moz-" + b2.replace("fill-", "")) + a2;
10308
+ return 115 === (b2 = d.substring(d.indexOf(":") + 1)).charCodeAt(0) ? P4(d.replace("stretch", "fill-available"), c2, e2, h).replace(":fill-available", ":stretch") : a2.replace(b2, "-webkit-" + b2) + a2.replace(b2, "-moz-" + b2.replace("fill-", "")) + a2;
10280
10309
  break;
10281
10310
  case 962:
10282
10311
  if (a2 = "-webkit-" + a2 + (102 === a2.charCodeAt(5) ? "-ms-" + a2 : "") + a2, 211 === e2 + h && 105 === a2.charCodeAt(13) && 0 < a2.indexOf("transform", 10))
@@ -10290,7 +10319,7 @@ function stylis_min(W2) {
10290
10319
  return R2(2 !== c2 ? h : h.replace(na, "$1"), e2, c2);
10291
10320
  }
10292
10321
  function ea(d, c2) {
10293
- var e2 = P3(c2, c2.charCodeAt(0), c2.charCodeAt(1), c2.charCodeAt(2));
10322
+ var e2 = P4(c2, c2.charCodeAt(0), c2.charCodeAt(1), c2.charCodeAt(2));
10294
10323
  return e2 !== c2 + ";" ? e2.replace(oa, " or ($1)").substring(4) : "(" + c2 + ")";
10295
10324
  }
10296
10325
  function H3(d, c2, e2, h, a2, m2, b2, v2, n2, q2) {
@@ -10948,7 +10977,7 @@ function Fe(e2, t2, n2) {
10948
10977
  o2 && e2.shouldForwardProp && (N = t2.shouldForwardProp ? function(n3, r2, o3) {
10949
10978
  return e2.shouldForwardProp(n3, r2, o3) && t2.shouldForwardProp(n3, r2, o3);
10950
10979
  } : e2.shouldForwardProp);
10951
- var A2, C2 = new re(n2, v2, o2 ? e2.componentStyle : void 0), I = C2.isStatic && 0 === c2.length, P3 = function(e3, t3) {
10980
+ var A2, C2 = new re(n2, v2, o2 ? e2.componentStyle : void 0), I = C2.isStatic && 0 === c2.length, P4 = function(e3, t3) {
10952
10981
  return function(e4, t4, n3, r2) {
10953
10982
  var o3 = e4.attrs, i3 = e4.componentStyle, a3 = e4.defaultProps, c3 = e4.foldedComponentIds, l3 = e4.shouldForwardProp, d2 = e4.styledComponentId, h2 = e4.target, f2 = function(e5, t5, n4) {
10954
10983
  void 0 === e5 && (e5 = S);
@@ -10967,7 +10996,7 @@ function Fe(e2, t2, n2) {
10967
10996
  return t4.style && v3.style !== t4.style && (A3.style = m({}, t4.style, {}, v3.style)), A3.className = Array.prototype.concat(c3, d2, g2 !== d2 ? g2 : null, t4.className, v3.className).filter(Boolean).join(" "), A3.ref = E2, (0, import_react.createElement)(b2, A3);
10968
10997
  }(A2, e3, t3, I);
10969
10998
  };
10970
- return P3.displayName = y2, (A2 = import_react.default.forwardRef(P3)).attrs = _3, A2.componentStyle = C2, A2.displayName = y2, A2.shouldForwardProp = N, A2.foldedComponentIds = o2 ? Array.prototype.concat(e2.foldedComponentIds, e2.styledComponentId) : g, A2.styledComponentId = v2, A2.target = o2 ? e2.target : e2, A2.withComponent = function(e3) {
10999
+ return P4.displayName = y2, (A2 = import_react.default.forwardRef(P4)).attrs = _3, A2.componentStyle = C2, A2.displayName = y2, A2.shouldForwardProp = N, A2.foldedComponentIds = o2 ? Array.prototype.concat(e2.foldedComponentIds, e2.styledComponentId) : g, A2.styledComponentId = v2, A2.target = o2 ? e2.target : e2, A2.withComponent = function(e3) {
10971
11000
  var r2 = t2.componentId, o3 = function(e4, t3) {
10972
11001
  if (null == e4)
10973
11002
  return {};
@@ -11149,14 +11178,15 @@ var useSavedViewsPanel = (domain, tableName) => {
11149
11178
  setIsOpen(!isOpen);
11150
11179
  localStorage.setItem(key(domain, tableName), JSON.stringify(!isOpen));
11151
11180
  };
11152
- const Button6 = () => /* @__PURE__ */ import_react5.default.createElement(SavedViewsButton, { handleClick, isOpen });
11153
- return { isOpen, SavedViewsButton: Button6 };
11181
+ const Button7 = () => /* @__PURE__ */ import_react5.default.createElement(SavedViewsButton, { handleClick, isOpen });
11182
+ return { isOpen, SavedViewsButton: Button7 };
11154
11183
  };
11155
11184
  var useSavedViewsPanel_default = useSavedViewsPanel;
11156
11185
 
11157
11186
  // src/SavedViews/components/MenuItems/SavedViewsCollectionsMenuItem.tsx
11158
11187
  var import_core_react3 = require("@procore/core-react");
11159
- var React13 = __toESM(require("react"));
11188
+ var React14 = __toESM(require("react"));
11189
+ var import_toast_alert = require("@procore/toast-alert");
11160
11190
  var RowActionsBox = styled_components_esm_default(import_core_react3.Flex)`
11161
11191
  justify-content: center;
11162
11192
  align-items: center;
@@ -11172,7 +11202,7 @@ var Container2 = styled_components_esm_default(import_core_react3.Flex)`
11172
11202
  ${({ "aria-selected": selected }) => selected ? "color: hsl(218, 75%, 45%);" : ""}
11173
11203
  `;
11174
11204
  var SavedViewCollectionMenuItem = (props) => {
11175
- const onClick = React13.useCallback(
11205
+ const onClick = React14.useCallback(
11176
11206
  (a2) => {
11177
11207
  var _a, _b;
11178
11208
  if (!props.item) {
@@ -11196,7 +11226,19 @@ var SavedViewCollectionMenuItem = (props) => {
11196
11226
  event.stopPropagation();
11197
11227
  (_a = props.onUpdate) == null ? void 0 : _a.call(props, props.item);
11198
11228
  };
11229
+ const { showToast } = (0, import_toast_alert.useToastAlertContext)();
11199
11230
  const i18n = (0, import_core_react3.useI18nContext)();
11231
+ const copyShareLink = async (event) => {
11232
+ event.stopPropagation();
11233
+ try {
11234
+ const currentUrl = new URL(window.location.href);
11235
+ await navigator.clipboard.writeText(currentUrl.toString());
11236
+ showToast.success(i18n.t("savedViews.actions.linkCopied"));
11237
+ } catch (error) {
11238
+ console.error("Failed to copy link:", error);
11239
+ showToast.error(i18n.t("savedViews.errors.copyFailed"));
11240
+ }
11241
+ };
11200
11242
  const flyoutMenuOptions = [
11201
11243
  {
11202
11244
  value: "editNameDesc",
@@ -11207,7 +11249,7 @@ var SavedViewCollectionMenuItem = (props) => {
11207
11249
  label: i18n.t("savedViews.actions.delete")
11208
11250
  }
11209
11251
  ];
11210
- return /* @__PURE__ */ React13.createElement(
11252
+ return /* @__PURE__ */ React14.createElement(
11211
11253
  Container2,
11212
11254
  {
11213
11255
  "aria-selected": Boolean(props.selected),
@@ -11218,7 +11260,7 @@ var SavedViewCollectionMenuItem = (props) => {
11218
11260
  }),
11219
11261
  "data-testid": "saved-view-collection-menu-item"
11220
11262
  },
11221
- /* @__PURE__ */ React13.createElement(
11263
+ /* @__PURE__ */ React14.createElement(
11222
11264
  "span",
11223
11265
  {
11224
11266
  "data-testid": "saved-view-display-name",
@@ -11226,7 +11268,7 @@ var SavedViewCollectionMenuItem = (props) => {
11226
11268
  },
11227
11269
  props.item.name
11228
11270
  ),
11229
- /* @__PURE__ */ React13.createElement(RowActionsBox, null, /* @__PURE__ */ React13.createElement(import_core_react3.Box, { justifyContent: "space-between" }, props.item.id !== "default" && props.canUpdate && /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement(
11271
+ /* @__PURE__ */ React14.createElement(RowActionsBox, null, /* @__PURE__ */ React14.createElement(import_core_react3.Box, { justifyContent: "space-between" }, props.item.id !== "default" && props.canUpdate && /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement(
11230
11272
  import_core_react3.Button,
11231
11273
  {
11232
11274
  onClick: updateItem,
@@ -11237,7 +11279,17 @@ var SavedViewCollectionMenuItem = (props) => {
11237
11279
  loading: props.isUpdateProcessing
11238
11280
  },
11239
11281
  i18n.t("savedViews.actions.update")
11240
- ))), /* @__PURE__ */ React13.createElement(import_core_react3.Box, null, props.item.id !== "default" && props.canEditOrDelete && /* @__PURE__ */ React13.createElement("div", { onClick: (e2) => e2.stopPropagation() }, /* @__PURE__ */ React13.createElement(
11282
+ )), props.item.id !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary" && /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement(
11283
+ import_core_react3.Button,
11284
+ {
11285
+ onClick: copyShareLink,
11286
+ variant: "tertiary",
11287
+ size: "sm",
11288
+ "aria-label": i18n.t("savedViews.actions.copyShareLink"),
11289
+ "data-testid": "copy-share-link-button"
11290
+ },
11291
+ /* @__PURE__ */ React14.createElement(Link_default, { size: "sm" })
11292
+ ))), /* @__PURE__ */ React14.createElement(import_core_react3.Box, null, props.item.id !== "default" && props.canEditOrDelete && /* @__PURE__ */ React14.createElement("div", { onClick: (e2) => e2.stopPropagation() }, /* @__PURE__ */ React14.createElement(
11241
11293
  import_core_react3.DropdownFlyout,
11242
11294
  {
11243
11295
  "data-testid": "saved-view-overflow-button",
@@ -11262,7 +11314,7 @@ var ExpandedPanel = styled_components_esm_default(import_core_react4.Panel)`
11262
11314
 
11263
11315
  // src/SavedViews/components/Panels/PanelContent.tsx
11264
11316
  var import_core_react7 = require("@procore/core-react");
11265
- var import_toast_alert = require("@procore/toast-alert");
11317
+ var import_toast_alert2 = require("@procore/toast-alert");
11266
11318
  var import_react9 = __toESM(require("react"));
11267
11319
 
11268
11320
  // ../../node_modules/@procore/core-http/dist/modern/index.js
@@ -11418,6 +11470,18 @@ var useDeleteSavedView = (props) => useApiRequest(props, "DELETE", [
11418
11470
  props.domain,
11419
11471
  props.tableName
11420
11472
  ]);
11473
+ var useFetchSavedViewById = (savedViewId, queryInput, enabled = true) => {
11474
+ const { projectId, companyId } = queryInput;
11475
+ return (0, import_react_query2.useQuery)({
11476
+ enabled: enabled && Boolean(savedViewId),
11477
+ queryKey: ["savedView", savedViewId],
11478
+ queryFn: async () => {
11479
+ const url = `/rest/v2.0/companies/${companyId}/projects/${projectId}/saved_views/${savedViewId}`;
11480
+ const response = await requestJSON(url);
11481
+ return response.data;
11482
+ }
11483
+ });
11484
+ };
11421
11485
 
11422
11486
  // src/SavedViews/components/Panels/PanelContentUtils.ts
11423
11487
  var import_lodash = __toESM(require_lodash());
@@ -11687,20 +11751,19 @@ var Panel2 = styled_components_esm_default(import_core_react7.DetailPage.Card)`
11687
11751
  box-shadow: none;
11688
11752
  `;
11689
11753
  var PanelContent = (props) => {
11690
- var _a;
11691
- const { showToast } = (0, import_toast_alert.useToastAlertContext)();
11754
+ var _a, _b;
11755
+ const { showToast } = (0, import_toast_alert2.useToastAlertContext)();
11692
11756
  const I18n = (0, import_core_react7.useI18nContext)();
11693
11757
  const { mutate: updateSavedView, isPending: isUpdateLoading } = useUpdateSavedView(props.queryInput);
11694
- const { data: savedViews, error: savedViewsError } = useSavedViewsQuery(
11695
- props.queryInput
11696
- );
11758
+ const { data: savedViewsFromQuery, error: savedViewsError } = useSavedViewsQuery(props.queryInput);
11759
+ const savedViews = props.savedViews ?? savedViewsFromQuery;
11697
11760
  const errorToastRef = import_react9.default.useRef(null);
11698
11761
  import_react9.default.useEffect(() => {
11699
11762
  if (savedViewsError && savedViewsError !== errorToastRef.current) {
11700
11763
  showToast.error(I18n.t("savedViews.errors.fetch"));
11701
11764
  errorToastRef.current = savedViewsError;
11702
11765
  }
11703
- }, [savedViewsError]);
11766
+ }, [savedViewsError, showToast, I18n]);
11704
11767
  const { data: permissions } = useSavedViewsPermissions(props.queryInput);
11705
11768
  const selectedRowRef = useScrollToRef(savedViews);
11706
11769
  const onUpdate = (data) => {
@@ -11722,7 +11785,23 @@ var PanelContent = (props) => {
11722
11785
  };
11723
11786
  const { groups, toggleGroup } = useGroups();
11724
11787
  const isDefaultSelected = ((_a = props.selectedSavedView) == null ? void 0 : _a.id) === "default";
11725
- return /* @__PURE__ */ import_react9.default.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ import_react9.default.createElement(import_core_react7.Flex, { direction: "column", style: { height: "100%", width: "100%" } }, /* @__PURE__ */ import_react9.default.createElement(
11788
+ const isTemporarySelected = ((_b = props.selectedSavedView) == null ? void 0 : _b.id) === "temporary";
11789
+ const temporaryView = savedViews == null ? void 0 : savedViews.find((view) => view.id === "temporary");
11790
+ return /* @__PURE__ */ import_react9.default.createElement(Panel2, { "data-testid": "inner-panel" }, /* @__PURE__ */ import_react9.default.createElement(import_core_react7.Flex, { direction: "column", style: { height: "100%", width: "100%" } }, temporaryView && /* @__PURE__ */ import_react9.default.createElement(
11791
+ Row,
11792
+ {
11793
+ selected: isTemporarySelected,
11794
+ onClick: () => props.onSelect({ item: temporaryView }),
11795
+ ref: isTemporarySelected ? selectedRowRef : null
11796
+ },
11797
+ /* @__PURE__ */ import_react9.default.createElement(
11798
+ SavedViewCollectionMenuItem,
11799
+ {
11800
+ item: temporaryView,
11801
+ selected: isTemporarySelected
11802
+ }
11803
+ )
11804
+ ), /* @__PURE__ */ import_react9.default.createElement(
11726
11805
  Row,
11727
11806
  {
11728
11807
  selected: isDefaultSelected,
@@ -11738,7 +11817,9 @@ var PanelContent = (props) => {
11738
11817
  )
11739
11818
  ), VIEW_LEVELS.map((level) => {
11740
11819
  const isExpanded = groups[level];
11741
- const views = isExpanded && savedViews ? savedViews.filter((view) => view.view_level === level) : [];
11820
+ const views = isExpanded && savedViews ? savedViews.filter(
11821
+ (view) => view.view_level === level && view.id !== "temporary"
11822
+ ) : [];
11742
11823
  return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, { key: level }, /* @__PURE__ */ import_react9.default.createElement(
11743
11824
  ViewLevelHeader_default,
11744
11825
  {
@@ -11788,7 +11869,7 @@ var PanelContent = (props) => {
11788
11869
  };
11789
11870
 
11790
11871
  // src/SavedViews/components/SavedViews/SmartGrid/SmartGridSavedViews.tsx
11791
- var import_react14 = __toESM(require("react"));
11872
+ var import_react19 = __toESM(require("react"));
11792
11873
 
11793
11874
  // src/SavedViews/components/SavedViews/SmartGrid/SmartGridDefaultSavedView.tsx
11794
11875
  var import_core_react8 = require("@procore/core-react");
@@ -11848,8 +11929,8 @@ var useSmartGridConfig = (gridApi) => {
11848
11929
  };
11849
11930
 
11850
11931
  // src/SavedViews/components/SavedViews/SavedViews.tsx
11851
- var import_core_react12 = require("@procore/core-react");
11852
- var import_react13 = __toESM(require("react"));
11932
+ var import_core_react13 = require("@procore/core-react");
11933
+ var import_react18 = __toESM(require("react"));
11853
11934
  var import_react_query3 = require("@tanstack/react-query");
11854
11935
 
11855
11936
  // src/SavedViews/components/SavedViewsModals/SavedViewsDeleteConfirmationModalShared.tsx
@@ -11881,7 +11962,7 @@ var import_react12 = __toESM(require("react"));
11881
11962
 
11882
11963
  // src/SavedViews/components/SavedViewsModals/SavedViewsCreateUpdateModalBase.tsx
11883
11964
  var import_core_react10 = require("@procore/core-react");
11884
- var React17 = __toESM(require("react"));
11965
+ var React18 = __toESM(require("react"));
11885
11966
 
11886
11967
  // ../../node_modules/yup/index.esm.js
11887
11968
  var import_property_expr = __toESM(require_property_expr());
@@ -14282,7 +14363,7 @@ var SavedViewsCreateUpdateModalBase = ({
14282
14363
  }
14283
14364
  };
14284
14365
  const viewLevelOptions = getViewLevelOptions(permissions, I18n);
14285
- return /* @__PURE__ */ React17.createElement(
14366
+ return /* @__PURE__ */ React18.createElement(
14286
14367
  import_core_react10.Modal,
14287
14368
  {
14288
14369
  "aria-label": I18n.t("savedViews.ariaLabels.modal"),
@@ -14291,14 +14372,14 @@ var SavedViewsCreateUpdateModalBase = ({
14291
14372
  style: { width: "540px" },
14292
14373
  "data-testid": "create-update-modal"
14293
14374
  },
14294
- /* @__PURE__ */ React17.createElement(ScrollContainer, null, /* @__PURE__ */ React17.createElement(
14375
+ /* @__PURE__ */ React18.createElement(ScrollContainer, null, /* @__PURE__ */ React18.createElement(
14295
14376
  import_core_react10.Modal.Header,
14296
14377
  {
14297
14378
  onClose,
14298
14379
  style: { borderBottom: `1px solid ${import_core_react10.colors.gray85}` }
14299
14380
  },
14300
- /* @__PURE__ */ React17.createElement(import_core_react10.H2, null, header)
14301
- ), /* @__PURE__ */ React17.createElement(
14381
+ /* @__PURE__ */ React18.createElement(import_core_react10.H2, null, header)
14382
+ ), /* @__PURE__ */ React18.createElement(
14302
14383
  import_core_react10.Form,
14303
14384
  {
14304
14385
  initialValues: {
@@ -14324,13 +14405,13 @@ var SavedViewsCreateUpdateModalBase = ({
14324
14405
  onReset: onCancel,
14325
14406
  validateOnChange: true
14326
14407
  },
14327
- /* @__PURE__ */ React17.createElement(import_core_react10.Form.Form, { name: header }, /* @__PURE__ */ React17.createElement(
14408
+ /* @__PURE__ */ React18.createElement(import_core_react10.Form.Form, { name: header }, /* @__PURE__ */ React18.createElement(
14328
14409
  import_core_react10.Modal.Body,
14329
14410
  {
14330
14411
  style: { paddingTop: 0, paddingBottom: 0, marginTop: import_core_react10.spacing.lg }
14331
14412
  },
14332
- errors && /* @__PURE__ */ React17.createElement(import_core_react10.ErrorBanner, { style: { marginBottom: import_core_react10.spacing.xl } }, /* @__PURE__ */ React17.createElement(import_core_react10.Banner.Content, null, /* @__PURE__ */ React17.createElement(import_core_react10.Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React17.createElement(import_core_react10.Banner.Body, null, (errors == null ? void 0 : errors.form) || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
14333
- /* @__PURE__ */ React17.createElement(import_core_react10.Form.Row, null, /* @__PURE__ */ React17.createElement(
14413
+ errors && /* @__PURE__ */ React18.createElement(import_core_react10.ErrorBanner, { style: { marginBottom: import_core_react10.spacing.xl } }, /* @__PURE__ */ React18.createElement(import_core_react10.Banner.Content, null, /* @__PURE__ */ React18.createElement(import_core_react10.Banner.Title, null, I18n.t("savedViews.modal.errors.title", { mode })), /* @__PURE__ */ React18.createElement(import_core_react10.Banner.Body, null, (errors == null ? void 0 : errors.form) || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
14414
+ /* @__PURE__ */ React18.createElement(import_core_react10.Form.Row, null, /* @__PURE__ */ React18.createElement(
14334
14415
  import_core_react10.Form.Text,
14335
14416
  {
14336
14417
  name: "name",
@@ -14341,12 +14422,12 @@ var SavedViewsCreateUpdateModalBase = ({
14341
14422
  onChange: () => resetMutations()
14342
14423
  }
14343
14424
  )),
14344
- /* @__PURE__ */ React17.createElement(
14425
+ /* @__PURE__ */ React18.createElement(
14345
14426
  import_core_react10.Form.Row,
14346
14427
  {
14347
14428
  style: { marginTop: (errors == null ? void 0 : errors.name) ? import_core_react10.spacing.xl : import_core_react10.spacing.none }
14348
14429
  },
14349
- /* @__PURE__ */ React17.createElement(
14430
+ /* @__PURE__ */ React18.createElement(
14350
14431
  import_core_react10.Form.TextArea,
14351
14432
  {
14352
14433
  name: "description",
@@ -14357,7 +14438,7 @@ var SavedViewsCreateUpdateModalBase = ({
14357
14438
  }
14358
14439
  )
14359
14440
  ),
14360
- viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React17.createElement(import_core_react10.Form.Row, null, /* @__PURE__ */ React17.createElement(
14441
+ viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React18.createElement(import_core_react10.Form.Row, null, /* @__PURE__ */ React18.createElement(
14361
14442
  import_core_react10.Form.Select,
14362
14443
  {
14363
14444
  name: "view_level",
@@ -14367,8 +14448,8 @@ var SavedViewsCreateUpdateModalBase = ({
14367
14448
  onSearch: false,
14368
14449
  onClear: false
14369
14450
  }
14370
- )) : /* @__PURE__ */ React17.createElement(React17.Fragment, null)
14371
- ), /* @__PURE__ */ React17.createElement(import_core_react10.Modal.Footer, { style: { borderTop: `1px solid ${import_core_react10.colors.gray85}` } }, /* @__PURE__ */ React17.createElement(import_core_react10.Flex, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React17.createElement(import_core_react10.Typography, { color: "gray45", italic: true }, /* @__PURE__ */ React17.createElement(import_core_react10.Typography, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React17.createElement(import_core_react10.Modal.FooterButtons, null, /* @__PURE__ */ React17.createElement(import_core_react10.Button, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React17.createElement(
14451
+ )) : /* @__PURE__ */ React18.createElement(React18.Fragment, null)
14452
+ ), /* @__PURE__ */ React18.createElement(import_core_react10.Modal.Footer, { style: { borderTop: `1px solid ${import_core_react10.colors.gray85}` } }, /* @__PURE__ */ React18.createElement(import_core_react10.Flex, { grow: "1", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React18.createElement(import_core_react10.Typography, { color: "gray45", italic: true }, /* @__PURE__ */ React18.createElement(import_core_react10.Typography, { color: "red45" }, "*"), " ", I18n.t("savedViews.modal.info.required_fields")), /* @__PURE__ */ React18.createElement(import_core_react10.Modal.FooterButtons, null, /* @__PURE__ */ React18.createElement(import_core_react10.Button, { type: "reset", variant: "tertiary", disabled: isLoading }, I18n.t("savedViews.actions.cancel")), /* @__PURE__ */ React18.createElement(
14372
14453
  import_core_react10.Button,
14373
14454
  {
14374
14455
  "data-testid": "create-update-modal-button",
@@ -14420,6 +14501,277 @@ var SavedViewsFormModal = ({
14420
14501
  );
14421
14502
  };
14422
14503
 
14504
+ // src/SavedViews/components/SavedViewsModals/CopyViewConfirmationModal.tsx
14505
+ var import_core_react12 = require("@procore/core-react");
14506
+ var import_react13 = __toESM(require("react"));
14507
+ var CreateViewConfirmationModal = ({ open, savedViewName, onClose, onViewTemporarily, onCreateView }) => {
14508
+ const i18n = (0, import_core_react12.useI18nContext)();
14509
+ const handleViewTemporarily = () => {
14510
+ onViewTemporarily == null ? void 0 : onViewTemporarily();
14511
+ };
14512
+ const handleCreateView = () => {
14513
+ onCreateView == null ? void 0 : onCreateView();
14514
+ };
14515
+ return /* @__PURE__ */ import_react13.default.createElement(
14516
+ import_core_react12.Modal,
14517
+ {
14518
+ "data-testid": "create-view-confirmation-modal",
14519
+ open,
14520
+ onClickOverlay: onClose
14521
+ },
14522
+ /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Modal.Header, { onClose }, i18n.t("savedViews.modal.copyConfirmation.headline", {
14523
+ savedViewName
14524
+ })),
14525
+ /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Modal.Body, null, /* @__PURE__ */ import_react13.default.createElement(import_core_react12.P, null, i18n.t("savedViews.modal.copyConfirmation.description"))),
14526
+ /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Modal.Footer, null, /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Modal.FooterButtons, null, /* @__PURE__ */ import_react13.default.createElement(
14527
+ import_core_react12.Button,
14528
+ {
14529
+ variant: "secondary",
14530
+ onClick: handleViewTemporarily,
14531
+ "data-testid": "view-temporarily-button"
14532
+ },
14533
+ i18n.t("savedViews.actions.viewTemporarily")
14534
+ ), /* @__PURE__ */ import_react13.default.createElement(
14535
+ import_core_react12.Button,
14536
+ {
14537
+ variant: "primary",
14538
+ onClick: handleCreateView,
14539
+ "data-testid": "create-view-button"
14540
+ },
14541
+ i18n.t("savedViews.actions.createView")
14542
+ )))
14543
+ );
14544
+ };
14545
+
14546
+ // src/utils/Hooks/useViewSelection.ts
14547
+ var import_react15 = require("react");
14548
+
14549
+ // src/utils/Hooks/useUrlSync.ts
14550
+ var import_react14 = require("react");
14551
+ var import_react_router_dom = require("react-router-dom");
14552
+ var useUrlSync = (selectedView, availableViews, defaultView, onViewFound, onViewNotFound) => {
14553
+ const [searchParams, setSearchParams] = (0, import_react_router_dom.useSearchParams)();
14554
+ const applySavedViewFromUrl = (savedViewId) => {
14555
+ if (savedViewId === "default") {
14556
+ if (defaultView.id !== (selectedView == null ? void 0 : selectedView.id)) {
14557
+ onViewFound(defaultView);
14558
+ }
14559
+ return;
14560
+ }
14561
+ const viewInUserViews = availableViews.find((v2) => v2.id === savedViewId);
14562
+ if (viewInUserViews) {
14563
+ if (viewInUserViews.id !== (selectedView == null ? void 0 : selectedView.id)) {
14564
+ onViewFound(viewInUserViews);
14565
+ }
14566
+ } else {
14567
+ onViewNotFound(savedViewId);
14568
+ }
14569
+ };
14570
+ const applyListView = (viewParam) => {
14571
+ if (viewParam === "list" && defaultView.id !== (selectedView == null ? void 0 : selectedView.id)) {
14572
+ onViewFound(defaultView);
14573
+ }
14574
+ };
14575
+ (0, import_react14.useEffect)(() => {
14576
+ if (!availableViews.length)
14577
+ return;
14578
+ const savedViewId = searchParams.get("saved-view");
14579
+ const viewParamFromConsumer = searchParams.get("view");
14580
+ if (savedViewId) {
14581
+ applySavedViewFromUrl(savedViewId);
14582
+ return;
14583
+ }
14584
+ if (viewParamFromConsumer) {
14585
+ applyListView(viewParamFromConsumer);
14586
+ }
14587
+ }, [
14588
+ searchParams,
14589
+ availableViews,
14590
+ defaultView,
14591
+ selectedView,
14592
+ onViewFound,
14593
+ onViewNotFound
14594
+ ]);
14595
+ const updateUrl = (view) => {
14596
+ setSearchParams(
14597
+ (currentParams) => {
14598
+ const updatedParams = new URLSearchParams(currentParams);
14599
+ if (view.id === "default") {
14600
+ updatedParams.delete("saved-view");
14601
+ } else {
14602
+ updatedParams.set("saved-view", view.id);
14603
+ }
14604
+ return updatedParams;
14605
+ },
14606
+ { replace: true }
14607
+ );
14608
+ };
14609
+ return { updateUrl };
14610
+ };
14611
+
14612
+ // src/utils/Hooks/useViewSelection.ts
14613
+ var useViewSelection = (config, savedViews, openCrossUserModal) => {
14614
+ const [selectedSavedView, setSelectedSavedView] = (0, import_react15.useState)(() => {
14615
+ try {
14616
+ const savedView = JSON.parse(
14617
+ localStorage.getItem(
14618
+ `${config.domain}_${config.tableName}_${config.stickyViewsKey}_${config.projectId}_${config.userId}`
14619
+ )
14620
+ );
14621
+ return savedView || config.defaultView;
14622
+ } catch (e2) {
14623
+ return config.defaultView;
14624
+ }
14625
+ });
14626
+ const [temporaryView, setTemporaryView] = (0, import_react15.useState)(null);
14627
+ const createTemporaryView = (0, import_react15.useCallback)((fetchedView) => {
14628
+ const tempView = {
14629
+ ...fetchedView,
14630
+ id: "temporary",
14631
+ name: "Temporary View"
14632
+ };
14633
+ setTemporaryView(tempView);
14634
+ return tempView;
14635
+ }, []);
14636
+ const clearTemporaryView = (0, import_react15.useCallback)(() => setTemporaryView(null), []);
14637
+ const updateLocalStorage = (0, import_react15.useCallback)(
14638
+ (view) => {
14639
+ if (config.stickyViewsKey) {
14640
+ localStorage.setItem(
14641
+ `${config.domain}_${config.tableName}_${config.stickyViewsKey}_${config.projectId}_${config.userId}`,
14642
+ JSON.stringify(view)
14643
+ );
14644
+ }
14645
+ },
14646
+ [
14647
+ config.domain,
14648
+ config.tableName,
14649
+ config.stickyViewsKey,
14650
+ config.projectId,
14651
+ config.userId
14652
+ ]
14653
+ );
14654
+ const allViews = temporaryView ? [...savedViews ?? [], temporaryView] : savedViews ?? [];
14655
+ const onUrlViewFound = (foundView) => {
14656
+ selectView(foundView);
14657
+ };
14658
+ const onUrlViewNotFound = (viewId) => {
14659
+ if (viewId === (selectedSavedView == null ? void 0 : selectedSavedView.id)) {
14660
+ return;
14661
+ }
14662
+ openCrossUserModal(viewId);
14663
+ };
14664
+ const { updateUrl } = useUrlSync(
14665
+ selectedSavedView,
14666
+ allViews,
14667
+ config.defaultView,
14668
+ onUrlViewFound,
14669
+ onUrlViewNotFound
14670
+ );
14671
+ const selectView = (0, import_react15.useCallback)(
14672
+ (view) => {
14673
+ if (view.id !== "temporary" && temporaryView) {
14674
+ clearTemporaryView();
14675
+ }
14676
+ const viewToSelect = config.onSelect({ item: view });
14677
+ setSelectedSavedView(viewToSelect);
14678
+ updateLocalStorage(viewToSelect);
14679
+ updateUrl(viewToSelect);
14680
+ return viewToSelect;
14681
+ },
14682
+ [config, temporaryView, clearTemporaryView, updateLocalStorage, updateUrl]
14683
+ );
14684
+ return {
14685
+ selectedView: selectedSavedView,
14686
+ selectView,
14687
+ updateLocalStorage,
14688
+ temporaryView,
14689
+ createTemporaryView
14690
+ };
14691
+ };
14692
+
14693
+ // src/utils/Hooks/useCrossUserSharing.ts
14694
+ var import_react16 = __toESM(require("react"));
14695
+ var useCrossUserSharing = (queryInput, viewId, selectedSavedView, defaultView, actions, tableName) => {
14696
+ const { data: fetchedView, isError: fetchError } = useFetchSavedViewById(
14697
+ viewId,
14698
+ queryInput,
14699
+ Boolean(viewId)
14700
+ );
14701
+ const { mutate: createSavedView } = useCreateSavedView(queryInput);
14702
+ import_react16.default.useEffect(() => {
14703
+ if (fetchError && viewId) {
14704
+ actions.selectView(selectedSavedView ?? defaultView);
14705
+ actions.closeModal();
14706
+ }
14707
+ }, [fetchError, viewId, actions, selectedSavedView, defaultView]);
14708
+ const viewSharedViewTemporarily = () => {
14709
+ if (fetchedView) {
14710
+ const tempView = actions.createTemporaryView(fetchedView);
14711
+ actions.selectView(tempView);
14712
+ actions.closeModal();
14713
+ }
14714
+ };
14715
+ const createPersonalCopyOfSharedView = () => {
14716
+ if (fetchedView) {
14717
+ const viewToCreate = {
14718
+ name: fetchedView.name,
14719
+ description: fetchedView.description,
14720
+ table_name: tableName,
14721
+ table_config: fetchedView.table_config,
14722
+ view_level: "personal"
14723
+ };
14724
+ createSavedView(viewToCreate, {
14725
+ onSuccess: (newView) => {
14726
+ actions.selectView(newView);
14727
+ actions.closeModal();
14728
+ }
14729
+ });
14730
+ }
14731
+ };
14732
+ const selectCurrentViewAndCloseModal = () => {
14733
+ actions.selectView(selectedSavedView ?? defaultView);
14734
+ actions.closeModal();
14735
+ };
14736
+ return {
14737
+ fetchedView,
14738
+ viewSharedViewTemporarily,
14739
+ createPersonalCopyOfSharedView,
14740
+ selectCurrentViewAndCloseModal
14741
+ };
14742
+ };
14743
+
14744
+ // src/utils/Hooks/useModalState.ts
14745
+ var import_react17 = require("react");
14746
+ var useModalState = () => {
14747
+ const [activeModal, setActiveModal] = (0, import_react17.useState)(null);
14748
+ const [modalData, setModalData] = (0, import_react17.useState)(null);
14749
+ const openModal = (0, import_react17.useCallback)(
14750
+ (type, data) => {
14751
+ setActiveModal(type);
14752
+ setModalData(data ?? null);
14753
+ },
14754
+ []
14755
+ );
14756
+ const closeModal = (0, import_react17.useCallback)(() => {
14757
+ setActiveModal(null);
14758
+ setModalData(null);
14759
+ }, []);
14760
+ const isModalOpen = (0, import_react17.useCallback)(
14761
+ (type) => {
14762
+ return activeModal === type;
14763
+ },
14764
+ [activeModal]
14765
+ );
14766
+ return {
14767
+ openModal,
14768
+ closeModal,
14769
+ isModalOpen,
14770
+ modalData,
14771
+ activeModal
14772
+ };
14773
+ };
14774
+
14423
14775
  // src/SavedViews/components/SavedViews/SavedViews.tsx
14424
14776
  var StyledPanel = styled_components_esm_default.div`
14425
14777
  border: ${({ provider }) => provider === "data-table" ? "1px solid #d6dadc" : "none"};
@@ -14434,74 +14786,81 @@ var SavedViewsContent = (props) => {
14434
14786
  projectId,
14435
14787
  companyId
14436
14788
  };
14789
+ const { data: savedViews } = useSavedViewsQuery(queryInput);
14437
14790
  const { mutate: deleteSavedView } = useDeleteSavedView(queryInput);
14438
- const [selectedSavedView, setSelectedSavedView] = (0, import_react13.useState)(() => {
14439
- try {
14440
- const savedView = JSON.parse(
14441
- localStorage.getItem(
14442
- `${props.domain}_${props.tableName}_${props.stickyViewsKey}_${projectId}_${props.userId}`
14443
- )
14444
- );
14445
- return savedView || props.defaultView;
14446
- } catch (e2) {
14447
- return props.defaultView;
14448
- }
14449
- });
14450
- const updateLocalStorage = (view) => {
14451
- if (props.stickyViewsKey) {
14452
- localStorage.setItem(
14453
- `${props.domain}_${props.tableName}_${props.stickyViewsKey}_${projectId}_${props.userId}`,
14454
- JSON.stringify(view)
14455
- );
14456
- }
14457
- };
14458
- const handleViewItemSelect = ({ item }) => {
14459
- const viewToSetAsSelected = props.onSelect({ item });
14460
- setSelectedSavedView(viewToSetAsSelected);
14461
- updateLocalStorage(viewToSetAsSelected);
14791
+ const { openModal, closeModal, isModalOpen, modalData, activeModal } = useModalState();
14792
+ const openCrossUserModal = (viewId) => {
14793
+ openModal("crossUser" /* CROSS_USER */, { viewId });
14462
14794
  };
14463
- const onDelete = () => {
14464
- if (selectedSavedView) {
14465
- deleteSavedView(selectedSavedView, {
14466
- onSuccess: () => handleViewItemSelect({ item: props.defaultView })
14795
+ const {
14796
+ selectedView,
14797
+ selectView,
14798
+ updateLocalStorage,
14799
+ temporaryView,
14800
+ createTemporaryView
14801
+ } = useViewSelection(
14802
+ {
14803
+ domain: props.domain,
14804
+ tableName: props.tableName,
14805
+ stickyViewsKey: props.stickyViewsKey,
14806
+ userId: props.userId,
14807
+ projectId,
14808
+ defaultView: props.defaultView,
14809
+ onSelect: props.onSelect
14810
+ },
14811
+ savedViews,
14812
+ openCrossUserModal
14813
+ );
14814
+ const {
14815
+ fetchedView,
14816
+ viewSharedViewTemporarily,
14817
+ createPersonalCopyOfSharedView,
14818
+ selectCurrentViewAndCloseModal
14819
+ } = useCrossUserSharing(
14820
+ queryInput,
14821
+ (modalData == null ? void 0 : modalData.viewId) ?? null,
14822
+ selectedView,
14823
+ props.defaultView,
14824
+ {
14825
+ selectView,
14826
+ createTemporaryView,
14827
+ closeModal
14828
+ },
14829
+ props.tableName
14830
+ );
14831
+ const deleteSelectedView = () => {
14832
+ if (selectedView) {
14833
+ deleteSavedView(selectedView, {
14834
+ onSuccess: () => selectView(props.defaultView)
14467
14835
  });
14468
14836
  }
14469
14837
  };
14470
- const i18n = (0, import_core_react12.useI18nContext)();
14471
- const [openDeleteModal, setOpenDeleteModal] = (0, import_react13.useState)(false);
14472
- const [openEditCreateModal, setOpenEditCreateModal] = (0, import_react13.useState)(false);
14473
- const [editCreateModalType, setEditCreateModalType] = (0, import_react13.useState)(
14474
- "create" /* CREATE */
14475
- );
14476
- const onCloseDeleteModal = () => {
14477
- setOpenDeleteModal(false);
14478
- };
14479
- const onCloseEditModal = () => {
14480
- setOpenEditCreateModal(false);
14481
- };
14482
- const openModal = (type) => {
14483
- setEditCreateModalType(type);
14484
- setOpenEditCreateModal(true);
14838
+ const confirmDeleteAndCloseModal = () => {
14839
+ deleteSelectedView();
14840
+ closeModal();
14485
14841
  };
14486
- const onOpenDeleteModal = () => {
14487
- setOpenDeleteModal(true);
14842
+ const i18n = (0, import_core_react13.useI18nContext)();
14843
+ const selectSavedViewFromList = ({ item }) => selectView(item);
14844
+ const setSelectedSavedView = (view) => {
14845
+ selectView(view);
14488
14846
  };
14489
- return /* @__PURE__ */ import_react13.default.createElement(StyledPanel, { provider: props.provider }, /* @__PURE__ */ import_react13.default.createElement(
14847
+ const allViews = temporaryView ? [...savedViews ?? [], temporaryView] : savedViews ?? [];
14848
+ return /* @__PURE__ */ import_react18.default.createElement(StyledPanel, { provider: props.provider }, /* @__PURE__ */ import_react18.default.createElement(
14490
14849
  ExpandedPanel,
14491
14850
  {
14492
14851
  "data-testid": "saved-view-expanded-panel",
14493
14852
  provider: props.provider
14494
14853
  },
14495
- /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Panel.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Panel.Title, null, /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Flex, { alignItems: "center" }, /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Box, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Tooltip, { showDelay: 200, overlay: i18n.t("savedViews.tooltip") }, /* @__PURE__ */ import_react13.default.createElement(Help_default, { size: "sm" })))), /* @__PURE__ */ import_react13.default.createElement(
14496
- import_core_react12.Tooltip,
14854
+ /* @__PURE__ */ import_react18.default.createElement(import_core_react13.Panel.Header, { id: "saved-views-collections-panel-header" }, /* @__PURE__ */ import_react18.default.createElement(import_core_react13.Panel.Title, null, /* @__PURE__ */ import_react18.default.createElement(import_core_react13.Flex, { alignItems: "center" }, /* @__PURE__ */ import_react18.default.createElement(import_core_react13.Box, { paddingRight: "sm" }, i18n.t("savedViews.title")), /* @__PURE__ */ import_react18.default.createElement(import_core_react13.Tooltip, { showDelay: 200, overlay: i18n.t("savedViews.tooltip") }, /* @__PURE__ */ import_react18.default.createElement(Help_default, { size: "sm" })))), /* @__PURE__ */ import_react18.default.createElement(
14855
+ import_core_react13.Tooltip,
14497
14856
  {
14498
14857
  overlay: i18n.t("savedViews.actions.create"),
14499
14858
  showDelay: 1e3
14500
14859
  },
14501
- /* @__PURE__ */ import_react13.default.createElement("span", null, /* @__PURE__ */ import_react13.default.createElement(
14502
- import_core_react12.Button,
14860
+ /* @__PURE__ */ import_react18.default.createElement("span", null, /* @__PURE__ */ import_react18.default.createElement(
14861
+ import_core_react13.Button,
14503
14862
  {
14504
- icon: /* @__PURE__ */ import_react13.default.createElement(Plus_default, null),
14863
+ icon: /* @__PURE__ */ import_react18.default.createElement(Plus_default, null),
14505
14864
  variant: "secondary",
14506
14865
  "data-testid": "expanded-panel-create-button",
14507
14866
  onClick: () => openModal("create" /* CREATE */),
@@ -14510,56 +14869,63 @@ var SavedViewsContent = (props) => {
14510
14869
  i18n.t("savedViews.actions.create")
14511
14870
  ))
14512
14871
  )),
14513
- /* @__PURE__ */ import_react13.default.createElement(import_core_react12.Panel.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ import_react13.default.createElement(
14872
+ /* @__PURE__ */ import_react18.default.createElement(import_core_react13.Panel.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ import_react18.default.createElement(
14514
14873
  PanelContent,
14515
14874
  {
14516
- onSelect: handleViewItemSelect,
14875
+ onSelect: selectSavedViewFromList,
14517
14876
  openModal,
14518
- onDelete: onOpenDeleteModal,
14877
+ onDelete: () => openModal("delete" /* DELETE */),
14519
14878
  updateLocalStorage,
14520
14879
  setSelectedSavedView,
14521
14880
  queryInput,
14522
- selectedSavedView,
14881
+ selectedSavedView: selectedView,
14523
14882
  tableConfig: props.tableConfig,
14524
14883
  defaultView: props.defaultView,
14525
14884
  stickyViewsKey: props.stickyViewsKey,
14885
+ savedViews: allViews,
14526
14886
  provider: props.provider,
14527
14887
  userId: props.userId
14528
14888
  }
14529
14889
  ))
14530
- ), /* @__PURE__ */ import_react13.default.createElement(
14890
+ ), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ import_react18.default.createElement(
14531
14891
  SavedViewsFormModal,
14532
14892
  {
14533
- open: openEditCreateModal,
14534
- mode: editCreateModalType,
14535
- onCancel: onCloseEditModal,
14893
+ open: true,
14894
+ mode: activeModal,
14895
+ onCancel: closeModal,
14536
14896
  queryInput,
14537
14897
  tableConfig: props.tableConfig,
14538
14898
  tableName: props.tableName,
14539
- selectedSavedView,
14899
+ selectedSavedView: selectedView,
14540
14900
  setSelectedSavedView,
14541
- onSelect: (view) => handleViewItemSelect({ item: view }),
14542
- setOpenEditCreateModal,
14901
+ onSelect: selectView,
14902
+ setOpenEditCreateModal: closeModal,
14543
14903
  defaultView: props.defaultView
14544
14904
  }
14545
- ), selectedSavedView && /* @__PURE__ */ import_react13.default.createElement(
14905
+ ), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ import_react18.default.createElement(
14546
14906
  SavedViewsDeleteConfirmationModalShared,
14547
14907
  {
14548
- open: openDeleteModal,
14549
- onDelete: () => {
14550
- onDelete();
14551
- onCloseDeleteModal();
14552
- },
14553
- onCancel: onCloseDeleteModal
14908
+ open: true,
14909
+ onDelete: confirmDeleteAndCloseModal,
14910
+ onCancel: closeModal
14911
+ }
14912
+ ), fetchedView && isModalOpen("crossUser" /* CROSS_USER */) && /* @__PURE__ */ import_react18.default.createElement(
14913
+ CreateViewConfirmationModal,
14914
+ {
14915
+ open: true,
14916
+ savedViewName: fetchedView.name,
14917
+ onClose: selectCurrentViewAndCloseModal,
14918
+ onViewTemporarily: viewSharedViewTemporarily,
14919
+ onCreateView: createPersonalCopyOfSharedView
14554
14920
  }
14555
14921
  ));
14556
14922
  };
14557
14923
  var SavedViews = (props) => {
14558
- return /* @__PURE__ */ import_react13.default.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ import_react13.default.createElement(import_react_query3.QueryClientProvider, { client: queryClient }, /* @__PURE__ */ import_react13.default.createElement(SavedViewsContent, { ...props })));
14924
+ return /* @__PURE__ */ import_react18.default.createElement(EnvironmentI18nProvider, null, /* @__PURE__ */ import_react18.default.createElement(import_react_query3.QueryClientProvider, { client: queryClient }, /* @__PURE__ */ import_react18.default.createElement(SavedViewsContent, { ...props })));
14559
14925
  };
14560
14926
 
14561
14927
  // src/SavedViews/components/SavedViews/SmartGrid/SmartGridSavedViews.tsx
14562
- var import_toast_alert2 = require("@procore/toast-alert");
14928
+ var import_toast_alert3 = require("@procore/toast-alert");
14563
14929
  var SmartGridSavedViews = (props) => {
14564
14930
  const { gridApi, projectId, companyId } = props;
14565
14931
  const { config: tableConfig, setConfig: setTableConfig } = useSmartGridConfig(gridApi);
@@ -14589,7 +14955,7 @@ var SmartGridSavedViews = (props) => {
14589
14955
  setTableConfig(updatedView.table_config);
14590
14956
  return updatedView;
14591
14957
  };
14592
- return /* @__PURE__ */ import_react14.default.createElement(import_toast_alert2.ToastAlertProvider, null, /* @__PURE__ */ import_react14.default.createElement(
14958
+ return /* @__PURE__ */ import_react19.default.createElement(import_toast_alert3.ToastAlertProvider, null, /* @__PURE__ */ import_react19.default.createElement(
14593
14959
  SavedViews,
14594
14960
  {
14595
14961
  onSelect,
@@ -14608,11 +14974,11 @@ var SmartGridSavedViews = (props) => {
14608
14974
  };
14609
14975
 
14610
14976
  // src/SavedViews/components/SavedViews/DataTable/DataTableSavedViews.tsx
14611
- var import_react16 = __toESM(require("react"));
14977
+ var import_react21 = __toESM(require("react"));
14612
14978
 
14613
14979
  // src/SavedViews/components/SavedViews/DataTable/DataTableDefaultSavedView.tsx
14614
- var import_react15 = require("react");
14615
- var import_core_react13 = require("@procore/core-react");
14980
+ var import_react20 = require("react");
14981
+ var import_core_react14 = require("@procore/core-react");
14616
14982
  var DEFAULT_COLUMN_STATE = {
14617
14983
  hidden: false,
14618
14984
  pinned: null,
@@ -14660,7 +15026,7 @@ var extractDefaultView = (columnDefinitions, receivedConfigFromTool) => {
14660
15026
  return result;
14661
15027
  };
14662
15028
  var useDefaultViewName2 = (domain, defaultViewName) => {
14663
- const i18n = (0, import_core_react13.useI18nContext)();
15029
+ const i18n = (0, import_core_react14.useI18nContext)();
14664
15030
  return defaultViewName || i18n.t(domain, {
14665
15031
  scope: "savedViews.defaultViewTitle",
14666
15032
  defaultValue: "Default View"
@@ -14668,7 +15034,7 @@ var useDefaultViewName2 = (domain, defaultViewName) => {
14668
15034
  };
14669
15035
  var useDefaultView2 = (props) => {
14670
15036
  const name = useDefaultViewName2(props.domain, props.defaultViewName);
14671
- const extractedDefaultConfig = (0, import_react15.useMemo)(
15037
+ const extractedDefaultConfig = (0, import_react20.useMemo)(
14672
15038
  () => extractDefaultView(props.columnDefinitions, props.receivedConfigFromTool),
14673
15039
  [props.columnDefinitions, props.receivedConfigFromTool]
14674
15040
  );
@@ -14681,18 +15047,18 @@ var useDefaultView2 = (props) => {
14681
15047
  };
14682
15048
 
14683
15049
  // src/SavedViews/components/SavedViews/DataTable/DataTableSavedViews.tsx
14684
- var import_toast_alert3 = require("@procore/toast-alert");
14685
- var DataTableSavedViews = (0, import_react16.forwardRef)((props, ref) => {
15050
+ var import_toast_alert4 = require("@procore/toast-alert");
15051
+ var DataTableSavedViews = (0, import_react21.forwardRef)((props, ref) => {
14686
15052
  const { tableApi, onTableConfigChange, projectId, companyId } = props;
14687
- const [internalTableConfig, setInternalTableConfig] = (0, import_react16.useState)(
15053
+ const [internalTableConfig, setInternalTableConfig] = (0, import_react21.useState)(
14688
15054
  props.defaultViewConfig
14689
15055
  );
14690
- (0, import_react16.useImperativeHandle)(ref, () => ({
15056
+ (0, import_react21.useImperativeHandle)(ref, () => ({
14691
15057
  setTableConfig: (newConfig) => {
14692
15058
  handleConfigChange(newConfig);
14693
15059
  }
14694
15060
  }));
14695
- const handleConfigChange = (0, import_react16.useCallback)(
15061
+ const handleConfigChange = (0, import_react21.useCallback)(
14696
15062
  (newConfig) => {
14697
15063
  setInternalTableConfig(newConfig);
14698
15064
  onTableConfigChange(newConfig);
@@ -14720,7 +15086,7 @@ var DataTableSavedViews = (0, import_react16.forwardRef)((props, ref) => {
14720
15086
  if (!internalTableConfig) {
14721
15087
  return null;
14722
15088
  }
14723
- return /* @__PURE__ */ import_react16.default.createElement(import_toast_alert3.ToastAlertProvider, null, /* @__PURE__ */ import_react16.default.createElement(
15089
+ return /* @__PURE__ */ import_react21.default.createElement(import_toast_alert4.ToastAlertProvider, null, /* @__PURE__ */ import_react21.default.createElement(
14724
15090
  SavedViews,
14725
15091
  {
14726
15092
  onSelect,