@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.es.js
CHANGED
|
@@ -2904,77 +2904,6 @@ document.addEventListener("mouseup", () => {
|
|
|
2904
2904
|
canSetDragging = false;
|
|
2905
2905
|
isDragging = false;
|
|
2906
2906
|
});
|
|
2907
|
-
const processedDisabledElements = /* @__PURE__ */ new WeakMap();
|
|
2908
|
-
function moveTooltipToParent(element2) {
|
|
2909
|
-
var _a, _b;
|
|
2910
|
-
if (processedDisabledElements.has(element2)) {
|
|
2911
|
-
return;
|
|
2912
|
-
}
|
|
2913
|
-
const isDisabled = element2.disabled === true || element2.getAttribute("disabled") !== null;
|
|
2914
|
-
const hasTipData = element2.getAttribute("data-tip") || element2.getAttribute("data-title") || element2.offsetWidth < element2.scrollWidth && ((_a = element2.textContent) == null ? void 0 : _a.trim().length) > 0;
|
|
2915
|
-
if (!isDisabled || !hasTipData) {
|
|
2916
|
-
return;
|
|
2917
|
-
}
|
|
2918
|
-
const parent2 = element2.parentElement;
|
|
2919
|
-
if (!parent2) {
|
|
2920
|
-
return;
|
|
2921
|
-
}
|
|
2922
|
-
const tooltipAttrs = ["data-tip", "data-title", "data-avoid", "data-avoid-backup"];
|
|
2923
|
-
let attrsMoved = false;
|
|
2924
|
-
const movedAttrs = [];
|
|
2925
|
-
tooltipAttrs.forEach((attr) => {
|
|
2926
|
-
const value = element2.getAttribute(attr);
|
|
2927
|
-
if (value) {
|
|
2928
|
-
if (!parent2.hasAttribute(attr)) {
|
|
2929
|
-
parent2.setAttribute(attr, value);
|
|
2930
|
-
movedAttrs.push(attr);
|
|
2931
|
-
attrsMoved = true;
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
|
-
});
|
|
2935
|
-
if (element2.offsetWidth < element2.scrollWidth && ((_b = element2.textContent) == null ? void 0 : _b.trim().length) > 0) {
|
|
2936
|
-
if (!parent2.hasAttribute("data-tip")) {
|
|
2937
|
-
parent2.setAttribute("data-tip", element2.textContent);
|
|
2938
|
-
movedAttrs.push("data-tip");
|
|
2939
|
-
attrsMoved = true;
|
|
2940
|
-
}
|
|
2941
|
-
}
|
|
2942
|
-
if (attrsMoved) {
|
|
2943
|
-
processedDisabledElements.set(element2, {
|
|
2944
|
-
parent: parent2,
|
|
2945
|
-
movedAttrs
|
|
2946
|
-
});
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
__name(moveTooltipToParent, "moveTooltipToParent");
|
|
2950
|
-
function clearParentTooltips(element2) {
|
|
2951
|
-
if (!processedDisabledElements.has(element2)) {
|
|
2952
|
-
return;
|
|
2953
|
-
}
|
|
2954
|
-
const { parent: parent2, movedAttrs } = processedDisabledElements.get(element2);
|
|
2955
|
-
if (parent2 && movedAttrs) {
|
|
2956
|
-
movedAttrs.forEach((attr) => {
|
|
2957
|
-
parent2.removeAttribute(attr);
|
|
2958
|
-
});
|
|
2959
|
-
processedDisabledElements.delete(element2);
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
__name(clearParentTooltips, "clearParentTooltips");
|
|
2963
|
-
function scanForDisabledElements() {
|
|
2964
|
-
processedDisabledElements.forEach((value, element2) => {
|
|
2965
|
-
const isStillDisabled = element2.disabled === true || element2.getAttribute("disabled") !== null;
|
|
2966
|
-
const isConnected = element2.isConnected;
|
|
2967
|
-
if (!isStillDisabled || !isConnected) {
|
|
2968
|
-
clearParentTooltips(element2);
|
|
2969
|
-
}
|
|
2970
|
-
});
|
|
2971
|
-
document.querySelectorAll("[disabled][data-tip], [disabled][data-title], button[disabled], input[disabled]").forEach((el) => {
|
|
2972
|
-
moveTooltipToParent(el);
|
|
2973
|
-
});
|
|
2974
|
-
}
|
|
2975
|
-
__name(scanForDisabledElements, "scanForDisabledElements");
|
|
2976
|
-
window.addEventListener("DOMContentLoaded", scanForDisabledElements);
|
|
2977
|
-
setInterval(scanForDisabledElements, 2e3);
|
|
2978
2907
|
let tippys = [];
|
|
2979
2908
|
let recentlyHidden = false;
|
|
2980
2909
|
let clearMe;
|
|
@@ -2982,13 +2911,7 @@ let clearMe;
|
|
|
2982
2911
|
let lastMouseOverElement = null;
|
|
2983
2912
|
document.addEventListener("mouseover", function(event) {
|
|
2984
2913
|
var _a, _b;
|
|
2985
|
-
|
|
2986
|
-
if (element2 instanceof Element && (element2.disabled === true || element2.getAttribute("disabled") !== null)) {
|
|
2987
|
-
const parent2 = element2.parentElement;
|
|
2988
|
-
if (parent2 && processedDisabledElements.has(element2)) {
|
|
2989
|
-
element2 = parent2;
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2914
|
+
const element2 = event.target;
|
|
2992
2915
|
if (element2 instanceof Element && element2 !== lastMouseOverElement) {
|
|
2993
2916
|
let clearOldTippys = /* @__PURE__ */ __name(function(maybeInst) {
|
|
2994
2917
|
tippys = tippys.filter((t2) => {
|
|
@@ -5862,12 +5785,12 @@ var freeGlobal = typeof global == "object" && global && global.Object === Object
|
|
|
5862
5785
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
5863
5786
|
var root$4 = freeGlobal || freeSelf || Function("return this")();
|
|
5864
5787
|
var Symbol$1 = root$4.Symbol;
|
|
5865
|
-
var objectProto$
|
|
5866
|
-
var hasOwnProperty$
|
|
5867
|
-
var nativeObjectToString$2 = objectProto$
|
|
5788
|
+
var objectProto$i = Object.prototype;
|
|
5789
|
+
var hasOwnProperty$f = objectProto$i.hasOwnProperty;
|
|
5790
|
+
var nativeObjectToString$2 = objectProto$i.toString;
|
|
5868
5791
|
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
5869
5792
|
function getRawTag(value) {
|
|
5870
|
-
var isOwn = hasOwnProperty$
|
|
5793
|
+
var isOwn = hasOwnProperty$f.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
5871
5794
|
try {
|
|
5872
5795
|
value[symToStringTag$1] = void 0;
|
|
5873
5796
|
var unmasked = true;
|
|
@@ -5884,8 +5807,8 @@ function getRawTag(value) {
|
|
|
5884
5807
|
return result;
|
|
5885
5808
|
}
|
|
5886
5809
|
__name(getRawTag, "getRawTag");
|
|
5887
|
-
var objectProto$
|
|
5888
|
-
var nativeObjectToString$1 = objectProto$
|
|
5810
|
+
var objectProto$h = Object.prototype;
|
|
5811
|
+
var nativeObjectToString$1 = objectProto$h.toString;
|
|
5889
5812
|
function objectToString(value) {
|
|
5890
5813
|
return nativeObjectToString$1.call(value);
|
|
5891
5814
|
}
|
|
@@ -6032,11 +5955,11 @@ function toSource(func) {
|
|
|
6032
5955
|
__name(toSource, "toSource");
|
|
6033
5956
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
6034
5957
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
6035
|
-
var funcProto$1 = Function.prototype, objectProto$
|
|
5958
|
+
var funcProto$1 = Function.prototype, objectProto$g = Object.prototype;
|
|
6036
5959
|
var funcToString$1 = funcProto$1.toString;
|
|
6037
|
-
var hasOwnProperty$
|
|
5960
|
+
var hasOwnProperty$e = objectProto$g.hasOwnProperty;
|
|
6038
5961
|
var reIsNative = RegExp(
|
|
6039
|
-
"^" + funcToString$1.call(hasOwnProperty$
|
|
5962
|
+
"^" + funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
6040
5963
|
);
|
|
6041
5964
|
function baseIsNative(value) {
|
|
6042
5965
|
if (!isObject$2(value) || isMasked(value)) {
|
|
@@ -6209,11 +6132,11 @@ function eq$1(value, other) {
|
|
|
6209
6132
|
return value === other || value !== value && other !== other;
|
|
6210
6133
|
}
|
|
6211
6134
|
__name(eq$1, "eq$1");
|
|
6212
|
-
var objectProto$
|
|
6213
|
-
var hasOwnProperty$
|
|
6135
|
+
var objectProto$f = Object.prototype;
|
|
6136
|
+
var hasOwnProperty$d = objectProto$f.hasOwnProperty;
|
|
6214
6137
|
function assignValue(object2, key, value) {
|
|
6215
6138
|
var objValue = object2[key];
|
|
6216
|
-
if (!(hasOwnProperty$
|
|
6139
|
+
if (!(hasOwnProperty$d.call(object2, key) && eq$1(objValue, value)) || value === void 0 && !(key in object2)) {
|
|
6217
6140
|
baseAssignValue(object2, key, value);
|
|
6218
6141
|
}
|
|
6219
6142
|
}
|
|
@@ -6237,11 +6160,11 @@ function copyObject(source, props, object2, customizer) {
|
|
|
6237
6160
|
return object2;
|
|
6238
6161
|
}
|
|
6239
6162
|
__name(copyObject, "copyObject");
|
|
6240
|
-
var nativeMax$
|
|
6163
|
+
var nativeMax$3 = Math.max;
|
|
6241
6164
|
function overRest(func, start2, transform) {
|
|
6242
|
-
start2 = nativeMax$
|
|
6165
|
+
start2 = nativeMax$3(start2 === void 0 ? func.length - 1 : start2, 0);
|
|
6243
6166
|
return function() {
|
|
6244
|
-
var args = arguments, index2 = -1, length = nativeMax$
|
|
6167
|
+
var args = arguments, index2 = -1, length = nativeMax$3(args.length - start2, 0), array2 = Array(length);
|
|
6245
6168
|
while (++index2 < length) {
|
|
6246
6169
|
array2[index2] = args[start2 + index2];
|
|
6247
6170
|
}
|
|
@@ -6298,9 +6221,9 @@ function createAssigner(assigner) {
|
|
|
6298
6221
|
});
|
|
6299
6222
|
}
|
|
6300
6223
|
__name(createAssigner, "createAssigner");
|
|
6301
|
-
var objectProto$
|
|
6224
|
+
var objectProto$e = Object.prototype;
|
|
6302
6225
|
function isPrototype(value) {
|
|
6303
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
6226
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$e;
|
|
6304
6227
|
return value === proto;
|
|
6305
6228
|
}
|
|
6306
6229
|
__name(isPrototype, "isPrototype");
|
|
@@ -6317,13 +6240,13 @@ function baseIsArguments(value) {
|
|
|
6317
6240
|
return isObjectLike$1(value) && baseGetTag(value) == argsTag$3;
|
|
6318
6241
|
}
|
|
6319
6242
|
__name(baseIsArguments, "baseIsArguments");
|
|
6320
|
-
var objectProto$
|
|
6321
|
-
var hasOwnProperty$
|
|
6322
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
6243
|
+
var objectProto$d = Object.prototype;
|
|
6244
|
+
var hasOwnProperty$c = objectProto$d.hasOwnProperty;
|
|
6245
|
+
var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
|
|
6323
6246
|
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
6324
6247
|
return arguments;
|
|
6325
6248
|
}()) ? baseIsArguments : function(value) {
|
|
6326
|
-
return isObjectLike$1(value) && hasOwnProperty$
|
|
6249
|
+
return isObjectLike$1(value) && hasOwnProperty$c.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
6327
6250
|
};
|
|
6328
6251
|
function stubFalse() {
|
|
6329
6252
|
return false;
|
|
@@ -6366,12 +6289,12 @@ var nodeUtil = function() {
|
|
|
6366
6289
|
}();
|
|
6367
6290
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
6368
6291
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
6369
|
-
var objectProto$
|
|
6370
|
-
var hasOwnProperty$
|
|
6292
|
+
var objectProto$c = Object.prototype;
|
|
6293
|
+
var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
6371
6294
|
function arrayLikeKeys(value, inherited) {
|
|
6372
6295
|
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;
|
|
6373
6296
|
for (var key in value) {
|
|
6374
|
-
if ((inherited || hasOwnProperty$
|
|
6297
|
+
if ((inherited || hasOwnProperty$b.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
6375
6298
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
6376
6299
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
6377
6300
|
isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
@@ -6389,15 +6312,15 @@ function overArg(func, transform) {
|
|
|
6389
6312
|
}
|
|
6390
6313
|
__name(overArg, "overArg");
|
|
6391
6314
|
var nativeKeys = overArg(Object.keys, Object);
|
|
6392
|
-
var objectProto$
|
|
6393
|
-
var hasOwnProperty$
|
|
6315
|
+
var objectProto$b = Object.prototype;
|
|
6316
|
+
var hasOwnProperty$a = objectProto$b.hasOwnProperty;
|
|
6394
6317
|
function baseKeys(object2) {
|
|
6395
6318
|
if (!isPrototype(object2)) {
|
|
6396
6319
|
return nativeKeys(object2);
|
|
6397
6320
|
}
|
|
6398
6321
|
var result = [];
|
|
6399
6322
|
for (var key in Object(object2)) {
|
|
6400
|
-
if (hasOwnProperty$
|
|
6323
|
+
if (hasOwnProperty$a.call(object2, key) && key != "constructor") {
|
|
6401
6324
|
result.push(key);
|
|
6402
6325
|
}
|
|
6403
6326
|
}
|
|
@@ -6418,15 +6341,15 @@ function nativeKeysIn(object2) {
|
|
|
6418
6341
|
return result;
|
|
6419
6342
|
}
|
|
6420
6343
|
__name(nativeKeysIn, "nativeKeysIn");
|
|
6421
|
-
var objectProto$
|
|
6422
|
-
var hasOwnProperty$
|
|
6344
|
+
var objectProto$a = Object.prototype;
|
|
6345
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
6423
6346
|
function baseKeysIn(object2) {
|
|
6424
6347
|
if (!isObject$2(object2)) {
|
|
6425
6348
|
return nativeKeysIn(object2);
|
|
6426
6349
|
}
|
|
6427
6350
|
var isProto = isPrototype(object2), result = [];
|
|
6428
6351
|
for (var key in object2) {
|
|
6429
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$
|
|
6352
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty$9.call(object2, key)))) {
|
|
6430
6353
|
result.push(key);
|
|
6431
6354
|
}
|
|
6432
6355
|
}
|
|
@@ -6462,22 +6385,22 @@ function hashDelete(key) {
|
|
|
6462
6385
|
}
|
|
6463
6386
|
__name(hashDelete, "hashDelete");
|
|
6464
6387
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
6465
|
-
var objectProto$
|
|
6466
|
-
var hasOwnProperty$
|
|
6388
|
+
var objectProto$9 = Object.prototype;
|
|
6389
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
6467
6390
|
function hashGet(key) {
|
|
6468
6391
|
var data = this.__data__;
|
|
6469
6392
|
if (nativeCreate) {
|
|
6470
6393
|
var result = data[key];
|
|
6471
6394
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
6472
6395
|
}
|
|
6473
|
-
return hasOwnProperty$
|
|
6396
|
+
return hasOwnProperty$8.call(data, key) ? data[key] : void 0;
|
|
6474
6397
|
}
|
|
6475
6398
|
__name(hashGet, "hashGet");
|
|
6476
|
-
var objectProto$
|
|
6477
|
-
var hasOwnProperty$
|
|
6399
|
+
var objectProto$8 = Object.prototype;
|
|
6400
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
6478
6401
|
function hashHas(key) {
|
|
6479
6402
|
var data = this.__data__;
|
|
6480
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$
|
|
6403
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$7.call(data, key);
|
|
6481
6404
|
}
|
|
6482
6405
|
__name(hashHas, "hashHas");
|
|
6483
6406
|
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
@@ -6740,9 +6663,9 @@ function flatRest(func) {
|
|
|
6740
6663
|
__name(flatRest, "flatRest");
|
|
6741
6664
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
6742
6665
|
var objectTag$3 = "[object Object]";
|
|
6743
|
-
var funcProto = Function.prototype, objectProto$
|
|
6666
|
+
var funcProto = Function.prototype, objectProto$7 = Object.prototype;
|
|
6744
6667
|
var funcToString = funcProto.toString;
|
|
6745
|
-
var hasOwnProperty$
|
|
6668
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
6746
6669
|
var objectCtorString = funcToString.call(Object);
|
|
6747
6670
|
function isPlainObject$2(value) {
|
|
6748
6671
|
if (!isObjectLike$1(value) || baseGetTag(value) != objectTag$3) {
|
|
@@ -6752,7 +6675,7 @@ function isPlainObject$2(value) {
|
|
|
6752
6675
|
if (proto === null) {
|
|
6753
6676
|
return true;
|
|
6754
6677
|
}
|
|
6755
|
-
var Ctor = hasOwnProperty$
|
|
6678
|
+
var Ctor = hasOwnProperty$6.call(proto, "constructor") && proto.constructor;
|
|
6756
6679
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
6757
6680
|
}
|
|
6758
6681
|
__name(isPlainObject$2, "isPlainObject$2");
|
|
@@ -7181,8 +7104,8 @@ function stubArray() {
|
|
|
7181
7104
|
return [];
|
|
7182
7105
|
}
|
|
7183
7106
|
__name(stubArray, "stubArray");
|
|
7184
|
-
var objectProto$
|
|
7185
|
-
var propertyIsEnumerable = objectProto$
|
|
7107
|
+
var objectProto$6 = Object.prototype;
|
|
7108
|
+
var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
|
|
7186
7109
|
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
7187
7110
|
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object2) {
|
|
7188
7111
|
if (object2 == null) {
|
|
@@ -7250,11 +7173,11 @@ if (DataView$1 && getTag$1(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3
|
|
|
7250
7173
|
return result;
|
|
7251
7174
|
}, "getTag$1");
|
|
7252
7175
|
}
|
|
7253
|
-
var objectProto$
|
|
7254
|
-
var hasOwnProperty$
|
|
7176
|
+
var objectProto$5 = Object.prototype;
|
|
7177
|
+
var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
|
|
7255
7178
|
function initCloneArray(array2) {
|
|
7256
7179
|
var length = array2.length, result = new array2.constructor(length);
|
|
7257
|
-
if (length && typeof array2[0] == "string" && hasOwnProperty$
|
|
7180
|
+
if (length && typeof array2[0] == "string" && hasOwnProperty$5.call(array2, "index")) {
|
|
7258
7181
|
result.index = array2.index;
|
|
7259
7182
|
result.input = array2.input;
|
|
7260
7183
|
}
|
|
@@ -7568,8 +7491,8 @@ function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
7568
7491
|
}
|
|
7569
7492
|
__name(equalByTag, "equalByTag");
|
|
7570
7493
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
7571
|
-
var objectProto$
|
|
7572
|
-
var hasOwnProperty$
|
|
7494
|
+
var objectProto$4 = Object.prototype;
|
|
7495
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
7573
7496
|
function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
7574
7497
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
7575
7498
|
if (objLength != othLength && !isPartial) {
|
|
@@ -7578,7 +7501,7 @@ function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7578
7501
|
var index2 = objLength;
|
|
7579
7502
|
while (index2--) {
|
|
7580
7503
|
var key = objProps[index2];
|
|
7581
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
7504
|
+
if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) {
|
|
7582
7505
|
return false;
|
|
7583
7506
|
}
|
|
7584
7507
|
}
|
|
@@ -7616,8 +7539,8 @@ function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7616
7539
|
__name(equalObjects, "equalObjects");
|
|
7617
7540
|
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
7618
7541
|
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
7619
|
-
var objectProto$
|
|
7620
|
-
var hasOwnProperty$
|
|
7542
|
+
var objectProto$3 = Object.prototype;
|
|
7543
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
7621
7544
|
function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
7622
7545
|
var objIsArr = isArray$2(object2), othIsArr = isArray$2(other), objTag = objIsArr ? arrayTag : getTag$1(object2), othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
7623
7546
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
@@ -7635,7 +7558,7 @@ function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack)
|
|
|
7635
7558
|
return objIsArr || isTypedArray(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
7636
7559
|
}
|
|
7637
7560
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
7638
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
7561
|
+
var objIsWrapped = objIsObj && hasOwnProperty$3.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$3.call(other, "__wrapped__");
|
|
7639
7562
|
if (objIsWrapped || othIsWrapped) {
|
|
7640
7563
|
var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
7641
7564
|
stack || (stack = new Stack());
|
|
@@ -7851,7 +7774,7 @@ var now = /* @__PURE__ */ __name(function() {
|
|
|
7851
7774
|
return root$4.Date.now();
|
|
7852
7775
|
}, "now");
|
|
7853
7776
|
var FUNC_ERROR_TEXT$2 = "Expected a function";
|
|
7854
|
-
var nativeMax$
|
|
7777
|
+
var nativeMax$2 = Math.max, nativeMin$1 = Math.min;
|
|
7855
7778
|
function debounce(func, wait, options) {
|
|
7856
7779
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
7857
7780
|
if (typeof func != "function") {
|
|
@@ -7861,7 +7784,7 @@ function debounce(func, wait, options) {
|
|
|
7861
7784
|
if (isObject$2(options)) {
|
|
7862
7785
|
leading = !!options.leading;
|
|
7863
7786
|
maxing = "maxWait" in options;
|
|
7864
|
-
maxWait = maxing ? nativeMax$
|
|
7787
|
+
maxWait = maxing ? nativeMax$2(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
7865
7788
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
7866
7789
|
}
|
|
7867
7790
|
function invokeFunc(time) {
|
|
@@ -8031,12 +7954,12 @@ function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
|
8031
7954
|
__name(baseMerge, "baseMerge");
|
|
8032
7955
|
var LARGE_ARRAY_SIZE$1 = 200;
|
|
8033
7956
|
function baseDifference(array2, values2, iteratee, comparator) {
|
|
8034
|
-
var index2 = -1,
|
|
7957
|
+
var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array2.length, result = [], valuesLength = values2.length;
|
|
8035
7958
|
if (!length) {
|
|
8036
7959
|
return result;
|
|
8037
7960
|
}
|
|
8038
7961
|
if (values2.length >= LARGE_ARRAY_SIZE$1) {
|
|
8039
|
-
|
|
7962
|
+
includes2 = cacheHas;
|
|
8040
7963
|
isCommon = false;
|
|
8041
7964
|
values2 = new SetCache(values2);
|
|
8042
7965
|
}
|
|
@@ -8052,7 +7975,7 @@ function baseDifference(array2, values2, iteratee, comparator) {
|
|
|
8052
7975
|
}
|
|
8053
7976
|
}
|
|
8054
7977
|
result.push(value);
|
|
8055
|
-
} else if (!
|
|
7978
|
+
} else if (!includes2(values2, computed3, comparator)) {
|
|
8056
7979
|
result.push(value);
|
|
8057
7980
|
}
|
|
8058
7981
|
}
|
|
@@ -8067,15 +7990,6 @@ function last$1(array2) {
|
|
|
8067
7990
|
return length ? array2[length - 1] : void 0;
|
|
8068
7991
|
}
|
|
8069
7992
|
__name(last$1, "last$1");
|
|
8070
|
-
function drop(array2, n2, guard) {
|
|
8071
|
-
var length = array2 == null ? 0 : array2.length;
|
|
8072
|
-
if (!length) {
|
|
8073
|
-
return [];
|
|
8074
|
-
}
|
|
8075
|
-
n2 = n2 === void 0 ? 1 : toInteger(n2);
|
|
8076
|
-
return baseSlice(array2, n2 < 0 ? 0 : n2, length);
|
|
8077
|
-
}
|
|
8078
|
-
__name(drop, "drop");
|
|
8079
7993
|
function castFunction(value) {
|
|
8080
7994
|
return typeof value == "function" ? value : identity$1;
|
|
8081
7995
|
}
|
|
@@ -8085,16 +7999,6 @@ function forEach(collection, iteratee) {
|
|
|
8085
7999
|
return func(collection, castFunction(iteratee));
|
|
8086
8000
|
}
|
|
8087
8001
|
__name(forEach, "forEach");
|
|
8088
|
-
function endsWith$1(string2, target, position2) {
|
|
8089
|
-
string2 = toString$4(string2);
|
|
8090
|
-
target = baseToString$1(target);
|
|
8091
|
-
var length = string2.length;
|
|
8092
|
-
position2 = position2 === void 0 ? length : baseClamp(toInteger(position2), 0, length);
|
|
8093
|
-
var end2 = position2;
|
|
8094
|
-
position2 -= target.length;
|
|
8095
|
-
return position2 >= 0 && string2.slice(position2, end2) == target;
|
|
8096
|
-
}
|
|
8097
|
-
__name(endsWith$1, "endsWith$1");
|
|
8098
8002
|
function arrayEvery(array2, predicate) {
|
|
8099
8003
|
var index2 = -1, length = array2 == null ? 0 : array2.length;
|
|
8100
8004
|
while (++index2 < length) {
|
|
@@ -8155,6 +8059,16 @@ function baseGt(value, other) {
|
|
|
8155
8059
|
return value > other;
|
|
8156
8060
|
}
|
|
8157
8061
|
__name(baseGt, "baseGt");
|
|
8062
|
+
var objectProto$2 = Object.prototype;
|
|
8063
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
8064
|
+
function baseHas(object2, key) {
|
|
8065
|
+
return object2 != null && hasOwnProperty$2.call(object2, key);
|
|
8066
|
+
}
|
|
8067
|
+
__name(baseHas, "baseHas");
|
|
8068
|
+
function has$1(object2, path2) {
|
|
8069
|
+
return object2 != null && hasPath(object2, path2, baseHas);
|
|
8070
|
+
}
|
|
8071
|
+
__name(has$1, "has$1");
|
|
8158
8072
|
var stringTag = "[object String]";
|
|
8159
8073
|
function isString$1(value) {
|
|
8160
8074
|
return typeof value == "string" || !isArray$2(value) && isObjectLike$1(value) && baseGetTag(value) == stringTag;
|
|
@@ -8170,6 +8084,17 @@ function values(object2) {
|
|
|
8170
8084
|
return object2 == null ? [] : baseValues(object2, keys$1(object2));
|
|
8171
8085
|
}
|
|
8172
8086
|
__name(values, "values");
|
|
8087
|
+
var nativeMax$1 = Math.max;
|
|
8088
|
+
function includes(collection, value, fromIndex, guard) {
|
|
8089
|
+
collection = isArrayLike(collection) ? collection : values(collection);
|
|
8090
|
+
fromIndex = fromIndex && true ? toInteger(fromIndex) : 0;
|
|
8091
|
+
var length = collection.length;
|
|
8092
|
+
if (fromIndex < 0) {
|
|
8093
|
+
fromIndex = nativeMax$1(length + fromIndex, 0);
|
|
8094
|
+
}
|
|
8095
|
+
return isString$1(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
8096
|
+
}
|
|
8097
|
+
__name(includes, "includes");
|
|
8173
8098
|
function baseInverter(object2, setter, iteratee, accumulator) {
|
|
8174
8099
|
baseForOwn(object2, function(value, key, object3) {
|
|
8175
8100
|
setter(accumulator, iteratee(value), key, object3);
|
|
@@ -8230,15 +8155,15 @@ function isEqualWith(value, other, customizer) {
|
|
|
8230
8155
|
return result === void 0 ? baseIsEqual(value, other, void 0, customizer) : !!result;
|
|
8231
8156
|
}
|
|
8232
8157
|
__name(isEqualWith, "isEqualWith");
|
|
8233
|
-
function isInteger(value) {
|
|
8234
|
-
return typeof value == "number" && value == toInteger(value);
|
|
8235
|
-
}
|
|
8236
|
-
__name(isInteger, "isInteger");
|
|
8237
8158
|
var numberTag = "[object Number]";
|
|
8238
8159
|
function isNumber$1(value) {
|
|
8239
8160
|
return typeof value == "number" || isObjectLike$1(value) && baseGetTag(value) == numberTag;
|
|
8240
8161
|
}
|
|
8241
8162
|
__name(isNumber$1, "isNumber$1");
|
|
8163
|
+
function isNull(value) {
|
|
8164
|
+
return value === null;
|
|
8165
|
+
}
|
|
8166
|
+
__name(isNull, "isNull");
|
|
8242
8167
|
function isUndefined(value) {
|
|
8243
8168
|
return value === void 0;
|
|
8244
8169
|
}
|
|
@@ -8695,14 +8620,14 @@ var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? n
|
|
|
8695
8620
|
};
|
|
8696
8621
|
var LARGE_ARRAY_SIZE = 200;
|
|
8697
8622
|
function baseUniq(array2, iteratee, comparator) {
|
|
8698
|
-
var index2 = -1,
|
|
8623
|
+
var index2 = -1, includes2 = arrayIncludes, length = array2.length, isCommon = true, result = [], seen = result;
|
|
8699
8624
|
if (length >= LARGE_ARRAY_SIZE) {
|
|
8700
8625
|
var set5 = iteratee ? null : createSet(array2);
|
|
8701
8626
|
if (set5) {
|
|
8702
8627
|
return setToArray(set5);
|
|
8703
8628
|
}
|
|
8704
8629
|
isCommon = false;
|
|
8705
|
-
|
|
8630
|
+
includes2 = cacheHas;
|
|
8706
8631
|
seen = new SetCache();
|
|
8707
8632
|
} else {
|
|
8708
8633
|
seen = iteratee ? [] : result;
|
|
@@ -8722,7 +8647,7 @@ function baseUniq(array2, iteratee, comparator) {
|
|
|
8722
8647
|
seen.push(computed3);
|
|
8723
8648
|
}
|
|
8724
8649
|
result.push(value);
|
|
8725
|
-
} else if (!
|
|
8650
|
+
} else if (!includes2(seen, computed3, comparator)) {
|
|
8726
8651
|
if (seen !== result) {
|
|
8727
8652
|
seen.push(computed3);
|
|
8728
8653
|
}
|
|
@@ -8732,10 +8657,6 @@ function baseUniq(array2, iteratee, comparator) {
|
|
|
8732
8657
|
return result;
|
|
8733
8658
|
}
|
|
8734
8659
|
__name(baseUniq, "baseUniq");
|
|
8735
|
-
function uniq(array2) {
|
|
8736
|
-
return array2 && array2.length ? baseUniq(array2) : [];
|
|
8737
|
-
}
|
|
8738
|
-
__name(uniq, "uniq");
|
|
8739
8660
|
function uniqBy(array2, iteratee) {
|
|
8740
8661
|
return array2 && array2.length ? baseUniq(array2, baseIteratee(iteratee)) : [];
|
|
8741
8662
|
}
|
|
@@ -19464,293 +19385,414 @@ function requireLib$1() {
|
|
|
19464
19385
|
__name(requireLib$1, "requireLib$1");
|
|
19465
19386
|
var libExports$1 = /* @__PURE__ */ requireLib$1();
|
|
19466
19387
|
const queryString = /* @__PURE__ */ getDefaultExportFromCjs(libExports$1);
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
}, "u") }, g2 = "en", D2 = {};
|
|
19497
|
-
D2[g2] = M2;
|
|
19498
|
-
var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t3) {
|
|
19499
|
-
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
|
19500
|
-
}, "S"), w2 = /* @__PURE__ */ __name(function t3(e2, n3, r3) {
|
|
19501
|
-
var i3;
|
|
19502
|
-
if (!e2) return g2;
|
|
19503
|
-
if ("string" == typeof e2) {
|
|
19504
|
-
var s3 = e2.toLowerCase();
|
|
19505
|
-
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
|
19506
|
-
var u3 = e2.split("-");
|
|
19507
|
-
if (!i3 && u3.length > 1) return t3(u3[0]);
|
|
19508
|
-
} else {
|
|
19509
|
-
var a3 = e2.name;
|
|
19510
|
-
D2[a3] = e2, i3 = a3;
|
|
19388
|
+
function tableQueryParamsToHasuraClauses({
|
|
19389
|
+
page,
|
|
19390
|
+
pageSize,
|
|
19391
|
+
searchTerm,
|
|
19392
|
+
filters,
|
|
19393
|
+
order: order2,
|
|
19394
|
+
schema,
|
|
19395
|
+
// Add schema as a parameter
|
|
19396
|
+
additionalFilter
|
|
19397
|
+
}) {
|
|
19398
|
+
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19399
|
+
let where = {};
|
|
19400
|
+
const order_by = {};
|
|
19401
|
+
const limit = pageSize || 25;
|
|
19402
|
+
const offset3 = page && pageSize ? (page - 1) * pageSize : 0;
|
|
19403
|
+
if (searchTerm) {
|
|
19404
|
+
const searchTermFilters = [];
|
|
19405
|
+
schema.fields.forEach((field) => {
|
|
19406
|
+
const { type: type2, path: path2, searchDisabled } = field;
|
|
19407
|
+
if (searchDisabled || field.filterDisabled || type2 === "color") return;
|
|
19408
|
+
const filterValue = searchTerm;
|
|
19409
|
+
if (type2 === "string" || type2 === "lookup") {
|
|
19410
|
+
const o2 = set$1({}, path2, { _ilike: `%${filterValue}%` });
|
|
19411
|
+
searchTermFilters.push(o2);
|
|
19412
|
+
} else if (type2 === "boolean") {
|
|
19413
|
+
let regex;
|
|
19414
|
+
try {
|
|
19415
|
+
regex = new RegExp("^" + searchTerm, "ig");
|
|
19416
|
+
} catch (error) {
|
|
19511
19417
|
}
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19519
|
-
|
|
19520
|
-
};
|
|
19521
|
-
var _2 = function() {
|
|
19522
|
-
function M3(t3) {
|
|
19523
|
-
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
|
19418
|
+
if (regex) {
|
|
19419
|
+
if ("true".replace(regex, "") !== "true") {
|
|
19420
|
+
const o2 = set$1({}, path2, { _eq: true });
|
|
19421
|
+
searchTermFilters.push(o2);
|
|
19422
|
+
} else if ("false".replace(regex, "") !== "false") {
|
|
19423
|
+
const o2 = set$1({}, path2, { _eq: false });
|
|
19424
|
+
searchTermFilters.push(o2);
|
|
19425
|
+
}
|
|
19524
19426
|
}
|
|
19525
|
-
|
|
19526
|
-
|
|
19527
|
-
|
|
19528
|
-
|
|
19529
|
-
|
|
19530
|
-
|
|
19531
|
-
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19427
|
+
} else if ((type2 === "number" || type2 === "integer") && !isNaN(filterValue)) {
|
|
19428
|
+
const o2 = set$1({}, path2, { _eq: parseFloat(filterValue) });
|
|
19429
|
+
searchTermFilters.push(o2);
|
|
19430
|
+
}
|
|
19431
|
+
});
|
|
19432
|
+
if (searchTermFilters.length > 0) {
|
|
19433
|
+
if (Object.keys(where).length > 0) {
|
|
19434
|
+
where = { _and: [where, { _or: searchTermFilters }] };
|
|
19435
|
+
} else {
|
|
19436
|
+
where = { _or: searchTermFilters };
|
|
19437
|
+
}
|
|
19438
|
+
}
|
|
19439
|
+
}
|
|
19440
|
+
if (filters && filters.length > 0) {
|
|
19441
|
+
const filterClauses = filters.map((filter2) => {
|
|
19442
|
+
let { selectedFilter, filterOn, filterValue } = filter2;
|
|
19443
|
+
const fieldSchema = ccFields[filterOn] || {};
|
|
19444
|
+
const { path: path2, reference: reference2, type: type2 } = fieldSchema;
|
|
19445
|
+
let stringFilterValue = filterValue && filterValue.toString ? filterValue.toString() : filterValue;
|
|
19446
|
+
if (stringFilterValue === false) {
|
|
19447
|
+
stringFilterValue = "false";
|
|
19448
|
+
} else {
|
|
19449
|
+
stringFilterValue = stringFilterValue || "";
|
|
19450
|
+
}
|
|
19451
|
+
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split(";");
|
|
19452
|
+
if (type2 === "number" || type2 === "integer") {
|
|
19453
|
+
filterValue = Array.isArray(filterValue) ? filterValue.map((val) => Number(val)) : Number(filterValue);
|
|
19454
|
+
}
|
|
19455
|
+
if (fieldSchema.normalizeFilter) {
|
|
19456
|
+
filterValue = fieldSchema.normalizeFilter(
|
|
19457
|
+
filterValue,
|
|
19458
|
+
selectedFilter,
|
|
19459
|
+
filterOn
|
|
19460
|
+
);
|
|
19461
|
+
}
|
|
19462
|
+
if (reference2) {
|
|
19463
|
+
filterOn = reference2.sourceField;
|
|
19464
|
+
} else {
|
|
19465
|
+
filterOn = path2 || filterOn;
|
|
19466
|
+
}
|
|
19467
|
+
switch (selectedFilter) {
|
|
19468
|
+
case "none":
|
|
19469
|
+
return {};
|
|
19470
|
+
case "startsWith":
|
|
19471
|
+
return { [filterOn]: { _ilike: `${filterValue}%` } };
|
|
19472
|
+
case "endsWith":
|
|
19473
|
+
return { [filterOn]: { _ilike: `%${filterValue}` } };
|
|
19474
|
+
case "contains":
|
|
19475
|
+
return { [filterOn]: { _ilike: `%${filterValue}%` } };
|
|
19476
|
+
case "notContains":
|
|
19477
|
+
return { [filterOn]: { _not_ilike: `%${filterValue}%` } };
|
|
19478
|
+
case "isExactly":
|
|
19479
|
+
return { [filterOn]: { _eq: filterValue } };
|
|
19480
|
+
case "isEmpty":
|
|
19481
|
+
return {
|
|
19482
|
+
_or: [
|
|
19483
|
+
{ [filterOn]: { _eq: "" } },
|
|
19484
|
+
{ [filterOn]: { _is_null: true } }
|
|
19485
|
+
]
|
|
19486
|
+
};
|
|
19487
|
+
case "notEmpty":
|
|
19488
|
+
return {
|
|
19489
|
+
_and: [
|
|
19490
|
+
{ [filterOn]: { _neq: "" } },
|
|
19491
|
+
{ [filterOn]: { _is_null: false } }
|
|
19492
|
+
]
|
|
19493
|
+
};
|
|
19494
|
+
case "inList":
|
|
19495
|
+
return { [filterOn]: { _in: filterValue } };
|
|
19496
|
+
case "notInList":
|
|
19497
|
+
return { [filterOn]: { _nin: filterValue } };
|
|
19498
|
+
case "true":
|
|
19499
|
+
return { [filterOn]: { _eq: true } };
|
|
19500
|
+
case "false":
|
|
19501
|
+
return { [filterOn]: { _eq: false } };
|
|
19502
|
+
case "dateIs":
|
|
19503
|
+
return { [filterOn]: { _eq: filterValue } };
|
|
19504
|
+
case "notBetween":
|
|
19505
|
+
return {
|
|
19506
|
+
_or: [
|
|
19507
|
+
{
|
|
19508
|
+
[filterOn]: {
|
|
19509
|
+
_lt: new Date(arrayFilterValue[0])
|
|
19510
|
+
}
|
|
19511
|
+
},
|
|
19512
|
+
{
|
|
19513
|
+
[filterOn]: {
|
|
19514
|
+
_gt: new Date(
|
|
19515
|
+
new Date(arrayFilterValue[1]).setHours(23, 59)
|
|
19516
|
+
)
|
|
19517
|
+
}
|
|
19538
19518
|
}
|
|
19519
|
+
]
|
|
19520
|
+
};
|
|
19521
|
+
case "isBetween":
|
|
19522
|
+
return {
|
|
19523
|
+
[filterOn]: {
|
|
19524
|
+
_gte: new Date(arrayFilterValue[0]),
|
|
19525
|
+
_lte: new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
19539
19526
|
}
|
|
19540
|
-
return new Date(e2);
|
|
19541
|
-
}(t3), this.init();
|
|
19542
|
-
}, m3.init = function() {
|
|
19543
|
-
var t3 = this.$d;
|
|
19544
|
-
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();
|
|
19545
|
-
}, m3.$utils = function() {
|
|
19546
|
-
return b2;
|
|
19547
|
-
}, m3.isValid = function() {
|
|
19548
|
-
return !(this.$d.toString() === l2);
|
|
19549
|
-
}, m3.isSame = function(t3, e2) {
|
|
19550
|
-
var n3 = O2(t3);
|
|
19551
|
-
return this.startOf(e2) <= n3 && n3 <= this.endOf(e2);
|
|
19552
|
-
}, m3.isAfter = function(t3, e2) {
|
|
19553
|
-
return O2(t3) < this.startOf(e2);
|
|
19554
|
-
}, m3.isBefore = function(t3, e2) {
|
|
19555
|
-
return this.endOf(e2) < O2(t3);
|
|
19556
|
-
}, m3.$g = function(t3, e2, n3) {
|
|
19557
|
-
return b2.u(t3) ? this[e2] : this.set(n3, t3);
|
|
19558
|
-
}, m3.unix = function() {
|
|
19559
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
19560
|
-
}, m3.valueOf = function() {
|
|
19561
|
-
return this.$d.getTime();
|
|
19562
|
-
}, m3.startOf = function(t3, e2) {
|
|
19563
|
-
var n3 = this, r3 = !!b2.u(e2) || e2, f3 = b2.p(t3), l3 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
19564
|
-
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e3, t4) : new Date(n3.$y, e3, t4), n3);
|
|
19565
|
-
return r3 ? i3 : i3.endOf(a2);
|
|
19566
|
-
}, "l"), $2 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
19567
|
-
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n3);
|
|
19568
|
-
}, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
|
19569
|
-
switch (f3) {
|
|
19570
|
-
case h2:
|
|
19571
|
-
return r3 ? l3(1, 0) : l3(31, 11);
|
|
19572
|
-
case c2:
|
|
19573
|
-
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
|
19574
|
-
case o2:
|
|
19575
|
-
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
|
19576
|
-
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
|
19577
|
-
case a2:
|
|
19578
|
-
case d2:
|
|
19579
|
-
return $2(v3 + "Hours", 0);
|
|
19580
|
-
case u2:
|
|
19581
|
-
return $2(v3 + "Minutes", 1);
|
|
19582
|
-
case s2:
|
|
19583
|
-
return $2(v3 + "Seconds", 2);
|
|
19584
|
-
case i2:
|
|
19585
|
-
return $2(v3 + "Milliseconds", 3);
|
|
19586
|
-
default:
|
|
19587
|
-
return this.clone();
|
|
19588
|
-
}
|
|
19589
|
-
}, m3.endOf = function(t3) {
|
|
19590
|
-
return this.startOf(t3, false);
|
|
19591
|
-
}, m3.$set = function(t3, e2) {
|
|
19592
|
-
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;
|
|
19593
|
-
if (o3 === c2 || o3 === h2) {
|
|
19594
|
-
var y3 = this.clone().set(d2, 1);
|
|
19595
|
-
y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
|
19596
|
-
} else l3 && this.$d[l3]($2);
|
|
19597
|
-
return this.init(), this;
|
|
19598
|
-
}, m3.set = function(t3, e2) {
|
|
19599
|
-
return this.clone().$set(t3, e2);
|
|
19600
|
-
}, m3.get = function(t3) {
|
|
19601
|
-
return this[b2.p(t3)]();
|
|
19602
|
-
}, m3.add = function(r3, f3) {
|
|
19603
|
-
var d3, l3 = this;
|
|
19604
|
-
r3 = Number(r3);
|
|
19605
|
-
var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t3) {
|
|
19606
|
-
var e2 = O2(l3);
|
|
19607
|
-
return b2.w(e2.date(e2.date() + Math.round(t3 * r3)), l3);
|
|
19608
|
-
}, "y");
|
|
19609
|
-
if ($2 === c2) return this.set(c2, this.$M + r3);
|
|
19610
|
-
if ($2 === h2) return this.set(h2, this.$y + r3);
|
|
19611
|
-
if ($2 === a2) return y3(1);
|
|
19612
|
-
if ($2 === o2) return y3(7);
|
|
19613
|
-
var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n2, d3[i2] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
|
|
19614
|
-
return b2.w(m4, this);
|
|
19615
|
-
}, m3.subtract = function(t3, e2) {
|
|
19616
|
-
return this.add(-1 * t3, e2);
|
|
19617
|
-
}, m3.format = function(t3) {
|
|
19618
|
-
var e2 = this, n3 = this.$locale();
|
|
19619
|
-
if (!this.isValid()) return n3.invalidDate || l2;
|
|
19620
|
-
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) {
|
|
19621
|
-
return t4 && (t4[n4] || t4(e2, r3)) || i4[n4].slice(0, s4);
|
|
19622
|
-
}, "h"), d3 = /* @__PURE__ */ __name(function(t4) {
|
|
19623
|
-
return b2.s(s3 % 12 || 12, t4, "0");
|
|
19624
|
-
}, "d"), $2 = f3 || function(t4, e3, n4) {
|
|
19625
|
-
var r4 = t4 < 12 ? "AM" : "PM";
|
|
19626
|
-
return n4 ? r4.toLowerCase() : r4;
|
|
19627
19527
|
};
|
|
19628
|
-
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
19655
|
-
case "H":
|
|
19656
|
-
return String(s3);
|
|
19657
|
-
case "HH":
|
|
19658
|
-
return b2.s(s3, 2, "0");
|
|
19659
|
-
case "h":
|
|
19660
|
-
return d3(1);
|
|
19661
|
-
case "hh":
|
|
19662
|
-
return d3(2);
|
|
19663
|
-
case "a":
|
|
19664
|
-
return $2(s3, u3, true);
|
|
19665
|
-
case "A":
|
|
19666
|
-
return $2(s3, u3, false);
|
|
19667
|
-
case "m":
|
|
19668
|
-
return String(u3);
|
|
19669
|
-
case "mm":
|
|
19670
|
-
return b2.s(u3, 2, "0");
|
|
19671
|
-
case "s":
|
|
19672
|
-
return String(e2.$s);
|
|
19673
|
-
case "ss":
|
|
19674
|
-
return b2.s(e2.$s, 2, "0");
|
|
19675
|
-
case "SSS":
|
|
19676
|
-
return b2.s(e2.$ms, 3, "0");
|
|
19677
|
-
case "Z":
|
|
19678
|
-
return i3;
|
|
19528
|
+
case "isBefore":
|
|
19529
|
+
return { [filterOn]: { _lt: new Date(filterValue) } };
|
|
19530
|
+
case "isAfter":
|
|
19531
|
+
return { [filterOn]: { _gt: new Date(filterValue) } };
|
|
19532
|
+
case "greaterThan":
|
|
19533
|
+
return { [filterOn]: { _gt: parseFloat(filterValue) } };
|
|
19534
|
+
case "lessThan":
|
|
19535
|
+
return { [filterOn]: { _lt: parseFloat(filterValue) } };
|
|
19536
|
+
case "inRange":
|
|
19537
|
+
return {
|
|
19538
|
+
[filterOn]: {
|
|
19539
|
+
_gte: parseFloat(arrayFilterValue[0]),
|
|
19540
|
+
_lte: parseFloat(arrayFilterValue[1])
|
|
19541
|
+
}
|
|
19542
|
+
};
|
|
19543
|
+
case "outsideRange":
|
|
19544
|
+
return {
|
|
19545
|
+
_or: [
|
|
19546
|
+
{
|
|
19547
|
+
[filterOn]: {
|
|
19548
|
+
_lt: parseFloat(arrayFilterValue[0])
|
|
19549
|
+
}
|
|
19550
|
+
},
|
|
19551
|
+
{
|
|
19552
|
+
[filterOn]: {
|
|
19553
|
+
_gt: parseFloat(arrayFilterValue[1])
|
|
19554
|
+
}
|
|
19679
19555
|
}
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19556
|
+
]
|
|
19557
|
+
};
|
|
19558
|
+
case "equalTo":
|
|
19559
|
+
return {
|
|
19560
|
+
[filterOn]: {
|
|
19561
|
+
_eq: type2 === "number" || type2 === "integer" ? parseFloat(filterValue) : filterValue
|
|
19562
|
+
}
|
|
19563
|
+
};
|
|
19564
|
+
case "regex":
|
|
19565
|
+
return { [filterOn]: { _regex: filterValue } };
|
|
19566
|
+
default:
|
|
19567
|
+
console.warn(`Unsupported filter type: ${selectedFilter}`);
|
|
19568
|
+
return {};
|
|
19569
|
+
}
|
|
19570
|
+
}).map((filter2) => {
|
|
19571
|
+
const o2 = {};
|
|
19572
|
+
set$1(o2, Object.keys(filter2)[0], filter2[Object.keys(filter2)[0]]);
|
|
19573
|
+
return o2;
|
|
19574
|
+
});
|
|
19575
|
+
if (filterClauses.length > 0) {
|
|
19576
|
+
if (Object.keys(where).length > 0) {
|
|
19577
|
+
where = { _and: [where, ...filterClauses] };
|
|
19578
|
+
} else {
|
|
19579
|
+
where = { _and: filterClauses };
|
|
19580
|
+
}
|
|
19581
|
+
}
|
|
19582
|
+
}
|
|
19583
|
+
if (order2 && order2.length > 0) {
|
|
19584
|
+
order2.forEach((item) => {
|
|
19585
|
+
const field = item.startsWith("-") ? item.substring(1) : item;
|
|
19586
|
+
const direction = item.startsWith("-") ? "desc" : "asc";
|
|
19587
|
+
order_by[field] = direction;
|
|
19588
|
+
});
|
|
19589
|
+
}
|
|
19590
|
+
if (additionalFilter) {
|
|
19591
|
+
where = { _and: [where, additionalFilter] };
|
|
19592
|
+
}
|
|
19593
|
+
return { where, order_by, limit, offset: offset3 };
|
|
19594
|
+
}
|
|
19595
|
+
__name(tableQueryParamsToHasuraClauses, "tableQueryParamsToHasuraClauses");
|
|
19596
|
+
function getFieldsMappedByCCDisplayName(schema) {
|
|
19597
|
+
if (!schema || !schema.fields) return {};
|
|
19598
|
+
return schema.fields.reduce((acc, field) => {
|
|
19599
|
+
const ccDisplayName = getCCDisplayName(field);
|
|
19600
|
+
acc[ccDisplayName] = field;
|
|
19601
|
+
return acc;
|
|
19602
|
+
}, {});
|
|
19603
|
+
}
|
|
19604
|
+
__name(getFieldsMappedByCCDisplayName, "getFieldsMappedByCCDisplayName");
|
|
19605
|
+
function getCCDisplayName(field) {
|
|
19606
|
+
return camelCase(
|
|
19607
|
+
typeof field.displayName === "string" ? field.displayName : field.path
|
|
19608
|
+
);
|
|
19609
|
+
}
|
|
19610
|
+
__name(getCCDisplayName, "getCCDisplayName");
|
|
19611
|
+
function filterLocalEntitiesToHasura(records, { where, order_by, limit, offset: offset3, isInfinite } = {}) {
|
|
19612
|
+
let filteredRecords = [...records];
|
|
19613
|
+
if (where) {
|
|
19614
|
+
filteredRecords = applyWhereClause(filteredRecords, where);
|
|
19615
|
+
}
|
|
19616
|
+
if (order_by) {
|
|
19617
|
+
filteredRecords = applyOrderBy(filteredRecords, order_by);
|
|
19618
|
+
}
|
|
19619
|
+
const allFilteredRecords = [...filteredRecords];
|
|
19620
|
+
if (!isInfinite && offset3 !== void 0) {
|
|
19621
|
+
filteredRecords = filteredRecords.slice(offset3);
|
|
19622
|
+
}
|
|
19623
|
+
if (!isInfinite && limit !== void 0) {
|
|
19624
|
+
filteredRecords = filteredRecords.slice(0, limit);
|
|
19625
|
+
}
|
|
19626
|
+
return {
|
|
19627
|
+
entities: filteredRecords,
|
|
19628
|
+
entitiesAcrossPages: allFilteredRecords,
|
|
19629
|
+
entityCount: allFilteredRecords.length
|
|
19630
|
+
};
|
|
19631
|
+
}
|
|
19632
|
+
__name(filterLocalEntitiesToHasura, "filterLocalEntitiesToHasura");
|
|
19633
|
+
function applyWhereClause(records, where) {
|
|
19634
|
+
function applyFilter(record, filter2) {
|
|
19635
|
+
if (isEmpty$1(filter2)) {
|
|
19636
|
+
return true;
|
|
19637
|
+
}
|
|
19638
|
+
for (const key in filter2) {
|
|
19639
|
+
if (key === "_and") {
|
|
19640
|
+
if (isEmpty$1(filter2[key])) {
|
|
19641
|
+
continue;
|
|
19642
|
+
}
|
|
19643
|
+
if (!every(filter2[key], (subFilter) => applyFilter(record, subFilter))) {
|
|
19644
|
+
return false;
|
|
19645
|
+
}
|
|
19646
|
+
} else if (key === "_or") {
|
|
19647
|
+
if (isEmpty$1(filter2[key])) {
|
|
19648
|
+
continue;
|
|
19649
|
+
}
|
|
19650
|
+
if (!some(filter2[key], (subFilter) => applyFilter(record, subFilter))) {
|
|
19651
|
+
return false;
|
|
19652
|
+
}
|
|
19653
|
+
} else if (key === "_not") {
|
|
19654
|
+
if (applyFilter(record, filter2[key])) {
|
|
19655
|
+
return false;
|
|
19656
|
+
}
|
|
19657
|
+
} else {
|
|
19658
|
+
const value = record[key];
|
|
19659
|
+
const conditions = filter2[key];
|
|
19660
|
+
if (isObject$2(value) && isObject$2(conditions) && !hasOperator(conditions)) {
|
|
19661
|
+
return applyFilter(value, conditions);
|
|
19662
|
+
}
|
|
19663
|
+
for (const operator in conditions) {
|
|
19664
|
+
const conditionValue = conditions[operator];
|
|
19665
|
+
if (operator === "_gt" && conditions._lt) {
|
|
19666
|
+
if (!(value > conditionValue && value < conditions._lt))
|
|
19667
|
+
return false;
|
|
19668
|
+
continue;
|
|
19669
|
+
}
|
|
19670
|
+
if (operator === "_gte" && conditions._lte) {
|
|
19671
|
+
if (!(value >= conditionValue && value <= conditions._lte))
|
|
19672
|
+
return false;
|
|
19673
|
+
continue;
|
|
19674
|
+
}
|
|
19675
|
+
switch (operator) {
|
|
19676
|
+
case "_eq":
|
|
19677
|
+
if (!isEqual(value, conditionValue)) return false;
|
|
19692
19678
|
break;
|
|
19693
|
-
case
|
|
19694
|
-
|
|
19679
|
+
case "_neq":
|
|
19680
|
+
if (isEqual(value, conditionValue)) return false;
|
|
19695
19681
|
break;
|
|
19696
|
-
case
|
|
19697
|
-
|
|
19682
|
+
case "_gt":
|
|
19683
|
+
if (!(value > conditionValue)) return false;
|
|
19698
19684
|
break;
|
|
19699
|
-
case
|
|
19700
|
-
|
|
19685
|
+
case "_gte":
|
|
19686
|
+
if (!(value >= conditionValue)) return false;
|
|
19701
19687
|
break;
|
|
19702
|
-
case
|
|
19703
|
-
|
|
19688
|
+
case "_lt":
|
|
19689
|
+
if (!(value < conditionValue)) return false;
|
|
19704
19690
|
break;
|
|
19705
|
-
case
|
|
19706
|
-
|
|
19691
|
+
case "_lte":
|
|
19692
|
+
if (!(value <= conditionValue)) return false;
|
|
19707
19693
|
break;
|
|
19708
|
-
case
|
|
19709
|
-
$
|
|
19694
|
+
case "_like":
|
|
19695
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19696
|
+
return false;
|
|
19710
19697
|
break;
|
|
19711
|
-
case
|
|
19712
|
-
$
|
|
19698
|
+
case "_ilike":
|
|
19699
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*"), "i").test(value))
|
|
19700
|
+
return false;
|
|
19701
|
+
break;
|
|
19702
|
+
case "_nlike":
|
|
19703
|
+
if (!isString$1(value) || new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19704
|
+
return false;
|
|
19705
|
+
break;
|
|
19706
|
+
case "_nilike":
|
|
19707
|
+
if (!isString$1(value) || new RegExp(conditionValue.replace(/%/g, ".*"), "i").test(value))
|
|
19708
|
+
return false;
|
|
19709
|
+
break;
|
|
19710
|
+
case "_starts_with":
|
|
19711
|
+
if (!isString$1(value) || !value.startsWith(conditionValue))
|
|
19712
|
+
return false;
|
|
19713
|
+
break;
|
|
19714
|
+
case "_ends_with":
|
|
19715
|
+
if (!isString$1(value) || !value.endsWith(conditionValue))
|
|
19716
|
+
return false;
|
|
19717
|
+
break;
|
|
19718
|
+
case "_is_null":
|
|
19719
|
+
if (conditionValue && !isNull(value) || !conditionValue && isNull(value))
|
|
19720
|
+
return false;
|
|
19721
|
+
break;
|
|
19722
|
+
case "_contains":
|
|
19723
|
+
if (!isArray$2(value) || !every(conditionValue, (item) => includes(value, item)))
|
|
19724
|
+
return false;
|
|
19725
|
+
break;
|
|
19726
|
+
case "_contained_in":
|
|
19727
|
+
if (!isArray$2(value) || !every(value, (item) => includes(conditionValue, item)))
|
|
19728
|
+
return false;
|
|
19729
|
+
break;
|
|
19730
|
+
case "_has_key":
|
|
19731
|
+
if (!isObject$2(value) || !has$1(value, conditionValue)) return false;
|
|
19732
|
+
break;
|
|
19733
|
+
case "_has_keys_any":
|
|
19734
|
+
if (!isObject$2(value) || !some(conditionValue, (item) => has$1(value, item)))
|
|
19735
|
+
return false;
|
|
19736
|
+
break;
|
|
19737
|
+
case "_has_keys_all":
|
|
19738
|
+
if (!isObject$2(value) || !every(conditionValue, (item) => has$1(value, item)))
|
|
19739
|
+
return false;
|
|
19740
|
+
break;
|
|
19741
|
+
case "_similar":
|
|
19742
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19743
|
+
return false;
|
|
19713
19744
|
break;
|
|
19714
19745
|
default:
|
|
19715
|
-
|
|
19746
|
+
if (operator.startsWith("_")) {
|
|
19747
|
+
console.warn(`Unsupported operator: ${operator}`);
|
|
19748
|
+
return false;
|
|
19749
|
+
} else {
|
|
19750
|
+
console.warn(`Unsupported operator: ${operator}`);
|
|
19751
|
+
return false;
|
|
19752
|
+
}
|
|
19716
19753
|
}
|
|
19717
|
-
|
|
19718
|
-
|
|
19719
|
-
|
|
19720
|
-
|
|
19721
|
-
|
|
19722
|
-
|
|
19723
|
-
|
|
19724
|
-
|
|
19725
|
-
|
|
19726
|
-
|
|
19727
|
-
|
|
19728
|
-
|
|
19729
|
-
|
|
19730
|
-
|
|
19731
|
-
|
|
19732
|
-
|
|
19733
|
-
|
|
19734
|
-
|
|
19735
|
-
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
|
|
19740
|
-
|
|
19741
|
-
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
-
|
|
19745
|
-
|
|
19746
|
-
|
|
19747
|
-
}
|
|
19748
|
-
}
|
|
19749
|
-
|
|
19750
|
-
}
|
|
19751
|
-
__name(
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
+
}
|
|
19755
|
+
}
|
|
19756
|
+
}
|
|
19757
|
+
return true;
|
|
19758
|
+
}
|
|
19759
|
+
__name(applyFilter, "applyFilter");
|
|
19760
|
+
function hasOperator(obj) {
|
|
19761
|
+
return Object.keys(obj).some((key) => key.startsWith("_"));
|
|
19762
|
+
}
|
|
19763
|
+
__name(hasOperator, "hasOperator");
|
|
19764
|
+
return records.filter((record) => applyFilter(record, where));
|
|
19765
|
+
}
|
|
19766
|
+
__name(applyWhereClause, "applyWhereClause");
|
|
19767
|
+
function applyOrderBy(records, order_by) {
|
|
19768
|
+
const keys2 = Object.keys(order_by);
|
|
19769
|
+
if (keys2.length > 0) {
|
|
19770
|
+
const field = keys2[0];
|
|
19771
|
+
const direction = order_by[field] === "asc" ? "asc" : "desc";
|
|
19772
|
+
return orderBy$1(records, [field], [direction]);
|
|
19773
|
+
}
|
|
19774
|
+
return records;
|
|
19775
|
+
}
|
|
19776
|
+
__name(applyOrderBy, "applyOrderBy");
|
|
19777
|
+
function initializeHasuraWhereAndFilter(additionalFilter, where = {}, currentParams) {
|
|
19778
|
+
where._and = where._and || [];
|
|
19779
|
+
where._or = where._or || [];
|
|
19780
|
+
if (typeof additionalFilter === "function") {
|
|
19781
|
+
const newWhere = additionalFilter(where, currentParams);
|
|
19782
|
+
if (newWhere) {
|
|
19783
|
+
where = __spreadValues(__spreadValues({}, where), newWhere);
|
|
19784
|
+
}
|
|
19785
|
+
} else if (typeof additionalFilter === "object")
|
|
19786
|
+
where._and.push(additionalFilter);
|
|
19787
|
+
}
|
|
19788
|
+
__name(initializeHasuraWhereAndFilter, "initializeHasuraWhereAndFilter");
|
|
19789
|
+
const addCustomColumnFilters = /* @__PURE__ */ __name((where, fields, currentParams) => {
|
|
19790
|
+
fields.forEach((field) => {
|
|
19791
|
+
const { customColumnFilter, filterDisabled } = field;
|
|
19792
|
+
if (filterDisabled || !customColumnFilter) return;
|
|
19793
|
+
customColumnFilter(where, currentParams);
|
|
19794
|
+
});
|
|
19795
|
+
}, "addCustomColumnFilters");
|
|
19754
19796
|
const defaultPageSizes = [5, 10, 15, 25, 50, 100, 200, 400];
|
|
19755
19797
|
function safeStringify(val) {
|
|
19756
19798
|
if (val !== null && typeof val === "object") {
|
|
@@ -19767,325 +19809,6 @@ function safeParse(val) {
|
|
|
19767
19809
|
}
|
|
19768
19810
|
}
|
|
19769
19811
|
__name(safeParse, "safeParse");
|
|
19770
|
-
function getCCDisplayName(field) {
|
|
19771
|
-
return camelCase(
|
|
19772
|
-
typeof field.displayName === "string" ? field.displayName : field.path
|
|
19773
|
-
);
|
|
19774
|
-
}
|
|
19775
|
-
__name(getCCDisplayName, "getCCDisplayName");
|
|
19776
|
-
function getFieldsMappedByCCDisplayName(schema) {
|
|
19777
|
-
return schema.fields.reduce((acc, field) => {
|
|
19778
|
-
const ccDisplayName = getCCDisplayName(field);
|
|
19779
|
-
acc[ccDisplayName] = field;
|
|
19780
|
-
return acc;
|
|
19781
|
-
}, {});
|
|
19782
|
-
}
|
|
19783
|
-
__name(getFieldsMappedByCCDisplayName, "getFieldsMappedByCCDisplayName");
|
|
19784
|
-
function orderEntitiesLocal(orderArray, entities, schema, ownProps) {
|
|
19785
|
-
if (orderArray == null ? void 0 : orderArray.length) {
|
|
19786
|
-
const orderFuncs = [];
|
|
19787
|
-
const ascOrDescArray = [];
|
|
19788
|
-
orderArray.forEach((order2) => {
|
|
19789
|
-
const ccDisplayName = order2.replace(/^-/gi, "");
|
|
19790
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19791
|
-
const field = ccFields[ccDisplayName];
|
|
19792
|
-
if (!field) {
|
|
19793
|
-
throw new Error(
|
|
19794
|
-
"Ruh roh, there should have been a column to sort on for " + order2 + " but none was found in " + schema.fields
|
|
19795
|
-
);
|
|
19796
|
-
}
|
|
19797
|
-
const { path: path2, getValueToFilterOn, sortFn } = field;
|
|
19798
|
-
if (field.type === "timestamp") {
|
|
19799
|
-
ascOrDescArray.push("desc");
|
|
19800
|
-
}
|
|
19801
|
-
ascOrDescArray.push(ccDisplayName === order2 ? "asc" : "desc");
|
|
19802
|
-
if (field.type === "timestamp") {
|
|
19803
|
-
orderFuncs.push((r2) => {
|
|
19804
|
-
const val = get$3(r2, path2);
|
|
19805
|
-
return !!val;
|
|
19806
|
-
});
|
|
19807
|
-
}
|
|
19808
|
-
if (path2 && endsWith$1(path2.toLowerCase(), "id")) {
|
|
19809
|
-
orderFuncs.push((o2) => {
|
|
19810
|
-
return parseInt(get$3(o2, path2), 10);
|
|
19811
|
-
});
|
|
19812
|
-
} else if (sortFn) {
|
|
19813
|
-
const toOrder = Array.isArray(sortFn) ? sortFn : [sortFn];
|
|
19814
|
-
orderFuncs.push(...toOrder);
|
|
19815
|
-
} else if (getValueToFilterOn) {
|
|
19816
|
-
orderFuncs.push((o2) => {
|
|
19817
|
-
return getValueToFilterOn(o2, ownProps);
|
|
19818
|
-
});
|
|
19819
|
-
} else {
|
|
19820
|
-
orderFuncs.push((r2) => {
|
|
19821
|
-
const val = get$3(r2, path2);
|
|
19822
|
-
return val && val.toLowerCase ? val.toLowerCase() : val;
|
|
19823
|
-
});
|
|
19824
|
-
}
|
|
19825
|
-
});
|
|
19826
|
-
entities = orderBy$1(entities, orderFuncs, ascOrDescArray);
|
|
19827
|
-
}
|
|
19828
|
-
return entities;
|
|
19829
|
-
}
|
|
19830
|
-
__name(orderEntitiesLocal, "orderEntitiesLocal");
|
|
19831
|
-
function getAndAndOrFilters(allFilters) {
|
|
19832
|
-
const orFilters = [];
|
|
19833
|
-
const andFilters = [];
|
|
19834
|
-
const otherOrFilters = [];
|
|
19835
|
-
allFilters.forEach((filter2) => {
|
|
19836
|
-
if (filter2.isOrFilter && typeof filter2.filterValue === "string" && filter2.filterValue.includes(",")) {
|
|
19837
|
-
const allFilterValues = filter2.filterValue.split(",");
|
|
19838
|
-
allFilterValues.forEach((filterValue, i2) => {
|
|
19839
|
-
filterValue = filterValue.trim();
|
|
19840
|
-
if (!filterValue) return;
|
|
19841
|
-
const newFilter = __spreadProps(__spreadValues({}, filter2), {
|
|
19842
|
-
filterValue
|
|
19843
|
-
});
|
|
19844
|
-
if (i2 === 0) {
|
|
19845
|
-
orFilters.push(newFilter);
|
|
19846
|
-
} else {
|
|
19847
|
-
const iMinus = i2 - 1;
|
|
19848
|
-
if (!otherOrFilters[iMinus]) otherOrFilters[iMinus] = [];
|
|
19849
|
-
otherOrFilters[iMinus].push(newFilter);
|
|
19850
|
-
}
|
|
19851
|
-
});
|
|
19852
|
-
} else if (filter2.isOrFilter) {
|
|
19853
|
-
orFilters.push(filter2);
|
|
19854
|
-
} else {
|
|
19855
|
-
andFilters.push(filter2);
|
|
19856
|
-
}
|
|
19857
|
-
});
|
|
19858
|
-
return {
|
|
19859
|
-
orFilters,
|
|
19860
|
-
andFilters,
|
|
19861
|
-
otherOrFilters
|
|
19862
|
-
};
|
|
19863
|
-
}
|
|
19864
|
-
__name(getAndAndOrFilters, "getAndAndOrFilters");
|
|
19865
|
-
function filterEntitiesLocal(filters = [], searchTerm, entities, schema, ownProps) {
|
|
19866
|
-
const allFilters = getAllFilters(filters, searchTerm, schema);
|
|
19867
|
-
if (allFilters.length) {
|
|
19868
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19869
|
-
const { andFilters, orFilters, otherOrFilters } = getAndAndOrFilters(allFilters);
|
|
19870
|
-
andFilters.forEach((filter2) => {
|
|
19871
|
-
entities = getEntitiesForGivenFilter(
|
|
19872
|
-
entities,
|
|
19873
|
-
filter2,
|
|
19874
|
-
ccFields,
|
|
19875
|
-
ownProps
|
|
19876
|
-
);
|
|
19877
|
-
});
|
|
19878
|
-
if (orFilters.length) {
|
|
19879
|
-
let orEntities = [];
|
|
19880
|
-
orFilters.concat(...otherOrFilters).forEach((filter2) => {
|
|
19881
|
-
orEntities = orEntities.concat(
|
|
19882
|
-
getEntitiesForGivenFilter(entities, filter2, ccFields, ownProps)
|
|
19883
|
-
);
|
|
19884
|
-
});
|
|
19885
|
-
entities = uniq(orEntities);
|
|
19886
|
-
}
|
|
19887
|
-
}
|
|
19888
|
-
return entities;
|
|
19889
|
-
}
|
|
19890
|
-
__name(filterEntitiesLocal, "filterEntitiesLocal");
|
|
19891
|
-
function cleanFilterValue(_filterValue, type2) {
|
|
19892
|
-
let filterValue = _filterValue;
|
|
19893
|
-
if (type2 === "number" || type2 === "integer") {
|
|
19894
|
-
filterValue = Array.isArray(filterValue) ? filterValue.map((val) => Number(val)) : Number(filterValue);
|
|
19895
|
-
}
|
|
19896
|
-
return filterValue;
|
|
19897
|
-
}
|
|
19898
|
-
__name(cleanFilterValue, "cleanFilterValue");
|
|
19899
|
-
function getEntitiesForGivenFilter(entities, filter2, ccFields, ownProps) {
|
|
19900
|
-
const { filterOn, filterValue: _filterValue, selectedFilter } = filter2;
|
|
19901
|
-
const field = ccFields[filterOn];
|
|
19902
|
-
const { path: path2, getValueToFilterOn } = field;
|
|
19903
|
-
const filterValue = cleanFilterValue(_filterValue, field.type);
|
|
19904
|
-
const subFilter = getSubFilter(false, selectedFilter, filterValue);
|
|
19905
|
-
entities = entities.filter((entity) => {
|
|
19906
|
-
const fieldVal = getValueToFilterOn ? getValueToFilterOn(entity, ownProps) : get$3(entity, path2);
|
|
19907
|
-
const shouldKeep = subFilter(fieldVal);
|
|
19908
|
-
return shouldKeep;
|
|
19909
|
-
});
|
|
19910
|
-
return entities;
|
|
19911
|
-
}
|
|
19912
|
-
__name(getEntitiesForGivenFilter, "getEntitiesForGivenFilter");
|
|
19913
|
-
function getFiltersFromSearchTerm(searchTerm, schema) {
|
|
19914
|
-
const searchTermFilters = [];
|
|
19915
|
-
if (searchTerm) {
|
|
19916
|
-
const sharedFields = {
|
|
19917
|
-
isOrFilter: true,
|
|
19918
|
-
isSearchTermFilter: true
|
|
19919
|
-
};
|
|
19920
|
-
schema.fields.forEach((field) => {
|
|
19921
|
-
const { type: type2, searchDisabled } = field;
|
|
19922
|
-
if (searchDisabled || field.filterDisabled || type2 === "color") return;
|
|
19923
|
-
const ccDisplayName = getCCDisplayName(field);
|
|
19924
|
-
const filterValue = cleanFilterValue(searchTerm, type2);
|
|
19925
|
-
if (type2 === "string" || type2 === "lookup") {
|
|
19926
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19927
|
-
filterOn: ccDisplayName,
|
|
19928
|
-
filterValue: searchTerm,
|
|
19929
|
-
selectedFilter: "contains"
|
|
19930
|
-
}));
|
|
19931
|
-
} else if (type2 === "boolean") {
|
|
19932
|
-
let regex;
|
|
19933
|
-
try {
|
|
19934
|
-
regex = new RegExp("^" + searchTerm, "ig");
|
|
19935
|
-
} catch (error) {
|
|
19936
|
-
}
|
|
19937
|
-
if (regex) {
|
|
19938
|
-
if ("true".replace(regex, "") !== "true") {
|
|
19939
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19940
|
-
filterOn: ccDisplayName,
|
|
19941
|
-
filterValue: true,
|
|
19942
|
-
selectedFilter: "true"
|
|
19943
|
-
}));
|
|
19944
|
-
} else if ("false".replace(regex, "") !== "false") {
|
|
19945
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19946
|
-
filterOn: ccDisplayName,
|
|
19947
|
-
filterValue: false,
|
|
19948
|
-
selectedFilter: "false"
|
|
19949
|
-
}));
|
|
19950
|
-
}
|
|
19951
|
-
}
|
|
19952
|
-
} else if ((type2 === "number" || type2 === "integer") && !isNaN(filterValue)) {
|
|
19953
|
-
if (type2 === "integer" && !isInteger(filterValue)) {
|
|
19954
|
-
return;
|
|
19955
|
-
}
|
|
19956
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19957
|
-
filterOn: ccDisplayName,
|
|
19958
|
-
filterValue,
|
|
19959
|
-
selectedFilter: "equalTo"
|
|
19960
|
-
}));
|
|
19961
|
-
}
|
|
19962
|
-
});
|
|
19963
|
-
}
|
|
19964
|
-
return searchTermFilters;
|
|
19965
|
-
}
|
|
19966
|
-
__name(getFiltersFromSearchTerm, "getFiltersFromSearchTerm");
|
|
19967
|
-
function getSubFilter(qb, selectedFilter, filterValue) {
|
|
19968
|
-
const ccSelectedFilter = camelCase(selectedFilter);
|
|
19969
|
-
let stringFilterValue = filterValue && filterValue.toString ? filterValue.toString() : filterValue;
|
|
19970
|
-
if (stringFilterValue === false) {
|
|
19971
|
-
stringFilterValue = "false";
|
|
19972
|
-
} else {
|
|
19973
|
-
stringFilterValue = stringFilterValue || "";
|
|
19974
|
-
}
|
|
19975
|
-
const filterValLower = stringFilterValue.toLowerCase && stringFilterValue.toLowerCase();
|
|
19976
|
-
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split(";");
|
|
19977
|
-
if (ccSelectedFilter === "startsWith") {
|
|
19978
|
-
return qb ? qb.startsWith(stringFilterValue) : (fieldVal) => {
|
|
19979
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19980
|
-
return startsWith(fieldVal.toLowerCase(), filterValLower);
|
|
19981
|
-
};
|
|
19982
|
-
} else if (ccSelectedFilter === "endsWith") {
|
|
19983
|
-
return qb ? qb.endsWith(stringFilterValue) : (fieldVal) => {
|
|
19984
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19985
|
-
return endsWith$1(fieldVal.toLowerCase(), filterValLower);
|
|
19986
|
-
};
|
|
19987
|
-
} else if (ccSelectedFilter === "contains" || ccSelectedFilter === "notContains") {
|
|
19988
|
-
return qb ? ccSelectedFilter === "contains" ? qb.contains(stringFilterValue.replace(/_/g, "\\_")) : qb.notContains(stringFilterValue.replace(/_/g, "\\_")) : (fieldVal) => {
|
|
19989
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19990
|
-
return ccSelectedFilter === "contains" ? fieldVal.toLowerCase().replace(filterValLower, "") !== fieldVal.toLowerCase() : fieldVal.toLowerCase().replace(filterValLower, "") === fieldVal.toLowerCase();
|
|
19991
|
-
};
|
|
19992
|
-
} else if (ccSelectedFilter === "inList") {
|
|
19993
|
-
return qb ? qb.inList(arrayFilterValue) : (fieldVal) => {
|
|
19994
|
-
if (!(fieldVal == null ? void 0 : fieldVal.toString)) return false;
|
|
19995
|
-
return arrayFilterValue.map((val) => {
|
|
19996
|
-
if (val) {
|
|
19997
|
-
if (val.toString) return val.toString().toLowerCase();
|
|
19998
|
-
return val.toLowerCase();
|
|
19999
|
-
}
|
|
20000
|
-
return void 0;
|
|
20001
|
-
}).indexOf(fieldVal.toString().toLowerCase()) > -1;
|
|
20002
|
-
};
|
|
20003
|
-
} else if (ccSelectedFilter === "notInList") {
|
|
20004
|
-
return qb ? qb.notInList(arrayFilterValue) : (fieldVal) => {
|
|
20005
|
-
if (!(fieldVal == null ? void 0 : fieldVal.toString)) return false;
|
|
20006
|
-
return arrayFilterValue.map((val) => {
|
|
20007
|
-
if (val) {
|
|
20008
|
-
if (val.toString) return val.toString().toLowerCase();
|
|
20009
|
-
return val.toLowerCase();
|
|
20010
|
-
}
|
|
20011
|
-
return void 0;
|
|
20012
|
-
}).indexOf(fieldVal.toString().toLowerCase()) === -1;
|
|
20013
|
-
};
|
|
20014
|
-
} else if (ccSelectedFilter === "isEmpty") {
|
|
20015
|
-
return qb ? qb.isEmpty() : (fieldVal) => {
|
|
20016
|
-
return !fieldVal;
|
|
20017
|
-
};
|
|
20018
|
-
} else if (ccSelectedFilter === "notEmpty") {
|
|
20019
|
-
return qb ? [qb.notNull(), qb.notEquals("")] : (fieldVal) => {
|
|
20020
|
-
return !!fieldVal;
|
|
20021
|
-
};
|
|
20022
|
-
} else if (ccSelectedFilter === "isExactly") {
|
|
20023
|
-
return qb ? filterValue : (fieldVal) => {
|
|
20024
|
-
return fieldVal === filterValue;
|
|
20025
|
-
};
|
|
20026
|
-
} else if (ccSelectedFilter === "true") {
|
|
20027
|
-
return qb ? qb.equals(true) : (fieldVal) => {
|
|
20028
|
-
return !!fieldVal;
|
|
20029
|
-
};
|
|
20030
|
-
} else if (ccSelectedFilter === "false") {
|
|
20031
|
-
return qb ? qb.equals(false) : (fieldVal) => {
|
|
20032
|
-
return !fieldVal;
|
|
20033
|
-
};
|
|
20034
|
-
} else if (ccSelectedFilter === "isBetween") {
|
|
20035
|
-
return qb ? qb.between(
|
|
20036
|
-
new Date(arrayFilterValue[0]),
|
|
20037
|
-
new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
20038
|
-
// set end of day for more accurate filtering
|
|
20039
|
-
) : (fieldVal) => {
|
|
20040
|
-
return dayjs(arrayFilterValue[0]).valueOf() <= dayjs(fieldVal).valueOf() && dayjs(fieldVal).valueOf() <= dayjs(arrayFilterValue[1]).valueOf();
|
|
20041
|
-
};
|
|
20042
|
-
} else if (ccSelectedFilter === "notBetween") {
|
|
20043
|
-
return qb ? qb.notBetween(
|
|
20044
|
-
new Date(arrayFilterValue[0]),
|
|
20045
|
-
new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
20046
|
-
// set end of day for more accurate filtering
|
|
20047
|
-
) : (fieldVal) => {
|
|
20048
|
-
return dayjs(arrayFilterValue[0]).valueOf() > dayjs(fieldVal).valueOf() || dayjs(fieldVal).valueOf() > dayjs(arrayFilterValue[1]).valueOf();
|
|
20049
|
-
};
|
|
20050
|
-
} else if (ccSelectedFilter === "isBefore") {
|
|
20051
|
-
return qb ? qb.lessThan(new Date(filterValue)) : (fieldVal) => {
|
|
20052
|
-
return dayjs(fieldVal).valueOf() < dayjs(filterValue).valueOf();
|
|
20053
|
-
};
|
|
20054
|
-
} else if (ccSelectedFilter === "isAfter") {
|
|
20055
|
-
return qb ? qb.greaterThan(new Date(new Date(filterValue).setHours(23, 59))) : (fieldVal) => {
|
|
20056
|
-
return dayjs(fieldVal).valueOf() > dayjs(filterValue).valueOf();
|
|
20057
|
-
};
|
|
20058
|
-
} else if (ccSelectedFilter === "greaterThan") {
|
|
20059
|
-
return qb ? qb.greaterThan(filterValue) : (fieldVal) => {
|
|
20060
|
-
return fieldVal > filterValue;
|
|
20061
|
-
};
|
|
20062
|
-
} else if (ccSelectedFilter === "lessThan") {
|
|
20063
|
-
return qb ? qb.lessThan(filterValue) : (fieldVal) => {
|
|
20064
|
-
return fieldVal < filterValue;
|
|
20065
|
-
};
|
|
20066
|
-
} else if (ccSelectedFilter === "inRange") {
|
|
20067
|
-
return qb ? qb.between(filterValue[0], filterValue[1]) : (fieldVal) => {
|
|
20068
|
-
return filterValue[0] <= fieldVal && fieldVal <= filterValue[1];
|
|
20069
|
-
};
|
|
20070
|
-
} else if (ccSelectedFilter === "outsideRange") {
|
|
20071
|
-
return qb ? qb.notBetween(filterValue[0], filterValue[1]) : (fieldVal) => {
|
|
20072
|
-
return filterValue[0] > fieldVal || fieldVal > filterValue[1];
|
|
20073
|
-
};
|
|
20074
|
-
} else if (ccSelectedFilter === "equalTo") {
|
|
20075
|
-
return qb ? filterValue : (fieldVal) => {
|
|
20076
|
-
return fieldVal === filterValue;
|
|
20077
|
-
};
|
|
20078
|
-
} else if (ccSelectedFilter === "regex") {
|
|
20079
|
-
return qb ? qb.matchesRegex(filterValue) : (fieldVal) => {
|
|
20080
|
-
new RegExp(filterValue).test(fieldVal);
|
|
20081
|
-
return fieldVal;
|
|
20082
|
-
};
|
|
20083
|
-
}
|
|
20084
|
-
throw new Error(
|
|
20085
|
-
`Unsupported filter ${selectedFilter}. Please make a new filter if you need one`
|
|
20086
|
-
);
|
|
20087
|
-
}
|
|
20088
|
-
__name(getSubFilter, "getSubFilter");
|
|
20089
19812
|
function getCurrentParamsFromUrl(location2, isSimple) {
|
|
20090
19813
|
let { search: search2 } = location2;
|
|
20091
19814
|
if (isSimple) {
|
|
@@ -20157,22 +19880,6 @@ function parseFilters(newParams) {
|
|
|
20157
19880
|
});
|
|
20158
19881
|
}
|
|
20159
19882
|
__name(parseFilters, "parseFilters");
|
|
20160
|
-
function buildRef(qb, reference2, searchField, expression) {
|
|
20161
|
-
if (reference2.reference) {
|
|
20162
|
-
return qb.related(reference2.target).whereAny({
|
|
20163
|
-
[reference2.sourceField]: buildRef(
|
|
20164
|
-
qb,
|
|
20165
|
-
reference2.reference,
|
|
20166
|
-
searchField,
|
|
20167
|
-
expression
|
|
20168
|
-
)
|
|
20169
|
-
});
|
|
20170
|
-
}
|
|
20171
|
-
return qb.related(reference2.target).whereAny({
|
|
20172
|
-
[searchField]: expression
|
|
20173
|
-
});
|
|
20174
|
-
}
|
|
20175
|
-
__name(buildRef, "buildRef");
|
|
20176
19883
|
function makeDataTableHandlers({
|
|
20177
19884
|
setNewParams,
|
|
20178
19885
|
defaults,
|
|
@@ -20260,40 +19967,18 @@ function makeDataTableHandlers({
|
|
|
20260
19967
|
};
|
|
20261
19968
|
}
|
|
20262
19969
|
__name(makeDataTableHandlers, "makeDataTableHandlers");
|
|
20263
|
-
function cleanupFilter(filter2) {
|
|
20264
|
-
let filterToUse = filter2;
|
|
20265
|
-
if (filterToUse.selectedFilter === "inList" && typeof filterToUse.filterValue === "number") {
|
|
20266
|
-
filterToUse = __spreadProps(__spreadValues({}, filterToUse), {
|
|
20267
|
-
filterValue: filterToUse.filterValue.toString()
|
|
20268
|
-
});
|
|
20269
|
-
}
|
|
20270
|
-
return filterToUse;
|
|
20271
|
-
}
|
|
20272
|
-
__name(cleanupFilter, "cleanupFilter");
|
|
20273
|
-
function getAllFilters(filters, searchTerm, schema) {
|
|
20274
|
-
let allFilters = [
|
|
20275
|
-
...filters,
|
|
20276
|
-
...getFiltersFromSearchTerm(searchTerm, schema)
|
|
20277
|
-
];
|
|
20278
|
-
allFilters = allFilters.filter((val) => {
|
|
20279
|
-
return val !== "";
|
|
20280
|
-
});
|
|
20281
|
-
return allFilters.map(cleanupFilter);
|
|
20282
|
-
}
|
|
20283
|
-
__name(getAllFilters, "getAllFilters");
|
|
20284
19970
|
function getQueryParams({
|
|
20285
19971
|
currentParams,
|
|
20286
|
-
urlConnected,
|
|
19972
|
+
// urlConnected,
|
|
20287
19973
|
defaults,
|
|
20288
19974
|
schema,
|
|
20289
19975
|
isInfinite,
|
|
20290
19976
|
entities,
|
|
20291
19977
|
isLocalCall,
|
|
20292
19978
|
additionalFilter,
|
|
20293
|
-
additionalOrFilter,
|
|
20294
19979
|
doNotCoercePageSize,
|
|
20295
19980
|
noOrderError,
|
|
20296
|
-
isCodeModel,
|
|
19981
|
+
// isCodeModel,
|
|
20297
19982
|
ownProps
|
|
20298
19983
|
}) {
|
|
20299
19984
|
Object.keys(currentParams).forEach(function(key) {
|
|
@@ -20316,232 +20001,65 @@ function getQueryParams({
|
|
|
20316
20001
|
)[0];
|
|
20317
20002
|
pageSize = closest;
|
|
20318
20003
|
}
|
|
20319
|
-
const
|
|
20004
|
+
const cleanedOrder = [];
|
|
20005
|
+
if (order2 && order2.length) {
|
|
20006
|
+
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
20007
|
+
order2.forEach((orderVal) => {
|
|
20008
|
+
const ccDisplayName = orderVal.replace(/^-/gi, "");
|
|
20009
|
+
const schemaForField = ccFields[ccDisplayName];
|
|
20010
|
+
if (schemaForField) {
|
|
20011
|
+
const { path: path2 } = schemaForField;
|
|
20012
|
+
const reversed = ccDisplayName !== orderVal;
|
|
20013
|
+
const prefix2 = reversed ? "-" : "";
|
|
20014
|
+
cleanedOrder.push(prefix2 + path2);
|
|
20015
|
+
} else {
|
|
20016
|
+
!noOrderError && console.error(
|
|
20017
|
+
"No schema for field found!",
|
|
20018
|
+
ccDisplayName,
|
|
20019
|
+
JSON.stringify(schema.fields, null, 2)
|
|
20020
|
+
);
|
|
20021
|
+
}
|
|
20022
|
+
});
|
|
20023
|
+
}
|
|
20024
|
+
let toRet = {
|
|
20320
20025
|
//these are values that might be generally useful for the wrapped component
|
|
20321
20026
|
page,
|
|
20322
20027
|
pageSize: ownProps.controlled_pageSize || pageSize,
|
|
20323
|
-
order:
|
|
20028
|
+
order: cleanedOrder,
|
|
20324
20029
|
filters,
|
|
20325
20030
|
searchTerm
|
|
20326
20031
|
};
|
|
20032
|
+
const { where, order_by, limit, offset: offset3 } = tableQueryParamsToHasuraClauses({
|
|
20033
|
+
page,
|
|
20034
|
+
pageSize,
|
|
20035
|
+
searchTerm,
|
|
20036
|
+
filters,
|
|
20037
|
+
order: cleanedOrder,
|
|
20038
|
+
schema
|
|
20039
|
+
});
|
|
20040
|
+
initializeHasuraWhereAndFilter(additionalFilter, where, currentParams);
|
|
20041
|
+
addCustomColumnFilters(where, schema.fields, currentParams);
|
|
20327
20042
|
if (isLocalCall) {
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
|
|
20333
|
-
|
|
20334
|
-
|
|
20335
|
-
|
|
20336
|
-
newEntities = orderEntitiesLocal(order2, newEntities, schema, ownProps);
|
|
20337
|
-
const entitiesAcrossPages = newEntities;
|
|
20338
|
-
const newEntityCount = newEntities.length;
|
|
20339
|
-
if (!isInfinite && !ownProps.controlled_pageSize) {
|
|
20340
|
-
const offset3 = (page - 1) * pageSize;
|
|
20341
|
-
newEntities = take(drop(newEntities, offset3), pageSize);
|
|
20342
|
-
}
|
|
20343
|
-
toReturn.entities = newEntities;
|
|
20344
|
-
toReturn.entitiesAcrossPages = entitiesAcrossPages;
|
|
20345
|
-
toReturn.entityCount = newEntityCount;
|
|
20346
|
-
return toReturn;
|
|
20043
|
+
toRet = __spreadValues(__spreadValues({}, toRet), filterLocalEntitiesToHasura(entities, {
|
|
20044
|
+
where,
|
|
20045
|
+
order_by,
|
|
20046
|
+
limit,
|
|
20047
|
+
offset: offset3,
|
|
20048
|
+
isInfinite
|
|
20049
|
+
}));
|
|
20050
|
+
return toRet;
|
|
20347
20051
|
} else {
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
graphqlQueryParams.pageNumber = 1;
|
|
20355
|
-
} else {
|
|
20356
|
-
graphqlQueryParams.pageNumber = Number(page);
|
|
20357
|
-
graphqlQueryParams.pageSize = ownProps.controlled_pageSize || Number(pageSize);
|
|
20358
|
-
}
|
|
20359
|
-
const { model } = schema;
|
|
20360
|
-
if (!window.QueryBuilder) return toReturn;
|
|
20361
|
-
const qb = new window.QueryBuilder(model);
|
|
20362
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
20363
|
-
if (tableQueryParams.order && tableQueryParams.order.length) {
|
|
20364
|
-
tableQueryParams.order.forEach((orderVal) => {
|
|
20365
|
-
const ccDisplayName = orderVal.replace(/^-/gi, "");
|
|
20366
|
-
const schemaForField = ccFields[ccDisplayName];
|
|
20367
|
-
if (schemaForField) {
|
|
20368
|
-
const { path: path2 } = schemaForField;
|
|
20369
|
-
const reversed = ccDisplayName !== orderVal;
|
|
20370
|
-
const prefix2 = reversed ? "-" : "";
|
|
20371
|
-
graphqlQueryParams.sort = [
|
|
20372
|
-
...graphqlQueryParams.sort || [],
|
|
20373
|
-
prefix2 + path2
|
|
20374
|
-
];
|
|
20375
|
-
} else {
|
|
20376
|
-
!noOrderError && console.error(
|
|
20377
|
-
"No schema for field found!",
|
|
20378
|
-
ccDisplayName,
|
|
20379
|
-
JSON.stringify(schema.fields, null, 2)
|
|
20380
|
-
);
|
|
20381
|
-
}
|
|
20382
|
-
});
|
|
20383
|
-
}
|
|
20384
|
-
let errorParsingUrlString;
|
|
20385
|
-
const additionalFilterToUse = additionalFilter(qb, currentParams);
|
|
20386
|
-
let additionalOrFilterToUse = additionalOrFilter(qb, currentParams);
|
|
20387
|
-
if (additionalOrFilterToUse && additionalOrFilterToUse.ignoreSearchTerm) {
|
|
20388
|
-
searchTerm = "";
|
|
20389
|
-
additionalOrFilterToUse = additionalOrFilterToUse.additionalOrFilterToUse;
|
|
20390
|
-
}
|
|
20391
|
-
const allFilters = getAllFilters(filters, searchTerm, schema);
|
|
20392
|
-
const { andFilters, orFilters, otherOrFilters } = getAndAndOrFilters(allFilters);
|
|
20393
|
-
try {
|
|
20394
|
-
const flattenFilters = /* @__PURE__ */ __name((filterObj) => {
|
|
20395
|
-
return flatMap(Object.keys(filterObj), (key) => {
|
|
20396
|
-
return filterObj[key].map((filter2) => ({
|
|
20397
|
-
[key]: filter2
|
|
20398
|
-
}));
|
|
20399
|
-
});
|
|
20400
|
-
}, "flattenFilters");
|
|
20401
|
-
const orFiltersObject = getQueries(orFilters, qb, ccFields);
|
|
20402
|
-
let allOrFilters = flattenFilters(orFiltersObject);
|
|
20403
|
-
otherOrFilters.forEach((orFilters2) => {
|
|
20404
|
-
const otherOrFiltersObject = getQueries(orFilters2, qb, ccFields);
|
|
20405
|
-
allOrFilters = allOrFilters.concat(
|
|
20406
|
-
flattenFilters(otherOrFiltersObject)
|
|
20407
|
-
);
|
|
20408
|
-
});
|
|
20409
|
-
allOrFilters.push(additionalOrFilterToUse);
|
|
20410
|
-
allOrFilters = allOrFilters.filter((obj) => !isEmpty$1(obj));
|
|
20411
|
-
const unflattenedAndQueries = getQueries(andFilters, qb, ccFields);
|
|
20412
|
-
let allAndFilters = flattenFilters(unflattenedAndQueries);
|
|
20413
|
-
allAndFilters.push(additionalFilterToUse);
|
|
20414
|
-
allAndFilters = allAndFilters.filter((obj) => !isEmpty$1(obj));
|
|
20415
|
-
if (allAndFilters.length) {
|
|
20416
|
-
qb.whereAll(...allAndFilters);
|
|
20417
|
-
}
|
|
20418
|
-
if (allOrFilters.length) {
|
|
20419
|
-
qb.andWhereAny(...allOrFilters);
|
|
20420
|
-
}
|
|
20421
|
-
const columnCustomFilters = getColumnCustomFilters(
|
|
20422
|
-
andFilters,
|
|
20423
|
-
qb,
|
|
20424
|
-
ccFields
|
|
20425
|
-
);
|
|
20426
|
-
if (columnCustomFilters.length) {
|
|
20427
|
-
qb.whereAll(...columnCustomFilters);
|
|
20428
|
-
}
|
|
20429
|
-
} catch (e) {
|
|
20430
|
-
if (urlConnected) {
|
|
20431
|
-
errorParsingUrlString = e;
|
|
20432
|
-
console.error(
|
|
20433
|
-
"The following error occurred when trying to build the query params. This is probably due to a malformed URL:",
|
|
20434
|
-
e
|
|
20435
|
-
);
|
|
20436
|
-
} else {
|
|
20437
|
-
console.error("Error building query params from filter:");
|
|
20438
|
-
throw e;
|
|
20052
|
+
return __spreadProps(__spreadValues({}, toRet), {
|
|
20053
|
+
variables: {
|
|
20054
|
+
where,
|
|
20055
|
+
order_by,
|
|
20056
|
+
limit,
|
|
20057
|
+
offset: offset3
|
|
20439
20058
|
}
|
|
20440
|
-
}
|
|
20441
|
-
if (qb.query.filters.length) {
|
|
20442
|
-
graphqlQueryParams.filter = qb.toJSON();
|
|
20443
|
-
}
|
|
20444
|
-
if (!graphqlQueryParams.sort.length) {
|
|
20445
|
-
graphqlQueryParams.sort.push("-updatedAt");
|
|
20446
|
-
}
|
|
20447
|
-
graphqlQueryParams.sort.push(
|
|
20448
|
-
isCodeModel ? "code" : window.__sortId || "id"
|
|
20449
|
-
);
|
|
20450
|
-
return __spreadProps(__spreadValues({}, toReturn), {
|
|
20451
|
-
//the query params will get passed directly to as variables to the graphql query
|
|
20452
|
-
variables: graphqlQueryParams,
|
|
20453
|
-
errorParsingUrlString
|
|
20454
20059
|
});
|
|
20455
20060
|
}
|
|
20456
20061
|
}
|
|
20457
20062
|
__name(getQueryParams, "getQueryParams");
|
|
20458
|
-
function getSubFiltersAndPath(filter2, qb, ccFields) {
|
|
20459
|
-
const { selectedFilter, filterValue, filterOn } = filter2;
|
|
20460
|
-
const fieldSchema = ccFields[filterOn];
|
|
20461
|
-
let filterValueToUse = filterValue;
|
|
20462
|
-
if (fieldSchema) {
|
|
20463
|
-
if (fieldSchema.normalizeFilter) {
|
|
20464
|
-
filterValueToUse = fieldSchema.normalizeFilter(
|
|
20465
|
-
filterValue,
|
|
20466
|
-
selectedFilter,
|
|
20467
|
-
filterOn
|
|
20468
|
-
);
|
|
20469
|
-
}
|
|
20470
|
-
}
|
|
20471
|
-
const _subFilters = getSubFilter(qb, selectedFilter, filterValueToUse);
|
|
20472
|
-
let filterField;
|
|
20473
|
-
if (fieldSchema) {
|
|
20474
|
-
const { path: path2, reference: reference2 } = fieldSchema;
|
|
20475
|
-
if (reference2) {
|
|
20476
|
-
filterField = reference2.sourceField;
|
|
20477
|
-
} else {
|
|
20478
|
-
filterField = path2;
|
|
20479
|
-
}
|
|
20480
|
-
} else if (filterOn === "id") {
|
|
20481
|
-
filterField = filterOn;
|
|
20482
|
-
} else {
|
|
20483
|
-
console.error("Trying to filter on unknown field");
|
|
20484
|
-
}
|
|
20485
|
-
const subFiltersToUse = [];
|
|
20486
|
-
const subFilters = Array.isArray(_subFilters) ? _subFilters : [_subFilters];
|
|
20487
|
-
subFilters.forEach((subFilter) => {
|
|
20488
|
-
let subFilterToUse = subFilter;
|
|
20489
|
-
if (fieldSchema) {
|
|
20490
|
-
const { path: path2, reference: reference2 } = fieldSchema;
|
|
20491
|
-
if (reference2) {
|
|
20492
|
-
subFilterToUse = buildRef(
|
|
20493
|
-
qb,
|
|
20494
|
-
reference2,
|
|
20495
|
-
last$1(path2.split(".")),
|
|
20496
|
-
subFilter
|
|
20497
|
-
);
|
|
20498
|
-
}
|
|
20499
|
-
}
|
|
20500
|
-
subFiltersToUse.push(subFilterToUse);
|
|
20501
|
-
});
|
|
20502
|
-
return {
|
|
20503
|
-
path: filterField,
|
|
20504
|
-
subFilters: subFiltersToUse
|
|
20505
|
-
};
|
|
20506
|
-
}
|
|
20507
|
-
__name(getSubFiltersAndPath, "getSubFiltersAndPath");
|
|
20508
|
-
function getQueries(filters, qb, ccFields) {
|
|
20509
|
-
const subQueries = filters.reduce((acc, filter2) => {
|
|
20510
|
-
if (!filter2) {
|
|
20511
|
-
console.warn("We should always have a filter object!");
|
|
20512
|
-
return acc;
|
|
20513
|
-
}
|
|
20514
|
-
const { filterOn } = filter2;
|
|
20515
|
-
const fieldSchema = ccFields[filterOn];
|
|
20516
|
-
if (!filter2.isSearchTermFilter && (fieldSchema == null ? void 0 : fieldSchema.additionalColumnFilter))
|
|
20517
|
-
return acc;
|
|
20518
|
-
const { path: path2, subFilters } = getSubFiltersAndPath(filter2, qb, ccFields);
|
|
20519
|
-
acc[path2] = subFilters;
|
|
20520
|
-
return acc;
|
|
20521
|
-
}, {});
|
|
20522
|
-
return subQueries;
|
|
20523
|
-
}
|
|
20524
|
-
__name(getQueries, "getQueries");
|
|
20525
|
-
function getColumnCustomFilters(filters, qb, ccFields) {
|
|
20526
|
-
const subQueries = filters.reduce((acc, filter2) => {
|
|
20527
|
-
if (!filter2) {
|
|
20528
|
-
console.warn("We should always have a filter object!");
|
|
20529
|
-
return acc;
|
|
20530
|
-
}
|
|
20531
|
-
const { filterOn } = filter2;
|
|
20532
|
-
const fieldSchema = ccFields[filterOn];
|
|
20533
|
-
if (filter2.isSearchTermFilter || !(fieldSchema == null ? void 0 : fieldSchema.additionalColumnFilter)) {
|
|
20534
|
-
return acc;
|
|
20535
|
-
}
|
|
20536
|
-
const { path: path2, subFilters } = getSubFiltersAndPath(filter2, qb, ccFields);
|
|
20537
|
-
subFilters.forEach((subFilter) => {
|
|
20538
|
-
acc.push(fieldSchema.additionalColumnFilter(qb, subFilter, path2));
|
|
20539
|
-
});
|
|
20540
|
-
return acc;
|
|
20541
|
-
}, []);
|
|
20542
|
-
return subQueries;
|
|
20543
|
-
}
|
|
20544
|
-
__name(getColumnCustomFilters, "getColumnCustomFilters");
|
|
20545
20063
|
function PagingInput({ disabled, onBlur, defaultPage }) {
|
|
20546
20064
|
const [page, setPage] = useState(defaultPage);
|
|
20547
20065
|
const defaultValue2 = useRef(defaultPage);
|
|
@@ -33055,6 +32573,293 @@ const InfoHelper = /* @__PURE__ */ __name((_g) => {
|
|
|
33055
32573
|
toReturn
|
|
33056
32574
|
);
|
|
33057
32575
|
}, "InfoHelper");
|
|
32576
|
+
var dayjs_min$1 = { exports: {} };
|
|
32577
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
32578
|
+
var hasRequiredDayjs_min;
|
|
32579
|
+
function requireDayjs_min() {
|
|
32580
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
32581
|
+
hasRequiredDayjs_min = 1;
|
|
32582
|
+
(function(module2, exports2) {
|
|
32583
|
+
!function(t2, e) {
|
|
32584
|
+
module2.exports = e();
|
|
32585
|
+
}(dayjs_min, function() {
|
|
32586
|
+
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) {
|
|
32587
|
+
var e2 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
|
32588
|
+
return "[" + t3 + (e2[(n3 - 20) % 10] || e2[n3] || e2[0]) + "]";
|
|
32589
|
+
}, "ordinal") }, m2 = /* @__PURE__ */ __name(function(t3, e2, n3) {
|
|
32590
|
+
var r3 = String(t3);
|
|
32591
|
+
return !r3 || r3.length >= e2 ? t3 : "" + Array(e2 + 1 - r3.length).join(n3) + t3;
|
|
32592
|
+
}, "m"), v2 = { s: m2, z: /* @__PURE__ */ __name(function(t3) {
|
|
32593
|
+
var e2 = -t3.utcOffset(), n3 = Math.abs(e2), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
|
|
32594
|
+
return (e2 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
|
|
32595
|
+
}, "z"), m: /* @__PURE__ */ __name(function t3(e2, n3) {
|
|
32596
|
+
if (e2.date() < n3.date()) return -t3(n3, e2);
|
|
32597
|
+
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);
|
|
32598
|
+
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
|
|
32599
|
+
}, "t"), a: /* @__PURE__ */ __name(function(t3) {
|
|
32600
|
+
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
32601
|
+
}, "a"), p: /* @__PURE__ */ __name(function(t3) {
|
|
32602
|
+
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$/, "");
|
|
32603
|
+
}, "p"), u: /* @__PURE__ */ __name(function(t3) {
|
|
32604
|
+
return void 0 === t3;
|
|
32605
|
+
}, "u") }, g2 = "en", D2 = {};
|
|
32606
|
+
D2[g2] = M2;
|
|
32607
|
+
var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t3) {
|
|
32608
|
+
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
|
32609
|
+
}, "S"), w2 = /* @__PURE__ */ __name(function t3(e2, n3, r3) {
|
|
32610
|
+
var i3;
|
|
32611
|
+
if (!e2) return g2;
|
|
32612
|
+
if ("string" == typeof e2) {
|
|
32613
|
+
var s3 = e2.toLowerCase();
|
|
32614
|
+
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
|
32615
|
+
var u3 = e2.split("-");
|
|
32616
|
+
if (!i3 && u3.length > 1) return t3(u3[0]);
|
|
32617
|
+
} else {
|
|
32618
|
+
var a3 = e2.name;
|
|
32619
|
+
D2[a3] = e2, i3 = a3;
|
|
32620
|
+
}
|
|
32621
|
+
return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
|
|
32622
|
+
}, "t"), O2 = /* @__PURE__ */ __name(function(t3, e2) {
|
|
32623
|
+
if (S2(t3)) return t3.clone();
|
|
32624
|
+
var n3 = "object" == typeof e2 ? e2 : {};
|
|
32625
|
+
return n3.date = t3, n3.args = arguments, new _2(n3);
|
|
32626
|
+
}, "O"), b2 = v2;
|
|
32627
|
+
b2.l = w2, b2.i = S2, b2.w = function(t3, e2) {
|
|
32628
|
+
return O2(t3, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
32629
|
+
};
|
|
32630
|
+
var _2 = function() {
|
|
32631
|
+
function M3(t3) {
|
|
32632
|
+
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
|
32633
|
+
}
|
|
32634
|
+
__name(M3, "M");
|
|
32635
|
+
var m3 = M3.prototype;
|
|
32636
|
+
return m3.parse = function(t3) {
|
|
32637
|
+
this.$d = function(t4) {
|
|
32638
|
+
var e2 = t4.date, n3 = t4.utc;
|
|
32639
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
32640
|
+
if (b2.u(e2)) return /* @__PURE__ */ new Date();
|
|
32641
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
32642
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
32643
|
+
var r3 = e2.match($);
|
|
32644
|
+
if (r3) {
|
|
32645
|
+
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
|
32646
|
+
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);
|
|
32647
|
+
}
|
|
32648
|
+
}
|
|
32649
|
+
return new Date(e2);
|
|
32650
|
+
}(t3), this.init();
|
|
32651
|
+
}, m3.init = function() {
|
|
32652
|
+
var t3 = this.$d;
|
|
32653
|
+
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();
|
|
32654
|
+
}, m3.$utils = function() {
|
|
32655
|
+
return b2;
|
|
32656
|
+
}, m3.isValid = function() {
|
|
32657
|
+
return !(this.$d.toString() === l2);
|
|
32658
|
+
}, m3.isSame = function(t3, e2) {
|
|
32659
|
+
var n3 = O2(t3);
|
|
32660
|
+
return this.startOf(e2) <= n3 && n3 <= this.endOf(e2);
|
|
32661
|
+
}, m3.isAfter = function(t3, e2) {
|
|
32662
|
+
return O2(t3) < this.startOf(e2);
|
|
32663
|
+
}, m3.isBefore = function(t3, e2) {
|
|
32664
|
+
return this.endOf(e2) < O2(t3);
|
|
32665
|
+
}, m3.$g = function(t3, e2, n3) {
|
|
32666
|
+
return b2.u(t3) ? this[e2] : this.set(n3, t3);
|
|
32667
|
+
}, m3.unix = function() {
|
|
32668
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
32669
|
+
}, m3.valueOf = function() {
|
|
32670
|
+
return this.$d.getTime();
|
|
32671
|
+
}, m3.startOf = function(t3, e2) {
|
|
32672
|
+
var n3 = this, r3 = !!b2.u(e2) || e2, f3 = b2.p(t3), l3 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
32673
|
+
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e3, t4) : new Date(n3.$y, e3, t4), n3);
|
|
32674
|
+
return r3 ? i3 : i3.endOf(a2);
|
|
32675
|
+
}, "l"), $2 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
32676
|
+
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n3);
|
|
32677
|
+
}, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
|
32678
|
+
switch (f3) {
|
|
32679
|
+
case h2:
|
|
32680
|
+
return r3 ? l3(1, 0) : l3(31, 11);
|
|
32681
|
+
case c2:
|
|
32682
|
+
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
|
32683
|
+
case o2:
|
|
32684
|
+
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
|
32685
|
+
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
|
32686
|
+
case a2:
|
|
32687
|
+
case d2:
|
|
32688
|
+
return $2(v3 + "Hours", 0);
|
|
32689
|
+
case u2:
|
|
32690
|
+
return $2(v3 + "Minutes", 1);
|
|
32691
|
+
case s2:
|
|
32692
|
+
return $2(v3 + "Seconds", 2);
|
|
32693
|
+
case i2:
|
|
32694
|
+
return $2(v3 + "Milliseconds", 3);
|
|
32695
|
+
default:
|
|
32696
|
+
return this.clone();
|
|
32697
|
+
}
|
|
32698
|
+
}, m3.endOf = function(t3) {
|
|
32699
|
+
return this.startOf(t3, false);
|
|
32700
|
+
}, m3.$set = function(t3, e2) {
|
|
32701
|
+
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;
|
|
32702
|
+
if (o3 === c2 || o3 === h2) {
|
|
32703
|
+
var y3 = this.clone().set(d2, 1);
|
|
32704
|
+
y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
|
32705
|
+
} else l3 && this.$d[l3]($2);
|
|
32706
|
+
return this.init(), this;
|
|
32707
|
+
}, m3.set = function(t3, e2) {
|
|
32708
|
+
return this.clone().$set(t3, e2);
|
|
32709
|
+
}, m3.get = function(t3) {
|
|
32710
|
+
return this[b2.p(t3)]();
|
|
32711
|
+
}, m3.add = function(r3, f3) {
|
|
32712
|
+
var d3, l3 = this;
|
|
32713
|
+
r3 = Number(r3);
|
|
32714
|
+
var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t3) {
|
|
32715
|
+
var e2 = O2(l3);
|
|
32716
|
+
return b2.w(e2.date(e2.date() + Math.round(t3 * r3)), l3);
|
|
32717
|
+
}, "y");
|
|
32718
|
+
if ($2 === c2) return this.set(c2, this.$M + r3);
|
|
32719
|
+
if ($2 === h2) return this.set(h2, this.$y + r3);
|
|
32720
|
+
if ($2 === a2) return y3(1);
|
|
32721
|
+
if ($2 === o2) return y3(7);
|
|
32722
|
+
var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n2, d3[i2] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
|
|
32723
|
+
return b2.w(m4, this);
|
|
32724
|
+
}, m3.subtract = function(t3, e2) {
|
|
32725
|
+
return this.add(-1 * t3, e2);
|
|
32726
|
+
}, m3.format = function(t3) {
|
|
32727
|
+
var e2 = this, n3 = this.$locale();
|
|
32728
|
+
if (!this.isValid()) return n3.invalidDate || l2;
|
|
32729
|
+
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) {
|
|
32730
|
+
return t4 && (t4[n4] || t4(e2, r3)) || i4[n4].slice(0, s4);
|
|
32731
|
+
}, "h"), d3 = /* @__PURE__ */ __name(function(t4) {
|
|
32732
|
+
return b2.s(s3 % 12 || 12, t4, "0");
|
|
32733
|
+
}, "d"), $2 = f3 || function(t4, e3, n4) {
|
|
32734
|
+
var r4 = t4 < 12 ? "AM" : "PM";
|
|
32735
|
+
return n4 ? r4.toLowerCase() : r4;
|
|
32736
|
+
};
|
|
32737
|
+
return r3.replace(y2, function(t4, r4) {
|
|
32738
|
+
return r4 || function(t5) {
|
|
32739
|
+
switch (t5) {
|
|
32740
|
+
case "YY":
|
|
32741
|
+
return String(e2.$y).slice(-2);
|
|
32742
|
+
case "YYYY":
|
|
32743
|
+
return b2.s(e2.$y, 4, "0");
|
|
32744
|
+
case "M":
|
|
32745
|
+
return a3 + 1;
|
|
32746
|
+
case "MM":
|
|
32747
|
+
return b2.s(a3 + 1, 2, "0");
|
|
32748
|
+
case "MMM":
|
|
32749
|
+
return h3(n3.monthsShort, a3, c3, 3);
|
|
32750
|
+
case "MMMM":
|
|
32751
|
+
return h3(c3, a3);
|
|
32752
|
+
case "D":
|
|
32753
|
+
return e2.$D;
|
|
32754
|
+
case "DD":
|
|
32755
|
+
return b2.s(e2.$D, 2, "0");
|
|
32756
|
+
case "d":
|
|
32757
|
+
return String(e2.$W);
|
|
32758
|
+
case "dd":
|
|
32759
|
+
return h3(n3.weekdaysMin, e2.$W, o3, 2);
|
|
32760
|
+
case "ddd":
|
|
32761
|
+
return h3(n3.weekdaysShort, e2.$W, o3, 3);
|
|
32762
|
+
case "dddd":
|
|
32763
|
+
return o3[e2.$W];
|
|
32764
|
+
case "H":
|
|
32765
|
+
return String(s3);
|
|
32766
|
+
case "HH":
|
|
32767
|
+
return b2.s(s3, 2, "0");
|
|
32768
|
+
case "h":
|
|
32769
|
+
return d3(1);
|
|
32770
|
+
case "hh":
|
|
32771
|
+
return d3(2);
|
|
32772
|
+
case "a":
|
|
32773
|
+
return $2(s3, u3, true);
|
|
32774
|
+
case "A":
|
|
32775
|
+
return $2(s3, u3, false);
|
|
32776
|
+
case "m":
|
|
32777
|
+
return String(u3);
|
|
32778
|
+
case "mm":
|
|
32779
|
+
return b2.s(u3, 2, "0");
|
|
32780
|
+
case "s":
|
|
32781
|
+
return String(e2.$s);
|
|
32782
|
+
case "ss":
|
|
32783
|
+
return b2.s(e2.$s, 2, "0");
|
|
32784
|
+
case "SSS":
|
|
32785
|
+
return b2.s(e2.$ms, 3, "0");
|
|
32786
|
+
case "Z":
|
|
32787
|
+
return i3;
|
|
32788
|
+
}
|
|
32789
|
+
return null;
|
|
32790
|
+
}(t4) || i3.replace(":", "");
|
|
32791
|
+
});
|
|
32792
|
+
}, m3.utcOffset = function() {
|
|
32793
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
32794
|
+
}, m3.diff = function(r3, d3, l3) {
|
|
32795
|
+
var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e, g3 = this - m4, D3 = /* @__PURE__ */ __name(function() {
|
|
32796
|
+
return b2.m(y3, m4);
|
|
32797
|
+
}, "D");
|
|
32798
|
+
switch (M4) {
|
|
32799
|
+
case h2:
|
|
32800
|
+
$2 = D3() / 12;
|
|
32801
|
+
break;
|
|
32802
|
+
case c2:
|
|
32803
|
+
$2 = D3();
|
|
32804
|
+
break;
|
|
32805
|
+
case f2:
|
|
32806
|
+
$2 = D3() / 3;
|
|
32807
|
+
break;
|
|
32808
|
+
case o2:
|
|
32809
|
+
$2 = (g3 - v3) / 6048e5;
|
|
32810
|
+
break;
|
|
32811
|
+
case a2:
|
|
32812
|
+
$2 = (g3 - v3) / 864e5;
|
|
32813
|
+
break;
|
|
32814
|
+
case u2:
|
|
32815
|
+
$2 = g3 / n2;
|
|
32816
|
+
break;
|
|
32817
|
+
case s2:
|
|
32818
|
+
$2 = g3 / e;
|
|
32819
|
+
break;
|
|
32820
|
+
case i2:
|
|
32821
|
+
$2 = g3 / t2;
|
|
32822
|
+
break;
|
|
32823
|
+
default:
|
|
32824
|
+
$2 = g3;
|
|
32825
|
+
}
|
|
32826
|
+
return l3 ? $2 : b2.a($2);
|
|
32827
|
+
}, m3.daysInMonth = function() {
|
|
32828
|
+
return this.endOf(c2).$D;
|
|
32829
|
+
}, m3.$locale = function() {
|
|
32830
|
+
return D2[this.$L];
|
|
32831
|
+
}, m3.locale = function(t3, e2) {
|
|
32832
|
+
if (!t3) return this.$L;
|
|
32833
|
+
var n3 = this.clone(), r3 = w2(t3, e2, true);
|
|
32834
|
+
return r3 && (n3.$L = r3), n3;
|
|
32835
|
+
}, m3.clone = function() {
|
|
32836
|
+
return b2.w(this.$d, this);
|
|
32837
|
+
}, m3.toDate = function() {
|
|
32838
|
+
return new Date(this.valueOf());
|
|
32839
|
+
}, m3.toJSON = function() {
|
|
32840
|
+
return this.isValid() ? this.toISOString() : null;
|
|
32841
|
+
}, m3.toISOString = function() {
|
|
32842
|
+
return this.$d.toISOString();
|
|
32843
|
+
}, m3.toString = function() {
|
|
32844
|
+
return this.$d.toUTCString();
|
|
32845
|
+
}, M3;
|
|
32846
|
+
}(), k2 = _2.prototype;
|
|
32847
|
+
return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
|
|
32848
|
+
k2[t3[1]] = function(e2) {
|
|
32849
|
+
return this.$g(e2, t3[0], t3[1]);
|
|
32850
|
+
};
|
|
32851
|
+
}), O2.extend = function(t3, e2) {
|
|
32852
|
+
return t3.$i || (t3(e2, _2, O2), t3.$i = true), O2;
|
|
32853
|
+
}, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
|
|
32854
|
+
return O2(1e3 * t3);
|
|
32855
|
+
}, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
|
|
32856
|
+
});
|
|
32857
|
+
})(dayjs_min$1);
|
|
32858
|
+
return dayjs_min$1.exports;
|
|
32859
|
+
}
|
|
32860
|
+
__name(requireDayjs_min, "requireDayjs_min");
|
|
32861
|
+
var dayjs_minExports = requireDayjs_min();
|
|
32862
|
+
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
33058
32863
|
var localizedFormat$2 = { exports: {} };
|
|
33059
32864
|
var localizedFormat$1 = localizedFormat$2.exports;
|
|
33060
32865
|
var hasRequiredLocalizedFormat;
|
|
@@ -33324,7 +33129,7 @@ function removeUnwantedProps(props) {
|
|
|
33324
33129
|
return cleanedProps;
|
|
33325
33130
|
}
|
|
33326
33131
|
__name(removeUnwantedProps, "removeUnwantedProps");
|
|
33327
|
-
const LabelWithTooltipInfo = /* @__PURE__ */ __name(({ label, tooltipInfo, labelStyle }) => tooltipInfo ? /* @__PURE__ */ React__default.createElement("
|
|
33132
|
+
const LabelWithTooltipInfo = /* @__PURE__ */ __name(({ label, tooltipInfo, labelStyle }) => tooltipInfo ? /* @__PURE__ */ React__default.createElement("span", { style: __spreadValues({ display: "flex", alignItems: "center" }, labelStyle) }, label, " ", /* @__PURE__ */ React__default.createElement(
|
|
33328
33133
|
InfoHelper,
|
|
33329
33134
|
{
|
|
33330
33135
|
style: { marginLeft: "5px", marginTop: "-6px" },
|
|
@@ -50845,42 +50650,42 @@ function getFilterMenuItems(dataType) {
|
|
|
50845
50650
|
let filterMenuItems2 = [];
|
|
50846
50651
|
if (dataType === "string") {
|
|
50847
50652
|
filterMenuItems2 = [
|
|
50848
|
-
"
|
|
50849
|
-
"
|
|
50850
|
-
"
|
|
50851
|
-
"
|
|
50852
|
-
"
|
|
50853
|
-
"
|
|
50854
|
-
"
|
|
50855
|
-
"
|
|
50856
|
-
"
|
|
50857
|
-
"
|
|
50653
|
+
"contains",
|
|
50654
|
+
"notContains",
|
|
50655
|
+
"startsWith",
|
|
50656
|
+
"endsWith",
|
|
50657
|
+
"isExactly",
|
|
50658
|
+
"regex",
|
|
50659
|
+
"inList",
|
|
50660
|
+
"notInList",
|
|
50661
|
+
"isEmpty",
|
|
50662
|
+
"notEmpty"
|
|
50858
50663
|
];
|
|
50859
50664
|
} else if (dataType === "lookup") {
|
|
50860
50665
|
filterMenuItems2 = [
|
|
50861
|
-
"
|
|
50862
|
-
"
|
|
50863
|
-
"
|
|
50864
|
-
"
|
|
50865
|
-
"
|
|
50866
|
-
"
|
|
50666
|
+
"contains",
|
|
50667
|
+
"notContains",
|
|
50668
|
+
"startsWith",
|
|
50669
|
+
"endsWith",
|
|
50670
|
+
"isExactly",
|
|
50671
|
+
"regex"
|
|
50867
50672
|
];
|
|
50868
50673
|
} else if (dataType === "boolean") {
|
|
50869
|
-
filterMenuItems2 = ["
|
|
50674
|
+
filterMenuItems2 = ["true", "false"];
|
|
50870
50675
|
} else if (dataType === "number" || dataType === "integer") {
|
|
50871
50676
|
filterMenuItems2 = [
|
|
50872
|
-
"
|
|
50873
|
-
"
|
|
50874
|
-
"
|
|
50875
|
-
"
|
|
50876
|
-
"
|
|
50877
|
-
"
|
|
50878
|
-
"
|
|
50677
|
+
"greaterThan",
|
|
50678
|
+
"lessThan",
|
|
50679
|
+
"inRange",
|
|
50680
|
+
"outsideRange",
|
|
50681
|
+
"equalTo",
|
|
50682
|
+
"inList",
|
|
50683
|
+
"notInList"
|
|
50879
50684
|
];
|
|
50880
50685
|
} else if (dataType === "timestamp") {
|
|
50881
|
-
filterMenuItems2 = ["
|
|
50686
|
+
filterMenuItems2 = ["isBetween", "notBetween", "isBefore", "isAfter"];
|
|
50882
50687
|
}
|
|
50883
|
-
return filterMenuItems2;
|
|
50688
|
+
return filterMenuItems2.map((item) => startCase(item));
|
|
50884
50689
|
}
|
|
50885
50690
|
__name(getFilterMenuItems, "getFilterMenuItems");
|
|
50886
50691
|
const ColumnFilterMenu = /* @__PURE__ */ __name(({
|
|
@@ -56468,20 +56273,15 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56468
56273
|
props = __spreadValues(__spreadValues({}, props), tableParams);
|
|
56469
56274
|
const queryParams = useMemo(() => {
|
|
56470
56275
|
if (!isTableParamsConnected) {
|
|
56471
|
-
const additionalFilterToUse = typeof props.additionalFilter === "function" ? props.additionalFilter : () => props.additionalFilter;
|
|
56472
|
-
const additionalOrFilterToUse = typeof props.additionalOrFilter === "function" ? props.additionalOrFilter : () => props.additionalOrFilter;
|
|
56473
56276
|
return getQueryParams({
|
|
56474
56277
|
doNotCoercePageSize,
|
|
56475
56278
|
currentParams,
|
|
56476
56279
|
entities: props.entities,
|
|
56477
|
-
// for local table
|
|
56478
|
-
urlConnected,
|
|
56479
56280
|
defaults,
|
|
56480
56281
|
schema: convertedSchema,
|
|
56481
56282
|
isInfinite,
|
|
56482
56283
|
isLocalCall,
|
|
56483
|
-
additionalFilter:
|
|
56484
|
-
additionalOrFilter: additionalOrFilterToUse,
|
|
56284
|
+
additionalFilter: props.additionalFilter,
|
|
56485
56285
|
noOrderError: props.noOrderError,
|
|
56486
56286
|
isCodeModel: props.isCodeModel,
|
|
56487
56287
|
ownProps: props
|
|
@@ -56704,7 +56504,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56704
56504
|
}) : !val;
|
|
56705
56505
|
});
|
|
56706
56506
|
}
|
|
56707
|
-
if (noValsForField) {
|
|
56507
|
+
if (noValsForField && entities.length) {
|
|
56708
56508
|
return __spreadProps(__spreadValues({}, field), {
|
|
56709
56509
|
isHidden: true,
|
|
56710
56510
|
isForcedHidden: true
|
|
@@ -71241,8 +71041,12 @@ const Uploader = /* @__PURE__ */ __name(({
|
|
|
71241
71041
|
onClick: /* @__PURE__ */ __name((evt) => evt.preventDefault(), "onClick"),
|
|
71242
71042
|
multiple: fileLimit !== 1,
|
|
71243
71043
|
accept: simpleAccept ? simpleAccept.split(", ").map((acc) => acc.startsWith(".") ? acc : "." + acc).join(", ") : void 0,
|
|
71244
|
-
onDrop: /* @__PURE__ */ __name((_acceptedFiles, rejectedFiles) => __async(void 0, null, function* () {
|
|
71044
|
+
onDrop: /* @__PURE__ */ __name((_acceptedFiles, rejectedFiles, e) => __async(void 0, null, function* () {
|
|
71245
71045
|
var _a2, _b2;
|
|
71046
|
+
const parentDropzone = e.target.closest(".tg-dropzone");
|
|
71047
|
+
if (parentDropzone) {
|
|
71048
|
+
parentDropzone.blur();
|
|
71049
|
+
}
|
|
71246
71050
|
let acceptedFiles = [];
|
|
71247
71051
|
for (const file of _acceptedFiles) {
|
|
71248
71052
|
if ((validateAgainstSchema || autoUnzip) && isZipFile(file)) {
|
|
@@ -71873,7 +71677,6 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
71873
71677
|
var _a;
|
|
71874
71678
|
const {
|
|
71875
71679
|
additionalFilter,
|
|
71876
|
-
additionalOrFilter,
|
|
71877
71680
|
controlled_pageSize,
|
|
71878
71681
|
defaults: _defaults,
|
|
71879
71682
|
doNotCoercePageSize,
|
|
@@ -71981,28 +71784,21 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
71981
71784
|
[controlled_pageSize, defaultsToUse, pageSize, history == null ? void 0 : history.location]
|
|
71982
71785
|
);
|
|
71983
71786
|
const queryParams = useMemo(() => {
|
|
71984
|
-
const additionalFilterToUse = typeof additionalFilter === "function" ? additionalFilter : () => additionalFilter;
|
|
71985
|
-
const additionalOrFilterToUse = typeof additionalOrFilter === "function" ? additionalOrFilter : () => additionalOrFilter;
|
|
71986
71787
|
return getQueryParams({
|
|
71987
71788
|
doNotCoercePageSize,
|
|
71988
71789
|
currentParams,
|
|
71989
71790
|
entities,
|
|
71990
|
-
// for local table
|
|
71991
|
-
urlConnected,
|
|
71992
71791
|
defaults: defaultsToUse,
|
|
71993
71792
|
schema: convertedSchema,
|
|
71994
71793
|
isInfinite: isInfinite || isSimple && !withPaging,
|
|
71995
71794
|
isLocalCall,
|
|
71996
|
-
additionalFilter
|
|
71997
|
-
additionalOrFilter: additionalOrFilterToUse,
|
|
71795
|
+
additionalFilter,
|
|
71998
71796
|
noOrderError,
|
|
71999
|
-
isCodeModel,
|
|
72000
71797
|
ownProps: passingProps
|
|
72001
71798
|
});
|
|
72002
71799
|
}, [
|
|
72003
71800
|
additionalFilter,
|
|
72004
71801
|
passingProps,
|
|
72005
|
-
additionalOrFilter,
|
|
72006
71802
|
doNotCoercePageSize,
|
|
72007
71803
|
currentParams,
|
|
72008
71804
|
entities,
|
|
@@ -78179,6 +77975,7 @@ export {
|
|
|
78179
77975
|
getTagsAndTagOptions,
|
|
78180
77976
|
getTextFromEl,
|
|
78181
77977
|
hotkeysById,
|
|
77978
|
+
initializeHasuraWhereAndFilter,
|
|
78182
77979
|
inventoryIcon,
|
|
78183
77980
|
isSafari,
|
|
78184
77981
|
keyboardIcon,
|