@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.
- package/README.md +13 -2
- package/dist/legacy/adapters/hub-data-loader.d.mts +22 -0
- package/dist/legacy/adapters/hub-data-loader.d.ts +22 -0
- package/dist/legacy/adapters/hub-data-loader.js +273 -0
- package/dist/legacy/adapters/hub-data-loader.mjs +273 -0
- package/dist/legacy/chunk-6DZX6EAA.mjs +37 -0
- package/dist/legacy/chunk-QGM4M3NI.js +37 -0
- package/dist/legacy/index.d.mts +22 -3
- package/dist/legacy/index.d.ts +22 -3
- package/dist/legacy/index.js +755 -487
- package/dist/legacy/index.mjs +493 -268
- package/dist/legacy/transport/default.d.mts +15 -0
- package/dist/legacy/transport/default.d.ts +15 -0
- package/dist/legacy/transport/default.js +104 -0
- package/dist/legacy/transport/default.mjs +104 -0
- package/dist/legacy/types-BWhJ-on3.d.mts +109 -0
- package/dist/legacy/types-BWhJ-on3.d.ts +109 -0
- package/dist/modern/adapters/hub-data-loader.d.mts +22 -0
- package/dist/modern/adapters/hub-data-loader.d.ts +22 -0
- package/dist/modern/adapters/hub-data-loader.js +270 -0
- package/dist/modern/adapters/hub-data-loader.mjs +270 -0
- package/dist/modern/chunk-6DZX6EAA.mjs +37 -0
- package/dist/modern/chunk-QGM4M3NI.js +37 -0
- package/dist/modern/index.d.mts +22 -3
- package/dist/modern/index.d.ts +22 -3
- package/dist/modern/index.js +807 -540
- package/dist/modern/index.mjs +492 -268
- package/dist/modern/transport/default.d.mts +15 -0
- package/dist/modern/transport/default.d.ts +15 -0
- package/dist/modern/transport/default.js +104 -0
- package/dist/modern/transport/default.mjs +104 -0
- package/dist/modern/types-BWhJ-on3.d.mts +109 -0
- package/dist/modern/types-BWhJ-on3.d.ts +109 -0
- package/package.json +35 -2
package/dist/modern/index.js
CHANGED
|
@@ -1,38 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
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(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
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"(
|
|
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
|
|
365
|
-
var freeModule = freeExports && typeof
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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(
|
|
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
|
-
|
|
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: "
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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: "
|
|
6281
|
-
modal: "Modal pour cr\xE9er/mettre \xE0 jour les affichages
|
|
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
|
|
6294
|
-
create: "D\xE9sol\xE9, l'affichage
|
|
6295
|
-
update: "D\xE9sol\xE9, l'affichage
|
|
6296
|
-
delete: "D\xE9sol\xE9, l'affichage
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
7327
|
-
|
|
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
|
-
|
|
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 ===
|
|
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
|
|
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
|
-
} } :
|
|
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
|
-
} } :
|
|
8646
|
+
} } : React.default.createContext(void 0);
|
|
8559
8647
|
function Ze() {
|
|
8560
|
-
return h ? He :
|
|
8648
|
+
return h ? He : React.default.useContext(Ue);
|
|
8561
8649
|
}
|
|
8562
8650
|
function Ke(e) {
|
|
8563
|
-
if (h || !
|
|
8564
|
-
var t = Ze().styleSheet, n =
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
-
} } :
|
|
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 :
|
|
8604
|
-
"production" !== process.env.NODE_ENV &&
|
|
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 &&
|
|
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,
|
|
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(
|
|
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(),
|
|
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 =
|
|
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), [
|
|
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
|
|
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 =
|
|
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
|
-
|
|
8776
|
-
|
|
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
|
|
8888
|
+
var _cdntranslations = require('@procore/cdn-translations');
|
|
8801
8889
|
var useCDNTranslations = () => {
|
|
8802
|
-
const i18n = (0,
|
|
8803
|
-
const cachedTranslations = (0,
|
|
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,
|
|
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,
|
|
8909
|
+
_react.useEffect.call(void 0, () => {
|
|
8822
8910
|
if (cdnTranslations.status === "resolved" && cdnTranslations.translations) {
|
|
8823
8911
|
writeCache(
|
|
8824
8912
|
i18n.locale,
|
|
@@ -8826,17 +8914,42 @@ var useCDNTranslations = () => {
|
|
|
8826
8914
|
);
|
|
8827
8915
|
}
|
|
8828
8916
|
}, [cdnTranslations.status, cdnTranslations.translations, i18n.locale]);
|
|
8829
|
-
const translationsToUse = cdnTranslations.status === "resolved" ? cdnTranslations.translations : cachedTranslations
|
|
8830
|
-
return (0,
|
|
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__ */
|
|
8925
|
+
return /* @__PURE__ */ React.default.createElement(_corereact.I18nContext.Provider, { value: i18n }, children);
|
|
8838
8926
|
};
|
|
8839
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);
|
|
8950
|
+
};
|
|
8951
|
+
var useSavedViewsSelection = () => _react.useContext.call(void 0, SavedViewsSelectionContext);
|
|
8952
|
+
|
|
8840
8953
|
// src/components/buttons/SavedViewsButton.tsx
|
|
8841
8954
|
var StyledIcon = pt(ExpandSidebar_default)`
|
|
8842
8955
|
transform: ${(props) => props.left ? "rotate(180deg)" : ""};
|
|
@@ -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
|
-
|
|
8855
|
-
|
|
8975
|
+
const selection = useSavedViewsSelection();
|
|
8976
|
+
const activeView = _optionalChain([selection, 'optionalAccess', _2 => _2.selectedView]);
|
|
8977
|
+
const activeName = _optionalChain([activeView, 'optionalAccess', _5 => _5.name]);
|
|
8978
|
+
const activeType = _optionalChain([activeView, 'optionalAccess', _6 => _6.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__ */
|
|
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
|
-
|
|
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
|
-
|
|
9006
|
+
|
|
8869
9007
|
var useSavedViewsPanel = (domain, tableName) => {
|
|
8870
9008
|
const key = (domain2, tableName2) => `savedViewsPanel-${domain2}-${tableName2}`;
|
|
8871
|
-
const [isOpen, setIsOpen] = (0,
|
|
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__ */
|
|
8879
|
-
return {
|
|
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
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
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(
|
|
9063
|
+
var Container2 = pt(_corereact.Flex)`
|
|
8896
9064
|
overflow-wrap: anywhere;
|
|
8897
9065
|
min-height: 24px;
|
|
8898
9066
|
|
|
@@ -8904,17 +9072,17 @@ var IconWrapper = pt.span`
|
|
|
8904
9072
|
justify-content: center;
|
|
8905
9073
|
`;
|
|
8906
9074
|
var SavedViewCollectionMenuItem = (props) => {
|
|
8907
|
-
const onClick =
|
|
9075
|
+
const onClick = React17.useCallback(
|
|
8908
9076
|
(a2) => {
|
|
8909
9077
|
if (!props.item) {
|
|
8910
9078
|
return;
|
|
8911
9079
|
}
|
|
8912
9080
|
switch (a2.value) {
|
|
8913
9081
|
case "editNameDesc":
|
|
8914
|
-
props.onEdit
|
|
9082
|
+
_optionalChain([props, 'access', _7 => _7.onEdit, 'optionalCall', _8 => _8({ savedView: props.item })]);
|
|
8915
9083
|
break;
|
|
8916
9084
|
case "delete":
|
|
8917
|
-
props.onDelete
|
|
9085
|
+
_optionalChain([props, 'access', _9 => _9.onDelete, 'optionalCall', _10 => _10({ savedView: props.item })]);
|
|
8918
9086
|
break;
|
|
8919
9087
|
default:
|
|
8920
9088
|
break;
|
|
@@ -8924,10 +9092,12 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8924
9092
|
);
|
|
8925
9093
|
const updateItem = (event) => {
|
|
8926
9094
|
event.stopPropagation();
|
|
8927
|
-
props.onUpdate
|
|
9095
|
+
_optionalChain([props, 'access', _11 => _11.onUpdate, 'optionalCall', _12 => _12(props.item)]);
|
|
8928
9096
|
};
|
|
8929
|
-
const { showToast } = (0,
|
|
8930
|
-
const i18n = (0,
|
|
9097
|
+
const { showToast } = _toastalert.useToastAlertContext.call(void 0, );
|
|
9098
|
+
const i18n = _corereact.useI18nContext.call(void 0, );
|
|
9099
|
+
const transport = useOptionalSavedViewsTransport();
|
|
9100
|
+
const canShareViaUrl = _optionalChain([transport, 'optionalAccess', _13 => _13.supportsUrlSharing]) !== false;
|
|
8931
9101
|
const copyShareLink = async (event) => {
|
|
8932
9102
|
event.stopPropagation();
|
|
8933
9103
|
try {
|
|
@@ -8950,18 +9120,18 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8950
9120
|
label: i18n.t("savedViews.actions.delete")
|
|
8951
9121
|
}
|
|
8952
9122
|
];
|
|
8953
|
-
const preventEventBubbleToNotTriggerViewSelectEvent =
|
|
9123
|
+
const preventEventBubbleToNotTriggerViewSelectEvent = React17.useCallback(
|
|
8954
9124
|
(e) => {
|
|
8955
9125
|
e.stopPropagation();
|
|
8956
9126
|
},
|
|
8957
9127
|
[]
|
|
8958
9128
|
);
|
|
8959
9129
|
const hasUpdateButton = props.item.view_level !== "default" && props.canUpdate;
|
|
8960
|
-
const hasCopyShareLinkButton = props.item.view_level !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary";
|
|
9130
|
+
const hasCopyShareLinkButton = canShareViaUrl && props.item.view_level !== "default" && props.selected && !props.canUpdate && props.item.id !== "temporary";
|
|
8961
9131
|
const hasClearTemporaryButton = props.item.id === "temporary";
|
|
8962
9132
|
const hasOverflowMenu = props.item.view_level !== "default" && props.canEditOrDelete;
|
|
8963
9133
|
const hasActions = hasUpdateButton || hasCopyShareLinkButton || hasClearTemporaryButton || hasOverflowMenu;
|
|
8964
|
-
return /* @__PURE__ */
|
|
9134
|
+
return /* @__PURE__ */ React17.createElement(
|
|
8965
9135
|
Container2,
|
|
8966
9136
|
{
|
|
8967
9137
|
"aria-selected": Boolean(props.selected),
|
|
@@ -8973,7 +9143,7 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8973
9143
|
"data-testid": "saved-view-collection-menu-item",
|
|
8974
9144
|
onKeyDown: preventEventBubbleToNotTriggerViewSelectEvent
|
|
8975
9145
|
},
|
|
8976
|
-
/* @__PURE__ */
|
|
9146
|
+
/* @__PURE__ */ React17.createElement(
|
|
8977
9147
|
"span",
|
|
8978
9148
|
{
|
|
8979
9149
|
"data-testid": "saved-view-display-name",
|
|
@@ -8981,8 +9151,8 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8981
9151
|
},
|
|
8982
9152
|
props.item.name
|
|
8983
9153
|
),
|
|
8984
|
-
hasActions && /* @__PURE__ */
|
|
8985
|
-
|
|
9154
|
+
hasActions && /* @__PURE__ */ React17.createElement(RowActionsBox, null, /* @__PURE__ */ React17.createElement(_corereact.Box, { justifyContent: "space-between" }, hasUpdateButton && /* @__PURE__ */ React17.createElement(
|
|
9155
|
+
_corereact.Button,
|
|
8986
9156
|
{
|
|
8987
9157
|
onClick: updateItem,
|
|
8988
9158
|
variant: "secondary",
|
|
@@ -8992,8 +9162,8 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
8992
9162
|
loading: props.isUpdateProcessing
|
|
8993
9163
|
},
|
|
8994
9164
|
i18n.t("savedViews.actions.update")
|
|
8995
|
-
), hasCopyShareLinkButton && /* @__PURE__ */
|
|
8996
|
-
|
|
9165
|
+
), hasCopyShareLinkButton && /* @__PURE__ */ React17.createElement(
|
|
9166
|
+
_corereact.Button,
|
|
8997
9167
|
{
|
|
8998
9168
|
onClick: copyShareLink,
|
|
8999
9169
|
variant: "tertiary",
|
|
@@ -9001,13 +9171,13 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
9001
9171
|
"aria-label": i18n.t("savedViews.actions.copyShareLink"),
|
|
9002
9172
|
"data-testid": "copy-share-link-button"
|
|
9003
9173
|
},
|
|
9004
|
-
/* @__PURE__ */
|
|
9005
|
-
), hasClearTemporaryButton && /* @__PURE__ */
|
|
9006
|
-
|
|
9174
|
+
/* @__PURE__ */ React17.createElement(IconWrapper, null, /* @__PURE__ */ React17.createElement(Link_default, { size: "sm" }))
|
|
9175
|
+
), hasClearTemporaryButton && /* @__PURE__ */ React17.createElement(
|
|
9176
|
+
_corereact.Button,
|
|
9007
9177
|
{
|
|
9008
9178
|
onClick: (e) => {
|
|
9009
9179
|
e.stopPropagation();
|
|
9010
|
-
props.onClearTemporary
|
|
9180
|
+
_optionalChain([props, 'access', _14 => _14.onClearTemporary, 'optionalCall', _15 => _15()]);
|
|
9011
9181
|
},
|
|
9012
9182
|
variant: "tertiary",
|
|
9013
9183
|
size: "sm",
|
|
@@ -9015,9 +9185,9 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
9015
9185
|
title: i18n.t("savedViews.actions.clearTemporary"),
|
|
9016
9186
|
"data-testid": "clear-temporary-view-button"
|
|
9017
9187
|
},
|
|
9018
|
-
/* @__PURE__ */
|
|
9019
|
-
)), /* @__PURE__ */
|
|
9020
|
-
|
|
9188
|
+
/* @__PURE__ */ React17.createElement(IconWrapper, null, /* @__PURE__ */ React17.createElement(Clear_default, { size: "sm" }))
|
|
9189
|
+
)), /* @__PURE__ */ React17.createElement(_corereact.Box, null, hasOverflowMenu && /* @__PURE__ */ React17.createElement(
|
|
9190
|
+
_corereact.DropdownFlyout,
|
|
9021
9191
|
{
|
|
9022
9192
|
"data-testid": "saved-view-overflow-button",
|
|
9023
9193
|
options: flyoutMenuOptions,
|
|
@@ -9032,26 +9202,20 @@ var SavedViewCollectionMenuItem = (props) => {
|
|
|
9032
9202
|
};
|
|
9033
9203
|
|
|
9034
9204
|
// src/components/panels/ExpandedPanel.tsx
|
|
9035
|
-
|
|
9036
|
-
var ExpandedPanel = pt(
|
|
9205
|
+
|
|
9206
|
+
var ExpandedPanel = pt(_corereact.Panel)`
|
|
9037
9207
|
width: ${({ provider }) => provider === "data-table" ? "316px" : "100%"};
|
|
9038
9208
|
height: 100%;
|
|
9039
9209
|
border-radius: 4px 0 0 4px;
|
|
9040
9210
|
`;
|
|
9041
9211
|
|
|
9042
9212
|
// src/components/panels/PanelContent.tsx
|
|
9043
|
-
var import_core_react8 = require("@procore/core-react");
|
|
9044
|
-
var import_toast_alert2 = require("@procore/toast-alert");
|
|
9045
|
-
var import_react9 = __toESM(require("react"));
|
|
9046
9213
|
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
var import_react_query2 = require("@tanstack/react-query");
|
|
9214
|
+
|
|
9215
|
+
|
|
9050
9216
|
|
|
9051
9217
|
// src/utils/api/queriesHandler.ts
|
|
9052
|
-
|
|
9053
|
-
var import_react_query = require("@tanstack/react-query");
|
|
9054
|
-
var import_core_react5 = require("@procore/core-react");
|
|
9218
|
+
|
|
9055
9219
|
var getBasePath = (companyId, projectId) => {
|
|
9056
9220
|
if (projectId) {
|
|
9057
9221
|
return `/rest/v2.0/companies/${companyId}/projects/${projectId}/saved_views`;
|
|
@@ -9060,22 +9224,39 @@ var getBasePath = (companyId, projectId) => {
|
|
|
9060
9224
|
};
|
|
9061
9225
|
var useApiRequest = (props, method, mutationKey) => {
|
|
9062
9226
|
const { projectId, companyId, domain, tableName } = props;
|
|
9063
|
-
const
|
|
9064
|
-
const
|
|
9227
|
+
const transport = useSavedViewsTransport();
|
|
9228
|
+
const http = transport.useHttp();
|
|
9229
|
+
const cacheControl = transport.useCacheControl();
|
|
9230
|
+
const { locale } = _corereact.useI18nContext.call(void 0, );
|
|
9065
9231
|
const basePath = getBasePath(companyId, projectId);
|
|
9066
|
-
const queryKey = [
|
|
9067
|
-
|
|
9232
|
+
const queryKey = [
|
|
9233
|
+
"savedViews",
|
|
9234
|
+
domain,
|
|
9235
|
+
tableName,
|
|
9236
|
+
companyId,
|
|
9237
|
+
projectId
|
|
9238
|
+
];
|
|
9239
|
+
return transport.useMutationAdapter({
|
|
9068
9240
|
mutationKey,
|
|
9069
9241
|
mutationFn: async (savedView) => {
|
|
9070
|
-
let url =
|
|
9071
|
-
|
|
9242
|
+
let url = basePath;
|
|
9243
|
+
let body = { ...savedView };
|
|
9244
|
+
if (method === "DELETE") {
|
|
9072
9245
|
url = `${basePath}/${savedView.share_token}?permissions_domain=${domain}`;
|
|
9246
|
+
} else if (method === "PUT") {
|
|
9247
|
+
url = `${basePath}/${savedView.share_token}`;
|
|
9248
|
+
body = { ...savedView, permissions_domain: domain };
|
|
9073
9249
|
} else {
|
|
9074
|
-
|
|
9250
|
+
body = {
|
|
9251
|
+
...savedView,
|
|
9252
|
+
table_name: tableName,
|
|
9253
|
+
permissions_domain: domain
|
|
9254
|
+
};
|
|
9075
9255
|
}
|
|
9076
|
-
const response = await (
|
|
9256
|
+
const response = await http({
|
|
9077
9257
|
method,
|
|
9078
|
-
|
|
9258
|
+
url,
|
|
9259
|
+
body: JSON.stringify(body),
|
|
9079
9260
|
headers: {
|
|
9080
9261
|
"Content-Type": "application/json",
|
|
9081
9262
|
"Accept-Language": locale
|
|
@@ -9088,23 +9269,19 @@ var useApiRequest = (props, method, mutationKey) => {
|
|
|
9088
9269
|
},
|
|
9089
9270
|
onSuccess: (savedView) => {
|
|
9090
9271
|
if (method === "DELETE" || method === "POST") {
|
|
9091
|
-
|
|
9092
|
-
queryKey
|
|
9093
|
-
});
|
|
9272
|
+
cacheControl.invalidate(queryKey);
|
|
9094
9273
|
return;
|
|
9095
9274
|
} else {
|
|
9096
|
-
const oldData =
|
|
9097
|
-
const oldView = oldData
|
|
9275
|
+
const oldData = cacheControl.getData(queryKey);
|
|
9276
|
+
const oldView = _optionalChain([oldData, 'optionalAccess', _16 => _16.find, 'call', _17 => _17(
|
|
9098
9277
|
(item) => item.share_token === savedView.share_token
|
|
9099
|
-
);
|
|
9100
|
-
if (oldView
|
|
9101
|
-
|
|
9102
|
-
queryKey
|
|
9103
|
-
});
|
|
9278
|
+
)]);
|
|
9279
|
+
if (_optionalChain([oldView, 'optionalAccess', _18 => _18.name]) !== savedView.name) {
|
|
9280
|
+
cacheControl.invalidate(queryKey);
|
|
9104
9281
|
return;
|
|
9105
9282
|
}
|
|
9106
9283
|
}
|
|
9107
|
-
|
|
9284
|
+
cacheControl.setData(queryKey, (oldData) => {
|
|
9108
9285
|
if (!oldData) return [savedView];
|
|
9109
9286
|
return oldData.map(
|
|
9110
9287
|
(item) => item.share_token === savedView.share_token ? savedView : item
|
|
@@ -9133,13 +9310,17 @@ var getBasePath2 = (companyId, projectId) => {
|
|
|
9133
9310
|
};
|
|
9134
9311
|
var useSavedViewsQuery = (props) => {
|
|
9135
9312
|
const { projectId, companyId, domain, tableName } = props;
|
|
9313
|
+
const transport = useSavedViewsTransport();
|
|
9314
|
+
const http = transport.useHttp();
|
|
9136
9315
|
const basePath = getBasePath2(companyId, projectId);
|
|
9137
9316
|
const url = `${basePath}?table_name=${tableName}&permissions_domain=${domain}`;
|
|
9138
|
-
return
|
|
9317
|
+
return transport.useQueryAdapter({
|
|
9139
9318
|
queryKey: ["savedViews", domain, tableName, companyId, projectId],
|
|
9140
9319
|
queryFn: async () => {
|
|
9141
9320
|
const getUrl = `${url}&per_page=${PAGE_SIZE}`;
|
|
9142
|
-
const response = await (
|
|
9321
|
+
const response = await http({
|
|
9322
|
+
method: "GET",
|
|
9323
|
+
url: getUrl,
|
|
9143
9324
|
priority: "low"
|
|
9144
9325
|
});
|
|
9145
9326
|
return response.data;
|
|
@@ -9148,12 +9329,16 @@ var useSavedViewsQuery = (props) => {
|
|
|
9148
9329
|
};
|
|
9149
9330
|
var useSavedViewsPermissions = (props) => {
|
|
9150
9331
|
const { projectId, companyId, domain } = props;
|
|
9332
|
+
const transport = useSavedViewsTransport();
|
|
9333
|
+
const http = transport.useHttp();
|
|
9151
9334
|
const basePath = getBasePath2(companyId, projectId);
|
|
9152
9335
|
const url = `${basePath}/permissions?permissions_domain=${domain}`;
|
|
9153
|
-
return
|
|
9336
|
+
return transport.useQueryAdapter({
|
|
9154
9337
|
queryKey: ["savedViewsConfig", domain, companyId, projectId],
|
|
9155
9338
|
queryFn: async () => {
|
|
9156
|
-
const response = await (
|
|
9339
|
+
const response = await http({
|
|
9340
|
+
method: "GET",
|
|
9341
|
+
url,
|
|
9157
9342
|
priority: "low"
|
|
9158
9343
|
});
|
|
9159
9344
|
return response.data;
|
|
@@ -9177,13 +9362,17 @@ var useDeleteSavedView = (props) => useApiRequest(props, "DELETE", [
|
|
|
9177
9362
|
]);
|
|
9178
9363
|
var useFetchSavedViewById = (savedViewToken, queryInput, enabled = true) => {
|
|
9179
9364
|
const { projectId, companyId, domain } = queryInput;
|
|
9365
|
+
const transport = useSavedViewsTransport();
|
|
9366
|
+
const http = transport.useHttp();
|
|
9180
9367
|
const basePath = getBasePath2(companyId, projectId);
|
|
9181
|
-
return
|
|
9368
|
+
return transport.useQueryAdapter({
|
|
9182
9369
|
enabled: enabled && Boolean(savedViewToken),
|
|
9183
9370
|
queryKey: ["savedView", savedViewToken, companyId, projectId],
|
|
9184
9371
|
queryFn: async () => {
|
|
9185
9372
|
const url = `${basePath}/${savedViewToken}?permissions_domain=${domain}`;
|
|
9186
|
-
const response = await (
|
|
9373
|
+
const response = await http({
|
|
9374
|
+
method: "GET",
|
|
9375
|
+
url,
|
|
9187
9376
|
priority: "low"
|
|
9188
9377
|
});
|
|
9189
9378
|
return response.data;
|
|
@@ -9192,14 +9381,14 @@ var useFetchSavedViewById = (savedViewToken, queryInput, enabled = true) => {
|
|
|
9192
9381
|
};
|
|
9193
9382
|
|
|
9194
9383
|
// src/components/panels/PanelContentUtils.ts
|
|
9195
|
-
var import_lodash = __toESM(require_lodash());
|
|
9384
|
+
var import_lodash = _chunkQGM4M3NIjs.__toESM.call(void 0, require_lodash());
|
|
9196
9385
|
|
|
9197
9386
|
// src/components/adapters/smart-grid/SmartGridUtils.ts
|
|
9198
9387
|
function getSmartGridConfig(api) {
|
|
9199
9388
|
const columnState = api.getColumnState();
|
|
9200
9389
|
const columnGroupState = api.getColumnGroupState();
|
|
9201
9390
|
const rowGroupState = api.getRowGroupColumns().map((col) => col.getColId());
|
|
9202
|
-
const rowHeight = api.getGridOption("rowHeight")
|
|
9391
|
+
const rowHeight = _nullishCoalesce(api.getGridOption("rowHeight"), () => ( api.getSizesForCurrentTheme().rowHeight));
|
|
9203
9392
|
const filterState = api.getFilterModel();
|
|
9204
9393
|
return {
|
|
9205
9394
|
columnState,
|
|
@@ -9224,8 +9413,8 @@ function setSmartGridConfig(api, config) {
|
|
|
9224
9413
|
// src/components/saved-views/SavedViewsUtils.ts
|
|
9225
9414
|
var customAndConfigSync = (viewTableConfig, defaultTableConfig) => {
|
|
9226
9415
|
if (!viewTableConfig && !defaultTableConfig) return void 0;
|
|
9227
|
-
if (!viewTableConfig
|
|
9228
|
-
if (!defaultTableConfig
|
|
9416
|
+
if (!_optionalChain([viewTableConfig, 'optionalAccess', _19 => _19.columnState])) return defaultTableConfig;
|
|
9417
|
+
if (!_optionalChain([defaultTableConfig, 'optionalAccess', _20 => _20.columnState])) return viewTableConfig;
|
|
9229
9418
|
const viewColumns = viewTableConfig.columnState;
|
|
9230
9419
|
const defaultViewColumns = defaultTableConfig.columnState;
|
|
9231
9420
|
if (!Array.isArray(viewColumns) || !Array.isArray(defaultViewColumns))
|
|
@@ -9268,20 +9457,20 @@ var updateTableConfig = (view, tableApi, provider) => {
|
|
|
9268
9457
|
const dataTableApi = tableApi;
|
|
9269
9458
|
const tableConfig = view.table_config;
|
|
9270
9459
|
if (tableConfig) {
|
|
9271
|
-
const currentTableConfig = dataTableApi
|
|
9272
|
-
const rowHeight = tableConfig
|
|
9273
|
-
const hasServerFilters = Boolean(currentTableConfig
|
|
9460
|
+
const currentTableConfig = _optionalChain([dataTableApi, 'optionalAccess', _21 => _21.getTableConfiguration, 'optionalCall', _22 => _22()]);
|
|
9461
|
+
const rowHeight = _nullishCoalesce(_optionalChain([tableConfig, 'optionalAccess', _23 => _23.rowHeight]), () => ( _optionalChain([currentTableConfig, 'optionalAccess', _24 => _24.rowHeight])));
|
|
9462
|
+
const hasServerFilters = Boolean(_optionalChain([currentTableConfig, 'optionalAccess', _25 => _25.serverFilters, 'optionalAccess', _26 => _26.length])) || Boolean(_optionalChain([tableConfig, 'optionalAccess', _27 => _27.serverFilters, 'optionalAccess', _28 => _28.length]));
|
|
9274
9463
|
const usesServerSideFiltering = hasServerFilters;
|
|
9275
9464
|
if (rowHeight !== void 0) {
|
|
9276
|
-
dataTableApi
|
|
9465
|
+
_optionalChain([dataTableApi, 'optionalAccess', _29 => _29.setRowHeight, 'call', _30 => _30(rowHeight)]);
|
|
9277
9466
|
}
|
|
9278
9467
|
if (usesServerSideFiltering) {
|
|
9279
|
-
dataTableApi
|
|
9468
|
+
_optionalChain([dataTableApi, 'optionalAccess', _31 => _31.setTableConfiguration, 'call', _32 => _32({
|
|
9280
9469
|
...tableConfig,
|
|
9281
9470
|
filters: void 0
|
|
9282
|
-
});
|
|
9471
|
+
})]);
|
|
9283
9472
|
} else {
|
|
9284
|
-
dataTableApi
|
|
9473
|
+
_optionalChain([dataTableApi, 'optionalAccess', _33 => _33.setTableConfiguration, 'call', _34 => _34(tableConfig)]);
|
|
9285
9474
|
}
|
|
9286
9475
|
}
|
|
9287
9476
|
}
|
|
@@ -9348,7 +9537,7 @@ var cleanObject = (table_config, provider) => {
|
|
|
9348
9537
|
};
|
|
9349
9538
|
} else {
|
|
9350
9539
|
const dataTableConfig = table_config;
|
|
9351
|
-
if (!dataTableConfig
|
|
9540
|
+
if (!_optionalChain([dataTableConfig, 'optionalAccess', _35 => _35.serverFilters])) return table_config;
|
|
9352
9541
|
const orderedColumns = getOrderedVisibleColumns(
|
|
9353
9542
|
dataTableConfig.columnState,
|
|
9354
9543
|
"field"
|
|
@@ -9365,7 +9554,7 @@ var cleanObject = (table_config, provider) => {
|
|
|
9365
9554
|
}
|
|
9366
9555
|
};
|
|
9367
9556
|
var normalizeForComparison = (config) => {
|
|
9368
|
-
if (!config
|
|
9557
|
+
if (!_optionalChain([config, 'optionalAccess', _36 => _36.columnState])) return config;
|
|
9369
9558
|
return {
|
|
9370
9559
|
...config,
|
|
9371
9560
|
columnState: config.columnState.map((col) => {
|
|
@@ -9394,19 +9583,19 @@ var hasPermissionForViewLevel = (viewLevel, permissions) => {
|
|
|
9394
9583
|
case "personal":
|
|
9395
9584
|
return true;
|
|
9396
9585
|
case "project":
|
|
9397
|
-
return permissions
|
|
9586
|
+
return _optionalChain([permissions, 'optionalAccess', _37 => _37.can_create_project_saved_views]);
|
|
9398
9587
|
case "company":
|
|
9399
|
-
return permissions
|
|
9588
|
+
return _optionalChain([permissions, 'optionalAccess', _38 => _38.can_create_company_saved_views]);
|
|
9400
9589
|
default:
|
|
9401
9590
|
return false;
|
|
9402
9591
|
}
|
|
9403
9592
|
};
|
|
9404
9593
|
|
|
9405
9594
|
// src/components/panels/useGroups.ts
|
|
9406
|
-
|
|
9595
|
+
|
|
9407
9596
|
var useGroups = (isProjectLevelTool) => {
|
|
9408
9597
|
const viewLevels = getViewLevels(isProjectLevelTool);
|
|
9409
|
-
const [groups, setGroups] = (0,
|
|
9598
|
+
const [groups, setGroups] = _react.useState.call(void 0,
|
|
9410
9599
|
Object.fromEntries(viewLevels.map((level) => [level, true]))
|
|
9411
9600
|
);
|
|
9412
9601
|
const toggleGroup = (group) => {
|
|
@@ -9416,26 +9605,32 @@ var useGroups = (isProjectLevelTool) => {
|
|
|
9416
9605
|
};
|
|
9417
9606
|
|
|
9418
9607
|
// src/components/panels/ViewLevelHeader.tsx
|
|
9419
|
-
|
|
9420
|
-
|
|
9608
|
+
|
|
9609
|
+
|
|
9610
|
+
|
|
9611
|
+
|
|
9612
|
+
|
|
9613
|
+
|
|
9614
|
+
|
|
9615
|
+
|
|
9421
9616
|
var groupIcon = (group) => {
|
|
9422
9617
|
switch (group) {
|
|
9423
9618
|
case "personal":
|
|
9424
|
-
return /* @__PURE__ */
|
|
9619
|
+
return /* @__PURE__ */ React.default.createElement(Person_default, null);
|
|
9425
9620
|
case "project":
|
|
9426
|
-
return /* @__PURE__ */
|
|
9621
|
+
return /* @__PURE__ */ React.default.createElement(Excavator_default, null);
|
|
9427
9622
|
case "company":
|
|
9428
|
-
return /* @__PURE__ */
|
|
9623
|
+
return /* @__PURE__ */ React.default.createElement(Building_default, null);
|
|
9429
9624
|
}
|
|
9430
9625
|
};
|
|
9431
|
-
var StyledButton = pt(
|
|
9626
|
+
var StyledButton = pt(_corereact.Button)`
|
|
9432
9627
|
&:hover {
|
|
9433
|
-
background-color: ${
|
|
9628
|
+
background-color: ${_corereact.colors.gray98};
|
|
9434
9629
|
}
|
|
9435
9630
|
`;
|
|
9436
9631
|
var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
|
|
9437
|
-
const I18n = (0,
|
|
9438
|
-
return /* @__PURE__ */
|
|
9632
|
+
const I18n = _corereact.useI18nContext.call(void 0, );
|
|
9633
|
+
return /* @__PURE__ */ React.default.createElement(_corereact.Box, { style: { width: "100%" } }, /* @__PURE__ */ React.default.createElement(
|
|
9439
9634
|
StyledButton,
|
|
9440
9635
|
{
|
|
9441
9636
|
block: true,
|
|
@@ -9448,19 +9643,19 @@ var ViewLevelHeader = ({ expanded, toggleGroup, group }) => {
|
|
|
9448
9643
|
onClick: () => toggleGroup(group),
|
|
9449
9644
|
"aria-controls": `saved-views-collections-${group}`,
|
|
9450
9645
|
"aria-expanded": expanded,
|
|
9451
|
-
icon: expanded ? /* @__PURE__ */
|
|
9646
|
+
icon: expanded ? /* @__PURE__ */ React.default.createElement(ChevronDown_default, { size: "sm" }) : /* @__PURE__ */ React.default.createElement(ChevronRight_default, { size: "sm" })
|
|
9452
9647
|
},
|
|
9453
9648
|
groupIcon(group),
|
|
9454
|
-
/* @__PURE__ */
|
|
9649
|
+
/* @__PURE__ */ React.default.createElement(_corereact.Typography, { weight: "semibold" }, I18n.t(`savedViews.viewLevel.${group}`))
|
|
9455
9650
|
));
|
|
9456
9651
|
};
|
|
9457
9652
|
var ViewLevelHeader_default = ViewLevelHeader;
|
|
9458
9653
|
|
|
9459
9654
|
// src/utils/hooks/useScrollToRef.ts
|
|
9460
|
-
|
|
9655
|
+
|
|
9461
9656
|
var useScrollToRef = (dependency) => {
|
|
9462
|
-
const ref = (0,
|
|
9463
|
-
(0,
|
|
9657
|
+
const ref = _react.useRef.call(void 0, null);
|
|
9658
|
+
_react.useEffect.call(void 0, () => {
|
|
9464
9659
|
if (ref.current) {
|
|
9465
9660
|
ref.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
9466
9661
|
}
|
|
@@ -9469,41 +9664,46 @@ var useScrollToRef = (dependency) => {
|
|
|
9469
9664
|
};
|
|
9470
9665
|
|
|
9471
9666
|
// src/components/panels/PanelContent.styles.ts
|
|
9472
|
-
|
|
9473
|
-
|
|
9667
|
+
|
|
9668
|
+
|
|
9669
|
+
|
|
9670
|
+
|
|
9671
|
+
|
|
9672
|
+
|
|
9673
|
+
var Row = pt(_corereact.MenuImperative.Item)`
|
|
9474
9674
|
width: 100%;
|
|
9475
9675
|
padding-left: 35px;
|
|
9476
9676
|
padding-right: 4px;
|
|
9477
|
-
background-color: ${({ selected }) => selected ?
|
|
9677
|
+
background-color: ${({ selected }) => selected ? _corereact.colors.blue96 : "transparent"};
|
|
9478
9678
|
|
|
9479
9679
|
&:hover {
|
|
9480
|
-
background-color: ${({ selected }) => selected ?
|
|
9680
|
+
background-color: ${({ selected }) => selected ? _corereact.colors.blue96 : _corereact.colors.gray98};
|
|
9481
9681
|
}
|
|
9482
9682
|
`;
|
|
9483
|
-
var Panel2 = pt(
|
|
9683
|
+
var Panel2 = pt(_corereact.DetailPage.Card)`
|
|
9484
9684
|
margin: 0;
|
|
9485
9685
|
height: 100%;
|
|
9486
|
-
padding-top: ${
|
|
9686
|
+
padding-top: ${_corereact.spacing.sm}px;
|
|
9487
9687
|
box-shadow: none;
|
|
9488
9688
|
`;
|
|
9489
9689
|
|
|
9490
9690
|
// src/components/panels/PanelContent.tsx
|
|
9491
|
-
var StyledMenuImperative = pt(
|
|
9691
|
+
var StyledMenuImperative = pt(_corereact.MenuImperative)`
|
|
9492
9692
|
div[role='listbox'] {
|
|
9493
9693
|
padding: 0;
|
|
9494
9694
|
}
|
|
9495
9695
|
`;
|
|
9496
9696
|
var PanelContent = (props) => {
|
|
9497
9697
|
const { queryInput, selectedSavedView, tableConfig } = props;
|
|
9498
|
-
const { showToast } = (0,
|
|
9499
|
-
const I18n = (0,
|
|
9698
|
+
const { showToast } = _toastalert.useToastAlertContext.call(void 0, );
|
|
9699
|
+
const I18n = _corereact.useI18nContext.call(void 0, );
|
|
9500
9700
|
const { data: savedViewsFromQuery, error: savedViewsError } = useSavedViewsQuery(props.queryInput);
|
|
9501
9701
|
const updateMutation = useUpdateSavedView(queryInput);
|
|
9502
9702
|
const { mutate: updateSavedView } = updateMutation;
|
|
9503
|
-
const isUpdateLoading =
|
|
9504
|
-
const savedViews = props.savedViews
|
|
9505
|
-
const errorToastRef =
|
|
9506
|
-
|
|
9703
|
+
const isUpdateLoading = updateMutation.isPending;
|
|
9704
|
+
const savedViews = _nullishCoalesce(props.savedViews, () => ( savedViewsFromQuery));
|
|
9705
|
+
const errorToastRef = React.default.useRef(null);
|
|
9706
|
+
React.default.useEffect(() => {
|
|
9507
9707
|
if (savedViewsError && savedViewsError !== errorToastRef.current) {
|
|
9508
9708
|
showToast.error(I18n.t("savedViews.errors.fetch"));
|
|
9509
9709
|
errorToastRef.current = savedViewsError;
|
|
@@ -9511,8 +9711,8 @@ var PanelContent = (props) => {
|
|
|
9511
9711
|
}, [savedViewsError, showToast, I18n]);
|
|
9512
9712
|
const { data: permissions } = useSavedViewsPermissions(props.queryInput);
|
|
9513
9713
|
const selectedRowRef = useScrollToRef(savedViews);
|
|
9514
|
-
const isTemporarySelected = selectedSavedView
|
|
9515
|
-
const temporaryView = savedViews
|
|
9714
|
+
const isTemporarySelected = _optionalChain([selectedSavedView, 'optionalAccess', _39 => _39.id]) === "temporary";
|
|
9715
|
+
const temporaryView = _optionalChain([savedViews, 'optionalAccess', _40 => _40.find, 'call', _41 => _41((view) => view.id === "temporary")]);
|
|
9516
9716
|
const presetViews = props.presetViews || [props.defaultView];
|
|
9517
9717
|
const isProjectLevelTool = !!queryInput.projectId;
|
|
9518
9718
|
const viewLevels = getViewLevels(isProjectLevelTool);
|
|
@@ -9533,17 +9733,17 @@ var PanelContent = (props) => {
|
|
|
9533
9733
|
}
|
|
9534
9734
|
});
|
|
9535
9735
|
};
|
|
9536
|
-
return /* @__PURE__ */
|
|
9736
|
+
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(
|
|
9537
9737
|
StyledMenuImperative,
|
|
9538
9738
|
{
|
|
9539
9739
|
role: "listbox",
|
|
9540
9740
|
onSelect: (selection) => {
|
|
9541
|
-
if (selectedSavedView
|
|
9741
|
+
if (_optionalChain([selectedSavedView, 'optionalAccess', _42 => _42.id]) !== selection.item.id) {
|
|
9542
9742
|
props.onSelect({ item: selection.item });
|
|
9543
9743
|
}
|
|
9544
9744
|
}
|
|
9545
9745
|
},
|
|
9546
|
-
/* @__PURE__ */
|
|
9746
|
+
/* @__PURE__ */ React.default.createElement(_corereact.MenuImperative.Options, null, temporaryView && /* @__PURE__ */ React.default.createElement(
|
|
9547
9747
|
Row,
|
|
9548
9748
|
{
|
|
9549
9749
|
key: temporaryView.id,
|
|
@@ -9552,7 +9752,7 @@ var PanelContent = (props) => {
|
|
|
9552
9752
|
"aria-current": isTemporarySelected ? "true" : void 0,
|
|
9553
9753
|
ref: isTemporarySelected ? selectedRowRef : null
|
|
9554
9754
|
},
|
|
9555
|
-
/* @__PURE__ */
|
|
9755
|
+
/* @__PURE__ */ React.default.createElement(
|
|
9556
9756
|
SavedViewCollectionMenuItem,
|
|
9557
9757
|
{
|
|
9558
9758
|
item: temporaryView,
|
|
@@ -9561,8 +9761,8 @@ var PanelContent = (props) => {
|
|
|
9561
9761
|
}
|
|
9562
9762
|
)
|
|
9563
9763
|
), presetViews.map((presetView) => {
|
|
9564
|
-
const isSelected = selectedSavedView
|
|
9565
|
-
return /* @__PURE__ */
|
|
9764
|
+
const isSelected = _optionalChain([selectedSavedView, 'optionalAccess', _43 => _43.id]) === presetView.id;
|
|
9765
|
+
return /* @__PURE__ */ React.default.createElement(
|
|
9566
9766
|
Row,
|
|
9567
9767
|
{
|
|
9568
9768
|
key: presetView.id,
|
|
@@ -9571,7 +9771,7 @@ var PanelContent = (props) => {
|
|
|
9571
9771
|
"aria-current": isSelected ? "true" : void 0,
|
|
9572
9772
|
ref: isSelected ? selectedRowRef : null
|
|
9573
9773
|
},
|
|
9574
|
-
/* @__PURE__ */
|
|
9774
|
+
/* @__PURE__ */ React.default.createElement(
|
|
9575
9775
|
SavedViewCollectionMenuItem,
|
|
9576
9776
|
{
|
|
9577
9777
|
item: presetView,
|
|
@@ -9585,26 +9785,26 @@ var PanelContent = (props) => {
|
|
|
9585
9785
|
const views = isExpanded && savedViews ? savedViews.filter(
|
|
9586
9786
|
(view) => view.view_level === level && view.id !== "temporary"
|
|
9587
9787
|
) : [];
|
|
9588
|
-
return /* @__PURE__ */
|
|
9788
|
+
return /* @__PURE__ */ React.default.createElement(React.default.Fragment, { key: level }, /* @__PURE__ */ React.default.createElement(
|
|
9589
9789
|
ViewLevelHeader_default,
|
|
9590
9790
|
{
|
|
9591
9791
|
group: level,
|
|
9592
9792
|
toggleGroup,
|
|
9593
9793
|
expanded: isExpanded
|
|
9594
9794
|
}
|
|
9595
|
-
), isExpanded && views.length > 0 && /* @__PURE__ */
|
|
9795
|
+
), isExpanded && views.length > 0 && /* @__PURE__ */ React.default.createElement(
|
|
9596
9796
|
StyledMenuImperative,
|
|
9597
9797
|
{
|
|
9598
9798
|
id: `saved-views-collections-${level}`,
|
|
9599
9799
|
role: "listbox",
|
|
9600
9800
|
onSelect: (selection) => {
|
|
9601
|
-
if (selectedSavedView
|
|
9801
|
+
if (_optionalChain([selectedSavedView, 'optionalAccess', _44 => _44.id]) !== selection.item.id) {
|
|
9602
9802
|
props.onSelect({ item: selection.item });
|
|
9603
9803
|
}
|
|
9604
9804
|
}
|
|
9605
9805
|
},
|
|
9606
|
-
/* @__PURE__ */
|
|
9607
|
-
const isSelected = selectedSavedView
|
|
9806
|
+
/* @__PURE__ */ React.default.createElement(_corereact.MenuImperative.Options, null, views.map((view) => {
|
|
9807
|
+
const isSelected = _optionalChain([selectedSavedView, 'optionalAccess', _45 => _45.id]) === view.id;
|
|
9608
9808
|
const canUpdate = isSelected && hasPermissionForViewLevel(
|
|
9609
9809
|
view.view_level,
|
|
9610
9810
|
permissions
|
|
@@ -9615,7 +9815,7 @@ var PanelContent = (props) => {
|
|
|
9615
9815
|
props.provider
|
|
9616
9816
|
);
|
|
9617
9817
|
const canEditOrDelete = isSelected && hasPermissionForViewLevel(view.view_level, permissions);
|
|
9618
|
-
return /* @__PURE__ */
|
|
9818
|
+
return /* @__PURE__ */ React.default.createElement(
|
|
9619
9819
|
Row,
|
|
9620
9820
|
{
|
|
9621
9821
|
key: view.id,
|
|
@@ -9624,7 +9824,7 @@ var PanelContent = (props) => {
|
|
|
9624
9824
|
"aria-current": isSelected ? "true" : void 0,
|
|
9625
9825
|
ref: isSelected ? selectedRowRef : null
|
|
9626
9826
|
},
|
|
9627
|
-
/* @__PURE__ */
|
|
9827
|
+
/* @__PURE__ */ React.default.createElement(
|
|
9628
9828
|
SavedViewCollectionMenuItem,
|
|
9629
9829
|
{
|
|
9630
9830
|
item: view,
|
|
@@ -9646,22 +9846,34 @@ var PanelContent = (props) => {
|
|
|
9646
9846
|
};
|
|
9647
9847
|
|
|
9648
9848
|
// src/components/saved-views/SavedViews.tsx
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9849
|
+
|
|
9850
|
+
|
|
9851
|
+
|
|
9852
|
+
|
|
9853
|
+
|
|
9854
|
+
|
|
9855
|
+
|
|
9856
|
+
|
|
9857
|
+
|
|
9858
|
+
|
|
9653
9859
|
|
|
9654
9860
|
// src/components/modals/DeleteConfirmationModal.tsx
|
|
9655
|
-
|
|
9656
|
-
|
|
9861
|
+
|
|
9862
|
+
|
|
9863
|
+
|
|
9864
|
+
|
|
9865
|
+
|
|
9866
|
+
|
|
9867
|
+
|
|
9868
|
+
|
|
9657
9869
|
var SavedViewsDeleteConfirmationModalShared = ({
|
|
9658
9870
|
onCancel,
|
|
9659
9871
|
onDelete,
|
|
9660
9872
|
open
|
|
9661
9873
|
}) => {
|
|
9662
|
-
const i18n = (0,
|
|
9663
|
-
return /* @__PURE__ */
|
|
9664
|
-
|
|
9874
|
+
const i18n = _corereact.useI18nContext.call(void 0, );
|
|
9875
|
+
return /* @__PURE__ */ React.default.createElement(
|
|
9876
|
+
_corereact.ConfirmModal,
|
|
9665
9877
|
{
|
|
9666
9878
|
"data-testid": "delete-confirmation-modal",
|
|
9667
9879
|
open,
|
|
@@ -9670,26 +9882,37 @@ var SavedViewsDeleteConfirmationModalShared = ({
|
|
|
9670
9882
|
onClose: onCancel,
|
|
9671
9883
|
style: { overflowWrap: "anywhere" }
|
|
9672
9884
|
},
|
|
9673
|
-
/* @__PURE__ */
|
|
9674
|
-
/* @__PURE__ */
|
|
9885
|
+
/* @__PURE__ */ React.default.createElement(_corereact.Modal.Body, null, /* @__PURE__ */ React.default.createElement(_corereact.P, null, i18n.t("savedViews.modal.delete.description"))),
|
|
9886
|
+
/* @__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"))))
|
|
9675
9887
|
);
|
|
9676
9888
|
};
|
|
9677
9889
|
|
|
9678
9890
|
// src/components/modals/form-modal/FormModal.tsx
|
|
9679
|
-
|
|
9891
|
+
|
|
9680
9892
|
|
|
9681
9893
|
// src/components/modals/form-modal/FormModalBase.tsx
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9894
|
+
|
|
9895
|
+
|
|
9896
|
+
|
|
9897
|
+
|
|
9898
|
+
|
|
9899
|
+
|
|
9900
|
+
|
|
9901
|
+
|
|
9902
|
+
|
|
9903
|
+
|
|
9904
|
+
|
|
9905
|
+
|
|
9906
|
+
|
|
9907
|
+
var _yup = require('yup'); var yup = _interopRequireWildcard(_yup); var yup2 = _interopRequireWildcard(_yup);
|
|
9685
9908
|
|
|
9686
9909
|
// src/components/modals/form-modal/FormModalBaseUtils.ts
|
|
9687
9910
|
var getViewLevelOptions = (permissions, i18n, isProjectLevelTool = true) => {
|
|
9688
9911
|
const options = ["personal"];
|
|
9689
|
-
if (isProjectLevelTool && permissions
|
|
9912
|
+
if (isProjectLevelTool && _optionalChain([permissions, 'optionalAccess', _46 => _46.can_create_project_saved_views])) {
|
|
9690
9913
|
options.push("project");
|
|
9691
9914
|
}
|
|
9692
|
-
if (permissions
|
|
9915
|
+
if (_optionalChain([permissions, 'optionalAccess', _47 => _47.can_create_company_saved_views])) options.push("company");
|
|
9693
9916
|
return options.map((option) => ({
|
|
9694
9917
|
label: i18n.t(`savedViews.modal.fields.viewLevels.${option}`),
|
|
9695
9918
|
id: option
|
|
@@ -9716,23 +9939,23 @@ function extractMessage(error, I18n) {
|
|
|
9716
9939
|
}
|
|
9717
9940
|
|
|
9718
9941
|
// src/components/modals/form-modal/NameInputField.tsx
|
|
9719
|
-
|
|
9720
|
-
|
|
9942
|
+
|
|
9943
|
+
|
|
9721
9944
|
var NAME_INPUT_ID = "saved-view-form-name-input";
|
|
9722
9945
|
var NameInputField = ({
|
|
9723
9946
|
error,
|
|
9724
9947
|
onResetMutations
|
|
9725
9948
|
}) => {
|
|
9726
|
-
const I18n = (0,
|
|
9949
|
+
const I18n = _corereact.useI18nContext.call(void 0, );
|
|
9727
9950
|
const label = I18n.t("savedViews.modal.fields.name");
|
|
9728
|
-
const { errors: formErrors, submitCount } = (0,
|
|
9729
|
-
|
|
9730
|
-
if (submitCount > 0 && formErrors
|
|
9731
|
-
document.getElementById(NAME_INPUT_ID)
|
|
9951
|
+
const { errors: formErrors, submitCount } = _corereact.useFormContext.call(void 0, );
|
|
9952
|
+
React21.useEffect(() => {
|
|
9953
|
+
if (submitCount > 0 && _optionalChain([formErrors, 'optionalAccess', _48 => _48.name])) {
|
|
9954
|
+
_optionalChain([document, 'access', _49 => _49.getElementById, 'call', _50 => _50(NAME_INPUT_ID), 'optionalAccess', _51 => _51.focus, 'call', _52 => _52()]);
|
|
9732
9955
|
}
|
|
9733
|
-
}, [formErrors
|
|
9734
|
-
return /* @__PURE__ */
|
|
9735
|
-
|
|
9956
|
+
}, [_optionalChain([formErrors, 'optionalAccess', _53 => _53.name]), submitCount]);
|
|
9957
|
+
return /* @__PURE__ */ React21.createElement(
|
|
9958
|
+
_corereact.Form.Text,
|
|
9736
9959
|
{
|
|
9737
9960
|
id: NAME_INPUT_ID,
|
|
9738
9961
|
name: "name",
|
|
@@ -9764,7 +9987,7 @@ var FormModalBase = ({
|
|
|
9764
9987
|
setOpenEditCreateModal,
|
|
9765
9988
|
onSelect
|
|
9766
9989
|
}) => {
|
|
9767
|
-
const I18n = (0,
|
|
9990
|
+
const I18n = _corereact.useI18nContext.call(void 0, );
|
|
9768
9991
|
const NAME_MAX_LENGTH = 150;
|
|
9769
9992
|
const {
|
|
9770
9993
|
mutate: createSavedView,
|
|
@@ -9823,8 +10046,8 @@ var FormModalBase = ({
|
|
|
9823
10046
|
I18n,
|
|
9824
10047
|
isProjectLevelTool
|
|
9825
10048
|
);
|
|
9826
|
-
return /* @__PURE__ */
|
|
9827
|
-
|
|
10049
|
+
return /* @__PURE__ */ React22.createElement(
|
|
10050
|
+
_corereact.Modal,
|
|
9828
10051
|
{
|
|
9829
10052
|
howToClose: ["x", "scrim"],
|
|
9830
10053
|
onClose,
|
|
@@ -9832,8 +10055,8 @@ var FormModalBase = ({
|
|
|
9832
10055
|
width: "md",
|
|
9833
10056
|
"data-testid": "create-update-modal"
|
|
9834
10057
|
},
|
|
9835
|
-
/* @__PURE__ */
|
|
9836
|
-
|
|
10058
|
+
/* @__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(
|
|
10059
|
+
_corereact.Form,
|
|
9837
10060
|
{
|
|
9838
10061
|
initialValues: {
|
|
9839
10062
|
name: initialName,
|
|
@@ -9858,26 +10081,26 @@ var FormModalBase = ({
|
|
|
9858
10081
|
onReset: onCancel,
|
|
9859
10082
|
validateOnChange: true
|
|
9860
10083
|
},
|
|
9861
|
-
/* @__PURE__ */
|
|
9862
|
-
|
|
10084
|
+
/* @__PURE__ */ React22.createElement(_corereact.Form.Form, { name: header }, /* @__PURE__ */ React22.createElement(
|
|
10085
|
+
_corereact.Modal.Body,
|
|
9863
10086
|
{
|
|
9864
|
-
style: { paddingTop: 0, paddingBottom: 0, marginTop:
|
|
10087
|
+
style: { paddingTop: 0, paddingBottom: 0, marginTop: _corereact.spacing.lg }
|
|
9865
10088
|
},
|
|
9866
|
-
errors && /* @__PURE__ */
|
|
9867
|
-
/* @__PURE__ */
|
|
10089
|
+
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, _optionalChain([errors, 'optionalAccess', _54 => _54.form]) || I18n.t(`savedViews.modal.errors.description.${mode}`)))),
|
|
10090
|
+
/* @__PURE__ */ React22.createElement(_corereact.Form.Row, null, /* @__PURE__ */ React22.createElement(
|
|
9868
10091
|
NameInputField,
|
|
9869
10092
|
{
|
|
9870
|
-
error: errors
|
|
10093
|
+
error: _optionalChain([errors, 'optionalAccess', _55 => _55.name]),
|
|
9871
10094
|
onResetMutations: resetMutations
|
|
9872
10095
|
}
|
|
9873
10096
|
)),
|
|
9874
|
-
/* @__PURE__ */
|
|
9875
|
-
|
|
10097
|
+
/* @__PURE__ */ React22.createElement(
|
|
10098
|
+
_corereact.Form.Row,
|
|
9876
10099
|
{
|
|
9877
|
-
style: { marginTop: errors
|
|
10100
|
+
style: { marginTop: _optionalChain([errors, 'optionalAccess', _56 => _56.name]) ? _corereact.spacing.xl : _corereact.spacing.none }
|
|
9878
10101
|
},
|
|
9879
|
-
/* @__PURE__ */
|
|
9880
|
-
|
|
10102
|
+
/* @__PURE__ */ React22.createElement(
|
|
10103
|
+
_corereact.Form.TextArea,
|
|
9881
10104
|
{
|
|
9882
10105
|
name: "description",
|
|
9883
10106
|
placeholder: I18n.t("savedViews.modal.fields.description"),
|
|
@@ -9887,8 +10110,8 @@ var FormModalBase = ({
|
|
|
9887
10110
|
}
|
|
9888
10111
|
)
|
|
9889
10112
|
),
|
|
9890
|
-
viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */
|
|
9891
|
-
|
|
10113
|
+
viewLevelOptions.length > 1 && mode === "create" /* CREATE */ ? /* @__PURE__ */ React22.createElement(_corereact.Form.Row, null, /* @__PURE__ */ React22.createElement(
|
|
10114
|
+
_corereact.Form.Select,
|
|
9892
10115
|
{
|
|
9893
10116
|
name: "view_level",
|
|
9894
10117
|
options: viewLevelOptions,
|
|
@@ -9897,9 +10120,9 @@ var FormModalBase = ({
|
|
|
9897
10120
|
onSearch: false,
|
|
9898
10121
|
onClear: false
|
|
9899
10122
|
}
|
|
9900
|
-
)) : /* @__PURE__ */
|
|
9901
|
-
), /* @__PURE__ */
|
|
9902
|
-
|
|
10123
|
+
)) : /* @__PURE__ */ React22.createElement(React22.Fragment, null)
|
|
10124
|
+
), /* @__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(
|
|
10125
|
+
_corereact.Button,
|
|
9903
10126
|
{
|
|
9904
10127
|
"data-testid": "create-update-modal-button",
|
|
9905
10128
|
type: "submit",
|
|
@@ -9914,7 +10137,7 @@ var FormModalBase = ({
|
|
|
9914
10137
|
};
|
|
9915
10138
|
|
|
9916
10139
|
// src/components/modals/form-modal/FormModal.tsx
|
|
9917
|
-
|
|
10140
|
+
|
|
9918
10141
|
var FormModal = ({
|
|
9919
10142
|
open,
|
|
9920
10143
|
mode,
|
|
@@ -9927,16 +10150,16 @@ var FormModal = ({
|
|
|
9927
10150
|
onSelect,
|
|
9928
10151
|
defaultView
|
|
9929
10152
|
}) => {
|
|
9930
|
-
const i18n = (0,
|
|
9931
|
-
return /* @__PURE__ */
|
|
10153
|
+
const i18n = _corereact.useI18nContext.call(void 0, );
|
|
10154
|
+
return /* @__PURE__ */ React.default.createElement(
|
|
9932
10155
|
FormModalBase,
|
|
9933
10156
|
{
|
|
9934
10157
|
open,
|
|
9935
10158
|
mode,
|
|
9936
10159
|
onCancel,
|
|
9937
10160
|
header: mode === "update" ? i18n.t("savedViews.modal.edit.title") : i18n.t("savedViews.modal.create.title"),
|
|
9938
|
-
initialName: mode === "update" ? selectedSavedView
|
|
9939
|
-
initialDesc: mode === "update" ? selectedSavedView
|
|
10161
|
+
initialName: mode === "update" ? _optionalChain([selectedSavedView, 'optionalAccess', _57 => _57.name]) || "" : "",
|
|
10162
|
+
initialDesc: mode === "update" ? _optionalChain([selectedSavedView, 'optionalAccess', _58 => _58.description]) || "" : "",
|
|
9940
10163
|
queryInput,
|
|
9941
10164
|
tableConfig,
|
|
9942
10165
|
tableName,
|
|
@@ -9949,9 +10172,21 @@ var FormModal = ({
|
|
|
9949
10172
|
};
|
|
9950
10173
|
|
|
9951
10174
|
// src/components/modals/form-modal/SharedViewFormModal.tsx
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
10175
|
+
|
|
10176
|
+
|
|
10177
|
+
|
|
10178
|
+
|
|
10179
|
+
|
|
10180
|
+
|
|
10181
|
+
|
|
10182
|
+
|
|
10183
|
+
|
|
10184
|
+
|
|
10185
|
+
|
|
10186
|
+
|
|
10187
|
+
|
|
10188
|
+
|
|
10189
|
+
|
|
9955
10190
|
var SharedViewFormModal = ({
|
|
9956
10191
|
open,
|
|
9957
10192
|
fetchedView,
|
|
@@ -9962,7 +10197,7 @@ var SharedViewFormModal = ({
|
|
|
9962
10197
|
isCreating,
|
|
9963
10198
|
resetCreateError
|
|
9964
10199
|
}) => {
|
|
9965
|
-
const I18n = (0,
|
|
10200
|
+
const I18n = _corereact.useI18nContext.call(void 0, );
|
|
9966
10201
|
const NAME_MAX_LENGTH = 150;
|
|
9967
10202
|
const errors = extractMessage(createError, I18n);
|
|
9968
10203
|
const handleNameChange = () => {
|
|
@@ -9973,8 +10208,8 @@ var SharedViewFormModal = ({
|
|
|
9973
10208
|
const handleOnSubmit = (data) => {
|
|
9974
10209
|
onCreateView(data.name, data.description);
|
|
9975
10210
|
};
|
|
9976
|
-
return /* @__PURE__ */
|
|
9977
|
-
|
|
10211
|
+
return /* @__PURE__ */ React24.createElement(
|
|
10212
|
+
_corereact.Modal,
|
|
9978
10213
|
{
|
|
9979
10214
|
"data-testid": "shared-view-form-modal",
|
|
9980
10215
|
open,
|
|
@@ -9982,40 +10217,40 @@ var SharedViewFormModal = ({
|
|
|
9982
10217
|
onClose,
|
|
9983
10218
|
style: { width: "540px" }
|
|
9984
10219
|
},
|
|
9985
|
-
/* @__PURE__ */
|
|
9986
|
-
|
|
10220
|
+
/* @__PURE__ */ React24.createElement(
|
|
10221
|
+
_corereact.Modal.Header,
|
|
9987
10222
|
{
|
|
9988
10223
|
onClose,
|
|
9989
10224
|
style: {
|
|
9990
|
-
paddingTop:
|
|
9991
|
-
paddingBottom:
|
|
9992
|
-
paddingLeft:
|
|
9993
|
-
paddingRight:
|
|
10225
|
+
paddingTop: _corereact.spacing.lg,
|
|
10226
|
+
paddingBottom: _corereact.spacing.xs,
|
|
10227
|
+
paddingLeft: _corereact.spacing.xl,
|
|
10228
|
+
paddingRight: _corereact.spacing.xl
|
|
9994
10229
|
}
|
|
9995
10230
|
},
|
|
9996
|
-
/* @__PURE__ */
|
|
10231
|
+
/* @__PURE__ */ React24.createElement(_corereact.Modal.Heading, null, I18n.t("savedViews.modal.create.title"))
|
|
9997
10232
|
),
|
|
9998
|
-
/* @__PURE__ */
|
|
9999
|
-
|
|
10233
|
+
/* @__PURE__ */ React24.createElement(
|
|
10234
|
+
_corereact.P,
|
|
10000
10235
|
{
|
|
10001
10236
|
style: {
|
|
10002
|
-
paddingLeft:
|
|
10003
|
-
paddingRight:
|
|
10004
|
-
paddingBottom:
|
|
10005
|
-
paddingTop:
|
|
10237
|
+
paddingLeft: _corereact.spacing.xl,
|
|
10238
|
+
paddingRight: _corereact.spacing.xl,
|
|
10239
|
+
paddingBottom: _corereact.spacing.lg,
|
|
10240
|
+
paddingTop: _corereact.spacing.none,
|
|
10006
10241
|
margin: 0,
|
|
10007
|
-
color:
|
|
10242
|
+
color: _corereact.colors.gray45,
|
|
10008
10243
|
whiteSpace: "pre-line"
|
|
10009
10244
|
}
|
|
10010
10245
|
},
|
|
10011
10246
|
I18n.t("savedViews.modal.copyConfirmation.description")
|
|
10012
10247
|
),
|
|
10013
|
-
/* @__PURE__ */
|
|
10014
|
-
|
|
10248
|
+
/* @__PURE__ */ React24.createElement(
|
|
10249
|
+
_corereact.Form,
|
|
10015
10250
|
{
|
|
10016
10251
|
initialValues: {
|
|
10017
10252
|
name: fetchedView.name,
|
|
10018
|
-
description: fetchedView.description
|
|
10253
|
+
description: _nullishCoalesce(fetchedView.description, () => ( ""))
|
|
10019
10254
|
},
|
|
10020
10255
|
view: "create",
|
|
10021
10256
|
validationSchema: yup2.object().shape({
|
|
@@ -10029,32 +10264,32 @@ var SharedViewFormModal = ({
|
|
|
10029
10264
|
onSubmit: handleOnSubmit,
|
|
10030
10265
|
validateOnChange: true
|
|
10031
10266
|
},
|
|
10032
|
-
/* @__PURE__ */
|
|
10033
|
-
|
|
10267
|
+
/* @__PURE__ */ React24.createElement(_corereact.Form.Form, { name: "share-view-form" }, /* @__PURE__ */ React24.createElement(
|
|
10268
|
+
_corereact.Modal.Body,
|
|
10034
10269
|
{
|
|
10035
10270
|
style: {
|
|
10036
|
-
paddingTop:
|
|
10271
|
+
paddingTop: _corereact.spacing.lg,
|
|
10037
10272
|
paddingBottom: 0,
|
|
10038
|
-
borderTop: `1px solid ${
|
|
10273
|
+
borderTop: `1px solid ${_corereact.colors.gray85}`
|
|
10039
10274
|
}
|
|
10040
10275
|
},
|
|
10041
|
-
errors && /* @__PURE__ */
|
|
10276
|
+
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", {
|
|
10042
10277
|
mode: "create"
|
|
10043
|
-
})), /* @__PURE__ */
|
|
10044
|
-
/* @__PURE__ */
|
|
10278
|
+
})), /* @__PURE__ */ React24.createElement(_corereact.Banner.Body, null, _optionalChain([errors, 'optionalAccess', _59 => _59.form]) || I18n.t("savedViews.modal.errors.description.create")))),
|
|
10279
|
+
/* @__PURE__ */ React24.createElement(_corereact.Form.Row, null, /* @__PURE__ */ React24.createElement(
|
|
10045
10280
|
NameInputField,
|
|
10046
10281
|
{
|
|
10047
|
-
error: errors
|
|
10282
|
+
error: _optionalChain([errors, 'optionalAccess', _60 => _60.name]),
|
|
10048
10283
|
onResetMutations: handleNameChange
|
|
10049
10284
|
}
|
|
10050
10285
|
)),
|
|
10051
|
-
/* @__PURE__ */
|
|
10052
|
-
|
|
10286
|
+
/* @__PURE__ */ React24.createElement(
|
|
10287
|
+
_corereact.Form.Row,
|
|
10053
10288
|
{
|
|
10054
|
-
style: { marginTop: errors
|
|
10289
|
+
style: { marginTop: _optionalChain([errors, 'optionalAccess', _61 => _61.name]) ? _corereact.spacing.xl : _corereact.spacing.none }
|
|
10055
10290
|
},
|
|
10056
|
-
/* @__PURE__ */
|
|
10057
|
-
|
|
10291
|
+
/* @__PURE__ */ React24.createElement(
|
|
10292
|
+
_corereact.Form.TextArea,
|
|
10058
10293
|
{
|
|
10059
10294
|
name: "description",
|
|
10060
10295
|
placeholder: I18n.t("savedViews.modal.fields.description"),
|
|
@@ -10064,8 +10299,8 @@ var SharedViewFormModal = ({
|
|
|
10064
10299
|
}
|
|
10065
10300
|
)
|
|
10066
10301
|
)
|
|
10067
|
-
), /* @__PURE__ */
|
|
10068
|
-
|
|
10302
|
+
), /* @__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(
|
|
10303
|
+
_corereact.Button,
|
|
10069
10304
|
{
|
|
10070
10305
|
variant: "secondary",
|
|
10071
10306
|
onClick: onCreateTemporaryView,
|
|
@@ -10073,8 +10308,8 @@ var SharedViewFormModal = ({
|
|
|
10073
10308
|
disabled: isCreating
|
|
10074
10309
|
},
|
|
10075
10310
|
I18n.t("savedViews.actions.viewTemporarily")
|
|
10076
|
-
), /* @__PURE__ */
|
|
10077
|
-
|
|
10311
|
+
), /* @__PURE__ */ React24.createElement(
|
|
10312
|
+
_corereact.Button,
|
|
10078
10313
|
{
|
|
10079
10314
|
type: "submit",
|
|
10080
10315
|
variant: "primary",
|
|
@@ -10089,9 +10324,8 @@ var SharedViewFormModal = ({
|
|
|
10089
10324
|
};
|
|
10090
10325
|
|
|
10091
10326
|
// src/utils/hooks/useViewSelection.ts
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
var import_core_react14 = require("@procore/core-react");
|
|
10327
|
+
|
|
10328
|
+
|
|
10095
10329
|
|
|
10096
10330
|
// src/utils/viewStorage.ts
|
|
10097
10331
|
var ViewStorage = {
|
|
@@ -10106,7 +10340,7 @@ var ViewStorage = {
|
|
|
10106
10340
|
if (!parsed) return defaultView;
|
|
10107
10341
|
const isTableConfigOnly = !parsed.id && !parsed.share_token;
|
|
10108
10342
|
return isTableConfigOnly ? { ...defaultView, table_config: parsed } : parsed;
|
|
10109
|
-
} catch {
|
|
10343
|
+
} catch (e7) {
|
|
10110
10344
|
return defaultView;
|
|
10111
10345
|
}
|
|
10112
10346
|
},
|
|
@@ -10116,13 +10350,13 @@ var ViewStorage = {
|
|
|
10116
10350
|
};
|
|
10117
10351
|
|
|
10118
10352
|
// src/utils/hooks/useLatest.ts
|
|
10119
|
-
|
|
10353
|
+
|
|
10120
10354
|
var useLatest = (callback) => {
|
|
10121
|
-
const ref = (0,
|
|
10122
|
-
(0,
|
|
10355
|
+
const ref = _react.useRef.call(void 0, callback);
|
|
10356
|
+
_react.useLayoutEffect.call(void 0, () => {
|
|
10123
10357
|
ref.current = callback;
|
|
10124
10358
|
});
|
|
10125
|
-
return (0,
|
|
10359
|
+
return _react.useCallback.call(void 0, (...args) => ref.current(...args), []);
|
|
10126
10360
|
};
|
|
10127
10361
|
|
|
10128
10362
|
// src/utils/hooks/useViewSelection.ts
|
|
@@ -10135,72 +10369,51 @@ var areRowGroupStatesEqual = (a2, b2) => {
|
|
|
10135
10369
|
if (a2.length !== b2.length) return false;
|
|
10136
10370
|
return a2.every((val, idx) => val === b2[idx]);
|
|
10137
10371
|
};
|
|
10138
|
-
var
|
|
10139
|
-
|
|
10140
|
-
if (view.id === "
|
|
10141
|
-
|
|
10142
|
-
} else if (view.id === "temporary") {
|
|
10143
|
-
updatedParams.set("saved-view", "temporary");
|
|
10144
|
-
} else {
|
|
10145
|
-
updatedParams.set("saved-view", view.share_token);
|
|
10146
|
-
}
|
|
10147
|
-
return updatedParams;
|
|
10372
|
+
var getViewTokenForView = (view) => {
|
|
10373
|
+
if (view.id === "default") return "default";
|
|
10374
|
+
if (view.id === "temporary") return "temporary";
|
|
10375
|
+
return view.share_token;
|
|
10148
10376
|
};
|
|
10149
10377
|
var checkIsViewSelected = (selectedView, viewId) => {
|
|
10150
|
-
return selectedView
|
|
10378
|
+
return _optionalChain([selectedView, 'optionalAccess', _62 => _62.share_token]) === viewId || _optionalChain([selectedView, 'optionalAccess', _63 => _63.id]) === viewId;
|
|
10151
10379
|
};
|
|
10152
10380
|
var findViewByToken = (views, token2) => {
|
|
10153
10381
|
return views.find((view) => view.share_token === token2);
|
|
10154
10382
|
};
|
|
10155
|
-
var setViewInUrl = (view, setSearchParams) => {
|
|
10156
|
-
setSearchParams(
|
|
10157
|
-
(currentParams) => getUpdatedSearchParams(currentParams, view),
|
|
10158
|
-
{ replace: true }
|
|
10159
|
-
);
|
|
10160
|
-
};
|
|
10161
|
-
var restoreUrlParameter = (currentParam, previousParam, setSearchParams) => {
|
|
10162
|
-
if (previousParam && !currentParam) {
|
|
10163
|
-
setSearchParams(
|
|
10164
|
-
(currentParams) => {
|
|
10165
|
-
const updatedParams = new URLSearchParams(currentParams);
|
|
10166
|
-
updatedParams.set("saved-view", previousParam);
|
|
10167
|
-
return updatedParams;
|
|
10168
|
-
},
|
|
10169
|
-
{ replace: true }
|
|
10170
|
-
);
|
|
10171
|
-
}
|
|
10172
|
-
};
|
|
10173
10383
|
var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, tableConfig) => {
|
|
10174
|
-
const I18n = (0,
|
|
10175
|
-
const
|
|
10384
|
+
const I18n = _corereact.useI18nContext.call(void 0, );
|
|
10385
|
+
const transport = useSavedViewsTransport();
|
|
10386
|
+
const urlAdapter = transport.useUrlAdapter();
|
|
10387
|
+
const projectIdSegment = _nullishCoalesce(config.projectId, () => ( "company"));
|
|
10176
10388
|
const storageKey = `savedView_${config.domain}_${config.tableName}_${config.companyId}_${projectIdSegment}_${config.userId}`;
|
|
10177
10389
|
const temporaryStorageKey = `${storageKey}-temporary`;
|
|
10178
|
-
const
|
|
10179
|
-
const
|
|
10180
|
-
const [selectedSavedView, setSelectedSavedView] = (0,
|
|
10390
|
+
const previousSavedViewParamRef = _react.useRef.call(void 0, null);
|
|
10391
|
+
const intendedTokenRef = _react.useRef.call(void 0, null);
|
|
10392
|
+
const [selectedSavedView, setSelectedSavedView] = _react.useState.call(void 0, () => {
|
|
10181
10393
|
const stored = ViewStorage.load(storageKey, config.defaultView);
|
|
10182
|
-
return stored
|
|
10394
|
+
return _nullishCoalesce(stored, () => ( config.defaultView));
|
|
10183
10395
|
});
|
|
10184
|
-
const [temporaryView, setTemporaryView] = (0,
|
|
10396
|
+
const [temporaryView, setTemporaryView] = _react.useState.call(void 0, () => {
|
|
10185
10397
|
const loaded = ViewStorage.load(temporaryStorageKey, config.defaultView);
|
|
10186
10398
|
return loaded && (loaded.id === "temporary" || loaded.view_level === "temporary") ? loaded : null;
|
|
10187
10399
|
});
|
|
10188
|
-
const persistViewToStorageAndUrl = (0,
|
|
10400
|
+
const persistViewToStorageAndUrl = _react.useCallback.call(void 0,
|
|
10189
10401
|
(view) => {
|
|
10190
10402
|
ViewStorage.save(storageKey, view);
|
|
10191
|
-
|
|
10403
|
+
intendedTokenRef.current = getViewTokenForView(view);
|
|
10404
|
+
urlAdapter.setViewToken(getViewTokenForView(view));
|
|
10192
10405
|
},
|
|
10193
|
-
[storageKey,
|
|
10406
|
+
[storageKey, urlAdapter]
|
|
10194
10407
|
);
|
|
10195
|
-
const baseViews = (0,
|
|
10196
|
-
() => [...savedViews
|
|
10408
|
+
const baseViews = _react.useMemo.call(void 0,
|
|
10409
|
+
() => [..._nullishCoalesce(savedViews, () => ( [])), ..._nullishCoalesce(presetViews, () => ( []))],
|
|
10197
10410
|
[savedViews, presetViews]
|
|
10198
10411
|
);
|
|
10199
|
-
const allViews = (0,
|
|
10412
|
+
const allViews = _react.useMemo.call(void 0,
|
|
10200
10413
|
() => temporaryView ? [...baseViews, temporaryView] : baseViews,
|
|
10201
10414
|
[baseViews, temporaryView]
|
|
10202
10415
|
);
|
|
10203
|
-
const selectView = (0,
|
|
10416
|
+
const selectView = _react.useCallback.call(void 0,
|
|
10204
10417
|
(view) => {
|
|
10205
10418
|
const viewToSelect = config.onSelect({ item: view });
|
|
10206
10419
|
setSelectedSavedView(viewToSelect);
|
|
@@ -10209,7 +10422,7 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10209
10422
|
},
|
|
10210
10423
|
[config, persistViewToStorageAndUrl]
|
|
10211
10424
|
);
|
|
10212
|
-
const createTemporaryView = (0,
|
|
10425
|
+
const createTemporaryView = _react.useCallback.call(void 0,
|
|
10213
10426
|
(fetchedView) => {
|
|
10214
10427
|
const tempView = {
|
|
10215
10428
|
...fetchedView,
|
|
@@ -10224,12 +10437,12 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10224
10437
|
},
|
|
10225
10438
|
[temporaryStorageKey, selectView]
|
|
10226
10439
|
);
|
|
10227
|
-
const clearTemporaryView = (0,
|
|
10440
|
+
const clearTemporaryView = _react.useCallback.call(void 0, () => {
|
|
10228
10441
|
ViewStorage.remove(temporaryStorageKey);
|
|
10229
10442
|
setTemporaryView(null);
|
|
10230
10443
|
selectView(config.defaultView);
|
|
10231
10444
|
}, [temporaryStorageKey, config.defaultView, selectView]);
|
|
10232
|
-
const isViewAlreadySelected = (0,
|
|
10445
|
+
const isViewAlreadySelected = _react.useCallback.call(void 0,
|
|
10233
10446
|
(viewId) => checkIsViewSelected(selectedSavedView, viewId),
|
|
10234
10447
|
[selectedSavedView]
|
|
10235
10448
|
);
|
|
@@ -10244,29 +10457,35 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10244
10457
|
openSharedViewModal(viewId);
|
|
10245
10458
|
}
|
|
10246
10459
|
});
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
if (
|
|
10255
|
-
|
|
10460
|
+
const savedViewIdFromUrl = urlAdapter.getViewToken();
|
|
10461
|
+
_react.useEffect.call(void 0, () => {
|
|
10462
|
+
const intendedToken = intendedTokenRef.current;
|
|
10463
|
+
if (intendedToken !== null && savedViewIdFromUrl !== intendedToken) {
|
|
10464
|
+
urlAdapter.setViewToken(intendedToken);
|
|
10465
|
+
return;
|
|
10466
|
+
}
|
|
10467
|
+
if (intendedToken !== null && savedViewIdFromUrl === intendedToken) {
|
|
10468
|
+
intendedTokenRef.current = null;
|
|
10469
|
+
}
|
|
10470
|
+
if (previousSavedViewParamRef.current && !savedViewIdFromUrl) {
|
|
10471
|
+
urlAdapter.setViewToken(previousSavedViewParamRef.current);
|
|
10256
10472
|
}
|
|
10257
|
-
if (
|
|
10258
|
-
|
|
10473
|
+
if (savedViewIdFromUrl) {
|
|
10474
|
+
previousSavedViewParamRef.current = savedViewIdFromUrl;
|
|
10259
10475
|
}
|
|
10260
|
-
|
|
10261
|
-
|
|
10476
|
+
if (savedViewIdFromUrl && savedViews) {
|
|
10477
|
+
handleSavedViewFromUrl(savedViewIdFromUrl);
|
|
10478
|
+
}
|
|
10479
|
+
}, [savedViewIdFromUrl, handleSavedViewFromUrl, allViews.length, urlAdapter]);
|
|
10480
|
+
const previousRowGroupStateRef = _react.useRef.call(void 0,
|
|
10262
10481
|
isSmartGridConfig(tableConfig) ? tableConfig.rowGroupState : void 0
|
|
10263
10482
|
);
|
|
10264
|
-
const selectedViewRef = (0,
|
|
10483
|
+
const selectedViewRef = _react.useRef.call(void 0, selectedSavedView);
|
|
10265
10484
|
selectedViewRef.current = selectedSavedView;
|
|
10266
|
-
const defaultViewRef = (0,
|
|
10485
|
+
const defaultViewRef = _react.useRef.call(void 0, config.defaultView);
|
|
10267
10486
|
defaultViewRef.current = config.defaultView;
|
|
10268
|
-
(0,
|
|
10269
|
-
if (!isSmartGridConfig(tableConfig) || !presetViews
|
|
10487
|
+
_react.useEffect.call(void 0, () => {
|
|
10488
|
+
if (!isSmartGridConfig(tableConfig) || !_optionalChain([presetViews, 'optionalAccess', _64 => _64.length])) return;
|
|
10270
10489
|
const currentView = selectedViewRef.current;
|
|
10271
10490
|
const isPresetSelected = !currentView || currentView.view_level === "default";
|
|
10272
10491
|
if (!isPresetSelected) return;
|
|
@@ -10282,14 +10501,14 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10282
10501
|
const matchingPreset = presetViews.find((preset) => {
|
|
10283
10502
|
const presetConfig = isSmartGridConfig(preset.table_config) ? preset.table_config : void 0;
|
|
10284
10503
|
return areRowGroupStatesEqual(
|
|
10285
|
-
presetConfig
|
|
10504
|
+
_optionalChain([presetConfig, 'optionalAccess', _65 => _65.rowGroupState]),
|
|
10286
10505
|
currentRowGroupState
|
|
10287
10506
|
);
|
|
10288
10507
|
});
|
|
10289
|
-
if (matchingPreset && matchingPreset.id !== selectedViewRef.current
|
|
10508
|
+
if (matchingPreset && matchingPreset.id !== _optionalChain([selectedViewRef, 'access', _66 => _66.current, 'optionalAccess', _67 => _67.id])) {
|
|
10290
10509
|
setSelectedSavedView(matchingPreset);
|
|
10291
10510
|
persistViewToStorageAndUrl(matchingPreset);
|
|
10292
|
-
} else if (!matchingPreset && currentView
|
|
10511
|
+
} else if (!matchingPreset && _optionalChain([currentView, 'optionalAccess', _68 => _68.id]) !== defaultViewRef.current.id) {
|
|
10293
10512
|
setSelectedSavedView(defaultViewRef.current);
|
|
10294
10513
|
persistViewToStorageAndUrl(defaultViewRef.current);
|
|
10295
10514
|
}
|
|
@@ -10305,13 +10524,13 @@ var useViewSelection = (config, savedViews, presetViews, openSharedViewModal, ta
|
|
|
10305
10524
|
};
|
|
10306
10525
|
|
|
10307
10526
|
// src/components/saved-views/FocusScopeToggle.tsx
|
|
10308
|
-
var
|
|
10309
|
-
|
|
10527
|
+
var _focus = require('@react-aria/focus');
|
|
10528
|
+
|
|
10310
10529
|
var useFocusScopeToggle = (isOpen) => {
|
|
10311
|
-
const focusManager = (0,
|
|
10312
|
-
const triggerRef = (0,
|
|
10313
|
-
const firstFocusedElementRef = (0,
|
|
10314
|
-
(0,
|
|
10530
|
+
const focusManager = _focus.useFocusManager.call(void 0, );
|
|
10531
|
+
const triggerRef = _react.useRef.call(void 0, null);
|
|
10532
|
+
const firstFocusedElementRef = _react.useRef.call(void 0, null);
|
|
10533
|
+
_react.useEffect.call(void 0, () => {
|
|
10315
10534
|
const handleKeyDown = (event) => {
|
|
10316
10535
|
if (!event.shiftKey || event.key !== "Tab") {
|
|
10317
10536
|
return;
|
|
@@ -10320,28 +10539,28 @@ var useFocusScopeToggle = (isOpen) => {
|
|
|
10320
10539
|
return;
|
|
10321
10540
|
}
|
|
10322
10541
|
event.preventDefault();
|
|
10323
|
-
triggerRef.current
|
|
10542
|
+
_optionalChain([triggerRef, 'access', _69 => _69.current, 'optionalAccess', _70 => _70.focus, 'call', _71 => _71()]);
|
|
10324
10543
|
};
|
|
10325
10544
|
if (isOpen) {
|
|
10326
10545
|
triggerRef.current = document.activeElement;
|
|
10327
|
-
focusManager
|
|
10546
|
+
_optionalChain([focusManager, 'optionalAccess', _72 => _72.focusFirst, 'call', _73 => _73({ tabbable: true })]);
|
|
10328
10547
|
firstFocusedElementRef.current = document.activeElement;
|
|
10329
|
-
firstFocusedElementRef.current
|
|
10548
|
+
_optionalChain([firstFocusedElementRef, 'access', _74 => _74.current, 'optionalAccess', _75 => _75.addEventListener, 'call', _76 => _76(
|
|
10330
10549
|
"keydown",
|
|
10331
10550
|
handleKeyDown
|
|
10332
|
-
);
|
|
10551
|
+
)]);
|
|
10333
10552
|
} else {
|
|
10334
10553
|
firstFocusedElementRef.current = null;
|
|
10335
10554
|
const activeElement = document.activeElement;
|
|
10336
10555
|
if (!activeElement || activeElement === document.body) {
|
|
10337
|
-
triggerRef.current
|
|
10556
|
+
_optionalChain([triggerRef, 'access', _77 => _77.current, 'optionalAccess', _78 => _78.focus, 'call', _79 => _79()]);
|
|
10338
10557
|
}
|
|
10339
10558
|
}
|
|
10340
10559
|
return () => {
|
|
10341
|
-
firstFocusedElementRef.current
|
|
10560
|
+
_optionalChain([firstFocusedElementRef, 'access', _80 => _80.current, 'optionalAccess', _81 => _81.removeEventListener, 'call', _82 => _82(
|
|
10342
10561
|
"keydown",
|
|
10343
10562
|
handleKeyDown
|
|
10344
|
-
);
|
|
10563
|
+
)]);
|
|
10345
10564
|
};
|
|
10346
10565
|
}, [isOpen, focusManager]);
|
|
10347
10566
|
};
|
|
@@ -10351,11 +10570,27 @@ var FocusScopeToggle = ({ isOpen }) => {
|
|
|
10351
10570
|
};
|
|
10352
10571
|
|
|
10353
10572
|
// src/components/saved-views/SavedViews.tsx
|
|
10354
|
-
|
|
10573
|
+
|
|
10574
|
+
|
|
10575
|
+
// src/transport/default-lazy.ts
|
|
10576
|
+
var cached;
|
|
10577
|
+
var inFlight;
|
|
10578
|
+
var getCachedDefaultTransport = () => cached;
|
|
10579
|
+
var loadDefaultTransport = () => {
|
|
10580
|
+
if (cached) return Promise.resolve(cached);
|
|
10581
|
+
if (inFlight) return inFlight;
|
|
10582
|
+
inFlight = Promise.resolve().then(() => _interopRequireWildcard(require("./transport/default.js"))).then((mod) => {
|
|
10583
|
+
cached = mod.defaultTransport;
|
|
10584
|
+
inFlight = void 0;
|
|
10585
|
+
return mod.defaultTransport;
|
|
10586
|
+
});
|
|
10587
|
+
return inFlight;
|
|
10588
|
+
};
|
|
10589
|
+
|
|
10590
|
+
// src/components/saved-views/SavedViews.tsx
|
|
10355
10591
|
var StyledPanel = pt.div`
|
|
10356
10592
|
border: ${({ provider }) => provider === "data-table" ? "1px solid #d6dadc" : "none"};
|
|
10357
10593
|
`;
|
|
10358
|
-
var queryClient = new import_react_query3.QueryClient();
|
|
10359
10594
|
var SavedViewsContent = (props) => {
|
|
10360
10595
|
const { projectId, companyId } = props;
|
|
10361
10596
|
const queryInput = {
|
|
@@ -10366,15 +10601,15 @@ var SavedViewsContent = (props) => {
|
|
|
10366
10601
|
};
|
|
10367
10602
|
const { data: savedViews } = useSavedViewsQuery(queryInput);
|
|
10368
10603
|
const { mutate: deleteSavedView } = useDeleteSavedView(queryInput);
|
|
10369
|
-
const { showToast } = (0,
|
|
10370
|
-
const i18n = (0,
|
|
10371
|
-
const [activeModal, setActiveModal] = (0,
|
|
10372
|
-
const [modalData, setModalData] = (0,
|
|
10604
|
+
const { showToast } = _toastalert.useToastAlertContext.call(void 0, );
|
|
10605
|
+
const i18n = _corereact.useI18nContext.call(void 0, );
|
|
10606
|
+
const [activeModal, setActiveModal] = _react.useState.call(void 0, null);
|
|
10607
|
+
const [modalData, setModalData] = _react.useState.call(void 0, null);
|
|
10373
10608
|
const openModal = (type, data) => {
|
|
10374
10609
|
setActiveModal(type);
|
|
10375
|
-
setModalData(data
|
|
10610
|
+
setModalData(_nullishCoalesce(data, () => ( null)));
|
|
10376
10611
|
};
|
|
10377
|
-
const closeModal = (0,
|
|
10612
|
+
const closeModal = _react.useCallback.call(void 0, () => {
|
|
10378
10613
|
setActiveModal(null);
|
|
10379
10614
|
setModalData(null);
|
|
10380
10615
|
}, []);
|
|
@@ -10404,9 +10639,9 @@ var SavedViewsContent = (props) => {
|
|
|
10404
10639
|
props.tableConfig
|
|
10405
10640
|
);
|
|
10406
10641
|
const { data: fetchedView, isError: fetchError } = useFetchSavedViewById(
|
|
10407
|
-
modalData
|
|
10642
|
+
_nullishCoalesce(_optionalChain([modalData, 'optionalAccess', _83 => _83.viewId]), () => ( null)),
|
|
10408
10643
|
queryInput,
|
|
10409
|
-
Boolean(modalData
|
|
10644
|
+
Boolean(_optionalChain([modalData, 'optionalAccess', _84 => _84.viewId]))
|
|
10410
10645
|
);
|
|
10411
10646
|
const {
|
|
10412
10647
|
mutate: createSavedView,
|
|
@@ -10414,13 +10649,17 @@ var SavedViewsContent = (props) => {
|
|
|
10414
10649
|
error: createError,
|
|
10415
10650
|
reset: resetCreateError
|
|
10416
10651
|
} = useCreateSavedView(queryInput);
|
|
10417
|
-
(0,
|
|
10652
|
+
_react.useEffect.call(void 0, () => {
|
|
10418
10653
|
if (fetchError) {
|
|
10419
10654
|
showToast.error(i18n.t("savedViews.errors.notFound"));
|
|
10420
|
-
selectView(selectedView
|
|
10655
|
+
selectView(_nullishCoalesce(selectedView, () => ( props.defaultView)));
|
|
10421
10656
|
closeModal();
|
|
10422
10657
|
}
|
|
10423
10658
|
}, [fetchError, selectedView, props.defaultView, selectView, closeModal]);
|
|
10659
|
+
const setSelectedViewInContext = _optionalChain([useSavedViewsSelection, 'call', _85 => _85(), 'optionalAccess', _86 => _86.setSelectedView]);
|
|
10660
|
+
_react.useEffect.call(void 0, () => {
|
|
10661
|
+
_optionalChain([setSelectedViewInContext, 'optionalCall', _87 => _87(_nullishCoalesce(selectedView, () => ( null)))]);
|
|
10662
|
+
}, [selectedView, setSelectedViewInContext]);
|
|
10424
10663
|
const viewSharedViewTemporarily = () => {
|
|
10425
10664
|
if (fetchedView) {
|
|
10426
10665
|
createTemporaryView(fetchedView);
|
|
@@ -10448,7 +10687,7 @@ var SavedViewsContent = (props) => {
|
|
|
10448
10687
|
}
|
|
10449
10688
|
};
|
|
10450
10689
|
const selectCurrentViewAndCloseModal = () => {
|
|
10451
|
-
selectView(selectedView
|
|
10690
|
+
selectView(_nullishCoalesce(selectedView, () => ( props.defaultView)));
|
|
10452
10691
|
closeModal();
|
|
10453
10692
|
};
|
|
10454
10693
|
const deleteSelectedView = () => {
|
|
@@ -10462,19 +10701,19 @@ var SavedViewsContent = (props) => {
|
|
|
10462
10701
|
deleteSelectedView();
|
|
10463
10702
|
closeModal();
|
|
10464
10703
|
};
|
|
10465
|
-
return /* @__PURE__ */
|
|
10704
|
+
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(
|
|
10466
10705
|
ExpandedPanel,
|
|
10467
10706
|
{
|
|
10468
10707
|
"data-testid": "saved-view-expanded-panel",
|
|
10469
10708
|
provider: props.provider
|
|
10470
10709
|
},
|
|
10471
|
-
/* @__PURE__ */
|
|
10472
|
-
|
|
10710
|
+
/* @__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(
|
|
10711
|
+
_corereact.Tooltip,
|
|
10473
10712
|
{
|
|
10474
10713
|
showDelay: 200,
|
|
10475
|
-
overlay: /* @__PURE__ */
|
|
10714
|
+
overlay: /* @__PURE__ */ React.default.createElement(_corereact.Tooltip.Content, null, i18n.t("savedViews.tooltip"))
|
|
10476
10715
|
},
|
|
10477
|
-
/* @__PURE__ */
|
|
10716
|
+
/* @__PURE__ */ React.default.createElement(
|
|
10478
10717
|
Help_default,
|
|
10479
10718
|
{
|
|
10480
10719
|
tabIndex: 0,
|
|
@@ -10482,16 +10721,16 @@ var SavedViewsContent = (props) => {
|
|
|
10482
10721
|
"aria-label": i18n.t("savedViews.tooltip")
|
|
10483
10722
|
}
|
|
10484
10723
|
)
|
|
10485
|
-
))), /* @__PURE__ */
|
|
10486
|
-
|
|
10724
|
+
))), /* @__PURE__ */ React.default.createElement(
|
|
10725
|
+
_corereact.Tooltip,
|
|
10487
10726
|
{
|
|
10488
10727
|
overlay: i18n.t("savedViews.actions.create"),
|
|
10489
10728
|
showDelay: 1e3
|
|
10490
10729
|
},
|
|
10491
|
-
/* @__PURE__ */
|
|
10492
|
-
|
|
10730
|
+
/* @__PURE__ */ React.default.createElement(
|
|
10731
|
+
_corereact.Button,
|
|
10493
10732
|
{
|
|
10494
|
-
icon: /* @__PURE__ */
|
|
10733
|
+
icon: /* @__PURE__ */ React.default.createElement(Plus_default, null),
|
|
10495
10734
|
variant: "secondary",
|
|
10496
10735
|
"data-testid": "expanded-panel-create-button",
|
|
10497
10736
|
onClick: () => openModal("create" /* CREATE */),
|
|
@@ -10500,7 +10739,7 @@ var SavedViewsContent = (props) => {
|
|
|
10500
10739
|
i18n.t("savedViews.actions.create")
|
|
10501
10740
|
)
|
|
10502
10741
|
)),
|
|
10503
|
-
/* @__PURE__ */
|
|
10742
|
+
/* @__PURE__ */ React.default.createElement(_corereact.Panel.Body, { style: { display: "flex", flexFlow: "column" } }, /* @__PURE__ */ React.default.createElement(
|
|
10504
10743
|
PanelContent,
|
|
10505
10744
|
{
|
|
10506
10745
|
onSelect: ({ item }) => selectView(item),
|
|
@@ -10517,7 +10756,7 @@ var SavedViewsContent = (props) => {
|
|
|
10517
10756
|
onClearTemporary: clearTemporaryView
|
|
10518
10757
|
}
|
|
10519
10758
|
))
|
|
10520
|
-
), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */
|
|
10759
|
+
), (isModalOpen("create" /* CREATE */) || isModalOpen("update" /* UPDATE */)) && /* @__PURE__ */ React.default.createElement(
|
|
10521
10760
|
FormModal,
|
|
10522
10761
|
{
|
|
10523
10762
|
open: true,
|
|
@@ -10531,14 +10770,14 @@ var SavedViewsContent = (props) => {
|
|
|
10531
10770
|
setOpenEditCreateModal: closeModal,
|
|
10532
10771
|
defaultView: props.defaultView
|
|
10533
10772
|
}
|
|
10534
|
-
), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */
|
|
10773
|
+
), selectedView && isModalOpen("delete" /* DELETE */) && /* @__PURE__ */ React.default.createElement(
|
|
10535
10774
|
SavedViewsDeleteConfirmationModalShared,
|
|
10536
10775
|
{
|
|
10537
10776
|
open: true,
|
|
10538
10777
|
onDelete: confirmDeleteAndCloseModal,
|
|
10539
10778
|
onCancel: closeModal
|
|
10540
10779
|
}
|
|
10541
|
-
), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */
|
|
10780
|
+
), fetchedView && isModalOpen("sharedView" /* SHARED_VIEW */) && /* @__PURE__ */ React.default.createElement(
|
|
10542
10781
|
SharedViewFormModal,
|
|
10543
10782
|
{
|
|
10544
10783
|
open: true,
|
|
@@ -10553,14 +10792,34 @@ var SavedViewsContent = (props) => {
|
|
|
10553
10792
|
)));
|
|
10554
10793
|
};
|
|
10555
10794
|
var SavedViews = (props) => {
|
|
10556
|
-
|
|
10795
|
+
const [resolvedDefault, setResolvedDefault] = _react.useState.call(void 0, () => props.transport ? void 0 : getCachedDefaultTransport());
|
|
10796
|
+
const [transportLoadError, setTransportLoadError] = _react.useState.call(void 0, void 0);
|
|
10797
|
+
_react.useEffect.call(void 0, () => {
|
|
10798
|
+
if (props.transport || resolvedDefault) return;
|
|
10799
|
+
let cancelled = false;
|
|
10800
|
+
void loadDefaultTransport().then((transport2) => {
|
|
10801
|
+
if (!cancelled) setResolvedDefault(transport2);
|
|
10802
|
+
}).catch((err) => {
|
|
10803
|
+
if (!cancelled) setTransportLoadError(err);
|
|
10804
|
+
});
|
|
10805
|
+
return () => {
|
|
10806
|
+
cancelled = true;
|
|
10807
|
+
};
|
|
10808
|
+
}, [props.transport, resolvedDefault]);
|
|
10809
|
+
const transport = _nullishCoalesce(props.transport, () => ( resolvedDefault));
|
|
10810
|
+
if (!transport) {
|
|
10811
|
+
if (transportLoadError) throw transportLoadError;
|
|
10812
|
+
return null;
|
|
10813
|
+
}
|
|
10814
|
+
const { CacheProvider } = transport;
|
|
10815
|
+
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 })))));
|
|
10557
10816
|
};
|
|
10558
10817
|
|
|
10559
10818
|
// src/components/adapters/smart-grid/SmartGridSavedViews.tsx
|
|
10560
|
-
|
|
10819
|
+
|
|
10561
10820
|
|
|
10562
10821
|
// src/components/adapters/smart-grid/SmartGridDefaultSavedView.tsx
|
|
10563
|
-
|
|
10822
|
+
|
|
10564
10823
|
var DEFAULT_COLUMN_STATE = {
|
|
10565
10824
|
hide: false,
|
|
10566
10825
|
pinned: null,
|
|
@@ -10576,13 +10835,13 @@ var DEFAULT_COLUMN_STATE = {
|
|
|
10576
10835
|
};
|
|
10577
10836
|
var getColumnStateFromDefs = (columnDefs) => {
|
|
10578
10837
|
return columnDefs.map((colDef) => {
|
|
10579
|
-
const field = colDef.field
|
|
10838
|
+
const field = _nullishCoalesce(colDef.field, () => ( colDef.colId));
|
|
10580
10839
|
if (!field) return null;
|
|
10581
10840
|
return {
|
|
10582
10841
|
colId: field,
|
|
10583
|
-
hide: colDef.hide
|
|
10584
|
-
pinned: colDef.pinned
|
|
10585
|
-
width: colDef.width
|
|
10842
|
+
hide: _nullishCoalesce(colDef.hide, () => ( false)),
|
|
10843
|
+
pinned: _nullishCoalesce(colDef.pinned, () => ( null)),
|
|
10844
|
+
width: _nullishCoalesce(_nullishCoalesce(colDef.width, () => ( colDef.minWidth)), () => ( DEFAULT_COLUMN_STATE.width)),
|
|
10586
10845
|
sort: null,
|
|
10587
10846
|
sortIndex: null,
|
|
10588
10847
|
pivot: false,
|
|
@@ -10590,24 +10849,24 @@ var getColumnStateFromDefs = (columnDefs) => {
|
|
|
10590
10849
|
aggFunc: null,
|
|
10591
10850
|
rowGroup: false,
|
|
10592
10851
|
rowGroupIndex: null,
|
|
10593
|
-
flex: colDef.flex
|
|
10852
|
+
flex: _nullishCoalesce(colDef.flex, () => ( null))
|
|
10594
10853
|
};
|
|
10595
10854
|
}).filter((col) => col !== null);
|
|
10596
10855
|
};
|
|
10597
10856
|
var extractDefaultView = (gridApi, receivedConfig) => {
|
|
10598
|
-
const columnDefs = gridApi.getColumnDefs()
|
|
10599
|
-
const defaultColumnState = receivedConfig
|
|
10857
|
+
const columnDefs = _nullishCoalesce(gridApi.getColumnDefs(), () => ( []));
|
|
10858
|
+
const defaultColumnState = _optionalChain([receivedConfig, 'optionalAccess', _88 => _88.columnState, 'optionalAccess', _89 => _89.length]) ? receivedConfig.columnState : getColumnStateFromDefs(columnDefs);
|
|
10600
10859
|
const result = {
|
|
10601
10860
|
columnState: defaultColumnState,
|
|
10602
|
-
columnGroupState: receivedConfig
|
|
10603
|
-
rowGroupState: receivedConfig
|
|
10604
|
-
filterState: receivedConfig
|
|
10605
|
-
rowHeight: receivedConfig
|
|
10861
|
+
columnGroupState: _nullishCoalesce(_optionalChain([receivedConfig, 'optionalAccess', _90 => _90.columnGroupState]), () => ( [])),
|
|
10862
|
+
rowGroupState: _nullishCoalesce(_optionalChain([receivedConfig, 'optionalAccess', _91 => _91.rowGroupState]), () => ( [])),
|
|
10863
|
+
filterState: _nullishCoalesce(_optionalChain([receivedConfig, 'optionalAccess', _92 => _92.filterState]), () => ( {})),
|
|
10864
|
+
rowHeight: _nullishCoalesce(_optionalChain([receivedConfig, 'optionalAccess', _93 => _93.rowHeight]), () => ( _optionalChain([gridApi, 'access', _94 => _94.getSizesForCurrentTheme, 'call', _95 => _95(), 'optionalAccess', _96 => _96.rowHeight])))
|
|
10606
10865
|
};
|
|
10607
10866
|
return result;
|
|
10608
10867
|
};
|
|
10609
10868
|
var useNormalizedDefaultViews = (defaultViews, gridApi) => {
|
|
10610
|
-
return (0,
|
|
10869
|
+
return _react.useMemo.call(void 0, () => {
|
|
10611
10870
|
if (!gridApi)
|
|
10612
10871
|
return defaultViews.map((view) => ({ ...view, share_token: view.id }));
|
|
10613
10872
|
return defaultViews.map((view) => ({
|
|
@@ -10619,7 +10878,7 @@ var useNormalizedDefaultViews = (defaultViews, gridApi) => {
|
|
|
10619
10878
|
};
|
|
10620
10879
|
|
|
10621
10880
|
// src/components/adapters/smart-grid/useSmartGridConfig.ts
|
|
10622
|
-
|
|
10881
|
+
|
|
10623
10882
|
var GRID_STATE_EVENTS = [
|
|
10624
10883
|
"sortChanged",
|
|
10625
10884
|
"filterOpened",
|
|
@@ -10635,10 +10894,10 @@ var GRID_STATE_EVENTS = [
|
|
|
10635
10894
|
"gridReady"
|
|
10636
10895
|
];
|
|
10637
10896
|
var useSmartGridConfig = (gridApi) => {
|
|
10638
|
-
const [config, setConfig] = (0,
|
|
10897
|
+
const [config, setConfig] = _react.useState.call(void 0,
|
|
10639
10898
|
() => getSmartGridConfig(gridApi)
|
|
10640
10899
|
);
|
|
10641
|
-
(0,
|
|
10900
|
+
_react.useEffect.call(void 0, () => {
|
|
10642
10901
|
if (!gridApi) return;
|
|
10643
10902
|
const updateConfig = () => {
|
|
10644
10903
|
setConfig(getSmartGridConfig(gridApi));
|
|
@@ -10656,20 +10915,20 @@ var useSmartGridConfig = (gridApi) => {
|
|
|
10656
10915
|
};
|
|
10657
10916
|
|
|
10658
10917
|
// src/components/adapters/smart-grid/useSavedViewsPanelOpen.ts
|
|
10659
|
-
|
|
10918
|
+
|
|
10660
10919
|
var SAVED_VIEWS_PANEL_ID = "savedViews";
|
|
10661
10920
|
var useSavedViewsPanelOpen = (gridApi) => {
|
|
10662
|
-
const [isOpen, setIsOpen] = (0,
|
|
10663
|
-
gridApi.getOpenedToolPanel
|
|
10921
|
+
const [isOpen, setIsOpen] = _react.useState.call(void 0,
|
|
10922
|
+
_optionalChain([gridApi, 'access', _97 => _97.getOpenedToolPanel, 'optionalCall', _98 => _98()]) === SAVED_VIEWS_PANEL_ID
|
|
10664
10923
|
);
|
|
10665
|
-
(0,
|
|
10924
|
+
_react.useEffect.call(void 0, () => {
|
|
10666
10925
|
const syncOpenState = () => {
|
|
10667
|
-
setIsOpen(gridApi.getOpenedToolPanel
|
|
10926
|
+
setIsOpen(_optionalChain([gridApi, 'access', _99 => _99.getOpenedToolPanel, 'optionalCall', _100 => _100()]) === SAVED_VIEWS_PANEL_ID);
|
|
10668
10927
|
};
|
|
10669
10928
|
syncOpenState();
|
|
10670
|
-
gridApi.addEventListener
|
|
10929
|
+
_optionalChain([gridApi, 'access', _101 => _101.addEventListener, 'optionalCall', _102 => _102("toolPanelVisibleChanged", syncOpenState)]);
|
|
10671
10930
|
return () => {
|
|
10672
|
-
gridApi.removeEventListener
|
|
10931
|
+
_optionalChain([gridApi, 'access', _103 => _103.removeEventListener, 'optionalCall', _104 => _104("toolPanelVisibleChanged", syncOpenState)]);
|
|
10673
10932
|
};
|
|
10674
10933
|
}, [gridApi]);
|
|
10675
10934
|
return isOpen;
|
|
@@ -10681,8 +10940,8 @@ var SmartGridSavedViews = (props) => {
|
|
|
10681
10940
|
const { config: tableConfig, setConfig: setTableConfig } = useSmartGridConfig(gridApi);
|
|
10682
10941
|
const isPanelOpen = useSavedViewsPanelOpen(gridApi);
|
|
10683
10942
|
const presetViews = useNormalizedDefaultViews(props.defaultViews, gridApi);
|
|
10684
|
-
const defaultView = presetViews.find((view) => view.id === "default")
|
|
10685
|
-
const onSelect = (0,
|
|
10943
|
+
const defaultView = _nullishCoalesce(presetViews.find((view) => view.id === "default"), () => ( presetViews[0]));
|
|
10944
|
+
const onSelect = _react.useCallback.call(void 0,
|
|
10686
10945
|
({ item }) => {
|
|
10687
10946
|
if (!gridApi) return item;
|
|
10688
10947
|
const isPresetView = item.view_level === "default";
|
|
@@ -10690,7 +10949,7 @@ var SmartGridSavedViews = (props) => {
|
|
|
10690
10949
|
updateTableConfig(item, gridApi, "smart-grid");
|
|
10691
10950
|
setTableConfig({
|
|
10692
10951
|
...item.table_config,
|
|
10693
|
-
filterState: gridApi.getFilterModel
|
|
10952
|
+
filterState: _nullishCoalesce(_optionalChain([gridApi, 'access', _105 => _105.getFilterModel, 'optionalCall', _106 => _106()]), () => ( {}))
|
|
10694
10953
|
});
|
|
10695
10954
|
return item;
|
|
10696
10955
|
}
|
|
@@ -10703,13 +10962,13 @@ var SmartGridSavedViews = (props) => {
|
|
|
10703
10962
|
};
|
|
10704
10963
|
updateTableConfig(updatedView, gridApi, "smart-grid");
|
|
10705
10964
|
const updatedConfig = updatedView.table_config;
|
|
10706
|
-
gridApi.setFilterModel(updatedConfig.filterState
|
|
10965
|
+
gridApi.setFilterModel(_nullishCoalesce(updatedConfig.filterState, () => ( {})));
|
|
10707
10966
|
setTableConfig(updatedConfig);
|
|
10708
10967
|
return updatedView;
|
|
10709
10968
|
},
|
|
10710
10969
|
[gridApi, tableConfig, setTableConfig]
|
|
10711
10970
|
);
|
|
10712
|
-
return /* @__PURE__ */
|
|
10971
|
+
return /* @__PURE__ */ React.default.createElement(
|
|
10713
10972
|
SavedViews,
|
|
10714
10973
|
{
|
|
10715
10974
|
onSelect,
|
|
@@ -10722,16 +10981,22 @@ var SmartGridSavedViews = (props) => {
|
|
|
10722
10981
|
presetViews,
|
|
10723
10982
|
tableName: props.tableName,
|
|
10724
10983
|
tableConfig,
|
|
10725
|
-
isPanelOpen
|
|
10984
|
+
isPanelOpen,
|
|
10985
|
+
transport: props.transport
|
|
10726
10986
|
}
|
|
10727
10987
|
);
|
|
10728
10988
|
};
|
|
10729
10989
|
|
|
10730
10990
|
// src/components/adapters/data-table/DataTableSavedViews.tsx
|
|
10731
|
-
|
|
10991
|
+
|
|
10992
|
+
|
|
10993
|
+
|
|
10994
|
+
|
|
10995
|
+
|
|
10996
|
+
|
|
10732
10997
|
|
|
10733
10998
|
// src/components/adapters/data-table/DataTableDefaultSavedView.tsx
|
|
10734
|
-
|
|
10999
|
+
|
|
10735
11000
|
var DEFAULT_COLUMN_STATE2 = {
|
|
10736
11001
|
hidden: false,
|
|
10737
11002
|
pinned: null,
|
|
@@ -10752,33 +11017,33 @@ var getColumnState = (columnDefinitions) => {
|
|
|
10752
11017
|
}
|
|
10753
11018
|
return {
|
|
10754
11019
|
field: column2.field,
|
|
10755
|
-
hidden: column2.hidden
|
|
10756
|
-
pinned: column2.pinned
|
|
11020
|
+
hidden: _nullishCoalesce(column2.hidden, () => ( false)),
|
|
11021
|
+
pinned: _nullishCoalesce(column2.pinned, () => ( null)),
|
|
10757
11022
|
rowGroup: false,
|
|
10758
11023
|
rowGroupIndex: null,
|
|
10759
11024
|
sort: null,
|
|
10760
11025
|
sortIndex: null,
|
|
10761
|
-
width: (column2.minWidth
|
|
11026
|
+
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
|
|
10762
11027
|
};
|
|
10763
11028
|
});
|
|
10764
11029
|
};
|
|
10765
11030
|
var extractDefaultView2 = (columnDefinitions, receivedConfigFromTool) => {
|
|
10766
11031
|
const defaultColumnState = getColumnState(columnDefinitions);
|
|
10767
11032
|
const result = {
|
|
10768
|
-
columnState: receivedConfigFromTool
|
|
10769
|
-
serverFilters: receivedConfigFromTool
|
|
10770
|
-
columnGroupState: receivedConfigFromTool
|
|
10771
|
-
filters: receivedConfigFromTool
|
|
11033
|
+
columnState: _optionalChain([receivedConfigFromTool, 'optionalAccess', _107 => _107.columnState, 'optionalAccess', _108 => _108.length]) ? receivedConfigFromTool.columnState : defaultColumnState,
|
|
11034
|
+
serverFilters: _nullishCoalesce(_optionalChain([receivedConfigFromTool, 'optionalAccess', _109 => _109.serverFilters]), () => ( [])),
|
|
11035
|
+
columnGroupState: _nullishCoalesce(_optionalChain([receivedConfigFromTool, 'optionalAccess', _110 => _110.columnGroupState]), () => ( [])),
|
|
11036
|
+
filters: _nullishCoalesce(_optionalChain([receivedConfigFromTool, 'optionalAccess', _111 => _111.filters]), () => ( {})),
|
|
10772
11037
|
groupRowState: {
|
|
10773
|
-
expandedRoutes: receivedConfigFromTool
|
|
10774
|
-
collapsedRoutes: receivedConfigFromTool
|
|
11038
|
+
expandedRoutes: _nullishCoalesce(_optionalChain([receivedConfigFromTool, 'optionalAccess', _112 => _112.groupRowState, 'optionalAccess', _113 => _113.expandedRoutes]), () => ( [])),
|
|
11039
|
+
collapsedRoutes: _nullishCoalesce(_optionalChain([receivedConfigFromTool, 'optionalAccess', _114 => _114.groupRowState, 'optionalAccess', _115 => _115.collapsedRoutes]), () => ( []))
|
|
10775
11040
|
},
|
|
10776
|
-
rowHeight: receivedConfigFromTool
|
|
11041
|
+
rowHeight: _nullishCoalesce(_optionalChain([receivedConfigFromTool, 'optionalAccess', _116 => _116.rowHeight]), () => ( MEDIUM_ROW_HEIGHT))
|
|
10777
11042
|
};
|
|
10778
11043
|
return result;
|
|
10779
11044
|
};
|
|
10780
11045
|
var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
|
|
10781
|
-
return (0,
|
|
11046
|
+
return _react.useMemo.call(void 0,
|
|
10782
11047
|
() => defaultViews.map((view) => ({
|
|
10783
11048
|
...view,
|
|
10784
11049
|
share_token: view.id,
|
|
@@ -10789,25 +11054,25 @@ var useNormalizedDefaultViews2 = (defaultViews, columnDefinitions) => {
|
|
|
10789
11054
|
};
|
|
10790
11055
|
|
|
10791
11056
|
// src/components/adapters/data-table/DataTableSavedViews.tsx
|
|
10792
|
-
var DataTableSavedViews = (0,
|
|
11057
|
+
var DataTableSavedViews = _react.forwardRef.call(void 0, (props, ref) => {
|
|
10793
11058
|
const { tableApi, userId, projectId, companyId } = props;
|
|
10794
11059
|
const presetViews = useNormalizedDefaultViews2(
|
|
10795
11060
|
props.defaultViews,
|
|
10796
11061
|
props.columnDefinitions
|
|
10797
11062
|
);
|
|
10798
|
-
const defaultView = presetViews.find((view) => view.id === "default")
|
|
10799
|
-
const [internalTableConfig, setInternalTableConfig] = (0,
|
|
11063
|
+
const defaultView = _nullishCoalesce(presetViews.find((view) => view.id === "default"), () => ( presetViews[0]));
|
|
11064
|
+
const [internalTableConfig, setInternalTableConfig] = _react.useState.call(void 0,
|
|
10800
11065
|
ViewStorage.load(props.stickyViewsKey, defaultView).table_config
|
|
10801
11066
|
);
|
|
10802
|
-
(0,
|
|
11067
|
+
_react.useImperativeHandle.call(void 0, ref, () => ({
|
|
10803
11068
|
setTableConfig: (newConfig) => {
|
|
10804
11069
|
setInternalTableConfig(newConfig);
|
|
10805
11070
|
}
|
|
10806
11071
|
}));
|
|
10807
|
-
const onSelect = (0,
|
|
11072
|
+
const onSelect = _react.useCallback.call(void 0,
|
|
10808
11073
|
({ item }) => {
|
|
10809
11074
|
const isPresetView = item.view_level === "default";
|
|
10810
|
-
const syncReferenceConfig = tableApi
|
|
11075
|
+
const syncReferenceConfig = _nullishCoalesce(_optionalChain([tableApi, 'optionalAccess', _117 => _117.getTableConfiguration, 'optionalCall', _118 => _118()]), () => ( defaultView.table_config));
|
|
10811
11076
|
const syncedConfig = isPresetView ? item.table_config : customAndConfigSync(
|
|
10812
11077
|
item.table_config,
|
|
10813
11078
|
syncReferenceConfig
|
|
@@ -10827,7 +11092,7 @@ var DataTableSavedViews = (0, import_react21.forwardRef)((props, ref) => {
|
|
|
10827
11092
|
if (!internalTableConfig) {
|
|
10828
11093
|
return null;
|
|
10829
11094
|
}
|
|
10830
|
-
return /* @__PURE__ */
|
|
11095
|
+
return /* @__PURE__ */ React.default.createElement(
|
|
10831
11096
|
SavedViews,
|
|
10832
11097
|
{
|
|
10833
11098
|
onSelect,
|
|
@@ -10839,24 +11104,26 @@ var DataTableSavedViews = (0, import_react21.forwardRef)((props, ref) => {
|
|
|
10839
11104
|
defaultView,
|
|
10840
11105
|
presetViews,
|
|
10841
11106
|
tableName: props.tableName,
|
|
10842
|
-
tableConfig: internalTableConfig
|
|
11107
|
+
tableConfig: internalTableConfig,
|
|
11108
|
+
transport: props.transport
|
|
10843
11109
|
}
|
|
10844
11110
|
);
|
|
10845
11111
|
});
|
|
10846
11112
|
DataTableSavedViews.displayName = "DataTableSavedViews";
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
11113
|
+
|
|
11114
|
+
|
|
11115
|
+
|
|
11116
|
+
|
|
11117
|
+
|
|
11118
|
+
|
|
11119
|
+
|
|
11120
|
+
|
|
11121
|
+
|
|
11122
|
+
|
|
11123
|
+
|
|
11124
|
+
|
|
11125
|
+
|
|
11126
|
+
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;
|
|
10860
11127
|
/*! Bundled license information:
|
|
10861
11128
|
|
|
10862
11129
|
lodash/lodash.js:
|