@teselagen/ui 0.8.4 → 0.8.6-beta.2
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/DataTable/utils/filterLocalEntitiesToHasura.d.ts +5 -0
- package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +2 -0
- package/DataTable/utils/queryParams.d.ts +7 -14
- package/DataTable/utils/tableQueryParamsToHasuraClauses.d.ts +26 -0
- package/autoTooltip.d.ts +1 -1
- package/index.cjs.js +847 -1050
- package/index.d.ts +1 -0
- package/index.es.js +847 -1050
- package/package.json +1 -1
- package/src/DataTable/Columns.js +1 -1
- package/src/DataTable/DisplayOptions.js +1 -1
- package/src/DataTable/FilterAndSortMenu.js +27 -30
- package/src/DataTable/index.js +3 -14
- package/src/DataTable/style.css +1 -1
- package/src/DataTable/utils/filterLocalEntitiesToHasura.js +236 -0
- package/src/DataTable/utils/filterLocalEntitiesToHasura.test.js +587 -0
- package/src/DataTable/utils/initializeHasuraWhereAndFilter.js +26 -0
- package/src/DataTable/utils/queryParams.js +64 -772
- package/src/DataTable/utils/tableQueryParamsToHasuraClauses.js +260 -0
- package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +206 -0
- package/src/DataTable/utils/withTableParams.js +3 -16
- package/src/FormComponents/Uploader.js +5 -1
- package/src/FormComponents/index.js +2 -2
- package/src/autoTooltip.js +4 -115
- package/src/index.js +1 -0
- package/ui.css +1 -1
package/index.cjs.js
CHANGED
|
@@ -2922,77 +2922,6 @@ document.addEventListener("mouseup", () => {
|
|
|
2922
2922
|
canSetDragging = false;
|
|
2923
2923
|
isDragging = false;
|
|
2924
2924
|
});
|
|
2925
|
-
const processedDisabledElements = /* @__PURE__ */ new WeakMap();
|
|
2926
|
-
function moveTooltipToParent(element2) {
|
|
2927
|
-
var _a, _b;
|
|
2928
|
-
if (processedDisabledElements.has(element2)) {
|
|
2929
|
-
return;
|
|
2930
|
-
}
|
|
2931
|
-
const isDisabled = element2.disabled === true || element2.getAttribute("disabled") !== null;
|
|
2932
|
-
const hasTipData = element2.getAttribute("data-tip") || element2.getAttribute("data-title") || element2.offsetWidth < element2.scrollWidth && ((_a = element2.textContent) == null ? void 0 : _a.trim().length) > 0;
|
|
2933
|
-
if (!isDisabled || !hasTipData) {
|
|
2934
|
-
return;
|
|
2935
|
-
}
|
|
2936
|
-
const parent2 = element2.parentElement;
|
|
2937
|
-
if (!parent2) {
|
|
2938
|
-
return;
|
|
2939
|
-
}
|
|
2940
|
-
const tooltipAttrs = ["data-tip", "data-title", "data-avoid", "data-avoid-backup"];
|
|
2941
|
-
let attrsMoved = false;
|
|
2942
|
-
const movedAttrs = [];
|
|
2943
|
-
tooltipAttrs.forEach((attr) => {
|
|
2944
|
-
const value = element2.getAttribute(attr);
|
|
2945
|
-
if (value) {
|
|
2946
|
-
if (!parent2.hasAttribute(attr)) {
|
|
2947
|
-
parent2.setAttribute(attr, value);
|
|
2948
|
-
movedAttrs.push(attr);
|
|
2949
|
-
attrsMoved = true;
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
});
|
|
2953
|
-
if (element2.offsetWidth < element2.scrollWidth && ((_b = element2.textContent) == null ? void 0 : _b.trim().length) > 0) {
|
|
2954
|
-
if (!parent2.hasAttribute("data-tip")) {
|
|
2955
|
-
parent2.setAttribute("data-tip", element2.textContent);
|
|
2956
|
-
movedAttrs.push("data-tip");
|
|
2957
|
-
attrsMoved = true;
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
if (attrsMoved) {
|
|
2961
|
-
processedDisabledElements.set(element2, {
|
|
2962
|
-
parent: parent2,
|
|
2963
|
-
movedAttrs
|
|
2964
|
-
});
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
__name(moveTooltipToParent, "moveTooltipToParent");
|
|
2968
|
-
function clearParentTooltips(element2) {
|
|
2969
|
-
if (!processedDisabledElements.has(element2)) {
|
|
2970
|
-
return;
|
|
2971
|
-
}
|
|
2972
|
-
const { parent: parent2, movedAttrs } = processedDisabledElements.get(element2);
|
|
2973
|
-
if (parent2 && movedAttrs) {
|
|
2974
|
-
movedAttrs.forEach((attr) => {
|
|
2975
|
-
parent2.removeAttribute(attr);
|
|
2976
|
-
});
|
|
2977
|
-
processedDisabledElements.delete(element2);
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
__name(clearParentTooltips, "clearParentTooltips");
|
|
2981
|
-
function scanForDisabledElements() {
|
|
2982
|
-
processedDisabledElements.forEach((value, element2) => {
|
|
2983
|
-
const isStillDisabled = element2.disabled === true || element2.getAttribute("disabled") !== null;
|
|
2984
|
-
const isConnected = element2.isConnected;
|
|
2985
|
-
if (!isStillDisabled || !isConnected) {
|
|
2986
|
-
clearParentTooltips(element2);
|
|
2987
|
-
}
|
|
2988
|
-
});
|
|
2989
|
-
document.querySelectorAll("[disabled][data-tip], [disabled][data-title], button[disabled], input[disabled]").forEach((el) => {
|
|
2990
|
-
moveTooltipToParent(el);
|
|
2991
|
-
});
|
|
2992
|
-
}
|
|
2993
|
-
__name(scanForDisabledElements, "scanForDisabledElements");
|
|
2994
|
-
window.addEventListener("DOMContentLoaded", scanForDisabledElements);
|
|
2995
|
-
setInterval(scanForDisabledElements, 2e3);
|
|
2996
2925
|
let tippys = [];
|
|
2997
2926
|
let recentlyHidden = false;
|
|
2998
2927
|
let clearMe;
|
|
@@ -3000,13 +2929,7 @@ let clearMe;
|
|
|
3000
2929
|
let lastMouseOverElement = null;
|
|
3001
2930
|
document.addEventListener("mouseover", function(event) {
|
|
3002
2931
|
var _a, _b;
|
|
3003
|
-
|
|
3004
|
-
if (element2 instanceof Element && (element2.disabled === true || element2.getAttribute("disabled") !== null)) {
|
|
3005
|
-
const parent2 = element2.parentElement;
|
|
3006
|
-
if (parent2 && processedDisabledElements.has(element2)) {
|
|
3007
|
-
element2 = parent2;
|
|
3008
|
-
}
|
|
3009
|
-
}
|
|
2932
|
+
const element2 = event.target;
|
|
3010
2933
|
if (element2 instanceof Element && element2 !== lastMouseOverElement) {
|
|
3011
2934
|
let clearOldTippys = /* @__PURE__ */ __name(function(maybeInst) {
|
|
3012
2935
|
tippys = tippys.filter((t2) => {
|
|
@@ -5880,12 +5803,12 @@ var freeGlobal = typeof global == "object" && global && global.Object === Object
|
|
|
5880
5803
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
5881
5804
|
var root$4 = freeGlobal || freeSelf || Function("return this")();
|
|
5882
5805
|
var Symbol$1 = root$4.Symbol;
|
|
5883
|
-
var objectProto$
|
|
5884
|
-
var hasOwnProperty$
|
|
5885
|
-
var nativeObjectToString$2 = objectProto$
|
|
5806
|
+
var objectProto$i = Object.prototype;
|
|
5807
|
+
var hasOwnProperty$f = objectProto$i.hasOwnProperty;
|
|
5808
|
+
var nativeObjectToString$2 = objectProto$i.toString;
|
|
5886
5809
|
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
5887
5810
|
function getRawTag(value) {
|
|
5888
|
-
var isOwn = hasOwnProperty$
|
|
5811
|
+
var isOwn = hasOwnProperty$f.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
5889
5812
|
try {
|
|
5890
5813
|
value[symToStringTag$1] = void 0;
|
|
5891
5814
|
var unmasked = true;
|
|
@@ -5902,8 +5825,8 @@ function getRawTag(value) {
|
|
|
5902
5825
|
return result;
|
|
5903
5826
|
}
|
|
5904
5827
|
__name(getRawTag, "getRawTag");
|
|
5905
|
-
var objectProto$
|
|
5906
|
-
var nativeObjectToString$1 = objectProto$
|
|
5828
|
+
var objectProto$h = Object.prototype;
|
|
5829
|
+
var nativeObjectToString$1 = objectProto$h.toString;
|
|
5907
5830
|
function objectToString(value) {
|
|
5908
5831
|
return nativeObjectToString$1.call(value);
|
|
5909
5832
|
}
|
|
@@ -6050,11 +5973,11 @@ function toSource(func) {
|
|
|
6050
5973
|
__name(toSource, "toSource");
|
|
6051
5974
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
6052
5975
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
6053
|
-
var funcProto$1 = Function.prototype, objectProto$
|
|
5976
|
+
var funcProto$1 = Function.prototype, objectProto$g = Object.prototype;
|
|
6054
5977
|
var funcToString$1 = funcProto$1.toString;
|
|
6055
|
-
var hasOwnProperty$
|
|
5978
|
+
var hasOwnProperty$e = objectProto$g.hasOwnProperty;
|
|
6056
5979
|
var reIsNative = RegExp(
|
|
6057
|
-
"^" + funcToString$1.call(hasOwnProperty$
|
|
5980
|
+
"^" + funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
6058
5981
|
);
|
|
6059
5982
|
function baseIsNative(value) {
|
|
6060
5983
|
if (!isObject$2(value) || isMasked(value)) {
|
|
@@ -6227,11 +6150,11 @@ function eq$1(value, other) {
|
|
|
6227
6150
|
return value === other || value !== value && other !== other;
|
|
6228
6151
|
}
|
|
6229
6152
|
__name(eq$1, "eq$1");
|
|
6230
|
-
var objectProto$
|
|
6231
|
-
var hasOwnProperty$
|
|
6153
|
+
var objectProto$f = Object.prototype;
|
|
6154
|
+
var hasOwnProperty$d = objectProto$f.hasOwnProperty;
|
|
6232
6155
|
function assignValue(object2, key, value) {
|
|
6233
6156
|
var objValue = object2[key];
|
|
6234
|
-
if (!(hasOwnProperty$
|
|
6157
|
+
if (!(hasOwnProperty$d.call(object2, key) && eq$1(objValue, value)) || value === void 0 && !(key in object2)) {
|
|
6235
6158
|
baseAssignValue(object2, key, value);
|
|
6236
6159
|
}
|
|
6237
6160
|
}
|
|
@@ -6255,11 +6178,11 @@ function copyObject(source, props, object2, customizer) {
|
|
|
6255
6178
|
return object2;
|
|
6256
6179
|
}
|
|
6257
6180
|
__name(copyObject, "copyObject");
|
|
6258
|
-
var nativeMax$
|
|
6181
|
+
var nativeMax$3 = Math.max;
|
|
6259
6182
|
function overRest(func, start2, transform) {
|
|
6260
|
-
start2 = nativeMax$
|
|
6183
|
+
start2 = nativeMax$3(start2 === void 0 ? func.length - 1 : start2, 0);
|
|
6261
6184
|
return function() {
|
|
6262
|
-
var args = arguments, index2 = -1, length = nativeMax$
|
|
6185
|
+
var args = arguments, index2 = -1, length = nativeMax$3(args.length - start2, 0), array2 = Array(length);
|
|
6263
6186
|
while (++index2 < length) {
|
|
6264
6187
|
array2[index2] = args[start2 + index2];
|
|
6265
6188
|
}
|
|
@@ -6316,9 +6239,9 @@ function createAssigner(assigner) {
|
|
|
6316
6239
|
});
|
|
6317
6240
|
}
|
|
6318
6241
|
__name(createAssigner, "createAssigner");
|
|
6319
|
-
var objectProto$
|
|
6242
|
+
var objectProto$e = Object.prototype;
|
|
6320
6243
|
function isPrototype(value) {
|
|
6321
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
6244
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$e;
|
|
6322
6245
|
return value === proto;
|
|
6323
6246
|
}
|
|
6324
6247
|
__name(isPrototype, "isPrototype");
|
|
@@ -6335,13 +6258,13 @@ function baseIsArguments(value) {
|
|
|
6335
6258
|
return isObjectLike$1(value) && baseGetTag(value) == argsTag$3;
|
|
6336
6259
|
}
|
|
6337
6260
|
__name(baseIsArguments, "baseIsArguments");
|
|
6338
|
-
var objectProto$
|
|
6339
|
-
var hasOwnProperty$
|
|
6340
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
6261
|
+
var objectProto$d = Object.prototype;
|
|
6262
|
+
var hasOwnProperty$c = objectProto$d.hasOwnProperty;
|
|
6263
|
+
var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
|
|
6341
6264
|
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
6342
6265
|
return arguments;
|
|
6343
6266
|
}()) ? baseIsArguments : function(value) {
|
|
6344
|
-
return isObjectLike$1(value) && hasOwnProperty$
|
|
6267
|
+
return isObjectLike$1(value) && hasOwnProperty$c.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
6345
6268
|
};
|
|
6346
6269
|
function stubFalse() {
|
|
6347
6270
|
return false;
|
|
@@ -6384,12 +6307,12 @@ var nodeUtil = function() {
|
|
|
6384
6307
|
}();
|
|
6385
6308
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
6386
6309
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
6387
|
-
var objectProto$
|
|
6388
|
-
var hasOwnProperty$
|
|
6310
|
+
var objectProto$c = Object.prototype;
|
|
6311
|
+
var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
6389
6312
|
function arrayLikeKeys(value, inherited) {
|
|
6390
6313
|
var isArr = isArray$2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType2 = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType2, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
6391
6314
|
for (var key in value) {
|
|
6392
|
-
if ((inherited || hasOwnProperty$
|
|
6315
|
+
if ((inherited || hasOwnProperty$b.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
6393
6316
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
6394
6317
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
6395
6318
|
isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
@@ -6407,15 +6330,15 @@ function overArg(func, transform) {
|
|
|
6407
6330
|
}
|
|
6408
6331
|
__name(overArg, "overArg");
|
|
6409
6332
|
var nativeKeys = overArg(Object.keys, Object);
|
|
6410
|
-
var objectProto$
|
|
6411
|
-
var hasOwnProperty$
|
|
6333
|
+
var objectProto$b = Object.prototype;
|
|
6334
|
+
var hasOwnProperty$a = objectProto$b.hasOwnProperty;
|
|
6412
6335
|
function baseKeys(object2) {
|
|
6413
6336
|
if (!isPrototype(object2)) {
|
|
6414
6337
|
return nativeKeys(object2);
|
|
6415
6338
|
}
|
|
6416
6339
|
var result = [];
|
|
6417
6340
|
for (var key in Object(object2)) {
|
|
6418
|
-
if (hasOwnProperty$
|
|
6341
|
+
if (hasOwnProperty$a.call(object2, key) && key != "constructor") {
|
|
6419
6342
|
result.push(key);
|
|
6420
6343
|
}
|
|
6421
6344
|
}
|
|
@@ -6436,15 +6359,15 @@ function nativeKeysIn(object2) {
|
|
|
6436
6359
|
return result;
|
|
6437
6360
|
}
|
|
6438
6361
|
__name(nativeKeysIn, "nativeKeysIn");
|
|
6439
|
-
var objectProto$
|
|
6440
|
-
var hasOwnProperty$
|
|
6362
|
+
var objectProto$a = Object.prototype;
|
|
6363
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
6441
6364
|
function baseKeysIn(object2) {
|
|
6442
6365
|
if (!isObject$2(object2)) {
|
|
6443
6366
|
return nativeKeysIn(object2);
|
|
6444
6367
|
}
|
|
6445
6368
|
var isProto = isPrototype(object2), result = [];
|
|
6446
6369
|
for (var key in object2) {
|
|
6447
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$
|
|
6370
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty$9.call(object2, key)))) {
|
|
6448
6371
|
result.push(key);
|
|
6449
6372
|
}
|
|
6450
6373
|
}
|
|
@@ -6480,22 +6403,22 @@ function hashDelete(key) {
|
|
|
6480
6403
|
}
|
|
6481
6404
|
__name(hashDelete, "hashDelete");
|
|
6482
6405
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
6483
|
-
var objectProto$
|
|
6484
|
-
var hasOwnProperty$
|
|
6406
|
+
var objectProto$9 = Object.prototype;
|
|
6407
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
6485
6408
|
function hashGet(key) {
|
|
6486
6409
|
var data = this.__data__;
|
|
6487
6410
|
if (nativeCreate) {
|
|
6488
6411
|
var result = data[key];
|
|
6489
6412
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
6490
6413
|
}
|
|
6491
|
-
return hasOwnProperty$
|
|
6414
|
+
return hasOwnProperty$8.call(data, key) ? data[key] : void 0;
|
|
6492
6415
|
}
|
|
6493
6416
|
__name(hashGet, "hashGet");
|
|
6494
|
-
var objectProto$
|
|
6495
|
-
var hasOwnProperty$
|
|
6417
|
+
var objectProto$8 = Object.prototype;
|
|
6418
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
6496
6419
|
function hashHas(key) {
|
|
6497
6420
|
var data = this.__data__;
|
|
6498
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$
|
|
6421
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$7.call(data, key);
|
|
6499
6422
|
}
|
|
6500
6423
|
__name(hashHas, "hashHas");
|
|
6501
6424
|
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
@@ -6758,9 +6681,9 @@ function flatRest(func) {
|
|
|
6758
6681
|
__name(flatRest, "flatRest");
|
|
6759
6682
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
6760
6683
|
var objectTag$3 = "[object Object]";
|
|
6761
|
-
var funcProto = Function.prototype, objectProto$
|
|
6684
|
+
var funcProto = Function.prototype, objectProto$7 = Object.prototype;
|
|
6762
6685
|
var funcToString = funcProto.toString;
|
|
6763
|
-
var hasOwnProperty$
|
|
6686
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
6764
6687
|
var objectCtorString = funcToString.call(Object);
|
|
6765
6688
|
function isPlainObject$2(value) {
|
|
6766
6689
|
if (!isObjectLike$1(value) || baseGetTag(value) != objectTag$3) {
|
|
@@ -6770,7 +6693,7 @@ function isPlainObject$2(value) {
|
|
|
6770
6693
|
if (proto === null) {
|
|
6771
6694
|
return true;
|
|
6772
6695
|
}
|
|
6773
|
-
var Ctor = hasOwnProperty$
|
|
6696
|
+
var Ctor = hasOwnProperty$6.call(proto, "constructor") && proto.constructor;
|
|
6774
6697
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
6775
6698
|
}
|
|
6776
6699
|
__name(isPlainObject$2, "isPlainObject$2");
|
|
@@ -7199,8 +7122,8 @@ function stubArray() {
|
|
|
7199
7122
|
return [];
|
|
7200
7123
|
}
|
|
7201
7124
|
__name(stubArray, "stubArray");
|
|
7202
|
-
var objectProto$
|
|
7203
|
-
var propertyIsEnumerable = objectProto$
|
|
7125
|
+
var objectProto$6 = Object.prototype;
|
|
7126
|
+
var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
|
|
7204
7127
|
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
7205
7128
|
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object2) {
|
|
7206
7129
|
if (object2 == null) {
|
|
@@ -7268,11 +7191,11 @@ if (DataView$1 && getTag$1(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3
|
|
|
7268
7191
|
return result;
|
|
7269
7192
|
}, "getTag$1");
|
|
7270
7193
|
}
|
|
7271
|
-
var objectProto$
|
|
7272
|
-
var hasOwnProperty$
|
|
7194
|
+
var objectProto$5 = Object.prototype;
|
|
7195
|
+
var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
|
|
7273
7196
|
function initCloneArray(array2) {
|
|
7274
7197
|
var length = array2.length, result = new array2.constructor(length);
|
|
7275
|
-
if (length && typeof array2[0] == "string" && hasOwnProperty$
|
|
7198
|
+
if (length && typeof array2[0] == "string" && hasOwnProperty$5.call(array2, "index")) {
|
|
7276
7199
|
result.index = array2.index;
|
|
7277
7200
|
result.input = array2.input;
|
|
7278
7201
|
}
|
|
@@ -7586,8 +7509,8 @@ function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
7586
7509
|
}
|
|
7587
7510
|
__name(equalByTag, "equalByTag");
|
|
7588
7511
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
7589
|
-
var objectProto$
|
|
7590
|
-
var hasOwnProperty$
|
|
7512
|
+
var objectProto$4 = Object.prototype;
|
|
7513
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
7591
7514
|
function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
7592
7515
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
7593
7516
|
if (objLength != othLength && !isPartial) {
|
|
@@ -7596,7 +7519,7 @@ function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7596
7519
|
var index2 = objLength;
|
|
7597
7520
|
while (index2--) {
|
|
7598
7521
|
var key = objProps[index2];
|
|
7599
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
7522
|
+
if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) {
|
|
7600
7523
|
return false;
|
|
7601
7524
|
}
|
|
7602
7525
|
}
|
|
@@ -7634,8 +7557,8 @@ function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7634
7557
|
__name(equalObjects, "equalObjects");
|
|
7635
7558
|
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
7636
7559
|
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
7637
|
-
var objectProto$
|
|
7638
|
-
var hasOwnProperty$
|
|
7560
|
+
var objectProto$3 = Object.prototype;
|
|
7561
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
7639
7562
|
function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
7640
7563
|
var objIsArr = isArray$2(object2), othIsArr = isArray$2(other), objTag = objIsArr ? arrayTag : getTag$1(object2), othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
7641
7564
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
@@ -7653,7 +7576,7 @@ function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack)
|
|
|
7653
7576
|
return objIsArr || isTypedArray(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
7654
7577
|
}
|
|
7655
7578
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
7656
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
7579
|
+
var objIsWrapped = objIsObj && hasOwnProperty$3.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$3.call(other, "__wrapped__");
|
|
7657
7580
|
if (objIsWrapped || othIsWrapped) {
|
|
7658
7581
|
var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
7659
7582
|
stack || (stack = new Stack());
|
|
@@ -7869,7 +7792,7 @@ var now = /* @__PURE__ */ __name(function() {
|
|
|
7869
7792
|
return root$4.Date.now();
|
|
7870
7793
|
}, "now");
|
|
7871
7794
|
var FUNC_ERROR_TEXT$2 = "Expected a function";
|
|
7872
|
-
var nativeMax$
|
|
7795
|
+
var nativeMax$2 = Math.max, nativeMin$1 = Math.min;
|
|
7873
7796
|
function debounce(func, wait, options) {
|
|
7874
7797
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
7875
7798
|
if (typeof func != "function") {
|
|
@@ -7879,7 +7802,7 @@ function debounce(func, wait, options) {
|
|
|
7879
7802
|
if (isObject$2(options)) {
|
|
7880
7803
|
leading = !!options.leading;
|
|
7881
7804
|
maxing = "maxWait" in options;
|
|
7882
|
-
maxWait = maxing ? nativeMax$
|
|
7805
|
+
maxWait = maxing ? nativeMax$2(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
7883
7806
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
7884
7807
|
}
|
|
7885
7808
|
function invokeFunc(time) {
|
|
@@ -8049,12 +7972,12 @@ function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
|
8049
7972
|
__name(baseMerge, "baseMerge");
|
|
8050
7973
|
var LARGE_ARRAY_SIZE$1 = 200;
|
|
8051
7974
|
function baseDifference(array2, values2, iteratee, comparator) {
|
|
8052
|
-
var index2 = -1,
|
|
7975
|
+
var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array2.length, result = [], valuesLength = values2.length;
|
|
8053
7976
|
if (!length) {
|
|
8054
7977
|
return result;
|
|
8055
7978
|
}
|
|
8056
7979
|
if (values2.length >= LARGE_ARRAY_SIZE$1) {
|
|
8057
|
-
|
|
7980
|
+
includes2 = cacheHas;
|
|
8058
7981
|
isCommon = false;
|
|
8059
7982
|
values2 = new SetCache(values2);
|
|
8060
7983
|
}
|
|
@@ -8070,7 +7993,7 @@ function baseDifference(array2, values2, iteratee, comparator) {
|
|
|
8070
7993
|
}
|
|
8071
7994
|
}
|
|
8072
7995
|
result.push(value);
|
|
8073
|
-
} else if (!
|
|
7996
|
+
} else if (!includes2(values2, computed3, comparator)) {
|
|
8074
7997
|
result.push(value);
|
|
8075
7998
|
}
|
|
8076
7999
|
}
|
|
@@ -8085,15 +8008,6 @@ function last$1(array2) {
|
|
|
8085
8008
|
return length ? array2[length - 1] : void 0;
|
|
8086
8009
|
}
|
|
8087
8010
|
__name(last$1, "last$1");
|
|
8088
|
-
function drop(array2, n2, guard) {
|
|
8089
|
-
var length = array2 == null ? 0 : array2.length;
|
|
8090
|
-
if (!length) {
|
|
8091
|
-
return [];
|
|
8092
|
-
}
|
|
8093
|
-
n2 = n2 === void 0 ? 1 : toInteger(n2);
|
|
8094
|
-
return baseSlice(array2, n2 < 0 ? 0 : n2, length);
|
|
8095
|
-
}
|
|
8096
|
-
__name(drop, "drop");
|
|
8097
8011
|
function castFunction(value) {
|
|
8098
8012
|
return typeof value == "function" ? value : identity$1;
|
|
8099
8013
|
}
|
|
@@ -8103,16 +8017,6 @@ function forEach(collection, iteratee) {
|
|
|
8103
8017
|
return func(collection, castFunction(iteratee));
|
|
8104
8018
|
}
|
|
8105
8019
|
__name(forEach, "forEach");
|
|
8106
|
-
function endsWith$1(string2, target, position2) {
|
|
8107
|
-
string2 = toString$4(string2);
|
|
8108
|
-
target = baseToString$1(target);
|
|
8109
|
-
var length = string2.length;
|
|
8110
|
-
position2 = position2 === void 0 ? length : baseClamp(toInteger(position2), 0, length);
|
|
8111
|
-
var end2 = position2;
|
|
8112
|
-
position2 -= target.length;
|
|
8113
|
-
return position2 >= 0 && string2.slice(position2, end2) == target;
|
|
8114
|
-
}
|
|
8115
|
-
__name(endsWith$1, "endsWith$1");
|
|
8116
8020
|
function arrayEvery(array2, predicate) {
|
|
8117
8021
|
var index2 = -1, length = array2 == null ? 0 : array2.length;
|
|
8118
8022
|
while (++index2 < length) {
|
|
@@ -8173,6 +8077,16 @@ function baseGt(value, other) {
|
|
|
8173
8077
|
return value > other;
|
|
8174
8078
|
}
|
|
8175
8079
|
__name(baseGt, "baseGt");
|
|
8080
|
+
var objectProto$2 = Object.prototype;
|
|
8081
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
8082
|
+
function baseHas(object2, key) {
|
|
8083
|
+
return object2 != null && hasOwnProperty$2.call(object2, key);
|
|
8084
|
+
}
|
|
8085
|
+
__name(baseHas, "baseHas");
|
|
8086
|
+
function has$1(object2, path2) {
|
|
8087
|
+
return object2 != null && hasPath(object2, path2, baseHas);
|
|
8088
|
+
}
|
|
8089
|
+
__name(has$1, "has$1");
|
|
8176
8090
|
var stringTag = "[object String]";
|
|
8177
8091
|
function isString$1(value) {
|
|
8178
8092
|
return typeof value == "string" || !isArray$2(value) && isObjectLike$1(value) && baseGetTag(value) == stringTag;
|
|
@@ -8188,6 +8102,17 @@ function values(object2) {
|
|
|
8188
8102
|
return object2 == null ? [] : baseValues(object2, keys$1(object2));
|
|
8189
8103
|
}
|
|
8190
8104
|
__name(values, "values");
|
|
8105
|
+
var nativeMax$1 = Math.max;
|
|
8106
|
+
function includes(collection, value, fromIndex, guard) {
|
|
8107
|
+
collection = isArrayLike(collection) ? collection : values(collection);
|
|
8108
|
+
fromIndex = fromIndex && true ? toInteger(fromIndex) : 0;
|
|
8109
|
+
var length = collection.length;
|
|
8110
|
+
if (fromIndex < 0) {
|
|
8111
|
+
fromIndex = nativeMax$1(length + fromIndex, 0);
|
|
8112
|
+
}
|
|
8113
|
+
return isString$1(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
8114
|
+
}
|
|
8115
|
+
__name(includes, "includes");
|
|
8191
8116
|
function baseInverter(object2, setter, iteratee, accumulator) {
|
|
8192
8117
|
baseForOwn(object2, function(value, key, object3) {
|
|
8193
8118
|
setter(accumulator, iteratee(value), key, object3);
|
|
@@ -8248,15 +8173,15 @@ function isEqualWith(value, other, customizer) {
|
|
|
8248
8173
|
return result === void 0 ? baseIsEqual(value, other, void 0, customizer) : !!result;
|
|
8249
8174
|
}
|
|
8250
8175
|
__name(isEqualWith, "isEqualWith");
|
|
8251
|
-
function isInteger(value) {
|
|
8252
|
-
return typeof value == "number" && value == toInteger(value);
|
|
8253
|
-
}
|
|
8254
|
-
__name(isInteger, "isInteger");
|
|
8255
8176
|
var numberTag = "[object Number]";
|
|
8256
8177
|
function isNumber$1(value) {
|
|
8257
8178
|
return typeof value == "number" || isObjectLike$1(value) && baseGetTag(value) == numberTag;
|
|
8258
8179
|
}
|
|
8259
8180
|
__name(isNumber$1, "isNumber$1");
|
|
8181
|
+
function isNull(value) {
|
|
8182
|
+
return value === null;
|
|
8183
|
+
}
|
|
8184
|
+
__name(isNull, "isNull");
|
|
8260
8185
|
function isUndefined(value) {
|
|
8261
8186
|
return value === void 0;
|
|
8262
8187
|
}
|
|
@@ -8713,14 +8638,14 @@ var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? n
|
|
|
8713
8638
|
};
|
|
8714
8639
|
var LARGE_ARRAY_SIZE = 200;
|
|
8715
8640
|
function baseUniq(array2, iteratee, comparator) {
|
|
8716
|
-
var index2 = -1,
|
|
8641
|
+
var index2 = -1, includes2 = arrayIncludes, length = array2.length, isCommon = true, result = [], seen = result;
|
|
8717
8642
|
if (length >= LARGE_ARRAY_SIZE) {
|
|
8718
8643
|
var set5 = iteratee ? null : createSet(array2);
|
|
8719
8644
|
if (set5) {
|
|
8720
8645
|
return setToArray(set5);
|
|
8721
8646
|
}
|
|
8722
8647
|
isCommon = false;
|
|
8723
|
-
|
|
8648
|
+
includes2 = cacheHas;
|
|
8724
8649
|
seen = new SetCache();
|
|
8725
8650
|
} else {
|
|
8726
8651
|
seen = iteratee ? [] : result;
|
|
@@ -8740,7 +8665,7 @@ function baseUniq(array2, iteratee, comparator) {
|
|
|
8740
8665
|
seen.push(computed3);
|
|
8741
8666
|
}
|
|
8742
8667
|
result.push(value);
|
|
8743
|
-
} else if (!
|
|
8668
|
+
} else if (!includes2(seen, computed3, comparator)) {
|
|
8744
8669
|
if (seen !== result) {
|
|
8745
8670
|
seen.push(computed3);
|
|
8746
8671
|
}
|
|
@@ -8750,10 +8675,6 @@ function baseUniq(array2, iteratee, comparator) {
|
|
|
8750
8675
|
return result;
|
|
8751
8676
|
}
|
|
8752
8677
|
__name(baseUniq, "baseUniq");
|
|
8753
|
-
function uniq(array2) {
|
|
8754
|
-
return array2 && array2.length ? baseUniq(array2) : [];
|
|
8755
|
-
}
|
|
8756
|
-
__name(uniq, "uniq");
|
|
8757
8678
|
function uniqBy(array2, iteratee) {
|
|
8758
8679
|
return array2 && array2.length ? baseUniq(array2, baseIteratee(iteratee)) : [];
|
|
8759
8680
|
}
|
|
@@ -19482,293 +19403,414 @@ function requireLib$1() {
|
|
|
19482
19403
|
__name(requireLib$1, "requireLib$1");
|
|
19483
19404
|
var libExports$1 = /* @__PURE__ */ requireLib$1();
|
|
19484
19405
|
const queryString = /* @__PURE__ */ getDefaultExportFromCjs(libExports$1);
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
}, "u") }, g2 = "en", D2 = {};
|
|
19515
|
-
D2[g2] = M2;
|
|
19516
|
-
var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t3) {
|
|
19517
|
-
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
|
19518
|
-
}, "S"), w2 = /* @__PURE__ */ __name(function t3(e2, n3, r3) {
|
|
19519
|
-
var i3;
|
|
19520
|
-
if (!e2) return g2;
|
|
19521
|
-
if ("string" == typeof e2) {
|
|
19522
|
-
var s3 = e2.toLowerCase();
|
|
19523
|
-
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
|
19524
|
-
var u3 = e2.split("-");
|
|
19525
|
-
if (!i3 && u3.length > 1) return t3(u3[0]);
|
|
19526
|
-
} else {
|
|
19527
|
-
var a3 = e2.name;
|
|
19528
|
-
D2[a3] = e2, i3 = a3;
|
|
19406
|
+
function tableQueryParamsToHasuraClauses({
|
|
19407
|
+
page,
|
|
19408
|
+
pageSize,
|
|
19409
|
+
searchTerm,
|
|
19410
|
+
filters,
|
|
19411
|
+
order: order2,
|
|
19412
|
+
schema,
|
|
19413
|
+
// Add schema as a parameter
|
|
19414
|
+
additionalFilter
|
|
19415
|
+
}) {
|
|
19416
|
+
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19417
|
+
let where = {};
|
|
19418
|
+
const order_by = {};
|
|
19419
|
+
const limit = pageSize || 25;
|
|
19420
|
+
const offset3 = page && pageSize ? (page - 1) * pageSize : 0;
|
|
19421
|
+
if (searchTerm) {
|
|
19422
|
+
const searchTermFilters = [];
|
|
19423
|
+
schema.fields.forEach((field) => {
|
|
19424
|
+
const { type: type2, path: path2, searchDisabled } = field;
|
|
19425
|
+
if (searchDisabled || field.filterDisabled || type2 === "color") return;
|
|
19426
|
+
const filterValue = searchTerm;
|
|
19427
|
+
if (type2 === "string" || type2 === "lookup") {
|
|
19428
|
+
const o2 = set$1({}, path2, { _ilike: `%${filterValue}%` });
|
|
19429
|
+
searchTermFilters.push(o2);
|
|
19430
|
+
} else if (type2 === "boolean") {
|
|
19431
|
+
let regex;
|
|
19432
|
+
try {
|
|
19433
|
+
regex = new RegExp("^" + searchTerm, "ig");
|
|
19434
|
+
} catch (error) {
|
|
19529
19435
|
}
|
|
19530
|
-
|
|
19531
|
-
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
};
|
|
19539
|
-
var _2 = function() {
|
|
19540
|
-
function M3(t3) {
|
|
19541
|
-
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
|
19436
|
+
if (regex) {
|
|
19437
|
+
if ("true".replace(regex, "") !== "true") {
|
|
19438
|
+
const o2 = set$1({}, path2, { _eq: true });
|
|
19439
|
+
searchTermFilters.push(o2);
|
|
19440
|
+
} else if ("false".replace(regex, "") !== "false") {
|
|
19441
|
+
const o2 = set$1({}, path2, { _eq: false });
|
|
19442
|
+
searchTermFilters.push(o2);
|
|
19443
|
+
}
|
|
19542
19444
|
}
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19554
|
-
|
|
19555
|
-
|
|
19445
|
+
} else if ((type2 === "number" || type2 === "integer") && !isNaN(filterValue)) {
|
|
19446
|
+
const o2 = set$1({}, path2, { _eq: parseFloat(filterValue) });
|
|
19447
|
+
searchTermFilters.push(o2);
|
|
19448
|
+
}
|
|
19449
|
+
});
|
|
19450
|
+
if (searchTermFilters.length > 0) {
|
|
19451
|
+
if (Object.keys(where).length > 0) {
|
|
19452
|
+
where = { _and: [where, { _or: searchTermFilters }] };
|
|
19453
|
+
} else {
|
|
19454
|
+
where = { _or: searchTermFilters };
|
|
19455
|
+
}
|
|
19456
|
+
}
|
|
19457
|
+
}
|
|
19458
|
+
if (filters && filters.length > 0) {
|
|
19459
|
+
const filterClauses = filters.map((filter2) => {
|
|
19460
|
+
let { selectedFilter, filterOn, filterValue } = filter2;
|
|
19461
|
+
const fieldSchema = ccFields[filterOn] || {};
|
|
19462
|
+
const { path: path2, reference: reference2, type: type2 } = fieldSchema;
|
|
19463
|
+
let stringFilterValue = filterValue && filterValue.toString ? filterValue.toString() : filterValue;
|
|
19464
|
+
if (stringFilterValue === false) {
|
|
19465
|
+
stringFilterValue = "false";
|
|
19466
|
+
} else {
|
|
19467
|
+
stringFilterValue = stringFilterValue || "";
|
|
19468
|
+
}
|
|
19469
|
+
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split(";");
|
|
19470
|
+
if (type2 === "number" || type2 === "integer") {
|
|
19471
|
+
filterValue = Array.isArray(filterValue) ? filterValue.map((val) => Number(val)) : Number(filterValue);
|
|
19472
|
+
}
|
|
19473
|
+
if (fieldSchema.normalizeFilter) {
|
|
19474
|
+
filterValue = fieldSchema.normalizeFilter(
|
|
19475
|
+
filterValue,
|
|
19476
|
+
selectedFilter,
|
|
19477
|
+
filterOn
|
|
19478
|
+
);
|
|
19479
|
+
}
|
|
19480
|
+
if (reference2) {
|
|
19481
|
+
filterOn = reference2.sourceField;
|
|
19482
|
+
} else {
|
|
19483
|
+
filterOn = path2 || filterOn;
|
|
19484
|
+
}
|
|
19485
|
+
switch (selectedFilter) {
|
|
19486
|
+
case "none":
|
|
19487
|
+
return {};
|
|
19488
|
+
case "startsWith":
|
|
19489
|
+
return { [filterOn]: { _ilike: `${filterValue}%` } };
|
|
19490
|
+
case "endsWith":
|
|
19491
|
+
return { [filterOn]: { _ilike: `%${filterValue}` } };
|
|
19492
|
+
case "contains":
|
|
19493
|
+
return { [filterOn]: { _ilike: `%${filterValue}%` } };
|
|
19494
|
+
case "notContains":
|
|
19495
|
+
return { [filterOn]: { _not_ilike: `%${filterValue}%` } };
|
|
19496
|
+
case "isExactly":
|
|
19497
|
+
return { [filterOn]: { _eq: filterValue } };
|
|
19498
|
+
case "isEmpty":
|
|
19499
|
+
return {
|
|
19500
|
+
_or: [
|
|
19501
|
+
{ [filterOn]: { _eq: "" } },
|
|
19502
|
+
{ [filterOn]: { _is_null: true } }
|
|
19503
|
+
]
|
|
19504
|
+
};
|
|
19505
|
+
case "notEmpty":
|
|
19506
|
+
return {
|
|
19507
|
+
_and: [
|
|
19508
|
+
{ [filterOn]: { _neq: "" } },
|
|
19509
|
+
{ [filterOn]: { _is_null: false } }
|
|
19510
|
+
]
|
|
19511
|
+
};
|
|
19512
|
+
case "inList":
|
|
19513
|
+
return { [filterOn]: { _in: filterValue } };
|
|
19514
|
+
case "notInList":
|
|
19515
|
+
return { [filterOn]: { _nin: filterValue } };
|
|
19516
|
+
case "true":
|
|
19517
|
+
return { [filterOn]: { _eq: true } };
|
|
19518
|
+
case "false":
|
|
19519
|
+
return { [filterOn]: { _eq: false } };
|
|
19520
|
+
case "dateIs":
|
|
19521
|
+
return { [filterOn]: { _eq: filterValue } };
|
|
19522
|
+
case "notBetween":
|
|
19523
|
+
return {
|
|
19524
|
+
_or: [
|
|
19525
|
+
{
|
|
19526
|
+
[filterOn]: {
|
|
19527
|
+
_lt: new Date(arrayFilterValue[0])
|
|
19528
|
+
}
|
|
19529
|
+
},
|
|
19530
|
+
{
|
|
19531
|
+
[filterOn]: {
|
|
19532
|
+
_gt: new Date(
|
|
19533
|
+
new Date(arrayFilterValue[1]).setHours(23, 59)
|
|
19534
|
+
)
|
|
19535
|
+
}
|
|
19556
19536
|
}
|
|
19537
|
+
]
|
|
19538
|
+
};
|
|
19539
|
+
case "isBetween":
|
|
19540
|
+
return {
|
|
19541
|
+
[filterOn]: {
|
|
19542
|
+
_gte: new Date(arrayFilterValue[0]),
|
|
19543
|
+
_lte: new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
19557
19544
|
}
|
|
19558
|
-
return new Date(e2);
|
|
19559
|
-
}(t3), this.init();
|
|
19560
|
-
}, m3.init = function() {
|
|
19561
|
-
var t3 = this.$d;
|
|
19562
|
-
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
|
19563
|
-
}, m3.$utils = function() {
|
|
19564
|
-
return b2;
|
|
19565
|
-
}, m3.isValid = function() {
|
|
19566
|
-
return !(this.$d.toString() === l2);
|
|
19567
|
-
}, m3.isSame = function(t3, e2) {
|
|
19568
|
-
var n3 = O2(t3);
|
|
19569
|
-
return this.startOf(e2) <= n3 && n3 <= this.endOf(e2);
|
|
19570
|
-
}, m3.isAfter = function(t3, e2) {
|
|
19571
|
-
return O2(t3) < this.startOf(e2);
|
|
19572
|
-
}, m3.isBefore = function(t3, e2) {
|
|
19573
|
-
return this.endOf(e2) < O2(t3);
|
|
19574
|
-
}, m3.$g = function(t3, e2, n3) {
|
|
19575
|
-
return b2.u(t3) ? this[e2] : this.set(n3, t3);
|
|
19576
|
-
}, m3.unix = function() {
|
|
19577
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
19578
|
-
}, m3.valueOf = function() {
|
|
19579
|
-
return this.$d.getTime();
|
|
19580
|
-
}, m3.startOf = function(t3, e2) {
|
|
19581
|
-
var n3 = this, r3 = !!b2.u(e2) || e2, f3 = b2.p(t3), l3 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
19582
|
-
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e3, t4) : new Date(n3.$y, e3, t4), n3);
|
|
19583
|
-
return r3 ? i3 : i3.endOf(a2);
|
|
19584
|
-
}, "l"), $2 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
19585
|
-
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n3);
|
|
19586
|
-
}, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
|
19587
|
-
switch (f3) {
|
|
19588
|
-
case h2:
|
|
19589
|
-
return r3 ? l3(1, 0) : l3(31, 11);
|
|
19590
|
-
case c2:
|
|
19591
|
-
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
|
19592
|
-
case o2:
|
|
19593
|
-
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
|
19594
|
-
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
|
19595
|
-
case a2:
|
|
19596
|
-
case d2:
|
|
19597
|
-
return $2(v3 + "Hours", 0);
|
|
19598
|
-
case u2:
|
|
19599
|
-
return $2(v3 + "Minutes", 1);
|
|
19600
|
-
case s2:
|
|
19601
|
-
return $2(v3 + "Seconds", 2);
|
|
19602
|
-
case i2:
|
|
19603
|
-
return $2(v3 + "Milliseconds", 3);
|
|
19604
|
-
default:
|
|
19605
|
-
return this.clone();
|
|
19606
|
-
}
|
|
19607
|
-
}, m3.endOf = function(t3) {
|
|
19608
|
-
return this.startOf(t3, false);
|
|
19609
|
-
}, m3.$set = function(t3, e2) {
|
|
19610
|
-
var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a2 ? this.$D + (e2 - this.$W) : e2;
|
|
19611
|
-
if (o3 === c2 || o3 === h2) {
|
|
19612
|
-
var y3 = this.clone().set(d2, 1);
|
|
19613
|
-
y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
|
19614
|
-
} else l3 && this.$d[l3]($2);
|
|
19615
|
-
return this.init(), this;
|
|
19616
|
-
}, m3.set = function(t3, e2) {
|
|
19617
|
-
return this.clone().$set(t3, e2);
|
|
19618
|
-
}, m3.get = function(t3) {
|
|
19619
|
-
return this[b2.p(t3)]();
|
|
19620
|
-
}, m3.add = function(r3, f3) {
|
|
19621
|
-
var d3, l3 = this;
|
|
19622
|
-
r3 = Number(r3);
|
|
19623
|
-
var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t3) {
|
|
19624
|
-
var e2 = O2(l3);
|
|
19625
|
-
return b2.w(e2.date(e2.date() + Math.round(t3 * r3)), l3);
|
|
19626
|
-
}, "y");
|
|
19627
|
-
if ($2 === c2) return this.set(c2, this.$M + r3);
|
|
19628
|
-
if ($2 === h2) return this.set(h2, this.$y + r3);
|
|
19629
|
-
if ($2 === a2) return y3(1);
|
|
19630
|
-
if ($2 === o2) return y3(7);
|
|
19631
|
-
var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n2, d3[i2] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
|
|
19632
|
-
return b2.w(m4, this);
|
|
19633
|
-
}, m3.subtract = function(t3, e2) {
|
|
19634
|
-
return this.add(-1 * t3, e2);
|
|
19635
|
-
}, m3.format = function(t3) {
|
|
19636
|
-
var e2 = this, n3 = this.$locale();
|
|
19637
|
-
if (!this.isValid()) return n3.invalidDate || l2;
|
|
19638
|
-
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = /* @__PURE__ */ __name(function(t4, n4, i4, s4) {
|
|
19639
|
-
return t4 && (t4[n4] || t4(e2, r3)) || i4[n4].slice(0, s4);
|
|
19640
|
-
}, "h"), d3 = /* @__PURE__ */ __name(function(t4) {
|
|
19641
|
-
return b2.s(s3 % 12 || 12, t4, "0");
|
|
19642
|
-
}, "d"), $2 = f3 || function(t4, e3, n4) {
|
|
19643
|
-
var r4 = t4 < 12 ? "AM" : "PM";
|
|
19644
|
-
return n4 ? r4.toLowerCase() : r4;
|
|
19645
19545
|
};
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
case "H":
|
|
19674
|
-
return String(s3);
|
|
19675
|
-
case "HH":
|
|
19676
|
-
return b2.s(s3, 2, "0");
|
|
19677
|
-
case "h":
|
|
19678
|
-
return d3(1);
|
|
19679
|
-
case "hh":
|
|
19680
|
-
return d3(2);
|
|
19681
|
-
case "a":
|
|
19682
|
-
return $2(s3, u3, true);
|
|
19683
|
-
case "A":
|
|
19684
|
-
return $2(s3, u3, false);
|
|
19685
|
-
case "m":
|
|
19686
|
-
return String(u3);
|
|
19687
|
-
case "mm":
|
|
19688
|
-
return b2.s(u3, 2, "0");
|
|
19689
|
-
case "s":
|
|
19690
|
-
return String(e2.$s);
|
|
19691
|
-
case "ss":
|
|
19692
|
-
return b2.s(e2.$s, 2, "0");
|
|
19693
|
-
case "SSS":
|
|
19694
|
-
return b2.s(e2.$ms, 3, "0");
|
|
19695
|
-
case "Z":
|
|
19696
|
-
return i3;
|
|
19546
|
+
case "isBefore":
|
|
19547
|
+
return { [filterOn]: { _lt: new Date(filterValue) } };
|
|
19548
|
+
case "isAfter":
|
|
19549
|
+
return { [filterOn]: { _gt: new Date(filterValue) } };
|
|
19550
|
+
case "greaterThan":
|
|
19551
|
+
return { [filterOn]: { _gt: parseFloat(filterValue) } };
|
|
19552
|
+
case "lessThan":
|
|
19553
|
+
return { [filterOn]: { _lt: parseFloat(filterValue) } };
|
|
19554
|
+
case "inRange":
|
|
19555
|
+
return {
|
|
19556
|
+
[filterOn]: {
|
|
19557
|
+
_gte: parseFloat(arrayFilterValue[0]),
|
|
19558
|
+
_lte: parseFloat(arrayFilterValue[1])
|
|
19559
|
+
}
|
|
19560
|
+
};
|
|
19561
|
+
case "outsideRange":
|
|
19562
|
+
return {
|
|
19563
|
+
_or: [
|
|
19564
|
+
{
|
|
19565
|
+
[filterOn]: {
|
|
19566
|
+
_lt: parseFloat(arrayFilterValue[0])
|
|
19567
|
+
}
|
|
19568
|
+
},
|
|
19569
|
+
{
|
|
19570
|
+
[filterOn]: {
|
|
19571
|
+
_gt: parseFloat(arrayFilterValue[1])
|
|
19572
|
+
}
|
|
19697
19573
|
}
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
|
|
19703
|
-
|
|
19704
|
-
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19708
|
-
|
|
19709
|
-
|
|
19574
|
+
]
|
|
19575
|
+
};
|
|
19576
|
+
case "equalTo":
|
|
19577
|
+
return {
|
|
19578
|
+
[filterOn]: {
|
|
19579
|
+
_eq: type2 === "number" || type2 === "integer" ? parseFloat(filterValue) : filterValue
|
|
19580
|
+
}
|
|
19581
|
+
};
|
|
19582
|
+
case "regex":
|
|
19583
|
+
return { [filterOn]: { _regex: filterValue } };
|
|
19584
|
+
default:
|
|
19585
|
+
console.warn(`Unsupported filter type: ${selectedFilter}`);
|
|
19586
|
+
return {};
|
|
19587
|
+
}
|
|
19588
|
+
}).map((filter2) => {
|
|
19589
|
+
const o2 = {};
|
|
19590
|
+
set$1(o2, Object.keys(filter2)[0], filter2[Object.keys(filter2)[0]]);
|
|
19591
|
+
return o2;
|
|
19592
|
+
});
|
|
19593
|
+
if (filterClauses.length > 0) {
|
|
19594
|
+
if (Object.keys(where).length > 0) {
|
|
19595
|
+
where = { _and: [where, ...filterClauses] };
|
|
19596
|
+
} else {
|
|
19597
|
+
where = { _and: filterClauses };
|
|
19598
|
+
}
|
|
19599
|
+
}
|
|
19600
|
+
}
|
|
19601
|
+
if (order2 && order2.length > 0) {
|
|
19602
|
+
order2.forEach((item) => {
|
|
19603
|
+
const field = item.startsWith("-") ? item.substring(1) : item;
|
|
19604
|
+
const direction = item.startsWith("-") ? "desc" : "asc";
|
|
19605
|
+
order_by[field] = direction;
|
|
19606
|
+
});
|
|
19607
|
+
}
|
|
19608
|
+
if (additionalFilter) {
|
|
19609
|
+
where = { _and: [where, additionalFilter] };
|
|
19610
|
+
}
|
|
19611
|
+
return { where, order_by, limit, offset: offset3 };
|
|
19612
|
+
}
|
|
19613
|
+
__name(tableQueryParamsToHasuraClauses, "tableQueryParamsToHasuraClauses");
|
|
19614
|
+
function getFieldsMappedByCCDisplayName(schema) {
|
|
19615
|
+
if (!schema || !schema.fields) return {};
|
|
19616
|
+
return schema.fields.reduce((acc, field) => {
|
|
19617
|
+
const ccDisplayName = getCCDisplayName(field);
|
|
19618
|
+
acc[ccDisplayName] = field;
|
|
19619
|
+
return acc;
|
|
19620
|
+
}, {});
|
|
19621
|
+
}
|
|
19622
|
+
__name(getFieldsMappedByCCDisplayName, "getFieldsMappedByCCDisplayName");
|
|
19623
|
+
function getCCDisplayName(field) {
|
|
19624
|
+
return camelCase(
|
|
19625
|
+
typeof field.displayName === "string" ? field.displayName : field.path
|
|
19626
|
+
);
|
|
19627
|
+
}
|
|
19628
|
+
__name(getCCDisplayName, "getCCDisplayName");
|
|
19629
|
+
function filterLocalEntitiesToHasura(records, { where, order_by, limit, offset: offset3, isInfinite } = {}) {
|
|
19630
|
+
let filteredRecords = [...records];
|
|
19631
|
+
if (where) {
|
|
19632
|
+
filteredRecords = applyWhereClause(filteredRecords, where);
|
|
19633
|
+
}
|
|
19634
|
+
if (order_by) {
|
|
19635
|
+
filteredRecords = applyOrderBy(filteredRecords, order_by);
|
|
19636
|
+
}
|
|
19637
|
+
const allFilteredRecords = [...filteredRecords];
|
|
19638
|
+
if (!isInfinite && offset3 !== void 0) {
|
|
19639
|
+
filteredRecords = filteredRecords.slice(offset3);
|
|
19640
|
+
}
|
|
19641
|
+
if (!isInfinite && limit !== void 0) {
|
|
19642
|
+
filteredRecords = filteredRecords.slice(0, limit);
|
|
19643
|
+
}
|
|
19644
|
+
return {
|
|
19645
|
+
entities: filteredRecords,
|
|
19646
|
+
entitiesAcrossPages: allFilteredRecords,
|
|
19647
|
+
entityCount: allFilteredRecords.length
|
|
19648
|
+
};
|
|
19649
|
+
}
|
|
19650
|
+
__name(filterLocalEntitiesToHasura, "filterLocalEntitiesToHasura");
|
|
19651
|
+
function applyWhereClause(records, where) {
|
|
19652
|
+
function applyFilter(record, filter2) {
|
|
19653
|
+
if (isEmpty$1(filter2)) {
|
|
19654
|
+
return true;
|
|
19655
|
+
}
|
|
19656
|
+
for (const key in filter2) {
|
|
19657
|
+
if (key === "_and") {
|
|
19658
|
+
if (isEmpty$1(filter2[key])) {
|
|
19659
|
+
continue;
|
|
19660
|
+
}
|
|
19661
|
+
if (!every(filter2[key], (subFilter) => applyFilter(record, subFilter))) {
|
|
19662
|
+
return false;
|
|
19663
|
+
}
|
|
19664
|
+
} else if (key === "_or") {
|
|
19665
|
+
if (isEmpty$1(filter2[key])) {
|
|
19666
|
+
continue;
|
|
19667
|
+
}
|
|
19668
|
+
if (!some(filter2[key], (subFilter) => applyFilter(record, subFilter))) {
|
|
19669
|
+
return false;
|
|
19670
|
+
}
|
|
19671
|
+
} else if (key === "_not") {
|
|
19672
|
+
if (applyFilter(record, filter2[key])) {
|
|
19673
|
+
return false;
|
|
19674
|
+
}
|
|
19675
|
+
} else {
|
|
19676
|
+
const value = record[key];
|
|
19677
|
+
const conditions = filter2[key];
|
|
19678
|
+
if (isObject$2(value) && isObject$2(conditions) && !hasOperator(conditions)) {
|
|
19679
|
+
return applyFilter(value, conditions);
|
|
19680
|
+
}
|
|
19681
|
+
for (const operator in conditions) {
|
|
19682
|
+
const conditionValue = conditions[operator];
|
|
19683
|
+
if (operator === "_gt" && conditions._lt) {
|
|
19684
|
+
if (!(value > conditionValue && value < conditions._lt))
|
|
19685
|
+
return false;
|
|
19686
|
+
continue;
|
|
19687
|
+
}
|
|
19688
|
+
if (operator === "_gte" && conditions._lte) {
|
|
19689
|
+
if (!(value >= conditionValue && value <= conditions._lte))
|
|
19690
|
+
return false;
|
|
19691
|
+
continue;
|
|
19692
|
+
}
|
|
19693
|
+
switch (operator) {
|
|
19694
|
+
case "_eq":
|
|
19695
|
+
if (!isEqual(value, conditionValue)) return false;
|
|
19710
19696
|
break;
|
|
19711
|
-
case
|
|
19712
|
-
|
|
19697
|
+
case "_neq":
|
|
19698
|
+
if (isEqual(value, conditionValue)) return false;
|
|
19713
19699
|
break;
|
|
19714
|
-
case
|
|
19715
|
-
|
|
19700
|
+
case "_gt":
|
|
19701
|
+
if (!(value > conditionValue)) return false;
|
|
19716
19702
|
break;
|
|
19717
|
-
case
|
|
19718
|
-
|
|
19703
|
+
case "_gte":
|
|
19704
|
+
if (!(value >= conditionValue)) return false;
|
|
19719
19705
|
break;
|
|
19720
|
-
case
|
|
19721
|
-
|
|
19706
|
+
case "_lt":
|
|
19707
|
+
if (!(value < conditionValue)) return false;
|
|
19722
19708
|
break;
|
|
19723
|
-
case
|
|
19724
|
-
|
|
19709
|
+
case "_lte":
|
|
19710
|
+
if (!(value <= conditionValue)) return false;
|
|
19725
19711
|
break;
|
|
19726
|
-
case
|
|
19727
|
-
$
|
|
19712
|
+
case "_like":
|
|
19713
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19714
|
+
return false;
|
|
19728
19715
|
break;
|
|
19729
|
-
case
|
|
19730
|
-
$
|
|
19716
|
+
case "_ilike":
|
|
19717
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*"), "i").test(value))
|
|
19718
|
+
return false;
|
|
19719
|
+
break;
|
|
19720
|
+
case "_nlike":
|
|
19721
|
+
if (!isString$1(value) || new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19722
|
+
return false;
|
|
19723
|
+
break;
|
|
19724
|
+
case "_nilike":
|
|
19725
|
+
if (!isString$1(value) || new RegExp(conditionValue.replace(/%/g, ".*"), "i").test(value))
|
|
19726
|
+
return false;
|
|
19727
|
+
break;
|
|
19728
|
+
case "_starts_with":
|
|
19729
|
+
if (!isString$1(value) || !value.startsWith(conditionValue))
|
|
19730
|
+
return false;
|
|
19731
|
+
break;
|
|
19732
|
+
case "_ends_with":
|
|
19733
|
+
if (!isString$1(value) || !value.endsWith(conditionValue))
|
|
19734
|
+
return false;
|
|
19735
|
+
break;
|
|
19736
|
+
case "_is_null":
|
|
19737
|
+
if (conditionValue && !isNull(value) || !conditionValue && isNull(value))
|
|
19738
|
+
return false;
|
|
19739
|
+
break;
|
|
19740
|
+
case "_contains":
|
|
19741
|
+
if (!isArray$2(value) || !every(conditionValue, (item) => includes(value, item)))
|
|
19742
|
+
return false;
|
|
19743
|
+
break;
|
|
19744
|
+
case "_contained_in":
|
|
19745
|
+
if (!isArray$2(value) || !every(value, (item) => includes(conditionValue, item)))
|
|
19746
|
+
return false;
|
|
19747
|
+
break;
|
|
19748
|
+
case "_has_key":
|
|
19749
|
+
if (!isObject$2(value) || !has$1(value, conditionValue)) return false;
|
|
19750
|
+
break;
|
|
19751
|
+
case "_has_keys_any":
|
|
19752
|
+
if (!isObject$2(value) || !some(conditionValue, (item) => has$1(value, item)))
|
|
19753
|
+
return false;
|
|
19754
|
+
break;
|
|
19755
|
+
case "_has_keys_all":
|
|
19756
|
+
if (!isObject$2(value) || !every(conditionValue, (item) => has$1(value, item)))
|
|
19757
|
+
return false;
|
|
19758
|
+
break;
|
|
19759
|
+
case "_similar":
|
|
19760
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19761
|
+
return false;
|
|
19731
19762
|
break;
|
|
19732
19763
|
default:
|
|
19733
|
-
|
|
19764
|
+
if (operator.startsWith("_")) {
|
|
19765
|
+
console.warn(`Unsupported operator: ${operator}`);
|
|
19766
|
+
return false;
|
|
19767
|
+
} else {
|
|
19768
|
+
console.warn(`Unsupported operator: ${operator}`);
|
|
19769
|
+
return false;
|
|
19770
|
+
}
|
|
19734
19771
|
}
|
|
19735
|
-
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
|
|
19740
|
-
|
|
19741
|
-
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
-
|
|
19745
|
-
|
|
19746
|
-
|
|
19747
|
-
|
|
19748
|
-
|
|
19749
|
-
|
|
19750
|
-
|
|
19751
|
-
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19755
|
-
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19765
|
-
}
|
|
19766
|
-
}
|
|
19767
|
-
|
|
19768
|
-
}
|
|
19769
|
-
__name(
|
|
19770
|
-
|
|
19771
|
-
|
|
19772
|
+
}
|
|
19773
|
+
}
|
|
19774
|
+
}
|
|
19775
|
+
return true;
|
|
19776
|
+
}
|
|
19777
|
+
__name(applyFilter, "applyFilter");
|
|
19778
|
+
function hasOperator(obj) {
|
|
19779
|
+
return Object.keys(obj).some((key) => key.startsWith("_"));
|
|
19780
|
+
}
|
|
19781
|
+
__name(hasOperator, "hasOperator");
|
|
19782
|
+
return records.filter((record) => applyFilter(record, where));
|
|
19783
|
+
}
|
|
19784
|
+
__name(applyWhereClause, "applyWhereClause");
|
|
19785
|
+
function applyOrderBy(records, order_by) {
|
|
19786
|
+
const keys2 = Object.keys(order_by);
|
|
19787
|
+
if (keys2.length > 0) {
|
|
19788
|
+
const field = keys2[0];
|
|
19789
|
+
const direction = order_by[field] === "asc" ? "asc" : "desc";
|
|
19790
|
+
return orderBy$1(records, [field], [direction]);
|
|
19791
|
+
}
|
|
19792
|
+
return records;
|
|
19793
|
+
}
|
|
19794
|
+
__name(applyOrderBy, "applyOrderBy");
|
|
19795
|
+
function initializeHasuraWhereAndFilter(additionalFilter, where = {}, currentParams) {
|
|
19796
|
+
where._and = where._and || [];
|
|
19797
|
+
where._or = where._or || [];
|
|
19798
|
+
if (typeof additionalFilter === "function") {
|
|
19799
|
+
const newWhere = additionalFilter(where, currentParams);
|
|
19800
|
+
if (newWhere) {
|
|
19801
|
+
where = __spreadValues(__spreadValues({}, where), newWhere);
|
|
19802
|
+
}
|
|
19803
|
+
} else if (typeof additionalFilter === "object")
|
|
19804
|
+
where._and.push(additionalFilter);
|
|
19805
|
+
}
|
|
19806
|
+
__name(initializeHasuraWhereAndFilter, "initializeHasuraWhereAndFilter");
|
|
19807
|
+
const addCustomColumnFilters = /* @__PURE__ */ __name((where, fields, currentParams) => {
|
|
19808
|
+
fields.forEach((field) => {
|
|
19809
|
+
const { customColumnFilter, filterDisabled } = field;
|
|
19810
|
+
if (filterDisabled || !customColumnFilter) return;
|
|
19811
|
+
customColumnFilter(where, currentParams);
|
|
19812
|
+
});
|
|
19813
|
+
}, "addCustomColumnFilters");
|
|
19772
19814
|
const defaultPageSizes = [5, 10, 15, 25, 50, 100, 200, 400];
|
|
19773
19815
|
function safeStringify(val) {
|
|
19774
19816
|
if (val !== null && typeof val === "object") {
|
|
@@ -19785,325 +19827,6 @@ function safeParse(val) {
|
|
|
19785
19827
|
}
|
|
19786
19828
|
}
|
|
19787
19829
|
__name(safeParse, "safeParse");
|
|
19788
|
-
function getCCDisplayName(field) {
|
|
19789
|
-
return camelCase(
|
|
19790
|
-
typeof field.displayName === "string" ? field.displayName : field.path
|
|
19791
|
-
);
|
|
19792
|
-
}
|
|
19793
|
-
__name(getCCDisplayName, "getCCDisplayName");
|
|
19794
|
-
function getFieldsMappedByCCDisplayName(schema) {
|
|
19795
|
-
return schema.fields.reduce((acc, field) => {
|
|
19796
|
-
const ccDisplayName = getCCDisplayName(field);
|
|
19797
|
-
acc[ccDisplayName] = field;
|
|
19798
|
-
return acc;
|
|
19799
|
-
}, {});
|
|
19800
|
-
}
|
|
19801
|
-
__name(getFieldsMappedByCCDisplayName, "getFieldsMappedByCCDisplayName");
|
|
19802
|
-
function orderEntitiesLocal(orderArray, entities, schema, ownProps) {
|
|
19803
|
-
if (orderArray == null ? void 0 : orderArray.length) {
|
|
19804
|
-
const orderFuncs = [];
|
|
19805
|
-
const ascOrDescArray = [];
|
|
19806
|
-
orderArray.forEach((order2) => {
|
|
19807
|
-
const ccDisplayName = order2.replace(/^-/gi, "");
|
|
19808
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19809
|
-
const field = ccFields[ccDisplayName];
|
|
19810
|
-
if (!field) {
|
|
19811
|
-
throw new Error(
|
|
19812
|
-
"Ruh roh, there should have been a column to sort on for " + order2 + " but none was found in " + schema.fields
|
|
19813
|
-
);
|
|
19814
|
-
}
|
|
19815
|
-
const { path: path2, getValueToFilterOn, sortFn } = field;
|
|
19816
|
-
if (field.type === "timestamp") {
|
|
19817
|
-
ascOrDescArray.push("desc");
|
|
19818
|
-
}
|
|
19819
|
-
ascOrDescArray.push(ccDisplayName === order2 ? "asc" : "desc");
|
|
19820
|
-
if (field.type === "timestamp") {
|
|
19821
|
-
orderFuncs.push((r2) => {
|
|
19822
|
-
const val = get$3(r2, path2);
|
|
19823
|
-
return !!val;
|
|
19824
|
-
});
|
|
19825
|
-
}
|
|
19826
|
-
if (path2 && endsWith$1(path2.toLowerCase(), "id")) {
|
|
19827
|
-
orderFuncs.push((o2) => {
|
|
19828
|
-
return parseInt(get$3(o2, path2), 10);
|
|
19829
|
-
});
|
|
19830
|
-
} else if (sortFn) {
|
|
19831
|
-
const toOrder = Array.isArray(sortFn) ? sortFn : [sortFn];
|
|
19832
|
-
orderFuncs.push(...toOrder);
|
|
19833
|
-
} else if (getValueToFilterOn) {
|
|
19834
|
-
orderFuncs.push((o2) => {
|
|
19835
|
-
return getValueToFilterOn(o2, ownProps);
|
|
19836
|
-
});
|
|
19837
|
-
} else {
|
|
19838
|
-
orderFuncs.push((r2) => {
|
|
19839
|
-
const val = get$3(r2, path2);
|
|
19840
|
-
return val && val.toLowerCase ? val.toLowerCase() : val;
|
|
19841
|
-
});
|
|
19842
|
-
}
|
|
19843
|
-
});
|
|
19844
|
-
entities = orderBy$1(entities, orderFuncs, ascOrDescArray);
|
|
19845
|
-
}
|
|
19846
|
-
return entities;
|
|
19847
|
-
}
|
|
19848
|
-
__name(orderEntitiesLocal, "orderEntitiesLocal");
|
|
19849
|
-
function getAndAndOrFilters(allFilters) {
|
|
19850
|
-
const orFilters = [];
|
|
19851
|
-
const andFilters = [];
|
|
19852
|
-
const otherOrFilters = [];
|
|
19853
|
-
allFilters.forEach((filter2) => {
|
|
19854
|
-
if (filter2.isOrFilter && typeof filter2.filterValue === "string" && filter2.filterValue.includes(",")) {
|
|
19855
|
-
const allFilterValues = filter2.filterValue.split(",");
|
|
19856
|
-
allFilterValues.forEach((filterValue, i2) => {
|
|
19857
|
-
filterValue = filterValue.trim();
|
|
19858
|
-
if (!filterValue) return;
|
|
19859
|
-
const newFilter = __spreadProps(__spreadValues({}, filter2), {
|
|
19860
|
-
filterValue
|
|
19861
|
-
});
|
|
19862
|
-
if (i2 === 0) {
|
|
19863
|
-
orFilters.push(newFilter);
|
|
19864
|
-
} else {
|
|
19865
|
-
const iMinus = i2 - 1;
|
|
19866
|
-
if (!otherOrFilters[iMinus]) otherOrFilters[iMinus] = [];
|
|
19867
|
-
otherOrFilters[iMinus].push(newFilter);
|
|
19868
|
-
}
|
|
19869
|
-
});
|
|
19870
|
-
} else if (filter2.isOrFilter) {
|
|
19871
|
-
orFilters.push(filter2);
|
|
19872
|
-
} else {
|
|
19873
|
-
andFilters.push(filter2);
|
|
19874
|
-
}
|
|
19875
|
-
});
|
|
19876
|
-
return {
|
|
19877
|
-
orFilters,
|
|
19878
|
-
andFilters,
|
|
19879
|
-
otherOrFilters
|
|
19880
|
-
};
|
|
19881
|
-
}
|
|
19882
|
-
__name(getAndAndOrFilters, "getAndAndOrFilters");
|
|
19883
|
-
function filterEntitiesLocal(filters = [], searchTerm, entities, schema, ownProps) {
|
|
19884
|
-
const allFilters = getAllFilters(filters, searchTerm, schema);
|
|
19885
|
-
if (allFilters.length) {
|
|
19886
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19887
|
-
const { andFilters, orFilters, otherOrFilters } = getAndAndOrFilters(allFilters);
|
|
19888
|
-
andFilters.forEach((filter2) => {
|
|
19889
|
-
entities = getEntitiesForGivenFilter(
|
|
19890
|
-
entities,
|
|
19891
|
-
filter2,
|
|
19892
|
-
ccFields,
|
|
19893
|
-
ownProps
|
|
19894
|
-
);
|
|
19895
|
-
});
|
|
19896
|
-
if (orFilters.length) {
|
|
19897
|
-
let orEntities = [];
|
|
19898
|
-
orFilters.concat(...otherOrFilters).forEach((filter2) => {
|
|
19899
|
-
orEntities = orEntities.concat(
|
|
19900
|
-
getEntitiesForGivenFilter(entities, filter2, ccFields, ownProps)
|
|
19901
|
-
);
|
|
19902
|
-
});
|
|
19903
|
-
entities = uniq(orEntities);
|
|
19904
|
-
}
|
|
19905
|
-
}
|
|
19906
|
-
return entities;
|
|
19907
|
-
}
|
|
19908
|
-
__name(filterEntitiesLocal, "filterEntitiesLocal");
|
|
19909
|
-
function cleanFilterValue(_filterValue, type2) {
|
|
19910
|
-
let filterValue = _filterValue;
|
|
19911
|
-
if (type2 === "number" || type2 === "integer") {
|
|
19912
|
-
filterValue = Array.isArray(filterValue) ? filterValue.map((val) => Number(val)) : Number(filterValue);
|
|
19913
|
-
}
|
|
19914
|
-
return filterValue;
|
|
19915
|
-
}
|
|
19916
|
-
__name(cleanFilterValue, "cleanFilterValue");
|
|
19917
|
-
function getEntitiesForGivenFilter(entities, filter2, ccFields, ownProps) {
|
|
19918
|
-
const { filterOn, filterValue: _filterValue, selectedFilter } = filter2;
|
|
19919
|
-
const field = ccFields[filterOn];
|
|
19920
|
-
const { path: path2, getValueToFilterOn } = field;
|
|
19921
|
-
const filterValue = cleanFilterValue(_filterValue, field.type);
|
|
19922
|
-
const subFilter = getSubFilter(false, selectedFilter, filterValue);
|
|
19923
|
-
entities = entities.filter((entity) => {
|
|
19924
|
-
const fieldVal = getValueToFilterOn ? getValueToFilterOn(entity, ownProps) : get$3(entity, path2);
|
|
19925
|
-
const shouldKeep = subFilter(fieldVal);
|
|
19926
|
-
return shouldKeep;
|
|
19927
|
-
});
|
|
19928
|
-
return entities;
|
|
19929
|
-
}
|
|
19930
|
-
__name(getEntitiesForGivenFilter, "getEntitiesForGivenFilter");
|
|
19931
|
-
function getFiltersFromSearchTerm(searchTerm, schema) {
|
|
19932
|
-
const searchTermFilters = [];
|
|
19933
|
-
if (searchTerm) {
|
|
19934
|
-
const sharedFields = {
|
|
19935
|
-
isOrFilter: true,
|
|
19936
|
-
isSearchTermFilter: true
|
|
19937
|
-
};
|
|
19938
|
-
schema.fields.forEach((field) => {
|
|
19939
|
-
const { type: type2, searchDisabled } = field;
|
|
19940
|
-
if (searchDisabled || field.filterDisabled || type2 === "color") return;
|
|
19941
|
-
const ccDisplayName = getCCDisplayName(field);
|
|
19942
|
-
const filterValue = cleanFilterValue(searchTerm, type2);
|
|
19943
|
-
if (type2 === "string" || type2 === "lookup") {
|
|
19944
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19945
|
-
filterOn: ccDisplayName,
|
|
19946
|
-
filterValue: searchTerm,
|
|
19947
|
-
selectedFilter: "contains"
|
|
19948
|
-
}));
|
|
19949
|
-
} else if (type2 === "boolean") {
|
|
19950
|
-
let regex;
|
|
19951
|
-
try {
|
|
19952
|
-
regex = new RegExp("^" + searchTerm, "ig");
|
|
19953
|
-
} catch (error) {
|
|
19954
|
-
}
|
|
19955
|
-
if (regex) {
|
|
19956
|
-
if ("true".replace(regex, "") !== "true") {
|
|
19957
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19958
|
-
filterOn: ccDisplayName,
|
|
19959
|
-
filterValue: true,
|
|
19960
|
-
selectedFilter: "true"
|
|
19961
|
-
}));
|
|
19962
|
-
} else if ("false".replace(regex, "") !== "false") {
|
|
19963
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19964
|
-
filterOn: ccDisplayName,
|
|
19965
|
-
filterValue: false,
|
|
19966
|
-
selectedFilter: "false"
|
|
19967
|
-
}));
|
|
19968
|
-
}
|
|
19969
|
-
}
|
|
19970
|
-
} else if ((type2 === "number" || type2 === "integer") && !isNaN(filterValue)) {
|
|
19971
|
-
if (type2 === "integer" && !isInteger(filterValue)) {
|
|
19972
|
-
return;
|
|
19973
|
-
}
|
|
19974
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19975
|
-
filterOn: ccDisplayName,
|
|
19976
|
-
filterValue,
|
|
19977
|
-
selectedFilter: "equalTo"
|
|
19978
|
-
}));
|
|
19979
|
-
}
|
|
19980
|
-
});
|
|
19981
|
-
}
|
|
19982
|
-
return searchTermFilters;
|
|
19983
|
-
}
|
|
19984
|
-
__name(getFiltersFromSearchTerm, "getFiltersFromSearchTerm");
|
|
19985
|
-
function getSubFilter(qb, selectedFilter, filterValue) {
|
|
19986
|
-
const ccSelectedFilter = camelCase(selectedFilter);
|
|
19987
|
-
let stringFilterValue = filterValue && filterValue.toString ? filterValue.toString() : filterValue;
|
|
19988
|
-
if (stringFilterValue === false) {
|
|
19989
|
-
stringFilterValue = "false";
|
|
19990
|
-
} else {
|
|
19991
|
-
stringFilterValue = stringFilterValue || "";
|
|
19992
|
-
}
|
|
19993
|
-
const filterValLower = stringFilterValue.toLowerCase && stringFilterValue.toLowerCase();
|
|
19994
|
-
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split(";");
|
|
19995
|
-
if (ccSelectedFilter === "startsWith") {
|
|
19996
|
-
return qb ? qb.startsWith(stringFilterValue) : (fieldVal) => {
|
|
19997
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19998
|
-
return startsWith(fieldVal.toLowerCase(), filterValLower);
|
|
19999
|
-
};
|
|
20000
|
-
} else if (ccSelectedFilter === "endsWith") {
|
|
20001
|
-
return qb ? qb.endsWith(stringFilterValue) : (fieldVal) => {
|
|
20002
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
20003
|
-
return endsWith$1(fieldVal.toLowerCase(), filterValLower);
|
|
20004
|
-
};
|
|
20005
|
-
} else if (ccSelectedFilter === "contains" || ccSelectedFilter === "notContains") {
|
|
20006
|
-
return qb ? ccSelectedFilter === "contains" ? qb.contains(stringFilterValue.replace(/_/g, "\\_")) : qb.notContains(stringFilterValue.replace(/_/g, "\\_")) : (fieldVal) => {
|
|
20007
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
20008
|
-
return ccSelectedFilter === "contains" ? fieldVal.toLowerCase().replace(filterValLower, "") !== fieldVal.toLowerCase() : fieldVal.toLowerCase().replace(filterValLower, "") === fieldVal.toLowerCase();
|
|
20009
|
-
};
|
|
20010
|
-
} else if (ccSelectedFilter === "inList") {
|
|
20011
|
-
return qb ? qb.inList(arrayFilterValue) : (fieldVal) => {
|
|
20012
|
-
if (!(fieldVal == null ? void 0 : fieldVal.toString)) return false;
|
|
20013
|
-
return arrayFilterValue.map((val) => {
|
|
20014
|
-
if (val) {
|
|
20015
|
-
if (val.toString) return val.toString().toLowerCase();
|
|
20016
|
-
return val.toLowerCase();
|
|
20017
|
-
}
|
|
20018
|
-
return void 0;
|
|
20019
|
-
}).indexOf(fieldVal.toString().toLowerCase()) > -1;
|
|
20020
|
-
};
|
|
20021
|
-
} else if (ccSelectedFilter === "notInList") {
|
|
20022
|
-
return qb ? qb.notInList(arrayFilterValue) : (fieldVal) => {
|
|
20023
|
-
if (!(fieldVal == null ? void 0 : fieldVal.toString)) return false;
|
|
20024
|
-
return arrayFilterValue.map((val) => {
|
|
20025
|
-
if (val) {
|
|
20026
|
-
if (val.toString) return val.toString().toLowerCase();
|
|
20027
|
-
return val.toLowerCase();
|
|
20028
|
-
}
|
|
20029
|
-
return void 0;
|
|
20030
|
-
}).indexOf(fieldVal.toString().toLowerCase()) === -1;
|
|
20031
|
-
};
|
|
20032
|
-
} else if (ccSelectedFilter === "isEmpty") {
|
|
20033
|
-
return qb ? qb.isEmpty() : (fieldVal) => {
|
|
20034
|
-
return !fieldVal;
|
|
20035
|
-
};
|
|
20036
|
-
} else if (ccSelectedFilter === "notEmpty") {
|
|
20037
|
-
return qb ? [qb.notNull(), qb.notEquals("")] : (fieldVal) => {
|
|
20038
|
-
return !!fieldVal;
|
|
20039
|
-
};
|
|
20040
|
-
} else if (ccSelectedFilter === "isExactly") {
|
|
20041
|
-
return qb ? filterValue : (fieldVal) => {
|
|
20042
|
-
return fieldVal === filterValue;
|
|
20043
|
-
};
|
|
20044
|
-
} else if (ccSelectedFilter === "true") {
|
|
20045
|
-
return qb ? qb.equals(true) : (fieldVal) => {
|
|
20046
|
-
return !!fieldVal;
|
|
20047
|
-
};
|
|
20048
|
-
} else if (ccSelectedFilter === "false") {
|
|
20049
|
-
return qb ? qb.equals(false) : (fieldVal) => {
|
|
20050
|
-
return !fieldVal;
|
|
20051
|
-
};
|
|
20052
|
-
} else if (ccSelectedFilter === "isBetween") {
|
|
20053
|
-
return qb ? qb.between(
|
|
20054
|
-
new Date(arrayFilterValue[0]),
|
|
20055
|
-
new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
20056
|
-
// set end of day for more accurate filtering
|
|
20057
|
-
) : (fieldVal) => {
|
|
20058
|
-
return dayjs(arrayFilterValue[0]).valueOf() <= dayjs(fieldVal).valueOf() && dayjs(fieldVal).valueOf() <= dayjs(arrayFilterValue[1]).valueOf();
|
|
20059
|
-
};
|
|
20060
|
-
} else if (ccSelectedFilter === "notBetween") {
|
|
20061
|
-
return qb ? qb.notBetween(
|
|
20062
|
-
new Date(arrayFilterValue[0]),
|
|
20063
|
-
new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
20064
|
-
// set end of day for more accurate filtering
|
|
20065
|
-
) : (fieldVal) => {
|
|
20066
|
-
return dayjs(arrayFilterValue[0]).valueOf() > dayjs(fieldVal).valueOf() || dayjs(fieldVal).valueOf() > dayjs(arrayFilterValue[1]).valueOf();
|
|
20067
|
-
};
|
|
20068
|
-
} else if (ccSelectedFilter === "isBefore") {
|
|
20069
|
-
return qb ? qb.lessThan(new Date(filterValue)) : (fieldVal) => {
|
|
20070
|
-
return dayjs(fieldVal).valueOf() < dayjs(filterValue).valueOf();
|
|
20071
|
-
};
|
|
20072
|
-
} else if (ccSelectedFilter === "isAfter") {
|
|
20073
|
-
return qb ? qb.greaterThan(new Date(new Date(filterValue).setHours(23, 59))) : (fieldVal) => {
|
|
20074
|
-
return dayjs(fieldVal).valueOf() > dayjs(filterValue).valueOf();
|
|
20075
|
-
};
|
|
20076
|
-
} else if (ccSelectedFilter === "greaterThan") {
|
|
20077
|
-
return qb ? qb.greaterThan(filterValue) : (fieldVal) => {
|
|
20078
|
-
return fieldVal > filterValue;
|
|
20079
|
-
};
|
|
20080
|
-
} else if (ccSelectedFilter === "lessThan") {
|
|
20081
|
-
return qb ? qb.lessThan(filterValue) : (fieldVal) => {
|
|
20082
|
-
return fieldVal < filterValue;
|
|
20083
|
-
};
|
|
20084
|
-
} else if (ccSelectedFilter === "inRange") {
|
|
20085
|
-
return qb ? qb.between(filterValue[0], filterValue[1]) : (fieldVal) => {
|
|
20086
|
-
return filterValue[0] <= fieldVal && fieldVal <= filterValue[1];
|
|
20087
|
-
};
|
|
20088
|
-
} else if (ccSelectedFilter === "outsideRange") {
|
|
20089
|
-
return qb ? qb.notBetween(filterValue[0], filterValue[1]) : (fieldVal) => {
|
|
20090
|
-
return filterValue[0] > fieldVal || fieldVal > filterValue[1];
|
|
20091
|
-
};
|
|
20092
|
-
} else if (ccSelectedFilter === "equalTo") {
|
|
20093
|
-
return qb ? filterValue : (fieldVal) => {
|
|
20094
|
-
return fieldVal === filterValue;
|
|
20095
|
-
};
|
|
20096
|
-
} else if (ccSelectedFilter === "regex") {
|
|
20097
|
-
return qb ? qb.matchesRegex(filterValue) : (fieldVal) => {
|
|
20098
|
-
new RegExp(filterValue).test(fieldVal);
|
|
20099
|
-
return fieldVal;
|
|
20100
|
-
};
|
|
20101
|
-
}
|
|
20102
|
-
throw new Error(
|
|
20103
|
-
`Unsupported filter ${selectedFilter}. Please make a new filter if you need one`
|
|
20104
|
-
);
|
|
20105
|
-
}
|
|
20106
|
-
__name(getSubFilter, "getSubFilter");
|
|
20107
19830
|
function getCurrentParamsFromUrl(location2, isSimple) {
|
|
20108
19831
|
let { search: search2 } = location2;
|
|
20109
19832
|
if (isSimple) {
|
|
@@ -20175,22 +19898,6 @@ function parseFilters(newParams) {
|
|
|
20175
19898
|
});
|
|
20176
19899
|
}
|
|
20177
19900
|
__name(parseFilters, "parseFilters");
|
|
20178
|
-
function buildRef(qb, reference2, searchField, expression) {
|
|
20179
|
-
if (reference2.reference) {
|
|
20180
|
-
return qb.related(reference2.target).whereAny({
|
|
20181
|
-
[reference2.sourceField]: buildRef(
|
|
20182
|
-
qb,
|
|
20183
|
-
reference2.reference,
|
|
20184
|
-
searchField,
|
|
20185
|
-
expression
|
|
20186
|
-
)
|
|
20187
|
-
});
|
|
20188
|
-
}
|
|
20189
|
-
return qb.related(reference2.target).whereAny({
|
|
20190
|
-
[searchField]: expression
|
|
20191
|
-
});
|
|
20192
|
-
}
|
|
20193
|
-
__name(buildRef, "buildRef");
|
|
20194
19901
|
function makeDataTableHandlers({
|
|
20195
19902
|
setNewParams,
|
|
20196
19903
|
defaults,
|
|
@@ -20278,40 +19985,18 @@ function makeDataTableHandlers({
|
|
|
20278
19985
|
};
|
|
20279
19986
|
}
|
|
20280
19987
|
__name(makeDataTableHandlers, "makeDataTableHandlers");
|
|
20281
|
-
function cleanupFilter(filter2) {
|
|
20282
|
-
let filterToUse = filter2;
|
|
20283
|
-
if (filterToUse.selectedFilter === "inList" && typeof filterToUse.filterValue === "number") {
|
|
20284
|
-
filterToUse = __spreadProps(__spreadValues({}, filterToUse), {
|
|
20285
|
-
filterValue: filterToUse.filterValue.toString()
|
|
20286
|
-
});
|
|
20287
|
-
}
|
|
20288
|
-
return filterToUse;
|
|
20289
|
-
}
|
|
20290
|
-
__name(cleanupFilter, "cleanupFilter");
|
|
20291
|
-
function getAllFilters(filters, searchTerm, schema) {
|
|
20292
|
-
let allFilters = [
|
|
20293
|
-
...filters,
|
|
20294
|
-
...getFiltersFromSearchTerm(searchTerm, schema)
|
|
20295
|
-
];
|
|
20296
|
-
allFilters = allFilters.filter((val) => {
|
|
20297
|
-
return val !== "";
|
|
20298
|
-
});
|
|
20299
|
-
return allFilters.map(cleanupFilter);
|
|
20300
|
-
}
|
|
20301
|
-
__name(getAllFilters, "getAllFilters");
|
|
20302
19988
|
function getQueryParams({
|
|
20303
19989
|
currentParams,
|
|
20304
|
-
urlConnected,
|
|
19990
|
+
// urlConnected,
|
|
20305
19991
|
defaults,
|
|
20306
19992
|
schema,
|
|
20307
19993
|
isInfinite,
|
|
20308
19994
|
entities,
|
|
20309
19995
|
isLocalCall,
|
|
20310
19996
|
additionalFilter,
|
|
20311
|
-
additionalOrFilter,
|
|
20312
19997
|
doNotCoercePageSize,
|
|
20313
19998
|
noOrderError,
|
|
20314
|
-
isCodeModel,
|
|
19999
|
+
// isCodeModel,
|
|
20315
20000
|
ownProps
|
|
20316
20001
|
}) {
|
|
20317
20002
|
Object.keys(currentParams).forEach(function(key) {
|
|
@@ -20334,232 +20019,65 @@ function getQueryParams({
|
|
|
20334
20019
|
)[0];
|
|
20335
20020
|
pageSize = closest;
|
|
20336
20021
|
}
|
|
20337
|
-
const
|
|
20022
|
+
const cleanedOrder = [];
|
|
20023
|
+
if (order2 && order2.length) {
|
|
20024
|
+
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
20025
|
+
order2.forEach((orderVal) => {
|
|
20026
|
+
const ccDisplayName = orderVal.replace(/^-/gi, "");
|
|
20027
|
+
const schemaForField = ccFields[ccDisplayName];
|
|
20028
|
+
if (schemaForField) {
|
|
20029
|
+
const { path: path2 } = schemaForField;
|
|
20030
|
+
const reversed = ccDisplayName !== orderVal;
|
|
20031
|
+
const prefix2 = reversed ? "-" : "";
|
|
20032
|
+
cleanedOrder.push(prefix2 + path2);
|
|
20033
|
+
} else {
|
|
20034
|
+
!noOrderError && console.error(
|
|
20035
|
+
"No schema for field found!",
|
|
20036
|
+
ccDisplayName,
|
|
20037
|
+
JSON.stringify(schema.fields, null, 2)
|
|
20038
|
+
);
|
|
20039
|
+
}
|
|
20040
|
+
});
|
|
20041
|
+
}
|
|
20042
|
+
let toRet = {
|
|
20338
20043
|
//these are values that might be generally useful for the wrapped component
|
|
20339
20044
|
page,
|
|
20340
20045
|
pageSize: ownProps.controlled_pageSize || pageSize,
|
|
20341
|
-
order:
|
|
20046
|
+
order: cleanedOrder,
|
|
20342
20047
|
filters,
|
|
20343
20048
|
searchTerm
|
|
20344
20049
|
};
|
|
20050
|
+
const { where, order_by, limit, offset: offset3 } = tableQueryParamsToHasuraClauses({
|
|
20051
|
+
page,
|
|
20052
|
+
pageSize,
|
|
20053
|
+
searchTerm,
|
|
20054
|
+
filters,
|
|
20055
|
+
order: cleanedOrder,
|
|
20056
|
+
schema
|
|
20057
|
+
});
|
|
20058
|
+
initializeHasuraWhereAndFilter(additionalFilter, where, currentParams);
|
|
20059
|
+
addCustomColumnFilters(where, schema.fields, currentParams);
|
|
20345
20060
|
if (isLocalCall) {
|
|
20346
|
-
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
newEntities = orderEntitiesLocal(order2, newEntities, schema, ownProps);
|
|
20355
|
-
const entitiesAcrossPages = newEntities;
|
|
20356
|
-
const newEntityCount = newEntities.length;
|
|
20357
|
-
if (!isInfinite && !ownProps.controlled_pageSize) {
|
|
20358
|
-
const offset3 = (page - 1) * pageSize;
|
|
20359
|
-
newEntities = take(drop(newEntities, offset3), pageSize);
|
|
20360
|
-
}
|
|
20361
|
-
toReturn.entities = newEntities;
|
|
20362
|
-
toReturn.entitiesAcrossPages = entitiesAcrossPages;
|
|
20363
|
-
toReturn.entityCount = newEntityCount;
|
|
20364
|
-
return toReturn;
|
|
20061
|
+
toRet = __spreadValues(__spreadValues({}, toRet), filterLocalEntitiesToHasura(entities, {
|
|
20062
|
+
where,
|
|
20063
|
+
order_by,
|
|
20064
|
+
limit,
|
|
20065
|
+
offset: offset3,
|
|
20066
|
+
isInfinite
|
|
20067
|
+
}));
|
|
20068
|
+
return toRet;
|
|
20365
20069
|
} else {
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
graphqlQueryParams.pageNumber = 1;
|
|
20373
|
-
} else {
|
|
20374
|
-
graphqlQueryParams.pageNumber = Number(page);
|
|
20375
|
-
graphqlQueryParams.pageSize = ownProps.controlled_pageSize || Number(pageSize);
|
|
20376
|
-
}
|
|
20377
|
-
const { model } = schema;
|
|
20378
|
-
if (!window.QueryBuilder) return toReturn;
|
|
20379
|
-
const qb = new window.QueryBuilder(model);
|
|
20380
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
20381
|
-
if (tableQueryParams.order && tableQueryParams.order.length) {
|
|
20382
|
-
tableQueryParams.order.forEach((orderVal) => {
|
|
20383
|
-
const ccDisplayName = orderVal.replace(/^-/gi, "");
|
|
20384
|
-
const schemaForField = ccFields[ccDisplayName];
|
|
20385
|
-
if (schemaForField) {
|
|
20386
|
-
const { path: path2 } = schemaForField;
|
|
20387
|
-
const reversed = ccDisplayName !== orderVal;
|
|
20388
|
-
const prefix2 = reversed ? "-" : "";
|
|
20389
|
-
graphqlQueryParams.sort = [
|
|
20390
|
-
...graphqlQueryParams.sort || [],
|
|
20391
|
-
prefix2 + path2
|
|
20392
|
-
];
|
|
20393
|
-
} else {
|
|
20394
|
-
!noOrderError && console.error(
|
|
20395
|
-
"No schema for field found!",
|
|
20396
|
-
ccDisplayName,
|
|
20397
|
-
JSON.stringify(schema.fields, null, 2)
|
|
20398
|
-
);
|
|
20399
|
-
}
|
|
20400
|
-
});
|
|
20401
|
-
}
|
|
20402
|
-
let errorParsingUrlString;
|
|
20403
|
-
const additionalFilterToUse = additionalFilter(qb, currentParams);
|
|
20404
|
-
let additionalOrFilterToUse = additionalOrFilter(qb, currentParams);
|
|
20405
|
-
if (additionalOrFilterToUse && additionalOrFilterToUse.ignoreSearchTerm) {
|
|
20406
|
-
searchTerm = "";
|
|
20407
|
-
additionalOrFilterToUse = additionalOrFilterToUse.additionalOrFilterToUse;
|
|
20408
|
-
}
|
|
20409
|
-
const allFilters = getAllFilters(filters, searchTerm, schema);
|
|
20410
|
-
const { andFilters, orFilters, otherOrFilters } = getAndAndOrFilters(allFilters);
|
|
20411
|
-
try {
|
|
20412
|
-
const flattenFilters = /* @__PURE__ */ __name((filterObj) => {
|
|
20413
|
-
return flatMap(Object.keys(filterObj), (key) => {
|
|
20414
|
-
return filterObj[key].map((filter2) => ({
|
|
20415
|
-
[key]: filter2
|
|
20416
|
-
}));
|
|
20417
|
-
});
|
|
20418
|
-
}, "flattenFilters");
|
|
20419
|
-
const orFiltersObject = getQueries(orFilters, qb, ccFields);
|
|
20420
|
-
let allOrFilters = flattenFilters(orFiltersObject);
|
|
20421
|
-
otherOrFilters.forEach((orFilters2) => {
|
|
20422
|
-
const otherOrFiltersObject = getQueries(orFilters2, qb, ccFields);
|
|
20423
|
-
allOrFilters = allOrFilters.concat(
|
|
20424
|
-
flattenFilters(otherOrFiltersObject)
|
|
20425
|
-
);
|
|
20426
|
-
});
|
|
20427
|
-
allOrFilters.push(additionalOrFilterToUse);
|
|
20428
|
-
allOrFilters = allOrFilters.filter((obj) => !isEmpty$1(obj));
|
|
20429
|
-
const unflattenedAndQueries = getQueries(andFilters, qb, ccFields);
|
|
20430
|
-
let allAndFilters = flattenFilters(unflattenedAndQueries);
|
|
20431
|
-
allAndFilters.push(additionalFilterToUse);
|
|
20432
|
-
allAndFilters = allAndFilters.filter((obj) => !isEmpty$1(obj));
|
|
20433
|
-
if (allAndFilters.length) {
|
|
20434
|
-
qb.whereAll(...allAndFilters);
|
|
20435
|
-
}
|
|
20436
|
-
if (allOrFilters.length) {
|
|
20437
|
-
qb.andWhereAny(...allOrFilters);
|
|
20438
|
-
}
|
|
20439
|
-
const columnCustomFilters = getColumnCustomFilters(
|
|
20440
|
-
andFilters,
|
|
20441
|
-
qb,
|
|
20442
|
-
ccFields
|
|
20443
|
-
);
|
|
20444
|
-
if (columnCustomFilters.length) {
|
|
20445
|
-
qb.whereAll(...columnCustomFilters);
|
|
20446
|
-
}
|
|
20447
|
-
} catch (e) {
|
|
20448
|
-
if (urlConnected) {
|
|
20449
|
-
errorParsingUrlString = e;
|
|
20450
|
-
console.error(
|
|
20451
|
-
"The following error occurred when trying to build the query params. This is probably due to a malformed URL:",
|
|
20452
|
-
e
|
|
20453
|
-
);
|
|
20454
|
-
} else {
|
|
20455
|
-
console.error("Error building query params from filter:");
|
|
20456
|
-
throw e;
|
|
20070
|
+
return __spreadProps(__spreadValues({}, toRet), {
|
|
20071
|
+
variables: {
|
|
20072
|
+
where,
|
|
20073
|
+
order_by,
|
|
20074
|
+
limit,
|
|
20075
|
+
offset: offset3
|
|
20457
20076
|
}
|
|
20458
|
-
}
|
|
20459
|
-
if (qb.query.filters.length) {
|
|
20460
|
-
graphqlQueryParams.filter = qb.toJSON();
|
|
20461
|
-
}
|
|
20462
|
-
if (!graphqlQueryParams.sort.length) {
|
|
20463
|
-
graphqlQueryParams.sort.push("-updatedAt");
|
|
20464
|
-
}
|
|
20465
|
-
graphqlQueryParams.sort.push(
|
|
20466
|
-
isCodeModel ? "code" : window.__sortId || "id"
|
|
20467
|
-
);
|
|
20468
|
-
return __spreadProps(__spreadValues({}, toReturn), {
|
|
20469
|
-
//the query params will get passed directly to as variables to the graphql query
|
|
20470
|
-
variables: graphqlQueryParams,
|
|
20471
|
-
errorParsingUrlString
|
|
20472
20077
|
});
|
|
20473
20078
|
}
|
|
20474
20079
|
}
|
|
20475
20080
|
__name(getQueryParams, "getQueryParams");
|
|
20476
|
-
function getSubFiltersAndPath(filter2, qb, ccFields) {
|
|
20477
|
-
const { selectedFilter, filterValue, filterOn } = filter2;
|
|
20478
|
-
const fieldSchema = ccFields[filterOn];
|
|
20479
|
-
let filterValueToUse = filterValue;
|
|
20480
|
-
if (fieldSchema) {
|
|
20481
|
-
if (fieldSchema.normalizeFilter) {
|
|
20482
|
-
filterValueToUse = fieldSchema.normalizeFilter(
|
|
20483
|
-
filterValue,
|
|
20484
|
-
selectedFilter,
|
|
20485
|
-
filterOn
|
|
20486
|
-
);
|
|
20487
|
-
}
|
|
20488
|
-
}
|
|
20489
|
-
const _subFilters = getSubFilter(qb, selectedFilter, filterValueToUse);
|
|
20490
|
-
let filterField;
|
|
20491
|
-
if (fieldSchema) {
|
|
20492
|
-
const { path: path2, reference: reference2 } = fieldSchema;
|
|
20493
|
-
if (reference2) {
|
|
20494
|
-
filterField = reference2.sourceField;
|
|
20495
|
-
} else {
|
|
20496
|
-
filterField = path2;
|
|
20497
|
-
}
|
|
20498
|
-
} else if (filterOn === "id") {
|
|
20499
|
-
filterField = filterOn;
|
|
20500
|
-
} else {
|
|
20501
|
-
console.error("Trying to filter on unknown field");
|
|
20502
|
-
}
|
|
20503
|
-
const subFiltersToUse = [];
|
|
20504
|
-
const subFilters = Array.isArray(_subFilters) ? _subFilters : [_subFilters];
|
|
20505
|
-
subFilters.forEach((subFilter) => {
|
|
20506
|
-
let subFilterToUse = subFilter;
|
|
20507
|
-
if (fieldSchema) {
|
|
20508
|
-
const { path: path2, reference: reference2 } = fieldSchema;
|
|
20509
|
-
if (reference2) {
|
|
20510
|
-
subFilterToUse = buildRef(
|
|
20511
|
-
qb,
|
|
20512
|
-
reference2,
|
|
20513
|
-
last$1(path2.split(".")),
|
|
20514
|
-
subFilter
|
|
20515
|
-
);
|
|
20516
|
-
}
|
|
20517
|
-
}
|
|
20518
|
-
subFiltersToUse.push(subFilterToUse);
|
|
20519
|
-
});
|
|
20520
|
-
return {
|
|
20521
|
-
path: filterField,
|
|
20522
|
-
subFilters: subFiltersToUse
|
|
20523
|
-
};
|
|
20524
|
-
}
|
|
20525
|
-
__name(getSubFiltersAndPath, "getSubFiltersAndPath");
|
|
20526
|
-
function getQueries(filters, qb, ccFields) {
|
|
20527
|
-
const subQueries = filters.reduce((acc, filter2) => {
|
|
20528
|
-
if (!filter2) {
|
|
20529
|
-
console.warn("We should always have a filter object!");
|
|
20530
|
-
return acc;
|
|
20531
|
-
}
|
|
20532
|
-
const { filterOn } = filter2;
|
|
20533
|
-
const fieldSchema = ccFields[filterOn];
|
|
20534
|
-
if (!filter2.isSearchTermFilter && (fieldSchema == null ? void 0 : fieldSchema.additionalColumnFilter))
|
|
20535
|
-
return acc;
|
|
20536
|
-
const { path: path2, subFilters } = getSubFiltersAndPath(filter2, qb, ccFields);
|
|
20537
|
-
acc[path2] = subFilters;
|
|
20538
|
-
return acc;
|
|
20539
|
-
}, {});
|
|
20540
|
-
return subQueries;
|
|
20541
|
-
}
|
|
20542
|
-
__name(getQueries, "getQueries");
|
|
20543
|
-
function getColumnCustomFilters(filters, qb, ccFields) {
|
|
20544
|
-
const subQueries = filters.reduce((acc, filter2) => {
|
|
20545
|
-
if (!filter2) {
|
|
20546
|
-
console.warn("We should always have a filter object!");
|
|
20547
|
-
return acc;
|
|
20548
|
-
}
|
|
20549
|
-
const { filterOn } = filter2;
|
|
20550
|
-
const fieldSchema = ccFields[filterOn];
|
|
20551
|
-
if (filter2.isSearchTermFilter || !(fieldSchema == null ? void 0 : fieldSchema.additionalColumnFilter)) {
|
|
20552
|
-
return acc;
|
|
20553
|
-
}
|
|
20554
|
-
const { path: path2, subFilters } = getSubFiltersAndPath(filter2, qb, ccFields);
|
|
20555
|
-
subFilters.forEach((subFilter) => {
|
|
20556
|
-
acc.push(fieldSchema.additionalColumnFilter(qb, subFilter, path2));
|
|
20557
|
-
});
|
|
20558
|
-
return acc;
|
|
20559
|
-
}, []);
|
|
20560
|
-
return subQueries;
|
|
20561
|
-
}
|
|
20562
|
-
__name(getColumnCustomFilters, "getColumnCustomFilters");
|
|
20563
20081
|
function PagingInput({ disabled, onBlur, defaultPage }) {
|
|
20564
20082
|
const [page, setPage] = React.useState(defaultPage);
|
|
20565
20083
|
const defaultValue2 = React.useRef(defaultPage);
|
|
@@ -33073,6 +32591,293 @@ const InfoHelper = /* @__PURE__ */ __name((_g) => {
|
|
|
33073
32591
|
toReturn
|
|
33074
32592
|
);
|
|
33075
32593
|
}, "InfoHelper");
|
|
32594
|
+
var dayjs_min$1 = { exports: {} };
|
|
32595
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
32596
|
+
var hasRequiredDayjs_min;
|
|
32597
|
+
function requireDayjs_min() {
|
|
32598
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
32599
|
+
hasRequiredDayjs_min = 1;
|
|
32600
|
+
(function(module2, exports2) {
|
|
32601
|
+
!function(t2, e) {
|
|
32602
|
+
module2.exports = e();
|
|
32603
|
+
}(dayjs_min, function() {
|
|
32604
|
+
var t2 = 1e3, e = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: /* @__PURE__ */ __name(function(t3) {
|
|
32605
|
+
var e2 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
|
32606
|
+
return "[" + t3 + (e2[(n3 - 20) % 10] || e2[n3] || e2[0]) + "]";
|
|
32607
|
+
}, "ordinal") }, m2 = /* @__PURE__ */ __name(function(t3, e2, n3) {
|
|
32608
|
+
var r3 = String(t3);
|
|
32609
|
+
return !r3 || r3.length >= e2 ? t3 : "" + Array(e2 + 1 - r3.length).join(n3) + t3;
|
|
32610
|
+
}, "m"), v2 = { s: m2, z: /* @__PURE__ */ __name(function(t3) {
|
|
32611
|
+
var e2 = -t3.utcOffset(), n3 = Math.abs(e2), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
|
|
32612
|
+
return (e2 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
|
|
32613
|
+
}, "z"), m: /* @__PURE__ */ __name(function t3(e2, n3) {
|
|
32614
|
+
if (e2.date() < n3.date()) return -t3(n3, e2);
|
|
32615
|
+
var r3 = 12 * (n3.year() - e2.year()) + (n3.month() - e2.month()), i3 = e2.clone().add(r3, c2), s3 = n3 - i3 < 0, u3 = e2.clone().add(r3 + (s3 ? -1 : 1), c2);
|
|
32616
|
+
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
|
|
32617
|
+
}, "t"), a: /* @__PURE__ */ __name(function(t3) {
|
|
32618
|
+
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
32619
|
+
}, "a"), p: /* @__PURE__ */ __name(function(t3) {
|
|
32620
|
+
return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
|
32621
|
+
}, "p"), u: /* @__PURE__ */ __name(function(t3) {
|
|
32622
|
+
return void 0 === t3;
|
|
32623
|
+
}, "u") }, g2 = "en", D2 = {};
|
|
32624
|
+
D2[g2] = M2;
|
|
32625
|
+
var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t3) {
|
|
32626
|
+
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
|
32627
|
+
}, "S"), w2 = /* @__PURE__ */ __name(function t3(e2, n3, r3) {
|
|
32628
|
+
var i3;
|
|
32629
|
+
if (!e2) return g2;
|
|
32630
|
+
if ("string" == typeof e2) {
|
|
32631
|
+
var s3 = e2.toLowerCase();
|
|
32632
|
+
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
|
32633
|
+
var u3 = e2.split("-");
|
|
32634
|
+
if (!i3 && u3.length > 1) return t3(u3[0]);
|
|
32635
|
+
} else {
|
|
32636
|
+
var a3 = e2.name;
|
|
32637
|
+
D2[a3] = e2, i3 = a3;
|
|
32638
|
+
}
|
|
32639
|
+
return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
|
|
32640
|
+
}, "t"), O2 = /* @__PURE__ */ __name(function(t3, e2) {
|
|
32641
|
+
if (S2(t3)) return t3.clone();
|
|
32642
|
+
var n3 = "object" == typeof e2 ? e2 : {};
|
|
32643
|
+
return n3.date = t3, n3.args = arguments, new _2(n3);
|
|
32644
|
+
}, "O"), b2 = v2;
|
|
32645
|
+
b2.l = w2, b2.i = S2, b2.w = function(t3, e2) {
|
|
32646
|
+
return O2(t3, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
32647
|
+
};
|
|
32648
|
+
var _2 = function() {
|
|
32649
|
+
function M3(t3) {
|
|
32650
|
+
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
|
32651
|
+
}
|
|
32652
|
+
__name(M3, "M");
|
|
32653
|
+
var m3 = M3.prototype;
|
|
32654
|
+
return m3.parse = function(t3) {
|
|
32655
|
+
this.$d = function(t4) {
|
|
32656
|
+
var e2 = t4.date, n3 = t4.utc;
|
|
32657
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
32658
|
+
if (b2.u(e2)) return /* @__PURE__ */ new Date();
|
|
32659
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
32660
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
32661
|
+
var r3 = e2.match($);
|
|
32662
|
+
if (r3) {
|
|
32663
|
+
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
|
32664
|
+
return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
|
|
32665
|
+
}
|
|
32666
|
+
}
|
|
32667
|
+
return new Date(e2);
|
|
32668
|
+
}(t3), this.init();
|
|
32669
|
+
}, m3.init = function() {
|
|
32670
|
+
var t3 = this.$d;
|
|
32671
|
+
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
|
32672
|
+
}, m3.$utils = function() {
|
|
32673
|
+
return b2;
|
|
32674
|
+
}, m3.isValid = function() {
|
|
32675
|
+
return !(this.$d.toString() === l2);
|
|
32676
|
+
}, m3.isSame = function(t3, e2) {
|
|
32677
|
+
var n3 = O2(t3);
|
|
32678
|
+
return this.startOf(e2) <= n3 && n3 <= this.endOf(e2);
|
|
32679
|
+
}, m3.isAfter = function(t3, e2) {
|
|
32680
|
+
return O2(t3) < this.startOf(e2);
|
|
32681
|
+
}, m3.isBefore = function(t3, e2) {
|
|
32682
|
+
return this.endOf(e2) < O2(t3);
|
|
32683
|
+
}, m3.$g = function(t3, e2, n3) {
|
|
32684
|
+
return b2.u(t3) ? this[e2] : this.set(n3, t3);
|
|
32685
|
+
}, m3.unix = function() {
|
|
32686
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
32687
|
+
}, m3.valueOf = function() {
|
|
32688
|
+
return this.$d.getTime();
|
|
32689
|
+
}, m3.startOf = function(t3, e2) {
|
|
32690
|
+
var n3 = this, r3 = !!b2.u(e2) || e2, f3 = b2.p(t3), l3 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
32691
|
+
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e3, t4) : new Date(n3.$y, e3, t4), n3);
|
|
32692
|
+
return r3 ? i3 : i3.endOf(a2);
|
|
32693
|
+
}, "l"), $2 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
32694
|
+
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n3);
|
|
32695
|
+
}, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
|
32696
|
+
switch (f3) {
|
|
32697
|
+
case h2:
|
|
32698
|
+
return r3 ? l3(1, 0) : l3(31, 11);
|
|
32699
|
+
case c2:
|
|
32700
|
+
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
|
32701
|
+
case o2:
|
|
32702
|
+
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
|
32703
|
+
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
|
32704
|
+
case a2:
|
|
32705
|
+
case d2:
|
|
32706
|
+
return $2(v3 + "Hours", 0);
|
|
32707
|
+
case u2:
|
|
32708
|
+
return $2(v3 + "Minutes", 1);
|
|
32709
|
+
case s2:
|
|
32710
|
+
return $2(v3 + "Seconds", 2);
|
|
32711
|
+
case i2:
|
|
32712
|
+
return $2(v3 + "Milliseconds", 3);
|
|
32713
|
+
default:
|
|
32714
|
+
return this.clone();
|
|
32715
|
+
}
|
|
32716
|
+
}, m3.endOf = function(t3) {
|
|
32717
|
+
return this.startOf(t3, false);
|
|
32718
|
+
}, m3.$set = function(t3, e2) {
|
|
32719
|
+
var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a2 ? this.$D + (e2 - this.$W) : e2;
|
|
32720
|
+
if (o3 === c2 || o3 === h2) {
|
|
32721
|
+
var y3 = this.clone().set(d2, 1);
|
|
32722
|
+
y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
|
32723
|
+
} else l3 && this.$d[l3]($2);
|
|
32724
|
+
return this.init(), this;
|
|
32725
|
+
}, m3.set = function(t3, e2) {
|
|
32726
|
+
return this.clone().$set(t3, e2);
|
|
32727
|
+
}, m3.get = function(t3) {
|
|
32728
|
+
return this[b2.p(t3)]();
|
|
32729
|
+
}, m3.add = function(r3, f3) {
|
|
32730
|
+
var d3, l3 = this;
|
|
32731
|
+
r3 = Number(r3);
|
|
32732
|
+
var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t3) {
|
|
32733
|
+
var e2 = O2(l3);
|
|
32734
|
+
return b2.w(e2.date(e2.date() + Math.round(t3 * r3)), l3);
|
|
32735
|
+
}, "y");
|
|
32736
|
+
if ($2 === c2) return this.set(c2, this.$M + r3);
|
|
32737
|
+
if ($2 === h2) return this.set(h2, this.$y + r3);
|
|
32738
|
+
if ($2 === a2) return y3(1);
|
|
32739
|
+
if ($2 === o2) return y3(7);
|
|
32740
|
+
var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n2, d3[i2] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
|
|
32741
|
+
return b2.w(m4, this);
|
|
32742
|
+
}, m3.subtract = function(t3, e2) {
|
|
32743
|
+
return this.add(-1 * t3, e2);
|
|
32744
|
+
}, m3.format = function(t3) {
|
|
32745
|
+
var e2 = this, n3 = this.$locale();
|
|
32746
|
+
if (!this.isValid()) return n3.invalidDate || l2;
|
|
32747
|
+
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = /* @__PURE__ */ __name(function(t4, n4, i4, s4) {
|
|
32748
|
+
return t4 && (t4[n4] || t4(e2, r3)) || i4[n4].slice(0, s4);
|
|
32749
|
+
}, "h"), d3 = /* @__PURE__ */ __name(function(t4) {
|
|
32750
|
+
return b2.s(s3 % 12 || 12, t4, "0");
|
|
32751
|
+
}, "d"), $2 = f3 || function(t4, e3, n4) {
|
|
32752
|
+
var r4 = t4 < 12 ? "AM" : "PM";
|
|
32753
|
+
return n4 ? r4.toLowerCase() : r4;
|
|
32754
|
+
};
|
|
32755
|
+
return r3.replace(y2, function(t4, r4) {
|
|
32756
|
+
return r4 || function(t5) {
|
|
32757
|
+
switch (t5) {
|
|
32758
|
+
case "YY":
|
|
32759
|
+
return String(e2.$y).slice(-2);
|
|
32760
|
+
case "YYYY":
|
|
32761
|
+
return b2.s(e2.$y, 4, "0");
|
|
32762
|
+
case "M":
|
|
32763
|
+
return a3 + 1;
|
|
32764
|
+
case "MM":
|
|
32765
|
+
return b2.s(a3 + 1, 2, "0");
|
|
32766
|
+
case "MMM":
|
|
32767
|
+
return h3(n3.monthsShort, a3, c3, 3);
|
|
32768
|
+
case "MMMM":
|
|
32769
|
+
return h3(c3, a3);
|
|
32770
|
+
case "D":
|
|
32771
|
+
return e2.$D;
|
|
32772
|
+
case "DD":
|
|
32773
|
+
return b2.s(e2.$D, 2, "0");
|
|
32774
|
+
case "d":
|
|
32775
|
+
return String(e2.$W);
|
|
32776
|
+
case "dd":
|
|
32777
|
+
return h3(n3.weekdaysMin, e2.$W, o3, 2);
|
|
32778
|
+
case "ddd":
|
|
32779
|
+
return h3(n3.weekdaysShort, e2.$W, o3, 3);
|
|
32780
|
+
case "dddd":
|
|
32781
|
+
return o3[e2.$W];
|
|
32782
|
+
case "H":
|
|
32783
|
+
return String(s3);
|
|
32784
|
+
case "HH":
|
|
32785
|
+
return b2.s(s3, 2, "0");
|
|
32786
|
+
case "h":
|
|
32787
|
+
return d3(1);
|
|
32788
|
+
case "hh":
|
|
32789
|
+
return d3(2);
|
|
32790
|
+
case "a":
|
|
32791
|
+
return $2(s3, u3, true);
|
|
32792
|
+
case "A":
|
|
32793
|
+
return $2(s3, u3, false);
|
|
32794
|
+
case "m":
|
|
32795
|
+
return String(u3);
|
|
32796
|
+
case "mm":
|
|
32797
|
+
return b2.s(u3, 2, "0");
|
|
32798
|
+
case "s":
|
|
32799
|
+
return String(e2.$s);
|
|
32800
|
+
case "ss":
|
|
32801
|
+
return b2.s(e2.$s, 2, "0");
|
|
32802
|
+
case "SSS":
|
|
32803
|
+
return b2.s(e2.$ms, 3, "0");
|
|
32804
|
+
case "Z":
|
|
32805
|
+
return i3;
|
|
32806
|
+
}
|
|
32807
|
+
return null;
|
|
32808
|
+
}(t4) || i3.replace(":", "");
|
|
32809
|
+
});
|
|
32810
|
+
}, m3.utcOffset = function() {
|
|
32811
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
32812
|
+
}, m3.diff = function(r3, d3, l3) {
|
|
32813
|
+
var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e, g3 = this - m4, D3 = /* @__PURE__ */ __name(function() {
|
|
32814
|
+
return b2.m(y3, m4);
|
|
32815
|
+
}, "D");
|
|
32816
|
+
switch (M4) {
|
|
32817
|
+
case h2:
|
|
32818
|
+
$2 = D3() / 12;
|
|
32819
|
+
break;
|
|
32820
|
+
case c2:
|
|
32821
|
+
$2 = D3();
|
|
32822
|
+
break;
|
|
32823
|
+
case f2:
|
|
32824
|
+
$2 = D3() / 3;
|
|
32825
|
+
break;
|
|
32826
|
+
case o2:
|
|
32827
|
+
$2 = (g3 - v3) / 6048e5;
|
|
32828
|
+
break;
|
|
32829
|
+
case a2:
|
|
32830
|
+
$2 = (g3 - v3) / 864e5;
|
|
32831
|
+
break;
|
|
32832
|
+
case u2:
|
|
32833
|
+
$2 = g3 / n2;
|
|
32834
|
+
break;
|
|
32835
|
+
case s2:
|
|
32836
|
+
$2 = g3 / e;
|
|
32837
|
+
break;
|
|
32838
|
+
case i2:
|
|
32839
|
+
$2 = g3 / t2;
|
|
32840
|
+
break;
|
|
32841
|
+
default:
|
|
32842
|
+
$2 = g3;
|
|
32843
|
+
}
|
|
32844
|
+
return l3 ? $2 : b2.a($2);
|
|
32845
|
+
}, m3.daysInMonth = function() {
|
|
32846
|
+
return this.endOf(c2).$D;
|
|
32847
|
+
}, m3.$locale = function() {
|
|
32848
|
+
return D2[this.$L];
|
|
32849
|
+
}, m3.locale = function(t3, e2) {
|
|
32850
|
+
if (!t3) return this.$L;
|
|
32851
|
+
var n3 = this.clone(), r3 = w2(t3, e2, true);
|
|
32852
|
+
return r3 && (n3.$L = r3), n3;
|
|
32853
|
+
}, m3.clone = function() {
|
|
32854
|
+
return b2.w(this.$d, this);
|
|
32855
|
+
}, m3.toDate = function() {
|
|
32856
|
+
return new Date(this.valueOf());
|
|
32857
|
+
}, m3.toJSON = function() {
|
|
32858
|
+
return this.isValid() ? this.toISOString() : null;
|
|
32859
|
+
}, m3.toISOString = function() {
|
|
32860
|
+
return this.$d.toISOString();
|
|
32861
|
+
}, m3.toString = function() {
|
|
32862
|
+
return this.$d.toUTCString();
|
|
32863
|
+
}, M3;
|
|
32864
|
+
}(), k2 = _2.prototype;
|
|
32865
|
+
return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
|
|
32866
|
+
k2[t3[1]] = function(e2) {
|
|
32867
|
+
return this.$g(e2, t3[0], t3[1]);
|
|
32868
|
+
};
|
|
32869
|
+
}), O2.extend = function(t3, e2) {
|
|
32870
|
+
return t3.$i || (t3(e2, _2, O2), t3.$i = true), O2;
|
|
32871
|
+
}, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
|
|
32872
|
+
return O2(1e3 * t3);
|
|
32873
|
+
}, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
|
|
32874
|
+
});
|
|
32875
|
+
})(dayjs_min$1);
|
|
32876
|
+
return dayjs_min$1.exports;
|
|
32877
|
+
}
|
|
32878
|
+
__name(requireDayjs_min, "requireDayjs_min");
|
|
32879
|
+
var dayjs_minExports = requireDayjs_min();
|
|
32880
|
+
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
33076
32881
|
var localizedFormat$2 = { exports: {} };
|
|
33077
32882
|
var localizedFormat$1 = localizedFormat$2.exports;
|
|
33078
32883
|
var hasRequiredLocalizedFormat;
|
|
@@ -33342,7 +33147,7 @@ function removeUnwantedProps(props) {
|
|
|
33342
33147
|
return cleanedProps;
|
|
33343
33148
|
}
|
|
33344
33149
|
__name(removeUnwantedProps, "removeUnwantedProps");
|
|
33345
|
-
const LabelWithTooltipInfo = /* @__PURE__ */ __name(({ label, tooltipInfo, labelStyle }) => tooltipInfo ? /* @__PURE__ */ React.createElement("
|
|
33150
|
+
const LabelWithTooltipInfo = /* @__PURE__ */ __name(({ label, tooltipInfo, labelStyle }) => tooltipInfo ? /* @__PURE__ */ React.createElement("span", { style: __spreadValues({ display: "flex", alignItems: "center" }, labelStyle) }, label, " ", /* @__PURE__ */ React.createElement(
|
|
33346
33151
|
InfoHelper,
|
|
33347
33152
|
{
|
|
33348
33153
|
style: { marginLeft: "5px", marginTop: "-6px" },
|
|
@@ -50863,42 +50668,42 @@ function getFilterMenuItems(dataType) {
|
|
|
50863
50668
|
let filterMenuItems2 = [];
|
|
50864
50669
|
if (dataType === "string") {
|
|
50865
50670
|
filterMenuItems2 = [
|
|
50866
|
-
"
|
|
50867
|
-
"
|
|
50868
|
-
"
|
|
50869
|
-
"
|
|
50870
|
-
"
|
|
50871
|
-
"
|
|
50872
|
-
"
|
|
50873
|
-
"
|
|
50874
|
-
"
|
|
50875
|
-
"
|
|
50671
|
+
"contains",
|
|
50672
|
+
"notContains",
|
|
50673
|
+
"startsWith",
|
|
50674
|
+
"endsWith",
|
|
50675
|
+
"isExactly",
|
|
50676
|
+
"regex",
|
|
50677
|
+
"inList",
|
|
50678
|
+
"notInList",
|
|
50679
|
+
"isEmpty",
|
|
50680
|
+
"notEmpty"
|
|
50876
50681
|
];
|
|
50877
50682
|
} else if (dataType === "lookup") {
|
|
50878
50683
|
filterMenuItems2 = [
|
|
50879
|
-
"
|
|
50880
|
-
"
|
|
50881
|
-
"
|
|
50882
|
-
"
|
|
50883
|
-
"
|
|
50884
|
-
"
|
|
50684
|
+
"contains",
|
|
50685
|
+
"notContains",
|
|
50686
|
+
"startsWith",
|
|
50687
|
+
"endsWith",
|
|
50688
|
+
"isExactly",
|
|
50689
|
+
"regex"
|
|
50885
50690
|
];
|
|
50886
50691
|
} else if (dataType === "boolean") {
|
|
50887
|
-
filterMenuItems2 = ["
|
|
50692
|
+
filterMenuItems2 = ["true", "false"];
|
|
50888
50693
|
} else if (dataType === "number" || dataType === "integer") {
|
|
50889
50694
|
filterMenuItems2 = [
|
|
50890
|
-
"
|
|
50891
|
-
"
|
|
50892
|
-
"
|
|
50893
|
-
"
|
|
50894
|
-
"
|
|
50895
|
-
"
|
|
50896
|
-
"
|
|
50695
|
+
"greaterThan",
|
|
50696
|
+
"lessThan",
|
|
50697
|
+
"inRange",
|
|
50698
|
+
"outsideRange",
|
|
50699
|
+
"equalTo",
|
|
50700
|
+
"inList",
|
|
50701
|
+
"notInList"
|
|
50897
50702
|
];
|
|
50898
50703
|
} else if (dataType === "timestamp") {
|
|
50899
|
-
filterMenuItems2 = ["
|
|
50704
|
+
filterMenuItems2 = ["isBetween", "notBetween", "isBefore", "isAfter"];
|
|
50900
50705
|
}
|
|
50901
|
-
return filterMenuItems2;
|
|
50706
|
+
return filterMenuItems2.map((item) => startCase(item));
|
|
50902
50707
|
}
|
|
50903
50708
|
__name(getFilterMenuItems, "getFilterMenuItems");
|
|
50904
50709
|
const ColumnFilterMenu = /* @__PURE__ */ __name(({
|
|
@@ -56486,20 +56291,15 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56486
56291
|
props = __spreadValues(__spreadValues({}, props), tableParams);
|
|
56487
56292
|
const queryParams = React.useMemo(() => {
|
|
56488
56293
|
if (!isTableParamsConnected) {
|
|
56489
|
-
const additionalFilterToUse = typeof props.additionalFilter === "function" ? props.additionalFilter : () => props.additionalFilter;
|
|
56490
|
-
const additionalOrFilterToUse = typeof props.additionalOrFilter === "function" ? props.additionalOrFilter : () => props.additionalOrFilter;
|
|
56491
56294
|
return getQueryParams({
|
|
56492
56295
|
doNotCoercePageSize,
|
|
56493
56296
|
currentParams,
|
|
56494
56297
|
entities: props.entities,
|
|
56495
|
-
// for local table
|
|
56496
|
-
urlConnected,
|
|
56497
56298
|
defaults,
|
|
56498
56299
|
schema: convertedSchema,
|
|
56499
56300
|
isInfinite,
|
|
56500
56301
|
isLocalCall,
|
|
56501
|
-
additionalFilter:
|
|
56502
|
-
additionalOrFilter: additionalOrFilterToUse,
|
|
56302
|
+
additionalFilter: props.additionalFilter,
|
|
56503
56303
|
noOrderError: props.noOrderError,
|
|
56504
56304
|
isCodeModel: props.isCodeModel,
|
|
56505
56305
|
ownProps: props
|
|
@@ -56722,7 +56522,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56722
56522
|
}) : !val;
|
|
56723
56523
|
});
|
|
56724
56524
|
}
|
|
56725
|
-
if (noValsForField) {
|
|
56525
|
+
if (noValsForField && entities.length) {
|
|
56726
56526
|
return __spreadProps(__spreadValues({}, field), {
|
|
56727
56527
|
isHidden: true,
|
|
56728
56528
|
isForcedHidden: true
|
|
@@ -71259,8 +71059,12 @@ const Uploader = /* @__PURE__ */ __name(({
|
|
|
71259
71059
|
onClick: /* @__PURE__ */ __name((evt) => evt.preventDefault(), "onClick"),
|
|
71260
71060
|
multiple: fileLimit !== 1,
|
|
71261
71061
|
accept: simpleAccept ? simpleAccept.split(", ").map((acc) => acc.startsWith(".") ? acc : "." + acc).join(", ") : void 0,
|
|
71262
|
-
onDrop: /* @__PURE__ */ __name((_acceptedFiles, rejectedFiles) => __async(exports, null, function* () {
|
|
71062
|
+
onDrop: /* @__PURE__ */ __name((_acceptedFiles, rejectedFiles, e) => __async(exports, null, function* () {
|
|
71263
71063
|
var _a2, _b2;
|
|
71064
|
+
const parentDropzone = e.target.closest(".tg-dropzone");
|
|
71065
|
+
if (parentDropzone) {
|
|
71066
|
+
parentDropzone.blur();
|
|
71067
|
+
}
|
|
71264
71068
|
let acceptedFiles = [];
|
|
71265
71069
|
for (const file of _acceptedFiles) {
|
|
71266
71070
|
if ((validateAgainstSchema || autoUnzip) && isZipFile(file)) {
|
|
@@ -71891,7 +71695,6 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
71891
71695
|
var _a;
|
|
71892
71696
|
const {
|
|
71893
71697
|
additionalFilter,
|
|
71894
|
-
additionalOrFilter,
|
|
71895
71698
|
controlled_pageSize,
|
|
71896
71699
|
defaults: _defaults,
|
|
71897
71700
|
doNotCoercePageSize,
|
|
@@ -71999,28 +71802,21 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
71999
71802
|
[controlled_pageSize, defaultsToUse, pageSize, history == null ? void 0 : history.location]
|
|
72000
71803
|
);
|
|
72001
71804
|
const queryParams = React.useMemo(() => {
|
|
72002
|
-
const additionalFilterToUse = typeof additionalFilter === "function" ? additionalFilter : () => additionalFilter;
|
|
72003
|
-
const additionalOrFilterToUse = typeof additionalOrFilter === "function" ? additionalOrFilter : () => additionalOrFilter;
|
|
72004
71805
|
return getQueryParams({
|
|
72005
71806
|
doNotCoercePageSize,
|
|
72006
71807
|
currentParams,
|
|
72007
71808
|
entities,
|
|
72008
|
-
// for local table
|
|
72009
|
-
urlConnected,
|
|
72010
71809
|
defaults: defaultsToUse,
|
|
72011
71810
|
schema: convertedSchema,
|
|
72012
71811
|
isInfinite: isInfinite || isSimple && !withPaging,
|
|
72013
71812
|
isLocalCall,
|
|
72014
|
-
additionalFilter
|
|
72015
|
-
additionalOrFilter: additionalOrFilterToUse,
|
|
71813
|
+
additionalFilter,
|
|
72016
71814
|
noOrderError,
|
|
72017
|
-
isCodeModel,
|
|
72018
71815
|
ownProps: passingProps
|
|
72019
71816
|
});
|
|
72020
71817
|
}, [
|
|
72021
71818
|
additionalFilter,
|
|
72022
71819
|
passingProps,
|
|
72023
|
-
additionalOrFilter,
|
|
72024
71820
|
doNotCoercePageSize,
|
|
72025
71821
|
currentParams,
|
|
72026
71822
|
entities,
|
|
@@ -78196,6 +77992,7 @@ exports.getTagProps = getTagProps;
|
|
|
78196
77992
|
exports.getTagsAndTagOptions = getTagsAndTagOptions;
|
|
78197
77993
|
exports.getTextFromEl = getTextFromEl;
|
|
78198
77994
|
exports.hotkeysById = hotkeysById;
|
|
77995
|
+
exports.initializeHasuraWhereAndFilter = initializeHasuraWhereAndFilter;
|
|
78199
77996
|
exports.inventoryIcon = inventoryIcon;
|
|
78200
77997
|
exports.isSafari = isSafari;
|
|
78201
77998
|
exports.keyboardIcon = keyboardIcon;
|